@ishibashi0112/spreadsheet-grid-core 1.0.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/controllers/activeRowFollowController.cjs +1 -0
  2. package/dist/controllers/activeRowFollowController.d.ts +18 -0
  3. package/dist/controllers/activeRowFollowController.js +68 -0
  4. package/dist/controllers/autoHeightMeasurer.cjs +1 -1
  5. package/dist/controllers/autoHeightMeasurer.js +17 -17
  6. package/dist/controllers/clipboardController.cjs +1 -1
  7. package/dist/controllers/clipboardController.d.ts +4 -0
  8. package/dist/controllers/clipboardController.js +82 -54
  9. package/dist/controllers/columnAutosizeRunner.cjs +1 -1
  10. package/dist/controllers/columnAutosizeRunner.d.ts +1 -0
  11. package/dist/controllers/columnAutosizeRunner.js +17 -16
  12. package/dist/controllers/columnHeaderDragController.cjs +1 -1
  13. package/dist/controllers/columnHeaderDragController.js +169 -168
  14. package/dist/controllers/columnMenuController.cjs +1 -1
  15. package/dist/controllers/columnMenuController.js +71 -69
  16. package/dist/controllers/contextMenuController.cjs +1 -1
  17. package/dist/controllers/contextMenuController.d.ts +5 -1
  18. package/dist/controllers/contextMenuController.js +62 -40
  19. package/dist/controllers/editController.cjs +1 -1
  20. package/dist/controllers/editController.d.ts +1 -0
  21. package/dist/controllers/editController.js +106 -99
  22. package/dist/controllers/fillHandleController.cjs +1 -1
  23. package/dist/controllers/fillHandleController.d.ts +1 -0
  24. package/dist/controllers/fillHandleController.js +157 -157
  25. package/dist/controllers/filterPopoverController.cjs +1 -1
  26. package/dist/controllers/filterPopoverController.js +6 -6
  27. package/dist/controllers/findController.cjs +1 -1
  28. package/dist/controllers/findController.d.ts +1 -0
  29. package/dist/controllers/findController.js +16 -15
  30. package/dist/controllers/historyController.cjs +1 -1
  31. package/dist/controllers/historyController.d.ts +6 -0
  32. package/dist/controllers/historyController.js +79 -37
  33. package/dist/controllers/imeInputController.cjs +1 -1
  34. package/dist/controllers/imeInputController.js +65 -54
  35. package/dist/controllers/keyboardController.cjs +1 -1
  36. package/dist/controllers/keyboardController.d.ts +1 -0
  37. package/dist/controllers/keyboardController.js +46 -42
  38. package/dist/controllers/pointerInteractionsController.cjs +1 -1
  39. package/dist/controllers/pointerInteractionsController.d.ts +1 -0
  40. package/dist/controllers/pointerInteractionsController.js +172 -172
  41. package/dist/controllers/popoverSupport.cjs +1 -1
  42. package/dist/controllers/popoverSupport.d.ts +1 -0
  43. package/dist/controllers/popoverSupport.js +9 -4
  44. package/dist/controllers/rowDragController.cjs +1 -1
  45. package/dist/controllers/rowDragController.d.ts +2 -0
  46. package/dist/controllers/rowDragController.js +160 -146
  47. package/dist/controllers/scrollSyncController.cjs +1 -1
  48. package/dist/controllers/scrollSyncController.js +45 -43
  49. package/dist/controllers/serverSideRowModel.cjs +1 -1
  50. package/dist/controllers/serverSideRowModel.js +19 -19
  51. package/dist/controllers/toolPanelController.cjs +1 -1
  52. package/dist/controllers/toolPanelController.js +26 -14
  53. package/dist/controllers/tooltipController.cjs +1 -1
  54. package/dist/controllers/tooltipController.js +74 -72
  55. package/dist/controllers/viewportSyncController.cjs +1 -1
  56. package/dist/controllers/viewportSyncController.d.ts +4 -1
  57. package/dist/controllers/viewportSyncController.js +66 -28
  58. package/dist/engine/columnCommands.cjs +1 -1
  59. package/dist/engine/columnCommands.js +113 -113
  60. package/dist/engine/createGridEngine.cjs +3 -3
  61. package/dist/engine/createGridEngine.d.ts +2 -0
  62. package/dist/engine/createGridEngine.js +72 -70
  63. package/dist/engine/exportCommands.cjs +1 -1
  64. package/dist/engine/exportCommands.js +18 -9
  65. package/dist/engine/fullFeatures.cjs +1 -1
  66. package/dist/engine/fullFeatures.js +6 -6
  67. package/dist/engine/gridApi.cjs +6 -6
  68. package/dist/engine/gridApi.d.ts +8 -2
  69. package/dist/engine/gridApi.js +197 -187
  70. package/dist/engine/notifiers.cjs +1 -1
  71. package/dist/engine/notifiers.d.ts +4 -0
  72. package/dist/engine/notifiers.js +7 -7
  73. package/dist/index.cjs +1 -1
  74. package/dist/index.d.ts +3 -1
  75. package/dist/index.js +7 -6
  76. package/dist/locales/en.cjs +1 -1
  77. package/dist/locales/en.js +5 -0
  78. package/dist/logic/autoScrollGeometry.cjs +1 -1
  79. package/dist/logic/autoScrollGeometry.d.ts +2 -0
  80. package/dist/logic/autoScrollGeometry.js +3 -3
  81. package/dist/logic/editorValues.cjs +1 -1
  82. package/dist/logic/editorValues.js +37 -34
  83. package/dist/logic/exportCsv.cjs +3 -3
  84. package/dist/logic/exportCsv.d.ts +4 -1
  85. package/dist/logic/exportCsv.js +22 -20
  86. package/dist/logic/exportData.cjs +1 -1
  87. package/dist/logic/exportData.d.ts +4 -1
  88. package/dist/logic/exportData.js +40 -36
  89. package/dist/logic/filtering.cjs +1 -1
  90. package/dist/logic/filtering.d.ts +2 -1
  91. package/dist/logic/filtering.js +16 -3
  92. package/dist/logic/geometry.cjs +1 -1
  93. package/dist/logic/geometry.d.ts +2 -0
  94. package/dist/logic/geometry.js +41 -20
  95. package/dist/logic/gridState.cjs +1 -1
  96. package/dist/logic/gridState.d.ts +3 -2
  97. package/dist/logic/gridState.js +32 -23
  98. package/dist/logic/groupExport.cjs +1 -1
  99. package/dist/logic/groupExport.js +28 -27
  100. package/dist/logic/grouping.cjs +1 -1
  101. package/dist/logic/grouping.d.ts +1 -0
  102. package/dist/logic/grouping.js +52 -41
  103. package/dist/logic/historyRebase.cjs +1 -0
  104. package/dist/logic/historyRebase.d.ts +5 -0
  105. package/dist/logic/historyRebase.js +36 -0
  106. package/dist/logic/imeInput.cjs +1 -1
  107. package/dist/logic/imeInput.js +6 -4
  108. package/dist/logic/localeTextFeatures.cjs +1 -1
  109. package/dist/logic/localeTextFeatures.d.ts +8 -0
  110. package/dist/logic/localeTextFeatures.js +11 -5
  111. package/dist/logic/localeTextPopups.cjs +1 -1
  112. package/dist/logic/localeTextPopups.d.ts +1 -0
  113. package/dist/logic/localeTextPopups.js +1 -0
  114. package/dist/logic/pasteFill.cjs +1 -0
  115. package/dist/logic/pasteFill.d.ts +2 -0
  116. package/dist/logic/pasteFill.js +25 -0
  117. package/dist/logic/selectEditorState.cjs +1 -1
  118. package/dist/logic/selectEditorState.d.ts +4 -1
  119. package/dist/logic/selectEditorState.js +14 -14
  120. package/dist/logic/selectLabels.cjs +1 -0
  121. package/dist/logic/selectLabels.d.ts +3 -0
  122. package/dist/logic/selectLabels.js +41 -0
  123. package/dist/logic/selectionAggregates.cjs +1 -1
  124. package/dist/logic/selectionAggregates.js +2 -3
  125. package/dist/logic/validation.cjs +1 -1
  126. package/dist/logic/validation.d.ts +1 -1
  127. package/dist/logic/validation.js +21 -21
  128. package/dist/logic/valueParsers.cjs +1 -0
  129. package/dist/logic/valueParsers.d.ts +14 -0
  130. package/dist/logic/valueParsers.js +23 -0
  131. package/dist/model/gridActions.cjs +1 -1
  132. package/dist/model/gridActions.d.ts +13 -0
  133. package/dist/model/gridActions.js +11 -0
  134. package/dist/model/gridReducer.cjs +1 -1
  135. package/dist/model/gridReducer.js +128 -65
  136. package/dist/model/gridTypes.core.d.ts +345 -43
  137. package/dist/utils/clipboard.cjs +4 -4
  138. package/dist/utils/clipboard.d.ts +14 -2
  139. package/dist/utils/clipboard.js +101 -49
  140. package/dist/utils/gridVisibleBand.cjs +1 -0
  141. package/dist/utils/gridVisibleBand.d.ts +4 -0
  142. package/dist/utils/gridVisibleBand.js +24 -0
  143. package/dist/utils/popupContainer.cjs +1 -0
  144. package/dist/utils/popupContainer.d.ts +8 -0
  145. package/dist/utils/popupContainer.js +60 -0
  146. package/dist/utils/scrollBottom.cjs +1 -0
  147. package/dist/utils/scrollBottom.d.ts +1 -0
  148. package/dist/utils/scrollBottom.js +4 -0
  149. package/dist/utils/topAlignedInput.cjs +1 -0
  150. package/dist/utils/topAlignedInput.d.ts +3 -0
  151. package/dist/utils/topAlignedInput.js +23 -0
  152. package/package.json +1 -1
