@svgrid/grid-wc 3.0.27 → 3.0.29

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.
@@ -1,6 +1,6 @@
1
- (function(){try{var c=".sv-pin-split.svelte-3uth74{z-index:50;pointer-events:none;width:0;position:absolute;top:0;left:0}.sv-pin-split.is-editing.svelte-3uth74{display:none}.sv-pin-split-line.svelte-3uth74{top:0;bottom:0;left:calc(var(--x) - 1px);background:color-mix(in srgb, var(--sg-fg,#0f172a) 18%, transparent);width:2px;transition:background-color .12s;position:absolute}.sv-pin-split-hit.svelte-3uth74{bottom:0;left:max(0px, calc(var(--x) - 4px));cursor:col-resize;pointer-events:auto;touch-action:none;outline:none;width:8px;position:absolute}.sv-pin-split.is-dragging.svelte-3uth74 .sv-pin-split-line:where(.svelte-3uth74){background:var(--sg-accent,#2563eb)}.sv-pin-split.svelte-3uth74:has(.sv-pin-split-hit:where(.svelte-3uth74):hover) .sv-pin-split-line:where(.svelte-3uth74){background:var(--sg-accent,#2563eb)}.sv-pin-split.svelte-3uth74:has(.sv-pin-split-hit:where(.svelte-3uth74):focus-visible) .sv-pin-split-line:where(.svelte-3uth74){background:var(--sg-accent,#2563eb)}.sv-pin-split.is-dragging.svelte-3uth74 .sv-pin-split-line:where(.svelte-3uth74){width:3px;left:calc(var(--x) - 1.5px)}.sv-pin-split-ghost.svelte-3uth74{border-left:2px dashed color-mix(in srgb, var(--sg-accent,#2563eb) 50%, transparent);width:0;position:absolute;top:0;bottom:0}.sv-pin-split-tip.svelte-3uth74{top:6px;left:calc(var(--x) + 8px);background:var(--sg-fg,#0f172a);color:var(--sg-bg,#fff);white-space:nowrap;border-radius:6px;padding:3px 8px;font-size:12px;position:absolute}\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:PinSplitter-vmU3zd_R.js"||x[i].textContent===c)return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"grid:PinSplitter-vmU3zd_R.js");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
1
+ (function(){try{var c=".sv-pin-split.svelte-3uth74{z-index:50;pointer-events:none;width:0;position:absolute;top:0;left:0}.sv-pin-split.is-editing.svelte-3uth74{display:none}.sv-pin-split-line.svelte-3uth74{top:0;bottom:0;left:calc(var(--x) - 1px);background:color-mix(in srgb, var(--sg-fg,#0f172a) 18%, transparent);width:2px;transition:background-color .12s;position:absolute}.sv-pin-split-hit.svelte-3uth74{bottom:0;left:max(0px, calc(var(--x) - 4px));cursor:col-resize;pointer-events:auto;touch-action:none;outline:none;width:8px;position:absolute}.sv-pin-split.is-dragging.svelte-3uth74 .sv-pin-split-line:where(.svelte-3uth74){background:var(--sg-accent,#2563eb)}.sv-pin-split.svelte-3uth74:has(.sv-pin-split-hit:where(.svelte-3uth74):hover) .sv-pin-split-line:where(.svelte-3uth74){background:var(--sg-accent,#2563eb)}.sv-pin-split.svelte-3uth74:has(.sv-pin-split-hit:where(.svelte-3uth74):focus-visible) .sv-pin-split-line:where(.svelte-3uth74){background:var(--sg-accent,#2563eb)}.sv-pin-split.is-dragging.svelte-3uth74 .sv-pin-split-line:where(.svelte-3uth74){width:3px;left:calc(var(--x) - 1.5px)}.sv-pin-split-ghost.svelte-3uth74{border-left:2px dashed color-mix(in srgb, var(--sg-accent,#2563eb) 50%, transparent);width:0;position:absolute;top:0;bottom:0}.sv-pin-split-tip.svelte-3uth74{top:6px;left:calc(var(--x) + 8px);background:var(--sg-fg,#0f172a);color:var(--sg-bg,#fff);white-space:nowrap;border-radius:6px;padding:3px 8px;font-size:12px;position:absolute}\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:PinSplitter-CinhgIrH.js"||x[i].textContent===c)return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"grid:PinSplitter-CinhgIrH.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, R as o, U as s, W as c, X as l, Y as u, Z as d, et as f, f as p, it as m, j as h, k as g, n as _, nt as v, ot as y, rt as b, v as x, y as S, z as C } from "./client-DtIdusS4.js";
3
- import { n as w } from "./grid-extension.svelte-BixlrIqc.js";
3
+ import { r as w } from "./grid-extension.svelte-CBhmpjuc.js";
4
4
  //#region ../grid/dist/pin-splitter.js
5
5
  function T(e, t) {
6
6
  let n = [e], r = e;
@@ -0,0 +1,27 @@
1
+ import { et as e, z as t } from "./client-DtIdusS4.js";
2
+ //#region ../grid/dist/filtering/filter-operator-catalogue.js
3
+ var n = ["isBlank", "isNotBlank"];
4
+ function r(e) {
5
+ return n.includes(e);
6
+ }
7
+ //#endregion
8
+ //#region ../grid/dist/filter-operator-registry.js
9
+ var i = {}, a = e(null);
10
+ function o(e, n) {
11
+ let r = t(a)?.column;
12
+ if (!r) return e;
13
+ let i = n ?? s(e);
14
+ return e.map((e) => e?.columns?.length ? {
15
+ ...e,
16
+ columns: o(e.columns, i)
17
+ } : e?.fieldType ? r(e, i) : e);
18
+ }
19
+ function s(e) {
20
+ return e.flatMap((e) => e?.columns?.length ? s(e.columns) : [e]);
21
+ }
22
+ var c = (e) => i[e], l = (e) => r(e) || !!c(e)?.valueless;
23
+ function u() {
24
+ return t(a);
25
+ }
26
+ //#endregion
27
+ export { l as i, o as n, u as r, c as t };
@@ -0,0 +1,162 @@
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, U as c, X as l, Y as u, Z as d, et as f, f as p, it as m, j as h, k as g, n as _, nt as v, ot as y, rt as ee, w as b, y as te, z as x } from "./client-DtIdusS4.js";
2
+ import { s as S } from "./SvGrid.helpers-tk7gWxcT.js";
3
+ import { r as C } from "./grid-extension.svelte-CBhmpjuc.js";
4
+ import "./sv-grid-shadow-element.js";
5
+ //#region ../grid/dist/GridFooter.svelte
6
+ var w = o("<span class=\"sv-grid-status-item\"><span class=\"sv-grid-status-label\"> </span> </span>"), T = o("<span class=\"sv-grid-status-item\"><span class=\"sv-grid-status-label\">Numeric</span> </span>"), E = o("<span class=\"sv-grid-status-item\"><span class=\"sv-grid-status-label\"> </span> </span>"), D = o("<span class=\"sv-grid-status-item\"><span class=\"sv-grid-status-label\"> </span> </span>"), O = o("<span class=\"sv-grid-status-item\"><span class=\"sv-grid-status-label\"> </span> </span>"), k = o("<span class=\"sv-grid-status-item\"><span class=\"sv-grid-status-label\"> </span> </span>"), A = o("<span class=\"sv-grid-status-aggregates\" role=\"status\" aria-live=\"polite\"></span>"), j = o("<div class=\"sv-grid-status-bar\"><!> <!></div>"), ne = o("<div class=\"sv-grid-dropdown\"><button type=\"button\" class=\"sv-grid-dropdown-trigger\" aria-haspopup=\"listbox\" aria-expanded=\"false\"><span class=\"sv-grid-dropdown-label\"> </span> <span class=\"sv-grid-dropdown-caret\" aria-hidden=\"true\"><!></span></button></div>"), re = o("<div role=\"navigation\" aria-label=\"Pagination\"><div class=\"sv-grid-pagination-pagesize\"><span> </span> <div class=\"sv-grid-pagination-pagesize-dd\"><!></div></div> <span class=\"sv-grid-pagination-range\"><strong> </strong> to <strong> </strong> of <strong> </strong></span> <div class=\"sv-grid-pagination-nav\"><button type=\"button\" class=\"sv-grid-pagination-btn\"><!></button> <button type=\"button\" class=\"sv-grid-pagination-btn\"><!></button> <span class=\"sv-grid-pagination-label\"> <strong> </strong> <strong> </strong></span> <button type=\"button\" class=\"sv-grid-pagination-btn\"><!></button> <button type=\"button\" class=\"sv-grid-pagination-btn\"><!></button></div></div>"), M = o("<!> <!>", 1);
7
+ function N(i, o) {
8
+ m(o, !0);
9
+ let N = _(o, "pager", 3, !0), P = _(o, "showStatus", 3, !0), ie = _(o, "top", 3, !1), F = f(null), I = f(!1);
10
+ async function ae() {
11
+ if (!(x(F) || x(I))) {
12
+ e(I, !0);
13
+ try {
14
+ e(F, (await import("./SvGridDropdown-CrECQYeq.js")).default, !0);
15
+ } finally {
16
+ e(I, !1);
17
+ }
18
+ }
19
+ }
20
+ let oe = v(() => o.ctrl.paginationEnabled), L = v(() => o.ctrl.statusBarEnabled), R = v(() => o.ctrl.statusBarAggregates), z = v(() => typeof o.ctrl.props.statusBar == "object" && o.ctrl.props.statusBar.rows ? C()?.statusBarRows?.(o.ctrl) ?? null : null), B = v(() => o.ctrl.statusBarStats), V = v(() => o.ctrl.changePage), H = v(() => o.ctrl.goToPage), se = v(() => o.ctrl.setPageSize), U = v(() => o.ctrl.messages);
21
+ var W = M(), G = l(W), K = (e) => {
22
+ var i = j(), a = u(i), s = (e) => {
23
+ var r = h(), i = l(r);
24
+ n(i, () => x(z), (e, t) => {
25
+ t(e, { get ctrl() {
26
+ return o.ctrl;
27
+ } });
28
+ }), t(e, r);
29
+ };
30
+ r(a, (e) => {
31
+ x(z) && e(s);
32
+ });
33
+ var f = d(a, 2), p = (e) => {
34
+ let n = v(() => x(B));
35
+ var i = A();
36
+ b(i, 20, () => x(R), (e) => e, (e, i) => {
37
+ var a = h(), o = l(a), s = (e) => {
38
+ var r = w(), i = u(r), a = u(i, !0);
39
+ y(i);
40
+ var o = d(i, 1, !0);
41
+ y(r), c((e) => {
42
+ g(a, x(U).statCount), g(o, e);
43
+ }, [() => S(x(n).count)]), t(e, r);
44
+ }, f = (e) => {
45
+ var r = T(), i = d(u(r), 1, !0);
46
+ y(r), c((e) => g(i, e), [() => S(x(n).numericCount)]), t(e, r);
47
+ }, p = (e) => {
48
+ var r = E(), i = u(r), a = u(i, !0);
49
+ y(i);
50
+ var o = d(i, 1, !0);
51
+ y(r), c((e) => {
52
+ g(a, x(U).statSum), g(o, e);
53
+ }, [() => S(x(n).sum)]), t(e, r);
54
+ }, m = (e) => {
55
+ var r = D(), i = u(r), a = u(i, !0);
56
+ y(i);
57
+ var o = d(i, 1, !0);
58
+ y(r), c((e) => {
59
+ g(a, x(U).statAvg), g(o, e);
60
+ }, [() => S(x(n).avg)]), t(e, r);
61
+ }, _ = (e) => {
62
+ var r = O(), i = u(r), a = u(i, !0);
63
+ y(i);
64
+ var o = d(i, 1, !0);
65
+ y(r), c((e) => {
66
+ g(a, x(U).statMin), g(o, e);
67
+ }, [() => S(x(n).min)]), t(e, r);
68
+ }, v = (e) => {
69
+ var r = k(), i = u(r), a = u(i, !0);
70
+ y(i);
71
+ var o = d(i, 1, !0);
72
+ y(r), c((e) => {
73
+ g(a, x(U).statMax), g(o, e);
74
+ }, [() => S(x(n).max)]), t(e, r);
75
+ };
76
+ r(o, (e) => {
77
+ i === "count" ? e(s) : i === "numericCount" ? e(f, 1) : x(n).numericCount > 0 && i === "sum" ? e(p, 2) : x(n).numericCount > 0 && i === "avg" ? e(m, 3) : x(n).numericCount > 0 && i === "min" ? e(_, 4) : x(n).numericCount > 0 && i === "max" && e(v, 5);
78
+ }), t(e, a);
79
+ }), y(i), t(e, i);
80
+ };
81
+ r(f, (e) => {
82
+ x(B) && e(p);
83
+ }), y(i), t(e, i);
84
+ };
85
+ r(G, (e) => {
86
+ P() && x(L) && (x(B) || x(z)) && e(K);
87
+ });
88
+ var q = d(G, 2), J = (e) => {
89
+ let i = v(() => o.ctrl.paginationTotalRows), f = v(() => o.ctrl.paginationPageSize), m = v(() => Math.max(1, Math.ceil(x(i) / x(f)))), _ = v(() => Math.min(o.ctrl.paginationPageIndex + 1, x(m))), ee = v(() => x(i) === 0 ? 0 : (x(_) - 1) * x(f) + 1), b = v(() => Math.min(x(i), x(_) * x(f))), S = v(() => x(_) <= 1), C = v(() => x(_) >= x(m)), w = v(() => o.pageSizeOptions && o.pageSizeOptions.length ? o.pageSizeOptions : [
90
+ 10,
91
+ 25,
92
+ 50,
93
+ 100
94
+ ]);
95
+ var T = re();
96
+ let E;
97
+ var D = u(T), O = u(D), k = u(O, !0);
98
+ y(O);
99
+ var A = d(O, 2), j = u(A), M = (e) => {
100
+ var r = h(), i = l(r);
101
+ {
102
+ let e = v(() => x(w).map((e) => ({
103
+ value: e,
104
+ label: String(e)
105
+ })));
106
+ n(i, () => x(F), (t, n) => {
107
+ n(t, {
108
+ get options() {
109
+ return x(e);
110
+ },
111
+ get value() {
112
+ return x(f);
113
+ },
114
+ autoOpen: !0,
115
+ onChange: (e) => x(se)(Number(e))
116
+ });
117
+ });
118
+ }
119
+ t(e, r);
120
+ }, N = (e) => {
121
+ var n = ne(), r = u(n), i = u(r), l = u(i, !0);
122
+ y(i);
123
+ var p = d(i, 2), m = u(p);
124
+ s(m, () => o.icon, () => "page-size-caret"), y(p), y(r), y(n), c(() => g(l, x(f))), a("click", r, ae), t(e, n);
125
+ };
126
+ r(j, (e) => {
127
+ x(F) ? e(M) : e(N, -1);
128
+ }), y(A), y(D);
129
+ var P = d(D, 2), I = u(P), oe = u(I, !0);
130
+ y(I);
131
+ var L = d(I, 2), R = u(L, !0);
132
+ y(L);
133
+ var z = d(L, 2), B = u(z, !0);
134
+ y(z), y(P);
135
+ var W = d(P, 2), G = u(W), K = u(G);
136
+ s(K, () => o.icon, () => "page-first"), y(G);
137
+ var q = d(G, 2), J = u(q);
138
+ s(J, () => o.icon, () => "page-prev"), y(q);
139
+ var Y = d(q, 2), X = u(Y), Z = d(X), ce = u(Z, !0);
140
+ y(Z);
141
+ var le = d(Z), ue = d(le), de = u(ue, !0);
142
+ y(ue), y(Y);
143
+ var Q = d(Y, 2), fe = u(Q);
144
+ s(fe, () => o.icon, () => "page-next"), y(Q);
145
+ var $ = d(Q, 2), pe = u($);
146
+ s(pe, () => o.icon, () => "page-last"), y($), y(W), y(T), c((e, t, n, r, i) => {
147
+ E = te(T, 1, "sv-grid-pagination", null, E, { "sv-grid-pagination-top": ie() }), g(k, x(U).pageSize), g(oe, e), g(R, t), g(B, n), G.disabled = x(S), p(G, "aria-label", x(U).firstPage), q.disabled = x(S), p(q, "aria-label", x(U).prevPage), g(X, `${x(U).page ?? ""} `), g(ce, r), g(le, ` ${x(U).of ?? ""} `), g(de, i), Q.disabled = x(C), p(Q, "aria-label", x(U).nextPage), $.disabled = x(C), p($, "aria-label", x(U).lastPage);
148
+ }, [
149
+ () => x(ee).toLocaleString(),
150
+ () => x(b).toLocaleString(),
151
+ () => x(i).toLocaleString(),
152
+ () => x(_).toLocaleString(),
153
+ () => x(m).toLocaleString()
154
+ ]), a("click", G, () => x(H)(0)), a("click", q, () => x(V)(-1)), a("click", Q, () => x(V)(1)), a("click", $, () => x(H)(x(m) - 1)), t(e, T);
155
+ };
156
+ r(q, (e) => {
157
+ N() && x(oe) && e(J);
158
+ }), t(i, W), ee();
159
+ }
160
+ i(["click"]);
161
+ //#endregion
162
+ export { N as default };