@svgrid/grid-wc 3.0.46 → 3.0.47
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/GridFind-C1YbloFh.js +39 -0
- package/dist/GridFooter-DOR8m9GQ.js +142 -0
- package/dist/GridMenus-Da8XGbc6.js +1461 -0
- package/dist/PinSplitter-Du4ZF8T3.js +178 -0
- package/dist/SvChartMenu-B6kpmwUv.js +401 -0
- package/dist/{SvDateRangeInput-Cpss2SsG.js → SvDateRangeInput-ByR-LFgf.js} +78 -77
- package/dist/SvDateTimePicker-BCxhFb5c.js +763 -0
- package/dist/{SvField-C--8r4go.js → SvField-CtzxdF7J.js} +100 -99
- package/dist/SvGridCellEditor-BUdVD7xM.js +594 -0
- package/dist/SvGridChart-DkKI8-bj.js +3684 -0
- package/dist/SvGridChartBuilder-BCQ3W8TY.js +1086 -0
- package/dist/SvGridChartPanel-uqul044E.js +1689 -0
- package/dist/{SvGridChartView-Bvacwk37.js → SvGridChartView-DWxEFzdM.js} +9 -8
- package/dist/SvGridDropdown-CnCQuXaI.js +258 -0
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +12 -3
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
- package/dist/angular/types/svgrid-grid-wc-angular.d.ts +5 -1
- package/dist/chart/SvChartMenu-NxEyX5kU.js +635 -0
- package/dist/chart/{chart-export-C43UPY8D.js → chart-export-Dj_zVsjI.js} +5 -7
- package/dist/chart/chart-export-pdf-pmzjhHhB.js +156 -0
- package/dist/chart/{client-BuB0wIgc.js → client-Y303i9Lw.js} +1317 -1214
- package/dist/chart/sv-chart-element.js +2390 -2405
- package/dist/chart-export-pdf-DyuVs1gO.js +156 -0
- package/dist/client-OtsRxGjS.js +3075 -0
- package/dist/{column-resize-DUPgynvc.js → column-resize-SEn7el6C.js} +21 -9
- package/dist/{csv-injection-Ce26_TOb.js → csv-injection-Cxf6dMrr.js} +1 -1
- package/dist/{date-format-B0RznzxC.js → date-format-DngG1HJ5.js} +402 -407
- package/dist/{shadow/export-format-6jDuF2nb.js → export-format-7DhxeN27.js} +2 -2
- package/dist/{grid-extension.svelte-CBhmpjuc.js → grid-extension.svelte-DToFhcZv.js} +1 -1
- package/dist/grid-menu-messages-BEsB6Jhh.js +57 -0
- package/dist/history-Q12tf0k-.js +80 -0
- package/dist/list-option-DpIu99JN.js +203 -0
- package/dist/menu-focus-lmTebXyL.js +45 -0
- package/dist/range-commit-C6Rogxem.js +385 -0
- package/dist/react/index.d.ts +11 -0
- package/dist/react/index.js +2 -1
- package/dist/shadow/GridFind-CcoKoisE.js +39 -0
- package/dist/shadow/GridFooter-CDq71ytl.js +142 -0
- package/dist/shadow/GridMenus-RAp-E3hp.js +1461 -0
- package/dist/shadow/PinSplitter-BAYTAZtm.js +178 -0
- package/dist/shadow/SvChartMenu-C74rWwjU.js +401 -0
- package/dist/shadow/{SvDateRangeInput-Cpss2SsG.js → SvDateRangeInput-9Wq4E64y.js} +78 -77
- package/dist/shadow/SvDateTimePicker-y9jPLR19.js +763 -0
- package/dist/shadow/{SvField-C--8r4go.js → SvField-DGPj2clt.js} +100 -99
- package/dist/shadow/SvGridCellEditor-CzeBp9lp.js +594 -0
- package/dist/shadow/SvGridChart-zTsB6F3Y.js +3684 -0
- package/dist/shadow/SvGridChartBuilder-VUKgOcp7.js +1086 -0
- package/dist/shadow/SvGridChartPanel-DkjEUB7t.js +1689 -0
- package/dist/shadow/{SvGridChartView-Bvacwk37.js → SvGridChartView-DQmJahyT.js} +9 -8
- package/dist/shadow/SvGridDropdown-B_5kqHQE.js +258 -0
- package/dist/shadow/chart-export-pdf-BZy6f5QB.js +156 -0
- package/dist/shadow/client-OtsRxGjS.js +3075 -0
- package/dist/shadow/{column-resize-DUPgynvc.js → column-resize-SEn7el6C.js} +21 -9
- package/dist/shadow/{csv-injection-Ce26_TOb.js → csv-injection-Cxf6dMrr.js} +1 -1
- package/dist/shadow/{date-format-B0RznzxC.js → date-format-C9UkbCig.js} +402 -407
- package/dist/{export-format-6jDuF2nb.js → shadow/export-format-7DhxeN27.js} +2 -2
- package/dist/shadow/{grid-extension.svelte-CBhmpjuc.js → grid-extension.svelte-DToFhcZv.js} +1 -1
- package/dist/shadow/grid-menu-messages-BEsB6Jhh.js +57 -0
- package/dist/shadow/history-Q12tf0k-.js +80 -0
- package/dist/shadow/list-option-DpIu99JN.js +203 -0
- package/dist/shadow/menu-focus-lmTebXyL.js +45 -0
- package/dist/shadow/range-commit-C6Rogxem.js +385 -0
- package/dist/shadow/sv-grid-shadow-element.d.ts +7 -0
- package/dist/shadow/sv-grid-shadow-element.js +4236 -4469
- package/dist/shadow/{svelte-virtualizer.svelte-u-y0InK2.js → svelte-virtualizer.svelte-DWvD9wvL.js} +17 -12
- package/dist/sv-grid-element.d.ts +7 -0
- package/dist/sv-grid-element.js +4219 -4452
- package/dist/{svelte-virtualizer.svelte-u-y0InK2.js → svelte-virtualizer.svelte-DWvD9wvL.js} +17 -12
- package/dist/vue/index.d.ts +6 -2
- package/dist/vue/index.js +1 -1
- package/package.json +4 -4
- package/dist/GridFind-DianRZxS.js +0 -39
- package/dist/GridFooter-Bp3o5qJX.js +0 -162
- package/dist/GridMenus-BYkY3nhr.js +0 -1405
- package/dist/PinSplitter-CinhgIrH.js +0 -130
- package/dist/SvChartMenu-CgAcTloT.js +0 -413
- package/dist/SvDateTimePicker-DyRO_e91.js +0 -770
- package/dist/SvGridCellEditor-DHHGSjgp.js +0 -584
- package/dist/SvGridChart-BFQLtNmn.js +0 -3703
- package/dist/SvGridChartBuilder-CtGuoAOV.js +0 -1166
- package/dist/SvGridChartPanel-CeaXNzmV.js +0 -1743
- package/dist/SvGridDropdown-CrECQYeq.js +0 -257
- package/dist/chart/SvChartMenu-DslxOgPN.js +0 -590
- package/dist/chart/chart-export-pdf-C0_y8glC.js +0 -104
- package/dist/chart-export-pdf-DDVtypH7.js +0 -104
- package/dist/client-DtIdusS4.js +0 -2974
- package/dist/focus-trap-Dbb2tJxb.js +0 -65
- package/dist/list-option-DrRyivWp.js +0 -82
- package/dist/shadow/GridFind-DianRZxS.js +0 -39
- package/dist/shadow/GridFooter-DvMFqeNV.js +0 -162
- package/dist/shadow/GridMenus-DKLNTKDZ.js +0 -1405
- package/dist/shadow/PinSplitter-CinhgIrH.js +0 -130
- package/dist/shadow/SvChartMenu-CgAcTloT.js +0 -413
- package/dist/shadow/SvDateTimePicker-DyRO_e91.js +0 -770
- package/dist/shadow/SvGridCellEditor-DHHGSjgp.js +0 -584
- package/dist/shadow/SvGridChart-BFQLtNmn.js +0 -3703
- package/dist/shadow/SvGridChartBuilder-CtGuoAOV.js +0 -1166
- package/dist/shadow/SvGridChartPanel-CeaXNzmV.js +0 -1743
- package/dist/shadow/SvGridDropdown-CrECQYeq.js +0 -257
- package/dist/shadow/chart-export-pdf-DDVtypH7.js +0 -104
- package/dist/shadow/client-DtIdusS4.js +0 -2974
- package/dist/shadow/focus-trap-Dbb2tJxb.js +0 -65
- package/dist/shadow/list-option-DrRyivWp.js +0 -82
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
(function(){try{var c=".sv-grid-dropdown.svelte-r4kmto{background:var(--sg-bg,#fff);height:100%;color:var(--sg-fg,#0f172a);position:absolute;top:0;left:0;right:0}.sv-grid-dropdown-trigger.svelte-r4kmto{background:var(--sg-bg,#fff);width:100%;height:100%;min-height:28px;color:var(--sg-fg,#0f172a);font:inherit;text-align:start;cursor:pointer;box-sizing:border-box;border:0;outline:none;align-items:center;gap:6px;padding:0 8px;display:flex}.sv-grid-dropdown-trigger.svelte-r4kmto:focus{outline:2px solid var(--sg-accent,#2563eb);outline-offset:-2px}.sv-grid-dropdown-trigger-chips.svelte-r4kmto{flex-wrap:wrap;align-items:center;padding:4px 8px}.sv-grid-dropdown-chips.svelte-r4kmto{flex-wrap:wrap;flex:auto;align-items:center;gap:4px;min-width:0;display:inline-flex}.sv-grid-dropdown-label.svelte-r4kmto{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}.sv-grid-dropdown-caret.svelte-r4kmto{opacity:.7;flex:none;font-size:10px;line-height:1}.sv-grid-dropdown-panel{background:var(--sg-header-bg,var(--sg-bg,#fff));color:var(--sg-fg,#0f172a);border:1px solid var(--sg-accent,#2563eb);border-radius:6px;padding:4px 0;font-family:inherit;overflow-y:auto;box-shadow:0 12px 28px #00000073}.sv-grid-dropdown-panel.sv-grid-dropdown-panel-fits{overflow:visible}.sv-grid-dropdown-option{cursor:pointer;-webkit-user-select:none;user-select:none;color:var(--sg-fg,#0f172a);align-items:center;gap:8px;padding:6px 10px;display:flex}.sv-grid-dropdown-option-highlighted{background:var(--sg-row-hover-bg,#2563eb1a)}.sv-grid-dropdown-option-selected{background:var(--sg-selection-bg,#2563eb26);font-weight:600}.sv-grid-dropdown-option-selected.sv-grid-dropdown-option-highlighted{background:var(--sg-row-hover-bg,#2563eb2e)}.sv-grid-dropdown-option-label{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}.sv-grid-dropdown-check{color:var(--sg-accent,#2563eb);flex:0 0 16px;justify-content:center;align-items:center;font-weight:700;display:inline-flex}.sv-grid-dropdown-swatch{border:1px solid color-mix(in srgb, var(--sg-fg,#0f172a) 25%, transparent);border-radius:999px;flex:0 0 12px;width:12px;height:12px}.sv-grid-dropdown-option-chip{text-overflow:ellipsis;white-space:nowrap;border:1px solid #0000;border-radius:999px;align-items:center;max-width:100%;padding:2px 11px;font-size:.9em;font-weight:600;line-height:1.5;display:inline-flex;overflow:hidden}.sv-grid-dropdown-empty{color:var(--sg-muted,#0f172a8c);padding:8px 10px;font-size:.9em;font-style:italic}.sv-grid-dropdown-footer{border-top:1px solid var(--sg-border,#0f172a14);justify-content:flex-end;margin-top:2px;padding:4px 6px;display:flex}.sv-grid-dropdown-done{text-transform:uppercase;letter-spacing:.04em;color:#fff;background:var(--sg-accent,#2563eb);cursor:pointer;border:0;border-radius:4px;padding:4px 10px;font-size:11px}.sv-grid-dropdown-done:hover{filter:brightness(1.12)}.sv-grid-chip.svelte-r4kmto{background:color-mix(in srgb, var(--sg-accent,#2563eb) 18%, transparent);color:var(--sg-fg,#0f172a);border:1px solid color-mix(in srgb, var(--sg-accent,#2563eb) 35%, transparent);white-space:nowrap;border-radius:999px;align-items:center;gap:4px;padding:2px 8px;font-size:.85em;line-height:1.4;display:inline-flex}.sv-grid-chip-removable.svelte-r4kmto{padding-inline-end:2px}.sv-grid-chip-remove.svelte-r4kmto{background:color-mix(in srgb, var(--sg-fg,#0f172a) 18%, transparent);width:16px;height:16px;color:inherit;cursor:pointer;border:0;border-radius:999px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.sv-grid-chip-remove.svelte-r4kmto:hover{color:#fff;background:#dc2626b3}\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:SvGridDropdown-CrECQYeq.js"||x[i].textContent===c)return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"grid:SvGridDropdown-CrECQYeq.js");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
|
|
2
|
-
import { $ as e, A as t, D as n, I as r, L as i, M as a, P as o, Q as s, R as c, U as l, W as u, X as d, Y as f, Z as p, a as m, at as h, d as g, et as _, f as v, it as y, j as ee, k as b, n as x, nt as S, ot as C, rt as w, s as te, v as T, w as E, x as D, y as O, z as k } from "./client-DtIdusS4.js";
|
|
3
|
-
import { n as ne, r as re, t as ie } from "./popover-WsGlvtQv.js";
|
|
4
|
-
//#region ../grid/dist/SvGridDropdown.svelte
|
|
5
|
-
var ae = a("<span class=\"sv-grid-chip sv-grid-chip-removable svelte-r4kmto\"> <span class=\"sv-grid-chip-remove svelte-r4kmto\" role=\"button\">×</span></span>"), oe = a("<span class=\"sv-grid-dropdown-chips svelte-r4kmto\"></span>"), se = a("<span class=\"sv-grid-chip svelte-r4kmto\"> </span>"), ce = a("<span class=\"sv-grid-dropdown-label svelte-r4kmto\"> </span>"), le = a("<input type=\"search\" class=\"sv-grid-dropdown-search\" placeholder=\"Search…\"/>"), ue = a("<div class=\"sv-grid-dropdown-empty\" role=\"status\" aria-live=\"polite\">Loading…</div>"), de = a("<div class=\"sv-grid-dropdown-empty\"> </div>"), fe = a("<span class=\"sv-grid-dropdown-check\" aria-hidden=\"true\"> </span>"), pe = a("<span class=\"sv-grid-dropdown-option-chip\"> </span>"), me = a("<span class=\"sv-grid-dropdown-option-label\"> </span>"), he = a("<div role=\"option\"><!> <!></div>"), ge = a("<div class=\"sv-grid-dropdown-footer\"><button type=\"button\" class=\"sv-grid-dropdown-done\">Done</button></div>"), _e = a("<div role=\"listbox\"><!> <!> <!></div>"), ve = a("<div><button type=\"button\" aria-haspopup=\"listbox\"><!> <span class=\"sv-grid-dropdown-caret svelte-r4kmto\" aria-hidden=\"true\">▾</span></button> <!></div>");
|
|
6
|
-
function ye(r, a) {
|
|
7
|
-
let ye = o();
|
|
8
|
-
y(a, !0);
|
|
9
|
-
let A = x(a, "multiple", 3, !1), be = x(a, "placeholder", 3, "Select…"), j = x(a, "renderChipsInTrigger", 3, !1), M = x(a, "searchable", 3, !1), xe = x(a, "autoOpen", 3, !0), Se = x(a, "loading", 3, !1), Ce = x(a, "invalid", 3, !1);
|
|
10
|
-
function N(e) {
|
|
11
|
-
return e >= 0 && e < k(I).length ? `${ye}-opt-${e}` : void 0;
|
|
12
|
-
}
|
|
13
|
-
let P = S(() => a.options.some((e) => e.color) ? 40 : 32), F = _(""), I = S(() => !M() || !k(F).trim() ? a.options : (() => {
|
|
14
|
-
let e = k(F).trim().toLowerCase();
|
|
15
|
-
return a.options.filter((t) => t.label.toLowerCase().includes(e));
|
|
16
|
-
})()), L = _(!1), R = _(-1), z = _(null), B = _(null), V = _(null), H = _(s({
|
|
17
|
-
top: 0,
|
|
18
|
-
left: 0,
|
|
19
|
-
width: 0,
|
|
20
|
-
openUpward: !1,
|
|
21
|
-
maxHeight: 0,
|
|
22
|
-
availHeight: 0
|
|
23
|
-
})), U = S(() => Array.isArray(a.value) ? a.value : a.value == null || a.value === "" ? [] : [a.value]), we = S(() => {
|
|
24
|
-
if (k(U).length === 0) return be();
|
|
25
|
-
if (!A()) {
|
|
26
|
-
let e = k(U)[0], t = a.options.find((t) => String(t.value) === String(e));
|
|
27
|
-
return t ? t.label : String(e);
|
|
28
|
-
}
|
|
29
|
-
return `${k(U).length} selected`;
|
|
30
|
-
}), Te = S(() => {
|
|
31
|
-
if (A() || k(U).length !== 1) return;
|
|
32
|
-
let e = k(U)[0];
|
|
33
|
-
return a.options.find((t) => String(t.value) === String(e))?.color;
|
|
34
|
-
});
|
|
35
|
-
function W(e) {
|
|
36
|
-
return k(U).some((t) => String(t) === String(e.value));
|
|
37
|
-
}
|
|
38
|
-
function G(t) {
|
|
39
|
-
if (A()) {
|
|
40
|
-
let e = W(t) ? k(U).filter((e) => String(e) !== String(t.value)) : [...k(U), t.value];
|
|
41
|
-
a.onChange?.(e);
|
|
42
|
-
} else a.onChange?.(t.value), e(L, !1), a.onCommit?.();
|
|
43
|
-
}
|
|
44
|
-
function K() {
|
|
45
|
-
if (!k(L)) {
|
|
46
|
-
if (e(L, !0), k(R) < 0) {
|
|
47
|
-
let t = a.options.findIndex((e) => W(e));
|
|
48
|
-
e(R, t >= 0 ? t : 0, !0);
|
|
49
|
-
}
|
|
50
|
-
q();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function q() {
|
|
54
|
-
if (!k(B)) return;
|
|
55
|
-
let t = Math.min(k(I).length, 10), n = M() ? 38 : 0, r = t * k(P) + (A() ? 40 : 0) + n + 8;
|
|
56
|
-
e(H, ie(k(B).getBoundingClientRect(), {
|
|
57
|
-
estimatedHeight: r,
|
|
58
|
-
clampHorizontal: !1
|
|
59
|
-
}), !0);
|
|
60
|
-
}
|
|
61
|
-
u(() => {
|
|
62
|
-
if (!k(L)) return;
|
|
63
|
-
let e = () => q();
|
|
64
|
-
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
65
|
-
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
66
|
-
};
|
|
67
|
-
}), u(() => {
|
|
68
|
-
k(L) && (k(I).length, k(P), q());
|
|
69
|
-
});
|
|
70
|
-
function J() {
|
|
71
|
-
e(L, !1), e(R, -1);
|
|
72
|
-
}
|
|
73
|
-
function Ee(t) {
|
|
74
|
-
if (t.stopPropagation(), t.key === "Escape") {
|
|
75
|
-
t.preventDefault(), J(), a.onCancel?.();
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (t.key === "ArrowDown") {
|
|
79
|
-
if (t.preventDefault(), !k(L)) {
|
|
80
|
-
K();
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
e(R, Math.min(k(R) + 1, a.options.length - 1), !0), Y();
|
|
84
|
-
} else if (t.key === "ArrowUp") {
|
|
85
|
-
if (t.preventDefault(), !k(L)) {
|
|
86
|
-
K();
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
e(R, Math.max(k(R) - 1, 0), !0), Y();
|
|
90
|
-
} else if (t.key === "Home") {
|
|
91
|
-
if (!k(L)) return;
|
|
92
|
-
t.preventDefault(), e(R, 0), Y();
|
|
93
|
-
} else if (t.key === "End") {
|
|
94
|
-
if (!k(L)) return;
|
|
95
|
-
t.preventDefault(), e(R, a.options.length - 1), Y();
|
|
96
|
-
} else if (t.key === "Enter") {
|
|
97
|
-
if (t.preventDefault(), !k(L)) {
|
|
98
|
-
K();
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
let e = a.options[k(R)];
|
|
102
|
-
e ? G(e) : A() && (J(), a.onCommit?.());
|
|
103
|
-
} else if (t.key === " " && k(L)) {
|
|
104
|
-
t.preventDefault();
|
|
105
|
-
let e = a.options[k(R)];
|
|
106
|
-
e && G(e);
|
|
107
|
-
} else t.key === "Tab" && (k(L) && J(), a.onCommit?.());
|
|
108
|
-
}
|
|
109
|
-
function Y() {
|
|
110
|
-
queueMicrotask(() => {
|
|
111
|
-
k(V) && k(V).querySelector(`[data-opt-idx="${k(R)}"]`)?.scrollIntoView({ block: "nearest" });
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
function De(e) {
|
|
115
|
-
let t = e.relatedTarget;
|
|
116
|
-
t && k(z)?.contains(t) || (k(L) && J(), a.onCommit?.());
|
|
117
|
-
}
|
|
118
|
-
function Oe(e, t) {
|
|
119
|
-
t.preventDefault(), t.stopPropagation();
|
|
120
|
-
let n = k(U).filter((t) => String(t) !== String(e));
|
|
121
|
-
a.onChange?.(A() ? n : n[0] ?? null);
|
|
122
|
-
}
|
|
123
|
-
function ke(e) {
|
|
124
|
-
xe() && (e.focus(), K());
|
|
125
|
-
}
|
|
126
|
-
u(() => {
|
|
127
|
-
if (!k(L)) return;
|
|
128
|
-
let e = (e) => {
|
|
129
|
-
let t = e.target;
|
|
130
|
-
t && (k(z)?.contains(t) || k(V)?.contains(t) || (J(), a.onCommit?.()));
|
|
131
|
-
};
|
|
132
|
-
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
133
|
-
});
|
|
134
|
-
function X(e) {
|
|
135
|
-
return `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));`;
|
|
136
|
-
}
|
|
137
|
-
var Z = ve();
|
|
138
|
-
let Ae;
|
|
139
|
-
var Q = f(Z);
|
|
140
|
-
let $;
|
|
141
|
-
var je = f(Q), Me = (e) => {
|
|
142
|
-
var n = oe();
|
|
143
|
-
E(n, 21, () => k(U), (e) => String(e), (e, n) => {
|
|
144
|
-
let r = S(() => a.options.find((e) => String(e.value) === String(k(n))));
|
|
145
|
-
var o = ae(), s = f(o), c = p(s);
|
|
146
|
-
v(c, "tabindex", -1), C(o), l((e, t, n) => {
|
|
147
|
-
T(o, e), b(s, `${t ?? ""} `), v(c, "aria-label", `Remove ${n ?? ""}`);
|
|
148
|
-
}, [
|
|
149
|
-
() => k(r)?.color ? X(k(r).color) : "",
|
|
150
|
-
() => k(r) ? k(r).label : String(k(n)),
|
|
151
|
-
() => k(r) ? k(r).label : String(k(n))
|
|
152
|
-
]), i("mousedown", c, (e) => e.preventDefault()), i("click", c, (e) => Oe(k(n), e)), t(e, o);
|
|
153
|
-
}), C(n), t(e, n);
|
|
154
|
-
}, Ne = (e) => {
|
|
155
|
-
var n = se(), r = f(n, !0);
|
|
156
|
-
C(n), l((e) => {
|
|
157
|
-
T(n, e), b(r, k(we));
|
|
158
|
-
}, [() => X(k(Te))]), t(e, n);
|
|
159
|
-
}, Pe = (e) => {
|
|
160
|
-
var n = ce(), r = f(n, !0);
|
|
161
|
-
C(n), l(() => b(r, k(we))), t(e, n);
|
|
162
|
-
};
|
|
163
|
-
n(je, (e) => {
|
|
164
|
-
j() && k(U).length > 0 ? e(Me) : !A() && k(U).length === 1 && k(Te) ? e(Ne, 1) : e(Pe, -1);
|
|
165
|
-
}), h(2), C(Q), m(Q, (t) => e(B, t), () => k(B)), D(Q, (e) => ke?.(e));
|
|
166
|
-
var Fe = p(Q, 2), Ie = (r) => {
|
|
167
|
-
let o = S(() => a.options.length > 10), s = S(() => Math.min(k(o) ? 10 * k(P) + (A() ? 40 : 0) + 8 : Infinity, k(H).availHeight));
|
|
168
|
-
var u = _e();
|
|
169
|
-
let h, _;
|
|
170
|
-
var y = f(u), x = (n) => {
|
|
171
|
-
var r = le();
|
|
172
|
-
g(r), i("mousedown", r, (e) => e.stopPropagation()), i("click", r, (e) => e.stopPropagation()), i("keydown", r, (t) => {
|
|
173
|
-
t.key === "Escape" && (t.preventDefault(), e(L, !1), a.onCancel?.());
|
|
174
|
-
}), te(r, () => k(F), (t) => e(F, t)), t(n, r);
|
|
175
|
-
};
|
|
176
|
-
n(y, (e) => {
|
|
177
|
-
M() && e(x);
|
|
178
|
-
});
|
|
179
|
-
var w = p(y, 2), ie = (e) => {
|
|
180
|
-
var n = ue();
|
|
181
|
-
t(e, n);
|
|
182
|
-
}, ae = (e) => {
|
|
183
|
-
var n = de(), r = f(n, !0);
|
|
184
|
-
C(n), l(() => b(r, M() && k(F) ? `No matches for "${k(F)}"` : "No options")), t(e, n);
|
|
185
|
-
}, oe = (r) => {
|
|
186
|
-
var a = ee(), o = d(a);
|
|
187
|
-
E(o, 19, () => k(I), (e) => String(e.value), (r, a, o) => {
|
|
188
|
-
let s = S(() => W(k(a)));
|
|
189
|
-
var u = he();
|
|
190
|
-
let d;
|
|
191
|
-
var m = f(u), h = (e) => {
|
|
192
|
-
var n = fe(), r = f(n, !0);
|
|
193
|
-
C(n), l(() => b(r, k(s) ? "✓" : "")), t(e, n);
|
|
194
|
-
};
|
|
195
|
-
n(m, (e) => {
|
|
196
|
-
A() && e(h);
|
|
197
|
-
});
|
|
198
|
-
var g = p(m, 2), _ = (e) => {
|
|
199
|
-
var n = pe(), r = f(n, !0);
|
|
200
|
-
C(n), l((e) => {
|
|
201
|
-
T(n, e), b(r, k(a).label);
|
|
202
|
-
}, [() => X(k(a).color)]), t(e, n);
|
|
203
|
-
}, y = (e) => {
|
|
204
|
-
var n = me(), r = f(n, !0);
|
|
205
|
-
C(n), l(() => b(r, k(a).label)), t(e, n);
|
|
206
|
-
};
|
|
207
|
-
n(g, (e) => {
|
|
208
|
-
k(a).color ? e(_) : e(y, -1);
|
|
209
|
-
}), C(u), l((e) => {
|
|
210
|
-
d = O(u, 1, "sv-grid-dropdown-option", null, d, {
|
|
211
|
-
"sv-grid-dropdown-option-selected": k(s),
|
|
212
|
-
"sv-grid-dropdown-option-highlighted": k(o) === k(R)
|
|
213
|
-
}), v(u, "id", e), v(u, "aria-selected", k(s)), v(u, "data-opt-idx", k(o));
|
|
214
|
-
}, [() => N(k(o))]), i("mousedown", u, (e) => {
|
|
215
|
-
e.preventDefault(), G(k(a));
|
|
216
|
-
}), c("mouseenter", u, () => e(R, k(o), !0)), t(r, u);
|
|
217
|
-
}), t(r, a);
|
|
218
|
-
};
|
|
219
|
-
n(w, (e) => {
|
|
220
|
-
Se() && k(I).length === 0 ? e(ie) : k(I).length === 0 ? e(ae, 1) : e(oe, -1);
|
|
221
|
-
});
|
|
222
|
-
var se = p(w, 2), ce = (e) => {
|
|
223
|
-
var n = ge(), r = f(n);
|
|
224
|
-
C(n), i("mousedown", r, (e) => e.preventDefault()), i("click", r, () => {
|
|
225
|
-
J(), a.onCommit?.();
|
|
226
|
-
}), t(e, n);
|
|
227
|
-
};
|
|
228
|
-
n(se, (e) => {
|
|
229
|
-
A() && e(ce);
|
|
230
|
-
}), C(u), m(u, (t) => e(V, t), () => k(V)), D(u, (e) => re?.(e)), D(u, (e, t) => ne?.(e, t), () => ({ up: k(H).openUpward })), l(() => {
|
|
231
|
-
h = O(u, 1, "sv-grid-dropdown-panel", null, h, { "sv-grid-dropdown-panel-fits": !k(o) }), v(u, "aria-multiselectable", A()), _ = T(u, "", _, {
|
|
232
|
-
position: "fixed",
|
|
233
|
-
top: k(H).openUpward ? null : `${k(H).top}px`,
|
|
234
|
-
bottom: k(H).openUpward ? `${k(H).bottom}px` : null,
|
|
235
|
-
left: `${k(H).left}px`,
|
|
236
|
-
width: `${k(H).width}px`,
|
|
237
|
-
"max-height": k(s) === null ? null : `${k(s)}px`,
|
|
238
|
-
"z-index": "2147483647"
|
|
239
|
-
});
|
|
240
|
-
}), i("pointerdown", u, (e) => e.stopPropagation()), i("mousedown", u, (e) => e.stopPropagation()), i("click", u, (e) => e.stopPropagation()), t(r, u);
|
|
241
|
-
};
|
|
242
|
-
n(Fe, (e) => {
|
|
243
|
-
k(L) && e(Ie);
|
|
244
|
-
}), C(Z), m(Z, (t) => e(z, t), () => k(z)), l((e) => {
|
|
245
|
-
Ae = O(Z, 1, "sv-grid-dropdown svelte-r4kmto", null, Ae, { "sv-grid-dropdown-open": k(L) }), v(Q, "id", a.id), $ = O(Q, 1, "sv-grid-dropdown-trigger svelte-r4kmto", null, $, { "sv-grid-dropdown-trigger-chips": j() && k(U).length > 0 }), v(Q, "aria-expanded", k(L)), v(Q, "aria-label", a.ariaLabel), v(Q, "aria-invalid", Ce() || void 0), v(Q, "aria-describedby", a.describedBy), v(Q, "aria-activedescendant", e);
|
|
246
|
-
}, [() => k(L) ? N(k(R)) : void 0]), i("focusout", Z, De), i("click", Z, (e) => e.stopPropagation()), i("dblclick", Z, (e) => e.stopPropagation()), i("pointerdown", Z, (e) => e.stopPropagation()), i("mousedown", Z, (e) => e.stopPropagation()), i("click", Q, () => k(L) ? J() : K()), i("keydown", Q, Ee), t(r, Z), w();
|
|
247
|
-
}
|
|
248
|
-
r([
|
|
249
|
-
"focusout",
|
|
250
|
-
"click",
|
|
251
|
-
"dblclick",
|
|
252
|
-
"pointerdown",
|
|
253
|
-
"mousedown",
|
|
254
|
-
"keydown"
|
|
255
|
-
]);
|
|
256
|
-
//#endregion
|
|
257
|
-
export { ye as default };
|