@@ -27,6 +27,8 @@ export type StateChangeNotifierArgs<T> = {
27
27
  sort: GridSortState;
28
28
  dragState: GridUiState['dragState'];
29
29
  columns: GridColumn<T>[];
30
+ collapsedGroupKeys?: GridUiState['collapsedGroupKeys'];
31
+ includeGroupingInState?: boolean;
30
32
  onStateChange: ((state: GridState) => void) | undefined;
31
33
  onFiltersChange?: ((filters: GridFilterState) => void) | undefined;
32
34
  onSortChange?: ((sort: GridSortState) => void) | undefined;
@@ -53,6 +55,8 @@ export type ActiveCellNotifierArgs<T> = {
53
55
  rowModel: RowModel<T>;
54
56
  orderedColumns: readonly GridColumn<T>[];
55
57
  onActiveCellChange: ((cell: GridCellRef<T> | null) => void) | undefined;
58
+ followsRow?: boolean;
59
+ isRowFollowPending?: () => boolean;
56
60
  };
57
61
  export type ActiveCellNotifier<T> = {
58
62
  update: (args: ActiveCellNotifierArgs<T>) => void;
@@ -23,12 +23,12 @@ var l = () => {
23
23
  Object.is(e, t) || (e = t, n?.(Array.from(t)));
24
24
  } };
25
25
  }, d = () => {
26
- let s = null, c = null, l = (e, t) => Object.is(e.columnWidths, t.columnWidths) && Object.is(e.filters, t.filters) && Object.is(e.sort, t.sort) && Object.is(e.dragState, t.dragState) && Object.is(e.columns, t.columns);
26
+ let s = null, c = null, l = (e, t) => Object.is(e.columnWidths, t.columnWidths) && Object.is(e.filters, t.filters) && Object.is(e.sort, t.sort) && Object.is(e.dragState, t.dragState) && Object.is(e.columns, t.columns) && Object.is(e.collapsedGroupKeys, t.collapsedGroupKeys) && e.includeGroupingInState === t.includeGroupingInState;
27
27
  return { update: (u) => {
28
28
  let d = s, f = d === null || !l(d, u);
29
29
  if (s = u, !f || (d !== null && (u.onFiltersChange && !Object.is(d.filters, u.filters) && !a(d.filters, u.filters) && u.onFiltersChange(t(u.filters)), u.onSortChange && !Object.is(d.sort, u.sort) && !o(d.sort, u.sort) && u.onSortChange(n(u.sort))), !u.onStateChange)) return;
30
- let p = e(u.columnWidths, u.filters, u.sort, i(u.columns)), m = r(c, p, u.dragState !== null);
31
- c = m.nextLast, m.emit && u.onStateChange(p);
30
+ let p = u.includeGroupingInState === !0, m = e(u.columnWidths, u.filters, u.sort, i(u.columns, p), void 0, p ? u.collapsedGroupKeys ?? [] : void 0), h = r(c, m, u.dragState !== null);
31
+ c = h.nextLast, h.emit && u.onStateChange(m);
32
32
  } };
33
33
  }, f = () => {
34
34
  let e = null;
@@ -66,7 +66,7 @@ var l = () => {
66
66
  let o = i.getRowCount();
67
67
  for (let e = 0; e < o; e += 1) if (i.getRow(e) !== void 0 && Object.is(i.getRowKey(e), t.rowKey)) return !0;
68
68
  return !1;
69
- }, m = () => {
69
+ }, m = (e, t) => e === null || t === null ? e === t : Object.is(e.rowKey, t.rowKey) && e.columnKey === t.columnKey, h = () => {
70
70
  let e = null, t = null;
71
71
  return { update: (n) => {
72
72
  let r = e;
@@ -74,10 +74,10 @@ var l = () => {
74
74
  activeCell: n.activeCell,
75
75
  rowModel: n.rowModel,
76
76
  orderedColumns: n.orderedColumns
77
- }, r !== null && Object.is(r.activeCell, n.activeCell) && p(n, t))) return;
78
- let i = n.activeCell === null ? null : c(n.rowModel, n.orderedColumns, n.activeCell), a = r !== null && !s(t, i);
77
+ }, r !== null && Object.is(r.activeCell, n.activeCell) && (p(n, t) || n.isRowFollowPending?.() === !0))) return;
78
+ let i = n.activeCell === null ? null : c(n.rowModel, n.orderedColumns, n.activeCell), a = r !== null && !(n.followsRow === !0 ? m(t, i) : s(t, i));
79
79
  t = i, a && n.onActiveCellChange?.(i);
80
80
  } };
81
81
  };
82
82
  //#endregion
83
- export { m as createActiveCellNotifier, f as createCellEventNotifier, u as createDetailKeysNotifier, l as createHoverRowNotifier, d as createStateChangeNotifier };
83
+ export { h as createActiveCellNotifier, f as createCellEventNotifier, u as createDetailKeysNotifier, l as createHoverRowNotifier, d as createStateChangeNotifier };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./model/gridActions.cjs"),t=require("./logic/localeTextFilters.cjs"),n=require("./logic/localeText.cjs"),r=require("./logic/gridState.cjs"),i=require("./model/gridStore.cjs"),a=require("./engine/createGridEngine.cjs"),o=require("./engine/fullFeatures.cjs"),s=require("./logic/valueFormatters.cjs"),c=require("./logic/gridAskLocaleText.cjs"),l=require("./logic/gridAsk.cjs"),u=require("./logic/localeTextFeatures.cjs"),d=require("./logic/localeTextPopups.cjs"),f=require("./locales/en.cjs");exports.DEFAULT_AGGREGATES_LOCALE_TEXT=u.DEFAULT_AGGREGATES_LOCALE_TEXT,exports.DEFAULT_COLUMN_MENU_LOCALE_TEXT=u.DEFAULT_COLUMN_MENU_LOCALE_TEXT,exports.DEFAULT_FILL_HANDLE_LOCALE_TEXT=u.DEFAULT_FILL_HANDLE_LOCALE_TEXT,exports.DEFAULT_FILTERING_LOCALE_TEXT=u.DEFAULT_FILTERING_LOCALE_TEXT,exports.DEFAULT_FIND_LOCALE_TEXT=u.DEFAULT_FIND_LOCALE_TEXT,exports.DEFAULT_GRID_ASK_LOCALE_TEXT=c.DEFAULT_GRID_ASK_LOCALE_TEXT,exports.DEFAULT_GRID_LOCALE_TEXT=n.DEFAULT_GRID_LOCALE_TEXT,exports.DEFAULT_GROUPING_LOCALE_TEXT=u.DEFAULT_GROUPING_LOCALE_TEXT,exports.DEFAULT_POPUP_LOCALE_TEXT=d.DEFAULT_POPUP_LOCALE_TEXT,exports.DEFAULT_ROW_DRAG_LOCALE_TEXT=u.DEFAULT_ROW_DRAG_LOCALE_TEXT,exports.DEFAULT_SCROLL_HINT_LOCALE_TEXT=u.DEFAULT_SCROLL_HINT_LOCALE_TEXT,exports.DEFAULT_SERVER_SIDE_LOCALE_TEXT=u.DEFAULT_SERVER_SIDE_LOCALE_TEXT,exports.createGridAskRequest=l.createGridAskRequest,exports.createGridEngine=a.createGridEngine,exports.createGridStore=i.createGridStore,exports.describeGridAskView=l.describeGridAskView,exports.formatLocaleText=t.formatLocaleText,exports.fullCoreFeatures=o.fullCoreFeatures,exports.gridActions=e.gridActions,exports.gridAskLocaleTextEn=f.gridAskLocaleTextEn,exports.gridAskSystemPrompt=l.gridAskSystemPrompt,exports.isGridAskColumnsChanged=l.isGridAskColumnsChanged,exports.isSameGridAskView=l.isSameGridAskView,exports.localeTextEn=f.localeTextEn,exports.numberFormatter=s.numberFormatter,exports.readGridAskAnswer=l.readGridAskAnswer,exports.removeGridAskItem=l.removeGridAskItem,exports.restoreColumnsFromState=r.restoreColumnsFromState;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./model/gridActions.cjs"),t=require("./logic/localeTextFilters.cjs"),n=require("./logic/localeText.cjs"),r=require("./logic/gridState.cjs"),i=require("./model/gridStore.cjs"),a=require("./engine/createGridEngine.cjs"),o=require("./engine/fullFeatures.cjs"),s=require("./logic/valueFormatters.cjs"),c=require("./logic/valueParsers.cjs"),l=require("./logic/gridAskLocaleText.cjs"),u=require("./logic/gridAsk.cjs"),d=require("./logic/localeTextFeatures.cjs"),f=require("./logic/localeTextPopups.cjs"),p=require("./locales/en.cjs");exports.DEFAULT_AGGREGATES_LOCALE_TEXT=d.DEFAULT_AGGREGATES_LOCALE_TEXT,exports.DEFAULT_COLUMN_MENU_LOCALE_TEXT=d.DEFAULT_COLUMN_MENU_LOCALE_TEXT,exports.DEFAULT_CONTEXT_MENU_LOCALE_TEXT=d.DEFAULT_CONTEXT_MENU_LOCALE_TEXT,exports.DEFAULT_FILL_HANDLE_LOCALE_TEXT=d.DEFAULT_FILL_HANDLE_LOCALE_TEXT,exports.DEFAULT_FILTERING_LOCALE_TEXT=d.DEFAULT_FILTERING_LOCALE_TEXT,exports.DEFAULT_FIND_LOCALE_TEXT=d.DEFAULT_FIND_LOCALE_TEXT,exports.DEFAULT_GRID_ASK_LOCALE_TEXT=l.DEFAULT_GRID_ASK_LOCALE_TEXT,exports.DEFAULT_GRID_LOCALE_TEXT=n.DEFAULT_GRID_LOCALE_TEXT,exports.DEFAULT_GROUPING_LOCALE_TEXT=d.DEFAULT_GROUPING_LOCALE_TEXT,exports.DEFAULT_PINNED_ROWS_LOCALE_TEXT=d.DEFAULT_PINNED_ROWS_LOCALE_TEXT,exports.DEFAULT_POPUP_LOCALE_TEXT=f.DEFAULT_POPUP_LOCALE_TEXT,exports.DEFAULT_ROW_DRAG_LOCALE_TEXT=d.DEFAULT_ROW_DRAG_LOCALE_TEXT,exports.DEFAULT_SCROLL_HINT_LOCALE_TEXT=d.DEFAULT_SCROLL_HINT_LOCALE_TEXT,exports.DEFAULT_SERVER_SIDE_LOCALE_TEXT=d.DEFAULT_SERVER_SIDE_LOCALE_TEXT,exports.createGridAskRequest=u.createGridAskRequest,exports.createGridEngine=a.createGridEngine,exports.createGridStore=i.createGridStore,exports.describeGridAskView=u.describeGridAskView,exports.formatLocaleText=t.formatLocaleText,exports.fullCoreFeatures=o.fullCoreFeatures,exports.gridActions=e.gridActions,exports.gridAskLocaleTextEn=p.gridAskLocaleTextEn,exports.gridAskSystemPrompt=u.gridAskSystemPrompt,exports.isGridAskColumnsChanged=u.isGridAskColumnsChanged,exports.isSameGridAskView=u.isSameGridAskView,exports.localeTextEn=p.localeTextEn,exports.numberFormatter=s.numberFormatter,exports.numberParser=c.numberParser,exports.readGridAskAnswer=u.readGridAskAnswer,exports.removeGridAskItem=u.removeGridAskItem,exports.restoreColumnsFromState=r.restoreColumnsFromState;
package/dist/index.d.ts CHANGED
@@ -8,12 +8,14 @@ export type { GridStore, GridViewState, GridViewStatePatch } from './model/gridS
8
8
  export { gridActions } from './model/gridActions.js';
