@svgrid/enterprise 3.1.7 → 3.1.9
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/README.md +1 -0
- package/dist/SvAlertRuleEditor.svelte +16 -5
- package/dist/SvGridAlerts.svelte +8 -0
- package/dist/SvGridAlerts.svelte.d.ts +4 -0
- package/dist/SvGridBoard.svelte +69 -10
- package/dist/SvGridBulkEditDrawer.svelte +13 -5
- package/dist/SvGridGallery.svelte +286 -0
- package/dist/SvGridGallery.svelte.d.ts +30 -0
- package/dist/SvGridScheduler.svelte +33 -11
- package/dist/SvGridSelectionBar.svelte +47 -0
- package/dist/advanced-filter/expr-columns-from-grid.d.ts +1 -0
- package/dist/advanced-filter/expr-columns-from-grid.js +11 -7
- package/dist/advanced-filter-enable.d.ts +6 -0
- package/dist/advanced-filter-enable.js +8 -0
- package/dist/alerts/alert-engine.d.ts +7 -0
- package/dist/alerts/alert-engine.js +5 -2
- package/dist/alerts/condition-editor.d.ts +26 -0
- package/dist/alerts/condition-editor.js +17 -0
- package/dist/base/index.d.ts +20 -0
- package/dist/base/index.js +20 -0
- package/dist/bulk-edit.d.ts +11 -0
- package/dist/bulk-edit.js +18 -1
- package/dist/cdn/svgrid-enterprise.svelte-external.js +11375 -10805
- package/dist/designer/assets/GridFooter-Cu8_yBlQ.js +2 -0
- package/dist/designer/assets/GridMenus-BUjkkAU2.js +6 -0
- package/dist/designer/assets/PinSplitter-BgTpgh1d.css +1 -0
- package/dist/designer/assets/PinSplitter-C5AwA1xV.js +1 -0
- package/dist/designer/assets/SvGrid.helpers-CIrmIo9U.js +1 -0
- package/dist/designer/assets/SvGridCellEditor-CJxThKL_.js +4 -0
- package/dist/designer/assets/SvListBox-CS7oUAiX.js +2 -0
- package/dist/designer/assets/conditional-formatting-MDWbF8_Y.js +1 -0
- package/dist/designer/assets/grid-extension.svelte-BZ7AqyJI.js +1 -0
- package/dist/designer/assets/{index-DtBIaQno.js → index-BPU2KNc5.js} +396 -395
- package/dist/designer/assets/index-BmvG99kR.css +1 -0
- package/dist/designer/assets/sparkline-C-NcnB2i.js +1 -0
- package/dist/designer/assets/src-C_U1NKOY.js +58 -0
- package/dist/designer/assets/sv-grid-scrollbar-B9N6Wuj0.js +109 -0
- package/dist/designer/assets/validate-H5u2HEQh.js +1 -0
- package/dist/designer/index.html +11 -7
- package/dist/expressions/compile.js +10 -0
- package/dist/expressions/evaluate.js +18 -0
- package/dist/expressions/expression-types.d.ts +10 -0
- package/dist/expressions/kinds.d.ts +28 -0
- package/dist/expressions/kinds.js +19 -0
- package/dist/expressions/parse.js +9 -1
- package/dist/fields/AttachmentCell.svelte +242 -0
- package/dist/fields/AttachmentCell.svelte.d.ts +5 -0
- package/dist/fields/AttachmentDialog.svelte +357 -0
- package/dist/fields/AttachmentDialog.svelte.d.ts +13 -0
- package/dist/fields/AttachmentEditor.svelte +41 -0
- package/dist/fields/AttachmentEditor.svelte.d.ts +11 -0
- package/dist/fields/AttachmentPreview.svelte +72 -0
- package/dist/fields/AttachmentPreview.svelte.d.ts +8 -0
- package/dist/fields/BarcodeCell.svelte +20 -0
- package/dist/fields/BarcodeCell.svelte.d.ts +5 -0
- package/dist/fields/BaseAutomations.svelte +558 -0
- package/dist/fields/BaseAutomations.svelte.d.ts +18 -0
- package/dist/fields/BaseChartView.svelte +47 -0
- package/dist/fields/BaseChartView.svelte.d.ts +8 -0
- package/dist/fields/BaseTableView.svelte +185 -0
- package/dist/fields/BaseTableView.svelte.d.ts +37 -0
- package/dist/fields/BaseTabs.svelte +308 -0
- package/dist/fields/BaseTabs.svelte.d.ts +21 -0
- package/dist/fields/ButtonCell.svelte +47 -0
- package/dist/fields/ButtonCell.svelte.d.ts +20 -0
- package/dist/fields/CheckboxCell.svelte +46 -0
- package/dist/fields/CheckboxCell.svelte.d.ts +14 -0
- package/dist/fields/DeleteFieldConfirm.svelte +80 -0
- package/dist/fields/DeleteFieldConfirm.svelte.d.ts +8 -0
- package/dist/fields/DeleteRecordConfirm.svelte +48 -0
- package/dist/fields/DeleteRecordConfirm.svelte.d.ts +9 -0
- package/dist/fields/FieldCell.svelte +80 -0
- package/dist/fields/FieldCell.svelte.d.ts +9 -0
- package/dist/fields/FieldEditor.svelte +321 -0
- package/dist/fields/FieldEditor.svelte.d.ts +10 -0
- package/dist/fields/FieldInput.svelte +188 -0
- package/dist/fields/FieldInput.svelte.d.ts +29 -0
- package/dist/fields/FieldsHeaderEnd.svelte +146 -0
- package/dist/fields/FieldsHeaderEnd.svelte.d.ts +6 -0
- package/dist/fields/FootRowAdder.svelte +8 -0
- package/dist/fields/FootRowAdder.svelte.d.ts +6 -0
- package/dist/fields/GroupHeader.svelte +127 -0
- package/dist/fields/GroupHeader.svelte.d.ts +24 -0
- package/dist/fields/LinkCell.svelte +46 -0
- package/dist/fields/LinkCell.svelte.d.ts +9 -0
- package/dist/fields/LinkPickerEditor.svelte +172 -0
- package/dist/fields/LinkPickerEditor.svelte.d.ts +9 -0
- package/dist/fields/LinkPreview.svelte +60 -0
- package/dist/fields/LinkPreview.svelte.d.ts +7 -0
- package/dist/fields/LinkedRecordView.svelte +94 -0
- package/dist/fields/LinkedRecordView.svelte.d.ts +9 -0
- package/dist/fields/LinkedRecordsCell.svelte +59 -0
- package/dist/fields/LinkedRecordsCell.svelte.d.ts +11 -0
- package/dist/fields/LongTextEditor.svelte +157 -0
- package/dist/fields/LongTextEditor.svelte.d.ts +11 -0
- package/dist/fields/NumberEditor.svelte +309 -0
- package/dist/fields/NumberEditor.svelte.d.ts +12 -0
- package/dist/fields/OptionsEditor.svelte +117 -0
- package/dist/fields/OptionsEditor.svelte.d.ts +11 -0
- package/dist/fields/PercentCell.svelte +21 -0
- package/dist/fields/PercentCell.svelte.d.ts +8 -0
- package/dist/fields/PropertyInput.svelte +204 -0
- package/dist/fields/PropertyInput.svelte.d.ts +11 -0
- package/dist/fields/RatingCell.svelte +75 -0
- package/dist/fields/RatingCell.svelte.d.ts +16 -0
- package/dist/fields/RatingEditor.svelte +82 -0
- package/dist/fields/RatingEditor.svelte.d.ts +9 -0
- package/dist/fields/RecordView.svelte +310 -0
- package/dist/fields/RecordView.svelte.d.ts +11 -0
- package/dist/fields/RichTextCell.svelte +30 -0
- package/dist/fields/RichTextCell.svelte.d.ts +5 -0
- package/dist/fields/RowAdder.svelte +93 -0
- package/dist/fields/RowAdder.svelte.d.ts +7 -0
- package/dist/fields/RowHeader.svelte +99 -0
- package/dist/fields/RowHeader.svelte.d.ts +11 -0
- package/dist/fields/SelectCell.svelte +35 -0
- package/dist/fields/SelectCell.svelte.d.ts +15 -0
- package/dist/fields/SelectEditor.svelte +350 -0
- package/dist/fields/SelectEditor.svelte.d.ts +17 -0
- package/dist/fields/SummaryCell.svelte +160 -0
- package/dist/fields/SummaryCell.svelte.d.ts +11 -0
- package/dist/fields/SvBase.svelte +545 -0
- package/dist/fields/SvBase.svelte.d.ts +30 -0
- package/dist/fields/SvBaseForm.svelte +295 -0
- package/dist/fields/SvBaseForm.svelte.d.ts +22 -0
- package/dist/fields/SvBaseViewBar.svelte +644 -0
- package/dist/fields/SvBaseViewBar.svelte.d.ts +26 -0
- package/dist/fields/UserCell.svelte +39 -0
- package/dist/fields/UserCell.svelte.d.ts +9 -0
- package/dist/fields/UserFace.svelte +30 -0
- package/dist/fields/UserFace.svelte.d.ts +12 -0
- package/dist/fields/activity.svelte.d.ts +50 -0
- package/dist/fields/activity.svelte.js +110 -0
- package/dist/fields/attachments.d.ts +95 -0
- package/dist/fields/attachments.js +145 -0
- package/dist/fields/automation-outbound.d.ts +46 -0
- package/dist/fields/automation-outbound.js +61 -0
- package/dist/fields/automation-server.d.ts +53 -0
- package/dist/fields/automation-server.js +333 -0
- package/dist/fields/automations.svelte.d.ts +208 -0
- package/dist/fields/automations.svelte.js +437 -0
- package/dist/fields/bar-request.svelte.d.ts +16 -0
- package/dist/fields/bar-request.svelte.js +15 -0
- package/dist/fields/base-alerts.d.ts +24 -0
- package/dist/fields/base-alerts.js +64 -0
- package/dist/fields/base-connect.d.ts +82 -0
- package/dist/fields/base-connect.js +271 -0
- package/dist/fields/base-schema.d.ts +104 -0
- package/dist/fields/base-schema.js +266 -0
- package/dist/fields/base-sql.d.ts +62 -0
- package/dist/fields/base-sql.js +251 -0
- package/dist/fields/base-sync.d.ts +142 -0
- package/dist/fields/base-sync.js +499 -0
- package/dist/fields/base-tables.d.ts +89 -0
- package/dist/fields/base-tables.js +349 -0
- package/dist/fields/builtin-types.d.ts +13 -0
- package/dist/fields/builtin-types.js +773 -0
- package/dist/fields/button.d.ts +2 -0
- package/dist/fields/button.js +17 -0
- package/dist/fields/chart-view.d.ts +35 -0
- package/dist/fields/chart-view.js +154 -0
- package/dist/fields/column-order.d.ts +6 -0
- package/dist/fields/column-order.js +12 -0
- package/dist/fields/convert.d.ts +16 -0
- package/dist/fields/convert.js +176 -0
- package/dist/fields/copy-text.d.ts +13 -0
- package/dist/fields/copy-text.js +45 -0
- package/dist/fields/editor-request.svelte.d.ts +71 -0
- package/dist/fields/editor-request.svelte.js +52 -0
- package/dist/fields/field-ops.d.ts +72 -0
- package/dist/fields/field-ops.js +334 -0
- package/dist/fields/filter-model.d.ts +84 -0
- package/dist/fields/filter-model.js +446 -0
- package/dist/fields/format.d.ts +109 -0
- package/dist/fields/format.js +288 -0
- package/dist/fields/formula.d.ts +50 -0
- package/dist/fields/formula.js +530 -0
- package/dist/fields/grid-access.d.ts +60 -0
- package/dist/fields/grid-access.js +120 -0
- package/dist/fields/index.d.ts +34 -0
- package/dist/fields/index.js +312 -0
- package/dist/fields/linked-fields.d.ts +8 -0
- package/dist/fields/linked-fields.js +40 -0
- package/dist/fields/links.d.ts +10 -0
- package/dist/fields/links.js +46 -0
- package/dist/fields/name-list.d.ts +16 -0
- package/dist/fields/name-list.js +49 -0
- package/dist/fields/palette.d.ts +47 -0
- package/dist/fields/palette.js +69 -0
- package/dist/fields/record-delete.svelte.d.ts +12 -0
- package/dist/fields/record-delete.svelte.js +5 -0
- package/dist/fields/record-menu.d.ts +9 -0
- package/dist/fields/record-menu.js +78 -0
- package/dist/fields/registry.svelte.d.ts +176 -0
- package/dist/fields/registry.svelte.js +51 -0
- package/dist/fields/rich-text.d.ts +23 -0
- package/dist/fields/rich-text.js +48 -0
- package/dist/fields/row-color-choice.svelte.d.ts +31 -0
- package/dist/fields/row-color-choice.svelte.js +25 -0
- package/dist/fields/row-colors.d.ts +36 -0
- package/dist/fields/row-colors.js +90 -0
- package/dist/fields/row-height.d.ts +28 -0
- package/dist/fields/row-height.js +50 -0
- package/dist/fields/sources.svelte.d.ts +80 -0
- package/dist/fields/sources.svelte.js +131 -0
- package/dist/fields/summaries.d.ts +18 -0
- package/dist/fields/summaries.js +138 -0
- package/dist/fields/view-model.d.ts +129 -0
- package/dist/fields/view-model.js +492 -0
- package/dist/fields/viewbar/ChartPanel.svelte +61 -0
- package/dist/fields/viewbar/ChartPanel.svelte.d.ts +9 -0
- package/dist/fields/viewbar/ColorPanel.svelte +112 -0
- package/dist/fields/viewbar/ColorPanel.svelte.d.ts +9 -0
- package/dist/fields/viewbar/ConditionValue.svelte +153 -0
- package/dist/fields/viewbar/ConditionValue.svelte.d.ts +15 -0
- package/dist/fields/viewbar/FieldIcon.svelte +18 -0
- package/dist/fields/viewbar/FieldIcon.svelte.d.ts +9 -0
- package/dist/fields/viewbar/FilterPanel.svelte +192 -0
- package/dist/fields/viewbar/FilterPanel.svelte.d.ts +13 -0
- package/dist/fields/viewbar/GanttPanel.svelte +60 -0
- package/dist/fields/viewbar/GanttPanel.svelte.d.ts +10 -0
- package/dist/fields/viewbar/HideFieldsPanel.svelte +104 -0
- package/dist/fields/viewbar/HideFieldsPanel.svelte.d.ts +7 -0
- package/dist/fields/viewbar/SortPanel.svelte +85 -0
- package/dist/fields/viewbar/SortPanel.svelte.d.ts +8 -0
- package/dist/fields/viewbar/ViewsMenu.svelte +250 -0
- package/dist/fields/viewbar/ViewsMenu.svelte.d.ts +15 -0
- package/dist/fields/viewbar/panel-focus.d.ts +3 -0
- package/dist/fields/viewbar/panel-focus.js +22 -0
- package/dist/fields/viewbar/sort-state.d.ts +20 -0
- package/dist/fields/viewbar/sort-state.js +24 -0
- package/dist/gallery.d.ts +7 -0
- package/dist/gallery.js +36 -0
- package/dist/gantt/SvGridGantt.svelte +88 -16
- package/dist/gantt/gantt-config.d.ts +28 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +6 -0
- package/dist/install.js +3 -0
- package/dist/license-core.d.ts +3 -3
- package/dist/license.js +1 -0
- package/dist/node/studio.js +141 -20
- package/dist/scheduler-config.d.ts +11 -0
- package/dist/sources/introspect-supabase.js +4 -1
- package/dist/sources/rest.js +6 -2
- package/dist/studio/emit-project.js +25 -6
- package/dist/studio/sveltekit3.js +13 -7
- package/dist/studio/ui-components.generated.js +94 -2
- package/dist/upgrade-prompt.d.ts +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/dist/wc/GridFooter-f5K0aLe_.js +145 -0
- package/dist/wc/GridMenus-FtSN_8t9.js +1369 -0
- package/dist/wc/PinSplitter-D-qtDhSM.js +132 -0
- package/dist/wc/{SvGrid.helpers-zBkDTryR.js → SvGrid.helpers-B2GEKrxS.js} +84 -36
- package/dist/wc/{SvGridCellEditor-CzUKEbkI.js → SvGridCellEditor-B_cLJrsp.js} +20 -9
- package/dist/wc/conditional-formatting-BXis_oP1.js +189 -0
- package/dist/wc/grid-extension.svelte-Bufq4B4C.js +20 -0
- package/dist/wc/sv-sheet-element.js +7561 -7618
- package/dist/wc/svelte-virtualizer.svelte-ehwOupl-.js +360 -0
- package/dist/wc/{validate-43C03DLP.js → validate-BaMO8UPE.js} +1 -1
- package/package.json +14 -3
- package/dist/designer/assets/GridMenus-CvcASlKv.js +0 -8
- package/dist/designer/assets/SvGrid.helpers-DE5mmORW.js +0 -1
- package/dist/designer/assets/SvGridCellEditor-C7NWcnNC.js +0 -4
- package/dist/designer/assets/SvListBox-BlmmzYcU.js +0 -110
- package/dist/designer/assets/index-KmSEY7Lb.css +0 -1
- package/dist/designer/assets/src-DqHCqori.js +0 -58
- package/dist/designer/assets/validate-B71dE1Cs.js +0 -1
- package/dist/wc/GridMenus-fWbBUiRH.js +0 -1088
- package/dist/wc/svelte-virtualizer.svelte-Dntdh8Ms.js +0 -581
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { G as e, at as t, it as n } from "./client-DQIzjDBG.js";
|
|
2
|
+
//#region ../grid/dist/filtering/excel-filters.js
|
|
3
|
+
var r = /[̀-ͯ]/g;
|
|
4
|
+
function i(e, t) {
|
|
5
|
+
if (!e) return "";
|
|
6
|
+
if (a(e)) return t ? e.toLocaleLowerCase(t) : e.toLowerCase();
|
|
7
|
+
let n = e.normalize("NFD").replace(r, "");
|
|
8
|
+
return t ? n.toLocaleLowerCase(t) : n.toLowerCase();
|
|
9
|
+
}
|
|
10
|
+
function a(e) {
|
|
11
|
+
for (let t = 0; t < e.length; t++) if (e.charCodeAt(t) > 127) return !1;
|
|
12
|
+
return !0;
|
|
13
|
+
}
|
|
14
|
+
function o(e) {
|
|
15
|
+
let { tokens: t, trailing: n } = l(e);
|
|
16
|
+
return n && t.push(n), t;
|
|
17
|
+
}
|
|
18
|
+
function s(e) {
|
|
19
|
+
return e.map((e) => e.trim()).filter((e) => e.length > 0).map((e) => /["\n,]/.test(e) ? `"${e.replace(/"/g, "\"\"")}"` : e).join(", ");
|
|
20
|
+
}
|
|
21
|
+
function c(e) {
|
|
22
|
+
return l(e).trailing;
|
|
23
|
+
}
|
|
24
|
+
function l(e) {
|
|
25
|
+
let t = String(e ?? ""), n = [], r = "", i = !1, a = !1, o = !1, s = () => {
|
|
26
|
+
let e = a ? r : r.trim();
|
|
27
|
+
return r = "", a = !1, o = !1, e;
|
|
28
|
+
};
|
|
29
|
+
for (let e = 0; e < t.length; e += 1) {
|
|
30
|
+
let c = t[e];
|
|
31
|
+
if (i) {
|
|
32
|
+
if (c !== "\"") {
|
|
33
|
+
r += c;
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (t[e + 1] === "\"") {
|
|
37
|
+
r += "\"", e += 1;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
i = !1, o = !0;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (c === "," || c === "\n") {
|
|
44
|
+
let e = s();
|
|
45
|
+
e.length && n.push(e);
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (c === "\"" && !o && !r.trim()) {
|
|
49
|
+
i = !0, a = !0, r = "";
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
r += c;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
tokens: n,
|
|
56
|
+
trailing: s()
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
var u = 16384;
|
|
60
|
+
function d(e) {
|
|
61
|
+
let t = /* @__PURE__ */ new Map(), n = 0, r = 0;
|
|
62
|
+
return (i) => {
|
|
63
|
+
let a = typeof i == "string" ? i : String(i ?? "");
|
|
64
|
+
if (t === null) return e(a);
|
|
65
|
+
n++;
|
|
66
|
+
let o = t.get(a);
|
|
67
|
+
if (o !== void 0) return r++, o;
|
|
68
|
+
let s = e(a);
|
|
69
|
+
return t.size < u && t.set(a, s), n >= 2048 && r * 2 < n && (t = null), s;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function f(e, t) {
|
|
73
|
+
let n = t?.locale, r = (e) => i(String(e ?? ""), n), a = r(e.value);
|
|
74
|
+
switch (e.operator) {
|
|
75
|
+
case "contains": return d((e) => r(e).includes(a));
|
|
76
|
+
case "notContains": return a === "" ? () => !0 : d((e) => !r(e).includes(a));
|
|
77
|
+
case "equals": return d((e) => r(e) === a);
|
|
78
|
+
case "notEquals": return a === "" ? () => !0 : d((e) => r(e) !== a);
|
|
79
|
+
case "startsWith": return d((e) => r(e).startsWith(a));
|
|
80
|
+
case "endsWith": return d((e) => r(e).endsWith(a));
|
|
81
|
+
case "regex": {
|
|
82
|
+
let t = String(e.value ?? "");
|
|
83
|
+
if (!t) return () => !0;
|
|
84
|
+
let n;
|
|
85
|
+
try {
|
|
86
|
+
n = new RegExp(t, "i");
|
|
87
|
+
} catch {
|
|
88
|
+
return () => !1;
|
|
89
|
+
}
|
|
90
|
+
return (e) => n.test(String(e ?? ""));
|
|
91
|
+
}
|
|
92
|
+
case "in":
|
|
93
|
+
case "notIn": {
|
|
94
|
+
let t = o(e.value);
|
|
95
|
+
if (t.length === 0) return () => !0;
|
|
96
|
+
let a = new Set(t.map((e) => i(e, n)));
|
|
97
|
+
return e.operator === "in" ? (e) => a.has(r(e)) : (e) => !a.has(r(e));
|
|
98
|
+
}
|
|
99
|
+
case "greaterThan": {
|
|
100
|
+
let t = Number(e.value), n = Number.isFinite(t), r = String(e.value ?? "");
|
|
101
|
+
return (e) => {
|
|
102
|
+
let i = Number(e);
|
|
103
|
+
return n && Number.isFinite(i) ? i > t : String(e ?? "") > r;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
case "lessThan": {
|
|
107
|
+
let t = Number(e.value), n = Number.isFinite(t), r = String(e.value ?? "");
|
|
108
|
+
return (e) => {
|
|
109
|
+
let i = Number(e);
|
|
110
|
+
return n && Number.isFinite(i) ? i < t : String(e ?? "") < r;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
case "between": {
|
|
114
|
+
let t = e.value == null ? 0 : Number(e.value), n = e.valueTo == null ? 0 : Number(e.valueTo), r = Number.isFinite(t) && Number.isFinite(n), i = String(e.value ?? ""), a = String(e.valueTo ?? "");
|
|
115
|
+
return (e) => {
|
|
116
|
+
let o = Number(e ?? 0);
|
|
117
|
+
if (r && Number.isFinite(o)) return o >= t && o <= n;
|
|
118
|
+
let s = String(e ?? "");
|
|
119
|
+
return s >= i && s <= a;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
case "isBlank": return (e) => String(e ?? "").trim().length === 0;
|
|
123
|
+
case "isNotBlank": return (e) => String(e ?? "").trim().length > 0;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region ../grid/dist/virtualization/virtualizer.js
|
|
128
|
+
function p(e, t, n) {
|
|
129
|
+
return Math.min(Math.max(e, t), n);
|
|
130
|
+
}
|
|
131
|
+
function m(e, t) {
|
|
132
|
+
return e.count === t.count && e.estimateSize === t.estimateSize && (e.overscan ?? 6) === (t.overscan ?? 6) && e.overscanBehind === t.overscanBehind && e.overscanMin === t.overscanMin && e.viewportHeight === t.viewportHeight && (e.scrollOffset ?? 0) === (t.scrollOffset ?? 0);
|
|
133
|
+
}
|
|
134
|
+
function h(e, t) {
|
|
135
|
+
if (e.totalSize !== t.totalSize || e.startIndex !== t.startIndex || e.endIndex !== t.endIndex || e.viewportHeight !== t.viewportHeight || e.items.length !== t.items.length) return !1;
|
|
136
|
+
for (let n = 0; n < e.items.length; n += 1) {
|
|
137
|
+
let r = e.items[n], i = t.items[n];
|
|
138
|
+
if (r.index !== i.index || r.start !== i.start || r.size !== i.size || r.key !== i.key) return !1;
|
|
139
|
+
}
|
|
140
|
+
return !0;
|
|
141
|
+
}
|
|
142
|
+
function g(e, t) {
|
|
143
|
+
return `virtual_slot_${e % t}`;
|
|
144
|
+
}
|
|
145
|
+
function _(e, t, n) {
|
|
146
|
+
let r = [], i = t - e + 1;
|
|
147
|
+
for (let a = e; a <= t; a += 1) {
|
|
148
|
+
let e = a * n;
|
|
149
|
+
r.push({
|
|
150
|
+
index: a,
|
|
151
|
+
start: e,
|
|
152
|
+
size: n,
|
|
153
|
+
end: e + n,
|
|
154
|
+
key: g(a, i)
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
return r;
|
|
158
|
+
}
|
|
159
|
+
function v(e, t, n, r) {
|
|
160
|
+
if (e <= 0) return [];
|
|
161
|
+
let i = Math.max(t, 1), a = Math.ceil(Math.max(n, 0) / i);
|
|
162
|
+
return _(0, Math.max(Math.min(a + Math.max(r, 0), e - 1), 0), i);
|
|
163
|
+
}
|
|
164
|
+
function y(e, t, n) {
|
|
165
|
+
let r = [], i = t - e + 1;
|
|
166
|
+
for (let a = e; a <= t; a += 1) {
|
|
167
|
+
let e = n[a] ?? 0, t = n[a + 1] ?? e;
|
|
168
|
+
r.push({
|
|
169
|
+
index: a,
|
|
170
|
+
start: e,
|
|
171
|
+
size: t - e,
|
|
172
|
+
end: t,
|
|
173
|
+
key: g(a, i)
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
return r;
|
|
177
|
+
}
|
|
178
|
+
function b(e, t) {
|
|
179
|
+
let n = Math.max(e.count, 0), r = Math.max(e.viewportHeight, 0);
|
|
180
|
+
if (typeof e.estimateSize == "function" && t) {
|
|
181
|
+
let i = t[n] ?? 0, a = Math.max(i - r, 0), o = p(e.scrollOffset ?? 0, 0, a), s = 0, c = n;
|
|
182
|
+
for (; s < c;) {
|
|
183
|
+
let e = s + c >>> 1;
|
|
184
|
+
(t[e + 1] ?? 0) <= o ? s = e + 1 : c = e;
|
|
185
|
+
}
|
|
186
|
+
let l = s, u = o + r;
|
|
187
|
+
for (s = l, c = n; s < c;) {
|
|
188
|
+
let e = s + c >>> 1;
|
|
189
|
+
(t[e] ?? 0) < u ? s = e + 1 : c = e;
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
count: n,
|
|
193
|
+
viewportHeight: r,
|
|
194
|
+
totalSize: i,
|
|
195
|
+
scrollOffset: o,
|
|
196
|
+
visibleStart: l,
|
|
197
|
+
visibleEnd: Math.max(s - 1, l),
|
|
198
|
+
uniformSize: 0
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
let i = Math.max(typeof e.estimateSize == "number" ? e.estimateSize : 1, 1), a = n * i, o = Math.max(a - r, 0), s = p(e.scrollOffset ?? 0, 0, o), c = Math.floor(s / i), l = Math.ceil(r / i);
|
|
202
|
+
return {
|
|
203
|
+
count: n,
|
|
204
|
+
viewportHeight: r,
|
|
205
|
+
totalSize: a,
|
|
206
|
+
scrollOffset: s,
|
|
207
|
+
visibleStart: c,
|
|
208
|
+
visibleEnd: Math.min(c + l, Math.max(n - 1, 0)),
|
|
209
|
+
uniformSize: i
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
function x(e, t, n = !1) {
|
|
213
|
+
let r = Math.max(e.overscan ?? 6, 0), i = e.overscanMin === void 0 || n ? r : p(e.overscanMin, 0, r), a = Math.min(Math.max(e.overscanBehind ?? r, 0), i), o = e.scrollDirection ?? 0, s = o > 0 ? a : i, c = o < 0 ? a : i, { count: l, viewportHeight: u, totalSize: d, scrollOffset: f, visibleStart: m, visibleEnd: h, uniformSize: g } = b(e, t), v = l === 0 ? 0 : p(m - s, 0, l - 1), x = l === 0 ? -1 : p(h + c, 0, l - 1), S = [];
|
|
214
|
+
return x >= v && (S = g > 0 ? _(v, x, g) : y(v, x, t)), {
|
|
215
|
+
items: S,
|
|
216
|
+
totalSize: d,
|
|
217
|
+
startIndex: v,
|
|
218
|
+
endIndex: x,
|
|
219
|
+
scrollOffset: f,
|
|
220
|
+
viewportHeight: u
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
function S(e) {
|
|
224
|
+
let t = e, n = null;
|
|
225
|
+
function r() {
|
|
226
|
+
if (typeof t.estimateSize != "function") return null;
|
|
227
|
+
let e = Math.max(t.count, 0);
|
|
228
|
+
if (n && n.fn === t.estimateSize && n.count === e) return n.offsets;
|
|
229
|
+
let r = t.estimateSize, i = Array(e + 1);
|
|
230
|
+
i[0] = 0;
|
|
231
|
+
for (let t = 0; t < e; t += 1) i[t + 1] = i[t] + Math.max(r(t), 0);
|
|
232
|
+
return n = {
|
|
233
|
+
fn: r,
|
|
234
|
+
count: e,
|
|
235
|
+
offsets: i
|
|
236
|
+
}, i;
|
|
237
|
+
}
|
|
238
|
+
let i = x(t, r()), a = /* @__PURE__ */ new Set();
|
|
239
|
+
function o() {
|
|
240
|
+
a.forEach((e) => e());
|
|
241
|
+
}
|
|
242
|
+
function s(e = !1) {
|
|
243
|
+
let n = x(t, r(), e);
|
|
244
|
+
if (!h(i, n)) {
|
|
245
|
+
if (i.items.length > 0 && n.items.length > 0) {
|
|
246
|
+
let e = i.items[0].index, t = n.items;
|
|
247
|
+
for (let n = 0; n < t.length; n += 1) {
|
|
248
|
+
let r = t[n], a = i.items[r.index - e];
|
|
249
|
+
a && a.index === r.index && a.start === r.start && a.size === r.size && a.key === r.key && (t[n] = a);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
i = n, o();
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function c() {
|
|
256
|
+
let e = t.overscanMin;
|
|
257
|
+
if (e === void 0 || i.items.length === 0) return "move";
|
|
258
|
+
let n = p(e, 0, Math.max(t.overscan ?? 6, 0)), { count: a, viewportHeight: o, totalSize: s, visibleStart: c, visibleEnd: l } = b(t, r());
|
|
259
|
+
if (a === 0 || o !== i.viewportHeight || s !== i.totalSize || c > i.endIndex || l < i.startIndex) return "jump";
|
|
260
|
+
let u = t.scrollDirection ?? 0, d = Math.max(c - (u < 0 ? n : 0), 0), f = Math.min(l + (u > 0 ? n : 0), a - 1);
|
|
261
|
+
return i.startIndex <= d && i.endIndex >= f ? "hold" : "move";
|
|
262
|
+
}
|
|
263
|
+
return {
|
|
264
|
+
setOptions(e) {
|
|
265
|
+
let r = {
|
|
266
|
+
...t,
|
|
267
|
+
...e
|
|
268
|
+
}, i = typeof e.estimateSize == "function";
|
|
269
|
+
!i && m(t, r) || (t = r, i && (n = null), s());
|
|
270
|
+
},
|
|
271
|
+
measure() {
|
|
272
|
+
n = null, s();
|
|
273
|
+
},
|
|
274
|
+
setScrollOffset(e) {
|
|
275
|
+
let n = t.scrollOffset ?? 0;
|
|
276
|
+
if (n === e) return;
|
|
277
|
+
t = {
|
|
278
|
+
...t,
|
|
279
|
+
scrollOffset: e,
|
|
280
|
+
scrollDirection: e > n ? 1 : -1
|
|
281
|
+
};
|
|
282
|
+
let r = c();
|
|
283
|
+
r !== "hold" && s(r === "move");
|
|
284
|
+
},
|
|
285
|
+
setViewportHeight(e) {
|
|
286
|
+
t.viewportHeight !== e && (t = {
|
|
287
|
+
...t,
|
|
288
|
+
viewportHeight: e
|
|
289
|
+
}, s());
|
|
290
|
+
},
|
|
291
|
+
scrollToIndex(e) {
|
|
292
|
+
let n = p(e, 0, Math.max(t.count - 1, 0)), a = i.totalSize, o;
|
|
293
|
+
if (typeof t.estimateSize == "function") {
|
|
294
|
+
let e = r();
|
|
295
|
+
if (e) o = e[n] ?? 0;
|
|
296
|
+
else {
|
|
297
|
+
let e = 0, r = t.estimateSize;
|
|
298
|
+
for (let t = 0; t < n; t += 1) e += Math.max(r(t), 1);
|
|
299
|
+
o = e;
|
|
300
|
+
}
|
|
301
|
+
} else o = n * Math.max(t.estimateSize, 1);
|
|
302
|
+
let c = Math.max(a - t.viewportHeight, 0), l = p(o, 0, c);
|
|
303
|
+
(t.scrollOffset ?? 0) !== l && (t = {
|
|
304
|
+
...t,
|
|
305
|
+
scrollOffset: l
|
|
306
|
+
}, s());
|
|
307
|
+
},
|
|
308
|
+
getVirtualItems() {
|
|
309
|
+
return i.items;
|
|
310
|
+
},
|
|
311
|
+
getTotalSize() {
|
|
312
|
+
return i.totalSize;
|
|
313
|
+
},
|
|
314
|
+
getOffsetForIndex(e) {
|
|
315
|
+
if (e <= 0) return 0;
|
|
316
|
+
let n = Math.max(t.count, 0), i = Math.min(e, n);
|
|
317
|
+
if (typeof t.estimateSize == "function") {
|
|
318
|
+
let e = r();
|
|
319
|
+
if (e) return e[i] ?? 0;
|
|
320
|
+
let n = 0, a = t.estimateSize;
|
|
321
|
+
for (let e = 0; e < i; e += 1) n += Math.max(a(e), 1);
|
|
322
|
+
return n;
|
|
323
|
+
}
|
|
324
|
+
return i * Math.max(t.estimateSize, 1);
|
|
325
|
+
},
|
|
326
|
+
getSizeForIndex(e) {
|
|
327
|
+
return e < 0 || e >= t.count ? 0 : typeof t.estimateSize == "function" ? Math.max(t.estimateSize(e), 1) : Math.max(t.estimateSize, 1);
|
|
328
|
+
},
|
|
329
|
+
getState() {
|
|
330
|
+
return i;
|
|
331
|
+
},
|
|
332
|
+
subscribe(e) {
|
|
333
|
+
return a.add(e), () => a.delete(e);
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
//#endregion
|
|
338
|
+
//#region ../grid/dist/virtualization/svelte-virtualizer.svelte.js
|
|
339
|
+
function C(r) {
|
|
340
|
+
let i = S(r), a = t(0);
|
|
341
|
+
return i.subscribe(() => {
|
|
342
|
+
n(a, e(a) + 1);
|
|
343
|
+
}), {
|
|
344
|
+
get version() {
|
|
345
|
+
return e(a);
|
|
346
|
+
},
|
|
347
|
+
setOptions: i.setOptions,
|
|
348
|
+
measure: i.measure,
|
|
349
|
+
setScrollOffset: i.setScrollOffset,
|
|
350
|
+
setViewportHeight: i.setViewportHeight,
|
|
351
|
+
scrollToIndex: i.scrollToIndex,
|
|
352
|
+
getVirtualItems: i.getVirtualItems,
|
|
353
|
+
getTotalSize: i.getTotalSize,
|
|
354
|
+
getOffsetForIndex: i.getOffsetForIndex,
|
|
355
|
+
getSizeForIndex: i.getSizeForIndex,
|
|
356
|
+
getState: i.getState
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
//#endregion
|
|
360
|
+
export { s as a, c, f as i, v as n, i as o, S as r, o as s, C as t };
|
|
@@ -24,7 +24,7 @@ function o(e) {
|
|
|
24
24
|
for (let t of l) if (t && typeof t == "object") for (let n of Object.keys(t)) e.add(n);
|
|
25
25
|
for (let t of c) {
|
|
26
26
|
let n = t.field;
|
|
27
|
-
if (!n || t.fieldFn || e.has(n)) continue;
|
|
27
|
+
if (!n || t.fieldFn || t.fieldType || e.has(n)) continue;
|
|
28
28
|
let r = s(n, [...e]);
|
|
29
29
|
o.push(`[svgrid] Column field "${n}" does not exist on your row data, so that column renders empty.${r ? ` Did you mean "${r}"?` : ""} Available keys: ${[...e].slice(0, 12).join(", ")}. See ${i}`);
|
|
30
30
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "commercial",
|
|
5
5
|
"url": "https://svgrid.com/pricing"
|
|
6
6
|
},
|
|
7
|
-
"version": "3.1.
|
|
7
|
+
"version": "3.1.9",
|
|
8
8
|
"description": "Enterprise feature pack for SvGrid: the server-side row model (lazy grouping, tree, pivot, transactions, selection across unloaded rows), Excel (xlsx) and PDF export, Excel/CSV/JSON import, pivot tables with a drag-and-drop designer, paginated print, Kanban board and scheduler renderers, no-code alerts and batch editing. CSV, TSV and JSON export are already free in @svgrid/grid. Requires a paid license key.",
|
|
9
9
|
"license": "SEE LICENSE IN LICENSE",
|
|
10
10
|
"author": "jQWidgets <sales@jqwidgets.com>",
|
|
@@ -57,6 +57,16 @@
|
|
|
57
57
|
"svelte": "./dist/server/index.js",
|
|
58
58
|
"import": "./dist/server/index.js"
|
|
59
59
|
},
|
|
60
|
+
"./fields": {
|
|
61
|
+
"types": "./dist/fields/index.d.ts",
|
|
62
|
+
"svelte": "./dist/fields/index.js",
|
|
63
|
+
"import": "./dist/fields/index.js"
|
|
64
|
+
},
|
|
65
|
+
"./base": {
|
|
66
|
+
"types": "./dist/base/index.d.ts",
|
|
67
|
+
"svelte": "./dist/base/index.js",
|
|
68
|
+
"import": "./dist/base/index.js"
|
|
69
|
+
},
|
|
60
70
|
"./worker": {
|
|
61
71
|
"types": "./dist/worker/index.d.ts",
|
|
62
72
|
"import": "./dist/worker/index.js"
|
|
@@ -105,7 +115,7 @@
|
|
|
105
115
|
"jszip": "^3.10.0",
|
|
106
116
|
"pdfmake": "^0.2.0",
|
|
107
117
|
"svelte": "^5.0.0",
|
|
108
|
-
"@svgrid/grid": "^3.0.
|
|
118
|
+
"@svgrid/grid": "^3.0.12"
|
|
109
119
|
},
|
|
110
120
|
"peerDependenciesMeta": {
|
|
111
121
|
"jszip": {
|
|
@@ -116,6 +126,7 @@
|
|
|
116
126
|
}
|
|
117
127
|
},
|
|
118
128
|
"devDependencies": {
|
|
129
|
+
"@electric-sql/pglite": "^0.5.4",
|
|
119
130
|
"@sveltejs/package": "^2.5.7",
|
|
120
131
|
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
121
132
|
"jszip": "^3.10.1",
|
|
@@ -123,7 +134,7 @@
|
|
|
123
134
|
"svelte": "^5.55.5",
|
|
124
135
|
"typescript": "6.0.3",
|
|
125
136
|
"vite": "^8.2.1",
|
|
126
|
-
"@svgrid/grid": "^3.0.
|
|
137
|
+
"@svgrid/grid": "^3.0.12"
|
|
127
138
|
},
|
|
128
139
|
"repository": {
|
|
129
140
|
"type": "git",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SvDateTimePicker-DCPg7WGN.js","./rolldown-runtime-Dd_uD5pT.js","./disclose-version-CIm4S9xS.js","./editor-contract-Bpoa7A5g.js","./date-format-B8JbEtIG.js","./date-format-DKS-z0xS.css","./popover-CUkLsvRX.js","./dismissable-ChWRPkoa.js","./SvDateTimePicker-DPv09DIT.css","./SvDateRangeInput-BBRzrQeg.js","./SvDateRangeInput-C0iCCZ8o.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{$ as e,A as t,C as n,D as r,E as i,H as a,I as o,K as s,L as c,M as l,P as u,R as d,U as f,W as p,X as m,Z as h,_t as g,at as _,b as v,bt as y,c as b,ct as x,dt as S,et as C,f as w,g as T,it as E,k as D,m as ee,mt as O,nt as k,p as A,pt as j,r as M,rt as N,st as P,v as te,vt as F,x as I,y as ne,z as L}from"./disclose-version-CIm4S9xS.js";import{d as re,t as ie,u as R}from"./SvListBox-BlmmzYcU.js";import{S as ae,h as oe,u as se,w as ce}from"./SvGrid.helpers-DE5mmORW.js";import{t as le}from"./preload-helper-HclGiUj8.js";import{n as ue}from"./dismissable-ChWRPkoa.js";var de=d(`<option> </option>`),fe=d(`<input class="sv-grid-menu-condition-value" placeholder="To"/>`),pe=d(`<input class="sv-grid-menu-condition-value"/> <!>`,1),me=d(`<option> </option>`),he=d(`<input class="sv-grid-menu-condition-value" placeholder="To"/>`),ge=d(`<input class="sv-grid-menu-condition-value"/> <!>`,1),_e=d(`<div class="sv-grid-menu-join" role="radiogroup" aria-label="Combine conditions"><button type="button">AND</button> <button type="button">OR</button> <button type="button" class="sv-grid-menu-join-x" title="Remove second condition" aria-label="Remove second condition"><!></button></div> <select class="sv-grid-menu-operator-select" aria-label="Second filter condition"></select> <!>`,1),ve=d(`<button type="button" class="sv-grid-menu-add-cond">+ Add condition</button>`),ye=d(`<!> <!>`,1),be=d(`<span class="sv-grid-menu-head-note">and the condition above</span>`),xe=d(`<span class="sv-grid-menu-head-note"> </span>`),Se=d(`<div class="sv-grid-facet-empty">No values</div>`),Ce=d(`<div class="sv-grid-facet-note"> </div>`),we=d(`<div class="sv-grid-menu-filter"><div class="sv-grid-menu-filter-head"><span class="sv-grid-header-icon"><!></span> Filter
|
|
3
|
-
condition</div> <select class="sv-grid-menu-operator-select" aria-label="Filter condition"></select> <!> <div class="sv-grid-menu-sep"></div> <div class="sv-grid-menu-filter-head">Values <!></div> <span class="sv-grid-menu-search-wrap"><!> <input class="sv-grid-menu-search" placeholder="Search values..."/></span> <label class="sv-grid-facet sv-grid-facet-all"><input type="checkbox"/> <span class="sv-grid-facet-label"> </span></label> <!> <!> <div class="sv-grid-menu-actions"><button type="button" class="sv-grid-menu-btn">Clear filter</button> <button type="button" class="sv-grid-menu-btn sv-grid-menu-btn-primary">Done</button></div></div>`),Te=d(`<div role="tooltip"> </div>`),Ee=d(`<div class="sv-grid-menu-backdrop" role="presentation"></div>`),De=d(`<button type="button" role="tab">Filter</button>`),Oe=d(`<div class="sv-grid-menu-tabs" role="tablist"><button type="button" role="tab">General</button> <!> <button type="button" role="tab">Columns</button></div>`),ke=d(`<div class="sv-grid-menu-filter-head">Visible columns</div> <!>`,1),Ae=d(`<button type="button" class="sv-grid-menu-item" role="menuitem"><span class="sv-grid-header-icon"><!></span> Sort
|
|
4
|
-
ascending</button> <button type="button" class="sv-grid-menu-item" role="menuitem"><span class="sv-grid-header-icon"><!></span> Sort
|
|
5
|
-
descending</button> <button type="button" class="sv-grid-menu-item" role="menuitem"><span class="sv-grid-header-icon"><!></span> Remove sort</button>`,1),je=d(`<div class="sv-grid-menu-sep"></div> <button type="button" class="sv-grid-menu-item" role="menuitem"><span class="sv-grid-header-icon"><!></span> Pin to left</button> <button type="button" class="sv-grid-menu-item" role="menuitem"><span class="sv-grid-header-icon"><!></span> Pin to right</button> <button type="button" class="sv-grid-menu-item" role="menuitem"><span class="sv-grid-header-icon"><!></span> Unpin column</button>`,1),Me=d(`<button type="button" class="sv-grid-menu-item" role="menuitem"><span class="sv-grid-header-icon"><!></span> Autosize
|
|
6
|
-
this column</button>`),Ne=d(`<div class="sv-grid-menu-sep"></div> <button type="button" class="sv-grid-menu-item" role="menuitem"><span class="sv-grid-header-icon"><!></span> Group
|
|
7
|
-
by this column</button> <button type="button" class="sv-grid-menu-item" role="menuitem"><span class="sv-grid-header-icon"><!></span> Remove grouping</button>`,1),z=d(`<button type="button" role="menuitem" aria-haspopup="menu"><span class="sv-grid-header-icon"><!></span> Choose columns <span class="sv-grid-header-icon sv-grid-menu-item-chevron"><!></span></button>`),Pe=d(`<!> <!> <div class="sv-grid-menu-sep"></div> <!> <button type="button" class="sv-grid-menu-item" role="menuitem"><span class="sv-grid-header-icon"><!></span> Autosize
|
|
8
|
-
all columns</button> <!> <div class="sv-grid-menu-sep"></div> <!> <button type="button" class="sv-grid-menu-item" role="menuitem"><span class="sv-grid-header-icon"><!></span> Reset columns</button>`,1),Fe=d(`<div class="sv-grid-menu sv-grid-column-menu" role="menu"><!> <!></div>`),Ie=d(`<div class="sv-grid-menu sv-grid-filter-menu" role="menu" tabindex="-1"><!></div>`),Le=d(`<div class="sv-grid-menu sv-grid-choose-columns-menu" role="menu"><div class="sv-grid-menu-filter-head">Visible columns</div> <!></div>`),Re=d(`<button type="button" class="sv-grid-menu-item" role="menuitemradio"><span class="sv-grid-header-icon"><!></span> </button>`),ze=d(`<div class="sv-grid-menu sv-grid-operator-menu" role="menu"></div>`),Be=d(`<div class="sv-grid-facet-empty">No values</div>`),Ve=d(`<div class="sv-grid-menu sv-grid-in-suggest"><!></div>`),B=d(`<div class="sv-grid-menu-sep"></div>`),He=L(`<path></path>`),Ue=L(`<svg class="sv-grid-menu-icon-own" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" focusable="false"></svg>`),We=d(`<span class="sv-grid-menu-icon" aria-hidden="true"><!></span>`),Ge=d(`<button type="button" class="sv-grid-menu-item" role="menuitem"><!><span class="sv-grid-menu-label"> </span></button>`),Ke=d(`<div class="sv-grid-menu-backdrop" role="presentation"></div> <div class="sv-grid-menu sv-grid-context-menu" role="menu"></div>`,1),qe=d(`<div class="sv-grid-menu-backdrop" role="presentation"></div> <div class="sv-grid-menu sv-grid-comment-editor" role="dialog" aria-label="Edit comment"><textarea class="sv-grid-comment-textarea" rows="3" placeholder="Add a comment…"></textarea> <div class="sv-grid-comment-actions"><button type="button" class="sv-grid-comment-remove">Remove</button> <span class="sv-grid-comment-spacer"></span> <button type="button" class="sv-grid-comment-cancel">Cancel</button> <button type="button" class="sv-grid-comment-save">Save</button></div></div>`,1),Je=d(`<!> <!> <!> <!> <!> <!> <!> <!> <!>`,1);function V(a,d){O(d,!0);let L=(e,t=y)=>{let n=S(()=>s(J).find(e=>e.id===t())),a=S(()=>s(dt)(s(n))),h=S(()=>s(H)[t()]?.operator??s(Y)(s(n))),v=S(()=>oe(s(n)?.columnDef.editorType??`text`)),x=S(()=>ce(s(n)?.columnDef.editorType)&&s(h)!==`isBlank`&&s(h)!==`isNotBlank`&&s(h)!==`regex`&&s(h)!==`in`&&s(h)!==`notIn`),C=S(()=>s(Et).length!==s(Tt).length),O=S(()=>s(h)===`isBlank`||s(h)===`isNotBlank`||(s(H)[t()]?.value??``).trim().length>0),k=S(()=>s(Ft).size),j=S(()=>s(Tt).length);var M=we(),P=N(M),L=N(P),re=N(L);r(re,()=>d.icon,()=>`filter`),F(L),g(),F(P);var R=_(P,2);D(R,21,()=>s(a),e=>e.value,(e,t)=>{var r=de(),i=N(r,!0);F(r);var a={};m(e=>{u(i,e),a!==(a=s(t).value)&&(r.value=(r.__value=s(t).value)??``)},[()=>s(ft)(s(t),s(n))]),o(e,r)}),F(R);var le;te(R);var ue=_(R,2),Te=e=>{let g=S(()=>s(H)[t()]);var y=ye(),b=E(y),C=e=>{var n=c(),r=E(n),a=e=>{var n=c(),r=E(n),a=e=>{let n=S(()=>s(kt)),r=S(()=>se(s(H)[t()]?.value)),a=S(()=>se(s(H)[t()]?.valueTo));var l=c(),u=E(l);{let e=S(()=>s(r)&&s(a)?[s(r),s(a)]:null);i(u,()=>s(n),(n,r)=>{r(n,{get value(){return s(e)},formatString:`yyyy-MM-dd`,block:!0,placeholder:`Pick a range...`,onChange:e=>{s(lt)(t(),e?ae(e[0]):``),s(ut)(t(),e?ae(e[1]):``)}})})}o(e,l)};l(r,e=>{s(kt)&&e(a)}),o(e,n)},u=e=>{let n=S(()=>s(Ot));var r=c(),a=E(r);{let e=S(()=>(s(H)[t()]?.value??``)||null);i(a,()=>s(n),(n,r)=>{r(n,{get value(){return s(e)},formatString:`yyyy-MM-dd`,dropDownDisplayMode:`calendar`,block:!0,nullable:!0,placeholder:`Filter value...`,onChange:e=>s(lt)(t(),ae(e))})})}o(e,r)};l(r,e=>{s(h)===`between`?e(a):s(Ot)&&e(u,1)}),o(e,n)},ee=e=>{let n=S(()=>s(h)===`in`||s(h)===`notIn`);var r=pe(),i=E(r);w(i);var a=_(i,2),c=e=>{var n=fe();w(n),m(()=>{A(n,`type`,s(v)),T(n,s(H)[t()]?.valueTo??``)}),f(`input`,n,e=>s(ut)(t(),e.currentTarget.value)),o(e,n)};l(a,e=>{s(h)===`between`&&e(c)}),m(()=>{A(i,`type`,s(h)===`regex`?`text`:s(v)),T(i,s(H)[t()]?.value??``),A(i,`placeholder`,s(h)===`between`?`From`:s(n)?`value, value...`:s(h)===`regex`?`Pattern...`:`Filter value...`)}),p(`focus`,i,e=>{Mt(t())&&Wt(e.currentTarget,t())}),p(`blur`,i,()=>{Mt(t())&&s(Bt)()}),f(`input`,i,e=>{let r=e.currentTarget;s(lt)(t(),r.value),s(n)&&Gt(r,t())}),o(e,r)};l(b,e=>{s(x)?e(C):e(ee,-1)});var O=_(b,2),k=e=>{let i=S(()=>s(g).operator2??s(Y)(s(n)));var c=_e(),p=E(c),h=N(p);let y;var b=_(h,2);let x;var C=_(b,2),ee=N(C);r(ee,()=>d.icon,()=>`remove`),F(C),F(p);var O=_(p,2);D(O,21,()=>s(a),e=>e.value,(e,t)=>{var r=me(),i=N(r,!0);F(r);var a={};m(e=>{u(i,e),a!==(a=s(t).value)&&(r.value=(r.__value=s(t).value)??``)},[()=>s(ft)(s(t),s(n))]),o(e,r)}),F(O);var k;te(O);var j=_(O,2),M=e=>{var n=ge(),r=E(n);w(r);var a=_(r,2),c=e=>{var n=he();w(n),m(()=>{A(n,`type`,s(v)),T(n,s(g).valueTo2??``)}),f(`input`,n,e=>X(t(),{valueTo2:e.currentTarget.value})),o(e,n)};l(a,e=>{s(i)===`between`&&e(c)}),m(()=>{A(r,`type`,s(v)),T(r,s(g).value2??``),A(r,`placeholder`,s(i)===`between`?`From`:`Filter value...`)}),f(`input`,r,e=>X(t(),{value2:e.currentTarget.value})),o(e,n)};l(j,e=>{s(i)!==`isBlank`&&e(M)}),m(()=>{y=I(h,1,``,null,y,{"is-on":(s(g).join??`AND`)===`AND`}),x=I(b,1,``,null,x,{"is-on":s(g).join===`OR`}),k!==(k=s(i))&&(O.value=(O.__value=s(i))??``,ne(O,s(i)))}),f(`click`,h,()=>X(t(),{join:`AND`})),f(`click`,b,()=>X(t(),{join:`OR`})),f(`click`,C,()=>X(t(),{operator2:void 0,value2:void 0,valueTo2:void 0,join:void 0})),f(`change`,O,e=>X(t(),{operator2:e.currentTarget.value})),o(e,c)},j=e=>{var r=ve();f(`click`,r,()=>X(t(),{operator2:s(Y)(s(n)),value2:``,join:`AND`})),o(e,r)};l(O,e=>{s(g)?.operator2?e(k):e(j,-1)}),o(e,y)};l(ue,e=>{s(h)!==`isBlank`&&s(h)!==`isNotBlank`&&e(Te)});var Ee=_(ue,4),De=_(N(Ee)),Oe=e=>{var t=be();o(e,t)},ke=e=>{var t=xe(),n=N(t);F(t),m(()=>u(n,`${s(k)??``} of ${s(j)??``}`)),o(e,t)};l(De,e=>{s(O)?e(Oe):s(k)<s(j)&&e(ke,1)}),F(Ee);var Ae=_(Ee,2),je=N(Ae);r(je,()=>d.icon,()=>`search`);var Me=_(je,2);w(Me),F(Ae);var Ne=_(Ae,2),z=N(Ne);w(z);var Pe=_(z,2),Fe=N(Pe,!0);F(Pe),F(Ne);var Ie=_(Ne,2),Le=e=>{{let n=S(()=>s(Pt).length>Ut);ie(e,{block:!0,checkbox:!0,multiple:!0,get virtual(){return s(n)},get rows(){return s(Dt)},rowHeight:24,size:`sm`,ariaLabel:`Filter values`,get options(){return s(Pt)},get value(){return s(Ft)},onChange:e=>s(It)(t(),e)})}},Re=e=>{var t=Se();o(e,t)};l(Ie,e=>{s(Pt).length?e(Le):e(Re,-1)});var ze=_(Ie,2),Be=e=>{var t=Ce(),n=N(t);F(t),m(()=>u(n,`Showing ${s(Et).length??``} of ${s(Tt).length??``}`)),o(e,t)};l(ze,e=>{s(Tt).length>s(Et).length&&e(Be)});var Ve=_(ze,2),B=N(Ve),He=_(B,2);F(Ve),F(M),m((e,t)=>{le!==(le=s(h))&&(R.value=(R.__value=s(h))??``,ne(R,s(h))),ee(z,e),u(Fe,s(C)?`(Select all results)`:`(Select all)`),B.disabled=t},[()=>s(Vt)(t()),()=>!s(gt)(t())]),f(`change`,R,e=>s(ct)(t(),e.currentTarget.value)),b(Me,()=>V().columnMenuSearch,e=>V().columnMenuSearch=e),f(`change`,z,()=>s(Ht)(t())),f(`click`,B,()=>s(Yt)(t())),f(`click`,He,function(...e){s(Z)?.apply(this,e)}),o(e,M)},V=M(d,`ctrl`,7),Ye=S(()=>V().groupingControlsEnabled),H=S(()=>V().filterMenuValues),U=S(()=>V().tooltip),W=S(()=>V().columnMenuFor),G=S(()=>V().columnMenuPos),K=S(()=>V().filterMenuFor),Xe=S(()=>V().filterMenuPos),Ze=S(()=>V().operatorMenuFor),Qe=S(()=>V().operatorMenuPos),q=S(()=>V().chooseColumnsPos),$e=S(()=>V().showColumnFiltersEffective),et=S(()=>V().props.columnMenuTabs===!0),tt=S(()=>V().grid),J=S(()=>V().allColumns),nt=S(()=>V().isColumnPinned),rt=S(()=>V().pinColumnLeft),it=S(()=>V().pinColumnRight),at=S(()=>V().unpinColumn),ot=S(()=>V().sortDirectionByColumn),st=S(()=>V().groupingColumns),ct=S(()=>V().updateFilterOperator),lt=S(()=>V().updateFilterMenuValue),ut=S(()=>V().updateFilterMenuValueTo),dt=S(()=>V().operatorsForColumn),Y=S(()=>V().defaultOperatorFor),ft=S(()=>V().operatorLabelFor),pt=S(()=>V().filterRowValues),mt=S(()=>V().inSuggestFor),ht=S(()=>V().inSuggestPos);function X(e,t){let n=s(J).find(t=>t.id===e),r=V().filterMenuValues[e]??{operator:s(Y)(n),value:``};V().filterMenuValues={...V().filterMenuValues,[e]:{...r,...t}}}let gt=S(()=>V().isColumnFiltered),Z=S(()=>V().closeMenus);h(()=>{if(!(s(W)||s(K)||s(Ze)||s(q)||s(Xt)||s($)))return;let e=()=>{s(Z)(),s(Q)(),V().commentEditFor&&s($t)()},t=ue(()=>Array.from(document.querySelectorAll(`.sv-grid-menu[data-svgrid-menu="${V().gridDomId}"]`)),e);return window.addEventListener(`resize`,e),()=>{t(),window.removeEventListener(`resize`,e)}});let _t=S(()=>V().autosizeColumn),vt=S(()=>V().autosizeAllColumns),yt=S(()=>V().resetColumns),bt=S(()=>V().openChooseColumns),xt=S(()=>V().sortColumnFromMenu),St=S(()=>V().clearColumnSort),Ct=S(()=>V().groupByColumnFromMenu),wt=S(()=>V().clearGroupingFromMenu),Tt=S(()=>V().columnMenuFacetValues),Et=S(()=>V().columnMenuVisibleFacets),Dt=S(function(){if(typeof window>`u`)return 7;let e=(s(K)?s(Xe).y:s(G).y)||0,t=window.innerHeight-e-320;return Math.max(7,Math.min(16,Math.floor(t/24)))}),Ot=x(null),kt=x(null);h(()=>{let e=s(K)??s(W);if(!e)return;let t=s(J).find(t=>t.id===e);ce(t?.columnDef.editorType)&&(s(Ot)||le(()=>import(`./SvDateTimePicker-DCPg7WGN.js`).then(e=>e.n).then(e=>P(Ot,e.default,!0)),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url),s(kt)||le(()=>import(`./SvDateRangeInput-BBRzrQeg.js`).then(e=>e.n).then(e=>P(kt,e.default,!0)),__vite__mapDeps([9,1,2,3,4,5,6,10]),import.meta.url))});function At(e,t){let n=()=>{let t=V().contextMenuPos,n=e.getBoundingClientRect();if(!n.width&&!n.height)return;let r=Math.max(8,Math.min(t.x,window.innerWidth-n.width-8)),i=Math.max(8,Math.min(t.y,window.innerHeight-n.height-8));(r!==t.x||i!==t.y)&&(V().contextMenuPos={x:r,y:i})};return n(),{update:n}}function jt(e){requestAnimationFrame(()=>{e.querySelector(`.sv-grid-menu-condition-value, .sv-dtp__input, .sv-dri__input, .sv-grid-menu-search`)?.focus({preventScroll:!0})})}function Mt(e){let t=s(J).find(t=>t.id===e),n=s(H)[e]?.operator??s(Y)(t);return n===`in`||n===`notIn`}function Nt(e){if(e.key!==`Enter`||e.shiftKey)return;let t=e.target;t?.closest(`.sv-listbox`)||t?.tagName===`BUTTON`||(e.preventDefault(),s(Z)())}let Pt=S(()=>V().columnMenuFacetOptions),Ft=S(()=>V().columnMenuSelectedFacets),It=S(()=>V().setFacetSelection),Lt=S(()=>V().setFilterTokens),Rt=S(()=>V().inSuggestOptions),zt=S(()=>V().openInSuggest),Bt=S(()=>V().closeInSuggest),Vt=S(()=>V().isAllFacetsChecked),Ht=S(()=>V().toggleAllFacets),Ut=40;function Wt(e,t){s(zt)(e,t),V().inSuggestQuery=re(e.value)}function Gt(e,t){V().inSuggestQuery=re(e.value),V().inSuggestFor!==t&&s(zt)(e,t)}function Kt(e){return e.map(e=>({value:e.id,label:typeof e.columnDef.header==`string`?e.columnDef.header:e.id}))}function qt(e){let t=new Set;for(let n of e)V().hiddenColumns[n.id]||t.add(n.id);return t}function Jt(e,t){let n={...V().hiddenColumns};for(let r of e)t.has(r.id)?delete n[r.id]:n[r.id]=!0;V().hiddenColumns=n}let Yt=S(()=>V().clearColumnFilter),Xt=S(()=>V().contextMenuFor),Zt=S(()=>V().contextMenuPos),Qt=S(()=>V().contextMenuItems),Q=S(()=>V().closeContextMenu),$=S(()=>V().commentEditFor),$t=S(()=>V().saveComment),en=S(()=>V().removeComment),tn=S(()=>V().closeCommentEditor);function nn(e){s(Xt)&&(e.key===`Escape`||e.key===`Esc`)&&(e.preventDefault(),e.stopPropagation(),s(Q)())}var rn=Je();p(`keydown`,k,nn);var an=E(rn),on=e=>{var t=Te();let n;var r=N(t,!0);F(t),m(()=>{n=I(t,1,`sv-grid-tooltip`,null,n,{"sv-grid-tooltip-above":!s(U).below}),v(t,`left: ${s(U).x}px; top: ${s(U).y}px; ${s(U).below?``:`transform: translateY(-100%);`}`),u(r,s(U).text)}),o(e,t)};l(an,e=>{s(U)&&e(on)});var sn=_(an,2),cn=e=>{var t=Ee();f(`click`,t,function(...e){s(Z)?.apply(this,e)}),o(e,t)};l(sn,e=>{(s(W)||s(K)||s(Ze)||s(q))&&e(cn)});var ln=_(sn,2),un=e=>{let t=S(()=>s(W)),n=S(()=>s(J).find(e=>e.id===s(t))),i=S(()=>s(n)?.getCanSort?.()??!1),a=S(()=>s(n)?.columnDef.field!=null&&s(n)?.columnDef.filterable!==!1),c=S(()=>V().columnMenuTab);var u=Fe(),p=N(u),h=e=>{var t=Oe(),n=N(t);let r;var i=_(n,2),u=e=>{var t=De();let n;m(()=>{n=I(t,1,`sv-grid-menu-tab`,null,n,{"is-active":s(c)===`filter`}),A(t,`aria-selected`,s(c)===`filter`)}),f(`click`,t,()=>V().columnMenuTab=`filter`),o(e,t)};l(i,e=>{s(a)&&s($e)&&e(u)});var d=_(i,2);let p;F(t),m(()=>{r=I(n,1,`sv-grid-menu-tab`,null,r,{"is-active":s(c)===`general`}),A(n,`aria-selected`,s(c)===`general`),p=I(d,1,`sv-grid-menu-tab`,null,p,{"is-active":s(c)===`columns`}),A(d,`aria-selected`,s(c)===`columns`)}),f(`click`,n,()=>V().columnMenuTab=`general`),f(`click`,d,()=>V().columnMenuTab=`columns`),o(e,t)};l(p,e=>{s(et)&&e(h)});var y=_(p,2),b=e=>{L(e,()=>s(t))},x=e=>{let t=S(()=>s(tt).getAllColumns());var n=ke(),r=_(E(n),2);{let e=S(()=>s(t).length>40),n=S(()=>Kt(s(t))),i=S(()=>qt(s(t)));ie(r,{block:!0,checkbox:!0,multiple:!0,get virtual(){return s(e)},rows:9,rowHeight:24,size:`sm`,ariaLabel:`Visible columns`,get options(){return s(n)},get value(){return s(i)},onChange:e=>Jt(s(t),e)})}o(e,n)},C=e=>{var n=Pe(),a=E(n),c=e=>{var n=Ae(),i=E(n),a=N(i),c=N(a);r(c,()=>d.icon,()=>`sort-asc`),F(a),g(),F(i);var l=_(i,2),u=N(l),p=N(u);r(p,()=>d.icon,()=>`sort-desc`),F(u),g(),F(l);var h=_(l,2),v=N(h),y=N(v);r(y,()=>d.icon,()=>`x`),F(v),g(),F(h),m(()=>h.disabled=!s(ot)[s(t)]),f(`click`,i,()=>s(xt)(s(t),!1)),f(`click`,l,()=>s(xt)(s(t),!0)),f(`click`,h,()=>s(St)(s(t))),o(e,n)};l(a,e=>{s(i)&&e(c)});var u=_(a,2),p=e=>{let n=S(()=>s(nt)(s(t)));var i=je(),a=_(E(i),2),c=N(a),l=N(c);r(l,()=>d.icon,()=>`pin-left`),F(c),g(),F(a);var u=_(a,2),p=N(u),h=N(p);r(h,()=>d.icon,()=>`pin-right`),F(p),g(),F(u);var v=_(u,2),y=N(v),b=N(y);r(b,()=>d.icon,()=>`unpin`),F(y),g(),F(v),m(()=>{a.disabled=s(n)===`left`,u.disabled=s(n)===`right`,v.disabled=!s(n)}),f(`click`,a,()=>s(rt)(s(t))),f(`click`,u,()=>s(it)(s(t))),f(`click`,v,()=>s(at)(s(t))),o(e,i)};l(u,e=>{s(t)&&e(p)});var h=_(u,4),v=e=>{var n=Me(),i=N(n),a=N(i);r(a,()=>d.icon,()=>`autosize`),F(i),g(),F(n),f(`click`,n,()=>{s(_t)(s(t)),s(Z)()}),o(e,n)},y=S(()=>V().columnResizable(s(t)));l(h,e=>{s(y)&&e(v)});var b=_(h,2),x=N(b),C=N(x);r(C,()=>d.icon,()=>`autosize`),F(x),g(),F(b);var w=_(b,2),T=e=>{var n=Ne(),i=_(E(n),2),a=N(i),c=N(a);r(c,()=>d.icon,()=>`group`),F(a),g(),F(i);var l=_(i,2),u=N(l),p=N(u);r(p,()=>d.icon,()=>`x`),F(u),g(),F(l),m((e,t)=>{i.disabled=e,l.disabled=t},[()=>s(st).includes(s(t)),()=>!s(st).includes(s(t))]),f(`click`,i,()=>s(Ct)(s(t))),f(`click`,l,()=>s(wt)(s(t))),o(e,n)};l(w,e=>{s(Ye)&&e(T)});var D=_(w,4),ee=e=>{var t=z();let n;var i=N(t),a=N(i);r(a,()=>d.icon,()=>`columns`),F(i);var c=_(i,2),l=N(c);r(l,()=>d.icon,()=>`chevron-down`),F(c),F(t),m(()=>{n=I(t,1,`sv-grid-menu-item`,null,n,{"is-open":s(q)!==null}),A(t,`aria-expanded`,s(q)!==null)}),f(`click`,t,e=>s(bt)(e)),o(e,t)};l(D,e=>{s(et)||e(ee)});var O=_(D,2),k=N(O),j=N(k);r(j,()=>d.icon,()=>`reset`),F(k),g(),F(O),f(`click`,b,()=>{s(vt)(),s(Z)()}),f(`click`,O,()=>{s(yt)(),s(Z)()}),o(e,n)};l(y,e=>{s(et)&&s(c)===`filter`&&s(a)&&s($e)?e(b):s(et)&&s(c)===`columns`?e(x,1):e(C,-1)}),F(u),m(()=>{A(u,`data-svgrid-menu`,V().gridDomId),v(u,`left: ${s(G).x}px; top: ${s(G).y}px; max-height: calc(100vh - ${s(G).y}px - 12px);`)}),o(e,u)};l(ln,e=>{s(W)&&e(un)});var dn=_(ln,2),fn=e=>{var t=Ie(),r=N(t);L(r,()=>s(K)),F(t),n(t,e=>jt?.(e)),m(()=>{A(t,`data-svgrid-menu`,V().gridDomId),v(t,`left: ${s(Xe).x}px; top: ${s(Xe).y}px; max-height: calc(100vh - ${s(Xe).y}px - 12px);`)}),f(`keydown`,t,Nt),o(e,t)};l(dn,e=>{s(K)&&s($e)&&e(fn)});var pn=_(dn,2),mn=e=>{let t=S(()=>s(tt).getAllColumns());var n=Le(),r=_(N(n),2);{let e=S(()=>s(t).length>40),n=S(()=>Kt(s(t))),i=S(()=>qt(s(t)));ie(r,{block:!0,checkbox:!0,multiple:!0,get virtual(){return s(e)},rows:11,rowHeight:24,size:`sm`,ariaLabel:`Visible columns`,get options(){return s(n)},get value(){return s(i)},onChange:e=>Jt(s(t),e)})}F(n),m(()=>{A(n,`data-svgrid-menu`,V().gridDomId),v(n,`left: ${s(q).x}px; top: ${s(q).y}px;`)}),o(e,n)};l(pn,e=>{s(q)&&e(mn)});var hn=_(pn,2),gn=e=>{let t=S(()=>s(Ze)),n=S(()=>s(J).find(e=>e.id===s(t))),i=S(()=>s(dt)(s(n))),a=S(()=>s(H)[s(t)]?.operator??s(Y)(s(n)));var c=ze();D(c,21,()=>s(i),e=>e.value,(e,i)=>{var c=Re(),l=N(c),p=N(l);r(p,()=>d.icon,()=>s(i).iconName),F(l);var h=_(l);F(c),m(e=>{A(c,`aria-checked`,s(a)===s(i).value),u(h,` ${e??``}`)},[()=>s(ft)(s(i),s(n))]),f(`click`,c,()=>{s(ct)(s(t),s(i).value),s(Z)()}),o(e,c)}),F(c),m(()=>{A(c,`data-svgrid-menu`,V().gridDomId),v(c,`left: ${s(Qe).x}px; top: ${s(Qe).y}px;`)}),o(e,c)};l(hn,e=>{s(Ze)&&e(gn)});var _n=_(hn,2),vn=e=>{let t=S(()=>s(mt)),n=S(()=>new Set(R(s(pt)[s(t)]??``)));var r=Ve(),i=N(r),a=e=>{{let r=S(()=>s(Rt).length>40);ie(e,{block:!0,checkbox:!0,multiple:!0,get virtual(){return s(r)},rows:8,rowHeight:26,size:`sm`,ariaLabel:`Filter values`,get options(){return s(Rt)},get value(){return s(n)},onChange:e=>{let n=new Set(e),r=re(s(pt)[s(t)]??``);r&&n.delete(r),s(Lt)(s(t),[...n]),V().inSuggestQuery=``}})}},c=e=>{var t=Be();o(e,t)};l(i,e=>{s(Rt).length?e(a):e(c,-1)}),F(r),m(()=>{A(r,`data-svgrid-menu`,V().gridDomId),v(r,`left: ${s(ht).x}px; top: ${s(ht).y}px;`)}),f(`mousedown`,r,e=>e.preventDefault()),o(e,r)};l(_n,e=>{s(mt)&&e(vn)});var yn=_(_n,2),bn=e=>{let i=S(()=>s(Qt)()),a=S(()=>s(i).some(e=>e.icon));var p=Ke(),h=E(p),g=_(h,2);D(g,21,()=>s(i),e=>e.key,(e,n)=>{var i=c(),p=E(i),h=e=>{var t=B();o(e,t)},g=e=>{var i=Ge(),p=N(i),h=e=>{var i=We(),a=N(i),u=e=>{var t=c(),i=E(t);r(i,()=>d.icon,()=>s(n).icon),o(e,t)},f=e=>{var r=Ue();D(r,21,()=>s(n).icon.paths,t,(e,t)=>{var n=He();m(()=>{A(n,`d`,s(t).d),A(n,`fill`,s(t).fill?`currentColor`:`none`),A(n,`stroke-width`,s(t).width),A(n,`stroke-dasharray`,s(t).dash)}),o(e,n)}),F(r),o(e,r)};l(a,e=>{typeof s(n).icon==`string`?e(u):s(n).icon&&e(f,1)}),F(i),o(e,i)};l(p,e=>{s(a)&&e(h)});var g=_(p),v=N(g,!0);F(g),F(i),m(()=>{i.disabled=s(n).disabled,u(v,s(n).label)}),f(`click`,i,()=>{s(n).run?.(),s(Q)()}),o(e,i)};l(p,e=>{s(n).separator?e(h):e(g,-1)}),o(e,i)}),F(g),n(g,(e,t)=>At?.(e,t),()=>s(Zt)),m(()=>{A(g,`data-svgrid-menu`,V().gridDomId),v(g,`left: ${s(Zt).x}px; top: ${s(Zt).y}px;`)}),f(`contextmenu`,h,e=>{e.preventDefault(),s(Q)()}),f(`click`,h,function(...e){s(Q)?.apply(this,e)}),o(e,p)};l(yn,e=>{s(Xt)&&e(bn)});var xn=_(yn,2),Sn=t=>{var n=qe(),r=E(n),i=_(r,2),a=N(i);C(a),e(a,!0);var c=_(a,2),l=N(c),u=_(l,4),d=_(u,2);F(c),F(i),m(()=>{A(i,`data-svgrid-menu`,V().gridDomId),v(i,`left: ${s($).x}px; top: ${s($).y}px;`)}),f(`click`,r,function(...e){s(tn)?.apply(this,e)}),f(`keydown`,a,e=>{e.stopPropagation(),e.key===`Escape`&&(e.preventDefault(),s(tn)()),e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),s($t)())}),b(a,()=>V().commentDraft,e=>V().commentDraft=e),f(`click`,l,function(...e){s(en)?.apply(this,e)}),f(`click`,u,function(...e){s(tn)?.apply(this,e)}),f(`click`,d,function(...e){s($t)?.apply(this,e)}),o(t,n)};l(xn,e=>{s($)&&e(Sn)}),o(a,rn),j()}a([`change`,`input`,`click`,`keydown`,`mousedown`,`contextmenu`]);export{V as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./cell-formatting-BWrW_O0n.js";function t(e){let t=``;return e.color&&(t+=`color:${e.color};`),e.fontWeight!=null&&(t+=`font-weight:${e.fontWeight};`),t}function n(e){return Number.isInteger(e)?e.toLocaleString():e.toLocaleString(void 0,{maximumFractionDigits:2})}function r(e,t){return`${e}:${t}`}function i(e){if(!e)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.filter(Boolean).join(` `);if(typeof e==`object`){let t=[];for(let[n,r]of Object.entries(e))r&&t.push(n);return t.join(` `)}return``}function a(e){if(e==null||e===``)return``;if(typeof e==`string`&&/^\d{4}-\d{2}-\d{2}$/.test(e))return e;let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?``:t.toISOString().slice(0,10)}function o(e){if(e==null||e===``)return``;if(typeof e==`string`&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(e))return e;let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?``:t.toISOString().slice(0,16)}function s(e){return String(e).replace(/-native$/,``)}function c(e){if(e instanceof Date)return e;if(typeof e==`string`){let t=e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?/);if(t){let e=new Date;return e.setHours(Math.min(23,+t[1]),Math.min(59,+t[2]),t[3]?+t[3]:0,0),e}}return null}function l(e){return e?`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`:null}function u(e,t){let n=s(e);return n===`date`?a(t):n===`datetime`?o(t):String(t??``)}function d(e){let t=s(e);return t===`number`?`number`:t===`date`?`date`:t===`datetime`?`datetime-local`:t===`time`?`time`:t===`password`?`password`:t===`color`?`color`:`text`}function f(e){if(!e||Number.isNaN(e.getTime()))return``;let t=e=>String(e).padStart(2,`0`);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function p(e){if(!e)return null;let t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);if(!t){let t=new Date(e);return Number.isNaN(t.getTime())?null:t}let n=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isNaN(n.getTime())?null:n}function m(e){if(!e||String(e).endsWith(`-native`))return!1;let t=s(e);return t===`date`||t===`datetime`||t===`time`}function h(e){return s(e)===`number`?`text`:d(e)}function g(e){return/^-?(\d*\.?\d*)(e-?\d*)?$/i.test(e)}function _(e){return e==null||e===``?[]:Array.isArray(e)?e.filter(e=>e!=null&&e!==``):[e]}function v(e,t){let n=e.find(e=>e.value===t||String(e.value)===String(t));return n?n.label:String(t??``)}function y(e,t){return e.find(e=>e.value===t||String(e.value)===String(t))?.color}function b(e){return e?`background: color-mix(in srgb, ${e} 22%, transparent);border-color: color-mix(in srgb, ${e} 45%, transparent);color: color-mix(in srgb, ${e} 80%, var(--sg-fg, #0f172a));`:``}function x(e){let t=s(e);return t===`number`?`sv-grid-cell-editor sv-grid-cell-editor-number`:t===`date`?`sv-grid-cell-editor sv-grid-cell-editor-date`:t===`datetime`?`sv-grid-cell-editor sv-grid-cell-editor-datetime`:t===`color`?`sv-grid-cell-editor sv-grid-cell-editor-color`:`sv-grid-cell-editor`}function S(t){return e(t)}function C(e,t){return Math.max(8,Math.min(e,window.innerWidth-t-8))}function w(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e.replace(/"/g,`\\"`)}function T(e,t){if(e==null||e===``)return NaN;if(t){let t=(e instanceof Date?e:new Date(String(e))).getTime();return Number.isFinite(t)?t:NaN}let n=typeof e==`number`?e:Number(e);return Number.isFinite(n)?n:NaN}function E(e){let t=Math.abs(e),n=t>=1e3?0:t>=100?1:t>=1?2:4;return e.toLocaleString(void 0,{maximumFractionDigits:n})}function D(e){return new Date(e).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`})}export{_ as C,f as S,v as _,w as a,i as b,D as c,h as d,r as f,y as g,d as h,b as i,E as l,x as m,t as n,l as o,u as p,C as r,n as s,S as t,p as u,g as v,m as w,c as x,T as y};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SvGridDropdown-Cjz0H-fI.js","./rolldown-runtime-Dd_uD5pT.js","./disclose-version-CIm4S9xS.js","./popover-CUkLsvRX.js","./SvGridDropdown-CcidB3rm.css","./SvDateTimePicker-DCPg7WGN.js","./editor-contract-Bpoa7A5g.js","./date-format-B8JbEtIG.js","./date-format-DKS-z0xS.css","./dismissable-ChWRPkoa.js","./SvDateTimePicker-DPv09DIT.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{C as e,D as t,E as n,H as r,I as i,K as a,L as o,M as s,P as c,R as l,S as u,U as d,W as f,X as p,Z as m,a as h,at as g,bt as _,ct as v,dt as y,et as b,f as x,g as S,it as C,k as w,m as ee,mt as te,p as T,pt as E,r as D,rt as O,st as k,v as A,vt as j,x as M,y as ne}from"./disclose-version-CIm4S9xS.js";import{C as re,d as ie,h as ae,m as oe,o as se,p as ce,v as le,x as ue}from"./SvGrid.helpers-DE5mmORW.js";import{n as de,r as fe,t as pe}from"./editor-registry-BjP16H0v.js";import{t as N}from"./preload-helper-HclGiUj8.js";var P=l(`<span class="sv-grid-chip sv-grid-chip-removable"> <button type="button" class="sv-grid-chip-remove">×</button></span>`),F=l(`<button type="button" class="sv-grid-chip-commit" aria-label="Commit chip selection">Done</button>`),I=l(`<div class="sv-grid-cell-editor sv-grid-cell-editor-chips" role="group"><div class="sv-grid-chips-row"><!> <input class="sv-grid-chip-input" type="text"/> <!></div></div>`),L=l(`<input type="checkbox" class="sv-grid-fr-editor sv-grid-fr-checkbox"/>`),R=l(`<option> </option>`),z=l(`<select class="sv-grid-cell-editor sv-grid-fr-editor"></select>`),B=l(`<input class="sv-grid-cell-editor sv-grid-fr-editor"/>`),me=l(`<button type="button" class="sv-grid-checkbox" role="checkbox" aria-label="Edit checkbox value"></button>`),he=l(`<button type="button" role="radio">★</button>`),ge=l(`<span class="sv-grid-rating-editor" role="radiogroup" aria-label="Rating"><!> <button type="button" aria-label="Clear rating" class="sv-grid-rating-clear">×</button></span>`),_e=l(`<textarea class="sv-grid-cell-editor sv-grid-cell-editor-textarea" rows="4"></textarea>`),ve=l(`<button type="button" class="sv-grid-autocomplete-option" role="option"> </button>`),ye=l(`<div class="sv-grid-autocomplete-list" role="listbox"></div>`),be=l(`<div class="sv-grid-autocomplete"><input class="sv-grid-cell-editor sv-grid-cell-editor-autocomplete" type="text"/> <!></div>`),xe=l(`<input type="color"/>`),Se=l(`<textarea class="sv-grid-cell-editor sv-grid-cell-editor-text sv-grid-cell-editor-multiline"></textarea>`),Ce=l(`<input/>`);function V(r,l){te(l,!0);let V=(t,r=_,l=_,u=_,m=_)=>{var h=o(),v=C(h),b=e=>{var t=o(),c=C(t),u=e=>{var t=o(),s=C(t);{let e=y(()=>H().editingCell?.value);n(s,()=>a(U),(t,n)=>{n(t,{get options(){return r()},get loading(){return m()},get value(){return a(e)},get multiple(){return l()},placeholder:`Pick…`,renderChipsInTrigger:!0,onChange:e=>{H().editingCell=H().editingCell?{...H().editingCell,value:e}:H().editingCell},onCommit:()=>a(q)(),onCancel:()=>{H().editingCell=null,H().gridRootEl?.focus({preventScroll:!0})}})})}i(e,t)};s(c,e=>{a(U)&&e(u)}),i(e,t)},x=t=>{var n=I();T(n,`tabindex`,-1);var r=O(n),o=O(r);w(o,19,u,(e,t)=>String(e)+`_`+t,(e,t,n)=>{var r=P(),o=O(r),s=g(o);j(r),p((e,t)=>{c(o,`${e??``} `),T(s,`aria-label`,`Remove ${t??``}`)},[()=>String(a(t)),()=>String(a(t))]),d(`mousedown`,s,e=>e.preventDefault()),d(`click`,s,()=>{let e=u().filter((e,t)=>t!==a(n));H().editingCell=H().editingCell?{...H().editingCell,value:l()?e:e[0]??null}:H().editingCell}),i(e,r)});var m=g(o,2);e(m,e=>a(X)?.(e));var h=g(m,2),_=e=>{var t=F();d(`mousedown`,t,e=>e.preventDefault()),d(`click`,t,()=>a(q)()),i(e,t)};s(h,e=>{l()&&e(_)}),j(r),j(n),p(()=>T(m,`placeholder`,l()?`Type, Enter to add`:`Type a value`)),d(`keydown`,m,e=>{if(e.key===`Enter`||l()&&e.key===`,`){e.preventDefault(),e.stopPropagation();let t=e.currentTarget,n=t.value.trim();if(n){let e=l()?[...u(),n]:[n];H().editingCell=H().editingCell?{...H().editingCell,value:l()?e:n}:H().editingCell,t.value=``,l()||a(q)()}}else if(e.key===`Escape`)a(Y)(e);else if(e.key===`Backspace`&&e.currentTarget.value===``&&u().length>0){e.preventDefault();let t=u().slice(0,-1);H().editingCell=H().editingCell?{...H().editingCell,value:l()?t:t[0]??null}:H().editingCell}}),f(`blur`,m,()=>a(q)()),i(t,n)};s(v,e=>{r().length>0?e(b):e(x,-1)}),i(t,h)},H=D(l,`ctrl`,7),we=D(l,`fullRow`,3,!1),U=v(null),W=v(null);m(()=>{let e=H().editingCell?.editorType;(e===`list`||e===`chips`||e===`select`||e===`rich-select`)&&!a(U)&&N(()=>import(`./SvGridDropdown-Cjz0H-fI.js`).then(e=>e.n).then(e=>k(U,e.default,!0)),__vite__mapDeps([0,1,2,3,4]),import.meta.url),(e===`date`||e===`datetime`||e===`time`)&&!a(W)&&N(()=>import(`./SvDateTimePicker-DCPg7WGN.js`).then(e=>e.n).then(e=>k(W,e.default,!0)),__vite__mapDeps([5,1,2,6,7,8,3,9,10]),import.meta.url)});let Te=y(()=>H().grid),Ee=y(()=>H().fullRowEdit),G=y(()=>H().getColumnEditorOptions),K=y(()=>H().areEditorOptionsLoading),q=y(()=>H().saveEditingCell),J=y(()=>H().updateEditingCellValue),Y=y(()=>H().onEditorKeyDown),X=y(()=>H().focusOnMount),De=y(()=>H().toggleCheckboxWithKeyboard);function Oe(e,t=!0){t&&e.focus({preventScroll:!0})}function Z(e){e.key===`Enter`?(e.preventDefault(),H().commitFullRowEdit(),H().gridRootEl?.focus({preventScroll:!0})):e.key===`Escape`&&(e.preventDefault(),H().cancelFullRowEdit(),H().gridRootEl?.focus({preventScroll:!0}))}function Q(e){return typeof e==`object`&&e&&`value`in e?String(e.value):String(e)}function ke(e){return typeof e==`object`&&e&&`label`in e?String(e.label):String(e)}function Ae(){let e=H().editingCell;return{value:e?.value,rowId:e?.rowId??``,columnId:e?.columnId??``,onChange:e=>a(J)(e),onCommit:e=>{e!==void 0&&a(J)(e),a(q)()},onCancel:()=>{H().editingCell=null,H().gridRootEl?.focus({preventScroll:!0})},onCommitAndMove:(e,t)=>{e!==void 0&&a(J)(e),H().commitAndMoveByTab(t===-1)},onRequestClose:()=>{H().editingCell=null,H().gridRootEl?.focus({preventScroll:!0})},inCell:!0}}var $=o(),je=C($),Me=e=>{let t=y(()=>l.column.columnDef.editorType??`text`),n=y(()=>a(Ee)?.draft[l.column.id]);var r=o(),u=C(r),f=e=>{var t=L();x(t),p(e=>ee(t,e),[()=>!!a(n)]),d(`change`,t,e=>H().setFullRowDraft(l.column.id,e.currentTarget.checked)),d(`keydown`,t,Z),d(`pointerdown`,t,e=>e.stopPropagation()),d(`click`,t,e=>e.stopPropagation()),i(e,t)},m=e=>{let t=y(()=>a(G)(l.column,l.row));var r=z();w(r,21,()=>a(t),e=>Q(e),(e,t)=>{var n=R(),r=O(n,!0);j(n);var o={};p((e,t)=>{c(r,e),o!==(o=t)&&(n.value=(n.__value=t)??``)},[()=>ke(a(t)),()=>Q(a(t))]),i(e,n)}),j(r);var o;A(r),p(e=>{o!==(o=e)&&(r.value=(r.__value=e)??``,ne(r,e))},[()=>String(a(n)??``)]),d(`change`,r,e=>H().setFullRowDraft(l.column.id,e.currentTarget.value)),d(`keydown`,r,Z),d(`pointerdown`,r,e=>e.stopPropagation()),d(`click`,r,e=>e.stopPropagation()),i(e,r)},h=e=>{let r=y(()=>a(t)===`number`?`number`:a(t)===`date`?`date`:a(t)===`datetime`?`datetime-local`:a(t)===`time`?`time`:a(t)===`password`?`password`:`text`);var o=B();x(o),p(e=>{T(o,`type`,a(r)),S(o,e)},[()=>String(a(n)??``)]),d(`input`,o,e=>H().setFullRowDraft(l.column.id,e.currentTarget.value)),d(`keydown`,o,Z),d(`pointerdown`,o,e=>e.stopPropagation()),d(`click`,o,e=>e.stopPropagation()),i(e,o)};s(u,e=>{a(t)===`checkbox`?e(f):a(t)===`list`||a(t)===`select`||a(t)===`rich-select`?e(m,1):e(h,-1)}),i(e,r)},Ne=r=>{var m=o(),_=C(m),v=e=>{let n=y(()=>l.column.columnDef.cellEditor);var r=o(),s=C(r);{let e=y(()=>({cell:l.row.getAllCells().find(e=>e.column.id===l.column.id),row:l.row,column:l.column,table:a(Te),getValue:()=>H().editingCell?.value,value:H().editingCell?.value,update:e=>{H().editingCell=H().editingCell?{...H().editingCell,value:e}:H().editingCell},commit:e=>{e!==void 0&&(H().editingCell=H().editingCell?{...H().editingCell,value:e}:H().editingCell),a(q)()},cancel:()=>{H().editingCell=null,H().gridRootEl?.focus({preventScroll:!0})}}));t(s,()=>a(n),()=>a(e))}i(e,r)},ee=t=>{var n=me();e(n,e=>Oe?.(e)),p(e=>T(n,`aria-checked`,e),[()=>!!H().editingCell.value]),d(`click`,n,e=>{e.stopPropagation();let t=!H().editingCell?.value;H().editingCell=H().editingCell?{...H().editingCell,value:t}:H().editingCell,a(q)()}),d(`keydown`,n,e=>{if(e.key===`Enter`||e.key===` `){a(De)(e,()=>{e.stopPropagation();let t=!H().editingCell?.value;H().editingCell=H().editingCell?{...H().editingCell,value:t}:H().editingCell,a(q)()});return}a(Y)(e)}),f(`blur`,n,()=>a(q)()),i(t,n)},te=e=>{let t=y(()=>a(G)(l.column,l.row)),r=y(()=>a(K)(l.column,l.row)),c=y(()=>l.column.columnDef.editorMultiple===!0);var u=o(),d=C(u),f=e=>{var s=o(),l=C(s);{let e=y(()=>H().editingCell?.value);n(l,()=>a(U),(n,i)=>{i(n,{get options(){return a(t)},get loading(){return a(r)},get value(){return a(e)},get multiple(){return a(c)},placeholder:`Select…`,onChange:e=>{H().editingCell=H().editingCell?{...H().editingCell,value:e}:H().editingCell},onCommit:()=>a(q)(),onCancel:()=>{H().editingCell=null,H().gridRootEl?.focus({preventScroll:!0})}})})}i(e,s)};s(d,e=>{a(U)&&e(f)}),i(e,u)},E=e=>{let t=y(()=>a(G)(l.column,l.row)),n=y(()=>a(K)(l.column,l.row)),r=y(()=>l.column.columnDef.editorMultiple===!0),i=y(()=>re(H().editingCell?.value));V(e,()=>a(t),()=>a(r),()=>a(i),()=>a(n))},D=t=>{let n=y(()=>Math.max(0,Math.min(5,Math.round(Number(H().editingCell?.value)||0)))),r=y(()=>Math.min(5,Math.max(1,a(n))));var o=ge(),s=O(o);w(s,16,()=>[1,2,3,4,5],e=>e,(t,o)=>{var s=he();e(s,(e,t)=>Oe?.(e,t),()=>o===a(r)),p(()=>{T(s,`aria-checked`,a(n)>=o),T(s,`aria-label`,`${o} ${o===1?`star`:`stars`}`),M(s,1,`sv-grid-rating-star ${a(n)>=o?`sv-grid-rating-star-on`:``}`)}),d(`mousedown`,s,e=>e.preventDefault()),d(`click`,s,e=>{e.stopPropagation(),H().editingCell=H().editingCell?{...H().editingCell,value:o}:H().editingCell,a(q)()}),d(`keydown`,s,e=>{let t=e.key;if(t!==`ArrowLeft`&&t!==`ArrowRight`&&t!==`Home`&&t!==`End`){a(Y)(e);return}e.preventDefault(),e.stopPropagation();let r=Math.min(5,Math.max(1,a(n))),i=t===`Home`?1:t===`End`?5:t===`ArrowLeft`?Math.max(1,r-1):Math.min(5,r+1);H().editingCell=H().editingCell?{...H().editingCell,value:i}:H().editingCell,(e.currentTarget.parentElement?.querySelectorAll(`.sv-grid-rating-star`))?.[i-1]?.focus({preventScroll:!0})}),i(t,s)});var c=g(s,2);j(o),d(`mousedown`,c,e=>e.preventDefault()),d(`click`,c,e=>{e.stopPropagation(),H().editingCell=H().editingCell?{...H().editingCell,value:0}:H().editingCell,a(q)()}),i(t,o)},k=e=>{let t=y(()=>a(G)(l.column,l.row)),r=y(()=>a(K)(l.column,l.row));var c=o(),u=C(c),d=e=>{var s=o(),c=C(s);{let e=y(()=>H().editingCell?.value);n(c,()=>a(U),(n,i)=>{i(n,{get options(){return a(t)},get loading(){return a(r)},get value(){return a(e)},multiple:!1,placeholder:`Select…`,onChange:e=>{H().editingCell=H().editingCell?{...H().editingCell,value:e}:H().editingCell},onCommit:()=>a(q)(),onCancel:()=>{H().editingCell=null,H().gridRootEl?.focus({preventScroll:!0})}})})}i(e,s)};s(u,e=>{a(U)&&e(d)}),i(e,c)},A=e=>{let t=y(()=>a(G)(l.column,l.row)),r=y(()=>a(K)(l.column,l.row));var c=o(),u=C(c),d=e=>{var s=o(),c=C(s);{let e=y(()=>H().editingCell?.value);n(c,()=>a(U),(n,i)=>{i(n,{get options(){return a(t)},get loading(){return a(r)},get value(){return a(e)},multiple:!1,searchable:!0,placeholder:`Search…`,onChange:e=>{H().editingCell=H().editingCell?{...H().editingCell,value:e}:H().editingCell},onCommit:()=>a(q)(),onCancel:()=>{H().editingCell=null,H().gridRootEl?.focus({preventScroll:!0})}})})}i(e,s)};s(u,e=>{a(U)&&e(d)}),i(e,c)},ne=t=>{var n=_e();b(n),e(n,e=>a(X)?.(e)),p(e=>S(n,e),[()=>String(H().editingCell?.value??``)]),d(`pointerdown`,n,e=>e.stopPropagation()),d(`input`,n,e=>a(J)(e.currentTarget.value)),d(`keydown`,n,e=>{if(e.stopPropagation(),e.key===`Escape`){e.preventDefault(),H().editingCell=null,H().gridRootEl?.focus({preventScroll:!0});return}if(e.key===`Tab`){e.preventDefault(),H().commitAndMoveByTab(e.shiftKey);return}e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),a(q)(),H().gridRootEl?.focus({preventScroll:!0}))}),f(`blur`,n,()=>a(q)()),i(t,n)},N=t=>{let n=y(()=>a(G)(l.column,l.row)),r=y(()=>String(H().editingCell?.value??``)),o=y(()=>a(r).trim()?a(n).filter(e=>String(e.label).toLowerCase().includes(a(r).toLowerCase())):a(n));var u=be(),m=O(u);x(m),e(m,e=>a(X)?.(e));var h=g(m,2),_=e=>{var t=ye();w(t,21,()=>a(o).slice(0,50),e=>e.value,(e,t)=>{var n=ve(),o=O(n,!0);j(n),p(e=>{T(n,`aria-selected`,e),c(o,a(t).label)},[()=>String(a(t).value)===a(r)]),d(`mousedown`,n,e=>{e.preventDefault(),H().editingCell=H().editingCell?{...H().editingCell,value:a(t).value}:H().editingCell,a(q)()}),i(e,n)}),j(t),i(e,t)};s(h,e=>{a(o).length>0&&e(_)}),j(u),p(()=>S(m,a(r))),d(`pointerdown`,m,e=>e.stopPropagation()),d(`input`,m,e=>a(J)(e.currentTarget.value)),f(`blur`,m,()=>a(q)()),d(`keydown`,m,function(...e){a(Y)?.apply(this,e)}),i(t,u)},P=e=>{var t=o(),r=C(t),c=e=>{var t=o(),r=C(t);{let e=y(()=>H().editingCell?.value);n(r,()=>a(W),(t,n)=>{n(t,{get value(){return a(e)},formatString:`yyyy-MM-dd`,dropDownDisplayMode:`calendar`,autoOpen:!0,block:!0,onChange:e=>a(J)(e),onCommit:()=>a(q)(),onCancel:()=>{H().editingCell=null,H().gridRootEl?.focus({preventScroll:!0})}})})}i(e,t)};s(r,e=>{a(W)&&e(c)}),i(e,t)},F=e=>{var t=o(),r=C(t),c=e=>{var t=o(),r=C(t);{let e=y(()=>H().editingCell?.value);n(r,()=>a(W),(t,n)=>{n(t,{get value(){return a(e)},formatString:`yyyy-MM-dd HH:mm`,dropDownDisplayMode:`both`,autoOpen:!0,block:!0,onChange:e=>a(J)(e),onCommit:()=>a(q)(),onCancel:()=>{H().editingCell=null,H().gridRootEl?.focus({preventScroll:!0})}})})}i(e,t)};s(r,e=>{a(W)&&e(c)}),i(e,t)},I=e=>{var t=o(),r=C(t),c=e=>{var t=o(),r=C(t);{let e=y(()=>ue(H().editingCell?.value));n(r,()=>a(W),(t,n)=>{n(t,{get value(){return a(e)},formatString:`HH:mm`,dropDownDisplayMode:`time`,autoOpen:!0,block:!0,onChange:e=>a(J)(se(e)),onCommit:()=>a(q)(),onCancel:()=>{H().editingCell=null,H().gridRootEl?.focus({preventScroll:!0})}})})}i(e,t)};s(r,e=>{a(W)&&e(c)}),i(e,t)},L=t=>{var n=xe();x(n),e(n,e=>a(X)?.(e)),p((e,t)=>{M(n,1,e),S(n,t)},[()=>u(oe(`color`)),()=>ce(`color`,H().editingCell?.value)]),d(`input`,n,e=>a(J)(e.currentTarget.value)),d(`change`,n,e=>{a(J)(e.currentTarget.value),a(q)()}),f(`blur`,n,()=>a(q)()),d(`keydown`,n,function(...e){a(Y)?.apply(this,e)}),i(t,n)},R=e=>{let t=y(()=>pe(String(H().editingCell?.editorType))),r=y(()=>a(t).component);var s=o(),c=C(s);{let e=y(()=>fe(a(t),Ae()));n(c,()=>a(r),(t,n)=>{n(t,h(()=>a(e)))})}i(e,s)},z=y(()=>de(String(H().editingCell?.editorType??``))),B=t=>{var n=Se();b(n),e(n,e=>a(X)?.(e)),p((e,t)=>{T(n,`rows`,e),S(n,t)},[()=>Math.max(1,String(H().editingCell?.value??``).split(`
|
|
3
|
-
`).length),()=>String(H().editingCell?.value??``)]),d(`input`,n,e=>{let t=e.currentTarget;t.rows=Math.max(1,t.value.split(`
|
|
4
|
-
`).length),a(J)(t.value)}),f(`blur`,n,()=>a(q)()),d(`keydown`,n,function(...e){a(Y)?.apply(this,e)}),i(t,n)},we=t=>{let n=y(()=>H().editingCell?.editorType??`text`),r=y(()=>ie(a(n))===`text`&&ae(a(n))===`number`);var o=Ce();x(o),e(o,e=>a(X)?.(e)),p((e,t,n)=>{M(o,1,e),T(o,`type`,t),T(o,`inputmode`,a(r)?`decimal`:void 0),S(o,n)},[()=>u(oe(a(n))),()=>ie(a(n)),()=>ce(a(n),H().editingCell?.value)]),d(`input`,o,e=>{let t=e.currentTarget;if(a(r)&&!le(t.value)){t.value=String(H().editingCell?.value??``);return}a(J)(t.value)}),f(`blur`,o,()=>a(q)()),d(`keydown`,o,function(...e){a(Y)?.apply(this,e)}),i(t,o)};s(_,e=>{l.column.columnDef.cellEditor?e(v):H().editingCell?.editorType===`checkbox`?e(ee,1):H().editingCell?.editorType===`list`?e(te,2):H().editingCell?.editorType===`chips`?e(E,3):H().editingCell?.editorType===`rating`?e(D,4):H().editingCell?.editorType===`select`?e(k,5):H().editingCell?.editorType===`rich-select`?e(A,6):H().editingCell?.editorType===`textarea`?e(ne,7):H().editingCell?.editorType===`autocomplete`?e(N,8):H().editingCell?.editorType===`date`?e(P,9):H().editingCell?.editorType===`datetime`?e(F,10):H().editingCell?.editorType===`time`?e(I,11):H().editingCell?.editorType===`color`?e(L,12):a(z)?e(R,13):(H().editingCell?.editorType??`text`)===`text`&&l.column?.columnDef.editorMultiline?e(B,14):e(we,-1)}),i(r,m)};s(je,e=>{we()?e(Me):e(Ne,-1)}),i(r,$),E()}r([`mousedown`,`click`,`keydown`,`change`,`pointerdown`,`input`]);export{V as default};
|