@mui/x-data-grid 8.22.1 → 8.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +211 -0
  2. package/colDef/gridBooleanColDef.js +0 -1
  3. package/colDef/gridDateOperators.js +6 -6
  4. package/components/GridPagination.js +3 -1
  5. package/components/cell/GridBooleanCell.js +9 -1
  6. package/components/cell/GridEditDateCell.js +3 -1
  7. package/components/cell/GridFooterCell.d.ts +9 -0
  8. package/components/cell/GridFooterCell.js +54 -0
  9. package/components/containers/GridRootStyles.js +8 -0
  10. package/components/menu/columnMenu/GridColumnMenuContainer.js +3 -1
  11. package/components/virtualization/GridBottomContainer.js +4 -1
  12. package/components/virtualization/GridMainContainer.js +4 -1
  13. package/components/virtualization/GridTopContainer.js +4 -1
  14. package/components/virtualization/GridVirtualScrollbar.d.ts +1 -1
  15. package/components/virtualization/GridVirtualScrollbar.js +13 -4
  16. package/components/virtualization/GridVirtualScrollerFiller.js +18 -5
  17. package/esm/colDef/gridBooleanColDef.js +0 -1
  18. package/esm/colDef/gridDateOperators.js +6 -6
  19. package/esm/components/GridPagination.js +3 -1
  20. package/esm/components/cell/GridBooleanCell.js +9 -1
  21. package/esm/components/cell/GridEditDateCell.js +3 -1
  22. package/esm/components/cell/GridFooterCell.d.ts +9 -0
  23. package/esm/components/cell/GridFooterCell.js +48 -0
  24. package/esm/components/containers/GridRootStyles.js +8 -0
  25. package/esm/components/menu/columnMenu/GridColumnMenuContainer.js +3 -1
  26. package/esm/components/virtualization/GridBottomContainer.js +4 -1
  27. package/esm/components/virtualization/GridMainContainer.js +4 -1
  28. package/esm/components/virtualization/GridTopContainer.js +4 -1
  29. package/esm/components/virtualization/GridVirtualScrollbar.d.ts +1 -1
  30. package/esm/components/virtualization/GridVirtualScrollbar.js +13 -4
  31. package/esm/components/virtualization/GridVirtualScrollerFiller.js +18 -5
  32. package/esm/hooks/features/columnResize/gridColumnResizeApi.d.ts +7 -0
  33. package/esm/hooks/features/columnResize/gridColumnResizeApi.js +1 -0
  34. package/esm/hooks/features/columnResize/useGridColumnResize.js +13 -1
  35. package/esm/hooks/features/columns/gridColumnsUtils.js +1 -4
  36. package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +3 -3
  37. package/esm/hooks/features/editing/useGridCellEditing.js +1 -0
  38. package/esm/hooks/features/pagination/gridPaginationSelector.js +3 -0
  39. package/esm/hooks/features/rowSelection/useGridRowSelection.js +17 -15
  40. package/esm/hooks/features/rowSelection/utils.js +2 -2
  41. package/esm/index.js +1 -1
  42. package/esm/internals/index.d.ts +2 -0
  43. package/esm/internals/index.js +1 -0
  44. package/esm/locales/arSD.js +1 -1
  45. package/esm/locales/daDK.js +3 -4
  46. package/esm/locales/faIR.js +1 -1
  47. package/esm/locales/jaJP.js +33 -38
  48. package/esm/locales/ptPT.d.ts +2 -1
  49. package/esm/locales/ptPT.js +114 -125
  50. package/esm/material/index.js +14 -4
  51. package/esm/models/gridAggregation.d.ts +18 -0
  52. package/esm/models/gridAggregation.js +1 -0
  53. package/esm/utils/domUtils.d.ts +1 -0
  54. package/esm/utils/domUtils.js +4 -0
  55. package/esm/utils/utils.d.ts +1 -1
  56. package/esm/utils/utils.js +2 -2
  57. package/hooks/features/columnResize/gridColumnResizeApi.d.ts +7 -0
  58. package/hooks/features/columnResize/gridColumnResizeApi.js +1 -0
  59. package/hooks/features/columnResize/useGridColumnResize.js +12 -0
  60. package/hooks/features/columns/gridColumnsUtils.js +1 -4
  61. package/hooks/features/dataSource/useGridDataSourceBase.d.ts +3 -3
  62. package/hooks/features/editing/useGridCellEditing.js +1 -0
  63. package/hooks/features/pagination/gridPaginationSelector.js +3 -0
  64. package/hooks/features/rowSelection/useGridRowSelection.js +17 -15
  65. package/hooks/features/rowSelection/utils.js +2 -2
  66. package/index.js +1 -1
  67. package/internals/index.d.ts +2 -0
  68. package/internals/index.js +8 -0
  69. package/locales/arSD.js +1 -1
  70. package/locales/daDK.js +3 -4
  71. package/locales/faIR.js +1 -1
  72. package/locales/jaJP.js +33 -38
  73. package/locales/ptPT.d.ts +2 -1
  74. package/locales/ptPT.js +114 -125
  75. package/material/index.js +14 -4
  76. package/models/gridAggregation.d.ts +18 -0
  77. package/models/gridAggregation.js +5 -0
  78. package/package.json +3 -3
  79. package/utils/domUtils.d.ts +1 -0
  80. package/utils/domUtils.js +5 -0
  81. package/utils/utils.d.ts +1 -1
  82. package/utils/utils.js +2 -2