9
9
  export type { GridUiAction } from './model/gridActions.js';
10
10
  export { numberFormatter } from './logic/valueFormatters.js';
11
+ export { numberParser } from './logic/valueParsers.js';
12
+ export type { NumberParserOptions } from './logic/valueParsers.js';
11
13
  export { restoreColumnsFromState } from './logic/gridState.js';
12
14
  export { createGridAskRequest, describeGridAskView, gridAskSystemPrompt, isGridAskColumnsChanged, isSameGridAskView, readGridAskAnswer, removeGridAskItem, } from './logic/gridAsk.js';
13
15
  export type { GridAskAnswer, GridAskFilter, GridAskItem, GridAskOp, GridAskOptions, GridAskRequest, GridAskResult, GridAskSort, } from './logic/gridAsk.js';
14
16
  export { DEFAULT_GRID_LOCALE_TEXT, formatLocaleText } from './logic/localeText.js';
15
17
  export { DEFAULT_POPUP_LOCALE_TEXT } from './logic/localeTextPopups.js';
16
- export { DEFAULT_AGGREGATES_LOCALE_TEXT, DEFAULT_COLUMN_MENU_LOCALE_TEXT, DEFAULT_FILL_HANDLE_LOCALE_TEXT, DEFAULT_FILTERING_LOCALE_TEXT, DEFAULT_FIND_LOCALE_TEXT, DEFAULT_GROUPING_LOCALE_TEXT, DEFAULT_ROW_DRAG_LOCALE_TEXT, DEFAULT_SCROLL_HINT_LOCALE_TEXT, DEFAULT_SERVER_SIDE_LOCALE_TEXT, } from './logic/localeTextFeatures.js';
18
+ export { DEFAULT_AGGREGATES_LOCALE_TEXT, DEFAULT_COLUMN_MENU_LOCALE_TEXT, DEFAULT_CONTEXT_MENU_LOCALE_TEXT, DEFAULT_FILL_HANDLE_LOCALE_TEXT, DEFAULT_FILTERING_LOCALE_TEXT, DEFAULT_FIND_LOCALE_TEXT, DEFAULT_GROUPING_LOCALE_TEXT, DEFAULT_PINNED_ROWS_LOCALE_TEXT, DEFAULT_ROW_DRAG_LOCALE_TEXT, DEFAULT_SCROLL_HINT_LOCALE_TEXT, DEFAULT_SERVER_SIDE_LOCALE_TEXT, } from './logic/localeTextFeatures.js';
17
19
  export { DEFAULT_GRID_ASK_LOCALE_TEXT } from './logic/gridAskLocaleText.js';
18
20
  export type { GridAskLocaleText } from './logic/gridAskLocaleText.js';
19
21
  export { gridAskLocaleTextEn, localeTextEn } from './locales/en.js';
package/dist/index.js CHANGED
@@ -6,9 +6,10 @@ import { createGridStore as i } from "./model/gridStore.js";
6
6
  import { createGridEngine as a } from "./engine/createGridEngine.js";
7
7
  import { fullCoreFeatures as o } from "./engine/fullFeatures.js";
8
8
  import { numberFormatter as s } from "./logic/valueFormatters.js";
