@ishibashi0112/spreadsheet-grid-core 1.0.1 → 1.0.2

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 (103) hide show
  1. package/dist/controllers/autoHeightMeasurer.cjs +1 -1
  2. package/dist/controllers/autoHeightMeasurer.js +4 -2
  3. package/dist/controllers/clipboardController.cjs +1 -2
  4. package/dist/controllers/clipboardController.js +26 -26
  5. package/dist/controllers/columnAutosizeRunner.cjs +1 -1
  6. package/dist/controllers/columnAutosizeRunner.d.ts +2 -1
  7. package/dist/controllers/columnAutosizeRunner.js +11 -10
  8. package/dist/controllers/columnHeaderDragController.cjs +1 -1
  9. package/dist/controllers/columnHeaderDragController.js +176 -171
  10. package/dist/controllers/columnMenuController.cjs +1 -1
  11. package/dist/controllers/columnMenuController.js +1 -1
  12. package/dist/controllers/editController.cjs +1 -1
  13. package/dist/controllers/editController.js +78 -78
  14. package/dist/controllers/escapeClaimController.cjs +1 -1
  15. package/dist/controllers/escapeClaimController.d.ts +1 -0
  16. package/dist/controllers/escapeClaimController.js +11 -5
  17. package/dist/controllers/fillHandleController.cjs +1 -1
  18. package/dist/controllers/fillHandleController.js +141 -140
  19. package/dist/controllers/filterPopoverController.cjs +1 -1
  20. package/dist/controllers/filterPopoverController.js +81 -77
  21. package/dist/controllers/findController.cjs +1 -1
  22. package/dist/controllers/findController.d.ts +1 -0
  23. package/dist/controllers/findController.js +36 -29
  24. package/dist/controllers/keyboardController.cjs +1 -1
  25. package/dist/controllers/keyboardController.js +112 -116
  26. package/dist/controllers/popoverSupport.cjs +1 -1
  27. package/dist/controllers/popoverSupport.js +10 -5
  28. package/dist/controllers/rowDragController.cjs +1 -1
  29. package/dist/controllers/rowDragController.js +128 -127
  30. package/dist/controllers/rowEnterController.cjs +1 -1
  31. package/dist/controllers/rowEnterController.d.ts +1 -0
  32. package/dist/controllers/rowEnterController.js +47 -42
  33. package/dist/controllers/tooltipController.cjs +1 -1
  34. package/dist/controllers/tooltipController.js +64 -47
  35. package/dist/controllers/viewportSyncController.cjs +1 -1
  36. package/dist/controllers/viewportSyncController.d.ts +1 -0
  37. package/dist/controllers/viewportSyncController.js +29 -8
  38. package/dist/engine/filterPopoverCommands.cjs +1 -1
  39. package/dist/engine/filterPopoverCommands.d.ts +2 -0
  40. package/dist/engine/filterPopoverCommands.js +15 -15
  41. package/dist/engine/fullFeatures.cjs +1 -1
  42. package/dist/engine/fullFeatures.js +17 -17
  43. package/dist/engine/gridApi.cjs +2 -2
  44. package/dist/engine/gridApi.d.ts +1 -0
  45. package/dist/engine/gridApi.js +11 -11
  46. package/dist/engine/rowSelectionCommands.cjs +1 -1
  47. package/dist/engine/rowSelectionCommands.d.ts +1 -0
  48. package/dist/engine/rowSelectionCommands.js +21 -12
  49. package/dist/locales/en.cjs +1 -1
  50. package/dist/locales/en.js +7 -4
  51. package/dist/logic/columnAutosize.cjs +1 -1
  52. package/dist/logic/columnAutosize.d.ts +8 -2
  53. package/dist/logic/columnAutosize.js +102 -87
  54. package/dist/logic/detailRow.cjs +1 -1
  55. package/dist/logic/detailRow.d.ts +4 -0
  56. package/dist/logic/detailRow.js +18 -15
  57. package/dist/logic/editorValues.cjs +1 -1
  58. package/dist/logic/editorValues.d.ts +1 -0
  59. package/dist/logic/editorValues.js +29 -29
  60. package/dist/logic/filterSummary.cjs +1 -1
  61. package/dist/logic/filterSummary.js +9 -2
  62. package/dist/logic/find.cjs +1 -1
  63. package/dist/logic/find.d.ts +4 -3
  64. package/dist/logic/find.js +27 -13
  65. package/dist/logic/gridAsk.cjs +2 -2
  66. package/dist/logic/gridAsk.d.ts +7 -7
  67. package/dist/logic/gridAsk.js +140 -122
  68. package/dist/logic/gridAskLocaleText.cjs +1 -1
  69. package/dist/logic/gridAskLocaleText.d.ts +2 -0
  70. package/dist/logic/gridAskLocaleText.js +1 -0
  71. package/dist/logic/gridState.d.ts +2 -2
  72. package/dist/logic/localeText.cjs +1 -1
  73. package/dist/logic/localeText.d.ts +2 -0
  74. package/dist/logic/localeText.js +1 -0
  75. package/dist/logic/localeTextFeatures.cjs +1 -1
  76. package/dist/logic/localeTextFeatures.js +2 -2
  77. package/dist/logic/localeTextFilters.cjs +1 -1
  78. package/dist/logic/localeTextFilters.d.ts +1 -0
  79. package/dist/logic/localeTextFilters.js +1 -0
  80. package/dist/logic/localeTextPopups.cjs +1 -1
  81. package/dist/logic/localeTextPopups.js +2 -2
  82. package/dist/logic/numberFilterCondition.cjs +1 -1
  83. package/dist/logic/numberFilterCondition.d.ts +1 -1
  84. package/dist/logic/numberFilterCondition.js +5 -5
  85. package/dist/logic/scrollTargets.cjs +1 -1
  86. package/dist/logic/scrollTargets.js +2 -2
  87. package/dist/logic/selectEditorState.cjs +1 -1
  88. package/dist/logic/selectEditorState.d.ts +1 -0
  89. package/dist/logic/selectEditorState.js +8 -1
  90. package/dist/logic/valueFormatters.d.ts +5 -5
  91. package/dist/logic/verticalGeometry.cjs +1 -1
  92. package/dist/logic/verticalGeometry.d.ts +1 -0
  93. package/dist/logic/verticalGeometry.js +12 -8
  94. package/dist/model/gridActions.cjs +1 -1
  95. package/dist/model/gridActions.d.ts +2 -1
  96. package/dist/model/gridActions.js +3 -2
  97. package/dist/model/gridReducer.cjs +1 -1
  98. package/dist/model/gridReducer.js +145 -62
  99. package/dist/model/gridTypes.core.d.ts +319 -298
  100. package/dist/utils/clipboard.cjs +3 -5
  101. package/dist/utils/clipboard.d.ts +1 -0
  102. package/dist/utils/clipboard.js +25 -22
  103. package/package.json +1 -1
