@mui/x-data-grid 8.2.0 → 8.3.1

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 (42) hide show
  1. package/CHANGELOG.md +199 -6
  2. package/components/GridScrollArea.js +1 -2
  3. package/components/base/GridOverlays.js +2 -3
  4. package/components/columnSelection/GridCellCheckboxRenderer.js +4 -2
  5. package/components/columnSelection/GridHeaderCheckbox.js +4 -0
  6. package/esm/components/GridScrollArea.js +1 -2
  7. package/esm/components/base/GridOverlays.js +2 -3
  8. package/esm/components/columnSelection/GridCellCheckboxRenderer.js +6 -4
  9. package/esm/components/columnSelection/GridHeaderCheckbox.js +4 -0
  10. package/esm/hooks/features/columns/gridColumnsUtils.js +15 -7
  11. package/esm/hooks/features/editing/useGridCellEditing.js +2 -1
  12. package/esm/hooks/features/editing/useGridRowEditing.js +7 -6
  13. package/esm/hooks/features/rowSelection/useGridRowSelection.js +6 -6
  14. package/esm/hooks/features/rowSelection/utils.d.ts +4 -1
  15. package/esm/hooks/features/rowSelection/utils.js +34 -33
  16. package/esm/hooks/features/virtualization/useGridVirtualScroller.js +7 -6
  17. package/esm/index.d.ts +1 -0
  18. package/esm/index.js +2 -1
  19. package/esm/locales/koKR.js +68 -76
  20. package/esm/locales/nbNO.js +22 -24
  21. package/esm/material/index.js +24 -24
  22. package/esm/models/api/gridRowSelectionApi.d.ts +4 -2
  23. package/esm/models/events/gridEventLookup.d.ts +1 -0
  24. package/esm/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +1 -1
  25. package/esm/utils/css/context.js +4 -1
  26. package/hooks/features/columns/gridColumnsUtils.js +15 -7
  27. package/hooks/features/editing/useGridCellEditing.js +2 -1
  28. package/hooks/features/editing/useGridRowEditing.js +6 -5
  29. package/hooks/features/rowSelection/useGridRowSelection.js +6 -6
  30. package/hooks/features/rowSelection/utils.d.ts +4 -1
  31. package/hooks/features/rowSelection/utils.js +35 -35
  32. package/hooks/features/virtualization/useGridVirtualScroller.js +7 -6
  33. package/index.d.ts +1 -0
  34. package/index.js +2 -1
  35. package/locales/koKR.js +68 -76
  36. package/locales/nbNO.js +22 -24
  37. package/material/index.js +24 -24
  38. package/models/api/gridRowSelectionApi.d.ts +4 -2
  39. package/models/events/gridEventLookup.d.ts +1 -0
  40. package/package.json +4 -4
  41. package/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +1 -1
  42. package/utils/css/context.js +4 -1
@@ -101,7 +101,7 @@ const useGridRowSelection = (apiRef, props) => {
101
101
  /*
102
102
  * API METHODS
103
103
  */
104
- const setRowSelectionModel = React.useCallback(model => {
104
+ const setRowSelectionModel = React.useCallback((model, reason) => {
105
105
  if (props.signature === _signature.GridSignature.DataGrid && !canHaveMultipleSelection && (model.type !== 'include' || model.ids.size > 1)) {
106
106
  throw new Error(['MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection.'].join('\n'));
107
107
  }
@@ -110,7 +110,7 @@ const useGridRowSelection = (apiRef, props) => {
110
110
  logger.debug(`Setting selection model`);
111
111
  apiRef.current.setState(state => (0, _extends2.default)({}, state, {
112
112
  rowSelection: props.rowSelection ? model : emptyModel
113
- }));
113
+ }), reason);
114
114
  }
115
115
  }, [apiRef, logger, props.rowSelection, props.signature, canHaveMultipleSelection]);