9
- import { DEFAULT_GRID_ASK_LOCALE_TEXT as c } from "./logic/gridAskLocaleText.js";
10
- import { createGridAskRequest as l, describeGridAskView as u, gridAskSystemPrompt as d, isGridAskColumnsChanged as f, isSameGridAskView as p, readGridAskAnswer as m, removeGridAskItem as h } from "./logic/gridAsk.js";
11
- import { DEFAULT_AGGREGATES_LOCALE_TEXT as g, DEFAULT_COLUMN_MENU_LOCALE_TEXT as _, DEFAULT_FILL_HANDLE_LOCALE_TEXT as v, DEFAULT_FILTERING_LOCALE_TEXT as y, DEFAULT_FIND_LOCALE_TEXT as b, DEFAULT_GROUPING_LOCALE_TEXT as x, DEFAULT_ROW_DRAG_LOCALE_TEXT as S, DEFAULT_SCROLL_HINT_LOCALE_TEXT as C, DEFAULT_SERVER_SIDE_LOCALE_TEXT as w } from "./logic/localeTextFeatures.js";
12
- import { DEFAULT_POPUP_LOCALE_TEXT as T } from "./logic/localeTextPopups.js";
13
- import { gridAskLocaleTextEn as E, localeTextEn as D } from "./locales/en.js";
14
- export { g as DEFAULT_AGGREGATES_LOCALE_TEXT, _ as DEFAULT_COLUMN_MENU_LOCALE_TEXT, v as DEFAULT_FILL_HANDLE_LOCALE_TEXT, y as DEFAULT_FILTERING_LOCALE_TEXT, b as DEFAULT_FIND_LOCALE_TEXT, c as DEFAULT_GRID_ASK_LOCALE_TEXT, n as DEFAULT_GRID_LOCALE_TEXT, x as DEFAULT_GROUPING_LOCALE_TEXT, T as DEFAULT_POPUP_LOCALE_TEXT, S as DEFAULT_ROW_DRAG_LOCALE_TEXT, C as DEFAULT_SCROLL_HINT_LOCALE_TEXT, w as DEFAULT_SERVER_SIDE_LOCALE_TEXT, l as createGridAskRequest, a as createGridEngine, i as createGridStore, u as describeGridAskView, t as formatLocaleText, o as fullCoreFeatures, e as gridActions, E as gridAskLocaleTextEn, d as gridAskSystemPrompt, f as isGridAskColumnsChanged, p as isSameGridAskView, D as localeTextEn, s as numberFormatter, m as readGridAskAnswer, h as removeGridAskItem, r as restoreColumnsFromState };
9
+ import { numberParser as c } from "./logic/valueParsers.js";
10
+ import { DEFAULT_GRID_ASK_LOCALE_TEXT as l } from "./logic/gridAskLocaleText.js";
11
+ import { createGridAskRequest as u, describeGridAskView as d, gridAskSystemPrompt as f, isGridAskColumnsChanged as p, isSameGridAskView as m, readGridAskAnswer as h, removeGridAskItem as g } from "./logic/gridAsk.js";
12
+ import { DEFAULT_AGGREGATES_LOCALE_TEXT as _, DEFAULT_COLUMN_MENU_LOCALE_TEXT as v, DEFAULT_CONTEXT_MENU_LOCALE_TEXT as y, DEFAULT_FILL_HANDLE_LOCALE_TEXT as b, DEFAULT_FILTERING_LOCALE_TEXT as x, DEFAULT_FIND_LOCALE_TEXT as S, DEFAULT_GROUPING_LOCALE_TEXT as C, DEFAULT_PINNED_ROWS_LOCALE_TEXT as w, DEFAULT_ROW_DRAG_LOCALE_TEXT as T, DEFAULT_SCROLL_HINT_LOCALE_TEXT as E, DEFAULT_SERVER_SIDE_LOCALE_TEXT as D } from "./logic/localeTextFeatures.js";
13
+ import { DEFAULT_POPUP_LOCALE_TEXT as O } from "./logic/localeTextPopups.js";
14
+ import { gridAskLocaleTextEn as k, localeTextEn as A } from "./locales/en.js";
15
+ export { _ as DEFAULT_AGGREGATES_LOCALE_TEXT, v as DEFAULT_COLUMN_MENU_LOCALE_TEXT, y as DEFAULT_CONTEXT_MENU_LOCALE_TEXT, b as DEFAULT_FILL_HANDLE_LOCALE_TEXT, x as DEFAULT_FILTERING_LOCALE_TEXT, S as DEFAULT_FIND_LOCALE_TEXT, l as DEFAULT_GRID_ASK_LOCALE_TEXT, n as DEFAULT_GRID_LOCALE_TEXT, C as DEFAULT_GROUPING_LOCALE_TEXT, w as DEFAULT_PINNED_ROWS_LOCALE_TEXT, O as DEFAULT_POPUP_LOCALE_TEXT, T as DEFAULT_ROW_DRAG_LOCALE_TEXT, E as DEFAULT_SCROLL_HINT_LOCALE_TEXT, D as DEFAULT_SERVER_SIDE_LOCALE_TEXT, u as createGridAskRequest, a as createGridEngine, i as createGridStore, d as describeGridAskView, t as formatLocaleText, o as fullCoreFeatures, e as gridActions, k as gridAskLocaleTextEn, f as gridAskSystemPrompt, p as isGridAskColumnsChanged, m as isSameGridAskView, A as localeTextEn, s as numberFormatter, c as numberParser, h as readGridAskAnswer, g as removeGridAskItem, r as restoreColumnsFromState };
@@ -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`,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;
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}`,pinnedTopRow:`Pinned to top {row}`,pinnedBottomRow:`Pinned to bottom {row}`,contextMenuCell:`Cell menu`,contextMenuRow:`Row menu`,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`,toolPanelLabel:`Tool panel`,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;
@@ -94,6 +94,10 @@ var e = [
94
94
  dragRow: "Drag to move the row",
95
95
  dragRowDisabled: "Rows can't be moved while the table is sorted or filtered",
96
96
  dragRowLabel: "Row {row}",
97
+ pinnedTopRow: "Pinned to top {row}",
98
+ pinnedBottomRow: "Pinned to bottom {row}",
99
+ contextMenuCell: "Cell menu",
100
+ contextMenuRow: "Row menu",
97
101
  scrollHintRow: "Row {row}",
98
102
  scrollHintJump: "Go to row {row}",
99
103
  scrollHintJumpSeparator: "·",
@@ -119,6 +123,7 @@ var e = [
119
123
  toolPanelFilters: "Filters",
120
124
  toolPanelSort: "Sort",
121
125
  toolPanelColumns: "Columns",
126
+ toolPanelLabel: "Tool panel",
122
127
  columnsPinnedLeft: "Pinned left",
123
128
  columnsUnpinned: "Not pinned",
124
129
  columnsPinnedRight: "Pinned right",
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=24,t=18,n=6,r=({rectLeft:e,rectTop:t,clientLeft:n,clientTop:r,clientWidth:i,clientHeight:a,scale:o})=>{let s=o?.x??1,c=o?.y??1,l=e+n*s,u=t+r*c;return{left:l,top:u,right:l+i*s,bottom:u+a*c}},i=(e,t,n)=>n>0?Math.min(e,t-n-1):e,a=(e,t,n,r)=>e<t+r?-1:+(e>n-r),o=(e,t,n,r)=>{if(t===0)return e;let i=Math.max(r,0),a=e+t*n;return a<0?0:a>i?i:a},s=(e,t,n)=>{let r=t.x-e.x,i=t.y-e.y;return r*r+i*i>=n*n};exports.AUTO_SCROLL_ACTIVATION_DISTANCE=n,exports.AUTO_SCROLL_EDGE_THRESHOLD=e,exports.AUTO_SCROLL_STEP=t,exports.clampClientYAboveFooter=i,exports.computeNextScrollPosition=o,exports.hasPointerLeftActivationRadius=s,exports.resolveAutoScrollAxisDirection=a,exports.resolveScrollContentBox=r;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=24,t=18,n=6,r=({rectLeft:e,rectTop:t,clientLeft:n,clientTop:r,clientWidth:i,clientHeight:a,scale:o})=>{let s=o?.x??1,c=o?.y??1,l=e+n*s,u=t+r*c;return{left:l,top:u,right:l+i*s,bottom:u+a*c}},i=(e,t,n)=>n>0?Math.min(e,t-n-1):e,a=(e,t,n)=>n>0?Math.max(e,t+n):e,o=(e,t,n)=>t>0?e+Math.max(0,t-n):e,s=(e,t,n,r)=>e<t+r?-1:+(e>n-r),c=(e,t,n,r)=>{if(t===0)return e;let i=Math.max(r,0),a=e+t*n;return a<0?0:a>i?i:a},l=(e,t,n)=>{let r=t.x-e.x,i=t.y-e.y;return r*r+i*i>=n*n};exports.AUTO_SCROLL_ACTIVATION_DISTANCE=n,exports.AUTO_SCROLL_EDGE_THRESHOLD=e,exports.AUTO_SCROLL_STEP=t,exports.clampClientYAboveFooter=i,exports.clampClientYBelowHeader=a,exports.computeNextScrollPosition=c,exports.hasPointerLeftActivationRadius=l,exports.resolveAutoScrollAxisDirection=s,exports.resolveScrollContentBox=r,exports.resolveTopAutoScrollStart=o;
@@ -21,6 +21,8 @@ export declare const resolveScrollContentBox: ({ rectLeft, rectTop, clientLeft,
21
21
  };
22
22
  }) => AutoScrollContentBox;
23
23
  export declare const clampClientYAboveFooter: (clientY: number, contentBottom: number, footerHeight: number) => number;
24
+ export declare const clampClientYBelowHeader: (clientY: number, contentTop: number, stickyTopHeight: number) => number;
25
+ export declare const resolveTopAutoScrollStart: (contentTop: number, stickyTopHeight: number, threshold: number) => number;
24
26
  export declare const resolveAutoScrollAxisDirection: (pointer: number, start: number, end: number, edgeThreshold: number) => AutoScrollAxisDirection;
25
27
  export declare const computeNextScrollPosition: (current: number, direction: AutoScrollAxisDirection, step: number, max: number) => number;
26
28
  export declare const hasPointerLeftActivationRadius: (origin: {
@@ -7,13 +7,13 @@ var e = 24, t = 18, n = 6, r = ({ rectLeft: e, rectTop: t, clientLeft: n, client
7
7
  right: l + i * s,
8
8
  bottom: u + a * c
9
9
  };
10
- }, i = (e, t, n) => n > 0 ? Math.min(e, t - n - 1) : e, a = (e, t, n, r) => e < t + r ? -1 : +(e > n - r), o = (e, t, n, r) => {
10
+ }, i = (e, t, n) => n > 0 ? Math.min(e, t - n - 1) : e, a = (e, t, n) => n > 0 ? Math.max(e, t + n) : e, o = (e, t, n) => t > 0 ? e + Math.max(0, t - n) : e, s = (e, t, n, r) => e < t + r ? -1 : +(e > n - r), c = (e, t, n, r) => {
11
11
  if (t === 0) return e;
12
12
  let i = Math.max(r, 0), a = e + t * n;
13
13
  return a < 0 ? 0 : a > i ? i : a;
14
- }, s = (e, t, n) => {
14
+ }, l = (e, t, n) => {
15
15
  let r = t.x - e.x, i = t.y - e.y;
16
16
  return r * r + i * i >= n * n;
17
17
  };
18
18
  //#endregion
19
- export { n as AUTO_SCROLL_ACTIVATION_DISTANCE, e as AUTO_SCROLL_EDGE_THRESHOLD, t as AUTO_SCROLL_STEP, i as clampClientYAboveFooter, o as computeNextScrollPosition, s as hasPointerLeftActivationRadius, a as resolveAutoScrollAxisDirection, r as resolveScrollContentBox };
19
+ export { n as AUTO_SCROLL_ACTIVATION_DISTANCE, e as AUTO_SCROLL_EDGE_THRESHOLD, t as AUTO_SCROLL_STEP, i as clampClientYAboveFooter, a as clampClientYBelowHeader, c as computeNextScrollPosition, l as hasPointerLeftActivationRadius, s as resolveAutoScrollAxisDirection, r as resolveScrollContentBox, o as resolveTopAutoScrollStart };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("./checkboxEditor.cjs");var n=/[\uFF01-\uFF5E]/g,r=/[ー−‐‑ー]/g,i=/^[+-]?[1-9]\d{0,2}(?:,\d{3})+(?:\.\d+)?$/,a=e=>{let t=e.replace(n,e=>String.fromCharCode(e.charCodeAt(0)-65248)).replace(/\u3000/g,` `).replace(/。/g,`.`).replace(/、/g,`,`).trim().replace(r,`-`);return i.test(t)?t.replace(/,/g,``):t},o=e=>e.replace(n,e=>String.fromCharCode(e.charCodeAt(0)-65248)).replace(/\u3000/g,` `).replace(r,`-`).replace(/\s*[年月]\s*/g,`/`).replace(/\s*日\s*$/,``).trim(),s=e=>{let t=a(e);if(t===``)return null;let n=Number(t);return Number.isFinite(n)?n:null},c=/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/,l=e=>{let t=s(e);if(t===null)return null;let n=a(e);return c.test(n)?n:String(t)},u=/^[+-]?\.?$/,d=e=>e!==``&&u.test(e),f=e=>e.trim()===``?null:s(e)??e,p=e=>`${String(e.getFullYear()).padStart(4,`0`)}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`,m=/^\s*[+-]?\d+\s*$/,h=(e,t,n)=>e>=1e3&&e<=9999&&t>=1&&t<=12&&n>=1&&n<=new Date(e,t,0).getDate(),g=(e,t,n)=>`${String(e).padStart(4,`0`)}-${String(t).padStart(2,`0`)}-${String(n).padStart(2,`0`)}`,_=/^\s*(\d{4})[-/.](\d{1,2})[-/.](\d{1,2})(?![\d])/,v=/^\s*(\d{1,2})[-/.](\d{1,2})[-/.](\d{4}|\d{2})(?![\d])/,y=e=>e<50?2e3+e:1900+e,b=e=>{let t=_.exec(e);if(t){let[e,n,r]=[Number(t[1]),Number(t[2]),Number(t[3])];return h(e,n,r)?g(e,n,r):``}let n=v.exec(e);if(n){let[e,t,r]=[Number(n[1]),Number(n[2]),Number(n[3])],i=n[3].length===2?y(r):r;return h(i,e,t)?g(i,e,t):``}},x=(e,t)=>{let n=t.getFullYear();if(n<1e3||n>9999)return!1;let r=e.match(/\d+/g)??[],i=r.findIndex(e=>e.length===4&&Number(e)===n);if(i===-1&&r.length>=2&&(i=r.findLastIndex(e=>e.length===2&&y(Number(e))===n)),i===-1)return!1;let a=r.filter((e,t)=>t!==i),o=t.getDate();return a.length===0?o===1:a.some(e=>e.length<=2&&Number(e)===o)},S=e=>{if(e instanceof Date)return Number.isNaN(e.getTime())?``:p(e);if(typeof e==`string`&&e.trim()!==``){if(m.test(e))return``;let t=b(e);if(t!==void 0)return t;let n=new Date(e);return Number.isNaN(n.getTime())||!x(e,n)?``:p(n)}return``},C=e=>{if(e===``)return null;let t=S(e);return t===``?e:t},w=e=>{if(e.parseClipboardValue)return e.parseClipboardValue;if(e.editor?.type===`number`)return f;if(e.editor?.type===`date`)return C;if(e.editor?.type===`checkbox`){let n=e.editor;return e=>t.parseCheckboxEditorValue(e,n)}return e=>e},T=(e,t,n)=>typeof t==`string`?w(e)(t,n):t,E=(e,t)=>{let n=e.editor?.type;if(n===`date`)return S(t);let r=String(t??``);return n===`number`?l(r)??r:r},D=(e,t,n)=>{if(Object.is(n,t))return!0;let r=e.editor?.type;return typeof n!=`string`||r===`select`||r===`checkbox`||r===`custom`?!1:n===E(e,t)},O=(t,n,r,i)=>t.map((t,a)=>a===n?e.setCellValue(t,r,i):t);exports.isNumberInputPrefix=d,exports.isUnchangedEditorCommit=D,exports.normalizeNumberText=a,exports.normalizeTypedDateText=o,exports.parseCommittedValue=T,exports.parseNumberText=s,exports.resolveCellParser=w,exports.toDateInputValue=S,exports.toEditorStartText=E,exports.toNumberInputText=l,exports.writeRowsCell=O;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("./checkboxEditor.cjs"),n=require("./selectLabels.cjs");var r=/[\uFF01-\uFF5E]/g,i=/[ー−‐‑ー]/g,a=/^[+-]?[1-9]\d{0,2}(?:,\d{3})+(?:\.\d+)?$/,o=e=>{let t=e.replace(r,e=>String.fromCharCode(e.charCodeAt(0)-65248)).replace(/\u3000/g,` `).replace(/。/g,`.`).replace(/、/g,`,`).trim().replace(i,`-`);return a.test(t)?t.replace(/,/g,``):t},s=e=>e.replace(r,e=>String.fromCharCode(e.charCodeAt(0)-65248)).replace(/\u3000/g,` `).replace(i,`-`).replace(/\s*[年月]\s*/g,`/`).replace(/\s*日\s*$/,``).trim(),c=e=>{let t=o(e);if(t===``)return null;let n=Number(t);return Number.isFinite(n)?n:null},l=/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/,u=e=>{let t=c(e);if(t===null)return null;let n=o(e);return l.test(n)?n:String(t)},d=/^[+-]?\.?$/,f=e=>e!==``&&d.test(e),p=e=>e.trim()===``?null:c(e)??e,m=e=>`${String(e.getFullYear()).padStart(4,`0`)}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`,h=/^\s*[+-]?\d+\s*$/,g=(e,t,n)=>e>=1e3&&e<=9999&&t>=1&&t<=12&&n>=1&&n<=new Date(e,t,0).getDate(),_=(e,t,n)=>`${String(e).padStart(4,`0`)}-${String(t).padStart(2,`0`)}-${String(n).padStart(2,`0`)}`,v=/^\s*(\d{4})[-/.](\d{1,2})[-/.](\d{1,2})(?![\d])/,y=/^\s*(\d{1,2})[-/.](\d{1,2})[-/.](\d{4}|\d{2})(?![\d])/,b=e=>e<50?2e3+e:1900+e,x=e=>{let t=v.exec(e);if(t){let[e,n,r]=[Number(t[1]),Number(t[2]),Number(t[3])];return g(e,n,r)?_(e,n,r):``}let n=y.exec(e);if(n){let[e,t,r]=[Number(n[1]),Number(n[2]),Number(n[3])],i=n[3].length===2?b(r):r;return g(i,e,t)?_(i,e,t):``}},S=(e,t)=>{let n=t.getFullYear();if(n<1e3||n>9999)return!1;let r=e.match(/\d+/g)??[],i=r.findIndex(e=>e.length===4&&Number(e)===n);if(i===-1&&r.length>=2&&(i=r.findLastIndex(e=>e.length===2&&b(Number(e))===n)),i===-1)return!1;let a=r.filter((e,t)=>t!==i),o=t.getDate();return a.length===0?o===1:a.some(e=>e.length<=2&&Number(e)===o)},C=e=>{if(e instanceof Date)return Number.isNaN(e.getTime())?``:m(e);if(typeof e==`string`&&e.trim()!==``){if(h.test(e))return``;let t=x(e);if(t!==void 0)return t;let n=new Date(e);return Number.isNaN(n.getTime())||!S(e,n)?``:m(n)}return``},w=e=>{if(e===``)return null;let t=C(e);return t===``?e:t},T=e=>{if(e.parseClipboardValue)return e.parseClipboardValue;let r=n.resolveSelectLabelParser(e);if(r)return r;if(e.editor?.type===`number`)return p;if(e.editor?.type===`date`)return w;if(e.editor?.type===`checkbox`){let n=e.editor;return e=>t.parseCheckboxEditorValue(e,n)}return e=>e},E=(e,t,r)=>typeof t!=`string`||!e.parseClipboardValue&&n.resolveSelectLabelParser(e)?t:T(e)(t,r),D=(e,t)=>{let n=e.editor?.type;if(n===`date`)return C(t);let r=String(t??``);return n===`number`?u(r)??r:r},O=(e,t,n)=>{if(Object.is(n,t))return!0;let r=e.editor?.type;return typeof n!=`string`||r===`select`||r===`checkbox`||r===`custom`?!1:n===D(e,t)},k=(t,n,r,i)=>t.map((t,a)=>a===n?e.setCellValue(t,r,i):t);exports.isNumberInputPrefix=f,exports.isUnchangedEditorCommit=O,exports.normalizeNumberText=o,exports.normalizeTypedDateText=s,exports.parseCommittedValue=E,exports.parseNumberText=c,exports.resolveCellParser=T,exports.toDateInputValue=C,exports.toEditorStartText=D,exports.toNumberInputText=u,exports.writeRowsCell=k;
@@ -1,77 +1,80 @@
1
1
  import { setCellValue as e } from "../utils/permissions.js";
2
2
  import { parseCheckboxEditorValue as t } from "./checkboxEditor.js";
3
+ import { resolveSelectLabelParser as n } from "./selectLabels.js";
3
4
  //#region src/logic/editorValues.ts
4
- var n = /[\uFF01-\uFF5E]/g, r = /[ー−‐‑ー]/g, i = /^[+-]?[1-9]\d{0,2}(?:,\d{3})+(?:\.\d+)?$/, a = (e) => {
5
- let t = e.replace(n, (e) => String.fromCharCode(e.charCodeAt(0) - 65248)).replace(/\u3000/g, " ").replace(/。/g, ".").replace(/、/g, ",").trim().replace(r, "-");
6
- return i.test(t) ? t.replace(/,/g, "") : t;
7
- }, o = (e) => e.replace(n, (e) => String.fromCharCode(e.charCodeAt(0) - 65248)).replace(/\u3000/g, " ").replace(r, "-").replace(/\s*[年月]\s*/g, "/").replace(/\s*日\s*$/, "").trim(), s = (e) => {
8
- let t = a(e);
5
+ var r = /[\uFF01-\uFF5E]/g, i = /[ー−‐‑ー]/g, a = /^[+-]?[1-9]\d{0,2}(?:,\d{3})+(?:\.\d+)?$/, o = (e) => {
6
+ let t = e.replace(r, (e) => String.fromCharCode(e.charCodeAt(0) - 65248)).replace(/\u3000/g, " ").replace(/。/g, ".").replace(/、/g, ",").trim().replace(i, "-");
7
+ return a.test(t) ? t.replace(/,/g, "") : t;
8
+ }, s = (e) => e.replace(r, (e) => String.fromCharCode(e.charCodeAt(0) - 65248)).replace(/\u3000/g, " ").replace(i, "-").replace(/\s*[年月]\s*/g, "/").replace(/\s*日\s*$/, "").trim(), c = (e) => {
9
+ let t = o(e);
9
10
  if (t === "") return null;
10
11
  let n = Number(t);
11
12
  return Number.isFinite(n) ? n : null;
12
- }, c = /^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/, l = (e) => {
13
- let t = s(e);
13
+ }, l = /^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/, u = (e) => {
14
+ let t = c(e);
14
15
  if (t === null) return null;
15
- let n = a(e);
16
- return c.test(n) ? n : String(t);
17
- }, u = /^[+-]?\.?$/, d = (e) => e !== "" && u.test(e), f = (e) => e.trim() === "" ? null : s(e) ?? e, p = (e) => `${String(e.getFullYear()).padStart(4, "0")}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, m = /^\s*[+-]?\d+\s*$/, h = (e, t, n) => e >= 1e3 && e <= 9999 && t >= 1 && t <= 12 && n >= 1 && n <= new Date(e, t, 0).getDate(), g = (e, t, n) => `${String(e).padStart(4, "0")}-${String(t).padStart(2, "0")}-${String(n).padStart(2, "0")}`, _ = /^\s*(\d{4})[-/.](\d{1,2})[-/.](\d{1,2})(?![\d])/, v = /^\s*(\d{1,2})[-/.](\d{1,2})[-/.](\d{4}|\d{2})(?![\d])/, y = (e) => e < 50 ? 2e3 + e : 1900 + e, b = (e) => {
18
- let t = _.exec(e);
16
+ let n = o(e);
17
+ return l.test(n) ? n : String(t);
18
+ }, d = /^[+-]?\.?$/, f = (e) => e !== "" && d.test(e), p = (e) => e.trim() === "" ? null : c(e) ?? e, m = (e) => `${String(e.getFullYear()).padStart(4, "0")}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, h = /^\s*[+-]?\d+\s*$/, g = (e, t, n) => e >= 1e3 && e <= 9999 && t >= 1 && t <= 12 && n >= 1 && n <= new Date(e, t, 0).getDate(), _ = (e, t, n) => `${String(e).padStart(4, "0")}-${String(t).padStart(2, "0")}-${String(n).padStart(2, "0")}`, v = /^\s*(\d{4})[-/.](\d{1,2})[-/.](\d{1,2})(?![\d])/, y = /^\s*(\d{1,2})[-/.](\d{1,2})[-/.](\d{4}|\d{2})(?![\d])/, b = (e) => e < 50 ? 2e3 + e : 1900 + e, x = (e) => {
19
+ let t = v.exec(e);
19
20
  if (t) {
20
21
  let [e, n, r] = [
21
22
  Number(t[1]),
22
23
  Number(t[2]),
23
24
  Number(t[3])
24
25
  ];
25
- return h(e, n, r) ? g(e, n, r) : "";
26
+ return g(e, n, r) ? _(e, n, r) : "";
26
27
  }
27
- let n = v.exec(e);
28
+ let n = y.exec(e);
28
29
  if (n) {
29
30
  let [e, t, r] = [
30
31
  Number(n[1]),
31
32
  Number(n[2]),
32
33
  Number(n[3])
33
- ], i = n[3].length === 2 ? y(r) : r;
34
- return h(i, e, t) ? g(i, e, t) : "";
34
+ ], i = n[3].length === 2 ? b(r) : r;
35
+ return g(i, e, t) ? _(i, e, t) : "";
35
36
  }
36
- }, x = (e, t) => {
37
+ }, S = (e, t) => {
37
38
  let n = t.getFullYear();
38
39
  if (n < 1e3 || n > 9999) return !1;
39
40
  let r = e.match(/\d+/g) ?? [], i = r.findIndex((e) => e.length === 4 && Number(e) === n);
40
- if (i === -1 && r.length >= 2 && (i = r.findLastIndex((e) => e.length === 2 && y(Number(e)) === n)), i === -1) return !1;
41
+ if (i === -1 && r.length >= 2 && (i = r.findLastIndex((e) => e.length === 2 && b(Number(e)) === n)), i === -1) return !1;
41
42
  let a = r.filter((e, t) => t !== i), o = t.getDate();
42
43
  return a.length === 0 ? o === 1 : a.some((e) => e.length <= 2 && Number(e) === o);
43
- }, S = (e) => {
44
- if (e instanceof Date) return Number.isNaN(e.getTime()) ? "" : p(e);
44
+ }, C = (e) => {
45
+ if (e instanceof Date) return Number.isNaN(e.getTime()) ? "" : m(e);
45
46
  if (typeof e == "string" && e.trim() !== "") {
46
- if (m.test(e)) return "";
47
- let t = b(e);
47
+ if (h.test(e)) return "";
48
+ let t = x(e);
48
49
  if (t !== void 0) return t;
49
50
  let n = new Date(e);
50
- return Number.isNaN(n.getTime()) || !x(e, n) ? "" : p(n);
51
+ return Number.isNaN(n.getTime()) || !S(e, n) ? "" : m(n);
51
52
  }
52
53
  return "";
53
- }, C = (e) => {
54
+ }, w = (e) => {
54
55
  if (e === "") return null;
55
- let t = S(e);
56
+ let t = C(e);
56
57
  return t === "" ? e : t;
57
- }, w = (e) => {
58
+ }, T = (e) => {
58
59
  if (e.parseClipboardValue) return e.parseClipboardValue;
59
- if (e.editor?.type === "number") return f;
60
- if (e.editor?.type === "date") return C;
60
+ let r = n(e);
61
+ if (r) return r;
62
+ if (e.editor?.type === "number") return p;
63
+ if (e.editor?.type === "date") return w;
61
64
  if (e.editor?.type === "checkbox") {
62
65
  let n = e.editor;
63
66
  return (e) => t(e, n);
64
67
  }
65
68
  return (e) => e;
66
- }, T = (e, t, n) => typeof t == "string" ? w(e)(t, n) : t, E = (e, t) => {
69
+ }, E = (e, t, r) => typeof t != "string" || !e.parseClipboardValue && n(e) ? t : T(e)(t, r), D = (e, t) => {
67
70
  let n = e.editor?.type;
68
- if (n === "date") return S(t);
71
+ if (n === "date") return C(t);
69
72
  let r = String(t ?? "");
70
- return n === "number" ? l(r) ?? r : r;
71
- }, D = (e, t, n) => {
73
+ return n === "number" ? u(r) ?? r : r;
74
+ }, O = (e, t, n) => {
72
75
  if (Object.is(n, t)) return !0;
73
76
  let r = e.editor?.type;
74
- return typeof n != "string" || r === "select" || r === "checkbox" || r === "custom" ? !1 : n === E(e, t);
75
- }, O = (t, n, r, i) => t.map((t, a) => a === n ? e(t, r, i) : t);
77
+ return typeof n != "string" || r === "select" || r === "checkbox" || r === "custom" ? !1 : n === D(e, t);
78
+ }, k = (t, n, r, i) => t.map((t, a) => a === n ? e(t, r, i) : t);
76
79
  //#endregion
77
- export { d as isNumberInputPrefix, D as isUnchangedEditorCommit, a as normalizeNumberText, o as normalizeTypedDateText, T as parseCommittedValue, s as parseNumberText, w as resolveCellParser, S as toDateInputValue, E as toEditorStartText, l as toNumberInputText, O as writeRowsCell };
80
+ export { f as isNumberInputPrefix, O as isUnchangedEditorCommit, o as normalizeNumberText, s as normalizeTypedDateText, E as parseCommittedValue, c as parseNumberText, T as resolveCellParser, C as toDateInputValue, D as toEditorStartText, u as toNumberInputText, k as writeRowsCell };
@@ -1,3 +1,3 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs");var t=(e,t)=>e.includes(t)||e.includes(`"`)||e.includes(`
2
- `)||e.includes(`\r`)?`"${e.replace(/"/g,`""`)}"`:e,n=/^[=+\-@\t\r]/,r=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,i=e=>n.test(e)&&!r.test(e)?`'${e}`:e,a=(t,n)=>{let r=e.getCellValue(t,n);return n.formatClipboardValue?n.formatClipboardValue(r,t):String(r??``)},o=e=>e==null?``:String(e),s=e=>e==null?``:String(e),c=({getRow:e,startRow:n,endRow:r,columns:c,delimiter:l=`,`,includeHeaders:u=!0,bom:d=!1,escapeFormulas:f=!1,isRowIncluded:p,getLabelLine:m,totalLine:h,getGroupLine:g})=>{let _=[],v=e=>t(f?i(e):e,l);u&&_.push(c.map(e=>t(e.title||e.key,l)).join(l));for(let t=n;t<r;t+=1){let n=e(t);if(!n){let e=g?.(t);if(e){_.push(c.map((t,n)=>v(e.texts[n]??``)).join(l));continue}let n=m?.(t);n&&_.push(c.map((e,t)=>v(o(n[t]))).join(l));continue}if(p&&!p(n,t))continue;let r=c.map(e=>v(a(n,e)));_.push(r.join(l))}h&&_.push(c.map((e,t)=>v(s(h[t]))).join(l));let y=_.join(`\r
3
- `);return d?`\uFEFF${y}`:y};exports.escapeCsvFormula=i,exports.labelExportCellText=o,exports.serializeRowsToCsv=c,exports.totalExportCellText=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("./selectLabels.cjs");var n=(e,t)=>e.includes(t)||e.includes(`"`)||e.includes(`
2
+ `)||e.includes(`\r`)?`"${e.replace(/"/g,`""`)}"`:e,r=/^[=+\-@\t\r]/,i=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,a=e=>r.test(e)&&!i.test(e)?`'${e}`:e,o=(n,r)=>t.formatCellClipboardText(r,e.getCellValue(n,r),n),s=e=>e==null?``:String(e),c=e=>e==null?``:String(e),l=({getRow:e,startRow:t,endRow:r,columns:i,delimiter:l=`,`,includeHeaders:u=!0,bom:d=!1,escapeFormulas:f=!1,isRowIncluded:p,getLabelLine:m,totalLine:h,getGroupLine:g,pinnedTop:_,pinnedBottom:v,pinnedBottomAfterTotal:y})=>{let b=[],x=e=>n(f?a(e):e,l);u&&b.push(i.map(e=>n(e.title||e.key,l)).join(l));let S=e=>{for(let t of e??[])b.push(i.map(e=>x(o(t,e))).join(l))};S(_);for(let n=t;n<r;n+=1){let t=e(n);if(!t){let e=g?.(n);if(e){b.push(i.map((t,n)=>x(e.texts[n]??``)).join(l));continue}let t=m?.(n);t&&b.push(i.map((e,n)=>x(s(t[n]))).join(l));continue}if(p&&!p(t,n))continue;let r=i.map(e=>x(o(t,e)));b.push(r.join(l))}y!==!0&&S(v),h&&b.push(i.map((e,t)=>x(c(h[t]))).join(l)),y===!0&&S(v);let C=b.join(`\r
3
+ `);return d?`\uFEFF${C}`:C};exports.escapeCsvFormula=a,exports.labelExportCellText=s,exports.serializeRowsToCsv=l,exports.totalExportCellText=c;
@@ -14,8 +14,11 @@ export type SerializeRowsToCsvParams<T> = {
14
14
  getLabelLine?: (rowIndex: number) => LabelExportLine | undefined;
15
15
  totalLine?: ReadonlyArray<unknown>;
16
16
  getGroupLine?: (rowIndex: number) => GroupSubtotalLine | undefined;
17
+ pinnedTop?: readonly T[] | undefined;
18
+ pinnedBottom?: readonly T[] | undefined;
19
+ pinnedBottomAfterTotal?: boolean | undefined;
17
20
  };
18
21
  export type LabelExportLine = ReadonlyArray<string | number | null | undefined>;
19
22
  export declare const labelExportCellText: (value: string | number | null | undefined) => string;
20
23
  export declare const totalExportCellText: (value: unknown) => string;
21
- export declare const serializeRowsToCsv: <T>({ getRow, startRow, endRow, columns, delimiter, includeHeaders, bom, escapeFormulas, isRowIncluded, getLabelLine, totalLine, getGroupLine, }: SerializeRowsToCsvParams<T>) => string;
24
+ export declare const serializeRowsToCsv: <T>({ getRow, startRow, endRow, columns, delimiter, includeHeaders, bom, escapeFormulas, isRowIncluded, getLabelLine, totalLine, getGroupLine, pinnedTop, pinnedBottom, pinnedBottomAfterTotal, }: SerializeRowsToCsvParams<T>) => string;
@@ -1,30 +1,32 @@
1
1
  import { getCellValue as e } from "../utils/permissions.js";
2
+ import { formatCellClipboardText as t } from "./selectLabels.js";
2
3
  //#region src/logic/exportCsv.ts
3
- var t = (e, t) => e.includes(t) || e.includes("\"") || e.includes("\n") || e.includes("\r") ? `"${e.replace(/"/g, "\"\"")}"` : e, n = /^[=+\-@\t\r]/, r = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i, i = (e) => n.test(e) && !r.test(e) ? `'${e}` : e, a = (t, n) => {
4
- let r = e(t, n);
5
- return n.formatClipboardValue ? n.formatClipboardValue(r, t) : String(r ?? "");
6
- }, o = (e) => e == null ? "" : String(e), s = (e) => e == null ? "" : String(e), c = ({ getRow: e, startRow: n, endRow: r, columns: c, delimiter: l = ",", includeHeaders: u = !0, bom: d = !1, escapeFormulas: f = !1, isRowIncluded: p, getLabelLine: m, totalLine: h, getGroupLine: g }) => {
7
- let _ = [], v = (e) => t(f ? i(e) : e, l);
8
- u && _.push(c.map((e) => t(e.title || e.key, l)).join(l));
9
- for (let t = n; t < r; t += 1) {
10
- let n = e(t);
11
- if (!n) {
12
- let e = g?.(t);
4
+ var n = (e, t) => e.includes(t) || e.includes("\"") || e.includes("\n") || e.includes("\r") ? `"${e.replace(/"/g, "\"\"")}"` : e, r = /^[=+\-@\t\r]/, i = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i, a = (e) => r.test(e) && !i.test(e) ? `'${e}` : e, o = (n, r) => t(r, e(n, r), n), s = (e) => e == null ? "" : String(e), c = (e) => e == null ? "" : String(e), l = ({ getRow: e, startRow: t, endRow: r, columns: i, delimiter: l = ",", includeHeaders: u = !0, bom: d = !1, escapeFormulas: f = !1, isRowIncluded: p, getLabelLine: m, totalLine: h, getGroupLine: g, pinnedTop: _, pinnedBottom: v, pinnedBottomAfterTotal: y }) => {
5
+ let b = [], x = (e) => n(f ? a(e) : e, l);
6
+ u && b.push(i.map((e) => n(e.title || e.key, l)).join(l));
7
+ let S = (e) => {
8
+ for (let t of e ?? []) b.push(i.map((e) => x(o(t, e))).join(l));
9
+ };
10
+ S(_);
11
+ for (let n = t; n < r; n += 1) {
12
+ let t = e(n);
13
+ if (!t) {
14
+ let e = g?.(n);
13
15
  if (e) {
14
- _.push(c.map((t, n) => v(e.texts[n] ?? "")).join(l));
16
+ b.push(i.map((t, n) => x(e.texts[n] ?? "")).join(l));
15
17
  continue;
16
18
  }
17
- let n = m?.(t);
18
- n && _.push(c.map((e, t) => v(o(n[t]))).join(l));
19
+ let t = m?.(n);
20
+ t && b.push(i.map((e, n) => x(s(t[n]))).join(l));
19
21
  continue;
20
22
  }
21
- if (p && !p(n, t)) continue;
22
- let r = c.map((e) => v(a(n, e)));
23
- _.push(r.join(l));
23
+ if (p && !p(t, n)) continue;
24
+ let r = i.map((e) => x(o(t, e)));
25
+ b.push(r.join(l));
24
26
  }
25
- h && _.push(c.map((e, t) => v(s(h[t]))).join(l));
26
- let y = _.join("\r\n");
27
- return d ? `\uFEFF${y}` : y;
27
+ y !== !0 && S(v), h && b.push(i.map((e, t) => x(c(h[t]))).join(l)), y === !0 && S(v);
28
+ let C = b.join("\r\n");
29
+ return d ? `\uFEFF${C}` : C;
28
30
  };
29
31
  //#endregion
30
- export { i as escapeCsvFormula, o as labelExportCellText, c as serializeRowsToCsv, s as totalExportCellText };
32
+ export { a as escapeCsvFormula, s as labelExportCellText, l as serializeRowsToCsv, c as totalExportCellText };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("./exportCsv.cjs");var n=({getRow:n,startRow:r,endRow:i,columns:a,isRowIncluded:o,getLabelLine:s,totalLine:c,getGroupLine:l})=>{let u=a.map(e=>({key:e.key,title:e.title||e.key})),d=[],f=s||c||l?[]:void 0;for(let c=r;c<i;c+=1){let r=n(c);if(!r){let e=l?.(c);if(e){d.push(a.map((t,n)=>({value:e.values[n]??null,text:e.texts[n]??``}))),f?.push(`group`);continue}let n=s?.(c);n&&(d.push(a.map((e,r)=>{let i=n[r];return{value:i??null,text:t.labelExportCellText(i)}})),f?.push(`label`));continue}o&&!o(r,c)||(f?.push(`data`),d.push(a.map(t=>{let n=e.getCellValue(r,t);return{value:n,text:t.formatClipboardValue?t.formatClipboardValue(n,r):String(n??``)}})))}return c&&(d.push(a.map((e,n)=>{let r=c[n];return{value:r??null,text:t.totalExportCellText(r)}})),f?.push(`total`)),f?{columns:u,rows:d,rowKinds:f}:{columns:u,rows:d}};exports.buildGridExportData=n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("./selectLabels.cjs"),n=require("./exportCsv.cjs");var r=({getRow:r,startRow:i,endRow:a,columns:o,isRowIncluded:s,getLabelLine:c,totalLine:l,getGroupLine:u,pinnedTop:d,pinnedBottom:f,pinnedBottomAfterTotal:p})=>{let m=o.map(e=>({key:e.key,title:e.title||e.key})),h=[],g=c||l||u||d||f?[]:void 0,_=n=>o.map(r=>{let i=e.getCellValue(n,r);return{value:i,text:t.formatCellClipboardText(r,i,n)}}),v=e=>{for(let t of e??[])h.push(_(t)),g?.push(`pinned`)};v(d);for(let e=i;e<a;e+=1){let t=r(e);if(!t){let t=u?.(e);if(t){h.push(o.map((e,n)=>({value:t.values[n]??null,text:t.texts[n]??``}))),g?.push(`group`);continue}let r=c?.(e);r&&(h.push(o.map((e,t)=>{let i=r[t];return{value:i??null,text:n.labelExportCellText(i)}})),g?.push(`label`));continue}s&&!s(t,e)||(g?.push(`data`),h.push(_(t)))}return p!==!0&&v(f),l&&(h.push(o.map((e,t)=>{let r=l[t];return{value:r??null,text:n.totalExportCellText(r)}})),g?.push(`total`)),p===!0&&v(f),g?{columns:m,rows:h,rowKinds:g}:{columns:m,rows:h}};exports.buildGridExportData=r;
@@ -10,5 +10,8 @@ export type BuildGridExportDataParams<T> = {
10
10
  getLabelLine?: (rowIndex: number) => LabelExportLine | undefined;
11
11
  totalLine?: ReadonlyArray<unknown>;
12
12
  getGroupLine?: (rowIndex: number) => GroupSubtotalLine | undefined;
13
+ pinnedTop?: readonly T[] | undefined;
14
+ pinnedBottom?: readonly T[] | undefined;
15
+ pinnedBottomAfterTotal?: boolean | undefined;
13
16
  };
14
- export declare const buildGridExportData: <T>({ getRow, startRow, endRow, columns, isRowIncluded, getLabelLine, totalLine, getGroupLine, }: BuildGridExportDataParams<T>) => GridExportData;
17
+ export declare const buildGridExportData: <T>({ getRow, startRow, endRow, columns, isRowIncluded, getLabelLine, totalLine, getGroupLine, pinnedTop, pinnedBottom, pinnedBottomAfterTotal, }: BuildGridExportDataParams<T>) => GridExportData;
@@ -1,54 +1,58 @@
1
1
  import { getCellValue as e } from "../utils/permissions.js";
2
- import { labelExportCellText as t, totalExportCellText as n } from "./exportCsv.js";
2
+ import { formatCellClipboardText as t } from "./selectLabels.js";
3
+ import { labelExportCellText as n, totalExportCellText as r } from "./exportCsv.js";
3
4
  //#region src/logic/exportData.ts
4
- var r = ({ getRow: r, startRow: i, endRow: a, columns: o, isRowIncluded: s, getLabelLine: c, totalLine: l, getGroupLine: u }) => {
5
- let d = o.map((e) => ({
5
+ var i = ({ getRow: i, startRow: a, endRow: o, columns: s, isRowIncluded: c, getLabelLine: l, totalLine: u, getGroupLine: d, pinnedTop: f, pinnedBottom: p, pinnedBottomAfterTotal: m }) => {
6
+ let h = s.map((e) => ({
6
7
  key: e.key,
7
8
  title: e.title || e.key
8
- })), f = [], p = c || l || u ? [] : void 0;
9
- for (let n = i; n < a; n += 1) {
10
- let i = r(n);
11
- if (!i) {
12
- let e = u?.(n);
13
- if (e) {
14
- f.push(o.map((t, n) => ({
15
- value: e.values[n] ?? null,
16
- text: e.texts[n] ?? ""
17
- }))), p?.push("group");
9
+ })), g = [], _ = l || u || d || f || p ? [] : void 0, v = (n) => s.map((r) => {
10
+ let i = e(n, r);
11
+ return {
12
+ value: i,
13
+ text: t(r, i, n)
14
+ };
15
+ }), y = (e) => {
16
+ for (let t of e ?? []) g.push(v(t)), _?.push("pinned");
17
+ };
18
+ y(f);
19
+ for (let e = a; e < o; e += 1) {
20
+ let t = i(e);
21
+ if (!t) {
22
+ let t = d?.(e);
23
+ if (t) {
24
+ g.push(s.map((e, n) => ({
25
+ value: t.values[n] ?? null,
26
+ text: t.texts[n] ?? ""
27
+ }))), _?.push("group");
18
28
  continue;
19
29
  }
20
- let r = c?.(n);
21
- r && (f.push(o.map((e, n) => {
22
- let i = r[n];
30
+ let r = l?.(e);
31
+ r && (g.push(s.map((e, t) => {
32
+ let i = r[t];
23
33
  return {
24
34
  value: i ?? null,
25
- text: t(i)
35
+ text: n(i)
26
36
  };
27
- })), p?.push("label"));
37
+ })), _?.push("label"));
28
38
  continue;
29
39
  }
30
- s && !s(i, n) || (p?.push("data"), f.push(o.map((t) => {
31
- let n = e(i, t);
32
- return {
33
- value: n,
34
- text: t.formatClipboardValue ? t.formatClipboardValue(n, i) : String(n ?? "")
35
- };
36
- })));
40
+ c && !c(t, e) || (_?.push("data"), g.push(v(t)));
37
41
  }
38
- return l && (f.push(o.map((e, t) => {
39
- let r = l[t];
42
+ return m !== !0 && y(p), u && (g.push(s.map((e, t) => {
43
+ let n = u[t];
40
44
  return {
41
- value: r ?? null,
42
- text: n(r)
45
+ value: n ?? null,
46
+ text: r(n)
43
47
  };
44
- })), p?.push("total")), p ? {
45
- columns: d,
46
- rows: f,
47
- rowKinds: p
48
+ })), _?.push("total")), m === !0 && y(p), _ ? {
49
+ columns: h,
50
+ rows: g,
51
+ rowKinds: _
48
52
  } : {
49
- columns: d,
50
- rows: f
53
+ columns: h,
54
+ rows: g
51
55
  };
52
56
  };
53
57
  //#endregion
54
- export { r as buildGridExportData };
58
+ export { i as buildGridExportData };