@svgrid/grid-wc 3.0.16 → 3.0.18
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/{GridFooter-DaqpUo5H.js → GridFooter-D1Mxru-f.js} +1 -1
- package/dist/{GridMenus-D6YaY2l9.js → GridMenus-BzTtZA7e.js} +1 -1
- package/dist/{SvGrid.helpers-B2GEKrxS.js → SvGrid.helpers-tk7gWxcT.js} +1 -1
- package/dist/{shadow/SvGridCellEditor-_hVvdABt.js → SvGridCellEditor-Bhdpvez8.js} +1 -1
- package/dist/{SvGridChart-Bj2Pr2u9.js → SvGridChart-DHptYODr.js} +4 -4
- package/dist/{SvGridChartBuilder-Dpw2X4pR.js → SvGridChartBuilder-COttFU6T.js} +3 -3
- package/dist/{shadow/SvGridChartPanel-Ce78cR3g.js → SvGridChartPanel-DGMs4B9p.js} +6 -6
- package/dist/{SvGridChartView-CTfjtiXs.js → SvGridChartView-iQoET4TC.js} +2 -2
- package/dist/{shadow/cell-formatting-hb3vzxhJ.js → cell-formatting-5uEa4Y_0.js} +1 -0
- package/dist/{shadow/chart-export-pdf-Bc0Rz4kB.js → chart-export-pdf-C_iQ0kET.js} +1 -1
- package/dist/{chart-summary-BL4WDgEu.js → chart-summary-zpeh1XVx.js} +1 -1
- package/dist/{chart-nwSa4jQe.js → chart-xrT6cLA5.js} +1 -1
- package/dist/{export-format-DIcJWdKl.js → export-format-CWEVxATj.js} +1 -1
- package/dist/row-drag-DLQMyiV3.js +204 -0
- package/dist/shadow/{GridFooter-BBBUK5Ry.js → GridFooter-BX1o5fzB.js} +1 -1
- package/dist/shadow/{GridMenus-Mi4G0VxQ.js → GridMenus-CjsOj-5H.js} +1 -1
- package/dist/shadow/{SvGrid.helpers-B2GEKrxS.js → SvGrid.helpers-tk7gWxcT.js} +1 -1
- package/dist/{SvGridCellEditor-_hVvdABt.js → shadow/SvGridCellEditor-Bhdpvez8.js} +1 -1
- package/dist/shadow/{SvGridChart-Bj2Pr2u9.js → SvGridChart-DHptYODr.js} +4 -4
- package/dist/shadow/{SvGridChartBuilder-Dpw2X4pR.js → SvGridChartBuilder-COttFU6T.js} +3 -3
- package/dist/{SvGridChartPanel-Ce78cR3g.js → shadow/SvGridChartPanel-DGMs4B9p.js} +6 -6
- package/dist/shadow/{SvGridChartView-CTfjtiXs.js → SvGridChartView-iQoET4TC.js} +2 -2
- package/dist/{cell-formatting-hb3vzxhJ.js → shadow/cell-formatting-5uEa4Y_0.js} +1 -0
- package/dist/{chart-export-pdf-Bc0Rz4kB.js → shadow/chart-export-pdf-C_iQ0kET.js} +1 -1
- package/dist/shadow/{chart-summary-BL4WDgEu.js → chart-summary-zpeh1XVx.js} +1 -1
- package/dist/shadow/{chart-nwSa4jQe.js → chart-xrT6cLA5.js} +1 -1
- package/dist/shadow/{export-format-DIcJWdKl.js → export-format-CWEVxATj.js} +1 -1
- package/dist/shadow/row-drag-DLQMyiV3.js +204 -0
- package/dist/shadow/sv-grid-shadow-element.js +3049 -3221
- package/dist/sv-grid-element.js +1143 -1315
- package/package.json +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function(){try{var c=".sv-tabs.svelte-13z0l57{--_accent:var(--sg-accent,#2563eb);gap:0;display:flex}.sv-tabs--top.svelte-13z0l57{flex-direction:column}.sv-tabs--bottom.svelte-13z0l57{flex-direction:column-reverse}.sv-tabs--left.svelte-13z0l57{flex-direction:row}.sv-tabs--right.svelte-13z0l57{flex-direction:row-reverse}.sv-tabs__strip.svelte-13z0l57{align-items:center;min-width:0;display:flex}.sv-tabs--vertical.svelte-13z0l57 .sv-tabs__strip:where(.svelte-13z0l57){align-items:stretch}.sv-tabs__list.svelte-13z0l57{gap:2px;display:flex}.sv-tabs--horizontal.svelte-13z0l57 .sv-tabs__list:where(.svelte-13z0l57){scrollbar-width:none;scroll-behavior:smooth;flex:auto;min-width:0;overflow-x:auto}.sv-tabs--horizontal.svelte-13z0l57 .sv-tabs__list:where(.svelte-13z0l57)::-webkit-scrollbar{display:none}.sv-tabs--horizontal.svelte-13z0l57 .sv-tabs__tabwrap:where(.svelte-13z0l57){flex:none}.sv-tabs--vertical.svelte-13z0l57 .sv-tabs__list:where(.svelte-13z0l57){flex-direction:column}.sv-tabs__scroll.svelte-13z0l57{width:26px;color:var(--sg-muted,#64748b);cursor:pointer;background:0 0;border:0;flex:none;align-self:stretch;place-items:center;display:grid}.sv-tabs__scroll.svelte-13z0l57:hover:not(:disabled){color:var(--_accent)}.sv-tabs__scroll.svelte-13z0l57:disabled{opacity:.3;cursor:default}.sv-tabs__tabwrap.is-drag.svelte-13z0l57{opacity:.4}.sv-tabs__tabwrap.is-over.svelte-13z0l57:before{content:\"\";inset-inline-start:-1px;background:var(--_accent);border-radius:2px;width:2px;position:absolute;top:5px;bottom:5px}.sv-tabs__tabwrap[draggable=true].svelte-13z0l57 .sv-tabs__tab:where(.svelte-13z0l57){cursor:grab}.sv-tabs--top.svelte-13z0l57 .sv-tabs__list:where(.svelte-13z0l57){border-bottom:1px solid var(--sg-border,#e2e8f0)}.sv-tabs--bottom.svelte-13z0l57 .sv-tabs__list:where(.svelte-13z0l57){border-top:1px solid var(--sg-border,#e2e8f0)}.sv-tabs--left.svelte-13z0l57 .sv-tabs__list:where(.svelte-13z0l57){border-inline-end:1px solid var(--sg-border,#e2e8f0)}.sv-tabs--right.svelte-13z0l57 .sv-tabs__list:where(.svelte-13z0l57){border-inline-start:1px solid var(--sg-border,#e2e8f0)}.sv-tabs--pill.svelte-13z0l57 .sv-tabs__list:where(.svelte-13z0l57){background:var(--sg-header-bg,#f1f5f9);border:0;border-radius:9px;gap:3px;padding:3px}.sv-tabs__tabwrap.svelte-13z0l57{align-items:center;display:inline-flex;position:relative}.sv-tabs__tab.svelte-13z0l57{font:inherit;color:var(--sg-muted,#64748b);cursor:pointer;white-space:nowrap;background:0 0;border:0;padding:9px 14px;font-size:13px;font-weight:600}.sv-tabs__tabwrap.is-closable.svelte-13z0l57 .sv-tabs__tab:where(.svelte-13z0l57){padding-inline-end:4px}.sv-tabs__tab.svelte-13z0l57:hover:not(:disabled):not(.is-active){color:var(--sg-fg,#0f172a)}.sv-tabs__tab.svelte-13z0l57:disabled{opacity:.45;cursor:not-allowed}.sv-tabs__tab.svelte-13z0l57:focus-visible{outline:2px solid var(--sg-focus-ring,var(--_accent));outline-offset:-2px;border-radius:6px}.sv-tabs__close.svelte-13z0l57{width:18px;height:18px;color:var(--sg-muted,#64748b);cursor:pointer;background:0 0;border:0;border-radius:4px;flex:none;place-items:center;margin-inline-end:8px;display:grid}.sv-tabs__close.svelte-13z0l57:hover{background:var(--sg-row-hover-bg,#f1f5f9);color:var(--sg-danger,#dc2626)}.sv-tabs--line.svelte-13z0l57 .sv-tabs__tab.is-active:where(.svelte-13z0l57){color:var(--_accent)}.sv-tabs--line.svelte-13z0l57 .sv-tabs__tabwrap.is-active:where(.svelte-13z0l57):after{content:\"\";background:var(--_accent);position:absolute}.sv-tabs--line.sv-tabs--top.svelte-13z0l57 .sv-tabs__tabwrap.is-active:where(.svelte-13z0l57):after{height:2px;bottom:-1px;left:8px;right:8px}.sv-tabs--line.sv-tabs--bottom.svelte-13z0l57 .sv-tabs__tabwrap.is-active:where(.svelte-13z0l57):after{height:2px;top:-1px;left:8px;right:8px}.sv-tabs--line.sv-tabs--left.svelte-13z0l57 .sv-tabs__tabwrap.is-active:where(.svelte-13z0l57):after{top:8px;bottom:8px;width:2px;inset-inline-end:-1px}.sv-tabs--line.sv-tabs--right.svelte-13z0l57 .sv-tabs__tabwrap.is-active:where(.svelte-13z0l57):after{top:8px;bottom:8px;width:2px;inset-inline-start:-1px}.sv-tabs--pill.svelte-13z0l57 .sv-tabs__tab:where(.svelte-13z0l57){border-radius:7px;padding:7px 14px}.sv-tabs--pill.svelte-13z0l57 .sv-tabs__tabwrap.is-active:where(.svelte-13z0l57) .sv-tabs__tab:where(.svelte-13z0l57),.sv-tabs--pill.svelte-13z0l57 .sv-tabs__tab.is-active:where(.svelte-13z0l57){background:var(--sg-bg,#fff);color:var(--sg-fg,#0f172a);box-shadow:0 1px 2px #00000014}.sv-tabs__panel.svelte-13z0l57{outline:none;flex:1;min-width:0;padding:16px 2px}.sv-modal__backdrop{z-index:2147483000;-webkit-backdrop-filter:blur(1.5px);backdrop-filter:blur(1.5px);background:#0f172a73;animation:.16s both svelte-o40lcu-sv-modal-fade;position:fixed;inset:0}@keyframes svelte-o40lcu-sv-modal-fade{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.sv-modal__backdrop{animation:none}}.sv-modal{background:var(--sg-bg,#fff);min-width:240px;max-width:94vw;max-height:88vh;color:var(--sg-fg,#0f172a);border:1px solid var(--sg-border,#e2e8f0);border-radius:12px;flex-direction:column;animation:.18s cubic-bezier(.16,1,.3,1) both svelte-o40lcu-sv-modal-in;display:flex;position:fixed;top:50%;left:50%;overflow:hidden;box-shadow:0 24px 64px -16px #0f172a80}@keyframes svelte-o40lcu-sv-modal-in{0%{opacity:0;transform:translate(-50%,-50%)scale(.94)}to{opacity:1}}@media (prefers-reduced-motion:reduce){.sv-modal{animation:none}}.sv-modal--sm{width:360px}.sv-modal--md{width:520px}.sv-modal--lg{width:720px}.sv-modal.is-resized{max-width:none;max-height:none}.sv-modal__header{border-bottom:1px solid var(--sg-border,#e2e8f0);align-items:center;gap:12px;padding:13px 16px;display:flex}.sv-modal__header.is-draggable{cursor:move;touch-action:none;-webkit-user-select:none;user-select:none}.sv-modal__title{flex:1;margin:0;font-size:15px;font-weight:650}.sv-modal__x{width:28px;height:28px;color:var(--sg-muted,#64748b);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;place-items:center;font-size:20px;line-height:1;display:grid}.sv-modal__x:hover{background:var(--sg-row-hover-bg,#f1f5f9);color:var(--sg-fg,#0f172a)}.sv-modal__body{flex:1;padding:16px;font-size:13.5px;line-height:1.6;overflow:auto}.sv-modal__footer{border-top:1px solid var(--sg-border,#e2e8f0);justify-content:flex-end;gap:8px;padding:12px 16px;display:flex}.sv-modal__resize{inset-inline-end:0;cursor:nwse-resize;touch-action:none;background:linear-gradient(135deg, transparent 50%, var(--sg-muted,#94a3b8) 50%, var(--sg-muted,#94a3b8) 60%, transparent 60%, transparent 72%, var(--sg-muted,#94a3b8) 72%, var(--sg-muted,#94a3b8) 82%, transparent 82%);opacity:.6;width:16px;height:16px;position:absolute;bottom:0}.sv-grid-chart-builder.svelte-1yr3emi{min-height:420px;max-height:70vh;font-size:12px;overflow:auto}.sv-grid-chart-builder-group.svelte-1yr3emi{color:var(--sg-muted,#64748b);text-transform:uppercase;letter-spacing:.04em;margin:10px 0 6px;font-size:11px;font-weight:600}.sv-grid-chart-builder-cards.svelte-1yr3emi{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;display:grid}.sv-grid-chart-builder-card.svelte-1yr3emi{border:1px solid var(--sg-border,#e2e8f0);background:var(--sg-bg,#fff);color:var(--sg-fg,#0f172a);cursor:pointer;text-align:left;font:inherit;border-radius:8px;flex-direction:column;gap:4px;padding:6px;display:flex}.sv-grid-chart-builder-card.svelte-1yr3emi:hover{border-color:var(--sg-accent,#2563eb)}.sv-grid-chart-builder-card.is-selected.svelte-1yr3emi{border-color:var(--sg-accent,#2563eb);box-shadow:0 0 0 2px color-mix(in srgb, var(--sg-accent,#2563eb) 30%, transparent 70%)}.sv-grid-chart-builder-thumb.svelte-1yr3emi{pointer-events:none;height:92px;overflow:hidden}.sv-grid-chart-builder-card-label.svelte-1yr3emi{font-size:11px;font-weight:600}.sv-grid-chart-builder-form.svelte-1yr3emi{flex-direction:column;gap:8px;padding:8px 2px;display:flex}.sv-grid-chart-builder-row.svelte-1yr3emi{grid-template-columns:110px 1fr;align-items:center;gap:8px;display:grid}.sv-grid-chart-builder-row.svelte-1yr3emi>span:where(.svelte-1yr3emi){color:var(--sg-muted,#64748b)}.sv-grid-chart-builder-row.svelte-1yr3emi>small:where(.svelte-1yr3emi){color:var(--sg-muted,#64748b);grid-column:2}.sv-grid-chart-builder-row.svelte-1yr3emi>input[type=checkbox]:where(.svelte-1yr3emi){justify-self:start}.sv-grid-chart-builder-row.svelte-1yr3emi input[type=text]:where(.svelte-1yr3emi),.sv-grid-chart-builder-row.svelte-1yr3emi input[type=number]:where(.svelte-1yr3emi),.sv-grid-chart-builder-row.svelte-1yr3emi select:where(.svelte-1yr3emi),.sv-grid-chart-builder-series.svelte-1yr3emi input:where(.svelte-1yr3emi),.sv-grid-chart-builder-series.svelte-1yr3emi select:where(.svelte-1yr3emi){font:inherit;border:1px solid var(--sg-border,#e2e8f0);background:var(--sg-bg,#fff);color:var(--sg-fg,#0f172a);border-radius:6px;min-width:0;padding:3px 6px}.sv-grid-chart-builder-fs.svelte-1yr3emi{border:1px solid var(--sg-border,#e2e8f0);border-radius:8px;flex-direction:column;gap:6px;padding:6px 10px 10px;display:flex}.sv-grid-chart-builder-fs.svelte-1yr3emi>legend:where(.svelte-1yr3emi){padding:0 4px;font-weight:600}.sv-grid-chart-builder-series.svelte-1yr3emi,.sv-grid-chart-builder-series-head.svelte-1yr3emi{grid-template-columns:minmax(80px,1.4fr) 44px 1fr 1fr 1fr 64px;align-items:center;gap:6px;display:grid}.sv-grid-chart-builder-series.has-stack.svelte-1yr3emi,.sv-grid-chart-builder-series-head.has-stack.svelte-1yr3emi{grid-template-columns:minmax(80px,1.4fr) 44px 1fr 1fr 1fr 64px 72px}.sv-grid-chart-builder-series-head.svelte-1yr3emi{color:var(--sg-muted,#64748b);font-size:11px}.sv-grid-chart-builder-series-name.svelte-1yr3emi{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.sv-grid-chart-builder-actions.svelte-1yr3emi{justify-content:flex-end;display:flex}\n";if(typeof globalThis!=='undefined'){var f=globalThis.__SVGRID_WC_ADD_CSS__;if(typeof f==='function')f(c);else(globalThis.__SVGRID_WC_CSS_CHUNKS__=globalThis.__SVGRID_WC_CSS_CHUNKS__||[]).push(c);}if(typeof document==='undefined')return;if(document.querySelector('style[data-svgrid-grid-wc-chunk="SvGridChartBuilder"]'))return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"SvGridChartBuilder");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
|
|
2
|
-
import { c as e, f as t, l as n, m as r, o as i, p as a, s as o, u as s } from "./chart-
|
|
2
|
+
import { c as e, f as t, l as n, m as r, o as i, p as a, s as o, u as s } from "./chart-xrT6cLA5.js";
|
|
3
3
|
import { $ as c, A as l, D as u, I as d, J as f, L as p, M as m, O as h, Q as g, R as _, U as v, W as y, X as b, Y as x, Z as S, _ as C, a as w, at as T, c as E, d as D, et as ee, f as O, g as k, h as A, j, k as M, l as N, n as P, nt as F, o as I, ot as L, p as R, rt as te, tt as z, u as B, w as V, x as H, y as ne, z as U } from "./client-wYhMjrKG.js";
|
|
4
4
|
import { i as W } from "./editor-contract-peBDxir_.js";
|
|
5
5
|
import { r as G } from "./popover-WsGlvtQv.js";
|
|
6
6
|
import { t as K } from "./dismissable-CQ6XFXsk.js";
|
|
7
7
|
import { n as q, t as J } from "./focus-trap-Dbb2tJxb.js";
|
|
8
|
-
import { t as Y } from "./SvGridChart-
|
|
9
|
-
import { n as X, t as Z } from "./SvGridChartPanel-
|
|
8
|
+
import { t as Y } from "./SvGridChart-DHptYODr.js";
|
|
9
|
+
import { n as X, t as Z } from "./SvGridChartPanel-DGMs4B9p.js";
|
|
10
10
|
//#region ../grid/dist/a11y/scroll-lock.js
|
|
11
11
|
var Q = 0, re = "", $ = "";
|
|
12
12
|
function ie() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function(){try{var c=".sv-chart-panes.svelte-14dx6di{flex-direction:column;gap:2px;min-width:0;display:flex}.sv-chart-pane.svelte-14dx6di{min-width:0;position:relative}.sv-chart-pane-title.svelte-14dx6di{z-index:1;color:var(--sg-muted,#64748b);pointer-events:none;font-size:10px;font-weight:600;position:absolute;top:2px}\n";if(typeof globalThis!=='undefined'){var f=globalThis.__SVGRID_WC_ADD_CSS__;if(typeof f==='function')f(c);else(globalThis.__SVGRID_WC_CSS_CHUNKS__=globalThis.__SVGRID_WC_CSS_CHUNKS__||[]).push(c);}if(typeof document==='undefined')return;if(document.querySelector('style[data-svgrid-grid-wc-chunk="SvGridChartPanel"]'))return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"SvGridChartPanel");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
|
|
2
|
-
import { S as e, h as t } from "./chart-
|
|
2
|
+
import { S as e, h as t } from "./chart-xrT6cLA5.js";
|
|
3
3
|
import { $ as n, A as r, C as i, D as a, F as o, I as s, J as c, L as l, M as u, N as d, Q as f, R as p, S as m, U as h, W as g, X as _, Y as v, _ as y, a as b, at as x, d as S, f as C, g as w, h as T, i as E, j as ee, k as D, n as O, nt as k, o as te, p as A, r as ne, rt as re, s as ie, tt as j, v as ae, w as M, y as N, z as P } from "./client-wYhMjrKG.js";
|
|
4
4
|
import { a as F } from "./editor-contract-peBDxir_.js";
|
|
5
|
-
import { a as oe, n as se, o as ce, r as le, s as ue, t as de } from "./SvGridChart-
|
|
5
|
+
import { a as oe, n as se, o as ce, r as le, s as ue, t as de } from "./SvGridChart-DHptYODr.js";
|
|
6
6
|
//#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/transition/index.js
|
|
7
7
|
function I(e) {
|
|
8
8
|
let t = e - 1;
|
|
@@ -1203,7 +1203,7 @@ function Et(e, t) {
|
|
|
1203
1203
|
f(u, !0);
|
|
1204
1204
|
return;
|
|
1205
1205
|
}
|
|
1206
|
-
import("./SvGridChartBuilder-
|
|
1206
|
+
import("./SvGridChartBuilder-COttFU6T.js").then((e) => {
|
|
1207
1207
|
f(s, e.default, !0), f(u, !0);
|
|
1208
1208
|
});
|
|
1209
1209
|
}
|
|
@@ -1285,11 +1285,11 @@ function Et(e, t) {
|
|
|
1285
1285
|
}
|
|
1286
1286
|
async function Ne() {
|
|
1287
1287
|
let e = Oe();
|
|
1288
|
-
f(W, !1), e && await (await import("./chart-export-pdf-
|
|
1288
|
+
f(W, !1), e && await (await import("./chart-export-pdf-C_iQ0kET.js")).downloadChartPdf(e, "chart.pdf", { title: P(z)?.title ?? y().charts[y().activeChartIndex]?.title });
|
|
1289
1289
|
}
|
|
1290
1290
|
async function Pe() {
|
|
1291
1291
|
let e = Oe();
|
|
1292
|
-
f(W, !1), e && (await import("./chart-export-pdf-
|
|
1292
|
+
f(W, !1), e && (await import("./chart-export-pdf-C_iQ0kET.js")).printChart(e, { title: P(z)?.title ?? y().charts[y().activeChartIndex]?.title });
|
|
1293
1293
|
}
|
|
1294
1294
|
async function Fe() {
|
|
1295
1295
|
let e = Oe();
|
|
@@ -1322,7 +1322,7 @@ function Et(e, t) {
|
|
|
1322
1322
|
});
|
|
1323
1323
|
async function Ve() {
|
|
1324
1324
|
if (f(W, !1), !P(z)) return;
|
|
1325
|
-
let { chartSummary: e } = await import("./chart-summary-
|
|
1325
|
+
let { chartSummary: e } = await import("./chart-summary-zpeh1XVx.js"), t = e(P(z));
|
|
1326
1326
|
try {
|
|
1327
1327
|
await navigator.clipboard?.writeText(t);
|
|
1328
1328
|
} catch {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(){try{var c=".sv-grid-chart-view.svelte-733vyy{box-sizing:border-box;width:100%;height:100%;min-height:0;display:grid}\n";if(typeof globalThis!=='undefined'){var f=globalThis.__SVGRID_WC_ADD_CSS__;if(typeof f==='function')f(c);else(globalThis.__SVGRID_WC_CSS_CHUNKS__=globalThis.__SVGRID_WC_CSS_CHUNKS__||[]).push(c);}if(typeof document==='undefined')return;if(document.querySelector('style[data-svgrid-grid-wc-chunk="SvGridChartView"]'))return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"SvGridChartView");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
|
|
2
|
-
import { s as e } from "./chart-
|
|
2
|
+
import { s as e } from "./chart-xrT6cLA5.js";
|
|
3
3
|
import { A as t, J as n, M as r, at as i, nt as a, rt as o, tt as s, z as c } from "./client-wYhMjrKG.js";
|
|
4
|
-
import { t as l } from "./SvGridChart-
|
|
4
|
+
import { t as l } from "./SvGridChart-DHptYODr.js";
|
|
5
5
|
//#region ../grid/dist/SvGridChartView.svelte
|
|
6
6
|
var u = r("<div class=\"sv-grid-chart-view svelte-733vyy\"><!></div>");
|
|
7
7
|
function d(r, d) {
|
|
@@ -85,6 +85,7 @@ function a(e, t) {
|
|
|
85
85
|
return r || (r = new Intl.DateTimeFormat(e, t), i.set(n, r)), r;
|
|
86
86
|
}
|
|
87
87
|
function o(e, t) {
|
|
88
|
+
if (e == null || typeof e == "string" && e.trim() === "") return "";
|
|
88
89
|
let r = typeof e == "number" ? e : Number(e);
|
|
89
90
|
if (!Number.isFinite(r)) return String(e ?? "");
|
|
90
91
|
let i = t.locales;
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
//#region ../grid/dist/row-drag.js
|
|
2
|
+
var e = null, t = 0;
|
|
3
|
+
function n(n) {
|
|
4
|
+
let r = ++t, i = () => n.props.rowDragManaged === !0, a = () => n.props.rowDragGroup ?? null;
|
|
5
|
+
function o(e) {
|
|
6
|
+
let t = n.allRows[e];
|
|
7
|
+
return t ? t.original : null;
|
|
8
|
+
}
|
|
9
|
+
function s() {
|
|
10
|
+
return !i() || !e ? !1 : e.gridId === r || e.group != null && e.group === a();
|
|
11
|
+
}
|
|
12
|
+
let c = null;
|
|
13
|
+
function l() {
|
|
14
|
+
c !== null && (cancelAnimationFrame(c), c = null);
|
|
15
|
+
}
|
|
16
|
+
function u() {
|
|
17
|
+
l(), n.rowDragActive = !1, n.rowDropIndex = null, n.rowDropSide = null;
|
|
18
|
+
}
|
|
19
|
+
function d(e, t, i, a) {
|
|
20
|
+
n.props.onRowDragEnd?.({
|
|
21
|
+
row: e,
|
|
22
|
+
toIndex: t,
|
|
23
|
+
sameGrid: i,
|
|
24
|
+
fromGridId: a,
|
|
25
|
+
toGridId: r
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function f(t, s) {
|
|
29
|
+
if (!i()) return;
|
|
30
|
+
let c = o(s);
|
|
31
|
+
if (c != null) {
|
|
32
|
+
e = {
|
|
33
|
+
group: a(),
|
|
34
|
+
gridId: r,
|
|
35
|
+
row: c,
|
|
36
|
+
sourceProps: n.props,
|
|
37
|
+
removeFromSource: () => {
|
|
38
|
+
n.internalData = n.internalData.filter((e) => e !== c);
|
|
39
|
+
}
|
|
40
|
+
}, n.rowDragActive = !0;
|
|
41
|
+
try {
|
|
42
|
+
t.dataTransfer?.setData("text/plain", String(s)), t.dataTransfer && (t.dataTransfer.effectAllowed = "move");
|
|
43
|
+
let e = t.currentTarget, n = e && e.tagName !== "TR" ? e.closest?.("tr") : null;
|
|
44
|
+
if (n && t.dataTransfer?.setDragImage) {
|
|
45
|
+
let e = n.getBoundingClientRect();
|
|
46
|
+
t.dataTransfer.setDragImage(n, t.clientX - e.left, t.clientY - e.top);
|
|
47
|
+
}
|
|
48
|
+
} catch {}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function p(e, t) {
|
|
52
|
+
if (!s()) return;
|
|
53
|
+
e.preventDefault(), l(), e.dataTransfer && (e.dataTransfer.dropEffect = "move");
|
|
54
|
+
let r = e.currentTarget.getBoundingClientRect();
|
|
55
|
+
n.rowDropIndex = t, n.rowDropSide = m(t, r, e.clientY);
|
|
56
|
+
}
|
|
57
|
+
function m(e, t, r) {
|
|
58
|
+
let i = (r - t.top) / Math.max(t.height, 1);
|
|
59
|
+
return n.props.onRowDrop && i >= .25 && i <= .75 && h(e) ? "into" : i < .5 ? "before" : "after";
|
|
60
|
+
}
|
|
61
|
+
function h(e) {
|
|
62
|
+
let t = n.allRows[e];
|
|
63
|
+
if (!t) return !1;
|
|
64
|
+
let r = n.props.serverGroup;
|
|
65
|
+
return r ? !!r.isGroup(t.original) : typeof t.getCanExpand == "function" && t.getCanExpand();
|
|
66
|
+
}
|
|
67
|
+
function g(e) {
|
|
68
|
+
if (n.rowDropIndex === e) {
|
|
69
|
+
if (l(), typeof requestAnimationFrame != "function") {
|
|
70
|
+
n.rowDropIndex = null, n.rowDropSide = null;
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
c = requestAnimationFrame(() => {
|
|
74
|
+
c = null, n.rowDropIndex === e && (n.rowDropIndex = null, n.rowDropSide = null);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function _(t, i) {
|
|
79
|
+
if (!s() || !e) return;
|
|
80
|
+
let a = e.row, c = o(t), l = e.gridId, f = l === r;
|
|
81
|
+
if (u(), f && n.props.onRowDrop) {
|
|
82
|
+
e = null, n.props.onRowDrop({
|
|
83
|
+
row: a,
|
|
84
|
+
target: c,
|
|
85
|
+
targetIndex: t,
|
|
86
|
+
side: i
|
|
87
|
+
});
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
i === "into" && (i = "after");
|
|
91
|
+
let p = n.internalData.slice();
|
|
92
|
+
if (f) {
|
|
93
|
+
let t = p.indexOf(a);
|
|
94
|
+
if (t < 0) {
|
|
95
|
+
e = null;
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
p.splice(t, 1);
|
|
99
|
+
}
|
|
100
|
+
let m = c == null ? p.length : p.indexOf(c);
|
|
101
|
+
m < 0 && (m = p.length), i === "after" && (m += 1), p.splice(m, 0, a), n.internalData = p, f || e.removeFromSource(), d(a, m, f, l), e = null;
|
|
102
|
+
}
|
|
103
|
+
function v(t, r) {
|
|
104
|
+
!s() || !e || (t.preventDefault(), t.stopPropagation(), _(r, n.rowDropSide ?? "before"));
|
|
105
|
+
}
|
|
106
|
+
function y(e) {
|
|
107
|
+
s() && (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"));
|
|
108
|
+
}
|
|
109
|
+
function b(t) {
|
|
110
|
+
if (!s() || !e) return;
|
|
111
|
+
t.preventDefault();
|
|
112
|
+
let i = e.row, a = e.gridId, o = a === r;
|
|
113
|
+
if (u(), o && n.props.onRowDrop) {
|
|
114
|
+
e = null, n.props.onRowDrop({
|
|
115
|
+
row: i,
|
|
116
|
+
target: null,
|
|
117
|
+
targetIndex: null,
|
|
118
|
+
side: "after"
|
|
119
|
+
});
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
let c = n.internalData.slice();
|
|
123
|
+
if (o) {
|
|
124
|
+
let e = c.indexOf(i);
|
|
125
|
+
e >= 0 && c.splice(e, 1);
|
|
126
|
+
}
|
|
127
|
+
c.push(i), n.internalData = c, o || e.removeFromSource(), d(i, c.length - 1, o, a), e = null;
|
|
128
|
+
}
|
|
129
|
+
function x() {
|
|
130
|
+
u(), e = null;
|
|
131
|
+
}
|
|
132
|
+
let S = null, C = !1;
|
|
133
|
+
function w() {
|
|
134
|
+
return {
|
|
135
|
+
ctx: n,
|
|
136
|
+
managed: i,
|
|
137
|
+
originalAt: o,
|
|
138
|
+
commitDropOnRow: _,
|
|
139
|
+
clearIndicators: u,
|
|
140
|
+
cancelPendingLeave: l,
|
|
141
|
+
openBus: (t) => {
|
|
142
|
+
e = {
|
|
143
|
+
group: a(),
|
|
144
|
+
gridId: r,
|
|
145
|
+
row: t,
|
|
146
|
+
sourceProps: n.props,
|
|
147
|
+
removeFromSource: () => {
|
|
148
|
+
n.internalData = n.internalData.filter((e) => e !== t);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
},
|
|
152
|
+
closeBus: () => {
|
|
153
|
+
e = null;
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function T(e, t) {
|
|
158
|
+
if (!i() || e.pointerType !== "touch") return;
|
|
159
|
+
if (S) {
|
|
160
|
+
S.start(e, t);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (C) return;
|
|
164
|
+
C = !0;
|
|
165
|
+
let n = e.pointerId, r = e.clientX, a = e.clientY, o = performance.now(), s = !1;
|
|
166
|
+
function c() {
|
|
167
|
+
window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", u), window.removeEventListener("pointercancel", u);
|
|
168
|
+
}
|
|
169
|
+
function l(e) {
|
|
170
|
+
e.pointerId === n && Math.abs(e.clientY - a) + Math.abs(e.clientX - r) > 10 && (s = !0, c());
|
|
171
|
+
}
|
|
172
|
+
function u(e) {
|
|
173
|
+
e.pointerId === n && (s = !0, c());
|
|
174
|
+
}
|
|
175
|
+
window.addEventListener("pointermove", l, { passive: !0 }), window.addEventListener("pointerup", u), window.addEventListener("pointercancel", u);
|
|
176
|
+
let d = {
|
|
177
|
+
pointerId: e.pointerId,
|
|
178
|
+
pointerType: e.pointerType,
|
|
179
|
+
clientX: e.clientX,
|
|
180
|
+
clientY: e.clientY,
|
|
181
|
+
currentTarget: e.currentTarget,
|
|
182
|
+
preventDefault: () => {}
|
|
183
|
+
};
|
|
184
|
+
import("./row-drag-touch-CycRR65n.js").then((e) => {
|
|
185
|
+
C = !1, c(), !(s || !i()) && (S = e.createTouchDrag(w()), S.start(d, t, o));
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
onRowDragStart: f,
|
|
190
|
+
onRowDragOver: p,
|
|
191
|
+
onRowDragLeave: g,
|
|
192
|
+
onRowDrop: v,
|
|
193
|
+
onRowsContainerDragOver: y,
|
|
194
|
+
onRowsContainerDrop: b,
|
|
195
|
+
onRowDragEnd: x,
|
|
196
|
+
onRowPointerDown: T,
|
|
197
|
+
rowDragGridId: r,
|
|
198
|
+
destroyRowDrag() {
|
|
199
|
+
l(), S?.destroy(), S = null, e?.gridId === r && (e = null);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
//#endregion
|
|
204
|
+
export { n as createRowDrag };
|