116
116
  const isRowSelected = React.useCallback(id => {
@@ -151,7 +151,7 @@ const useGridRowSelection = (apiRef, props) => {
151
151
  (0, _utils.findRowsToSelect)(apiRef, tree, id, props.rowSelectionPropagation?.descendants ?? false, props.rowSelectionPropagation?.parents ?? false, addRow);
152
152
  }
153
153
  }
154
- apiRef.current.setRowSelectionModel(newSelectionModel);
154
+ apiRef.current.setRowSelectionModel(newSelectionModel, 'singleRowSelection');
155
155
  } else {
156
156
  logger.debug(`Toggling selection for row ${id}`);
157
157
  const selectionModel = (0, _gridRowSelectionSelector.gridRowSelectionStateSelector)(apiRef);
@@ -177,7 +177,7 @@ const useGridRowSelection = (apiRef, props) => {
177
177
  }
178
178
  const isSelectionValid = newSelectionModel.type === 'include' && newSelectionModel.ids.size < 2 || canHaveMultipleSelection;
179
179
  if (isSelectionValid) {
180
- apiRef.current.setRowSelectionModel(newSelectionModel);
180
+ apiRef.current.setRowSelectionModel(newSelectionModel, 'singleRowSelection');
181
181
  }
182
182
  }
183
183
  }, [apiRef, logger, applyAutoSelection, tree, props.rowSelectionPropagation?.descendants, props.rowSelectionPropagation?.parents, canHaveMultipleSelection]);
@@ -244,7 +244,7 @@ const useGridRowSelection = (apiRef, props) => {
244
244
  }
245
245
  const isSelectionValid = newSelectionModel.type === 'include' && newSelectionModel.ids.size < 2 || canHaveMultipleSelection;
246
246
  if (isSelectionValid) {
247
- apiRef.current.setRowSelectionModel(newSelectionModel);
247
+ apiRef.current.setRowSelectionModel(newSelectionModel, 'multipleRowsSelection');
248
248
  }
249
249
  }, [logger, applyAutoSelection, canHaveMultipleSelection, apiRef, tree, props.rowSelectionPropagation?.descendants, props.rowSelectionPropagation?.parents, props.rowSelection]);
250
250
  const getPropagatedRowSelectionModel = React.useCallback(inputSelectionModel => {
@@ -369,7 +369,7 @@ const useGridRowSelection = (apiRef, props) => {
369
369
  apiRef.current.selectRows(Array.from(newSelectionModel.ids), true, true);
370
370
  }
371
371
  } else {
372
- apiRef.current.setRowSelectionModel(newSelectionModel);
372
+ apiRef.current.setRowSelectionModel(newSelectionModel, 'multipleRowsSelection');
373
373
  }
374
374
  }
375
375
  }, [apiRef, isNestedData, props.rowSelectionPropagation?.parents, props.keepNonExistentRowsSelected, props.filterMode, tree, getRowsToBeSelected]);
@@ -5,7 +5,10 @@ import type { GridPrivateApiCommunity } from "../../../models/api/gridApiCommuni
5
5
  import { type GridRowSelectionPropagation } from "../../../models/gridRowSelectionModel.js";
6
6
  import { type RowSelectionManager } from "../../../models/gridRowSelectionManager.js";
7
7
  export declare const ROW_SELECTION_PROPAGATION_DEFAULT: GridRowSelectionPropagation;
