@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.
- package/AGENTS.md +70 -5
- package/CHANGELOG.md +39 -0
- package/README.md +198 -33
- package/agent/api.json +130 -13
- package/agent/api.md +26 -10
- package/agent/grid-config.schema.json +50 -5
- package/dist/agent/api.js +121 -13
- package/dist/agent/requirements.js +12 -3
- package/dist/agent/requirements.js.map +1 -1
- package/dist/agent/validate.js +6 -2
- package/dist/agent/validate.js.map +1 -1
- package/dist/base.css +1 -1
- package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js +498 -414
- package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridCheckbox.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/components/VGridCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridGroupCells.js +6 -0
- package/dist/components/VGridGroupCells.js.map +1 -0
- package/dist/components/VGridGroupCells.vue_vue_type_script_setup_true_lang.js +181 -0
- package/dist/components/VGridGroupCells.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js +69 -56
- package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridSelectionBanner.js +6 -0
- package/dist/components/VGridSelectionBanner.js.map +1 -0
- package/dist/components/VGridSelectionBanner.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/components/VGridSelectionBanner.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composables/useGridExport.js +135 -0
- package/dist/composables/useGridExport.js.map +1 -0
- package/dist/composables/useGridKeyboard.js +5 -1
- package/dist/composables/useGridKeyboard.js.map +1 -1
- package/dist/composables/useGridMenus.js +21 -1
- package/dist/composables/useGridMenus.js.map +1 -1
- package/dist/composables/useGridSelection.js +113 -50
- package/dist/composables/useGridSelection.js.map +1 -1
- package/dist/composables/useRowGrouping.js +103 -0
- package/dist/composables/useRowGrouping.js.map +1 -0
- package/dist/composables/useVirtualRows.js +5 -5
- package/dist/composables/useVirtualRows.js.map +1 -1
- package/dist/core/csv.js +28 -0
- package/dist/core/csv.js.map +1 -0
- package/dist/core/grouping.js +66 -0
- package/dist/core/grouping.js.map +1 -0
- package/dist/core.css +1 -1
- package/dist/features/export.js +9 -0
- package/dist/features/export.js.map +1 -0
- package/dist/features/index.js +25 -21
- package/dist/features/index.js.map +1 -1
- package/dist/features/rowGrouping.js +11 -0
- package/dist/features/rowGrouping.js.map +1 -0
- package/dist/features/selection.js +5 -3
- package/dist/features/selection.js.map +1 -1
- package/dist/index.js +55 -51
- package/dist/internal/clipboard.js +8 -2
- package/dist/internal/clipboard.js.map +1 -1
- package/dist/internal/context.js.map +1 -1
- package/dist/internal/features.js.map +1 -1
- package/dist/renderers/index.js +94 -83
- package/dist/renderers/index.js.map +1 -1
- package/dist/renderers/plainText.js +34 -0
- package/dist/renderers/plainText.js.map +1 -0
- package/dist/theme.css +1 -1
- package/dist/types/agent/requirements.d.ts +1 -1
- package/dist/types/components/VGrid.vue.d.ts +42 -4
- package/dist/types/components/VGridCheckbox.vue.d.ts +2 -2
- package/dist/types/components/VGridGroupCells.vue.d.ts +14 -0
- package/dist/types/components/VGridMenu.vue.d.ts +2 -2
- package/dist/types/components/VGridPagination.vue.d.ts +1 -1
- package/dist/types/components/VGridSelectionBanner.vue.d.ts +18 -0
- package/dist/types/composables/useGridExport.d.ts +49 -0
- package/dist/types/composables/useGridMenus.d.ts +8 -0
- package/dist/types/composables/useGridSelection.d.ts +26 -2
- package/dist/types/composables/useRowGrouping.d.ts +50 -0
- package/dist/types/composables/useVirtualRows.d.ts +2 -0
- package/dist/types/core/csv.d.ts +25 -0
- package/dist/types/core/grouping.d.ts +51 -0
- package/dist/types/features/export.d.ts +8 -0
- package/dist/types/features/index.d.ts +3 -1
- package/dist/types/features/rowGrouping.d.ts +8 -0
- package/dist/types/features/selection.d.ts +3 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/internal/clipboard.d.ts +5 -1
- package/dist/types/internal/context.d.ts +8 -1
- package/dist/types/internal/features.d.ts +3 -1
- package/dist/types/renderers/plainText.d.ts +17 -0
- package/dist/types/types.d.ts +81 -3
- package/dist/vue-grid.css +1 -1
- package/llms-full.txt +294 -48
- package/llms.txt +1 -1
- 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":"
|
|
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
|
|
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 {
|
|
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
|
|
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 {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
|
|
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
|
|
4
|
+
return await navigator.clipboard.writeText(e), !0;
|
|
5
5
|
} catch {
|
|
6
|
-
|
|
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":["
|
|
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,
|
|
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":";
|
|
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"}
|
package/dist/renderers/index.js
CHANGED
|
@@ -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 "./
|
|
19
|
-
import h from "./
|
|
20
|
-
import g from "./
|
|
21
|
-
import _ from "./
|
|
22
|
-
import v from "./
|
|
23
|
-
import y from "./
|
|
24
|
-
import b from "./
|
|
25
|
-
import x from "./
|
|
26
|
-
import S from "./
|
|
27
|
-
import C from "./
|
|
28
|
-
import w from "./
|
|
29
|
-
import T from "./
|
|
30
|
-
import E from "./
|
|
31
|
-
import D from "./
|
|
32
|
-
import
|
|
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
|
|
35
|
+
var j = (e) => A(e), M = (e) => k(e)?.getTime() ?? null, N = /*#__PURE__*/ e({
|
|
35
36
|
name: "toggle-text",
|
|
36
|
-
component:
|
|
37
|
-
}),
|
|
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:
|
|
43
|
-
|
|
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:
|
|
50
|
-
|
|
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:
|
|
56
|
-
|
|
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
|
-
|
|
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:
|
|
72
|
-
|
|
77
|
+
sortValue: M,
|
|
78
|
+
format: de
|
|
79
|
+
}), B = /*#__PURE__*/ e({
|
|
73
80
|
name: "boolean",
|
|
74
81
|
component: r,
|
|
75
|
-
filterType: "boolean"
|
|
76
|
-
|
|
82
|
+
filterType: "boolean",
|
|
83
|
+
format: oe
|
|
84
|
+
}), V = /*#__PURE__*/ e({
|
|
77
85
|
name: "status",
|
|
78
86
|
component: f,
|
|
79
|
-
filterType: "set"
|
|
80
|
-
|
|
87
|
+
filterType: "set",
|
|
88
|
+
format: pe
|
|
89
|
+
}), H = /*#__PURE__*/ e({
|
|
81
90
|
name: "link",
|
|
82
91
|
component: u
|
|
83
|
-
}),
|
|
92
|
+
}), U = /*#__PURE__*/ e({
|
|
84
93
|
name: "icon",
|
|
85
94
|
component: s,
|
|
86
95
|
align: "center"
|
|
87
|
-
}),
|
|
96
|
+
}), W = /*#__PURE__*/ e({
|
|
88
97
|
name: "json",
|
|
89
98
|
component: c
|
|
90
|
-
}),
|
|
99
|
+
}), G = /*#__PURE__*/ e({
|
|
91
100
|
name: "json-tree",
|
|
92
101
|
component: l
|
|
93
|
-
}),
|
|
102
|
+
}), K = /*#__PURE__*/ e({
|
|
94
103
|
name: "actions-menu",
|
|
95
104
|
component: n,
|
|
96
105
|
align: "center"
|
|
97
|
-
}),
|
|
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: "
|
|
105
|
-
component:
|
|
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
|
-
|
|
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:
|
|
124
|
+
component: _,
|
|
115
125
|
align: "center",
|
|
116
|
-
sortValue:
|
|
117
|
-
}),
|
|
126
|
+
sortValue: Z
|
|
127
|
+
}), $ = /*#__PURE__*/ e({
|
|
118
128
|
name: "switch",
|
|
119
129
|
filterType: "boolean",
|
|
120
|
-
component:
|
|
130
|
+
component: O,
|
|
121
131
|
align: "center",
|
|
122
|
-
sortValue:
|
|
123
|
-
}),
|
|
132
|
+
sortValue: Z
|
|
133
|
+
}), Ee = /*#__PURE__*/ e({
|
|
124
134
|
name: "radio",
|
|
125
135
|
filterType: "boolean",
|
|
126
|
-
component:
|
|
136
|
+
component: D,
|
|
127
137
|
align: "center",
|
|
128
|
-
sortValue:
|
|
129
|
-
}),
|
|
138
|
+
sortValue: Z
|
|
139
|
+
}), De = /*#__PURE__*/ e({
|
|
130
140
|
name: "edit",
|
|
131
|
-
component:
|
|
132
|
-
}),
|
|
141
|
+
component: S
|
|
142
|
+
}), Oe = /*#__PURE__*/ e({
|
|
133
143
|
name: "image",
|
|
134
|
-
component:
|
|
144
|
+
component: w,
|
|
135
145
|
align: "center"
|
|
136
|
-
}),
|
|
146
|
+
}), ke = /*#__PURE__*/ e({
|
|
137
147
|
name: "code",
|
|
138
|
-
component:
|
|
139
|
-
}),
|
|
148
|
+
component: y
|
|
149
|
+
}), Ae = /*#__PURE__*/ e({
|
|
140
150
|
name: "button-group",
|
|
141
|
-
component:
|
|
142
|
-
}),
|
|
151
|
+
component: g
|
|
152
|
+
}), je = /*#__PURE__*/ e({
|
|
143
153
|
name: "icon-toggle",
|
|
144
154
|
filterType: "boolean",
|
|
145
|
-
component:
|
|
155
|
+
component: C,
|
|
146
156
|
align: "center",
|
|
147
|
-
sortValue:
|
|
148
|
-
}),
|
|
157
|
+
sortValue: Z
|
|
158
|
+
}), Me = /*#__PURE__*/ e({
|
|
149
159
|
name: "details",
|
|
150
|
-
component:
|
|
151
|
-
}),
|
|
160
|
+
component: x
|
|
161
|
+
}), Ne = /*#__PURE__*/ e({
|
|
152
162
|
name: "list",
|
|
153
|
-
component:
|
|
154
|
-
sortValue: (e) => Array.isArray(e) ? e.length : null
|
|
155
|
-
|
|
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
|
-
|
|
185
|
+
X,
|
|
176
186
|
Q,
|
|
177
187
|
$,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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,
|
|
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
|