@nocopypaste/vue-grid 0.2.0 → 0.3.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 (91) hide show
  1. package/AGENTS.md +70 -5
  2. package/CHANGELOG.md +39 -0
  3. package/README.md +198 -33
  4. package/agent/api.json +130 -13
  5. package/agent/api.md +26 -10
  6. package/agent/grid-config.schema.json +50 -5
  7. package/dist/agent/api.js +121 -13
  8. package/dist/agent/requirements.js +12 -3
  9. package/dist/agent/requirements.js.map +1 -1
  10. package/dist/agent/validate.js +6 -2
  11. package/dist/agent/validate.js.map +1 -1
  12. package/dist/base.css +1 -1
  13. package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js +498 -414
  14. package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  15. package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js +1 -1
  16. package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  17. package/dist/components/VGridCheckbox.vue_vue_type_script_setup_true_lang.js +7 -2
  18. package/dist/components/VGridCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  19. package/dist/components/VGridGroupCells.js +6 -0
  20. package/dist/components/VGridGroupCells.js.map +1 -0
  21. package/dist/components/VGridGroupCells.vue_vue_type_script_setup_true_lang.js +181 -0
  22. package/dist/components/VGridGroupCells.vue_vue_type_script_setup_true_lang.js.map +1 -0
  23. package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js +69 -56
  24. package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js.map +1 -1
  25. package/dist/components/VGridSelectionBanner.js +6 -0
  26. package/dist/components/VGridSelectionBanner.js.map +1 -0
  27. package/dist/components/VGridSelectionBanner.vue_vue_type_script_setup_true_lang.js +33 -0
  28. package/dist/components/VGridSelectionBanner.vue_vue_type_script_setup_true_lang.js.map +1 -0
  29. package/dist/composables/useGridExport.js +135 -0
  30. package/dist/composables/useGridExport.js.map +1 -0
  31. package/dist/composables/useGridKeyboard.js +5 -1
  32. package/dist/composables/useGridKeyboard.js.map +1 -1
  33. package/dist/composables/useGridMenus.js +21 -1
  34. package/dist/composables/useGridMenus.js.map +1 -1
  35. package/dist/composables/useGridSelection.js +113 -50
  36. package/dist/composables/useGridSelection.js.map +1 -1
  37. package/dist/composables/useRowGrouping.js +103 -0
  38. package/dist/composables/useRowGrouping.js.map +1 -0
  39. package/dist/composables/useVirtualRows.js +5 -5
  40. package/dist/composables/useVirtualRows.js.map +1 -1
  41. package/dist/core/csv.js +28 -0
  42. package/dist/core/csv.js.map +1 -0
  43. package/dist/core/grouping.js +66 -0
  44. package/dist/core/grouping.js.map +1 -0
  45. package/dist/core.css +1 -1
  46. package/dist/features/export.js +9 -0
  47. package/dist/features/export.js.map +1 -0
  48. package/dist/features/index.js +25 -21
  49. package/dist/features/index.js.map +1 -1
  50. package/dist/features/rowGrouping.js +11 -0
  51. package/dist/features/rowGrouping.js.map +1 -0
  52. package/dist/features/selection.js +5 -3
  53. package/dist/features/selection.js.map +1 -1
  54. package/dist/index.js +55 -51
  55. package/dist/internal/clipboard.js +8 -2
  56. package/dist/internal/clipboard.js.map +1 -1
  57. package/dist/internal/context.js.map +1 -1
  58. package/dist/internal/features.js.map +1 -1
  59. package/dist/renderers/index.js +94 -83
  60. package/dist/renderers/index.js.map +1 -1
  61. package/dist/renderers/plainText.js +34 -0
  62. package/dist/renderers/plainText.js.map +1 -0
  63. package/dist/theme.css +1 -1
  64. package/dist/types/agent/requirements.d.ts +1 -1
  65. package/dist/types/components/VGrid.vue.d.ts +42 -4
  66. package/dist/types/components/VGridCheckbox.vue.d.ts +2 -2
  67. package/dist/types/components/VGridGroupCells.vue.d.ts +14 -0
  68. package/dist/types/components/VGridMenu.vue.d.ts +2 -2
  69. package/dist/types/components/VGridPagination.vue.d.ts +1 -1
  70. package/dist/types/components/VGridSelectionBanner.vue.d.ts +18 -0
  71. package/dist/types/composables/useGridExport.d.ts +49 -0
  72. package/dist/types/composables/useGridMenus.d.ts +8 -0
  73. package/dist/types/composables/useGridSelection.d.ts +26 -2
  74. package/dist/types/composables/useRowGrouping.d.ts +50 -0
  75. package/dist/types/composables/useVirtualRows.d.ts +2 -0
  76. package/dist/types/core/csv.d.ts +25 -0
  77. package/dist/types/core/grouping.d.ts +51 -0
  78. package/dist/types/features/export.d.ts +8 -0
  79. package/dist/types/features/index.d.ts +3 -1
  80. package/dist/types/features/rowGrouping.d.ts +8 -0
  81. package/dist/types/features/selection.d.ts +3 -1
  82. package/dist/types/index.d.ts +2 -0
  83. package/dist/types/internal/clipboard.d.ts +5 -1
  84. package/dist/types/internal/context.d.ts +8 -1
  85. package/dist/types/internal/features.d.ts +3 -1
  86. package/dist/types/renderers/plainText.d.ts +17 -0
  87. package/dist/types/types.d.ts +81 -3
  88. package/dist/vue-grid.css +1 -1
  89. package/llms-full.txt +294 -48
  90. package/llms.txt +1 -1
  91. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["allFeatures","sortingFeature","filteringFeature","serverDataFeature","paginationFeature","selectionFeature","subGridsFeature","menusFeature","columnReorderFeature","columnPinningFeature","virtualScrollingFeature","columnVisibilityFeature","keyboardNavigationFeature","columnResizingFeature","columnGroupsFeature","rowPinningFeature","aggregationFeature"],"sources":["../../src/features/index.ts"],"sourcesContent":["import type { GridFeature } from '../types'\nimport { aggregationFeature } from './aggregation'\nimport { columnGroupsFeature } from './columnGroups'\nimport { columnPinningFeature } from './columnPinning'\nimport { columnResizingFeature } from './columnResizing'\nimport { columnReorderFeature } from './columnReorder'\nimport { columnVisibilityFeature } from './columnVisibility'\nimport { filteringFeature } from './filtering'\nimport { keyboardNavigationFeature } from './keyboardNavigation'\nimport { menusFeature } from './menus'\nimport { paginationFeature } from './pagination'\nimport { rowPinningFeature } from './rowPinning'\nimport { selectionFeature } from './selection'\nimport { serverDataFeature } from './serverData'\nimport { sortingFeature } from './sorting'\nimport { subGridsFeature } from './subGrids'\nimport { virtualScrollingFeature } from './virtualScrolling'\n\nexport {\n aggregationFeature,\n columnGroupsFeature,\n columnPinningFeature,\n columnReorderFeature,\n columnResizingFeature,\n columnVisibilityFeature,\n filteringFeature,\n keyboardNavigationFeature,\n menusFeature,\n paginationFeature,\n rowPinningFeature,\n selectionFeature,\n serverDataFeature,\n sortingFeature,\n subGridsFeature,\n virtualScrollingFeature,\n}\n\n/** Every built-in feature, for apps that want them all: `createVueGrid({ features: allFeatures })`. */\nexport const allFeatures: readonly GridFeature[] = [\n sortingFeature,\n filteringFeature,\n serverDataFeature,\n paginationFeature,\n selectionFeature,\n subGridsFeature,\n menusFeature,\n columnReorderFeature,\n columnPinningFeature,\n virtualScrollingFeature,\n columnVisibilityFeature,\n keyboardNavigationFeature,\n columnResizingFeature,\n columnGroupsFeature,\n rowPinningFeature,\n aggregationFeature,\n]\n"],"mappings":";;;;;;;;;;;;;;;;;AAsCA,IAAaA,IAAsC;CACjDC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;AACF"}