8
- export declare function getCheckboxPropsSelector(groupId: GridRowId, autoSelectParents: boolean): import("@mui/x-data-grid").OutputSelector<import("../../../models/gridStateCommunity.js").GridStateCommunity, RowSelectionManager, {
8
+ export declare const checkboxPropsSelector: import("@mui/x-data-grid").OutputSelector<import("../../../models/gridStateCommunity.js").GridStateCommunity, {
9
+ groupId: GridRowId;
10
+ autoSelectParents: boolean;
11
+ }, {
9
12
  isIndeterminate: boolean;
10
13
  isChecked: boolean;
11
14
  }>;
@@ -3,8 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.findRowsToSelect = exports.findRowsToDeselect = exports.ROW_SELECTION_PROPAGATION_DEFAULT = void 0;
7
- exports.getCheckboxPropsSelector = getCheckboxPropsSelector;
6
+ exports.findRowsToSelect = exports.findRowsToDeselect = exports.checkboxPropsSelector = exports.ROW_SELECTION_PROPAGATION_DEFAULT = void 0;
8
7
  exports.isMultipleRowSelectionEnabled = isMultipleRowSelectionEnabled;
9
8
  var _signature = require("../../../constants/signature");
10
9
  var _gridRowsUtils = require("../rows/gridRowsUtils");
@@ -35,41 +34,42 @@ function getGridRowGroupSelectableDescendants(apiRef, groupId) {
35
34
  }
36
35
  return descendants;
37
36
  }
