@svgrid/grid-wc 3.0.32 → 3.0.34
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/dist/{GridMenus-N2KRdNsI.js → GridMenus-T9EoG8Ww.js} +2 -2
- package/dist/{SvDateRangeInput-DHTz33L2.js → SvDateRangeInput-Cpss2SsG.js} +2 -1
- package/dist/SvGridCellEditor-D8UIbCRd.js +584 -0
- package/dist/{SvGridChart-B1Ro43s3.js → SvGridChart-Cjay-so9.js} +303 -302
- package/dist/{SvGridChartBuilder-BGWhm8hq.js → SvGridChartBuilder-Ca3M_gpQ.js} +3 -3
- package/dist/{SvGridChartPanel-t_UgLw4I.js → SvGridChartPanel-BvNxBEeX.js} +5 -5
- package/dist/{SvGridChartView-EbUF0BKk.js → SvGridChartView-BVS7Ac61.js} +2 -2
- package/dist/chart/{chart-export-BHGuh_kZ.js → chart-export-C43UPY8D.js} +37 -30
- package/dist/chart/{chart-export-pdf-BjkkIEkE.js → chart-export-pdf-C0_y8glC.js} +1 -1
- package/dist/chart/sv-chart-element.js +3 -3
- package/dist/{chart-export-pdf-BSDueOD-.js → chart-export-pdf-CBZNCRFi.js} +1 -1
- package/dist/csv-injection-Ce26_TOb.js +8 -0
- package/dist/{shadow/export-format-CWEVxATj.js → export-format-DW7bHqeY.js} +56 -55
- package/dist/shadow/{GridMenus-De7ebuLc.js → GridMenus--Qxo5g1j.js} +2 -2
- package/dist/shadow/{SvDateRangeInput-DHTz33L2.js → SvDateRangeInput-Cpss2SsG.js} +2 -1
- package/dist/shadow/SvGridCellEditor-D8UIbCRd.js +584 -0
- package/dist/shadow/{SvGridChart-B1Ro43s3.js → SvGridChart-Cjay-so9.js} +303 -302
- package/dist/shadow/{SvGridChartBuilder-BGWhm8hq.js → SvGridChartBuilder-Ca3M_gpQ.js} +3 -3
- package/dist/shadow/{SvGridChartPanel-t_UgLw4I.js → SvGridChartPanel-BvNxBEeX.js} +5 -5
- package/dist/shadow/{SvGridChartView-EbUF0BKk.js → SvGridChartView-BVS7Ac61.js} +2 -2
- package/dist/shadow/{chart-export-pdf-BSDueOD-.js → chart-export-pdf-CBZNCRFi.js} +1 -1
- package/dist/shadow/csv-injection-Ce26_TOb.js +8 -0
- package/dist/{export-format-CWEVxATj.js → shadow/export-format-DW7bHqeY.js} +56 -55
- package/dist/shadow/sv-grid-shadow-element.js +1250 -1235
- package/dist/sv-grid-element.js +1233 -1218
- package/package.json +3 -3
- package/dist/SvGridCellEditor-6ZyGKeXd.js +0 -582
- package/dist/shadow/SvGridCellEditor-6ZyGKeXd.js +0 -582
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){try{var c=".sv-listbox.svelte-1qscmce{--_accent:var(--sg-accent,#2563eb);background:var(--sg-input-bg,#fff);color:var(--sg-fg,#0f172a);border:1px solid var(--sg-input-border,var(--sg-border,#cbd5e1));border-radius:var(--sg-radius,8px);--_fs:13px;outline:none;width:220px;margin:0;list-style:none}.sv-listbox.svelte-1qscmce:not(.is-virtual){max-height:calc(var(--sv-rows,7) * var(--sv-row-h,32px) + 8px);padding:4px;overflow-y:auto}.sv-listbox.is-virtual.svelte-1qscmce{height:calc(var(--sv-rows,7) * var(--sv-row-h,32px) + 8px);padding:0;position:relative;overflow:hidden}.sv-listbox.is-block.svelte-1qscmce{width:100%}.sv-listbox--sm.svelte-1qscmce{--_fs:12px}.sv-listbox--lg.svelte-1qscmce{--_fs:15px}.sv-listbox.svelte-1qscmce:focus-visible{border-color:var(--_accent);box-shadow:0 0 0 2px color-mix(in srgb, var(--_accent) 22%, transparent)}.sv-listbox.is-invalid.svelte-1qscmce{border-color:var(--sg-danger,#dc2626)}.sv-listbox.is-invalid.svelte-1qscmce:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb, var(--sg-danger,#dc2626) 22%, transparent)}.sv-listbox__vp.svelte-1qscmce{touch-action:none;position:absolute;inset:4px;overflow:hidden}.sv-listbox.is-virtual.svelte-1qscmce .sv-listbox__opt:where(.svelte-1qscmce),.sv-listbox.is-virtual.svelte-1qscmce .sv-listbox__group:where(.svelte-1qscmce){position:absolute;top:0;left:0;right:0}.sv-listbox__sb.svelte-1qscmce{z-index:2;width:10px;position:absolute;top:4px;bottom:4px;right:2px}.sv-listbox__thumb.svelte-1qscmce{background:color-mix(in srgb, currentColor 26%, transparent);cursor:default;touch-action:none;border-radius:4px;min-height:24px;position:absolute;top:0;left:2px;right:2px}.sv-listbox__thumb.svelte-1qscmce:hover,.sv-listbox__thumb.is-dragging.svelte-1qscmce{background:color-mix(in srgb, currentColor 42%, transparent)}.sv-listbox__opt.svelte-1qscmce{box-sizing:border-box;cursor:pointer;font-size:var(--_fs,13px);border-radius:6px;flex:none;align-items:center;gap:8px;padding:0 10px;display:flex}.sv-listbox__opt.is-active.svelte-1qscmce{background:var(--sg-row-hover-bg,#f1f5f9)}.sv-listbox__opt.is-selected.svelte-1qscmce{background:color-mix(in srgb, var(--_accent) 14%, transparent);color:var(--_accent);font-weight:600}.sv-listbox__opt.is-selected.is-active.svelte-1qscmce{background:color-mix(in srgb, var(--_accent) 22%, transparent)}.sv-listbox__opt.is-disabled.svelte-1qscmce{opacity:.4;cursor:not-allowed}.sv-listbox__group.svelte-1qscmce{box-sizing:border-box;text-transform:uppercase;letter-spacing:.04em;color:var(--sg-muted,#94a3b8);align-items:flex-end;padding:8px 10px 3px;font-size:10.5px;font-weight:700;display:flex}.sv-listbox__check.svelte-1qscmce{text-align:center;width:14px;color:var(--_accent)}.sv-listbox__label.svelte-1qscmce{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.sv-listbox__hint.svelte-1qscmce{color:var(--sg-muted,#64748b);font-variant-numeric:tabular-nums;flex:none;margin-inline-start:8px;font-size:.9em}.sv-listbox__box.svelte-1qscmce{box-sizing:border-box;border:1px solid var(--sg-input-border,var(--sg-border,#cbd5e1));background:var(--sg-input-bg,#fff);border-radius:3px;flex:none;width:14px;height:14px;position:relative}.sv-listbox__box.is-on.svelte-1qscmce{background:var(--_accent);border-color:var(--_accent)}.sv-listbox__box.is-on.svelte-1qscmce:after{content:\"\";border:solid var(--sg-input-bg,#fff);border-width:0 2px 2px 0;width:3px;height:7px;position:absolute;top:1px;left:4px;transform:rotate(45deg)}.sv-listbox.is-checkbox.svelte-1qscmce .sv-listbox__opt.is-selected:where(.svelte-1qscmce){color:inherit;font-weight:inherit;background:0 0}.sv-listbox.is-checkbox.svelte-1qscmce .sv-listbox__opt.is-active:where(.svelte-1qscmce),.sv-listbox.is-checkbox.svelte-1qscmce .sv-listbox__opt.is-selected.is-active:where(.svelte-1qscmce){background:var(--sg-row-hover-bg,#f1f5f9)}\n",g=globalThis;if(typeof g!=='undefined'){var f=(g.__SVGRID_WC_ADD_CSS_BY_BUILD__||{})["grid"];if(typeof f==='function')f(c);else{var q=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__||{};(q["grid"]=q["grid"]||[]).push(c);}}if(typeof document==='undefined')return;var x=document.querySelectorAll('style[data-svgrid-grid-wc-chunk]');for(var i=0;i<x.length;i++)if(x[i].getAttribute('data-svgrid-grid-wc-chunk')==="grid:GridMenus-
|
|
1
|
+
(function(){try{var c=".sv-listbox.svelte-1qscmce{--_accent:var(--sg-accent,#2563eb);background:var(--sg-input-bg,#fff);color:var(--sg-fg,#0f172a);border:1px solid var(--sg-input-border,var(--sg-border,#cbd5e1));border-radius:var(--sg-radius,8px);--_fs:13px;outline:none;width:220px;margin:0;list-style:none}.sv-listbox.svelte-1qscmce:not(.is-virtual){max-height:calc(var(--sv-rows,7) * var(--sv-row-h,32px) + 8px);padding:4px;overflow-y:auto}.sv-listbox.is-virtual.svelte-1qscmce{height:calc(var(--sv-rows,7) * var(--sv-row-h,32px) + 8px);padding:0;position:relative;overflow:hidden}.sv-listbox.is-block.svelte-1qscmce{width:100%}.sv-listbox--sm.svelte-1qscmce{--_fs:12px}.sv-listbox--lg.svelte-1qscmce{--_fs:15px}.sv-listbox.svelte-1qscmce:focus-visible{border-color:var(--_accent);box-shadow:0 0 0 2px color-mix(in srgb, var(--_accent) 22%, transparent)}.sv-listbox.is-invalid.svelte-1qscmce{border-color:var(--sg-danger,#dc2626)}.sv-listbox.is-invalid.svelte-1qscmce:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb, var(--sg-danger,#dc2626) 22%, transparent)}.sv-listbox__vp.svelte-1qscmce{touch-action:none;position:absolute;inset:4px;overflow:hidden}.sv-listbox.is-virtual.svelte-1qscmce .sv-listbox__opt:where(.svelte-1qscmce),.sv-listbox.is-virtual.svelte-1qscmce .sv-listbox__group:where(.svelte-1qscmce){position:absolute;top:0;left:0;right:0}.sv-listbox__sb.svelte-1qscmce{z-index:2;width:10px;position:absolute;top:4px;bottom:4px;right:2px}.sv-listbox__thumb.svelte-1qscmce{background:color-mix(in srgb, currentColor 26%, transparent);cursor:default;touch-action:none;border-radius:4px;min-height:24px;position:absolute;top:0;left:2px;right:2px}.sv-listbox__thumb.svelte-1qscmce:hover,.sv-listbox__thumb.is-dragging.svelte-1qscmce{background:color-mix(in srgb, currentColor 42%, transparent)}.sv-listbox__opt.svelte-1qscmce{box-sizing:border-box;cursor:pointer;font-size:var(--_fs,13px);border-radius:6px;flex:none;align-items:center;gap:8px;padding:0 10px;display:flex}.sv-listbox__opt.is-active.svelte-1qscmce{background:var(--sg-row-hover-bg,#f1f5f9)}.sv-listbox__opt.is-selected.svelte-1qscmce{background:color-mix(in srgb, var(--_accent) 14%, transparent);color:var(--_accent);font-weight:600}.sv-listbox__opt.is-selected.is-active.svelte-1qscmce{background:color-mix(in srgb, var(--_accent) 22%, transparent)}.sv-listbox__opt.is-disabled.svelte-1qscmce{opacity:.4;cursor:not-allowed}.sv-listbox__group.svelte-1qscmce{box-sizing:border-box;text-transform:uppercase;letter-spacing:.04em;color:var(--sg-muted,#94a3b8);align-items:flex-end;padding:8px 10px 3px;font-size:10.5px;font-weight:700;display:flex}.sv-listbox__check.svelte-1qscmce{text-align:center;width:14px;color:var(--_accent)}.sv-listbox__label.svelte-1qscmce{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.sv-listbox__hint.svelte-1qscmce{color:var(--sg-muted,#64748b);font-variant-numeric:tabular-nums;flex:none;margin-inline-start:8px;font-size:.9em}.sv-listbox__box.svelte-1qscmce{box-sizing:border-box;border:1px solid var(--sg-input-border,var(--sg-border,#cbd5e1));background:var(--sg-input-bg,#fff);border-radius:3px;flex:none;width:14px;height:14px;position:relative}.sv-listbox__box.is-on.svelte-1qscmce{background:var(--_accent);border-color:var(--_accent)}.sv-listbox__box.is-on.svelte-1qscmce:after{content:\"\";border:solid var(--sg-input-bg,#fff);border-width:0 2px 2px 0;width:3px;height:7px;position:absolute;top:1px;left:4px;transform:rotate(45deg)}.sv-listbox.is-checkbox.svelte-1qscmce .sv-listbox__opt.is-selected:where(.svelte-1qscmce){color:inherit;font-weight:inherit;background:0 0}.sv-listbox.is-checkbox.svelte-1qscmce .sv-listbox__opt.is-active:where(.svelte-1qscmce),.sv-listbox.is-checkbox.svelte-1qscmce .sv-listbox__opt.is-selected.is-active:where(.svelte-1qscmce){background:var(--sg-row-hover-bg,#f1f5f9)}\n",g=globalThis;if(typeof g!=='undefined'){var f=(g.__SVGRID_WC_ADD_CSS_BY_BUILD__||{})["grid"];if(typeof f==='function')f(c);else{var q=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__||{};(q["grid"]=q["grid"]||[]).push(c);}}if(typeof document==='undefined')return;var x=document.querySelectorAll('style[data-svgrid-grid-wc-chunk]');for(var i=0;i<x.length;i++)if(x[i].getAttribute('data-svgrid-grid-wc-chunk')==="grid:GridMenus-T9EoG8Ww.js"||x[i].textContent===c)return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"grid:GridMenus-T9EoG8Ww.js");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
|
|
2
2
|
import { $ as e, A as t, C as n, D as r, I as i, J as a, K as o, L as s, M as c, N as l, O as u, R as d, T as f, U as p, V as m, W as h, X as g, Y as _, Z as v, _ as y, a as b, at as x, c as S, d as C, et as w, f as T, g as E, h as D, it as O, j as k, k as A, l as j, n as M, nt as N, o as P, ot as F, p as I, q as ee, rt as te, s as L, st as R, u as ne, v as z, w as B, x as re, y as V, z as H } from "./client-DtIdusS4.js";
|
|
3
3
|
import { E as ie, S as ae, T as oe, h as se, r as ce, u as U, w as le } from "./SvGrid.helpers-tk7gWxcT.js";
|
|
4
4
|
import { i as W, r as G } from "./grid-extension.svelte-CBhmpjuc.js";
|
|
@@ -986,7 +986,7 @@ function At(i, c) {
|
|
|
986
986
|
let t = H(X) ?? H(Y);
|
|
987
987
|
if (!t) return;
|
|
988
988
|
let n = H(Q).find((e) => e.id === t);
|
|
989
|
-
le(n?.columnDef) && (H(Kt) || import("./SvDateTimePicker-DyRO_e91.js").then((t) => e(Kt, t.default, !0)), H(qt) || import("./SvDateRangeInput-
|
|
989
|
+
le(n?.columnDef) && (H(Kt) || import("./SvDateTimePicker-DyRO_e91.js").then((t) => e(Kt, t.default, !0)), H(qt) || import("./SvDateRangeInput-Cpss2SsG.js").then((t) => e(qt, t.default, !0)));
|
|
990
990
|
});
|
|
991
991
|
function Jt(e, t) {
|
|
992
992
|
let n = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){try{var c=".sv-dri.svelte-1rb3yee{--_accent:var(--sg-accent,#2563eb);--_border:var(--sg-input-border,var(--sg-border,#cbd5e1));--_radius:var(--sg-radius,8px);color:var(--sg-fg,#0f172a);display:inline-block;position:relative}.sv-dri--disabled.svelte-1rb3yee{opacity:.6}.sv-dri__field.svelte-1rb3yee{background:var(--sg-input-bg,#fff);border:1px solid var(--_border);border-radius:var(--_radius);align-items:center;gap:6px;width:260px;padding-inline:10px 4px;display:flex}.sv-dri__field.svelte-1rb3yee:focus-within{border-color:var(--_accent);box-shadow:0 0 0 2px color-mix(in srgb, var(--_accent) 22%, transparent)}.sv-dri__field.is-invalid.svelte-1rb3yee{border-color:var(--sg-danger,#dc2626)}.sv-dri__field.is-invalid.svelte-1rb3yee:focus-within{box-shadow:0 0 0 2px color-mix(in srgb, var(--sg-danger,#dc2626) 22%, transparent)}.sv-dri__field--sm.svelte-1rb3yee{height:28px;font-size:12px}.sv-dri__field--md.svelte-1rb3yee{height:34px;font-size:13px}.sv-dri__field--lg.svelte-1rb3yee{height:40px;font-size:15px}.sv-dri__icon.svelte-1rb3yee{color:var(--sg-muted,#64748b);flex:none}.sv-dri__input.svelte-1rb3yee{min-width:0;color:inherit;font:inherit;cursor:pointer;text-overflow:ellipsis;background:0 0;border:0;outline:none;flex:1}.sv-dri__input.svelte-1rb3yee::placeholder{color:var(--sg-muted,#94a3b8)}.sv-dri__clear.svelte-1rb3yee{width:24px;height:24px;color:var(--sg-muted,#64748b);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;place-items:center;font-size:17px;line-height:1;display:grid}.sv-dri__clear.svelte-1rb3yee:hover{color:var(--_accent);background:color-mix(in srgb, var(--_accent) 10%, transparent)}.sv-dri__panel{z-index:2147483647;background:var(--sg-bg,#fff);border:1px solid var(--sg-border,#e2e8f0);border-radius:12px;box-shadow:0 16px 48px -12px #0f172a59}.sv-dri.is-block.svelte-1rb3yee,.sv-dri.is-block.svelte-1rb3yee .sv-dri__field:where(.svelte-1rb3yee){width:100%;max-width:100%}\n",g=globalThis;if(typeof g!=='undefined'){var f=(g.__SVGRID_WC_ADD_CSS_BY_BUILD__||{})["grid"];if(typeof f==='function')f(c);else{var q=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__||{};(q["grid"]=q["grid"]||[]).push(c);}}if(typeof document==='undefined')return;var x=document.querySelectorAll('style[data-svgrid-grid-wc-chunk]');for(var i=0;i<x.length;i++)if(x[i].getAttribute('data-svgrid-grid-wc-chunk')==="grid:SvDateRangeInput-
|
|
1
|
+
(function(){try{var c=".sv-dri.svelte-1rb3yee{--_accent:var(--sg-accent,#2563eb);--_border:var(--sg-input-border,var(--sg-border,#cbd5e1));--_radius:var(--sg-radius,8px);color:var(--sg-fg,#0f172a);display:inline-block;position:relative}.sv-dri--disabled.svelte-1rb3yee{opacity:.6}.sv-dri__field.svelte-1rb3yee{background:var(--sg-input-bg,#fff);border:1px solid var(--_border);border-radius:var(--_radius);align-items:center;gap:6px;width:260px;padding-inline:10px 4px;display:flex}.sv-dri__field.svelte-1rb3yee:focus-within{border-color:var(--_accent);box-shadow:0 0 0 2px color-mix(in srgb, var(--_accent) 22%, transparent)}.sv-dri__field.is-invalid.svelte-1rb3yee{border-color:var(--sg-danger,#dc2626)}.sv-dri__field.is-invalid.svelte-1rb3yee:focus-within{box-shadow:0 0 0 2px color-mix(in srgb, var(--sg-danger,#dc2626) 22%, transparent)}.sv-dri__field--sm.svelte-1rb3yee{height:28px;font-size:12px}.sv-dri__field--md.svelte-1rb3yee{height:34px;font-size:13px}.sv-dri__field--lg.svelte-1rb3yee{height:40px;font-size:15px}.sv-dri__icon.svelte-1rb3yee{color:var(--sg-muted,#64748b);flex:none}.sv-dri__input.svelte-1rb3yee{min-width:0;color:inherit;font:inherit;cursor:pointer;text-overflow:ellipsis;background:0 0;border:0;outline:none;flex:1}.sv-dri__input.svelte-1rb3yee::placeholder{color:var(--sg-muted,#94a3b8)}.sv-dri__clear.svelte-1rb3yee{width:24px;height:24px;color:var(--sg-muted,#64748b);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;place-items:center;font-size:17px;line-height:1;display:grid}.sv-dri__clear.svelte-1rb3yee:hover{color:var(--_accent);background:color-mix(in srgb, var(--_accent) 10%, transparent)}.sv-dri__panel{z-index:2147483647;background:var(--sg-bg,#fff);border:1px solid var(--sg-border,#e2e8f0);border-radius:12px;box-shadow:0 16px 48px -12px #0f172a59}.sv-dri.is-block.svelte-1rb3yee,.sv-dri.is-block.svelte-1rb3yee .sv-dri__field:where(.svelte-1rb3yee){width:100%;max-width:100%}\n",g=globalThis;if(typeof g!=='undefined'){var f=(g.__SVGRID_WC_ADD_CSS_BY_BUILD__||{})["grid"];if(typeof f==='function')f(c);else{var q=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__||{};(q["grid"]=q["grid"]||[]).push(c);}}if(typeof document==='undefined')return;var x=document.querySelectorAll('style[data-svgrid-grid-wc-chunk]');for(var i=0;i<x.length;i++)if(x[i].getAttribute('data-svgrid-grid-wc-chunk')==="grid:SvDateRangeInput-Cpss2SsG.js"||x[i].textContent===c)return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"grid:SvDateRangeInput-Cpss2SsG.js");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
|
|
2
2
|
import { $ as e, A as t, D as n, I as r, L as i, M as a, Q as o, U as s, W as c, X as ee, Y as l, Z as u, a as d, d as f, et as p, f as m, h, it as g, n as _, nt as v, ot as y, rt as b, u as te, v as ne, x, y as S, z as C } from "./client-DtIdusS4.js";
|
|
3
3
|
import { a as w, i as T, t as re } from "./editor-contract-peBDxir_.js";
|
|
4
4
|
import { i as E, o as D, r as O, t as k } from "./date-format-B0RznzxC.js";
|
|
@@ -105,6 +105,7 @@ function A(r, a) {
|
|
|
105
105
|
value: C(xe),
|
|
106
106
|
disabled: I(),
|
|
107
107
|
...e,
|
|
108
|
+
role: "combobox",
|
|
108
109
|
"aria-haspopup": "dialog",
|
|
109
110
|
"aria-expanded": C(K),
|
|
110
111
|
onkeydown: Te
|
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
import { $ as e, A as t, C as n, D as r, I as i, L as a, M as o, O as s, R as c, U as l, W as u, X as d, Y as f, Z as p, _ as m, b as h, d as g, et as _, f as v, g as ee, h as y, i as te, it as b, j as x, k as S, n as C, nt as w, ot as T, p as ne, q as re, rt as E, st as D, w as O, x as k, y as A, z as j } from "./client-DtIdusS4.js";
|
|
2
|
+
import { C as ie, d as ae, h as oe, m as se, o as ce, p as le, v as ue, x as de } from "./SvGrid.helpers-tk7gWxcT.js";
|
|
3
|
+
import { n as fe, r as pe, t as M } from "./editor-registry-DxGKqcvx.js";
|
|
4
|
+
//#region ../grid/dist/SvGridCellEditor.svelte
|
|
5
|
+
var N = o("<span class=\"sv-grid-chip sv-grid-chip-removable\"> <button type=\"button\" class=\"sv-grid-chip-remove\">×</button></span>"), P = o("<button type=\"button\" class=\"sv-grid-chip-commit\" aria-label=\"Commit chip selection\">Done</button>"), F = o("<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>"), I = o("<input type=\"checkbox\" class=\"sv-grid-fr-editor sv-grid-fr-checkbox\"/>"), L = o("<option> </option>"), R = o("<select class=\"sv-grid-cell-editor sv-grid-fr-editor\"></select>"), z = o("<input class=\"sv-grid-cell-editor sv-grid-fr-editor\"/>"), me = o("<button type=\"button\" class=\"sv-grid-checkbox\" role=\"checkbox\" aria-label=\"Edit checkbox value\"></button>"), he = o("<button type=\"button\" role=\"radio\">★</button>"), ge = o("<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 = o("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-textarea\" rows=\"4\"></textarea>"), ve = o("<button type=\"button\" class=\"sv-grid-autocomplete-option\" role=\"option\"> </button>"), ye = o("<div class=\"sv-grid-autocomplete-list\" role=\"listbox\"></div>"), be = o("<div class=\"sv-grid-autocomplete\"><input class=\"sv-grid-cell-editor sv-grid-cell-editor-autocomplete\" type=\"text\"/> <!></div>"), xe = o("<input type=\"color\"/>"), Se = o("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-text sv-grid-cell-editor-multiline\"></textarea>"), Ce = o("<input/>");
|
|
6
|
+
function B(i, o) {
|
|
7
|
+
b(o, !0);
|
|
8
|
+
let B = (e, i = D, o = D, s = D, u = D) => {
|
|
9
|
+
var m = x(), h = d(m), g = (e) => {
|
|
10
|
+
var a = x(), s = d(a), c = (e) => {
|
|
11
|
+
var r = x(), a = d(r);
|
|
12
|
+
{
|
|
13
|
+
let e = w(() => V().editingCell?.value);
|
|
14
|
+
n(a, () => j(U), (t, n) => {
|
|
15
|
+
n(t, {
|
|
16
|
+
get options() {
|
|
17
|
+
return i();
|
|
18
|
+
},
|
|
19
|
+
get loading() {
|
|
20
|
+
return u();
|
|
21
|
+
},
|
|
22
|
+
get value() {
|
|
23
|
+
return j(e);
|
|
24
|
+
},
|
|
25
|
+
get multiple() {
|
|
26
|
+
return o();
|
|
27
|
+
},
|
|
28
|
+
placeholder: "Pick…",
|
|
29
|
+
renderChipsInTrigger: !0,
|
|
30
|
+
onChange: (e) => {
|
|
31
|
+
V().editingCell = V().editingCell ? {
|
|
32
|
+
...V().editingCell,
|
|
33
|
+
value: e
|
|
34
|
+
} : V().editingCell;
|
|
35
|
+
},
|
|
36
|
+
onCommit: () => j(q)(),
|
|
37
|
+
onCancel: () => {
|
|
38
|
+
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
t(e, r);
|
|
44
|
+
};
|
|
45
|
+
r(s, (e) => {
|
|
46
|
+
j(U) && e(c);
|
|
47
|
+
}), t(e, a);
|
|
48
|
+
}, _ = (e) => {
|
|
49
|
+
var n = F();
|
|
50
|
+
v(n, "tabindex", -1);
|
|
51
|
+
var i = f(n), u = f(i);
|
|
52
|
+
O(u, 19, s, (e, t) => String(e) + "_" + t, (e, n, r) => {
|
|
53
|
+
var i = N(), c = f(i), u = p(c);
|
|
54
|
+
T(i), l((e, t) => {
|
|
55
|
+
S(c, `${e ?? ""} `), v(u, "aria-label", `Remove ${t ?? ""}`);
|
|
56
|
+
}, [() => String(j(n)), () => String(j(n))]), a("mousedown", u, (e) => e.preventDefault()), a("click", u, () => {
|
|
57
|
+
let e = s().filter((e, t) => t !== j(r));
|
|
58
|
+
V().editingCell = V().editingCell ? {
|
|
59
|
+
...V().editingCell,
|
|
60
|
+
value: o() ? e : e[0] ?? null
|
|
61
|
+
} : V().editingCell;
|
|
62
|
+
}), t(e, i);
|
|
63
|
+
});
|
|
64
|
+
var d = p(u, 2);
|
|
65
|
+
k(d, (e) => j(X)?.(e));
|
|
66
|
+
var m = p(d, 2), h = (e) => {
|
|
67
|
+
var n = P();
|
|
68
|
+
a("mousedown", n, (e) => e.preventDefault()), a("click", n, () => j(q)()), t(e, n);
|
|
69
|
+
};
|
|
70
|
+
r(m, (e) => {
|
|
71
|
+
o() && e(h);
|
|
72
|
+
}), T(i), T(n), l(() => v(d, "placeholder", o() ? "Type, Enter to add" : "Type a value")), a("keydown", d, (e) => {
|
|
73
|
+
if (e.key === "Enter" || o() && e.key === ",") {
|
|
74
|
+
e.preventDefault(), e.stopPropagation();
|
|
75
|
+
let t = e.currentTarget, n = t.value.trim();
|
|
76
|
+
if (n) {
|
|
77
|
+
let e = o() ? [...s(), n] : [n];
|
|
78
|
+
V().editingCell = V().editingCell ? {
|
|
79
|
+
...V().editingCell,
|
|
80
|
+
value: o() ? e : n
|
|
81
|
+
} : V().editingCell, t.value = "", o() || j(q)();
|
|
82
|
+
}
|
|
83
|
+
} else if (e.key === "Escape") j(Y)(e);
|
|
84
|
+
else if (e.key === "Backspace" && e.currentTarget.value === "" && s().length > 0) {
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
let t = s().slice(0, -1);
|
|
87
|
+
V().editingCell = V().editingCell ? {
|
|
88
|
+
...V().editingCell,
|
|
89
|
+
value: o() ? t : t[0] ?? null
|
|
90
|
+
} : V().editingCell;
|
|
91
|
+
}
|
|
92
|
+
}), c("blur", d, () => j(q)()), t(e, n);
|
|
93
|
+
};
|
|
94
|
+
r(h, (e) => {
|
|
95
|
+
i().length > 0 ? e(g) : e(_, -1);
|
|
96
|
+
}), t(e, m);
|
|
97
|
+
}, V = C(o, "ctrl", 7), H = C(o, "fullRow", 3, !1), U = _(null), W = _(null);
|
|
98
|
+
u(() => {
|
|
99
|
+
let t = V().editingCell?.editorType;
|
|
100
|
+
(t === "list" || t === "chips" || t === "select" || t === "rich-select") && !j(U) && import("./SvGridDropdown-CrECQYeq.js").then((t) => e(U, t.default, !0)), (t === "date" || t === "datetime" || t === "time") && !j(W) && import("./SvDateTimePicker-DyRO_e91.js").then((t) => e(W, t.default, !0));
|
|
101
|
+
});
|
|
102
|
+
let we = w(() => V().grid), Te = w(() => V().fullRowEdit), G = w(() => V().getColumnEditorOptions), K = w(() => V().areEditorOptionsLoading), q = w(() => V().saveEditingCell), J = w(() => V().updateEditingCellValue), Y = w(() => V().onEditorKeyDown), X = w(() => V().focusOnMount), Ee = w(() => V().toggleCheckboxWithKeyboard), Z = w(() => V().toolPanelHeaderLabel(o.column));
|
|
103
|
+
function De(e, t = !0) {
|
|
104
|
+
t && e.focus({ preventScroll: !0 });
|
|
105
|
+
}
|
|
106
|
+
function Q(e) {
|
|
107
|
+
e.key === "Enter" ? (e.preventDefault(), V().commitFullRowEdit(), V().gridRootEl?.focus({ preventScroll: !0 })) : e.key === "Escape" && (e.preventDefault(), V().cancelFullRowEdit(), V().gridRootEl?.focus({ preventScroll: !0 }));
|
|
108
|
+
}
|
|
109
|
+
function Oe(e) {
|
|
110
|
+
return typeof e == "object" && e && "value" in e ? String(e.value) : String(e);
|
|
111
|
+
}
|
|
112
|
+
function ke(e) {
|
|
113
|
+
return typeof e == "object" && e && "label" in e ? String(e.label) : String(e);
|
|
114
|
+
}
|
|
115
|
+
let Ae;
|
|
116
|
+
function je(e) {
|
|
117
|
+
let t = M(e);
|
|
118
|
+
return t && (Ae = t), t ?? Ae;
|
|
119
|
+
}
|
|
120
|
+
function Me() {
|
|
121
|
+
let e = V().editingCell;
|
|
122
|
+
return {
|
|
123
|
+
value: e?.value,
|
|
124
|
+
rowId: e?.rowId ?? "",
|
|
125
|
+
columnId: e?.columnId ?? "",
|
|
126
|
+
columnDef: o.column.columnDef,
|
|
127
|
+
row: o.row.original,
|
|
128
|
+
typed: e?.typed === !0,
|
|
129
|
+
grid: V(),
|
|
130
|
+
onChange: (e) => j(J)(e),
|
|
131
|
+
onCommit: (e) => {
|
|
132
|
+
e !== void 0 && j(J)(e), j(q)();
|
|
133
|
+
},
|
|
134
|
+
onCancel: () => {
|
|
135
|
+
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
136
|
+
},
|
|
137
|
+
onCommitAndMove: (e, t) => {
|
|
138
|
+
e !== void 0 && j(J)(e), V().commitAndMoveByTab(t === -1);
|
|
139
|
+
},
|
|
140
|
+
onCommitAndMoveDown: (e, t) => {
|
|
141
|
+
e !== void 0 && j(J)(e), V().commitAndMoveByEnter(t === !0);
|
|
142
|
+
},
|
|
143
|
+
onRequestClose: () => {
|
|
144
|
+
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
145
|
+
},
|
|
146
|
+
inCell: !0
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
var $ = x(), Ne = d($), Pe = (e) => {
|
|
150
|
+
let n = w(() => o.column.columnDef.editorType ?? "text"), i = w(() => j(Te)?.draft[o.column.id]);
|
|
151
|
+
var s = x(), c = d(s), u = (e) => {
|
|
152
|
+
var n = I();
|
|
153
|
+
g(n), l((e) => ne(n, e), [() => !!j(i)]), a("change", n, (e) => V().setFullRowDraft(o.column.id, e.currentTarget.checked)), a("keydown", n, Q), a("pointerdown", n, (e) => e.stopPropagation()), a("click", n, (e) => e.stopPropagation()), t(e, n);
|
|
154
|
+
}, p = (e) => {
|
|
155
|
+
let n = w(() => j(G)(o.column, o.row));
|
|
156
|
+
var r = R();
|
|
157
|
+
O(r, 21, () => j(n), (e) => Oe(e), (e, n) => {
|
|
158
|
+
var r = L(), i = f(r, !0);
|
|
159
|
+
T(r);
|
|
160
|
+
var a = {};
|
|
161
|
+
l((e, t) => {
|
|
162
|
+
S(i, e), a !== (a = t) && (r.value = (r.__value = t) ?? "");
|
|
163
|
+
}, [() => ke(j(n)), () => Oe(j(n))]), t(e, r);
|
|
164
|
+
}), T(r);
|
|
165
|
+
var s;
|
|
166
|
+
ee(r), l((e) => {
|
|
167
|
+
s !== (s = e) && (r.value = (r.__value = e) ?? "", m(r, e));
|
|
168
|
+
}, [() => String(j(i) ?? "")]), a("change", r, (e) => V().setFullRowDraft(o.column.id, e.currentTarget.value)), a("keydown", r, Q), a("pointerdown", r, (e) => e.stopPropagation()), a("click", r, (e) => e.stopPropagation()), t(e, r);
|
|
169
|
+
}, h = (e) => {
|
|
170
|
+
let r = w(() => j(n) === "number" ? "number" : j(n) === "date" ? "date" : j(n) === "datetime" ? "datetime-local" : j(n) === "time" ? "time" : j(n) === "password" ? "password" : "text");
|
|
171
|
+
var s = z();
|
|
172
|
+
g(s), l((e) => {
|
|
173
|
+
v(s, "type", j(r)), y(s, e);
|
|
174
|
+
}, [() => String(j(i) ?? "")]), a("input", s, (e) => V().setFullRowDraft(o.column.id, e.currentTarget.value)), a("keydown", s, Q), a("pointerdown", s, (e) => e.stopPropagation()), a("click", s, (e) => e.stopPropagation()), t(e, s);
|
|
175
|
+
};
|
|
176
|
+
r(c, (e) => {
|
|
177
|
+
j(n) === "checkbox" ? e(u) : j(n) === "list" || j(n) === "select" || j(n) === "rich-select" ? e(p, 1) : e(h, -1);
|
|
178
|
+
}), t(e, s);
|
|
179
|
+
}, Fe = (e) => {
|
|
180
|
+
var i = x(), u = d(i), m = (e) => {
|
|
181
|
+
let n = w(() => o.column.columnDef.cellEditor);
|
|
182
|
+
var r = x(), i = d(r);
|
|
183
|
+
{
|
|
184
|
+
let e = w(() => ({
|
|
185
|
+
cell: o.row.getAllCells().find((e) => e.column.id === o.column.id),
|
|
186
|
+
row: o.row,
|
|
187
|
+
column: o.column,
|
|
188
|
+
table: j(we),
|
|
189
|
+
getValue: () => V().editingCell?.value,
|
|
190
|
+
value: V().editingCell?.value,
|
|
191
|
+
update: (e) => {
|
|
192
|
+
V().editingCell = V().editingCell ? {
|
|
193
|
+
...V().editingCell,
|
|
194
|
+
value: e
|
|
195
|
+
} : V().editingCell;
|
|
196
|
+
},
|
|
197
|
+
commit: (e) => {
|
|
198
|
+
e !== void 0 && (V().editingCell = V().editingCell ? {
|
|
199
|
+
...V().editingCell,
|
|
200
|
+
value: e
|
|
201
|
+
} : V().editingCell), j(q)();
|
|
202
|
+
},
|
|
203
|
+
cancel: () => {
|
|
204
|
+
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
205
|
+
}
|
|
206
|
+
}));
|
|
207
|
+
s(i, () => j(n), () => j(e));
|
|
208
|
+
}
|
|
209
|
+
t(e, r);
|
|
210
|
+
}, _ = (e) => {
|
|
211
|
+
var n = me();
|
|
212
|
+
k(n, (e) => De?.(e)), l((e) => v(n, "aria-checked", e), [() => !!V().editingCell.value]), a("click", n, (e) => {
|
|
213
|
+
e.stopPropagation();
|
|
214
|
+
let t = !V().editingCell?.value;
|
|
215
|
+
V().editingCell = V().editingCell ? {
|
|
216
|
+
...V().editingCell,
|
|
217
|
+
value: t
|
|
218
|
+
} : V().editingCell, j(q)();
|
|
219
|
+
}), a("keydown", n, (e) => {
|
|
220
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
221
|
+
j(Ee)(e, () => {
|
|
222
|
+
e.stopPropagation();
|
|
223
|
+
let t = !V().editingCell?.value;
|
|
224
|
+
V().editingCell = V().editingCell ? {
|
|
225
|
+
...V().editingCell,
|
|
226
|
+
value: t
|
|
227
|
+
} : V().editingCell, j(q)();
|
|
228
|
+
});
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
j(Y)(e);
|
|
232
|
+
}), c("blur", n, () => j(q)()), t(e, n);
|
|
233
|
+
}, ee = (e) => {
|
|
234
|
+
let i = w(() => j(G)(o.column, o.row)), a = w(() => j(K)(o.column, o.row)), s = w(() => o.column.columnDef.editorMultiple === !0);
|
|
235
|
+
var c = x(), l = d(c), u = (e) => {
|
|
236
|
+
var r = x(), o = d(r);
|
|
237
|
+
{
|
|
238
|
+
let e = w(() => V().editingCell?.value);
|
|
239
|
+
n(o, () => j(U), (t, n) => {
|
|
240
|
+
n(t, {
|
|
241
|
+
get options() {
|
|
242
|
+
return j(i);
|
|
243
|
+
},
|
|
244
|
+
get loading() {
|
|
245
|
+
return j(a);
|
|
246
|
+
},
|
|
247
|
+
get value() {
|
|
248
|
+
return j(e);
|
|
249
|
+
},
|
|
250
|
+
get multiple() {
|
|
251
|
+
return j(s);
|
|
252
|
+
},
|
|
253
|
+
placeholder: "Select…",
|
|
254
|
+
onChange: (e) => {
|
|
255
|
+
V().editingCell = V().editingCell ? {
|
|
256
|
+
...V().editingCell,
|
|
257
|
+
value: e
|
|
258
|
+
} : V().editingCell;
|
|
259
|
+
},
|
|
260
|
+
onCommit: () => j(q)(),
|
|
261
|
+
onCancel: () => {
|
|
262
|
+
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
t(e, r);
|
|
268
|
+
};
|
|
269
|
+
r(l, (e) => {
|
|
270
|
+
j(U) && e(u);
|
|
271
|
+
}), t(e, c);
|
|
272
|
+
}, b = (e) => {
|
|
273
|
+
let t = w(() => j(G)(o.column, o.row)), n = w(() => j(K)(o.column, o.row)), r = w(() => o.column.columnDef.editorMultiple === !0), i = w(() => ie(V().editingCell?.value));
|
|
274
|
+
B(e, () => j(t), () => j(r), () => j(i), () => j(n));
|
|
275
|
+
}, C = (e) => {
|
|
276
|
+
let n = w(() => Math.max(0, Math.min(5, Math.round(Number(V().editingCell?.value) || 0)))), r = w(() => Math.min(5, Math.max(1, j(n))));
|
|
277
|
+
var i = ge(), o = f(i);
|
|
278
|
+
O(o, 16, () => [
|
|
279
|
+
1,
|
|
280
|
+
2,
|
|
281
|
+
3,
|
|
282
|
+
4,
|
|
283
|
+
5
|
|
284
|
+
], (e) => e, (e, i) => {
|
|
285
|
+
var o = he();
|
|
286
|
+
k(o, (e, t) => De?.(e, t), () => i === j(r)), l(() => {
|
|
287
|
+
v(o, "aria-checked", j(n) >= i), v(o, "aria-label", `${i} ${i === 1 ? "star" : "stars"}`), A(o, 1, `sv-grid-rating-star ${j(n) >= i ? "sv-grid-rating-star-on" : ""}`);
|
|
288
|
+
}), a("mousedown", o, (e) => e.preventDefault()), a("click", o, (e) => {
|
|
289
|
+
e.stopPropagation(), V().editingCell = V().editingCell ? {
|
|
290
|
+
...V().editingCell,
|
|
291
|
+
value: i
|
|
292
|
+
} : V().editingCell, j(q)();
|
|
293
|
+
}), a("keydown", o, (e) => {
|
|
294
|
+
let t = e.key;
|
|
295
|
+
if (t !== "ArrowLeft" && t !== "ArrowRight" && t !== "Home" && t !== "End") {
|
|
296
|
+
j(Y)(e);
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
e.preventDefault(), e.stopPropagation();
|
|
300
|
+
let r = Math.min(5, Math.max(1, j(n))), i = t === "Home" ? 1 : t === "End" ? 5 : t === "ArrowLeft" ? Math.max(1, r - 1) : Math.min(5, r + 1);
|
|
301
|
+
V().editingCell = V().editingCell ? {
|
|
302
|
+
...V().editingCell,
|
|
303
|
+
value: i
|
|
304
|
+
} : V().editingCell, (e.currentTarget.parentElement?.querySelectorAll(".sv-grid-rating-star"))?.[i - 1]?.focus({ preventScroll: !0 });
|
|
305
|
+
}), t(e, o);
|
|
306
|
+
});
|
|
307
|
+
var s = p(o, 2);
|
|
308
|
+
T(i), a("mousedown", s, (e) => e.preventDefault()), a("click", s, (e) => {
|
|
309
|
+
e.stopPropagation(), V().editingCell = V().editingCell ? {
|
|
310
|
+
...V().editingCell,
|
|
311
|
+
value: 0
|
|
312
|
+
} : V().editingCell, j(q)();
|
|
313
|
+
}), t(e, i);
|
|
314
|
+
}, ne = (e) => {
|
|
315
|
+
let i = w(() => j(G)(o.column, o.row)), a = w(() => j(K)(o.column, o.row));
|
|
316
|
+
var s = x(), c = d(s), l = (e) => {
|
|
317
|
+
var r = x(), o = d(r);
|
|
318
|
+
{
|
|
319
|
+
let e = w(() => V().editingCell?.value);
|
|
320
|
+
n(o, () => j(U), (t, n) => {
|
|
321
|
+
n(t, {
|
|
322
|
+
get options() {
|
|
323
|
+
return j(i);
|
|
324
|
+
},
|
|
325
|
+
get loading() {
|
|
326
|
+
return j(a);
|
|
327
|
+
},
|
|
328
|
+
get value() {
|
|
329
|
+
return j(e);
|
|
330
|
+
},
|
|
331
|
+
multiple: !1,
|
|
332
|
+
placeholder: "Select…",
|
|
333
|
+
onChange: (e) => {
|
|
334
|
+
V().editingCell = V().editingCell ? {
|
|
335
|
+
...V().editingCell,
|
|
336
|
+
value: e
|
|
337
|
+
} : V().editingCell;
|
|
338
|
+
},
|
|
339
|
+
onCommit: () => j(q)(),
|
|
340
|
+
onCancel: () => {
|
|
341
|
+
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
t(e, r);
|
|
347
|
+
};
|
|
348
|
+
r(c, (e) => {
|
|
349
|
+
j(U) && e(l);
|
|
350
|
+
}), t(e, s);
|
|
351
|
+
}, E = (e) => {
|
|
352
|
+
let i = w(() => j(G)(o.column, o.row)), a = w(() => j(K)(o.column, o.row));
|
|
353
|
+
var s = x(), c = d(s), l = (e) => {
|
|
354
|
+
var r = x(), o = d(r);
|
|
355
|
+
{
|
|
356
|
+
let e = w(() => V().editingCell?.value);
|
|
357
|
+
n(o, () => j(U), (t, n) => {
|
|
358
|
+
n(t, {
|
|
359
|
+
get options() {
|
|
360
|
+
return j(i);
|
|
361
|
+
},
|
|
362
|
+
get loading() {
|
|
363
|
+
return j(a);
|
|
364
|
+
},
|
|
365
|
+
get value() {
|
|
366
|
+
return j(e);
|
|
367
|
+
},
|
|
368
|
+
multiple: !1,
|
|
369
|
+
searchable: !0,
|
|
370
|
+
placeholder: "Search…",
|
|
371
|
+
onChange: (e) => {
|
|
372
|
+
V().editingCell = V().editingCell ? {
|
|
373
|
+
...V().editingCell,
|
|
374
|
+
value: e
|
|
375
|
+
} : V().editingCell;
|
|
376
|
+
},
|
|
377
|
+
onCommit: () => j(q)(),
|
|
378
|
+
onCancel: () => {
|
|
379
|
+
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
t(e, r);
|
|
385
|
+
};
|
|
386
|
+
r(c, (e) => {
|
|
387
|
+
j(U) && e(l);
|
|
388
|
+
}), t(e, s);
|
|
389
|
+
}, D = (e) => {
|
|
390
|
+
var n = _e();
|
|
391
|
+
re(n), k(n, (e) => j(X)?.(e)), l((e) => {
|
|
392
|
+
v(n, "aria-label", j(Z)), y(n, e);
|
|
393
|
+
}, [() => String(V().editingCell?.value ?? "")]), a("pointerdown", n, (e) => e.stopPropagation()), a("input", n, (e) => j(J)(e.currentTarget.value)), a("keydown", n, (e) => {
|
|
394
|
+
if (e.stopPropagation(), e.key === "Escape") {
|
|
395
|
+
e.preventDefault(), V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
if (e.key === "Tab") {
|
|
399
|
+
e.preventDefault(), V().commitAndMoveByTab(e.shiftKey);
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
e.key === "Enter" && (e.ctrlKey || e.metaKey) && (e.preventDefault(), j(q)(), V().gridRootEl?.focus({ preventScroll: !0 }));
|
|
403
|
+
}), c("blur", n, () => j(q)()), t(e, n);
|
|
404
|
+
}, M = (e) => {
|
|
405
|
+
let n = w(() => j(G)(o.column, o.row)), i = w(() => String(V().editingCell?.value ?? "")), s = w(() => j(i).trim() ? j(n).filter((e) => String(e.label).toLowerCase().includes(j(i).toLowerCase())) : j(n));
|
|
406
|
+
var u = be(), d = f(u);
|
|
407
|
+
g(d), k(d, (e) => j(X)?.(e));
|
|
408
|
+
var m = p(d, 2), h = (e) => {
|
|
409
|
+
var n = ye();
|
|
410
|
+
O(n, 21, () => j(s).slice(0, 50), (e) => e.value, (e, n) => {
|
|
411
|
+
var r = ve(), o = f(r, !0);
|
|
412
|
+
T(r), l((e) => {
|
|
413
|
+
v(r, "aria-selected", e), S(o, j(n).label);
|
|
414
|
+
}, [() => String(j(n).value) === j(i)]), a("mousedown", r, (e) => {
|
|
415
|
+
e.preventDefault(), V().editingCell = V().editingCell ? {
|
|
416
|
+
...V().editingCell,
|
|
417
|
+
value: j(n).value
|
|
418
|
+
} : V().editingCell, j(q)();
|
|
419
|
+
}), t(e, r);
|
|
420
|
+
}), T(n), t(e, n);
|
|
421
|
+
};
|
|
422
|
+
r(m, (e) => {
|
|
423
|
+
j(s).length > 0 && e(h);
|
|
424
|
+
}), T(u), l(() => y(d, j(i))), a("pointerdown", d, (e) => e.stopPropagation()), a("input", d, (e) => j(J)(e.currentTarget.value)), c("blur", d, () => j(q)()), a("keydown", d, function(...e) {
|
|
425
|
+
j(Y)?.apply(this, e);
|
|
426
|
+
}), t(e, u);
|
|
427
|
+
}, N = (e) => {
|
|
428
|
+
var i = x(), a = d(i), s = (e) => {
|
|
429
|
+
var r = x(), i = d(r);
|
|
430
|
+
{
|
|
431
|
+
let e = w(() => V().editingCell?.value), t = w(() => o.column.columnDef.editorFormatString ?? "yyyy-MM-dd");
|
|
432
|
+
n(i, () => j(W), (n, r) => {
|
|
433
|
+
r(n, {
|
|
434
|
+
get value() {
|
|
435
|
+
return j(e);
|
|
436
|
+
},
|
|
437
|
+
get formatString() {
|
|
438
|
+
return j(t);
|
|
439
|
+
},
|
|
440
|
+
dropDownDisplayMode: "calendar",
|
|
441
|
+
autoOpen: !0,
|
|
442
|
+
block: !0,
|
|
443
|
+
onChange: (e) => j(J)(e),
|
|
444
|
+
onCommit: () => j(q)(),
|
|
445
|
+
onCancel: () => {
|
|
446
|
+
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
t(e, r);
|
|
452
|
+
};
|
|
453
|
+
r(a, (e) => {
|
|
454
|
+
j(W) && e(s);
|
|
455
|
+
}), t(e, i);
|
|
456
|
+
}, P = (e) => {
|
|
457
|
+
var i = x(), a = d(i), s = (e) => {
|
|
458
|
+
var r = x(), i = d(r);
|
|
459
|
+
{
|
|
460
|
+
let e = w(() => V().editingCell?.value), t = w(() => o.column.columnDef.editorFormatString ?? "yyyy-MM-dd HH:mm");
|
|
461
|
+
n(i, () => j(W), (n, r) => {
|
|
462
|
+
r(n, {
|
|
463
|
+
get value() {
|
|
464
|
+
return j(e);
|
|
465
|
+
},
|
|
466
|
+
get formatString() {
|
|
467
|
+
return j(t);
|
|
468
|
+
},
|
|
469
|
+
dropDownDisplayMode: "both",
|
|
470
|
+
autoOpen: !0,
|
|
471
|
+
block: !0,
|
|
472
|
+
onChange: (e) => j(J)(e),
|
|
473
|
+
onCommit: () => j(q)(),
|
|
474
|
+
onCancel: () => {
|
|
475
|
+
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
t(e, r);
|
|
481
|
+
};
|
|
482
|
+
r(a, (e) => {
|
|
483
|
+
j(W) && e(s);
|
|
484
|
+
}), t(e, i);
|
|
485
|
+
}, F = (e) => {
|
|
486
|
+
var i = x(), a = d(i), o = (e) => {
|
|
487
|
+
var r = x(), i = d(r);
|
|
488
|
+
{
|
|
489
|
+
let e = w(() => de(V().editingCell?.value));
|
|
490
|
+
n(i, () => j(W), (t, n) => {
|
|
491
|
+
n(t, {
|
|
492
|
+
get value() {
|
|
493
|
+
return j(e);
|
|
494
|
+
},
|
|
495
|
+
formatString: "HH:mm",
|
|
496
|
+
dropDownDisplayMode: "time",
|
|
497
|
+
autoOpen: !0,
|
|
498
|
+
block: !0,
|
|
499
|
+
onChange: (e) => j(J)(ce(e)),
|
|
500
|
+
onCommit: () => j(q)(),
|
|
501
|
+
onCancel: () => {
|
|
502
|
+
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
t(e, r);
|
|
508
|
+
};
|
|
509
|
+
r(a, (e) => {
|
|
510
|
+
j(W) && e(o);
|
|
511
|
+
}), t(e, i);
|
|
512
|
+
}, I = (e) => {
|
|
513
|
+
var n = xe();
|
|
514
|
+
g(n), k(n, (e) => j(X)?.(e)), l((e, t) => {
|
|
515
|
+
A(n, 1, e), y(n, t);
|
|
516
|
+
}, [() => h(se("color")), () => le("color", V().editingCell?.value)]), a("input", n, (e) => j(J)(e.currentTarget.value)), a("change", n, (e) => {
|
|
517
|
+
j(J)(e.currentTarget.value), j(q)();
|
|
518
|
+
}), c("blur", n, () => j(q)()), a("keydown", n, function(...e) {
|
|
519
|
+
j(Y)?.apply(this, e);
|
|
520
|
+
}), t(e, n);
|
|
521
|
+
}, L = (e) => {
|
|
522
|
+
let i = w(() => je(String(V().editingCell?.editorType)));
|
|
523
|
+
var a = x(), o = d(a), s = (e) => {
|
|
524
|
+
let r = w(() => j(i).component);
|
|
525
|
+
var a = x(), o = d(a);
|
|
526
|
+
{
|
|
527
|
+
let e = w(() => pe(j(i), Me()));
|
|
528
|
+
n(o, () => j(r), (t, n) => {
|
|
529
|
+
n(t, te(() => j(e)));
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
t(e, a);
|
|
533
|
+
};
|
|
534
|
+
r(o, (e) => {
|
|
535
|
+
j(i) && e(s);
|
|
536
|
+
}), t(e, a);
|
|
537
|
+
}, R = w(() => fe(String(V().editingCell?.editorType ?? ""))), z = (e) => {
|
|
538
|
+
var n = Se();
|
|
539
|
+
re(n), k(n, (e) => j(X)?.(e)), l((e, t) => {
|
|
540
|
+
v(n, "aria-label", j(Z)), v(n, "rows", e), y(n, t);
|
|
541
|
+
}, [() => Math.max(1, String(V().editingCell?.value ?? "").split("\n").length), () => String(V().editingCell?.value ?? "")]), a("input", n, (e) => {
|
|
542
|
+
let t = e.currentTarget;
|
|
543
|
+
t.rows = Math.max(1, t.value.split("\n").length), j(J)(t.value);
|
|
544
|
+
}), c("blur", n, () => j(q)()), a("keydown", n, function(...e) {
|
|
545
|
+
j(Y)?.apply(this, e);
|
|
546
|
+
}), t(e, n);
|
|
547
|
+
}, H = (e) => {
|
|
548
|
+
let n = w(() => V().editingCell?.editorType ?? "text"), r = w(() => ae(j(n)) === "text" && oe(j(n)) === "number");
|
|
549
|
+
var i = Ce();
|
|
550
|
+
g(i), k(i, (e) => j(X)?.(e)), l((e, t, n) => {
|
|
551
|
+
v(i, "aria-label", j(Z)), A(i, 1, e), v(i, "type", t), v(i, "inputmode", j(r) ? "decimal" : void 0), y(i, n);
|
|
552
|
+
}, [
|
|
553
|
+
() => h(se(j(n))),
|
|
554
|
+
() => ae(j(n)),
|
|
555
|
+
() => le(j(n), V().editingCell?.value)
|
|
556
|
+
]), a("input", i, (e) => {
|
|
557
|
+
let t = e.currentTarget;
|
|
558
|
+
if (j(r) && !ue(t.value)) {
|
|
559
|
+
t.value = String(V().editingCell?.value ?? "");
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
j(J)(t.value);
|
|
563
|
+
}), c("blur", i, () => j(q)()), a("keydown", i, function(...e) {
|
|
564
|
+
j(Y)?.apply(this, e);
|
|
565
|
+
}), t(e, i);
|
|
566
|
+
};
|
|
567
|
+
r(u, (e) => {
|
|
568
|
+
o.column.columnDef.cellEditor ? e(m) : V().editingCell?.editorType === "checkbox" ? e(_, 1) : V().editingCell?.editorType === "list" ? e(ee, 2) : V().editingCell?.editorType === "chips" ? e(b, 3) : V().editingCell?.editorType === "rating" ? e(C, 4) : V().editingCell?.editorType === "select" ? e(ne, 5) : V().editingCell?.editorType === "rich-select" ? e(E, 6) : V().editingCell?.editorType === "textarea" ? e(D, 7) : V().editingCell?.editorType === "autocomplete" ? e(M, 8) : V().editingCell?.editorType === "date" ? e(N, 9) : V().editingCell?.editorType === "datetime" ? e(P, 10) : V().editingCell?.editorType === "time" ? e(F, 11) : V().editingCell?.editorType === "color" ? e(I, 12) : j(R) ? e(L, 13) : (V().editingCell?.editorType ?? "text") === "text" && o.column?.columnDef.editorMultiline ? e(z, 14) : e(H, -1);
|
|
569
|
+
}), t(e, i);
|
|
570
|
+
};
|
|
571
|
+
r(Ne, (e) => {
|
|
572
|
+
H() ? e(Pe) : e(Fe, -1);
|
|
573
|
+
}), t(i, $), E();
|
|
574
|
+
}
|
|
575
|
+
i([
|
|
576
|
+
"mousedown",
|
|
577
|
+
"click",
|
|
578
|
+
"keydown",
|
|
579
|
+
"change",
|
|
580
|
+
"pointerdown",
|
|
581
|
+
"input"
|
|
582
|
+
]);
|
|
583
|
+
//#endregion
|
|
584
|
+
export { B as default };
|