From 34f8f5ed01b2c373b81ca9f2f1d232b808a2db2e Mon Sep 17 00:00:00 2001 From: Gene Arch Date: Wed, 17 Apr 2024 21:48:55 -0500 Subject: [PATCH 1/4] export GridAggregationParams for use with custom aggregators (#12822) Signed-off-by: Gene Arch Co-authored-by: Rom Grk --- .../src/hooks/features/aggregation/gridAggregationInterfaces.ts | 2 +- scripts/x-data-grid-premium.exports.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts b/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts index 82ecbce2fc1c..212bdef1a008 100644 --- a/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts +++ b/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts @@ -74,7 +74,7 @@ export interface GridAggregationFunction { getCellValue?: (params: GridAggregationGetCellValueParams) => V; } -interface GridAggregationParams { +export interface GridAggregationParams { values: (V | undefined)[]; groupId: GridRowId; field: GridColDef['field']; diff --git a/scripts/x-data-grid-premium.exports.json b/scripts/x-data-grid-premium.exports.json index 8958c94d078b..866dd835ac8a 100644 --- a/scripts/x-data-grid-premium.exports.json +++ b/scripts/x-data-grid-premium.exports.json @@ -94,6 +94,7 @@ { "name": "gridAggregationLookupSelector", "kind": "Variable" }, { "name": "GridAggregationModel", "kind": "TypeAlias" }, { "name": "gridAggregationModelSelector", "kind": "Variable" }, + { "name": "GridAggregationParams", "kind": "Interface" }, { "name": "GridAggregationPosition", "kind": "TypeAlias" }, { "name": "GridAggregationRule", "kind": "Interface" }, { "name": "GridAggregationRules", "kind": "TypeAlias" }, From 8689c0639d099086fc054a39f1d6d2fd6c1e3b75 Mon Sep 17 00:00:00 2001 From: Jacob Rowland Date: Wed, 5 Jun 2024 09:42:19 +1200 Subject: [PATCH 2/4] Added daDK translations to x-date-pickers --- packages/x-date-pickers/src/locales/daDK.ts | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/x-date-pickers/src/locales/daDK.ts b/packages/x-date-pickers/src/locales/daDK.ts index 4b6ad4eee2cb..80b81cc54a47 100644 --- a/packages/x-date-pickers/src/locales/daDK.ts +++ b/packages/x-date-pickers/src/locales/daDK.ts @@ -26,10 +26,10 @@ const daDKPickers: Partial> = { // DateRange labels start: 'Start', end: 'Slut', - // startDate: 'Start date', - // startTime: 'Start time', - // endDate: 'End date', - // endTime: 'End time', + startDate: 'Start dato', + startTime: 'Start tid', + endDate: 'Slut date', + endTime: 'Slut tid', // Action bar cancelButtonLabel: 'Annuller', @@ -68,7 +68,7 @@ const daDKPickers: Partial> = { value !== null && utils.isValid(value) ? `Vælg tidspunkt, valgte tidspunkt er ${utils.format(value, 'fullTime')}` : 'Vælg tidspunkt', - // fieldClearLabel: 'Clear value', + fieldClearLabel: 'ryd felt', // Table labels timeTableLabel: 'vælg tidspunkt', @@ -85,17 +85,17 @@ const daDKPickers: Partial> = { fieldMeridiemPlaceholder: () => 'aa', // View names - // year: 'Year', - // month: 'Month', - // day: 'Day', - // weekDay: 'Week day', - // hours: 'Hours', - // minutes: 'Minutes', - // seconds: 'Seconds', - // meridiem: 'Meridiem', + year: 'år', + month: 'måned', + day: 'dag', + weekDay: 'ugedag', + hours: 'timer', + minutes: 'minutter', + seconds: 'sekunder', + meridiem: 'middag', // Common - // empty: 'Empty', + empty: 'tom', }; export const daDK = getPickersLocalization(daDKPickers); From 1a7188b88ad818ae7917036fbc200a8aab58db71 Mon Sep 17 00:00:00 2001 From: Jacob Rowland Date: Wed, 5 Jun 2024 16:35:13 +1200 Subject: [PATCH 3/4] l10n --- docs/data/date-pickers/localization/data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/data/date-pickers/localization/data.json b/docs/data/date-pickers/localization/data.json index c18fc5c7e895..036256fdc951 100644 --- a/docs/data/date-pickers/localization/data.json +++ b/docs/data/date-pickers/localization/data.json @@ -51,7 +51,7 @@ "languageTag": "da-DK", "importName": "daDK", "localeName": "Danish", - "missingKeysCount": 14, + "missingKeysCount": 0, "totalKeysCount": 50, "githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/locales/daDK.ts" }, From 8420c512833749e4b92d758eb529f5e8b689ae75 Mon Sep 17 00:00:00 2001 From: Jacob Rowland Date: Wed, 5 Jun 2024 18:55:58 +1200 Subject: [PATCH 4/4] Revert "export GridAggregationParams for use with custom aggregators (#12822)" This reverts commit 34f8f5ed01b2c373b81ca9f2f1d232b808a2db2e. --- .../src/hooks/features/aggregation/gridAggregationInterfaces.ts | 2 +- scripts/x-data-grid-premium.exports.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts b/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts index 212bdef1a008..82ecbce2fc1c 100644 --- a/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts +++ b/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts @@ -74,7 +74,7 @@ export interface GridAggregationFunction { getCellValue?: (params: GridAggregationGetCellValueParams) => V; } -export interface GridAggregationParams { +interface GridAggregationParams { values: (V | undefined)[]; groupId: GridRowId; field: GridColDef['field']; diff --git a/scripts/x-data-grid-premium.exports.json b/scripts/x-data-grid-premium.exports.json index 866dd835ac8a..8958c94d078b 100644 --- a/scripts/x-data-grid-premium.exports.json +++ b/scripts/x-data-grid-premium.exports.json @@ -94,7 +94,6 @@ { "name": "gridAggregationLookupSelector", "kind": "Variable" }, { "name": "GridAggregationModel", "kind": "TypeAlias" }, { "name": "gridAggregationModelSelector", "kind": "Variable" }, - { "name": "GridAggregationParams", "kind": "Interface" }, { "name": "GridAggregationPosition", "kind": "TypeAlias" }, { "name": "GridAggregationRule", "kind": "Interface" }, { "name": "GridAggregationRules", "kind": "TypeAlias" },