@@ -72,10 +72,10 @@ var D = (e) => {
72
72
  if (!r(t)) return t;
73
73
  for (let i of [n, -n]) for (let n = t + i; n >= 0 && n < e.viewRowCount; n += i) if (!r(n)) return n;
74
74
  return t;
75
- }, U = (e) => e.getUiState?.() ?? e.uiState, W = {
75
+ }, U = (e) => e.getUiState?.() ?? e.uiState, W = (e) => e.pendingRowSelection?.() ?? U(e).rowSelection, G = {
76
76
  model: null,
77
77
  map: /* @__PURE__ */ new Map()
78
- }, G = {
78
+ }, K = {
79
79
  scrollToRow: (e, t) => {
80
80
  let n = t?.align ?? "auto";
81
81
  I(L(e, n), null, n);
@@ -152,14 +152,14 @@ var D = (e) => {
152
152
  },
153
153
  getViewRowIndex: (e) => {
154
154
  let t = A;
155
- return t ? (W.model !== t.rowModel && (W = {
155
+ return t ? (G.model !== t.rowModel && (G = {
156
156
  model: t.rowModel,
157
157
  map: /* @__PURE__ */ new Map()
158
- }), r(t.rowModel, e, W.map)) : -1;
158
+ }), r(t.rowModel, e, G.map)) : -1;
159
159
  },
160
160
  getColIndex: (e) => A?.orderedColumns.findIndex((t) => t.key === e) ?? -1,
161
161
  getRowNumber: (e) => {
162
- let t = A, n = G.getViewRowIndex(e);
162
+ let t = A, n = K.getViewRowIndex(e);
163
163
  return !t || n < 0 || t.rowModel.getLabelRow?.(n) !== void 0 ? null : t.labelViewIndexes ? l(t.labelViewIndexes, n) : n + 1;
164
164
  },
165
165
  selectCell: (e, t, n) => {
@@ -246,7 +246,7 @@ var D = (e) => {
246
246
  },
247
247
  getRowSelection: () => {
248
248
  let e = A;
249
- return e ? g(U(e).rowSelection) : {
249
+ return e ? g(W(e)) : {
250
250
  type: "include",
251
251
  rowKeys: []
252
252
  };
@@ -257,7 +257,7 @@ var D = (e) => {
257
257
  getSelectedRowKeys: () => {
258
258
  let e = A;
259
259
  if (!e) return [];
260
- let t = U(e).rowSelection;
260
+ let t = W(e);
261
261
  if (t.mode === "include") return Array.from(t.keys);
262
262
  let n = [], r = e.rowModel.getRowCount();
263
263
  for (let i = 0; i < r; i += 1) {
@@ -270,7 +270,7 @@ var D = (e) => {
270
270
  getSelectedRowData: () => {
271
271
  let e = A;
272
272
  if (!e) return [];
273
- let t = U(e).rowSelection, n = [], r = e.rowModel.getRowCount();
273
+ let t = W(e), n = [], r = e.rowModel.getRowCount();
274
274
  for (let i = 0; i < r; i += 1) {
275
275
  let r = e.rowModel.getRow(i);
276
276
  r && m(t, e.rowModel.getRowKey(i) ?? i) && n.push(r);
@@ -279,11 +279,11 @@ var D = (e) => {
279
279
  },
280
280
  getSelectedRowCount: () => {
281
281
  let e = A;
282
- return e ? p(U(e).rowSelection, e.leafRowCount) : 0;
282
+ return e ? p(W(e), e.leafRowCount) : 0;
283
283
  },
284
284
  isRowSelected: (e) => {
285
285
  let t = A;
286
- return t ? m(U(t).rowSelection, e) : !1;
286
+ return t ? m(W(t), e) : !1;
287
287
  },
288
288
  selectAllRows: () => {
289
289
  A?.commitRowSelection(_());
@@ -424,7 +424,7 @@ var D = (e) => {
424
424
  pinnedTop: n.scrollTop
425
425
  };
426
426
  },
427
- handle: G,
427
+ handle: K,
428
428
  applyScroll: I,
429
429
  verticalTargetFor: L,
430
430
  horizontalTargetFor: R,
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../model/gridActions.cjs"),t=require("../logic/rowSelection.cjs");var n=()=>{let n=null,r=null,i,a=!1,o=()=>{if(n===null)throw Error(`[SpreadsheetGrid] rowSelectionCommands は update 前に呼べません。`);return n},s=n=>{let{rowSelectionState:r,onRowSelectionChange:i,controlledRowSelectionModel:a,dispatch:s}=o();t.rowSelectionStateEquals(r,n)||i?.(t.rowSelectionToModel(n)),a===void 0&&s(e.gridActions.setRowSelectionState(n))},c=(e,t,n)=>{let r=Math.min(t,n),i=Math.max(t,n),a=[];for(let t=r;t<=i;t+=1)e.getRow(t)&&a.push(e.getRowKey(t)??t);return a};return{update:r=>{n=r;let o=r.controlledRowSelectionModel;if((!a||!Object.is(o,i))&&(a=!0,i=o,o!==void 0)){let n=t.rowSelectionFromModel(o);t.rowSelectionStateEquals(r.rowSelectionState,n)||r.dispatch(e.gridActions.setRowSelectionState(n))}},commitRowSelection:s,handleGutterRowSelect:(e,n)=>{let{rowModel:i,rowSelectionMode:a,rowSelectionState:l}=o();if(!i.getRow(e))return;let u=i.getRowKey(e)??e;if(a===`single`){r=e,s(t.selectSingleRow(u));return}if(n.shiftKey&&r!==null){s(t.selectRowRange(c(i,r,e)));return}r=e,s(t.toggleRowKey(l,u))},handleGutterRowSelectDrag:e=>{let{rowModel:n,rowSelectionMode:i}=o();if(n.getRow(e)){if(i===`single`){s(t.selectSingleRow(n.getRowKey(e)??e));return}r!==null&&s(t.selectRowRange(c(n,r,e)))}},handleToggleSelectAllRows:()=>{let{rowSelectionState:e,leafRowCount:n,filteredDataRows:r}=o();if(r){let{rows:n,order:i,rowKeyGetter:a}=r,o=[];for(let e=0;e<i.length;e+=1){let t=i[e];o.push(a(n[t],t))}let c=t.countSelectedRowsInOrder(e,n,i,a),l=o.length>0&&c>=o.length;s(l?t.removeRowKeys(e,o):t.addRowRange(e,o));return}let i=t.getSelectAllState(e,n);s(i===`all`?t.clearRowSelection():t.selectAllRows())}}};exports.createRowSelectionCommands=n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../model/gridActions.cjs"),t=require("../logic/rowSelection.cjs");var n=()=>{let n=null,r=null,i,a=!1,o=()=>{if(n===null)throw Error(`[SpreadsheetGrid] rowSelectionCommands は update 前に呼べません。`);return n},s=null,c=n=>{let{rowSelectionState:r,onRowSelectionChange:i,controlledRowSelectionModel:a,dispatch:c}=o(),l=!t.rowSelectionStateEquals(r,n);if(a===void 0&&c(e.gridActions.setRowSelectionState(n)),l&&i){let e=s;s=n;try{i(t.rowSelectionToModel(n))}finally{s=e}}},l=(e,t,n)=>{let r=Math.min(t,n),i=Math.max(t,n),a=[];for(let t=r;t<=i;t+=1)e.getRow(t)&&a.push(e.getRowKey(t)??t);return a};return{update:r=>{n=r;let o=r.controlledRowSelectionModel;if((!a||!Object.is(o,i))&&(a=!0,i=o,o!==void 0)){let n=t.rowSelectionFromModel(o);t.rowSelectionStateEquals(r.rowSelectionState,n)||r.dispatch(e.gridActions.setRowSelectionState(n))}},commitRowSelection:c,pendingRowSelection:()=>s,handleGutterRowSelect:(e,n)=>{let{rowModel:i,rowSelectionMode:a,rowSelectionState:s}=o();if(!i.getRow(e))return;let u=i.getRowKey(e)??e;if(a===`single`){r=e,c(t.selectSingleRow(u));return}if(n.shiftKey&&r!==null){c(t.selectRowRange(l(i,r,e)));return}r=e,c(t.toggleRowKey(s,u))},handleGutterRowSelectDrag:e=>{let{rowModel:n,rowSelectionMode:i}=o();if(n.getRow(e)){if(i===`single`){c(t.selectSingleRow(n.getRowKey(e)??e));return}r!==null&&c(t.selectRowRange(l(n,r,e)))}},handleToggleSelectAllRows:()=>{let{rowSelectionState:e,leafRowCount:n,filteredDataRows:r}=o();if(r){let{rows:n,order:i,rowKeyGetter:a}=r,o=[];for(let e=0;e<i.length;e+=1){let t=i[e];o.push(a(n[t],t))}let s=t.countSelectedRowsInOrder(e,n,i,a),l=o.length>0&&s>=o.length;c(l?t.removeRowKeys(e,o):t.addRowRange(e,o));return}let i=t.getSelectAllState(e,n);c(i===`all`?t.clearRowSelection():t.selectAllRows())}}};exports.createRowSelectionCommands=n;
@@ -19,6 +19,7 @@ export type FilteredDataRows<T> = {
19
19
  export type RowSelectionCommands<T> = {
20
20
  update: (args: RowSelectionCommandsArgs<T>) => void;
21
21
  commitRowSelection: (next: RowSelectionState) => void;
22
+ pendingRowSelection: () => RowSelectionState | null;
22
23
  handleGutterRowSelect: (viewIndex: number, opts: {
23
24
  shiftKey: boolean;
24
25
  }) => void;
@@ -5,10 +5,18 @@ var p = () => {
5
5
  let p = null, m = null, h, g = !1, _ = () => {
6
6
  if (p === null) throw Error("[SpreadsheetGrid] rowSelectionCommands は update 前に呼べません。");
7
7
  return p;
8
- }, v = (t) => {
9
- let { rowSelectionState: n, onRowSelectionChange: r, controlledRowSelectionModel: i, dispatch: a } = _();
10
- s(n, t) || r?.(c(t)), i === void 0 && a(e.setRowSelectionState(t));
11
- }, y = (e, t, n) => {
8
+ }, v = null, y = (t) => {
9
+ let { rowSelectionState: n, onRowSelectionChange: r, controlledRowSelectionModel: i, dispatch: a } = _(), o = !s(n, t);
10
+ if (i === void 0 && a(e.setRowSelectionState(t)), o && r) {
11
+ let e = v;
12
+ v = t;
13
+ try {
14
+ r(c(t));
15
+ } finally {
16
+ v = e;
17
+ }
18
+ }
19
+ }, b = (e, t, n) => {
12
20
  let r = Math.min(t, n), i = Math.max(t, n), a = [];
13
21
  for (let t = r; t <= i; t += 1) e.getRow(t) && a.push(e.getRowKey(t) ?? t);
14
22
  return a;
@@ -22,29 +30,30 @@ var p = () => {
22
30
  s(t.rowSelectionState, r) || t.dispatch(e.setRowSelectionState(r));
23
31
  }
24
32
  },
25
- commitRowSelection: v,
33
+ commitRowSelection: y,
34
+ pendingRowSelection: () => v,
26
35
  handleGutterRowSelect: (e, t) => {
27
36
  let { rowModel: n, rowSelectionMode: r, rowSelectionState: i } = _();
28
37
  if (!n.getRow(e)) return;
29
38
  let a = n.getRowKey(e) ?? e;
30
39
  if (r === "single") {
31
- m = e, v(d(a));
40
+ m = e, y(d(a));
32
41
  return;
33
42
  }
34
43
  if (t.shiftKey && m !== null) {
35
- v(u(y(n, m, e)));
44
+ y(u(b(n, m, e)));
36
45
  return;
37
46
  }
38
- m = e, v(f(i, a));
47
+ m = e, y(f(i, a));
39
48
  },
40
49
  handleGutterRowSelectDrag: (e) => {
41
50
  let { rowModel: t, rowSelectionMode: n } = _();
42
51
  if (t.getRow(e)) {
43
52
  if (n === "single") {
44
- v(d(t.getRowKey(e) ?? e));
53
+ y(d(t.getRowKey(e) ?? e));
45
54
  return;
46
55
  }
47
- m !== null && v(u(y(t, m, e)));
56
+ m !== null && y(u(b(t, m, e)));
48
57
  }
49
58
  },
50
59
  handleToggleSelectAllRows: () => {
@@ -56,11 +65,11 @@ var p = () => {
56
65
  c.push(o(n[t], t));
57
66
  }
58
67
  let l = r(e, n, i, o), u = c.length > 0 && l >= c.length;
59
- v(u ? a(e, c) : t(e, c));
68
+ y(u ? a(e, c) : t(e, c));
60
69
  return;
61
70
  }
62
71
  let c = i(e, o);
63
- v(c === "all" ? n() : l());
72
+ y(c === "all" ? n() : l());
64
73
  }
65
74
  };
66
75
  };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],t={blank:`(Blank)`,filterNone:`No filter`,filterCustom:`Custom filter`,filterExcluded:({count:e})=>e===1?`Excluding 1 value`:`Excluding ${e} values`,filterSelected:`{count} selected`,filterMatches:`Is "{value}"`,filterBoth:`{condition} and {set}`,conditionGreaterThanOrEqual:`≥ {value}`,conditionGreaterThan:`> {value}`,conditionLessThanOrEqual:`≤ {value}`,conditionLessThan:`< {value}`,conditionEquals:`= {value}`,conditionNotEquals:`≠ {value}`,conditionRange:`{min} – {max}`,conditionOnOrAfter:`On or after {value}`,conditionOnOrBefore:`On or before {value}`,conditionContains:`Contains "{value}"`,conditionStartsWith:`Starts with "{value}"`,conditionEndsWith:`Ends with "{value}"`,conditionBlank:`(Blank)`,conditionNotBlank:`(Not blank)`,datePresetToday:`Today`,datePresetThisMonth:`This month`,datePresetLast30Days:`Last 30 days`},n={rowCount:`Rows {shown} of {total}`,columnCount:`Columns {shown} of {total}`,filterSummary:`Filter: {value}`,filterGlobal:`"{text}"`,filterColumns:({count:e})=>e===1?`1 column`:`${e} columns`,sortSummary:`Sort: {value}`,sortEntry:`{column} ({direction})`,sortAscending:`ascending`,sortDescending:`descending`,activeCell:`Cell {cell}`,selection:`Range {range}`,selectionSize:({cells:e,rows:t})=>`${e} ${e===1?`cell`:`cells`} / ${t} ${t===1?`row`:`rows`}`,selectedColumns:({count:e})=>e===1?`1 column`:`${e} columns`,detailColumnName:`Details`,rowDragColumnName:`Move`,aggregateAverage:`Average`,aggregateCount:`Count`,aggregateSum:`Sum`,aggregateComputing:`Calculating… {percent}%`,aggregatePartial:`Loaded rows only`,none:`—`,listSeparator:`, `,globalFilterPlaceholder:`Filter all columns`,globalFilterLabel:`Search the whole table`,clearGlobalFilter:`Clear filter`,toggleFilterPanel:`Show or hide the filter panel`,clear:`Clear`,clearAll:`Clear all`,close:`Close`,apply:`Apply`,retry:`Retry`,noOptions:`No options`,noRows:`No rows to show`,noMatchingRows:`No matching rows`,selectAllRows:`Select all rows`,selectRow:`Select row {row}`,sortedAscending:`Sorted ascending`,sortedDescending:`Sorted descending`,sortPriority:` (priority {priority})`,columnFiltered:`Filtered`,dragColumn:`Drag to move the column`,columnMenu:`Column menu`,columnMenuFor:`Column menu for {column}`,showDetails:`Show details`,hideDetails:`Hide details`,expandGroup:`Expand {group}`,collapseGroup:`Collapse {group}`,groupRowCount:({count:e})=>e===`1`?`(1 row)`:`(${e} rows)`,editCell:`Edit {column}`,cellInput:`Cell input`,sizingColumns:`Sizing columns…`,applyingFilter:`Filtering {percent}%`,dragRow:`Drag to move the row`,dragRowDisabled:`Rows can't be moved while the table is sorted or filtered`,dragRowLabel:`Row {row}`,scrollHintRow:`Row {row}`,scrollHintJump:`Go to row {row}`,scrollHintJumpSeparator:`·`,scrollHintTenThousands:`{full}`,menuFilter:`Filter…`,menuSortAscending:`Sort ascending`,menuSortDescending:`Sort descending`,menuManageSort:`Manage sorting…`,menuManageFilters:`Manage filters…`,menuGroupBy:`Group by this column`,menuUngroup:`Ungroup`,menuPin:`Pin column`,menuPinNone:`No pin`,menuPinLeft:`Pin left`,menuPinRight:`Pin right`,menuPinUnavailable:`Pinning needs onColumnsChange.`,menuAutosize:`Autosize this column`,menuAutosizeAll:`Autosize all columns`,menuColumns:`Choose columns`,menuResetColumns:`Reset columns`,resetColumnsHint:`Restores the width, pinning, visibility, order and grouping of all columns.`,menuResetUnavailable:`Resetting columns needs onColumnsChange.`,toolPanelFilters:`Filters`,toolPanelSort:`Sort`,toolPanelColumns:`Columns`,columnsPinnedLeft:`Pinned left`,columnsUnpinned:`Not pinned`,columnsPinnedRight:`Pinned right`,columnsHideAll:`Hide all columns (the first one stays)`,columnsShowAll:`Show all columns`,columnsDragToReorder:`Drag to reorder`,columnsDragWithinSection:`Drag to reorder (within the same section)`,columnsReorderUnavailable:`Reordering needs onColumnsChange.`,columnsReorderWhileSearching:`Columns can't be reordered while searching.`,columnsGroupedHint:`This column is grouped. Its values appear in the group column.`,groupedColumnTitle:`{column} (grouped)`,columnsSearchPlaceholder:`Search…`,columnsNoMatches:`No matching columns`,columnsReset:`Reset all columns`,columnsUnavailable:`Showing, hiding and resetting columns needs onColumnsChange.`,globalFilterTitle:`Global filter`,globalFilterRows:`Rows containing "{text}"`,clearGlobalFilterTitle:`Clear the global filter`,noColumnFilters:`No column filters`,addFilterLabel:`Choose a column to filter`,addFilter:`+ Add filter…`,addFilterNone:`+ No columns to add`,sortPanelEmpty:`No sorting`,sortPanelDrag:`Drag to change the priority`,sortPanelDisabled:`Sorting is turned off`,sortPanelNeedsTwo:`Add a second level to reorder`,sortPanelAscending:`Ascending`,sortPanelAscendingShort:`Asc`,sortPanelDescending:`Descending`,sortPanelDescendingShort:`Desc`,sortPanelRemove:`Remove this level`,sortPanelAllUsed:`All columns are already used`,sortPanelAddHint:`Add a sort level`,sortPanelAdd:`+ Add level`,sortPanelClearHint:`Remove all sorting`,sortPanelReadOnly:`Sorting is turned off, so it can't be changed`,filterHiddenColumn:` (hidden)`,filterGroupedColumn:` (grouped)`,filterJumpUnavailable:`This column is hidden, so its filter can't be opened here. You can still clear it with ×.`,filterEditUnderGroup:`Opens under the group column header`,filterJump:`Go to this column to edit`,filterEditFor:`Edit the filter on {column}`,filterClear:`Clear this column's filter`,filterClearFor:`Clear the filter on {column}`,filterCurrentNone:`(none)`,filterCurrentExcluded:({count:e})=>e===1?`Excluding 1 value`:`Excluding ${e} values`,filterCurrentSelected:`{count} selected`,operatorEquals:`Equals`,operatorNotEquals:`Does not equal`,operatorGreaterThanOrEqual:`Greater than or equal to`,operatorGreaterThan:`Greater than`,operatorLessThanOrEqual:`Less than or equal to`,operatorLessThan:`Less than`,operatorBetween:`Between`,operatorContains:`Contains`,operatorStartsWith:`Starts with`,operatorEndsWith:`Ends with`,operatorOnOrAfter:`On or after`,operatorOnOrBefore:`On or before`,operatorBlank:`Blank`,operatorNotBlank:`Not blank`,filterTitle:`Filter: {column}`,filterCollecting:`Collecting values… {percent}%`,filterOptionsLoading:`Loading values…`,filterOptionsLoadingShort:`Loading…`,filterOptionsFailed:`Couldn't load the values`,filterOptionsFailedShort:`Failed`,filterOptionsTruncated:`(first values only)`,filterSearchPlaceholder:`Search (Enter to apply)`,filterSelectAll:`(Select all)`,filterSelectAllResults:`(Select all results)`,filterNoOptionsSource:`No values. With serverSide, give the column filterOptions or another source of values.`,filterNoMatches:`No matching values`,filterSelectedCount:`Selected {selected} of {total}`,filterShownCount:` ({count} shown)`,filterMatchCount:({count:e})=>e===1?`1 match`:`${e} matches`,filterTotalCount:`{count} total`,filterOptionCount:`Values: {count}`,filterAll:`(All)`,filterConditionSection:`Condition`,filterValuesSection:`Values`,filterOperator:`Operator`,filterValue:`Value`,filterValuePlaceholder:`Value`,filterMin:`Min`,filterMax:`Max`,filterRangeSeparator:`–`,filterNoValue:`This operator doesn't take a value`,filterDate:`Date`,filterStartDate:`Start date`,filterEndDate:`End date`,filterTextPlaceholder:`Contains…`,filterTextHint:`Matches text anywhere in the value`,filterCurrentValue:`Current: {value}`,treeExpand:`Expand`,treeCollapse:`Collapse`,dateTreeYear:`{year}`,dateTreeMonth:({month:t})=>e[t-1]??String(t),dateTreeDay:`{day}`,calendarWeekdays:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],calendarMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],calendarTitle:({year:t,month:n})=>`${e[n-1]??n} ${t}`,calendarYear:`{year}`,calendarOpen:`Open calendar`,calendarClose:`Close calendar`,calendarPrevious:`Previous`,calendarNext:`Next`,calendarChangeView:`Change view`,calendarBack:`← Back`,calendarToday:`Today`,findLabel:`Find in cells`,findPlaceholder:`Find`,findInput:`Search text`,findSearching:`Searching…`,findNoResults:`No results`,findPrevious:`Previous match`,findPreviousHint:`Previous (Shift+Enter)`,findNext:`Next match`,findNextHint:`Next (Enter)`,findClose:`Close find`,findCloseHint:`Close (Esc)`,fillOptions:`Auto Fill Options`,fillOptionsCurrent:`Auto Fill Options ({kind})`,fillSeries:`Fill Series`,fillCopy:`Copy Cells`,invalidValue:`Invalid value`,enterNumber:`Enter a number`,enterInteger:`Enter a whole number`,enterMin:`Enter {min} or more`,enterMax:`Enter {max} or less`,enterRange:`Enter a number from {min} to {max}`,saveFailedCell:`Couldn't save. The value was restored.`,loadFailed:({count:e})=>`Couldn't load rows (${e} ${e===1?`block`:`blocks`})`,dismissLoadError:`Dismiss the error`,saveFailed:({count:e})=>`Couldn't save changes (${e} ${e===1?`row`:`rows`}). The values were restored.`,dismissSaveError:`Dismiss the save error`,totalRowLabel:`Total`,totalAverage:`Avg`,totalMin:`Min`,totalMax:`Max`,totalCount:`Count`,exportSubtotal:`{label} subtotal`},r={placeholder:`Filter or sort in plain words (e.g. this month, largest amount first)`,label:`Filter in plain words`,submit:`Ask`,stop:`Stop`,examples:`Try:`,thinking:`Thinking…`,escHint:`Press Esc to stop`,retry:`Try again`,appliedTitle:`Applied`,undo:`Undo`,close:`Close`,removeItem:`Remove {label} {text}`,allRemoved:`All conditions have been removed.`,unchanged:`Nothing to change.`,undone:`Undone.`,droppedTitle:`Couldn't use`,fromAi:`From the AI: {text}`,askFailed:`Couldn't reach the AI. Try again.`,noGrid:`The grid wasn't found. Try again once it's on the page.`,changedNotice:`The grid's conditions have changed, so they can't be changed from here. Use the grid's filters and sorting.`,itemSort:`Sort`,itemSortEntry:`{column} {direction}`,ascending:`ascending`,descending:`descending`,itemSearch:`Search`,itemHidden:`Hidden`,quote:`"{text}"`,quoteSeparator:`, `,emptyText:`(empty)`,unnamed:`(no name)`,andMore:`{items} and {count} more`,moreReasons:`{count} more`,columnReason:`{column}: {reason}`,readError:`Couldn't read the AI's answer. Try wording it differently.`,shapeError:`The AI's answer wasn't an instruction for the grid. Try wording it differently.`,filtersLocked:`Column filters are locked`,noSuchColumn:`There is no column {column}`,notFilterable:`This column can't be filtered`,noOperator:`The condition has no type`,operatorUnavailable:`{operator} can't be used on this column`,oneCondition:`Only one condition per column`,oneSelection:`Only one value choice per column`,unreadableFilters:`Unreadable conditions ({count}) can't be used`,noNumberRange:`The range needs two numbers`,notNumber:`{value} is not a number`,noText:`No text to look for`,textTooLong:`Text to look for can be up to {limit} characters`,unknownPeriod:`{value} is not an available period`,noDateRange:`The range needs two dates`,notDate:`{value} is not a date`,noValues:`No values to choose`,noSelectableValues:`None of the values can be chosen`,tooManyValues:`Up to {limit} values can be chosen ({count} not used)`,notInOptions:`Not in the list: {values}`,notAnOption:`{value} is not in the list`,cannotFilterBy:`Can't filter by {value}`,valueTooLong:`Values over {limit} characters can't be used`,valuesTooLong:`Values over {limit} characters ({count}) can't be used`,unreadableValues:`Unreadable values ({count}) can't be used`,sortLocked:`Sorting is locked`,sortNoSuchColumn:`Sort: there is no column {column}`,sortBadDirection:`Sort: {direction} can't be used for {column}`,searchUnreadable:`Couldn't read the search text`,searchLocked:`The search text is locked`,searchTooLong:`The search text can be up to {limit} characters`,columnsLocked:`Column visibility is locked`,unreadableColumns:`Unreadable column changes ({count}) can't be used`,cannotHideAll:`All columns can't be hidden`,operatorLabels:{"=":`equals`,"!=":`does not equal`,">":`greater than`,">=":`at least`,"<":`less than`,"<=":`at most`,between:`between`,contains:`contains`,equals:`equals`,startsWith:`starts with`,endsWith:`ends with`,onOrAfter:`on or after`,onOrBefore:`on or before`,notEquals:`does not equal`,preset:`today, this month, …`,blank:`blank`,notBlank:`not blank`,in:`one of`,notIn:`none of`,clear:`clear`}},i=e=>({...t,...e}),a=i(n),o=i(r);exports.gridAskLocaleTextEn=o,exports.localeTextEn=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],t={blank:`(Blank)`,filterNone:`No filter`,filterCustom:`Custom filter`,filterExcluded:({count:e})=>e===1?`Excluding 1 value`:`Excluding ${e} values`,filterExcludedValues:`Excluding {values}`,filterSelected:`{count} selected`,filterMatches:`Is "{value}"`,filterBoth:`{condition} and {set}`,conditionGreaterThanOrEqual:`≥ {value}`,conditionGreaterThan:`> {value}`,conditionLessThanOrEqual:`≤ {value}`,conditionLessThan:`< {value}`,conditionEquals:`= {value}`,conditionNotEquals:`≠ {value}`,conditionRange:`{min} – {max}`,conditionOnOrAfter:`On or after {value}`,conditionOnOrBefore:`On or before {value}`,conditionContains:`Contains "{value}"`,conditionStartsWith:`Starts with "{value}"`,conditionEndsWith:`Ends with "{value}"`,conditionBlank:`(Blank)`,conditionNotBlank:`(Not blank)`,datePresetToday:`Today`,datePresetThisMonth:`This month`,datePresetLast30Days:`Last 30 days`},n={rowCount:`Rows {shown} of {total}`,columnCount:`Columns {shown} of {total}`,filterSummary:`Filter: {value}`,filterGlobal:`"{text}"`,filterColumns:({count:e})=>e===1?`1 column`:`${e} columns`,sortSummary:`Sort: {value}`,sortEntry:`{column} ({direction})`,sortAscending:`ascending`,sortDescending:`descending`,activeCell:`Cell {cell}`,selection:`Range {range}`,selectionSize:({cells:e,rows:t})=>`${e} ${e===1?`cell`:`cells`} / ${t} ${t===1?`row`:`rows`}`,selectedColumns:({count:e})=>e===1?`1 column`:`${e} columns`,detailColumnName:`Details`,rowDragColumnName:`Move`,aggregateAverage:`Average`,aggregateCount:`Count`,aggregateSum:`Sum`,aggregateComputing:`Calculating… {percent}%`,aggregatePartial:`Loaded rows only`,none:`—`,listSeparator:`, `,globalFilterPlaceholder:`Filter all columns`,globalFilterLabel:`Search the whole table`,clearGlobalFilter:`Clear filter`,toggleFilterPanel:`Show or hide the filter panel`,clear:`Clear`,clearAll:`Clear all`,close:`Close`,apply:`Apply`,retry:`Retry`,noOptions:`No options`,noRows:`No rows to show`,noMatchingRows:`No matching rows`,selectAllRows:`Select all rows`,selectRow:`Select row {row}`,sortedAscending:`Sorted ascending`,sortedDescending:`Sorted descending`,sortPriority:` (priority {priority})`,columnFiltered:`Filtered`,dragColumn:`Drag to move the column`,columnMenu:`Column menu`,columnMenuFor:`Column menu for {column}`,showDetails:`Show details`,hideDetails:`Hide details`,expandGroup:`Expand {group}`,collapseGroup:`Collapse {group}`,groupRowCount:({count:e})=>e===`1`?`(1 row)`:`(${e} rows)`,editCell:`Edit {column}`,cellInput:`Cell input`,sizingColumns:`Sizing columns…`,applyingFilter:`Filtering {percent}%`,dragRow:`Drag to move the row`,dragRowDisabled:`Rows can't be moved while the table is sorted or filtered`,dragRowLabel:`Row {row}`,scrollHintRow:`Row {row}`,scrollHintJump:`Go to row {row}`,scrollHintJumpSeparator:`·`,scrollHintTenThousands:`{full}`,menuFilter:`Filter…`,menuSortAscending:`Sort ascending`,menuSortDescending:`Sort descending`,menuManageSort:`Manage sorting…`,menuManageFilters:`Manage filters…`,menuGroupBy:`Group by this column`,menuUngroup:`Ungroup`,menuPin:`Pin column`,menuPinNone:`No pin`,menuPinLeft:`Pin left`,menuPinRight:`Pin right`,menuPinUnavailable:`Pinning can't be changed in this grid.`,menuAutosize:`Autosize this column`,menuAutosizeAll:`Autosize all columns`,menuColumns:`Choose columns`,menuResetColumns:`Reset columns`,resetColumnsHint:`Restores the width, pinning, visibility, order and grouping of all columns.`,menuResetUnavailable:`Columns can't be reset in this grid.`,toolPanelFilters:`Filters`,toolPanelSort:`Sort`,toolPanelColumns:`Columns`,columnsPinnedLeft:`Pinned left`,columnsUnpinned:`Not pinned`,columnsPinnedRight:`Pinned right`,columnsHideAll:`Hide all columns (the first one stays)`,columnsShowAll:`Show all columns`,columnsDragToReorder:`Drag to reorder`,columnsDragWithinSection:`Drag to reorder (within the same section)`,columnsReorderUnavailable:`Columns can't be reordered in this grid.`,columnsReorderWhileSearching:`Columns can't be reordered while searching.`,columnsGroupedHint:`This column is grouped. Its values appear in the group column.`,groupedColumnTitle:`{column} (grouped)`,columnsSearchPlaceholder:`Search…`,columnsNoMatches:`No matching columns`,columnsReset:`Reset all columns`,columnsUnavailable:`Showing, hiding and resetting columns isn't available in this grid.`,globalFilterTitle:`Global filter`,globalFilterRows:`Rows containing "{text}"`,clearGlobalFilterTitle:`Clear the global filter`,noColumnFilters:`No column filters`,addFilterLabel:`Choose a column to filter`,addFilter:`+ Add filter…`,addFilterNone:`+ No columns to add`,sortPanelEmpty:`No sorting`,sortPanelDrag:`Drag to change the priority`,sortPanelDisabled:`Sorting is turned off`,sortPanelNeedsTwo:`Add a second level to reorder`,sortPanelAscending:`Ascending`,sortPanelAscendingShort:`Asc`,sortPanelDescending:`Descending`,sortPanelDescendingShort:`Desc`,sortPanelRemove:`Remove this level`,sortPanelAllUsed:`All columns are already used`,sortPanelAddHint:`Add a sort level`,sortPanelAdd:`+ Add level`,sortPanelClearHint:`Remove all sorting`,sortPanelReadOnly:`Sorting is turned off, so it can't be changed`,filterHiddenColumn:` (hidden)`,filterGroupedColumn:` (grouped)`,filterJumpUnavailable:`This column is hidden, so its filter can't be opened here. You can still clear it with ×.`,filterEditUnderGroup:`Opens under the group column header`,filterJump:`Go to this column to edit`,filterEditFor:`Edit the filter on {column}`,filterClear:`Clear this column's filter`,filterClearFor:`Clear the filter on {column}`,filterCurrentNone:`(none)`,filterCurrentExcluded:({count:e})=>e===1?`Excluding 1 value`:`Excluding ${e} values`,filterCurrentSelected:`{count} selected`,operatorEquals:`Equals`,operatorNotEquals:`Does not equal`,operatorGreaterThanOrEqual:`Greater than or equal to`,operatorGreaterThan:`Greater than`,operatorLessThanOrEqual:`Less than or equal to`,operatorLessThan:`Less than`,operatorBetween:`Between`,operatorContains:`Contains`,operatorStartsWith:`Starts with`,operatorEndsWith:`Ends with`,operatorOnOrAfter:`On or after`,operatorOnOrBefore:`On or before`,operatorBlank:`Blank`,operatorNotBlank:`Not blank`,filterTitle:`Filter: {column}`,filterCollecting:`Collecting values… {percent}%`,filterOptionsLoading:`Loading values…`,filterOptionsLoadingShort:`Loading…`,filterOptionsFailed:`Couldn't load the values`,filterOptionsFailedShort:`Failed`,filterOptionsTruncated:`(first values only)`,filterSearchPlaceholder:`Search (Enter to apply)`,filterSelectAll:`(Select all)`,filterSelectAllResults:`(Select all results)`,filterNoOptionsSource:`No values. With serverSide, give the column filterOptions or another source of values.`,filterNoMatches:`No matching values`,filterSelectedCount:`Selected {selected} of {total}`,filterShownCount:` ({count} shown)`,filterMatchCount:({count:e})=>e===1?`1 match`:`${e} matches`,filterTotalCount:`{count} total`,filterOptionCount:`Values: {count}`,filterAll:`(All)`,filterConditionSection:`Condition`,filterValuesSection:`Values`,filterOperator:`Operator`,filterValue:`Value`,filterValuePlaceholder:`Value`,filterMin:`Min`,filterMax:`Max`,filterRangeSeparator:`–`,filterNoValue:`This operator doesn't take a value`,filterDate:`Date`,filterStartDate:`Start date`,filterEndDate:`End date`,filterTextPlaceholder:`Contains…`,filterTextHint:`Matches text anywhere in the value`,filterCurrentValue:`Current: {value}`,treeExpand:`Expand`,treeCollapse:`Collapse`,dateTreeYear:`{year}`,dateTreeMonth:({month:t})=>e[t-1]??String(t),dateTreeDay:`{day}`,calendarWeekdays:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],calendarMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],calendarTitle:({year:t,month:n})=>`${e[n-1]??n} ${t}`,calendarYear:`{year}`,calendarOpen:`Open calendar`,calendarClose:`Close calendar`,calendarPrevious:`Previous`,calendarNext:`Next`,calendarChangeView:`Change view`,calendarBack:`← Back`,calendarToday:`Today`,findLabel:`Find in cells`,findPlaceholder:`Find`,findInput:`Search text`,findSearching:`Searching…`,findNoResults:`No results`,findPrevious:`Previous match`,findPreviousHint:`Previous (Shift+Enter)`,findNext:`Next match`,findNextHint:`Next (Enter)`,findClose:`Close find`,findCloseHint:`Close (Esc)`,fillOptions:`Auto Fill Options`,fillOptionsCurrent:`Auto Fill Options ({kind})`,fillSeries:`Fill Series`,fillCopy:`Copy Cells`,invalidValue:`Invalid value`,enterNumber:`Enter a number`,enterInteger:`Enter a whole number`,enterMin:`Enter {min} or more`,enterMax:`Enter {max} or less`,enterRange:`Enter a number from {min} to {max}`,enterDate:`Enter a date (e.g. 2026-03-15)`,saveFailedCell:`Couldn't save. The value was restored.`,loadFailed:({count:e})=>`Couldn't load rows (${e} ${e===1?`block`:`blocks`})`,dismissLoadError:`Dismiss the error`,saveFailed:({count:e})=>`Couldn't save changes (${e} ${e===1?`row`:`rows`}). The values were restored.`,dismissSaveError:`Dismiss the save error`,totalRowLabel:`Total`,totalAverage:`Avg`,totalMin:`Min`,totalMax:`Max`,totalCount:`Count`,exportSubtotal:`{label} subtotal`},r={placeholder:`Filter or sort in plain words (e.g. this month, largest amount first)`,label:`Filter in plain words`,submit:`Ask`,stop:`Stop`,examples:`Try:`,thinking:`Thinking…`,escHint:`Press Esc to stop`,retry:`Try again`,appliedTitle:`Applied`,undo:`Undo`,close:`Close`,removeItem:`Remove {label} {text}`,allRemoved:`All conditions have been removed.`,unchanged:`Nothing to change.`,undone:`Undone.`,droppedTitle:`Couldn't use`,fromAi:`From the AI: {text}`,askFailed:`Couldn't reach the AI. Try again.`,noGrid:`The grid wasn't found. Try again once it's on the page.`,changedNotice:`The grid's conditions have changed, so they can't be changed from here. Use the grid's filters and sorting.`,itemSort:`Sort`,itemSortEntry:`{column} {direction}`,ascending:`ascending`,descending:`descending`,itemSearch:`Search`,itemHidden:`Hidden`,quote:`"{text}"`,quoteSeparator:`, `,emptyText:`(empty)`,unnamed:`(no name)`,andMore:`{items} and {count} more`,moreReasons:`{count} more`,columnReason:`{column}: {reason}`,readError:`Couldn't read the AI's answer. Try wording it differently.`,shapeError:`The AI's answer wasn't an instruction for the grid. Try wording it differently.`,filtersLocked:`Column filters are locked`,noSuchColumn:`There is no column {column}`,notFilterable:`This column can't be filtered`,noOperator:`The condition has no type`,operatorUnavailable:`{operator} can't be used on this column`,oneCondition:`Only one condition per column`,oneSelection:`Only one value choice per column`,unreadableFilters:`Unreadable conditions ({count}) can't be used`,noNumberRange:`The range needs two numbers`,notNumber:`{value} is not a number`,noText:`No text to look for`,textTooLong:`Text to look for can be up to {limit} characters`,unknownPeriod:`{value} is not an available period`,noDateRange:`The range needs two dates`,notDate:`{value} is not a date`,noValues:`No values to choose`,noSelectableValues:`None of the values can be chosen`,tooManyValues:`Up to {limit} values can be chosen ({count} not used)`,notInOptions:`Not in the list: {values}`,notAnOption:`{value} is not in the list`,cannotFilterBy:`Can't filter by {value}`,valueTooLong:`Values over {limit} characters can't be used`,valuesTooLong:`Values over {limit} characters ({count}) can't be used`,unreadableValues:`Unreadable values ({count}) can't be used`,sortLocked:`Sorting is locked`,sortNoSuchColumn:`Sort: there is no column {column}`,sortBadDirection:`Sort: {direction} can't be used for {column}`,sortUnreadable:`Couldn't read the sort order`,searchUnreadable:`Couldn't read the search text`,searchLocked:`The search text is locked`,searchTooLong:`The search text can be up to {limit} characters`,columnsLocked:`Column visibility is locked`,unreadableColumns:`Unreadable column changes ({count}) can't be used`,cannotHideAll:`All columns can't be hidden`,operatorLabels:{"=":`equals`,"!=":`does not equal`,">":`greater than`,">=":`at least`,"<":`less than`,"<=":`at most`,between:`between`,contains:`contains`,equals:`equals`,startsWith:`starts with`,endsWith:`ends with`,onOrAfter:`on or after`,onOrBefore:`on or before`,notEquals:`does not equal`,preset:`today, this month, …`,blank:`blank`,notBlank:`not blank`,in:`one of`,notIn:`none of`,clear:`clear`}},i=e=>({...t,...e}),a=i(n),o=i(r);exports.gridAskLocaleTextEn=o,exports.localeTextEn=a;
@@ -17,6 +17,7 @@ var e = [
17
17
  filterNone: "No filter",
18
18
  filterCustom: "Custom filter",
19
19
  filterExcluded: ({ count: e }) => e === 1 ? "Excluding 1 value" : `Excluding ${e} values`,
20
+ filterExcludedValues: "Excluding {values}",
20
21
  filterSelected: "{count} selected",
21
22
  filterMatches: "Is \"{value}\"",
22
23
  filterBoth: "{condition} and {set}",
@@ -108,13 +109,13 @@ var e = [
108
109
  menuPinNone: "No pin",
109
110
  menuPinLeft: "Pin left",
110
111
  menuPinRight: "Pin right",
111
- menuPinUnavailable: "Pinning needs onColumnsChange.",
112
+ menuPinUnavailable: "Pinning can't be changed in this grid.",
112
113
  menuAutosize: "Autosize this column",
113
114
  menuAutosizeAll: "Autosize all columns",
114
115
  menuColumns: "Choose columns",
115
116
  menuResetColumns: "Reset columns",
116
117
  resetColumnsHint: "Restores the width, pinning, visibility, order and grouping of all columns.",
117
- menuResetUnavailable: "Resetting columns needs onColumnsChange.",
118
+ menuResetUnavailable: "Columns can't be reset in this grid.",
118
119
  toolPanelFilters: "Filters",
119
120
  toolPanelSort: "Sort",
120
121
  toolPanelColumns: "Columns",
@@ -125,14 +126,14 @@ var e = [
125
126
  columnsShowAll: "Show all columns",
126
127
  columnsDragToReorder: "Drag to reorder",
127
128
  columnsDragWithinSection: "Drag to reorder (within the same section)",
128
- columnsReorderUnavailable: "Reordering needs onColumnsChange.",
129
+ columnsReorderUnavailable: "Columns can't be reordered in this grid.",
129
130
  columnsReorderWhileSearching: "Columns can't be reordered while searching.",
130
131
  columnsGroupedHint: "This column is grouped. Its values appear in the group column.",
131
132
  groupedColumnTitle: "{column} (grouped)",
132
133
  columnsSearchPlaceholder: "Search…",
133
134
  columnsNoMatches: "No matching columns",
134
135
  columnsReset: "Reset all columns",
135
- columnsUnavailable: "Showing, hiding and resetting columns needs onColumnsChange.",
136
+ columnsUnavailable: "Showing, hiding and resetting columns isn't available in this grid.",
136
137
  globalFilterTitle: "Global filter",
137
138
  globalFilterRows: "Rows containing \"{text}\"",
138
139
  clearGlobalFilterTitle: "Clear the global filter",
@@ -270,6 +271,7 @@ var e = [
270
271
  enterMin: "Enter {min} or more",
271
272
  enterMax: "Enter {max} or less",
272
273
  enterRange: "Enter a number from {min} to {max}",
274
+ enterDate: "Enter a date (e.g. 2026-03-15)",
273
275
  saveFailedCell: "Couldn't save. The value was restored.",
274
276
  loadFailed: ({ count: e }) => `Couldn't load rows (${e} ${e === 1 ? "block" : "blocks"})`,
275
277
  dismissLoadError: "Dismiss the error",
@@ -344,6 +346,7 @@ var e = [
344
346
  sortLocked: "Sorting is locked",
345
347
  sortNoSuchColumn: "Sort: there is no column {column}",
346
348
  sortBadDirection: "Sort: {direction} can't be used for {column}",
349
+ sortUnreadable: "Couldn't read the sort order",
347
350
  searchUnreadable: "Couldn't read the search text",
348
351
  searchLocked: "The search text is locked",
349
352
  searchTooLong: "The search text can be up to {limit} characters",
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs");var t=21,n=4,r=1,i=41,a=13,o=600,s=60,c=16,l=null,u=()=>l||(typeof document>`u`?null:(l=document.createElement(`canvas`).getContext(`2d`),l)),d=`system-ui, sans-serif`,f=e=>{let t=d,n=13,r=`400`;if(e&&typeof window<`u`){let i=window.getComputedStyle(e);i.fontFamily&&(t=i.fontFamily);let a=Number.parseFloat(i.fontSize);Number.isFinite(a)&&a>0&&(n=a),i.fontWeight&&(r=i.fontWeight)}return{cellFont:`${r} ${n}px ${t}`,headerFont:`${o} ${a}px ${t}`}},p=(e,t,n)=>Math.min(Math.max(e,t),n),m=e=>e>=4352&&e<=4447||e>=11904&&e<=12350||e>=12353&&e<=13311||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=40960&&e<=42191||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65072&&e<=65103||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=127744&&e<=129791||e>=131072&&e<=262141,h=e=>{let t=0;for(let n of e){let e=n.codePointAt(0)??0;t+=m(e)?2:1}return t},g=(t,n)=>{let r=e.getCellValue(t,n);return n.valueFormatter?n.valueFormatter({value:r,row:t,column:n}):String(r??``)},_=e=>{if(!e||typeof document>`u`)return null;let t=document.createElement(`div`);return t.setAttribute(`aria-hidden`,`true`),t.style.cssText=`position:absolute;top:-99999px;left:-99999px;visibility:hidden;pointer-events:none;width:auto;height:auto;contain:layout style;`,e.appendChild(t),t},v=e=>{let t=document.createElement(`div`);return t.className=`ssg-body-cell`,t.style.cssText=`display:inline-block;position:static;top:auto;left:auto;width:auto;height:auto;white-space:nowrap;overflow:visible;`,t.textContent=e,t},y=e=>{let t=v(``);t.className=`ssg-body-cell ssg-total-cell`;let n=document.createElement(`span`);if(n.className=`ssg-total-value`,e.caption!==void 0&&e.caption!==``){let t=document.createElement(`span`);t.className=`ssg-total-caption`,t.textContent=e.caption,n.appendChild(t)}return n.appendChild(document.createTextNode(e.text)),t.appendChild(n),t},b=e=>e.suppressAutoSize===!0||e.autoHeight===!0;function x(a){let o=a.map(()=>[]),l=a.map(()=>[]),d=a.map(()=>1/0),m=a.map(()=>0);return{collect:t=>{for(let n=0;n<a.length;n+=1){if(b(a[n]))continue;let r=a[n].estimateCellWidth;if(r){let e=r(t,a[n]);e>m[n]&&(m[n]=e);continue}let i=String(e.getCellValue(t,a[n])??``);if(i===``)continue;let s=o[n],u=l[n];if(s.length===c&&2*i.length<=d[n])continue;let f=h(i);if(s.length<c){if(s.push(t),u.push(f),s.length===c){let e=u[0];for(let t=1;t<c;t+=1)u[t]<e&&(e=u[t]);d[n]=e}continue}if(f<=d[n])continue;let p=0;for(let e=1;e<c;e+=1)u[e]<u[p]&&(p=e);s[p]=t,u[p]=f;let g=u[0];for(let e=1;e<c;e+=1)u[e]<g&&(g=u[e]);d[n]=g}},finalize:({gridRoot:e,currentWidths:c,totalRowTexts:l})=>{let d=u();if(!d||a.length===0)return{};let{cellFont:h,headerFont:x}=f(e),S={},C=_(e);try{let e=null,u=null;if(C){let t=a.map(e=>{let t=l?.get(e.key);if(b(e)||t===void 0||t.text===``)return null;let n=y(t);return C.appendChild(n),n}),n=[];for(let e=0;e<a.length;e+=1){if(b(a[e])){n.push([]);continue}if(a[e].estimateCellWidth){n.push([]);continue}let t=o[e],r=[];for(let n=0;n<t.length;n+=1){let i=g(t[n],a[e]);if(i===``)continue;let o=v(i);C.appendChild(o),r.push(o)}n.push(r)}u=t.map(e=>e?e.offsetWidth+r:0),e=n.map(e=>{let t=0;for(let n=0;n<e.length;n+=1){let r=e[n].offsetWidth;r>t&&(t=r)}return t>0?t+r:0})}for(let r=0;r<a.length;r+=1){let f=a[r];if(b(f))continue;d.font=x;let _=f.title||f.key,v=d.measureText(_).width+n+i,y;if(f.estimateCellWidth)y=m[r]>0?m[r]+t:0;else if(e)y=e[r];else{d.font=h;let e=0,i=o[r];for(let t=0;t<i.length;t+=1){let n=g(i[t],f);if(n===``)continue;let r=d.measureText(n).width;r>e&&(e=r)}y=e>0?e+n+t:0}let C=0,w=l?.get(f.key);if(u)C=u[r];else if(w!==void 0&&w.text!==``){d.font=h;let e=w.caption?`${w.caption} ${w.text}`:w.text;C=d.measureText(e).width+n+t}let T=Math.ceil(p(Math.max(v,y,C),f.minWidth??s,f.maxWidth??1/0));c[f.key]!==T&&(S[f.key]=T)}}finally{C&&C.parentNode&&C.parentNode.removeChild(C)}return S}}}function S(){return u()!==null}function C({columns:e,getRow:t,viewRowCount:n,gridRoot:r,currentWidths:i}){if(e.length===0||u()===null)return{};let a=x(e);for(let e=0;e<n;e+=1){let n=t(e);n&&a.collect(n)}return a.finalize({gridRoot:r,currentWidths:i})}exports.canMeasureAutosize=S,exports.computeAutosizedColumnWidths=C,exports.createColumnWidthAccumulator=x;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs");var t=21,n=4,r=1,i=31,a=41,o=13,s=600,c=60,l=16,u=null,d=()=>u||(typeof document>`u`?null:(u=document.createElement(`canvas`).getContext(`2d`),u)),f=`system-ui, sans-serif`,p=e=>{let t=f,n=13,r=`400`;if(e&&typeof window<`u`){let i=window.getComputedStyle(e);i.fontFamily&&(t=i.fontFamily);let a=Number.parseFloat(i.fontSize);Number.isFinite(a)&&a>0&&(n=a),i.fontWeight&&(r=i.fontWeight)}return{cellFont:`${r} ${n}px ${t}`,headerFont:`${s} ${o}px ${t}`}},m=(e,t,n)=>Math.min(Math.max(e,t),n),h=e=>e>=4352&&e<=4447||e>=11904&&e<=12350||e>=12353&&e<=13311||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=40960&&e<=42191||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65072&&e<=65103||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=127744&&e<=129791||e>=131072&&e<=262141,g=e=>{let t=0;for(let n of e){let e=n.codePointAt(0)??0;t+=h(e)?2:1}return t},_=(t,n)=>{let r=e.getCellValue(t,n);return n.valueFormatter?n.valueFormatter({value:r,row:t,column:n}):String(r??``)},v=e=>{if(!e||typeof document>`u`)return null;let t=document.createElement(`div`);return t.setAttribute(`aria-hidden`,`true`),t.style.cssText=`position:absolute;top:-99999px;left:-99999px;visibility:hidden;pointer-events:none;width:auto;height:auto;contain:layout style;`,e.appendChild(t),t},y=e=>{let t=document.createElement(`div`);return t.className=`ssg-body-cell`,t.style.cssText=`display:inline-block;position:static;top:auto;left:auto;width:auto;height:auto;white-space:nowrap;overflow:visible;`,t.textContent=e,t},b=e=>{let t=y(``);t.className=`ssg-body-cell ssg-total-cell`;let n=document.createElement(`span`);if(n.className=`ssg-total-value`,e.caption!==void 0&&e.caption!==``){let t=document.createElement(`span`);t.className=`ssg-total-caption`,t.textContent=e.caption,n.appendChild(t)}return n.appendChild(document.createTextNode(e.text)),t.appendChild(n),t},x=(e,t)=>{let n=y(``),r=document.createElement(`span`);if(r.className=`ssg-chip`,t){let e=document.createElement(`span`);e.className=`ssg-chip-icon`,r.appendChild(e)}let i=document.createElement(`span`);return i.className=`ssg-chip-label`,i.textContent=e,r.appendChild(i),n.appendChild(r),n},S=(e,t,n,r)=>e!==void 0&&n.conditionalFormat?.chips!==void 0?e(t,n,r??-1):null,C=e=>e.suppressAutoSize===!0||e.autoHeight===!0;function w(o,s){let u=o.map(()=>[]),f=o.map(()=>[]),h=o.map(()=>[]),w=o.map(()=>1/0),T=o.map(()=>0),E=o.map(e=>s!==void 0&&e.conditionalFormat?.chips!==void 0&&typeof e.conditionalFormat.chips!=`function`?new Map:null),D=(e,t,n,r)=>{let i=o[e];if(s===void 0||i.conditionalFormat?.chips===void 0)return r;let a=E[e],c=a?.get(r);if(c!==void 0)return c;let l=s(t,i,n),u=l===null?r:l.label??r;return a?.set(r,u),u};return{collect:(t,n=-1)=>{for(let r=0;r<o.length;r+=1){if(C(o[r]))continue;let i=o[r].estimateCellWidth;if(i){let e=i(t,o[r]);e>T[r]&&(T[r]=e);continue}let a=String(e.getCellValue(t,o[r])??``);if(a===``)continue;let s=D(r,t,n,a),c=u[r],d=f[r],p=h[r];if(c.length===l&&2*s.length<=w[r])continue;let m=g(s);if(c.length<l){if(c.push(t),d.push(n),p.push(m),c.length===l){let e=p[0];for(let t=1;t<l;t+=1)p[t]<e&&(e=p[t]);w[r]=e}continue}if(m<=w[r])continue;let _=0;for(let e=1;e<l;e+=1)p[e]<p[_]&&(_=e);c[_]=t,d[_]=n,p[_]=m;let v=p[0];for(let e=1;e<l;e+=1)p[e]<v&&(v=p[e]);w[r]=v}},finalize:({gridRoot:e,currentWidths:s,totalRowTexts:l,chipOf:h})=>{let g=d();if(!g||o.length===0)return{};let{cellFont:w,headerFont:E}=p(e),D={},O=v(e);try{let e=null,d=null;if(O){let t=o.map(e=>{let t=l?.get(e.key);if(C(e)||t===void 0||t.text===``)return null;let n=b(t);return O.appendChild(n),n}),n=[];for(let e=0;e<o.length;e+=1){if(C(o[e])){n.push([]);continue}if(o[e].estimateCellWidth){n.push([]);continue}let t=u[e],r=[];for(let n=0;n<t.length;n+=1){let i=_(t[n],o[e]),a=S(h,t[n],o[e],f[e][n]),s=a?.label??i;if(s===``)continue;let c=a?x(s,a.icon):y(s);O.appendChild(c),r.push(c)}n.push(r)}d=t.map(e=>e?e.offsetWidth+r:0),e=n.map(e=>{let t=0;for(let n=0;n<e.length;n+=1){let r=e[n].offsetWidth;r>t&&(t=r)}return t>0?t+r:0})}for(let r=0;r<o.length;r+=1){let p=o[r];if(C(p))continue;g.font=E;let v=p.title||p.key,y=g.measureText(v).width+n+a,b;if(p.estimateCellWidth)b=T[r]>0?T[r]+t:0;else if(e)b=e[r];else{g.font=w;let e=0,a=u[r];for(let t=0;t<a.length;t+=1){let n=_(a[t],p),o=S(h,a[t],p,f[r][t]),s=o?.label??n;if(s===``)continue;let c=g.measureText(s).width+(o?i:0);c>e&&(e=c)}b=e>0?e+n+t:0}let x=0,O=l?.get(p.key);if(d)x=d[r];else if(O!==void 0&&O.text!==``){g.font=w;let e=O.caption?`${O.caption} ${O.text}`:O.text;x=g.measureText(e).width+n+t}let k=Math.ceil(m(Math.max(y,b,x),p.minWidth??c,p.maxWidth??1/0));s[p.key]!==k&&(D[p.key]=k)}}finally{O&&O.parentNode&&O.parentNode.removeChild(O)}return D}}}function T(){return d()!==null}function E({columns:e,getRow:t,viewRowCount:n,gridRoot:r,currentWidths:i}){if(e.length===0||d()===null)return{};let a=w(e);for(let e=0;e<n;e+=1){let n=t(e);n&&a.collect(n)}return a.finalize({gridRoot:r,currentWidths:i})}exports.canMeasureAutosize=T,exports.computeAutosizedColumnWidths=E,exports.createColumnWidthAccumulator=w;
@@ -4,6 +4,11 @@ export type AutosizeTotalRowText = {
4
4
  caption?: string;
5
5
  };
6
6
  export type AutosizeTotalRowTexts = ReadonlyMap<string, AutosizeTotalRowText>;
7
+ export type AutosizeCellChip = {
8
+ label: string | undefined;
9
+ icon: boolean;
10
+ };
11
+ export type AutosizeChipOf<T> = (row: T, column: GridColumn<T>, viewIndex: number) => AutosizeCellChip | null;
7
12
  export type ColumnAutosizeParams<T> = {
8
13
  columns: GridColumn<T>[];
9
14
  getRow: (viewIndex: number) => T;
@@ -12,13 +17,14 @@ export type ColumnAutosizeParams<T> = {
12
17
  currentWidths: Record<string, number>;
13
18
  };
14
19
  export type ColumnWidthAccumulator<T> = {
15
- collect: (row: T) => void;
20
+ collect: (row: T, viewIndex?: number) => void;
16
21
  finalize: (params: {
17
22
  gridRoot: HTMLElement | null;
18
23
  currentWidths: Record<string, number>;
19
24
  totalRowTexts?: AutosizeTotalRowTexts;
25
+ chipOf?: AutosizeChipOf<T> | undefined;
20
26
  }) => Record<string, number>;
21
27
  };
22
- export declare function createColumnWidthAccumulator<T>(columns: GridColumn<T>[]): ColumnWidthAccumulator<T>;
28
+ export declare function createColumnWidthAccumulator<T>(columns: GridColumn<T>[], chipOf?: AutosizeChipOf<T> | undefined): ColumnWidthAccumulator<T>;
23
29
  export declare function canMeasureAutosize(): boolean;
24
30
  export declare function computeAutosizedColumnWidths<T>({ columns, getRow, viewRowCount, gridRoot, currentWidths, }: ColumnAutosizeParams<T>): Record<string, number>;
@@ -1,7 +1,7 @@
1
1
  import { getCellValue as e } from "../utils/permissions.js";
2
2
  //#region src/logic/columnAutosize.ts
3
- var t = 21, n = 4, r = 1, i = 41, a = 13, o = 600, s = 60, c = 16, l = null, u = () => l || (typeof document > "u" ? null : (l = document.createElement("canvas").getContext("2d"), l)), d = "system-ui, sans-serif", f = (e) => {
4
- let t = d, n = 13, r = "400";
3
+ var t = 21, n = 4, r = 1, i = 31, a = 41, o = 13, s = 600, c = 60, l = 16, u = null, d = () => u || (typeof document > "u" ? null : (u = document.createElement("canvas").getContext("2d"), u)), f = "system-ui, sans-serif", p = (e) => {
4
+ let t = f, n = 13, r = "400";
5
5
  if (e && typeof window < "u") {
6
6
  let i = window.getComputedStyle(e);
7
7
  i.fontFamily && (t = i.fontFamily);
@@ -10,31 +10,31 @@ var t = 21, n = 4, r = 1, i = 41, a = 13, o = 600, s = 60, c = 16, l = null, u =
10
10
  }
11
11
  return {
12
12
  cellFont: `${r} ${n}px ${t}`,
13
- headerFont: `${o} ${a}px ${t}`
13
+ headerFont: `${s} ${o}px ${t}`
14
14
  };
15
- }, p = (e, t, n) => Math.min(Math.max(e, t), n), m = (e) => e >= 4352 && e <= 4447 || e >= 11904 && e <= 12350 || e >= 12353 && e <= 13311 || e >= 13312 && e <= 19903 || e >= 19968 && e <= 40959 || e >= 40960 && e <= 42191 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65072 && e <= 65103 || e >= 65280 && e <= 65376 || e >= 65504 && e <= 65510 || e >= 127744 && e <= 129791 || e >= 131072 && e <= 262141, h = (e) => {
15
+ }, m = (e, t, n) => Math.min(Math.max(e, t), n), h = (e) => e >= 4352 && e <= 4447 || e >= 11904 && e <= 12350 || e >= 12353 && e <= 13311 || e >= 13312 && e <= 19903 || e >= 19968 && e <= 40959 || e >= 40960 && e <= 42191 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65072 && e <= 65103 || e >= 65280 && e <= 65376 || e >= 65504 && e <= 65510 || e >= 127744 && e <= 129791 || e >= 131072 && e <= 262141, g = (e) => {
16
16
  let t = 0;
17
17
  for (let n of e) {
18
18
  let e = n.codePointAt(0) ?? 0;
19
- t += m(e) ? 2 : 1;
19
+ t += h(e) ? 2 : 1;
20
20
  }
21
21
  return t;
22
- }, g = (t, n) => {
22
+ }, _ = (t, n) => {
23
23
  let r = e(t, n);
24
24
  return n.valueFormatter ? n.valueFormatter({
25
25
  value: r,
26
26
  row: t,
27
27
  column: n
28
28
  }) : String(r ?? "");
29
- }, _ = (e) => {
29
+ }, v = (e) => {
30
30
  if (!e || typeof document > "u") return null;
31
31
  let t = document.createElement("div");
32
32
  return t.setAttribute("aria-hidden", "true"), t.style.cssText = "position:absolute;top:-99999px;left:-99999px;visibility:hidden;pointer-events:none;width:auto;height:auto;contain:layout style;", e.appendChild(t), t;
33
- }, v = (e) => {
33
+ }, y = (e) => {
34
34
  let t = document.createElement("div");
35
35
  return t.className = "ssg-body-cell", t.style.cssText = "display:inline-block;position:static;top:auto;left:auto;width:auto;height:auto;white-space:nowrap;overflow:visible;", t.textContent = e, t;
36
- }, y = (e) => {
37
- let t = v("");
36
+ }, b = (e) => {
37
+ let t = y("");
38
38
  t.className = "ssg-body-cell ssg-total-cell";
39
39
  let n = document.createElement("span");
40
40
  if (n.className = "ssg-total-value", e.caption !== void 0 && e.caption !== "") {
@@ -42,73 +42,88 @@ var t = 21, n = 4, r = 1, i = 41, a = 13, o = 600, s = 60, c = 16, l = null, u =
42
42
  t.className = "ssg-total-caption", t.textContent = e.caption, n.appendChild(t);
43
43
  }
44
44
  return n.appendChild(document.createTextNode(e.text)), t.appendChild(n), t;
45
- }, b = (e) => e.suppressAutoSize === !0 || e.autoHeight === !0;
46
- function x(a) {
47
- let o = a.map(() => []), l = a.map(() => []), d = a.map(() => Infinity), m = a.map(() => 0);
45
+ }, x = (e, t) => {
46
+ let n = y(""), r = document.createElement("span");
47
+ if (r.className = "ssg-chip", t) {
48
+ let e = document.createElement("span");
49
+ e.className = "ssg-chip-icon", r.appendChild(e);
50
+ }
51
+ let i = document.createElement("span");
52
+ return i.className = "ssg-chip-label", i.textContent = e, r.appendChild(i), n.appendChild(r), n;
53
+ }, S = (e, t, n, r) => e !== void 0 && n.conditionalFormat?.chips !== void 0 ? e(t, n, r ?? -1) : null, C = (e) => e.suppressAutoSize === !0 || e.autoHeight === !0;
54
+ function w(o, s) {
55
+ let u = o.map(() => []), f = o.map(() => []), h = o.map(() => []), w = o.map(() => Infinity), T = o.map(() => 0), E = o.map((e) => s !== void 0 && e.conditionalFormat?.chips !== void 0 && typeof e.conditionalFormat.chips != "function" ? /* @__PURE__ */ new Map() : null), D = (e, t, n, r) => {
56
+ let i = o[e];
57
+ if (s === void 0 || i.conditionalFormat?.chips === void 0) return r;
58
+ let a = E[e], c = a?.get(r);
59
+ if (c !== void 0) return c;
60
+ let l = s(t, i, n), u = l === null ? r : l.label ?? r;
61
+ return a?.set(r, u), u;
62
+ };
48
63
  return {
49
- collect: (t) => {
50
- for (let n = 0; n < a.length; n += 1) {
51
- if (b(a[n])) continue;
52
- let r = a[n].estimateCellWidth;
53
- if (r) {
54
- let e = r(t, a[n]);
55
- e > m[n] && (m[n] = e);
64
+ collect: (t, n = -1) => {
65
+ for (let r = 0; r < o.length; r += 1) {
66
+ if (C(o[r])) continue;
67
+ let i = o[r].estimateCellWidth;
68
+ if (i) {
69
+ let e = i(t, o[r]);
70
+ e > T[r] && (T[r] = e);
56
71
  continue;
57
72
  }
58
- let i = String(e(t, a[n]) ?? "");
59
- if (i === "") continue;
60
- let s = o[n], u = l[n];
61
- if (s.length === c && 2 * i.length <= d[n]) continue;
62
- let f = h(i);
63
- if (s.length < c) {
64
- if (s.push(t), u.push(f), s.length === c) {
65
- let e = u[0];
66
- for (let t = 1; t < c; t += 1) u[t] < e && (e = u[t]);
67
- d[n] = e;
73
+ let a = String(e(t, o[r]) ?? "");
74
+ if (a === "") continue;
75
+ let s = D(r, t, n, a), c = u[r], d = f[r], p = h[r];
76
+ if (c.length === l && 2 * s.length <= w[r]) continue;
77
+ let m = g(s);
78
+ if (c.length < l) {
79
+ if (c.push(t), d.push(n), p.push(m), c.length === l) {
80
+ let e = p[0];
81
+ for (let t = 1; t < l; t += 1) p[t] < e && (e = p[t]);
82
+ w[r] = e;
68
83
  }
69
84
  continue;
70
85
  }
71
- if (f <= d[n]) continue;
72
- let p = 0;
73
- for (let e = 1; e < c; e += 1) u[e] < u[p] && (p = e);
74
- s[p] = t, u[p] = f;
75
- let g = u[0];
76
- for (let e = 1; e < c; e += 1) u[e] < g && (g = u[e]);
77
- d[n] = g;
86
+ if (m <= w[r]) continue;
87
+ let _ = 0;
88
+ for (let e = 1; e < l; e += 1) p[e] < p[_] && (_ = e);
89
+ c[_] = t, d[_] = n, p[_] = m;
90
+ let v = p[0];
91
+ for (let e = 1; e < l; e += 1) p[e] < v && (v = p[e]);
92
+ w[r] = v;
78
93
  }
79
94
  },
80
- finalize: ({ gridRoot: e, currentWidths: c, totalRowTexts: l }) => {
81
- let d = u();
82
- if (!d || a.length === 0) return {};
83
- let { cellFont: h, headerFont: x } = f(e), S = {}, C = _(e);
95
+ finalize: ({ gridRoot: e, currentWidths: s, totalRowTexts: l, chipOf: h }) => {
96
+ let g = d();
97
+ if (!g || o.length === 0) return {};
98
+ let { cellFont: w, headerFont: E } = p(e), D = {}, O = v(e);
84
99
  try {
85
- let e = null, u = null;
86
- if (C) {
87
- let t = a.map((e) => {
100
+ let e = null, d = null;
101
+ if (O) {
102
+ let t = o.map((e) => {
88
103
  let t = l?.get(e.key);
89
- if (b(e) || t === void 0 || t.text === "") return null;
90
- let n = y(t);
91
- return C.appendChild(n), n;
104
+ if (C(e) || t === void 0 || t.text === "") return null;
105
+ let n = b(t);
106
+ return O.appendChild(n), n;
92
107
  }), n = [];
93
- for (let e = 0; e < a.length; e += 1) {
94
- if (b(a[e])) {
108
+ for (let e = 0; e < o.length; e += 1) {
109
+ if (C(o[e])) {
95
110
  n.push([]);
96
111
  continue;
97
112
  }
98
- if (a[e].estimateCellWidth) {
113
+ if (o[e].estimateCellWidth) {
99
114
  n.push([]);
100
115
  continue;
101
116
  }
102
- let t = o[e], r = [];
117
+ let t = u[e], r = [];
103
118
  for (let n = 0; n < t.length; n += 1) {
104
- let i = g(t[n], a[e]);
105
- if (i === "") continue;
106
- let o = v(i);
107
- C.appendChild(o), r.push(o);
119
+ let i = _(t[n], o[e]), a = S(h, t[n], o[e], f[e][n]), s = a?.label ?? i;
120
+ if (s === "") continue;
121
+ let c = a ? x(s, a.icon) : y(s);
122
+ O.appendChild(c), r.push(c);
108
123
  }
109
124
  n.push(r);
110
125
  }
111
- u = t.map((e) => e ? e.offsetWidth + r : 0), e = n.map((e) => {
126
+ d = t.map((e) => e ? e.offsetWidth + r : 0), e = n.map((e) => {
112
127
  let t = 0;
113
128
  for (let n = 0; n < e.length; n += 1) {
114
129
  let r = e[n].offsetWidth;
@@ -117,47 +132,47 @@ function x(a) {
117
132
  return t > 0 ? t + r : 0;
118
133
  });
119
134
  }
120
- for (let r = 0; r < a.length; r += 1) {
121
- let f = a[r];
122
- if (b(f)) continue;
123
- d.font = x;
124
- let _ = f.title || f.key, v = d.measureText(_).width + n + i, y;
125
- if (f.estimateCellWidth) y = m[r] > 0 ? m[r] + t : 0;
126
- else if (e) y = e[r];
135
+ for (let r = 0; r < o.length; r += 1) {
136
+ let p = o[r];
137
+ if (C(p)) continue;
138
+ g.font = E;
139
+ let v = p.title || p.key, y = g.measureText(v).width + n + a, b;
140
+ if (p.estimateCellWidth) b = T[r] > 0 ? T[r] + t : 0;
141
+ else if (e) b = e[r];
127
142
  else {
128
- d.font = h;
129
- let e = 0, i = o[r];
130
- for (let t = 0; t < i.length; t += 1) {
131
- let n = g(i[t], f);
132
- if (n === "") continue;
133
- let r = d.measureText(n).width;
134
- r > e && (e = r);
143
+ g.font = w;
144
+ let e = 0, a = u[r];
145
+ for (let t = 0; t < a.length; t += 1) {
146
+ let n = _(a[t], p), o = S(h, a[t], p, f[r][t]), s = o?.label ?? n;
147
+ if (s === "") continue;
148
+ let c = g.measureText(s).width + (o ? i : 0);
149
+ c > e && (e = c);
135
150
  }
136
- y = e > 0 ? e + n + t : 0;
151
+ b = e > 0 ? e + n + t : 0;
137
152
  }
138
- let C = 0, w = l?.get(f.key);
139
- if (u) C = u[r];
140
- else if (w !== void 0 && w.text !== "") {
141
- d.font = h;
142
- let e = w.caption ? `${w.caption} ${w.text}` : w.text;
143
- C = d.measureText(e).width + n + t;
153
+ let x = 0, O = l?.get(p.key);
154
+ if (d) x = d[r];
155
+ else if (O !== void 0 && O.text !== "") {
156
+ g.font = w;
157
+ let e = O.caption ? `${O.caption} ${O.text}` : O.text;
158
+ x = g.measureText(e).width + n + t;
144
159
  }
145
- let T = Math.ceil(p(Math.max(v, y, C), f.minWidth ?? s, f.maxWidth ?? Infinity));
146
- c[f.key] !== T && (S[f.key] = T);
160
+ let k = Math.ceil(m(Math.max(y, b, x), p.minWidth ?? c, p.maxWidth ?? Infinity));
161
+ s[p.key] !== k && (D[p.key] = k);
147
162
  }
148
163
  } finally {
149
- C && C.parentNode && C.parentNode.removeChild(C);
164
+ O && O.parentNode && O.parentNode.removeChild(O);
150
165
  }
151
- return S;
166
+ return D;
152
167
  }
153
168
  };
154
169
  }
155
- function S() {
156
- return u() !== null;
170
+ function T() {
171
+ return d() !== null;
157
172
  }
158
- function C({ columns: e, getRow: t, viewRowCount: n, gridRoot: r, currentWidths: i }) {
159
- if (e.length === 0 || u() === null) return {};
160
- let a = x(e);
173
+ function E({ columns: e, getRow: t, viewRowCount: n, gridRoot: r, currentWidths: i }) {
174
+ if (e.length === 0 || d() === null) return {};
175
+ let a = w(e);
161
176
  for (let e = 0; e < n; e += 1) {
162
177
  let n = t(e);
163
178
  n && a.collect(n);
@@ -168,4 +183,4 @@ function C({ columns: e, getRow: t, viewRowCount: n, gridRoot: r, currentWidths:
168
183
  });
169
184
  }
170
185
  //#endregion
171
- export { S as canMeasureAutosize, C as computeAutosizedColumnWidths, x as createColumnWidthAccumulator };
186
+ export { T as canMeasureAutosize, E as computeAutosizedColumnWidths, w as createColumnWidthAccumulator };