1
+ {"version":3,"file":"index.js","names":["allFeatures","sortingFeature","filteringFeature","serverDataFeature","paginationFeature","selectionFeature","subGridsFeature","menusFeature","columnReorderFeature","columnPinningFeature","virtualScrollingFeature","columnVisibilityFeature","keyboardNavigationFeature","columnResizingFeature","columnGroupsFeature","rowPinningFeature","aggregationFeature","rowGroupingFeature","exportFeature"],"sources":["../../src/features/index.ts"],"sourcesContent":["import type { GridFeature } from '../types'\nimport { aggregationFeature } from './aggregation'\nimport { columnGroupsFeature } from './columnGroups'\nimport { columnPinningFeature } from './columnPinning'\nimport { columnResizingFeature } from './columnResizing'\nimport { columnReorderFeature } from './columnReorder'\nimport { columnVisibilityFeature } from './columnVisibility'\nimport { exportFeature } from './export'\nimport { filteringFeature } from './filtering'\nimport { keyboardNavigationFeature } from './keyboardNavigation'\nimport { menusFeature } from './menus'\nimport { paginationFeature } from './pagination'\nimport { rowGroupingFeature } from './rowGrouping'\nimport { rowPinningFeature } from './rowPinning'\nimport { selectionFeature } from './selection'\nimport { serverDataFeature } from './serverData'\nimport { sortingFeature } from './sorting'\nimport { subGridsFeature } from './subGrids'\nimport { virtualScrollingFeature } from './virtualScrolling'\n\nexport {\n aggregationFeature,\n columnGroupsFeature,\n columnPinningFeature,\n columnReorderFeature,\n columnResizingFeature,\n columnVisibilityFeature,\n exportFeature,\n filteringFeature,\n keyboardNavigationFeature,\n menusFeature,\n paginationFeature,\n rowGroupingFeature,\n rowPinningFeature,\n selectionFeature,\n serverDataFeature,\n sortingFeature,\n subGridsFeature,\n virtualScrollingFeature,\n}\n\n/** Every built-in feature, for apps that want them all: `createVueGrid({ features: allFeatures })`. */\nexport const allFeatures: readonly GridFeature[] = [\n sortingFeature,\n filteringFeature,\n serverDataFeature,\n paginationFeature,\n selectionFeature,\n subGridsFeature,\n menusFeature,\n columnReorderFeature,\n columnPinningFeature,\n virtualScrollingFeature,\n columnVisibilityFeature,\n keyboardNavigationFeature,\n columnResizingFeature,\n columnGroupsFeature,\n rowPinningFeature,\n aggregationFeature,\n rowGroupingFeature,\n exportFeature,\n]\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA0CA,IAAaA,IAAsC;CACjDC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;CACAC;AACF"}
@@ -0,0 +1,11 @@
1
+ import e from "../components/VGridGroupCells.js";
2
+ import { useRowGrouping as t } from "../composables/useRowGrouping.js";
3
+ // src/features/rowGrouping.ts
4
+ var n = {
5
+ feature: "rowGrouping",
6
+ useRowGrouping: t,
7
+ GroupCells: e
8
+ };
9
+ export { n as rowGroupingFeature };
10
+
11
+ //# sourceMappingURL=rowGrouping.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rowGrouping.js","names":["VGridGroupCells","VGridGroupCells_default","rowGroupingFeature"],"sources":["../../src/features/rowGrouping.ts"],"sourcesContent":["import VGridGroupCells from '../components/VGridGroupCells.vue'\nimport { useRowGrouping } from '../composables/useRowGrouping'\nimport type { RowGroupingFeature } from '../types'\n\n/**\n * Row grouping: `v-model:group-by=\"['region', 'status']\"` groups the rows by those columns into\n * collapsible group rows with their value, row count and the aggregates of columns with an\n * `aggregate`. Columns with `groupable: true` get Group by / Ungroup items in the header menu.\n * Without it, `group-by` is ignored.\n */\nexport const rowGroupingFeature: RowGroupingFeature = { feature: 'rowGrouping', useRowGrouping, GroupCells: VGridGroupCells }\n"],"mappings":";;;AAUA,IAAaE,IAAyC;CAAE,SAAS;CAAe;CAAgB,YAAYF;AAAgB"}
@@ -1,11 +1,13 @@
1
1
  import e from "../components/VGridCheckbox.js";
2
2
  import { useGridSelection as t } from "../composables/useGridSelection.js";
3
+ import { defineAsyncComponent as n } from "vue";
3
4
  // src/features/selection.ts
4
- var n = {
5
+ var r = {
5
6
  feature: "selection",
6
7
  useSelection: t,
7
- Checkbox: e
8
+ Checkbox: e,
9
+ Banner: /*#__PURE__*/ n(() => import("../components/VGridSelectionBanner.js"))
8
10
  };
9
- export { n as selectionFeature };
11
+ export { r as selectionFeature };
10
12
 
11
13
  //# sourceMappingURL=selection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selection.js","names":["VGridCheckbox","VGridCheckbox_default","selectionFeature","useGridSelection"],"sources":["../../src/features/selection.ts"],"sourcesContent":["import VGridCheckbox from '../components/VGridCheckbox.vue'\nimport { useGridSelection } from '../composables/useGridSelection'\nimport type { SelectionFeature } from '../types'\n\n/**\n * Row selection: the `selectable` prop (multi or single), `v-model:selected`, `selection-mode`\n * (cascade through sub-grids), `is-row-selectable`, Space on a row and the select-all checkbox.\n */\nexport const selectionFeature: SelectionFeature = {\n feature: 'selection',\n useSelection: useGridSelection,\n Checkbox: VGridCheckbox,\n}\n"],"mappings":";;;AAQA,IAAaE,IAAqC;CAChD,SAAS;CACT,cAAcC;CACd,UAAUH;AACZ"}
1
+ {"version":3,"file":"selection.js","names":["VGridCheckbox","VGridCheckbox_default","selectionFeature","useGridSelection"],"sources":["../../src/features/selection.ts"],"sourcesContent":["import { defineAsyncComponent } from 'vue'\nimport VGridCheckbox from '../components/VGridCheckbox.vue'\nimport { useGridSelection } from '../composables/useGridSelection'\nimport type { SelectionFeature } from '../types'\n\n/**\n * Row selection: the `selectable` prop (multi or single), `v-model:selected`, `selection-mode`\n * (cascade through sub-grids), `is-row-selectable`, Space on a row, shift-click (or Shift+Space)\n * for a range, the select-all checkbox, `prune-selection`, and with server data a \"select all\n * N matching rows\" banner (`v-model:select-all-matching`; it loads on demand, its own chunk).\n */\nexport const selectionFeature: SelectionFeature = {\n feature: 'selection',\n useSelection: useGridSelection,\n Checkbox: VGridCheckbox,\n Banner: /*#__PURE__*/ defineAsyncComponent(() => import('../components/VGridSelectionBanner.vue')),\n}\n"],"mappings":";;;;AAWA,IAAaE,IAAqC;CAChD,SAAS;CACT,cAAcC;CACd,UAAUH;CACV,QAAsB,sBAA2B,OAAO,wCAAyC;AACnG"}
package/dist/index.js CHANGED
@@ -14,54 +14,58 @@ import { getByPath as N, getCellValue as P, resolveRowKey as F } from "./core/va
14
14
  import { effectivePin as I, moveColumn as L, moveColumnRelative as R, normalizeColumnState as z, setColumnHidden as B, setColumnPinned as V, visibleColumns as H } from "./core/columns.js";
15
15
  import { compareValues as U, nextSort as W, sortRows as G } from "./core/sort.js";
16
16
  import { aggregateRows as K, aggregateValues as q } from "./core/aggregate.js";
17
- import { patchRows as J } from "./core/patch.js";
18
- import { activeFilterCount as Y, emptyFilters as X, filterTree as Z, foldText as Q, isFilterActive as $, localFilterStorage as ee, matchesFilter as te, parseQuickFilter as ne, setKey as re } from "./core/filter.js";
19
- import { localStorageAdapter as ie } from "./core/storage.js";
20
- import { pageItems as ae } from "./core/pagination.js";
21
- import { createColumnHelper as oe } from "./core/helpers.js";
22
- import se from "./renderers/ActionButtonCell.js";
23
- import ce from "./renderers/ActionsMenuCell.js";
24
- import le from "./renderers/BooleanCell.js";
25
- import ue from "./renderers/ChangeCell.js";
26
- import de from "./renderers/CurrencyCell.js";
27
- import fe from "./renderers/DateCell.js";
28
- import pe from "./renderers/DateTimeCell.js";
29
- import me from "./renderers/IconCell.js";
30
- import he from "./renderers/JsonCell.js";
31
- import ge from "./renderers/JsonTreeCell.js";
32
- import _e from "./renderers/LinkCell.js";
33
- import ve from "./renderers/NumberCell.js";
34
- import ye from "./renderers/StatusCell.js";
35
- import be from "./renderers/ToggleTextCell.js";
36
- import xe from "./renderers/ButtonGroupCell.js";
37
- import Se from "./renderers/CheckboxCell.js";
38
- import Ce from "./renderers/ChipCell.js";
39
- import we from "./renderers/CodeCell.js";
40
- import Te from "./renderers/CopyCell.js";
41
- import Ee from "./renderers/DetailsCell.js";
42
- import De from "./renderers/EditCell.js";
43
- import Oe from "./renderers/IconToggleCell.js";
44
- import ke from "./renderers/ImageCell.js";
45
- import Ae from "./renderers/ListCell.js";
46
- import je from "./renderers/MultiLineCell.js";
47
- import Me from "./renderers/RadioCell.js";
48
- import Ne from "./renderers/SwitchCell.js";
49
- import { actionButtonRenderer as Pe, actionsMenuRenderer as Fe, allRenderers as Ie, booleanRenderer as Le, buttonGroupRenderer as Re, changeRenderer as ze, checkboxRenderer as Be, chipRenderer as Ve, codeRenderer as He, copyRenderer as Ue, currencyRenderer as We, dateRenderer as Ge, dateTimeRenderer as Ke, detailsRenderer as qe, editRenderer as Je, iconRenderer as Ye, iconToggleRenderer as Xe, imageRenderer as Ze, jsonRenderer as Qe, jsonTreeRenderer as $e, linkRenderer as et, listRenderer as tt, multiLineRenderer as nt, numberRenderer as rt, radioRenderer as it, signedNumberRenderer as at, statusRenderer as ot, switchRenderer as st, toggleTextRenderer as ct } from "./renderers/index.js";
50
- import { aggregationFeature as lt } from "./features/aggregation.js";
51
- import { columnGroupsFeature as ut } from "./features/columnGroups.js";
52
- import { columnPinningFeature as dt } from "./features/columnPinning.js";
53
- import { columnResizingFeature as ft } from "./features/columnResizing.js";
54
- import { columnReorderFeature as pt } from "./features/columnReorder.js";
55
- import { columnVisibilityFeature as mt } from "./features/columnVisibility.js";
56
- import { filteringFeature as ht } from "./features/filtering.js";
57
- import { keyboardNavigationFeature as gt } from "./features/keyboardNavigation.js";
58
- import { menusFeature as _t } from "./features/menus.js";
59
- import { paginationFeature as vt } from "./features/pagination.js";
60
- import { rowPinningFeature as yt } from "./features/rowPinning.js";
61
- import { selectionFeature as bt } from "./features/selection.js";
62
- import { serverDataFeature as xt } from "./features/serverData.js";
63
- import { sortingFeature as St } from "./features/sorting.js";
64
- import { subGridsFeature as Ct } from "./features/subGrids.js";
65
- import { virtualScrollingFeature as wt } from "./features/virtualScrolling.js";
66
- import { allFeatures as Tt } from "./features/index.js";
67
- export { se as ActionButtonCell, ce as ActionsMenuCell, le as BooleanCell, xe as ButtonGroupCell, ue as ChangeCell, Se as CheckboxCell, Ce as ChipCell, we as CodeCell, Te as CopyCell, de as CurrencyCell, d as DATE_DEFAULT, fe as DateCell, pe as DateTimeCell, Ee as DetailsCell, De as EditCell, D as GRID_CONFIG_KEY, me as IconCell, Oe as IconToggleCell, ke as ImageCell, he as JsonCell, ge as JsonTreeCell, _e as LinkCell, Ae as ListCell, je as MultiLineCell, ve as NumberCell, Me as RadioCell, ye as StatusCell, Ne as SwitchCell, f as TIME_DEFAULT, l as TextCell, be as ToggleTextCell, e as VGrid, n as VGridColumnMenu, r as VGridMenu, t as VGridPagination, i as VGridSearch, Pe as actionButtonRenderer, Fe as actionsMenuRenderer, Y as activeFilterCount, K as aggregateRows, q as aggregateValues, lt as aggregationFeature, Tt as allFeatures, Ie as allRenderers, T as anchorNameFor, Le as booleanRenderer, Re as buttonGroupRenderer, ze as changeRenderer, Be as checkboxRenderer, Ve as chipRenderer, He as codeRenderer, ut as columnGroupsFeature, dt as columnPinningFeature, pt as columnReorderFeature, ft as columnResizingFeature, mt as columnVisibilityFeature, U as compareValues, Ue as copyRenderer, oe as createColumnHelper, A as createRendererRegistry, O as createVueGrid, We as currencyRenderer, Ge as dateRenderer, Ke as dateTimeRenderer, j as defineCellRenderer, qe as detailsRenderer, Je as editRenderer, I as effectivePin, X as emptyFilters, Z as filterTree, ht as filteringFeature, Q as foldText, p as formatCurrency, m as formatDate, h as formatNumber, g as formatSigned, N as getByPath, P as getCellValue, Ye as iconRenderer, Xe as iconToggleRenderer, Ze as imageRenderer, $ as isFilterActive, M as isRendererDefinition, Qe as jsonRenderer, $e as jsonTreeRenderer, gt as keyboardNavigationFeature, et as linkRenderer, tt as listRenderer, ee as localFilterStorage, ie as localStorageAdapter, a as lookup, te as matchesFilter, _t as menusFeature, L as moveColumn, R as moveColumnRelative, nt as multiLineRenderer, W as nextSort, z as normalizeColumnState, rt as numberRenderer, ae as pageItems, vt as paginationFeature, _ as parseJsonish, ne as parseQuickFilter, J as patchRows, it as radioRenderer, v as readableTextColor, y as resolveImageSrc, o as resolveOption, F as resolveRowKey, s as resolveTone, yt as rowPinningFeature, b as safeHref, c as safeTone, bt as selectionFeature, xt as serverDataFeature, B as setColumnHidden, V as setColumnPinned, re as setKey, at as signedNumberRenderer, G as sortRows, St as sortingFeature, ot as statusRenderer, x as stringifyJson, Ct as subGridsFeature, E as supportsAnchorPositioning, st as switchRenderer, u as textRenderer, S as toDate, C as toNumber, ct as toggleTextRenderer, w as tokenizeJson, k as useGridContext, wt as virtualScrollingFeature, H as visibleColumns };
17
+ import { groupRows as J, isRowGroup as Y } from "./core/grouping.js";
18
+ import { guardFormula as X, plainText as Z, toCsv as Q, toDelimited as $ } from "./core/csv.js";
19
+ import { patchRows as ee } from "./core/patch.js";
20
+ import { activeFilterCount as te, emptyFilters as ne, filterTree as re, foldText as ie, isFilterActive as ae, localFilterStorage as oe, matchesFilter as se, parseQuickFilter as ce, setKey as le } from "./core/filter.js";
21
+ import { localStorageAdapter as ue } from "./core/storage.js";
22
+ import { pageItems as de } from "./core/pagination.js";
23
+ import { createColumnHelper as fe } from "./core/helpers.js";
24
+ import pe from "./renderers/ActionButtonCell.js";
25
+ import me from "./renderers/ActionsMenuCell.js";
26
+ import he from "./renderers/BooleanCell.js";
27
+ import ge from "./renderers/ChangeCell.js";
28
+ import _e from "./renderers/CurrencyCell.js";
29
+ import ve from "./renderers/DateCell.js";
30
+ import ye from "./renderers/DateTimeCell.js";
31
+ import be from "./renderers/IconCell.js";
32
+ import xe from "./renderers/JsonCell.js";
33
+ import Se from "./renderers/JsonTreeCell.js";
34
+ import Ce from "./renderers/LinkCell.js";
35
+ import we from "./renderers/NumberCell.js";
36
+ import Te from "./renderers/StatusCell.js";
37
+ import Ee from "./renderers/ToggleTextCell.js";
38
+ import De from "./renderers/ButtonGroupCell.js";
39
+ import Oe from "./renderers/CheckboxCell.js";
40
+ import ke from "./renderers/ChipCell.js";
41
+ import Ae from "./renderers/CodeCell.js";
42
+ import je from "./renderers/CopyCell.js";
43
+ import Me from "./renderers/DetailsCell.js";
44
+ import Ne from "./renderers/EditCell.js";
45
+ import Pe from "./renderers/IconToggleCell.js";
46
+ import Fe from "./renderers/ImageCell.js";
47
+ import Ie from "./renderers/ListCell.js";
48
+ import Le from "./renderers/MultiLineCell.js";
49
+ import Re from "./renderers/RadioCell.js";
50
+ import ze from "./renderers/SwitchCell.js";
51
+ import { actionButtonRenderer as Be, actionsMenuRenderer as Ve, allRenderers as He, booleanRenderer as Ue, buttonGroupRenderer as We, changeRenderer as Ge, checkboxRenderer as Ke, chipRenderer as qe, codeRenderer as Je, copyRenderer as Ye, currencyRenderer as Xe, dateRenderer as Ze, dateTimeRenderer as Qe, detailsRenderer as $e, editRenderer as et, iconRenderer as tt, iconToggleRenderer as nt, imageRenderer as rt, jsonRenderer as it, jsonTreeRenderer as at, linkRenderer as ot, listRenderer as st, multiLineRenderer as ct, numberRenderer as lt, radioRenderer as ut, signedNumberRenderer as dt, statusRenderer as ft, switchRenderer as pt, toggleTextRenderer as mt } from "./renderers/index.js";
52
+ import { aggregationFeature as ht } from "./features/aggregation.js";
53
+ import { columnGroupsFeature as gt } from "./features/columnGroups.js";
54
+ import { columnPinningFeature as _t } from "./features/columnPinning.js";
55
+ import { columnResizingFeature as vt } from "./features/columnResizing.js";
56
+ import { columnReorderFeature as yt } from "./features/columnReorder.js";
57
+ import { columnVisibilityFeature as bt } from "./features/columnVisibility.js";
58
+ import { exportFeature as xt } from "./features/export.js";
59
+ import { filteringFeature as St } from "./features/filtering.js";
60
+ import { keyboardNavigationFeature as Ct } from "./features/keyboardNavigation.js";
61
+ import { menusFeature as wt } from "./features/menus.js";
62
+ import { paginationFeature as Tt } from "./features/pagination.js";
63
+ import { rowGroupingFeature as Et } from "./features/rowGrouping.js";
64
+ import { rowPinningFeature as Dt } from "./features/rowPinning.js";
65
+ import { selectionFeature as Ot } from "./features/selection.js";
66
+ import { serverDataFeature as kt } from "./features/serverData.js";
67
+ import { sortingFeature as At } from "./features/sorting.js";
68
+ import { subGridsFeature as jt } from "./features/subGrids.js";
69
+ import { virtualScrollingFeature as Mt } from "./features/virtualScrolling.js";
70
+ import { allFeatures as Nt } from "./features/index.js";
71
+ export { pe as ActionButtonCell, me as ActionsMenuCell, he as BooleanCell, De as ButtonGroupCell, ge as ChangeCell, Oe as CheckboxCell, ke as ChipCell, Ae as CodeCell, je as CopyCell, _e as CurrencyCell, d as DATE_DEFAULT, ve as DateCell, ye as DateTimeCell, Me as DetailsCell, Ne as EditCell, D as GRID_CONFIG_KEY, be as IconCell, Pe as IconToggleCell, Fe as ImageCell, xe as JsonCell, Se as JsonTreeCell, Ce as LinkCell, Ie as ListCell, Le as MultiLineCell, we as NumberCell, Re as RadioCell, Te as StatusCell, ze as SwitchCell, f as TIME_DEFAULT, l as TextCell, Ee as ToggleTextCell, e as VGrid, n as VGridColumnMenu, r as VGridMenu, t as VGridPagination, i as VGridSearch, Be as actionButtonRenderer, Ve as actionsMenuRenderer, te as activeFilterCount, K as aggregateRows, q as aggregateValues, ht as aggregationFeature, Nt as allFeatures, He as allRenderers, T as anchorNameFor, Ue as booleanRenderer, We as buttonGroupRenderer, Ge as changeRenderer, Ke as checkboxRenderer, qe as chipRenderer, Je as codeRenderer, gt as columnGroupsFeature, _t as columnPinningFeature, yt as columnReorderFeature, vt as columnResizingFeature, bt as columnVisibilityFeature, U as compareValues, Ye as copyRenderer, fe as createColumnHelper, A as createRendererRegistry, O as createVueGrid, Xe as currencyRenderer, Ze as dateRenderer, Qe as dateTimeRenderer, j as defineCellRenderer, $e as detailsRenderer, et as editRenderer, I as effectivePin, ne as emptyFilters, xt as exportFeature, re as filterTree, St as filteringFeature, ie as foldText, p as formatCurrency, m as formatDate, h as formatNumber, g as formatSigned, N as getByPath, P as getCellValue, J as groupRows, X as guardFormula, tt as iconRenderer, nt as iconToggleRenderer, rt as imageRenderer, ae as isFilterActive, M as isRendererDefinition, Y as isRowGroup, it as jsonRenderer, at as jsonTreeRenderer, Ct as keyboardNavigationFeature, ot as linkRenderer, st as listRenderer, oe as localFilterStorage, ue as localStorageAdapter, a as lookup, se as matchesFilter, wt as menusFeature, L as moveColumn, R as moveColumnRelative, ct as multiLineRenderer, W as nextSort, z as normalizeColumnState, lt as numberRenderer, de as pageItems, Tt as paginationFeature, _ as parseJsonish, ce as parseQuickFilter, ee as patchRows, Z as plainText, ut as radioRenderer, v as readableTextColor, y as resolveImageSrc, o as resolveOption, F as resolveRowKey, s as resolveTone, Et as rowGroupingFeature, Dt as rowPinningFeature, b as safeHref, c as safeTone, Ot as selectionFeature, kt as serverDataFeature, B as setColumnHidden, V as setColumnPinned, le as setKey, dt as signedNumberRenderer, G as sortRows, At as sortingFeature, ft as statusRenderer, x as stringifyJson, jt as subGridsFeature, E as supportsAnchorPositioning, pt as switchRenderer, u as textRenderer, Q as toCsv, S as toDate, $ as toDelimited, C as toNumber, mt as toggleTextRenderer, w as tokenizeJson, k as useGridContext, Mt as virtualScrollingFeature, H as visibleColumns };
@@ -1,9 +1,15 @@
1
1
  // src/internal/clipboard.ts
2
2
  async function e(e) {
3
3
  try {
4
- return globalThis.navigator?.clipboard?.writeText ? (await navigator.clipboard.writeText(e), !0) : !1;
4
+ return await navigator.clipboard.writeText(e), !0;
5
5
  } catch {
6
- return !1;
6
+ let t = document.activeElement, n = document.createElement("textarea");
7
+ n.value = e, n.style.cssText = "position:fixed;top:0;opacity:0", document.body.append(n), n.focus({ preventScroll: !0 }), n.select();
8
+ let r = !1;
9
+ try {
10
+ r = document.execCommand("copy");
11
+ } catch {}
12
+ return n.remove(), t?.focus({ preventScroll: !0 }), r;
7
13
  }
8
14
  }
9
15
  export { e as copyText };
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.js","names":["copyText","text"],"sources":["../../src/internal/clipboard.ts"],"sourcesContent":["/** Writes text to the clipboard. Resolves `false` when the Clipboard API is unavailable or denied. */\nexport async function copyText(text: string): Promise<boolean> {\n try {\n if (!globalThis.navigator?.clipboard?.writeText) return false\n await navigator.clipboard.writeText(text)\n return true\n } catch {\n return false\n }\n}\n"],"mappings":";AACA,eAAsBA,EAAS,GAAgC;CAC7D,IAAI;EAGF,OAFK,WAAW,WAAW,WAAW,aACtC,MAAM,UAAU,UAAU,UAAUC,CAAI,GACjC,MAFiD;CAG1D,QAAQ;EACN,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"clipboard.js","names":["copyText","text","active","area","ok"],"sources":["../../src/internal/clipboard.ts"],"sourcesContent":["/**\n * Writes text to the clipboard. Uses the Clipboard API, and falls back to `execCommand('copy')`\n * where that API is missing or refused (pages served over plain http, browsers that deny it\n * without a permission). Resolves `false` when neither worked.\n */\nexport async function copyText(text: string): Promise<boolean> {\n try {\n await navigator.clipboard.writeText(text)\n return true\n } catch {\n // missing or refused: copy through a hidden textarea, then give focus back\n const active = document.activeElement as HTMLElement | null\n const area = document.createElement('textarea')\n area.value = text\n area.style.cssText = 'position:fixed;top:0;opacity:0'\n document.body.append(area)\n area.focus({ preventScroll: true })\n area.select()\n let ok = false\n try {\n ok = document.execCommand('copy')\n } catch {\n // unsupported\n }\n area.remove()\n active?.focus({ preventScroll: true })\n return ok\n }\n}\n"],"mappings":";AAKA,eAAsBA,EAAS,GAAgC;CAC7D,IAAI;EAEF,OADA,MAAM,UAAU,UAAU,UAAUC,CAAI,GACjC;CACT,QAAQ;EAEN,IAAMC,IAAS,SAAS,eAClBC,IAAO,SAAS,cAAc,UAAU;EAK9C,AAJA,EAAK,QAAQF,GACb,EAAK,MAAM,UAAU,kCACrB,SAAS,KAAK,OAAOE,CAAI,GACzBA,EAAK,MAAM,EAAE,eAAe,GAAK,CAAC,GAClCA,EAAK,OAAO;EACZ,IAAIC,IAAK;EACT,IAAI;GACF,IAAK,SAAS,YAAY,MAAM;EAClC,QAAQ,CAER;EAGA,OAFAD,EAAK,OAAO,GACZD,GAAQ,MAAM,EAAE,eAAe,GAAK,CAAC,GAC9BE;CACT;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","names":["SELECT_COLUMN_KEY","GRID_CONTEXT_KEY","useInternalGrid","ctx","inject"],"sources":["../../src/internal/context.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any -- rows are an opaque, type-erased T inside the grid internals; the public <VGrid generic=\"T\"> API stays fully typed. */\nimport { inject, type Component, type ComputedRef, type InjectionKey, type Slots } from 'vue'\nimport type { Align, CellRendererDefinition, ClassValue, ColumnDef, FlashMode, GridPart, RowKey } from '../types'\nimport type { ColumnFilter, FilterState, FilterType } from '../core/filter'\nimport type { SelectionSummary } from '../core/selection'\nimport type { SubRowEntry } from '../composables/useSubRows'\nimport type { DistinctValue } from '../composables/useGridFilters'\nimport type { VirtualRowsContext } from '../composables/useVirtualRows'\n\nexport const SELECT_COLUMN_KEY = '__vg_select'\n\n/** A visible column with everything the cells need precomputed. */\nexport interface ResolvedColumn {\n key: string\n kind: 'data' | 'select'\n def: ColumnDef\n component: Component | undefined\n definition: CellRendererDefinition | undefined\n options: Record<string, unknown>\n align: Align\n pinned: 'left' | 'right' | undefined\n /** Last left-pinned or first right-pinned column. Only set where CSS `:has()` is unsupported. */\n pinEdge: boolean\n /** First data column — hosts the expander and the depth indent. */\n isTree: boolean\n}\n\nexport interface GridContext {\n columns: ComputedRef<ResolvedColumn[]>\n slots: Slots\n ui: ComputedRef<Partial<Record<GridPart, ClassValue>>>\n getKey(row: any): RowKey\n /**\n * Keyboard navigation (ARIA grid) is on: cells are `gridcell`s and the grid's own controls are\n * `tabindex=\"-1\"` (reached with the arrow keys). Off: an ARIA `table` with tabbable controls.\n */\n keyboardNav: boolean\n /** `gridcell` or `cell`, by `keyboardNav`. */\n cellRole: 'gridcell' | 'cell'\n /** Tabindex for the grid's own controls and cells: `-1` with keyboard navigation, else none. */\n rovingTabindex: -1 | undefined\n /** Filters (client mode) and sorts one level of rows. */\n sortRows(rows: readonly any[]): any[]\n /** The sorting feature is on and the column is `sortable`. */\n sortable(col: ColumnDef): boolean\n /** Only with the column resizing feature. */\n resize?: {\n /** The header edge grip component. */\n Handle: Component\n can(col: ColumnDef): boolean\n start(event: PointerEvent, key: string): void\n autosize(key: string): void\n step(key: string, delta: number): void\n /** Has a resized width (or is being resized): its cells clip their content. */\n isSized(key: string): boolean\n }\n /** Header rows above the body (2 with column groups). */\n headerRows: ComputedRef<number>\n /** Pinned rows (and a totals row) above the body: offsets the body's `aria-rowindex`. */\n pinnedTopCount: ComputedRef<number>\n /** Aggregation feature with a totals row: the values by column key, and the row's label. */\n totals?: {\n values: ComputedRef<Record<string, unknown>>\n label: ComputedRef<string>\n }\n // expansion\n treeMode: ComputedRef<boolean>\n hasDetail: ComputedRef<boolean>\n canExpand(row: any): boolean\n isExpanded(key: RowKey): boolean\n toggleExpanded(row: any): void\n children(row: any): any[] | undefined\n subRowState(row: any): SubRowEntry | undefined\n ensureSubRows(row: any): void\n retrySubRows(row: any): void\n // selection\n selectMode: ComputedRef<false | 'multi' | 'single'>\n /** The selection checkbox (from the selection feature; only rendered when `selectMode` is set). */\n Checkbox: Component | undefined\n isRowSelectable(row: any): boolean\n rowCheckState(row: any): SelectionSummary\n toggleRow(row: any): void\n // presentation & events\n isHighlighted(key: RowKey): boolean\n rowClass(row: any, index: number): ClassValue\n rowClickable: ComputedRef<boolean>\n /** Grid-wide change highlight (columns may override with `flash`). */\n flash: ComputedRef<FlashMode>\n /** Only with the filtering feature. */\n filters?: {\n FilterButton: Component\n FilterInput: Component\n state: ComputedRef<FilterState>\n setSearch(search: string): void\n setColumnFilter(key: string, filter: ColumnFilter | undefined): void\n isActive(key: string): boolean\n typeOf(col: ColumnDef): FilterType | 'custom'\n /** Show the filter row (inputs inside the header cells). */\n filterRow: ComputedRef<boolean>\n /** Distinct values of a column, for its value-list filter. */\n distinct(key: string): DistinctValue[]\n /** DOM id of a column's filter popover. */\n idFor(key: string): string\n /** Opens a column's filter popover (header menu, filter row). */\n open(key: string): void\n }\n virtual: ComputedRef<boolean>\n /** With the virtual scrolling feature: windowing of each level of rows, and measuring. */\n virtualRows?: VirtualRowsContext\n pinStyle(key: string): Record<string, string> | undefined\n onRowClick(row: any, key: RowKey, event: MouseEvent | KeyboardEvent): void\n onCellClick(row: any, key: RowKey, column: ResolvedColumn, event: MouseEvent | KeyboardEvent): void\n onCellAction(row: any, key: RowKey, column: ResolvedColumn, name: string, payload: unknown): void\n onCellContextMenu(row: any, key: RowKey, column: ResolvedColumn, event: MouseEvent, el: HTMLElement): void\n onHeaderContextMenu(column: ResolvedColumn, event: MouseEvent, el: HTMLElement): void\n /** Menus feature: a `pointerdown` on a body cell (touch: hold for its menu). */\n onCellPointerDown?(row: any, key: RowKey, column: ResolvedColumn, event: PointerEvent, el: HTMLElement): void\n}\n\n/** A row in a pinned section: a pinned data row, or the totals row. */\nexport interface PinnedRowItem {\n /** Unique within the grid's pinned rows. */\n id: string\n kind: 'row' | 'total'\n row: any\n key: RowKey\n /** Shows the selection checkbox (pinned rows of the data, not the app's extra rows). */\n selectable: boolean\n}\n\nexport const GRID_CONTEXT_KEY: InjectionKey<GridContext> = Symbol('vue-grid:context')\n\nexport function useInternalGrid(): GridContext {\n const ctx = inject(GRID_CONTEXT_KEY)\n if (!ctx) throw new Error('[vue-grid] internal component used outside <VGrid>')\n return ctx\n}\n"],"mappings":";;AASA,IAAaA,IAAoB,eAyHpBC,IAA8C,OAAO,kBAAkB;AAEpF,SAAgBC,IAA+B;CAC7C,IAAMC,IAAMC,EAAOH,CAAgB;CACnC,IAAI,CAACE,GAAK,MAAU,MAAM,oDAAoD;CAC9E,OAAOA;AACT"}
1
+ {"version":3,"file":"context.js","names":["SELECT_COLUMN_KEY","GRID_CONTEXT_KEY","useInternalGrid","ctx","inject"],"sources":["../../src/internal/context.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any -- rows are an opaque, type-erased T inside the grid internals; the public <VGrid generic=\"T\"> API stays fully typed. */\nimport { inject, type Component, type ComputedRef, type InjectionKey, type Slots } from 'vue'\nimport type { Align, CellRendererDefinition, ClassValue, ColumnDef, FlashMode, GridPart, RowKey } from '../types'\nimport type { ColumnFilter, FilterState, FilterType } from '../core/filter'\nimport type { SelectionSummary } from '../core/selection'\nimport type { SubRowEntry } from '../composables/useSubRows'\nimport type { DistinctValue } from '../composables/useGridFilters'\nimport type { VirtualRowsContext } from '../composables/useVirtualRows'\n\nexport const SELECT_COLUMN_KEY = '__vg_select'\n\n/** A visible column with everything the cells need precomputed. */\nexport interface ResolvedColumn {\n key: string\n kind: 'data' | 'select'\n def: ColumnDef\n component: Component | undefined\n definition: CellRendererDefinition | undefined\n options: Record<string, unknown>\n align: Align\n pinned: 'left' | 'right' | undefined\n /** Last left-pinned or first right-pinned column. Only set where CSS `:has()` is unsupported. */\n pinEdge: boolean\n /** First data column — hosts the expander and the depth indent. */\n isTree: boolean\n}\n\nexport interface GridContext {\n columns: ComputedRef<ResolvedColumn[]>\n slots: Slots\n ui: ComputedRef<Partial<Record<GridPart, ClassValue>>>\n getKey(row: any): RowKey\n /**\n * Keyboard navigation (ARIA grid) is on: cells are `gridcell`s and the grid's own controls are\n * `tabindex=\"-1\"` (reached with the arrow keys). Off: an ARIA `table` with tabbable controls.\n */\n keyboardNav: boolean\n /** `gridcell` or `cell`, by `keyboardNav`. */\n cellRole: 'gridcell' | 'cell'\n /** Tabindex for the grid's own controls and cells: `-1` with keyboard navigation, else none. */\n rovingTabindex: -1 | undefined\n /** Filters (client mode) and sorts one level of rows. */\n sortRows(rows: readonly any[]): any[]\n /** The sorting feature is on and the column is `sortable`. */\n sortable(col: ColumnDef): boolean\n /** Only with the column resizing feature. */\n resize?: {\n /** The header edge grip component. */\n Handle: Component\n can(col: ColumnDef): boolean\n start(event: PointerEvent, key: string): void\n autosize(key: string): void\n step(key: string, delta: number): void\n /** Has a resized width (or is being resized): its cells clip their content. */\n isSized(key: string): boolean\n }\n /** Header rows above the body (2 with column groups). */\n headerRows: ComputedRef<number>\n /** Pinned rows (and a totals row) above the body: offsets the body's `aria-rowindex`. */\n pinnedTopCount: ComputedRef<number>\n /** Aggregation feature with a totals row: the values by column key, and the row's label. */\n totals?: {\n values: ComputedRef<Record<string, unknown>>\n label: ComputedRef<string>\n }\n /** Row grouping feature, with rows grouped: renders the cells of group rows. */\n grouping?: { GroupCells: Component; isGroup(row: any): boolean }\n // expansion\n /** Rows nest (sub-grids, or grouped rows): the first column has the expander gutter. */\n treeMode: ComputedRef<boolean>\n hasDetail: ComputedRef<boolean>\n canExpand(row: any): boolean\n isExpanded(key: RowKey): boolean\n toggleExpanded(row: any): void\n children(row: any): any[] | undefined\n subRowState(row: any): SubRowEntry | undefined\n ensureSubRows(row: any): void\n retrySubRows(row: any): void\n // selection\n selectMode: ComputedRef<false | 'multi' | 'single'>\n /** The selection checkbox (from the selection feature; only rendered when `selectMode` is set). */\n Checkbox: Component | undefined\n isRowSelectable(row: any): boolean\n rowCheckState(row: any): SelectionSummary\n /** `range`: Shift was held — select from the last toggled row to this one. */\n toggleRow(row: any, range?: boolean): void\n // presentation & events\n isHighlighted(key: RowKey): boolean\n rowClass(row: any, index: number): ClassValue\n rowClickable: ComputedRef<boolean>\n /** Grid-wide change highlight (columns may override with `flash`). */\n flash: ComputedRef<FlashMode>\n /** Only with the filtering feature. */\n filters?: {\n FilterButton: Component\n FilterInput: Component\n state: ComputedRef<FilterState>\n setSearch(search: string): void\n setColumnFilter(key: string, filter: ColumnFilter | undefined): void\n isActive(key: string): boolean\n typeOf(col: ColumnDef): FilterType | 'custom'\n /** Show the filter row (inputs inside the header cells). */\n filterRow: ComputedRef<boolean>\n /** Distinct values of a column, for its value-list filter. */\n distinct(key: string): DistinctValue[]\n /** DOM id of a column's filter popover. */\n idFor(key: string): string\n /** Opens a column's filter popover (header menu, filter row). */\n open(key: string): void\n }\n virtual: ComputedRef<boolean>\n /** With the virtual scrolling feature: windowing of each level of rows, and measuring. */\n virtualRows?: VirtualRowsContext\n pinStyle(key: string): Record<string, string> | undefined\n onRowClick(row: any, key: RowKey, event: MouseEvent | KeyboardEvent): void\n onCellClick(row: any, key: RowKey, column: ResolvedColumn, event: MouseEvent | KeyboardEvent): void\n onCellAction(row: any, key: RowKey, column: ResolvedColumn, name: string, payload: unknown): void\n onCellContextMenu(row: any, key: RowKey, column: ResolvedColumn, event: MouseEvent, el: HTMLElement): void\n onHeaderContextMenu(column: ResolvedColumn, event: MouseEvent, el: HTMLElement): void\n /** Menus feature: a `pointerdown` on a body cell (touch: hold for its menu). */\n onCellPointerDown?(row: any, key: RowKey, column: ResolvedColumn, event: PointerEvent, el: HTMLElement): void\n}\n\n/** A row in a pinned section: a pinned data row, or the totals row. */\nexport interface PinnedRowItem {\n /** Unique within the grid's pinned rows. */\n id: string\n kind: 'row' | 'total'\n row: any\n key: RowKey\n /** Shows the selection checkbox (pinned rows of the data, not the app's extra rows). */\n selectable: boolean\n}\n\nexport const GRID_CONTEXT_KEY: InjectionKey<GridContext> = Symbol('vue-grid:context')\n\nexport function useInternalGrid(): GridContext {\n const ctx = inject(GRID_CONTEXT_KEY)\n if (!ctx) throw new Error('[vue-grid] internal component used outside <VGrid>')\n return ctx\n}\n"],"mappings":";;AASA,IAAaA,IAAoB,eA6HpBC,IAA8C,OAAO,kBAAkB;AAEpF,SAAgBC,IAA+B;CAC7C,IAAMC,IAAMC,EAAOH,CAAgB;CACnC,IAAI,CAACE,GAAK,MAAU,MAAM,oDAAoD;CAC9E,OAAOA;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"features.js","names":["resolveFeatures","lists","set","list","f"],"sources":["../../src/internal/features.ts"],"sourcesContent":["import type {\n AggregationFeature,\n RowPinningFeature,\n ColumnGroupsFeature,\n ColumnPinningFeature,\n ColumnResizingFeature,\n ColumnReorderFeature,\n ColumnVisibilityFeature,\n FilteringFeature,\n KeyboardNavigationFeature,\n GridFeature,\n MenusFeature,\n PaginationFeature,\n SelectionFeature,\n ServerDataFeature,\n SortingFeature,\n SubGridsFeature,\n VirtualScrollingFeature,\n} from '../types'\n\n/** The features a grid has, by name. */\nexport interface FeatureSet {\n sorting?: SortingFeature\n filtering?: FilteringFeature\n serverData?: ServerDataFeature\n pagination?: PaginationFeature\n selection?: SelectionFeature\n subGrids?: SubGridsFeature\n menus?: MenusFeature\n columnReorder?: ColumnReorderFeature\n columnPinning?: ColumnPinningFeature\n virtualScrolling?: VirtualScrollingFeature\n columnVisibility?: ColumnVisibilityFeature\n keyboardNavigation?: KeyboardNavigationFeature\n columnResizing?: ColumnResizingFeature\n columnGroups?: ColumnGroupsFeature\n rowPinning?: RowPinningFeature\n aggregation?: AggregationFeature\n}\n\n/** Merges feature lists (app-wide, then per grid); a later entry with the same name wins. */\nexport function resolveFeatures(...lists: (readonly GridFeature[] | undefined)[]): FeatureSet {\n const set: Record<string, GridFeature> = {}\n for (const list of lists) for (const f of list ?? []) set[f.feature] = f\n return set as FeatureSet\n}\n"],"mappings":";AAyCA,SAAgBA,EAAgB,GAAGC,GAA2D;CAC5F,IAAMC,IAAmC,CAAC;CAC1C,KAAK,IAAMC,KAAQF,GAAO,KAAK,IAAMG,KAAKD,KAAQ,CAAC,GAAG,EAAIC,EAAE,WAAWA;CACvE,OAAOF;AACT"}
1
+ {"version":3,"file":"features.js","names":["resolveFeatures","lists","set","list","f"],"sources":["../../src/internal/features.ts"],"sourcesContent":["import type {\n AggregationFeature,\n ExportFeature,\n RowGroupingFeature,\n RowPinningFeature,\n ColumnGroupsFeature,\n ColumnPinningFeature,\n ColumnResizingFeature,\n ColumnReorderFeature,\n ColumnVisibilityFeature,\n FilteringFeature,\n KeyboardNavigationFeature,\n GridFeature,\n MenusFeature,\n PaginationFeature,\n SelectionFeature,\n ServerDataFeature,\n SortingFeature,\n SubGridsFeature,\n VirtualScrollingFeature,\n} from '../types'\n\n/** The features a grid has, by name. */\nexport interface FeatureSet {\n sorting?: SortingFeature\n filtering?: FilteringFeature\n serverData?: ServerDataFeature\n pagination?: PaginationFeature\n selection?: SelectionFeature\n subGrids?: SubGridsFeature\n menus?: MenusFeature\n columnReorder?: ColumnReorderFeature\n columnPinning?: ColumnPinningFeature\n virtualScrolling?: VirtualScrollingFeature\n columnVisibility?: ColumnVisibilityFeature\n keyboardNavigation?: KeyboardNavigationFeature\n columnResizing?: ColumnResizingFeature\n columnGroups?: ColumnGroupsFeature\n rowPinning?: RowPinningFeature\n aggregation?: AggregationFeature\n rowGrouping?: RowGroupingFeature\n export?: ExportFeature\n}\n\n/** Merges feature lists (app-wide, then per grid); a later entry with the same name wins. */\nexport function resolveFeatures(...lists: (readonly GridFeature[] | undefined)[]): FeatureSet {\n const set: Record<string, GridFeature> = {}\n for (const list of lists) for (const f of list ?? []) set[f.feature] = f\n return set as FeatureSet\n}\n"],"mappings":";AA6CA,SAAgBA,EAAgB,GAAGC,GAA2D;CAC5F,IAAMC,IAAmC,CAAC;CAC1C,KAAK,IAAMC,KAAQF,GAAO,KAAK,IAAMG,KAAKD,KAAQ,CAAC,GAAG,EAAIC,EAAE,WAAWA;CACvE,OAAOF;AACT"}
@@ -15,146 +15,156 @@ import u from "./LinkCell.js";
15
15
  import d from "./NumberCell.js";
16
16
  import f from "./StatusCell.js";
17
17
  import { textRenderer as p } from "./text.js";
18
- import m from "./ToggleTextCell.js";
19
- import h from "./ButtonGroupCell.js";
20
- import g from "./CheckboxCell.js";
21
- import _ from "./ChipCell.js";
22
- import v from "./CodeCell.js";
23
- import y from "./CopyCell.js";
24
- import b from "./DetailsCell.js";
25
- import x from "./EditCell.js";
26
- import S from "./IconToggleCell.js";
27
- import C from "./ImageCell.js";
28
- import w from "./ListCell.js";
29
- import T from "./MultiLineCell.js";
30
- import E from "./RadioCell.js";
31
- import D from "./SwitchCell.js";
32
- import { DATE_DEFAULT as oe, TIME_DEFAULT as se, formatCurrency as ce, formatDate as le, formatNumber as ue, formatSigned as de, parseJsonish as fe, readableTextColor as pe, resolveImageSrc as me, safeHref as he, stringifyJson as ge, toDate as O, toNumber as k, tokenizeJson as _e } from "./format.js";
18
+ import { booleanText as oe, changeText as se, chipText as ce, currencyText as le, dateText as ue, dateTimeText as de, listText as fe, numberText as m, statusText as pe } from "./plainText.js";
19
+ import h from "./ToggleTextCell.js";
20
+ import g from "./ButtonGroupCell.js";
21
+ import _ from "./CheckboxCell.js";
22
+ import v from "./ChipCell.js";
23
+ import y from "./CodeCell.js";
24
+ import b from "./CopyCell.js";
25
+ import x from "./DetailsCell.js";
26
+ import S from "./EditCell.js";
27
+ import C from "./IconToggleCell.js";
28
+ import w from "./ImageCell.js";
29
+ import T from "./ListCell.js";
30
+ import E from "./MultiLineCell.js";
31
+ import D from "./RadioCell.js";
32
+ import O from "./SwitchCell.js";
33
+ import { DATE_DEFAULT as me, TIME_DEFAULT as he, formatCurrency as ge, formatDate as _e, formatNumber as ve, formatSigned as ye, parseJsonish as be, readableTextColor as xe, resolveImageSrc as Se, safeHref as Ce, stringifyJson as we, toDate as k, toNumber as A, tokenizeJson as Te } from "./format.js";
33
34
  // src/renderers/index.ts
34
- var A = (e) => k(e), j = (e) => O(e)?.getTime() ?? null, M = /*#__PURE__*/ e({
35
+ var j = (e) => A(e), M = (e) => k(e)?.getTime() ?? null, N = /*#__PURE__*/ e({
35
36
  name: "toggle-text",
36
- component: m
37
- }), N = /*#__PURE__*/ e({
37
+ component: h
38
+ }), P = /*#__PURE__*/ e({
38
39
  name: "number",
39
40
  filterType: "number",
40
41
  component: d,
41
42
  align: "end",
42
- sortValue: A
43
- }), P = /*#__PURE__*/ e({
43
+ sortValue: j,
44
+ format: m
45
+ }), F = /*#__PURE__*/ e({
44
46
  name: "signed-number",
45
47
  filterType: "number",
46
48
  component: d,
47
49
  defaults: { signed: !0 },
48
50
  align: "end",
49
- sortValue: A
50
- }), F = /*#__PURE__*/ e({
51
+ sortValue: j,
52
+ format: m
53
+ }), I = /*#__PURE__*/ e({
51
54
  name: "currency",
52
55
  filterType: "number",
53
56
  component: i,
54
57
  align: "end",
55
- sortValue: A
56
- }), I = /*#__PURE__*/ e({
58
+ sortValue: j,
59
+ format: le
60
+ }), L = /*#__PURE__*/ e({
57
61
  name: "change",
58
62
  filterType: "number",
59
63
  component: ae,
60
64
  align: "end",
61
- sortValue: A
62
- }), L = /*#__PURE__*/ e({
63
- name: "date",
64
- component: a,
65
65
  sortValue: j,
66
- filterType: "date"
66
+ format: se
67
67
  }), R = /*#__PURE__*/ e({
68
+ name: "date",
69
+ component: a,
70
+ sortValue: M,
71
+ filterType: "date",
72
+ format: ue
73
+ }), z = /*#__PURE__*/ e({
68
74
  name: "datetime",
69
75
  filterType: "date",
70
76
  component: o,
71
- sortValue: j
72
- }), z = /*#__PURE__*/ e({
77
+ sortValue: M,
78
+ format: de
79
+ }), B = /*#__PURE__*/ e({
73
80
  name: "boolean",
74
81
  component: r,
75
- filterType: "boolean"
76
- }), B = /*#__PURE__*/ e({
82
+ filterType: "boolean",
83
+ format: oe
84
+ }), V = /*#__PURE__*/ e({
77
85
  name: "status",
78
86
  component: f,
79
- filterType: "set"
80
- }), V = /*#__PURE__*/ e({
87
+ filterType: "set",
88
+ format: pe
89
+ }), H = /*#__PURE__*/ e({
81
90
  name: "link",
82
91
  component: u
83
- }), H = /*#__PURE__*/ e({
92
+ }), U = /*#__PURE__*/ e({
84
93
  name: "icon",
85
94
  component: s,
86
95
  align: "center"
87
- }), U = /*#__PURE__*/ e({
96
+ }), W = /*#__PURE__*/ e({
88
97
  name: "json",
89
98
  component: c
90
- }), W = /*#__PURE__*/ e({
99
+ }), G = /*#__PURE__*/ e({
91
100
  name: "json-tree",
92
101
  component: l
93
- }), G = /*#__PURE__*/ e({
102
+ }), K = /*#__PURE__*/ e({
94
103
  name: "actions-menu",
95
104
  component: n,
96
105
  align: "center"
97
- }), K = /*#__PURE__*/ e({
106
+ }), q = /*#__PURE__*/ e({
98
107
  name: "action-button",
99
108
  component: t
100
- }), q = /*#__PURE__*/ e({
101
- name: "multi-line",
102
- component: T
103
109
  }), J = /*#__PURE__*/ e({
104
- name: "copy",
105
- component: y
110
+ name: "multi-line",
111
+ component: E
106
112
  }), Y = /*#__PURE__*/ e({
113
+ name: "copy",
114
+ component: b
115
+ }), X = /*#__PURE__*/ e({
107
116
  name: "chip",
108
117
  filterType: "set",
109
- component: _,
110
- sortValue: (e) => typeof e == "object" && e ? e.label ?? e.name ?? null : e
111
- }), X = (e) => e == null ? null : +!!e, Z = /*#__PURE__*/ e({
118
+ component: v,
119
+ sortValue: (e) => typeof e == "object" && e ? e.label ?? e.name ?? null : e,
120
+ format: ce
121
+ }), Z = (e) => e == null ? null : +!!e, Q = /*#__PURE__*/ e({
112
122
  name: "checkbox",
113
123
  filterType: "boolean",
114
- component: g,
124
+ component: _,
115
125
  align: "center",
116
- sortValue: X
117
- }), Q = /*#__PURE__*/ e({
126
+ sortValue: Z
127
+ }), $ = /*#__PURE__*/ e({
118
128
  name: "switch",
119
129
  filterType: "boolean",
120
- component: D,
130
+ component: O,
121
131
  align: "center",
122
- sortValue: X
123
- }), $ = /*#__PURE__*/ e({
132
+ sortValue: Z
133
+ }), Ee = /*#__PURE__*/ e({
124
134
  name: "radio",
125
135
  filterType: "boolean",
126
- component: E,
136
+ component: D,
127
137
  align: "center",
128
- sortValue: X
129
- }), ve = /*#__PURE__*/ e({
138
+ sortValue: Z
139
+ }), De = /*#__PURE__*/ e({
130
140
  name: "edit",
131
- component: x
132
- }), ye = /*#__PURE__*/ e({
141
+ component: S
142
+ }), Oe = /*#__PURE__*/ e({
133
143
  name: "image",
134
- component: C,
144
+ component: w,
135
145
  align: "center"
136
- }), be = /*#__PURE__*/ e({
146
+ }), ke = /*#__PURE__*/ e({
137
147
  name: "code",
138
- component: v
139
- }), xe = /*#__PURE__*/ e({
148
+ component: y
149
+ }), Ae = /*#__PURE__*/ e({
140
150
  name: "button-group",
141
- component: h
142
- }), Se = /*#__PURE__*/ e({
151
+ component: g
152
+ }), je = /*#__PURE__*/ e({
143
153
  name: "icon-toggle",
144
154
  filterType: "boolean",
145
- component: S,
155
+ component: C,
146
156
  align: "center",
147
- sortValue: X
148
- }), Ce = /*#__PURE__*/ e({
157
+ sortValue: Z
158
+ }), Me = /*#__PURE__*/ e({
149
159
  name: "details",
150
- component: b
151
- }), we = /*#__PURE__*/ e({
160
+ component: x
161
+ }), Ne = /*#__PURE__*/ e({
152
162
  name: "list",
153
- component: w,
154
- sortValue: (e) => Array.isArray(e) ? e.length : null
155
- }), Te = [
163
+ component: T,
164
+ sortValue: (e) => Array.isArray(e) ? e.length : null,
165
+ format: fe
166
+ }), Pe = [
156
167
  p,
157
- M,
158
168
  N,
159
169
  P,
160
170
  F,
@@ -172,17 +182,18 @@ var A = (e) => k(e), j = (e) => O(e)?.getTime() ?? null, M = /*#__PURE__*/ e({
172
182
  q,
173
183
  J,
174
184
  Y,
175
- Z,
185
+ X,
176
186
  Q,
177
187
  $,
178
- ve,
179
- ye,
180
- be,
181
- xe,
182
- Se,
183
- Ce,
184
- we
188
+ Ee,
189
+ De,
190
+ Oe,
191
+ ke,
192
+ Ae,
193
+ je,
194
+ Me,
195
+ Ne
185
196
  ];
186
- export { t as ActionButtonCell, n as ActionsMenuCell, r as BooleanCell, h as ButtonGroupCell, ae as ChangeCell, g as CheckboxCell, _ as ChipCell, v as CodeCell, y as CopyCell, i as CurrencyCell, oe as DATE_DEFAULT, a as DateCell, o as DateTimeCell, b as DetailsCell, x as EditCell, s as IconCell, S as IconToggleCell, C as ImageCell, c as JsonCell, l as JsonTreeCell, u as LinkCell, w as ListCell, T as MultiLineCell, d as NumberCell, E as RadioCell, f as StatusCell, D as SwitchCell, se as TIME_DEFAULT, ie as TextCell, m as ToggleTextCell, K as actionButtonRenderer, G as actionsMenuRenderer, Te as allRenderers, z as booleanRenderer, xe as buttonGroupRenderer, I as changeRenderer, Z as checkboxRenderer, Y as chipRenderer, be as codeRenderer, J as copyRenderer, F as currencyRenderer, L as dateRenderer, R as dateTimeRenderer, Ce as detailsRenderer, ve as editRenderer, ce as formatCurrency, le as formatDate, ue as formatNumber, de as formatSigned, H as iconRenderer, Se as iconToggleRenderer, ye as imageRenderer, U as jsonRenderer, W as jsonTreeRenderer, V as linkRenderer, we as listRenderer, ee as lookup, q as multiLineRenderer, N as numberRenderer, fe as parseJsonish, $ as radioRenderer, pe as readableTextColor, me as resolveImageSrc, te as resolveOption, ne as resolveTone, he as safeHref, re as safeTone, P as signedNumberRenderer, B as statusRenderer, ge as stringifyJson, Q as switchRenderer, p as textRenderer, O as toDate, k as toNumber, M as toggleTextRenderer, _e as tokenizeJson };
197
+ export { t as ActionButtonCell, n as ActionsMenuCell, r as BooleanCell, g as ButtonGroupCell, ae as ChangeCell, _ as CheckboxCell, v as ChipCell, y as CodeCell, b as CopyCell, i as CurrencyCell, me as DATE_DEFAULT, a as DateCell, o as DateTimeCell, x as DetailsCell, S as EditCell, s as IconCell, C as IconToggleCell, w as ImageCell, c as JsonCell, l as JsonTreeCell, u as LinkCell, T as ListCell, E as MultiLineCell, d as NumberCell, D as RadioCell, f as StatusCell, O as SwitchCell, he as TIME_DEFAULT, ie as TextCell, h as ToggleTextCell, q as actionButtonRenderer, K as actionsMenuRenderer, Pe as allRenderers, B as booleanRenderer, Ae as buttonGroupRenderer, L as changeRenderer, Q as checkboxRenderer, X as chipRenderer, ke as codeRenderer, Y as copyRenderer, I as currencyRenderer, R as dateRenderer, z as dateTimeRenderer, Me as detailsRenderer, De as editRenderer, ge as formatCurrency, _e as formatDate, ve as formatNumber, ye as formatSigned, U as iconRenderer, je as iconToggleRenderer, Oe as imageRenderer, W as jsonRenderer, G as jsonTreeRenderer, H as linkRenderer, Ne as listRenderer, ee as lookup, J as multiLineRenderer, P as numberRenderer, be as parseJsonish, Ee as radioRenderer, xe as readableTextColor, Se as resolveImageSrc, te as resolveOption, ne as resolveTone, Ce as safeHref, re as safeTone, F as signedNumberRenderer, V as statusRenderer, we as stringifyJson, $ as switchRenderer, p as textRenderer, k as toDate, A as toNumber, N as toggleTextRenderer, Te as tokenizeJson };
187
198
 
188
199
  //# sourceMappingURL=index.js.map