38
-
39
- // TODO v8: Use `createSelectorV8`
40
- function getCheckboxPropsSelector(groupId, autoSelectParents) {
41
- return (0, _createSelector.createSelector)(_gridRowsSelector.gridRowTreeSelector, _gridSortingSelector.gridSortedRowIdsSelector, _gridFilterSelector.gridFilteredRowsLookupSelector, _gridRowSelectionSelector.gridRowSelectionManagerSelector, (rowTree, sortedRowIds, filteredRowsLookup, rowSelectionManager) => {
42
- const groupNode = rowTree[groupId];
43
- if (!groupNode || groupNode.type !== 'group') {
44
- return {
45
- isIndeterminate: false,
46
- isChecked: rowSelectionManager.has(groupId)
47
- };
37
+ const checkboxPropsSelector = exports.checkboxPropsSelector = (0, _createSelector.createSelector)(_gridRowsSelector.gridRowTreeSelector, _gridFilterSelector.gridFilteredRowsLookupSelector, _gridRowSelectionSelector.gridRowSelectionManagerSelector, (rowTree, filteredRowsLookup, rowSelectionManager, {
38
+ groupId,
39
+ autoSelectParents
40
+ }) => {
41
+ const groupNode = rowTree[groupId];
42
+ if (!groupNode || groupNode.type !== 'group' || rowSelectionManager.has(groupId)) {
43
+ return {
44
+ isIndeterminate: false,
45
+ isChecked: rowSelectionManager.has(groupId)
46
+ };
47
+ }
48
+ let hasSelectedDescendant = false;
49
+ let hasUnSelectedDescendant = false;
50
+ const traverseDescendants = itemToTraverseId => {
51
+ if (filteredRowsLookup[itemToTraverseId] === false ||
52
+ // Perf: Skip checking the rest of the descendants if we already
53
+ // know that there is a selected and an unselected descendant
54
+ hasSelectedDescendant && hasUnSelectedDescendant) {
55
+ return;
48
56
  }
49
- if (rowSelectionManager.has(groupId)) {
50
- return {
51
- isIndeterminate: false,
52
- isChecked: true
53
- };
57
+ const node = rowTree[itemToTraverseId];
58
+ if (node?.type === 'group') {
59
+ node.children.forEach(traverseDescendants);
54
60
  }
55
- let selectableDescendantsCount = 0;
56
- let selectedDescendantsCount = 0;
57
- const startIndex = sortedRowIds.findIndex(id => id === groupId) + 1;
58
- for (let index = startIndex; index < sortedRowIds.length && rowTree[sortedRowIds[index]]?.depth > groupNode.depth; index += 1) {
59
- const id = sortedRowIds[index];
60
- if (filteredRowsLookup[id] !== false) {
61
- selectableDescendantsCount += 1;
62
- if (rowSelectionManager.has(id)) {
63
- selectedDescendantsCount += 1;
64
- }
65
- }
61
+ if (rowSelectionManager.has(itemToTraverseId)) {
62
+ hasSelectedDescendant = true;
63
+ } else {
64
+ hasUnSelectedDescendant = true;
66
65
  }
67
- return {
68
- isIndeterminate: selectedDescendantsCount > 0 && (selectedDescendantsCount < selectableDescendantsCount || !rowSelectionManager.has(groupId)),
69
- isChecked: autoSelectParents ? selectedDescendantsCount > 0 : rowSelectionManager.has(groupId)
70
- };
71
- });
72
- }
66
+ };
67
+ traverseDescendants(groupId);
68
+ return {
69
+ isIndeterminate: hasSelectedDescendant && hasUnSelectedDescendant,
70
+ isChecked: autoSelectParents ? hasSelectedDescendant && !hasUnSelectedDescendant : false
71
+ };
72
+ });
73
73
  function isMultipleRowSelectionEnabled(props) {
74
74
  if (props.signature === _signature.GridSignature.DataGrid) {
75
75
  // DataGrid Community has multiple row selection enabled only if checkbox selection is enabled.
@@ -105,7 +105,7 @@ const getFilteredRowNodeSiblings = (tree, filteredRows, id) => {
105
105
  const findRowsToSelect = (apiRef, tree, selectedRow, autoSelectDescendants, autoSelectParents, addRow, rowSelectionManager = (0, _gridRowSelectionSelector.gridRowSelectionManagerSelector)(apiRef)) => {
106
106
  const filteredRows = (0, _gridFilterSelector.gridFilteredRowsLookupSelector)(apiRef);
107
107
  const selectedDescendants = new Set([]);
108
- if (!autoSelectDescendants && !autoSelectParents) {
108
+ if (!autoSelectDescendants && !autoSelectParents || filteredRows[selectedRow] === false) {
109
109
  return;
110
110
  }
111
111
  if (autoSelectDescendants) {
@@ -229,12 +229,13 @@ const useGridVirtualScroller = () => {
229
229
  scrollCache.buffer = bufferForDirection(isRtl, direction, rootProps.rowBufferPx, rootProps.columnBufferPx, rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6);
230
230
  const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);
231
231
  const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
232
-
233
- // Prevents batching render context changes
234
- ReactDOM.flushSync(() => {
235
- updateRenderContext(nextRenderContext);
236
- });
237
- scrollTimeout.start(1000, triggerUpdateRenderContext);
232
+ if (!areRenderContextsEqual(nextRenderContext, renderContext)) {
233
+ // Prevents batching render context changes
234
+ ReactDOM.flushSync(() => {
235
+ updateRenderContext(nextRenderContext);
236
+ });
237
+ scrollTimeout.start(1000, triggerUpdateRenderContext);
238
+ }
238
239
  return nextRenderContext;
239
240
  });
240
241
  const forceUpdateRenderContext = () => {
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { GridApiCommunity } from "./models/api/gridApiCommunity.js";
2
2
  import { GridInitialStateCommunity, GridStateCommunity } from "./models/gridStateCommunity.js";
3
+ import "./material/index.js";
3
4
  export { useGridApiContext } from "./hooks/utils/useGridApiContext.js";
4
5
  export { useGridApiRef } from "./hooks/utils/useGridApiRef.js";
5
6
  export { useGridRootProps } from "./hooks/utils/useGridRootProps.js";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v8.2.0
2
+ * @mui/x-data-grid v8.3.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -61,6 +61,7 @@ Object.defineProperty(exports, "useGridRootProps", {
61
61
  return _useGridRootProps.useGridRootProps;
62
62
  }
63
63
  });
64
+ require("./material");
64
65
  var _useGridApiContext = require("./hooks/utils/useGridApiContext");
65
66
  var _useGridApiRef = require("./hooks/utils/useGridApiRef");
66
67
  var _useGridRootProps = require("./hooks/utils/useGridRootProps");
package/locales/koKR.js CHANGED
@@ -9,10 +9,9 @@ const koKRGrid = {
9
9
  // Root
10
10
  noRowsLabel: '행이 없습니다.',
11
11
  noResultsOverlayLabel: '결과값이 없습니다.',
12
- // noColumnsOverlayLabel: 'No columns',
13
- // noColumnsOverlayManageColumns: 'Manage columns',
14
- // emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
15
-
12
+ noColumnsOverlayLabel: '열이 없습니다',
13
+ noColumnsOverlayManageColumns: ' 관리하기',
14
+ emptyPivotOverlayLabel: '행, 열, 값을 추가하여 피벗 테이블을 만듭니다.',
16
15
  // Density selector toolbar button text
17
16
  toolbarDensity: '행 간격',
18
17
  toolbarDensityLabel: '행 간격',
@@ -39,11 +38,9 @@ const koKRGrid = {
39
38
  toolbarExportPrint: '프린트',
40
39
  toolbarExportExcel: 'Excel로 내보내기',
41
40
  // Toolbar pivot button
42
- // toolbarPivot: 'Pivot',
43
-
41
+ toolbarPivot: '피벗',
44
42
  // Toolbar AI Assistant button
45
- // toolbarAssistant: 'AI Assistant',
46
-
43
+ toolbarAssistant: 'AI 어시스턴트',
47
44
  // Columns management text
48
45
  columnsManagementSearchTitle: '검색',
49
46
  columnsManagementNoColumns: '열이 없습니다.',
@@ -105,15 +102,14 @@ const koKRGrid = {
105
102
  'headerFilterOperator>=': '같거나 더 큰',
106
103
  'headerFilterOperator<': '더 작은',
107
104
  'headerFilterOperator<=': '같거나 더 작은',
108
- // headerFilterClear: 'Clear filter',
109
-
105
+ headerFilterClear: '필터 초기화',
110
106
  // Filter values text
111
107
  filterValueAny: '아무값',
112
108
  filterValueTrue: '참',
113
109
  filterValueFalse: '거짓',
114
110
  // Column menu text
115
111
  columnMenuLabel: '메뉴',
116
- // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
112
+ columnMenuAriaLabel: columnName => `${columnName} 메뉴`,
117
113
  columnMenuShowColumns: '열 표시',
118
114
  columnMenuManageColumns: '열 관리',
119
115
  columnMenuFilter: '필터',
@@ -162,18 +158,18 @@ const koKRGrid = {
162
158
  collapseDetailPanel: '접기',
163
159
  // Pagination
164
160
  paginationRowsPerPage: '페이지 당 행:',
165
- // paginationDisplayedRows: ({
166
- // from,
167
- // to,
168
- // count,
169
- // estimated
170
- // }) => {
171
- // if (!estimated) {
172
- // return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
173
- // }
174
- // const estimatedLabel = estimated && estimated > to ? `around ${estimated}` : `more than ${to}`;
175
- // return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
176
- // },
161
+ paginationDisplayedRows: ({
162
+ from,
163
+ to,
164
+ count,
165
+ estimated
166
+ }) => {
167
+ if (!estimated) {
168
+ return `${from}–${to} of ${count !== -1 ? count : `${to} 이상`}`;
169
+ }
170
+ const estimatedLabel = estimated && estimated > to ? `약 ${estimated}` : `${to} 이상`;
171
+ return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
172
+ },
177
173
  paginationItemAriaLabel: type => {
178
174
  if (type === 'first') {
179
175
  return '첫 번째 페이지로 이동';
@@ -197,61 +193,57 @@ const koKRGrid = {
197
193
  aggregationFunctionLabelMax: '최대값',
198
194
  aggregationFunctionLabelSize: '크기',
199
195
  // Pivot panel
200
- // pivotToggleLabel: 'Pivot',
201
- // pivotRows: 'Rows',
202
- // pivotColumns: 'Columns',
203
- // pivotValues: 'Values',
204
- // pivotCloseButton: 'Close pivot settings',
205
- // pivotSearchButton: 'Search fields',
206
- // pivotSearchControlPlaceholder: 'Search fields',
207
- // pivotSearchControlLabel: 'Search fields',
208
- // pivotSearchControlClear: 'Clear search',
209
- // pivotNoFields: 'No fields',
210
- // pivotMenuMoveUp: 'Move up',
211
- // pivotMenuMoveDown: 'Move down',
212
- // pivotMenuMoveToTop: 'Move to top',
213
- // pivotMenuMoveToBottom: 'Move to bottom',
214
- // pivotMenuRows: 'Rows',
215
- // pivotMenuColumns: 'Columns',
216
- // pivotMenuValues: 'Values',
217
- // pivotMenuOptions: 'Field options',
218
- // pivotMenuAddToRows: 'Add to Rows',
219
- // pivotMenuAddToColumns: 'Add to Columns',
220
- // pivotMenuAddToValues: 'Add to Values',
221
- // pivotMenuRemove: 'Remove',
222
- // pivotDragToRows: 'Drag here to create rows',
223
- // pivotDragToColumns: 'Drag here to create columns',
224
- // pivotDragToValues: 'Drag here to create values',
225
- // pivotYearColumnHeaderName: '(Year)',
226
- // pivotQuarterColumnHeaderName: '(Quarter)',
227
-
196
+ pivotToggleLabel: '피벗',
197
+ pivotRows: '',
198
+ pivotColumns: '',
199
+ pivotValues: '',
200
+ pivotCloseButton: '피벗 설정 닫기',
201
+ pivotSearchButton: '필드 검색',
202
+ pivotSearchControlPlaceholder: '필드 검색',
203
+ pivotSearchControlLabel: '필드 검색',
204
+ pivotSearchControlClear: '검색 초기화',
205
+ pivotNoFields: '필드가 없습니다.',
206
+ pivotMenuMoveUp: '위로 이동',
207
+ pivotMenuMoveDown: '아래로 이동',
208
+ pivotMenuMoveToTop: '위로 이동',
209
+ pivotMenuMoveToBottom: '아래로 이동',
210
+ pivotMenuRows: '',
211
+ pivotMenuColumns: '',
212
+ pivotMenuValues: '',
213
+ pivotMenuOptions: '필드 옵션',
214
+ pivotMenuAddToRows: '행에 추가',
215
+ pivotMenuAddToColumns: '열에 추가',
216
+ pivotMenuAddToValues: '값에 추가',
217
+ pivotMenuRemove: '제거',
218
+ pivotDragToRows: ' 생성',
219
+ pivotDragToColumns: ' 생성',
220
+ pivotDragToValues: ' 생성',
221
+ pivotYearColumnHeaderName: '()',
222
+ pivotQuarterColumnHeaderName: '(분기)',
228
223
  // AI Assistant panel
229
- // aiAssistantPanelTitle: 'AI Assistant',
230
- // aiAssistantPanelClose: 'Close AI Assistant',
231
- // aiAssistantPanelNewConversation: 'New conversation',
232
- // aiAssistantPanelConversationHistory: 'Conversation history',
233
- // aiAssistantPanelEmptyConversation: 'No prompt history',
234
- // aiAssistantSuggestions: 'Suggestions',
235
-
224
+ aiAssistantPanelTitle: 'AI 어시스턴트',
225
+ aiAssistantPanelClose: 'AI 어시스턴트 닫기',
226
+ aiAssistantPanelNewConversation: ' 대화',
227
+ aiAssistantPanelConversationHistory: '대화 기록',
228
+ aiAssistantPanelEmptyConversation: '프롬프트 내역이 없습니다.',
229
+ aiAssistantSuggestions: '제안',
236
230
  // Prompt field
237
231
  promptFieldLabel: '프롬프트 입력',
238
232
  promptFieldPlaceholder: '프롬프트 입력…',
239
233
  promptFieldPlaceholderWithRecording: '프롬프트 입력 또는 녹음…',
240
234
  promptFieldPlaceholderListening: '녹음 중…',
241
- // promptFieldSpeechRecognitionNotSupported: 'Speech recognition is not supported in this browser',
235
+ promptFieldSpeechRecognitionNotSupported: ' 브라우저에서 음성 인식을 지원하지 않습니다.',
242
236
  promptFieldSend: '전송',
243
237
  promptFieldRecord: '녹음',
244
- promptFieldStopRecording: '녹음 정지'
245
-
238
+ promptFieldStopRecording: '녹음 정지',
246
239
  // Prompt
247
- // promptRerun: 'Run again',
248
- // promptProcessing: 'Processing…',
249
- // promptAppliedChanges: 'Applied changes',
250
-
240
+ promptRerun: '다시 실행',
241
+ promptProcessing: '처리 중…',
242
+ promptAppliedChanges: '변경사항 적용하기',
251
243
  // Prompt changes
252
- // promptChangeGroupDescription: (column: string) => `Group by ${column}`,
253
- // promptChangeAggregationLabel: (column: string, aggregation: string) => `${column} (${aggregation})`,
254
- // promptChangeAggregationDescription: (column: string, aggregation: string) => `Aggregate ${column} (${aggregation})`,
244
+ promptChangeGroupDescription: column => `${column} 값으로 그룹 생성`,
245
+ promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
246
+ promptChangeAggregationDescription: (column, aggregation) => `${column} (${aggregation}) 집계`,
255
247
  // promptChangeFilterLabel: (column: string, operator: string, value: string) => {
256
248
  // if (operator === 'is any of') {
257
249
  // return `${column} is any of: ${value}`;
@@ -264,13 +256,13 @@ const koKRGrid = {
264
256
  // }
265
257
  // return `Filter where ${column} ${operator} ${value}`;
266
258
  // },
267
- // promptChangeSortDescription: (column: string, direction: string) => `Sort by ${column} (${direction})`,
268
- // promptChangePivotEnableLabel: 'Pivot',
269
- // promptChangePivotEnableDescription: 'Enable pivot',
270
- // promptChangePivotColumnsLabel: (count: number) => `Columns (${count})`,
271
- // promptChangePivotColumnsDescription: (column: string, direction: string) => `${column}${direction ? ` (${direction})` : ''}`,
272
- // promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
273
- // promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
274
- // promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
259
+ promptChangeSortDescription: (column, direction) => `${column} (${direction}) 기준으로 정렬`,
260
+ promptChangePivotEnableLabel: '피벗',
261
+ promptChangePivotEnableDescription: '피벗 활성화',
262
+ promptChangePivotColumnsLabel: count => `(${count}) 개의 열`,
263
+ promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
264
+ promptChangePivotRowsLabel: count => `(${count}) 개의 행`,
265
+ promptChangePivotValuesLabel: count => `(${count}) 개의 값`,
266
+ promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
275
267
  };
276
268
  const koKR = exports.koKR = (0, _getGridLocalization.getGridLocalization)(koKRGrid);
package/locales/nbNO.js CHANGED
@@ -9,8 +9,8 @@ const nbNOGrid = {
9
9
  // Root
10
10
  noRowsLabel: 'Ingen rader',
11
11
  noResultsOverlayLabel: 'Fant ingen resultat.',
12
- // noColumnsOverlayLabel: 'No columns',
13
- // noColumnsOverlayManageColumns: 'Manage columns',
12
+ noColumnsOverlayLabel: 'Ingen kolonner',
13
+ noColumnsOverlayManageColumns: 'Velg 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
@@ -49,8 +49,7 @@ const nbNOGrid = {
49
49
  columnsManagementNoColumns: 'Ingen kolonner',
50
50
  columnsManagementShowHideAllText: 'Vis/skjul alle',
51
51
  columnsManagementReset: 'Nullstill',
52
- // columnsManagementDeleteIconLabel: 'Clear',
53
-
52
+ columnsManagementDeleteIconLabel: 'Tøm',
54
53
  // Filter panel text
55
54
  filterPanelAddFilter: 'Legg til filter',
56
55
  filterPanelRemoveAll: 'Fjern alle',
@@ -64,9 +63,9 @@ const nbNOGrid = {
64
63
  filterPanelInputPlaceholder: 'Filter verdi',
65
64
  // Filter operators text
66
65
  filterOperatorContains: 'inneholder',
67
- // filterOperatorDoesNotContain: 'does not contain',
66
+ filterOperatorDoesNotContain: 'inneholder ikke',
68
67
  filterOperatorEquals: 'er lik',
69
- // filterOperatorDoesNotEqual: 'does not equal',
68
+ filterOperatorDoesNotEqual: 'er ikke lik',
70
69
  filterOperatorStartsWith: 'starter med',
71
70
  filterOperatorEndsWith: 'slutter med',
72
71
  filterOperatorIs: 'er',
@@ -86,9 +85,9 @@ const nbNOGrid = {
86
85
  'filterOperator<=': '<=',
87
86
  // Header filter operators text
88
87
  headerFilterOperatorContains: 'Inneholder',
89
- // headerFilterOperatorDoesNotContain: 'Does not contain',
90
- headerFilterOperatorEquals: 'Lik',
91
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
88
+ headerFilterOperatorDoesNotContain: 'Inneholder ikke',
89
+ headerFilterOperatorEquals: 'Er lik',
90
+ headerFilterOperatorDoesNotEqual: 'Er ikke lik',
92
91
  headerFilterOperatorStartsWith: 'Starter på',
93
92
  headerFilterOperatorEndsWith: 'Slutter på',
94
93
  headerFilterOperatorIs: 'Er',
@@ -106,15 +105,14 @@ const nbNOGrid = {
106
105
  'headerFilterOperator>=': 'Større enn eller lik',
107
106
  'headerFilterOperator<': 'Mindre enn',
108
107
  'headerFilterOperator<=': 'Mindre enn eller lik',
109
- // headerFilterClear: 'Clear filter',
110
-
108
+ headerFilterClear: 'Tøm filter',
111
109
  // Filter values text
112
110
  filterValueAny: 'noen',
113
111
  filterValueTrue: 'sant',
114
112
  filterValueFalse: 'usant',
115
113
  // Column menu text
116
114
  columnMenuLabel: 'Meny',
117
- // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
115
+ columnMenuAriaLabel: columnName => `${columnName} kolonnemeny`,
118
116
  columnMenuShowColumns: 'Vis kolonner',
119
117
  columnMenuManageColumns: 'Administrer kolonner',
120
118
  columnMenuFilter: 'Filter',
@@ -163,18 +161,18 @@ const nbNOGrid = {
163
161
  collapseDetailPanel: 'Kollaps',
164
162
  // Pagination
165
163
  paginationRowsPerPage: 'Rader per side:',
166
- // paginationDisplayedRows: ({
167
- // from,
168
- // to,
169
- // count,
170
- // estimated
171
- // }) => {
172
- // if (!estimated) {
173
- // return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
174
- // }
175
- // const estimatedLabel = estimated && estimated > to ? `around ${estimated}` : `more than ${to}`;
176
- // return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
177
- // },
164
+ paginationDisplayedRows: ({
165
+ from,
166
+ to,
167
+ count,
168
+ estimated
169
+ }) => {
170
+ if (!estimated) {
171
+ return `${from}–${to} av ${count !== -1 ? count : `mer enn ${to}`}`;
172
+ }
173
+ const estimatedLabel = estimated && estimated > to ? `omtrent ${estimated}` : `mer enn ${to}`;
174
+ return `${from}–${to} av ${count !== -1 ? count : estimatedLabel}`;
175
+ },
178
176
  paginationItemAriaLabel: type => {
179
177
  if (type === 'first') {
180
178
  return 'Gå til første side';