@@ -251,8 +251,7 @@ const createColumnsState = ({
251
251
  const currentState = (0, _gridColumnsSelector.gridColumnsStateSelector)(apiRef);
252
252
  columnsState = {
253
253
  orderedFields: keepOnlyColumnsToUpsert ? [] : [...currentState.orderedFields],
254
- lookup: (0, _extends2.default)({}, currentState.lookup),
255
- // Will be cleaned later if keepOnlyColumnsToUpsert=true
254
+ lookup: keepOnlyColumnsToUpsert ? {} : (0, _extends2.default)({}, currentState.lookup),
256
255
  columnVisibilityModel,
257
256
  initialColumnVisibilityModel: updateInitialVisibilityModel ? columnVisibilityModel : currentState.initialColumnVisibilityModel
258
257
  };
@@ -265,12 +264,10 @@ const createColumnsState = ({
265
264
  }
266
265
  }
267
266
  }
268
- const columnsToUpsertLookup = {};
269
267
  columnsToUpsert.forEach(newColumn => {
270
268
  const {
271
269
  field
272
270
  } = newColumn;
273
- columnsToUpsertLookup[field] = true;
274
271
  columnsToKeep[field] = true;
275
272
  let existingState = columnsState.lookup[field];
276
273
  if (existingState == null) {
@@ -21,8 +21,8 @@ export declare const useGridDataSourceBase: <Api extends GridPrivateApiCommunity
21
21
  cache: GridDataSourceCache;
22
22
  events: {
23
23
  strategyAvailabilityChange: GridEventListener<"strategyAvailabilityChange">;
24
- sortModelChange: (params: unknown) => void;
25
- filterModelChange: (params: unknown) => void;
26
- paginationModelChange: (params: unknown) => void;
24
+ sortModelChange: (...params: unknown[]) => void;
25
+ filterModelChange: (...params: unknown[]) => void;
26
+ paginationModelChange: (...params: unknown[]) => void;
27
27
  };
28
28
  };
@@ -114,6 +114,7 @@ const useGridCellEditing = (apiRef, props) => {
114
114
  reason = _gridEditCellParams.GridCellEditStartReasons.pasteKeyDown;
115
115
  } else if (event.key === 'Enter') {
116
116
  reason = _gridEditCellParams.GridCellEditStartReasons.enterKeyDown;
117
+ event.preventDefault();
117
118
  } else if (event.key === 'Backspace' || event.key === 'Delete') {
118
119
  reason = _gridEditCellParams.GridCellEditStartReasons.deleteKeyDown;
119
120
  }
@@ -66,6 +66,9 @@ const gridPaginationRowRangeSelector = exports.gridPaginationRowRangeSelector =
66
66
  if (!clientSidePaginationEnabled) {
67
67
  return null;
68
68
  }
69
+ if (!visibleSortedRowEntries || visibleSortedRowEntries.length === 0) {
70
+ return null;
71
+ }
69
72
  const visibleTopLevelRowCount = visibleSortedTopLevelRowEntries.length;
70
73
  const topLevelFirstRowIndex = Math.min(paginationModel.pageSize * paginationModel.page, visibleTopLevelRowCount - 1);
71
74
  const topLevelLastRowIndex = paginationModel.pageSize === ALL_RESULTS_PAGE_VALUE ? visibleTopLevelRowCount - 1 : Math.min(topLevelFirstRowIndex + paginationModel.pageSize - 1, visibleTopLevelRowCount - 1);
@@ -27,6 +27,7 @@ var _constants = require("../../../internals/constants");
27
27
  var _gridClasses = require("../../../constants/gridClasses");
28
28
  var _domUtils = require("../../../utils/domUtils");
29
29
  var _utils = require("./utils");
30
+ var _utils2 = require("../../../utils/utils");
30
31
  var _gridRowSelectionManager = require("../../../models/gridRowSelectionManager");
31
32
  var _pagination = require("../pagination");
32
33
  const emptyModel = {
@@ -46,11 +47,6 @@ const rowSelectionStateInitializer = (state, props) => (0, _extends2.default)({}
46
47
  exports.rowSelectionStateInitializer = rowSelectionStateInitializer;
47
48
  const useGridRowSelection = (apiRef, props) => {
48
49
  const logger = (0, _useGridLogger.useGridLogger)(apiRef, 'useGridSelection');
49
- const runIfRowSelectionIsEnabled = React.useCallback(callback => (...args) => {
50
- if (props.rowSelection) {
51
- callback(...args);
52
- }
53
- }, [props.rowSelection]);
54
50
  const isNestedData = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridRowMaximumTreeDepthSelector) > 1;
55
51
  const applyAutoSelection = props.signature !== _signature.GridSignature.DataGrid && (props.rowSelectionPropagation?.parents || props.rowSelectionPropagation?.descendants) && isNestedData;
56
52
  const propRowSelectionModel = React.useMemo(() => {
@@ -129,6 +125,12 @@ const useGridRowSelection = (apiRef, props) => {
129
125
  if (props.rowSelection === false) {
130
126
  return false;
131
127
  }
128
+
129
+ // If `keepNonExistentRowsSelected` is true, we might run in a case where row selectability is checked for a row that does not exist.
130
+ // Since that row was previously selected (otherwise it would not be checked at this point), we return true.
131
+ if (props.keepNonExistentRowsSelected && !apiRef.current.getRow(id)) {
132
+ return true;
133
+ }
132
134
  if (propIsRowSelectable && !propIsRowSelectable(apiRef.current.getRowParams(id))) {
133
135
  return false;
134
136
  }
@@ -137,7 +139,7 @@ const useGridRowSelection = (apiRef, props) => {
137
139
  return false;
138
140
  }
139
141
  return true;
140
- }, [apiRef, props.rowSelection, propIsRowSelectable]);
142
+ }, [apiRef, props.rowSelection, props.keepNonExistentRowsSelected, propIsRowSelectable]);
141
143
  const getSelectedRows = React.useCallback(() => (0, _gridRowSelectionSelector.gridRowSelectionIdsSelector)(apiRef), [apiRef]);
142
144
  const selectRow = React.useCallback((id, isSelected = true, resetSelection = false) => {
143
145
  if (!apiRef.current.isRowSelectable(id)) {
@@ -311,7 +313,7 @@ const useGridRowSelection = (apiRef, props) => {
311
313
  * EVENTS
312
314
  */
313
315
  const isFirstRender = React.useRef(true);
314
- const removeOutdatedSelection = React.useCallback((sortModelUpdated = false) => {
316
+ const removeOutdatedSelection = React.useCallback(() => {
315
317
  if (isFirstRender.current) {
316
318
  return;
317
319
  }
@@ -365,7 +367,7 @@ const useGridRowSelection = (apiRef, props) => {
365
367
  const shouldReapplyPropagation = isNestedData && props.rowSelectionPropagation?.parents && (newSelectionModel.ids.size > 0 ||
366
368
  // In case of exclude selection, newSelectionModel.ids.size === 0 means all rows are selected
367
369
  newSelectionModel.type === 'exclude');
368
- if (hasChanged || shouldReapplyPropagation && !sortModelUpdated) {
370
+ if (hasChanged || shouldReapplyPropagation) {
369
371
  if (shouldReapplyPropagation) {
370
372
  if (newSelectionModel.type === 'exclude') {
371
373
  const unfilteredSelectedRowIds = getRowsToBeSelected();
@@ -548,12 +550,12 @@ const useGridRowSelection = (apiRef, props) => {
548
550
  }
549
551
  apiRef.current.setRowSelectionModel(propRowSelectionModel);
550
552
  });
551
- (0, _useGridEvent.useGridEvent)(apiRef, 'filteredRowsSet', runIfRowSelectionIsEnabled(() => removeOutdatedSelection()));
552
- (0, _useGridEvent.useGridEvent)(apiRef, 'rowClick', runIfRowSelectionIsEnabled(handleRowClick));
553
- (0, _useGridEvent.useGridEvent)(apiRef, 'rowSelectionCheckboxChange', runIfRowSelectionIsEnabled(handleRowSelectionCheckboxChange));
553
+ (0, _useGridEvent.useGridEvent)(apiRef, 'filteredRowsSet', (0, _utils2.runIf)(props.rowSelection, removeOutdatedSelection));
554
+ (0, _useGridEvent.useGridEvent)(apiRef, 'rowClick', (0, _utils2.runIf)(props.rowSelection, handleRowClick));
555
+ (0, _useGridEvent.useGridEvent)(apiRef, 'rowSelectionCheckboxChange', (0, _utils2.runIf)(props.rowSelection, handleRowSelectionCheckboxChange));
554
556
  (0, _useGridEvent.useGridEvent)(apiRef, 'headerSelectionCheckboxChange', handleHeaderSelectionCheckboxChange);
555
- (0, _useGridEvent.useGridEvent)(apiRef, 'cellMouseDown', runIfRowSelectionIsEnabled(preventSelectionOnShift));
556
- (0, _useGridEvent.useGridEvent)(apiRef, 'cellKeyDown', runIfRowSelectionIsEnabled(handleCellKeyDown));
557
+ (0, _useGridEvent.useGridEvent)(apiRef, 'cellMouseDown', (0, _utils2.runIf)(props.rowSelection, preventSelectionOnShift));
558
+ (0, _useGridEvent.useGridEvent)(apiRef, 'cellKeyDown', (0, _utils2.runIf)(props.rowSelection, handleCellKeyDown));
557
559
 
558
560
  /*
559
561
  * EFFECTS
@@ -596,8 +598,8 @@ const useGridRowSelection = (apiRef, props) => {
596
598
  }
597
599
  }, [apiRef, canHaveMultipleSelection, checkboxSelection, isStateControlled, props.rowSelection]);
598
600
  React.useEffect(() => {
599
- runIfRowSelectionIsEnabled(removeOutdatedSelection);
600
- }, [removeOutdatedSelection, runIfRowSelectionIsEnabled]);
601
+ (0, _utils2.runIf)(props.rowSelection, removeOutdatedSelection);
602
+ }, [props.rowSelection, removeOutdatedSelection]);
601
603
  React.useEffect(() => {
602
604
  if (isFirstRender.current) {
603
605
  isFirstRender.current = false;
@@ -47,7 +47,7 @@ const checkboxPropsSelector = exports.checkboxPropsSelector = (0, _createSelecto
47
47
  columns
48
48
  };
49
49
  let isSelectable = true;
50
- if (typeof isRowSelectable === 'function') {
50
+ if (typeof isRowSelectable === 'function' && rowsLookup[groupId]) {
51
51
  isSelectable = isRowSelectable(rowParams);
52
52
  }
53
53
  if (!groupNode || groupNode.type !== 'group' || rowSelectionManager.has(groupId)) {
@@ -76,7 +76,7 @@ const checkboxPropsSelector = exports.checkboxPropsSelector = (0, _createSelecto
76
76
  row: rowsLookup[itemToTraverseId],
77
77
  columns
78
78
  };
79
- const rowIsSelectable = typeof isRowSelectable === 'function' ? isRowSelectable(descendantRowParams) : true;
79
+ const rowIsSelectable = typeof isRowSelectable === 'function' && rowsLookup[itemToTraverseId] ? isRowSelectable(descendantRowParams) : true;
80
80
 
81
81
  // Only consider selectable rows when determining parent selection state
82
82
  if (rowIsSelectable) {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v8.22.1
2
+ * @mui/x-data-grid v8.24.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -8,6 +8,7 @@ export { GridHeaders } from "../components/GridHeaders.js";
8
8
  export { GridToolbar, GridToolbarDivider } from "../components/toolbarV8/GridToolbar.js";
9
9
  export type { GridToolbarProps } from "../components/toolbarV8/GridToolbar.js";
10
10
  export { GridColumnSortButton } from "../components/GridColumnSortButton.js";
11
+ export { GridFooterCell } from "../components/cell/GridFooterCell.js";
11
12
  export { GridBaseColumnHeaders } from "../components/columnHeaders/GridBaseColumnHeaders.js";
12
13
  export { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from "../constants/defaultGridSlotsComponents.js";
13
14
  export * from "../constants/signature.js";
@@ -88,6 +89,7 @@ export { useGridInitializeState } from "../hooks/utils/useGridInitializeState.js
88
89
  export type { GridStateInitializer } from "../hooks/utils/useGridInitializeState.js";
89
90
  export type * as BaseSlots from "../models/gridBaseSlots.js";
90
91
  export type * from "../models/props/DataGridProps.js";
92
+ export type { GridAggregationPosition, GridAggregationCellMeta } from "../models/gridAggregation.js";
91
93
  export type { GridDataSourceApiBase, GridDataSourceApi, GridDataSourceBaseOptions, GridDataSourceFetchRowsParams } from "../hooks/features/dataSource/models.js";
92
94
  export { DataSourceRowsUpdateStrategy } from "../hooks/features/dataSource/utils.js";
93
95
  export { useGridDataSourceBase } from "../hooks/features/dataSource/useGridDataSourceBase.js";
@@ -11,6 +11,7 @@ var _exportNames = {
11
11
  GridToolbar: true,
12
12
  GridToolbarDivider: true,
13
13
  GridColumnSortButton: true,
14
+ GridFooterCell: true,
14
15
  GridBaseColumnHeaders: true,
15
16
  DATA_GRID_DEFAULT_SLOTS_COMPONENTS: true,
16
17
  vars: true,
@@ -169,6 +170,12 @@ Object.defineProperty(exports, "GridColumnSortButton", {
169
170
  return _GridColumnSortButton.GridColumnSortButton;
170
171
  }
171
172
  });
173
+ Object.defineProperty(exports, "GridFooterCell", {
174
+ enumerable: true,
175
+ get: function () {
176
+ return _GridFooterCell.GridFooterCell;
177
+ }
178
+ });
172
179
  Object.defineProperty(exports, "GridHeaders", {
173
180
  enumerable: true,
174
181
  get: function () {
@@ -865,6 +872,7 @@ var _GridVirtualScrollerRenderZone = require("../components/virtualization/GridV
865
872
  var _GridHeaders = require("../components/GridHeaders");
866
873
  var _GridToolbar = require("../components/toolbarV8/GridToolbar");
867
874
  var _GridColumnSortButton = require("../components/GridColumnSortButton");
875
+ var _GridFooterCell = require("../components/cell/GridFooterCell");
868
876
  var _GridBaseColumnHeaders = require("../components/columnHeaders/GridBaseColumnHeaders");
869
877
  var _defaultGridSlotsComponents = require("../constants/defaultGridSlotsComponents");
870
878
  var _signature = require("../constants/signature");
package/locales/arSD.js CHANGED
@@ -29,7 +29,7 @@ const arSDGrid = {
29
29
  toolbarFiltersTooltipShow: 'اظهر المرشِحات',
30
30
  toolbarFiltersTooltipActive: count => count !== 1 ? `${count} من المرشِحات النشطة` : `مرشِح نشط`,
31
31
  // Quick filter toolbar field
32
- toolbarQuickFilterPlaceholder: 'بحث...',
32
+ toolbarQuickFilterPlaceholder: 'بحث…',
33
33
  toolbarQuickFilterLabel: 'بحث',
34
34
  toolbarQuickFilterDeleteIconLabel: 'أزال',
35
35
  // Export selector toolbar button text
package/locales/daDK.js CHANGED
@@ -9,8 +9,8 @@ const daDKGrid = {
9
9
  // Root
10
10
  noRowsLabel: 'Ingen rækker',
11
11
  noResultsOverlayLabel: 'Ingen resultater',
12
- // noColumnsOverlayLabel: 'No columns',
13
- // noColumnsOverlayManageColumns: 'Manage columns',
12
+ noColumnsOverlayLabel: 'Ingen kolonner',
13
+ noColumnsOverlayManageColumns: 'Administrer kolonner',
14
14
  // emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
15
15
 
16
16
  // Density selector toolbar button text
@@ -109,8 +109,7 @@ const daDKGrid = {
109
109
  'headerFilterOperator>=': 'Større end eller lig med',
110
110
  'headerFilterOperator<': 'Mindre end',
111
111
  'headerFilterOperator<=': 'Mindre end eller lig med',
112
- // headerFilterClear: 'Clear filter',
113
-
112
+ headerFilterClear: 'Ryd filter',
114
113
  // Filter values text
115
114
  filterValueAny: 'hvilken som helst',
116
115
  filterValueTrue: 'positiv',
package/locales/faIR.js CHANGED
@@ -29,7 +29,7 @@ const faIRGrid = {
29
29
  toolbarFiltersTooltipShow: 'نمایش فیلترها',
30
30
  toolbarFiltersTooltipActive: count => count !== 1 ? `${count} فیلترهای فعال` : `${count} فیلتر فعال`,
31
31
  // Quick filter toolbar field
32
- toolbarQuickFilterPlaceholder: 'جستجو...',
32
+ toolbarQuickFilterPlaceholder: 'جستجو…',
33
33
  toolbarQuickFilterLabel: 'جستجو',
34
34
  toolbarQuickFilterDeleteIconLabel: 'حذف',
35
35
  // Export selector toolbar button text
package/locales/jaJP.js CHANGED
@@ -109,8 +109,7 @@ const jaJPGrid = {
109
109
  'headerFilterOperator>=': '以上',
110
110
  'headerFilterOperator<': '未満',
111
111
  'headerFilterOperator<=': '以下',
112
- // headerFilterClear: 'Clear filter',
113
-
112
+ headerFilterClear: 'フィルターを削除',
114
113
  // Filter values text
115
114
  filterValueAny: 'いずれか',
116
115
  filterValueTrue: '真',
@@ -125,9 +124,8 @@ const jaJPGrid = {
125
124
  columnMenuUnsort: 'ソート解除',
126
125
  columnMenuSortAsc: '昇順ソート',
127
126
  columnMenuSortDesc: '降順ソート',
128
- // columnMenuManagePivot: 'Manage pivot',
129
- // columnMenuManageCharts: 'Manage charts',
130
-
127
+ columnMenuManagePivot: 'ピボットを管理',
128
+ columnMenuManageCharts: 'チャートを管理',
131
129
  // Column header text
132
130
  columnHeaderFiltersTooltipActive: count => `${count}件のフィルターを適用中`,
133
131
  columnHeaderFiltersLabel: 'フィルター表示',
@@ -167,18 +165,18 @@ const jaJPGrid = {
167
165
  collapseDetailPanel: '折りたたみ',
168
166
  // Pagination
169
167
  paginationRowsPerPage: 'ページあたりの行数:',
170
- // paginationDisplayedRows: ({
171
- // from,
172
- // to,
173
- // count,
174
- // estimated
175
- // }) => {
176
- // if (!estimated) {
177
- // return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
178
- // }
179
- // const estimatedLabel = estimated && estimated > to ? `around ${estimated}` : `more than ${to}`;
180
- // return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
181
- // },
168
+ paginationDisplayedRows: ({
169
+ from,
170
+ to,
171
+ count,
172
+ estimated
173
+ }) => {
174
+ if (!estimated) {
175
+ return `${from}–${to} of ${count !== -1 ? count : `${to}以上`}`;
176
+ }
177
+ const estimatedLabel = estimated && estimated > to ? `${estimated}前後` : `${to}以上`;
178
+ return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
179
+ },
182
180
  paginationItemAriaLabel: type => {
183
181
  if (type === 'first') {
184
182
  return '最初のページへ';
@@ -201,8 +199,7 @@ const jaJPGrid = {
201
199
  aggregationFunctionLabelAvg: '平均',
202
200
  aggregationFunctionLabelMin: '最小値',
203
201
  aggregationFunctionLabelMax: '最大値',
204
- aggregationFunctionLabelSize: 'サイズ'
205
-
202
+ aggregationFunctionLabelSize: 'サイズ',
206
203
  // Pivot panel
207
204
  // pivotToggleLabel: 'Pivot',
208
205
  // pivotRows: 'Rows',
@@ -237,16 +234,16 @@ const jaJPGrid = {
237
234
  // chartsChartNotSelected: 'Select a chart type to configure its options',
238
235
  // chartsTabChart: 'Chart',
239
236
  // chartsTabFields: 'Fields',
240
- // chartsTabCustomize: 'Customize',
237
+ chartsTabCustomize: 'カスタマイズ',
241
238
  // chartsCloseButton: 'Close charts configuration',
242
239
  // chartsSyncButtonLabel: 'Sync chart',
243
240
  // chartsSearchPlaceholder: 'Search fields',
244
- // chartsSearchLabel: 'Search fields',
241
+ chartsSearchLabel: 'フィールドを検索する',
245
242
  // chartsSearchClear: 'Clear search',
246
243
  // chartsNoFields: 'No fields',
247
244
  // chartsFieldBlocked: 'This field cannot be added to any section',
248
- // chartsCategories: 'Categories',
249
- // chartsSeries: 'Series',
245
+ chartsCategories: 'カテゴリ',
246
+ chartsSeries: 'シリーズ',
250
247
  // chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
251
248
  // chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
252
249
  // chartsMenuMoveUp: 'Move up',
@@ -259,27 +256,25 @@ const jaJPGrid = {
259
256
  // chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
260
257
 
261
258
  // AI Assistant panel
262
- // aiAssistantPanelTitle: 'AI Assistant',
263
- // aiAssistantPanelClose: 'Close AI Assistant',
264
- // aiAssistantPanelNewConversation: 'New conversation',
265
- // aiAssistantPanelConversationHistory: 'Conversation history',
259
+ aiAssistantPanelTitle: 'AIアシスタント',
260
+ aiAssistantPanelClose: 'AIアシスタントパネルを閉じる',
261
+ aiAssistantPanelNewConversation: '新しい会話を開始する',
262
+ aiAssistantPanelConversationHistory: '会話の履歴',
266
263
  // aiAssistantPanelEmptyConversation: 'No prompt history',
267
- // aiAssistantSuggestions: 'Suggestions',
268
-
264
+ aiAssistantSuggestions: '提案',
269
265
  // Prompt field
270
- // promptFieldLabel: 'Prompt',
271
- // promptFieldPlaceholder: 'Type a prompt…',
266
+ promptFieldLabel: 'プロンプト',
267
+ promptFieldPlaceholder: 'プロンプトを入力...',
272
268
  // promptFieldPlaceholderWithRecording: 'Type or record a prompt…',
273
269
  // promptFieldPlaceholderListening: 'Listening for prompt…',
274
270
  // promptFieldSpeechRecognitionNotSupported: 'Speech recognition is not supported in this browser',
275
- // promptFieldSend: 'Send',
276
- // promptFieldRecord: 'Record',
277
- // promptFieldStopRecording: 'Stop recording',
278
-
271
+ promptFieldSend: '送信',
272
+ promptFieldRecord: '録音',
273
+ promptFieldStopRecording: '録音を止める',
279
274
  // Prompt
280
- // promptRerun: 'Run again',
281
- // promptProcessing: 'Processing…',
282
- // promptAppliedChanges: 'Applied changes',
275
+ promptRerun: '再試行',
276
+ promptProcessing: '実行中…',
277
+ promptAppliedChanges: '変更を適用済み'
283
278
 
284
279
  // Prompt changes
285
280
  // promptChangeGroupDescription: (column: string) => `Group by ${column}`,
package/locales/ptPT.d.ts CHANGED
@@ -1 +1,2 @@
1
- export declare const ptPT: import("../internals/index.js").Localization;
1
+ import { Localization } from "../utils/getGridLocalization.js";
2
+ export declare const ptPT: Localization;