react-semaphor 0.1.570 → 0.1.572
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/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +1 -1
- package/dist/chunks/{assistant-chat-B-Ddyy8b.js → assistant-chat-DF1-q82n.js} +182 -182
- package/dist/chunks/{bookmark-impact-DCYD-6Fr.js → bookmark-impact-fdj8fY9i.js} +2 -2
- package/dist/chunks/{bookmark-state-CflS88gq.js → bookmark-state-BEl_G9vr.js} +54 -54
- package/dist/chunks/{brand-B4BdpAB_.js → brand-BoUV0iHF.js} +1 -1
- package/dist/chunks/{card-filter-builder-0VvKmRst.js → card-filter-builder-BFT21WI-.js} +3 -3
- package/dist/chunks/{dashboard-briefing-launcher-B-quOOOQ.js → dashboard-briefing-launcher-DDXzTYuA.js} +873 -906
- package/dist/chunks/{dashboard-controls-Caodx80b.js → dashboard-controls-BwKQEoGp.js} +103 -103
- package/dist/chunks/{dashboard-DxGIr1vZ.js → dashboard-jUhZ7T4f.js} +1 -1
- package/dist/chunks/{dashboard-json-Ct-AGDHF.js → dashboard-json-B3fR1_Oc.js} +1 -1
- package/dist/chunks/{dates-B9mL8BHE.js → dates-DKkSDWHe.js} +5 -5
- package/dist/chunks/{edit-Bpdh_P_a.js → edit-9df1zOWe.js} +3 -3
- package/dist/chunks/{edit-dashboard-visual-DeDTuYB5.js → edit-dashboard-visual-DGZABdS-.js} +8 -8
- package/dist/chunks/{filter-reach-copy-BSY33ro5.js → filter-reach-copy-CWHV7GSb.js} +1195 -1261
- package/dist/chunks/{index-y3HUzRNk.js → index-CeeY4wjE.js} +2 -2
- package/dist/chunks/{report-preferences-dialog-Yvhv3WX2.js → report-preferences-dialog-R3EGbxfu.js} +725 -801
- package/dist/chunks/{resolve-dashboard-input-context-Lkbwycwe.js → resolve-dashboard-input-context-CBQF3obr.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-DC_TEd6y.js → saved-dashboard-context-_-7LKeK1.js} +3 -3
- package/dist/chunks/{semaphor-ready-indicator-ByFvqHEO.js → semaphor-ready-indicator-CEbA4CFb.js} +19866 -19758
- package/dist/chunks/{shelf-drop-preview-context-CjoVaK6J.js → shelf-drop-preview-context-UqUUVSJq.js} +259 -259
- package/dist/chunks/{stored-dashboard-C0hekXiI.js → stored-dashboard-Bk3iCXtp.js} +131 -131
- package/dist/chunks/{variable-draft-9-huI1h4.js → variable-draft-ggS3X7FG.js} +2 -2
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1919 -1853
- package/dist/index.js +147 -147
- package/dist/surfboard/index.js +2 -2
- package/dist/types/index.js +1 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +1 -1
- package/dist/types/lib/types/common-types.d.ts +0 -50
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +1 -2
- package/dist/types/shared/dashboard-authoring/dashboard-style/layers.d.ts +6 -5
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +1 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as Ne, jsx as N, Fragment as ft } from "react/jsx-runtime";
|
|
2
2
|
import * as T from "react";
|
|
3
|
-
import zn, { forwardRef as Fe, createElement as xe, useContext as rt, createContext as xt, useRef as
|
|
4
|
-
import {
|
|
5
|
-
import { C as It, G as Rt, H as ze, J as me, K as Dt, M as Bn, O as
|
|
6
|
-
import { R as Wn, S as Nt, U as Mt, V as Je, W as Te, X as Yn, Y as Xn, Z as jn, T as Qn } from "./resolve-dashboard-input-context-
|
|
3
|
+
import zn, { forwardRef as Fe, createElement as xe, useContext as rt, createContext as xt, useRef as O, useLayoutEffect as Pn, useImperativeHandle as zt, useEffect as ne, useState as de, useCallback as G, useMemo as W, memo as wn, Suspense as Cn, useSyncExternalStore as En } from "react";
|
|
4
|
+
import { aW as In, af as ie, aX as Pt, aY as Rn, ag as wt, aZ as ot, a_ as Ct, a$ as Et, b0 as Dn, b1 as An, b2 as Nn, b3 as Mn, u as Re, b4 as Ln, b5 as _n, b6 as kn, b7 as Tn, b8 as Hn, b9 as Vn, ba as $n, bb as Fn, bc as Kn } from "./semaphor-ready-indicator-CEbA4CFb.js";
|
|
5
|
+
import { C as It, G as Rt, H as ze, J as me, K as Dt, M as Bn, O as qn, Q as Pe, U as On, V as At, W as Gn, Y as Un } from "./style-sheet-parts-C7qGZuH1.js";
|
|
6
|
+
import { R as Wn, S as Nt, U as Mt, V as Je, W as Te, X as Yn, Y as Xn, Z as jn, T as Qn } from "./resolve-dashboard-input-context-CBQF3obr.js";
|
|
7
7
|
import { c as we } from "./pickers-DkqmtnTL.js";
|
|
8
8
|
import "./validators-B8fpdinG.js";
|
|
9
9
|
import "./matrix-operation-contract-DCVinw1o.js";
|
|
@@ -27,7 +27,7 @@ const bo = zn.memo(function({
|
|
|
27
27
|
);
|
|
28
28
|
}), Ke = xt(null);
|
|
29
29
|
Ke.displayName = "PanelGroupContext";
|
|
30
|
-
const
|
|
30
|
+
const q = {
|
|
31
31
|
group: "data-panel-group",
|
|
32
32
|
groupDirection: "data-panel-group-direction",
|
|
33
33
|
groupId: "data-panel-group-id",
|
|
@@ -43,7 +43,7 @@ const O = {
|
|
|
43
43
|
}, it = 10, ge = Pn, pt = T.useId, Zn = typeof pt == "function" ? pt : () => null;
|
|
44
44
|
let er = 0;
|
|
45
45
|
function st(e = null) {
|
|
46
|
-
const t = Zn(), n =
|
|
46
|
+
const t = Zn(), n = O(e || t || null);
|
|
47
47
|
return n.current === null && (n.current = "" + er++), e ?? n.current;
|
|
48
48
|
}
|
|
49
49
|
function Lt({
|
|
@@ -54,8 +54,8 @@ function Lt({
|
|
|
54
54
|
defaultSize: i,
|
|
55
55
|
forwardedRef: o,
|
|
56
56
|
id: s,
|
|
57
|
-
maxSize:
|
|
58
|
-
minSize:
|
|
57
|
+
maxSize: l,
|
|
58
|
+
minSize: a,
|
|
59
59
|
onCollapse: d,
|
|
60
60
|
onExpand: f,
|
|
61
61
|
onResize: u,
|
|
@@ -78,7 +78,7 @@ function Lt({
|
|
|
78
78
|
registerPanel: X,
|
|
79
79
|
resizePanel: J,
|
|
80
80
|
unregisterPanel: K
|
|
81
|
-
} = y, M = st(s), _ =
|
|
81
|
+
} = y, M = st(s), _ = O({
|
|
82
82
|
callbacks: {
|
|
83
83
|
onCollapse: d,
|
|
84
84
|
onExpand: f,
|
|
@@ -88,14 +88,14 @@ function Lt({
|
|
|
88
88
|
collapsedSize: n,
|
|
89
89
|
collapsible: r,
|
|
90
90
|
defaultSize: i,
|
|
91
|
-
maxSize:
|
|
92
|
-
minSize:
|
|
91
|
+
maxSize: l,
|
|
92
|
+
minSize: a
|
|
93
93
|
},
|
|
94
94
|
id: M,
|
|
95
95
|
idIsFromProps: s !== void 0,
|
|
96
96
|
order: c
|
|
97
97
|
});
|
|
98
|
-
|
|
98
|
+
O({
|
|
99
99
|
didLogMissingDefaultSizeWarning: !1
|
|
100
100
|
}), ge(() => {
|
|
101
101
|
const {
|
|
@@ -104,7 +104,7 @@ function Lt({
|
|
|
104
104
|
} = _.current, F = {
|
|
105
105
|
...$
|
|
106
106
|
};
|
|
107
|
-
_.current.id = M, _.current.idIsFromProps = s !== void 0, _.current.order = c, B.onCollapse = d, B.onExpand = f, B.onResize = u, $.collapsedSize = n, $.collapsible = r, $.defaultSize = i, $.maxSize =
|
|
107
|
+
_.current.id = M, _.current.idIsFromProps = s !== void 0, _.current.order = c, B.onCollapse = d, B.onExpand = f, B.onResize = u, $.collapsedSize = n, $.collapsible = r, $.defaultSize = i, $.maxSize = l, $.minSize = a, (F.collapsedSize !== $.collapsedSize || F.collapsible !== $.collapsible || F.maxSize !== $.maxSize || F.minSize !== $.minSize) && C(_.current, F);
|
|
108
108
|
}), ge(() => {
|
|
109
109
|
const B = _.current;
|
|
110
110
|
return X(B), () => {
|
|
@@ -144,11 +144,11 @@ function Lt({
|
|
|
144
144
|
...m
|
|
145
145
|
},
|
|
146
146
|
// CSS selectors
|
|
147
|
-
[
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
151
|
-
[
|
|
147
|
+
[q.groupId]: D,
|
|
148
|
+
[q.panel]: "",
|
|
149
|
+
[q.panelCollapsible]: r || void 0,
|
|
150
|
+
[q.panelId]: M,
|
|
151
|
+
[q.panelSize]: parseFloat("" + U.flexGrow).toFixed(1)
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
const tr = Fe((e, t) => xe(Lt, {
|
|
@@ -245,24 +245,24 @@ function sr(e, t) {
|
|
|
245
245
|
a: n.a.at(-1),
|
|
246
246
|
b: n.b.at(-1)
|
|
247
247
|
};
|
|
248
|
-
let
|
|
249
|
-
for (;
|
|
250
|
-
const
|
|
251
|
-
if (
|
|
252
|
-
if (
|
|
248
|
+
let l = o.length;
|
|
249
|
+
for (; l--; ) {
|
|
250
|
+
const a = o[l];
|
|
251
|
+
if (a === s.a) return 1;
|
|
252
|
+
if (a === s.b) return -1;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
return Math.sign(i.a - i.b);
|
|
256
256
|
}
|
|
257
|
-
const
|
|
258
|
-
function
|
|
257
|
+
const lr = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
258
|
+
function ar(e) {
|
|
259
259
|
var t;
|
|
260
260
|
const n = getComputedStyle((t = Ht(e)) !== null && t !== void 0 ? t : e).display;
|
|
261
261
|
return n === "flex" || n === "inline-flex";
|
|
262
262
|
}
|
|
263
263
|
function cr(e) {
|
|
264
264
|
const t = getComputedStyle(e);
|
|
265
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
265
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || ar(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || lr.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
266
266
|
}
|
|
267
267
|
function mt(e) {
|
|
268
268
|
let t = e.length;
|
|
@@ -288,25 +288,25 @@ function Ht(e) {
|
|
|
288
288
|
return t && t instanceof ShadowRoot ? t.host : t;
|
|
289
289
|
}
|
|
290
290
|
const Vt = 1, $t = 2, Ft = 4, Kt = 8, ur = or() === "coarse";
|
|
291
|
-
let se = [], be = !1, pe = /* @__PURE__ */ new Map(),
|
|
291
|
+
let se = [], be = !1, pe = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Map();
|
|
292
292
|
const Me = /* @__PURE__ */ new Set();
|
|
293
293
|
function dr(e, t, n, r, i) {
|
|
294
294
|
var o;
|
|
295
295
|
const {
|
|
296
296
|
ownerDocument: s
|
|
297
|
-
} = t,
|
|
297
|
+
} = t, l = {
|
|
298
298
|
direction: n,
|
|
299
299
|
element: t,
|
|
300
300
|
hitAreaMargins: r,
|
|
301
301
|
setResizeHandlerState: i
|
|
302
|
-
},
|
|
303
|
-
return pe.set(s,
|
|
302
|
+
}, a = (o = pe.get(s)) !== null && o !== void 0 ? o : 0;
|
|
303
|
+
return pe.set(s, a + 1), Me.add(l), Ve(), function() {
|
|
304
304
|
var f;
|
|
305
|
-
|
|
305
|
+
qe.delete(e), Me.delete(l);
|
|
306
306
|
const u = (f = pe.get(s)) !== null && f !== void 0 ? f : 1;
|
|
307
|
-
if (pe.set(s, u - 1), Ve(), u === 1 && pe.delete(s), se.includes(
|
|
308
|
-
const c = se.indexOf(
|
|
309
|
-
c >= 0 && se.splice(c, 1),
|
|
307
|
+
if (pe.set(s, u - 1), Ve(), u === 1 && pe.delete(s), se.includes(l)) {
|
|
308
|
+
const c = se.indexOf(l);
|
|
309
|
+
c >= 0 && se.splice(c, 1), at(), i("up", !0, null);
|
|
310
310
|
}
|
|
311
311
|
};
|
|
312
312
|
}
|
|
@@ -317,7 +317,7 @@ function fr(e) {
|
|
|
317
317
|
x: n,
|
|
318
318
|
y: r
|
|
319
319
|
} = Be(e);
|
|
320
|
-
be = !0,
|
|
320
|
+
be = !0, lt({
|
|
321
321
|
target: t,
|
|
322
322
|
x: n,
|
|
323
323
|
y: r
|
|
@@ -332,13 +332,13 @@ function Ye(e) {
|
|
|
332
332
|
const {
|
|
333
333
|
target: r
|
|
334
334
|
} = e;
|
|
335
|
-
|
|
335
|
+
lt({
|
|
336
336
|
target: r,
|
|
337
337
|
x: t,
|
|
338
338
|
y: n
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
|
-
$e("move", e),
|
|
341
|
+
$e("move", e), at(), se.length > 0 && e.preventDefault();
|
|
342
342
|
}
|
|
343
343
|
function Xe(e) {
|
|
344
344
|
const {
|
|
@@ -347,22 +347,22 @@ function Xe(e) {
|
|
|
347
347
|
x: n,
|
|
348
348
|
y: r
|
|
349
349
|
} = Be(e);
|
|
350
|
-
|
|
350
|
+
qe.clear(), be = !1, se.length > 0 && (e.preventDefault(), Bt(t) || e.stopImmediatePropagation()), $e("up", e), lt({
|
|
351
351
|
target: t,
|
|
352
352
|
x: n,
|
|
353
353
|
y: r
|
|
354
|
-
}),
|
|
354
|
+
}), at(), Ve();
|
|
355
355
|
}
|
|
356
356
|
function Bt(e) {
|
|
357
357
|
let t = e;
|
|
358
358
|
for (; t; ) {
|
|
359
|
-
if (t.hasAttribute(
|
|
359
|
+
if (t.hasAttribute(q.resizeHandle))
|
|
360
360
|
return !0;
|
|
361
361
|
t = t.parentElement;
|
|
362
362
|
}
|
|
363
363
|
return !1;
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function lt({
|
|
366
366
|
target: e,
|
|
367
367
|
x: t,
|
|
368
368
|
y: n
|
|
@@ -373,20 +373,20 @@ function at({
|
|
|
373
373
|
const {
|
|
374
374
|
element: o,
|
|
375
375
|
hitAreaMargins: s
|
|
376
|
-
} = i,
|
|
377
|
-
bottom:
|
|
376
|
+
} = i, l = o.getBoundingClientRect(), {
|
|
377
|
+
bottom: a,
|
|
378
378
|
left: d,
|
|
379
379
|
right: f,
|
|
380
380
|
top: u
|
|
381
|
-
} =
|
|
382
|
-
if (t >= d - c && t <= f + c && n >= u - c && n <=
|
|
381
|
+
} = l, c = ur ? s.coarse : s.fine;
|
|
382
|
+
if (t >= d - c && t <= f + c && n >= u - c && n <= a + c) {
|
|
383
383
|
if (r !== null && document.contains(r) && o !== r && !o.contains(r) && !r.contains(o) && // Calculating stacking order has a cost, so we should avoid it if possible
|
|
384
384
|
// That is why we only check potentially intersecting handles,
|
|
385
385
|
// and why we skip if the event target is within the handle's DOM
|
|
386
386
|
sr(r, o) > 0) {
|
|
387
387
|
let p = r, g = !1;
|
|
388
388
|
for (; p && !p.contains(o); ) {
|
|
389
|
-
if (ir(p.getBoundingClientRect(),
|
|
389
|
+
if (ir(p.getBoundingClientRect(), l)) {
|
|
390
390
|
g = !0;
|
|
391
391
|
break;
|
|
392
392
|
}
|
|
@@ -400,9 +400,9 @@ function at({
|
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
function je(e, t) {
|
|
403
|
-
|
|
403
|
+
qe.set(e, t);
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function at() {
|
|
406
406
|
let e = !1, t = !1;
|
|
407
407
|
se.forEach((r) => {
|
|
408
408
|
const {
|
|
@@ -411,7 +411,7 @@ function lt() {
|
|
|
411
411
|
i === "horizontal" ? e = !0 : t = !0;
|
|
412
412
|
});
|
|
413
413
|
let n = 0;
|
|
414
|
-
|
|
414
|
+
qe.forEach((r) => {
|
|
415
415
|
n |= r;
|
|
416
416
|
}), e && t ? We("intersection", n) : e ? We("horizontal", n) : t ? We("vertical", n) : rr();
|
|
417
417
|
}
|
|
@@ -453,7 +453,7 @@ function I(e, t) {
|
|
|
453
453
|
function he(e, t, n = it) {
|
|
454
454
|
return e.toFixed(n) === t.toFixed(n) ? 0 : e > t ? 1 : -1;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function ae(e, t, n = it) {
|
|
457
457
|
return he(e, t, n) === 0;
|
|
458
458
|
}
|
|
459
459
|
function ee(e, t, n) {
|
|
@@ -480,14 +480,14 @@ function Se({
|
|
|
480
480
|
collapsedSize: i = 0,
|
|
481
481
|
collapsible: o,
|
|
482
482
|
maxSize: s = 100,
|
|
483
|
-
minSize:
|
|
483
|
+
minSize: l = 0
|
|
484
484
|
} = r;
|
|
485
|
-
if (he(n,
|
|
485
|
+
if (he(n, l) < 0)
|
|
486
486
|
if (o) {
|
|
487
|
-
const
|
|
488
|
-
he(n,
|
|
487
|
+
const a = (i + l) / 2;
|
|
488
|
+
he(n, a) < 0 ? n = i : n = l;
|
|
489
489
|
} else
|
|
490
|
-
n =
|
|
490
|
+
n = l;
|
|
491
491
|
return n = Math.min(s, n), n = parseFloat(n.toFixed(it)), n;
|
|
492
492
|
}
|
|
493
493
|
function De({
|
|
@@ -500,12 +500,12 @@ function De({
|
|
|
500
500
|
}) {
|
|
501
501
|
if (ee(e, 0))
|
|
502
502
|
return t;
|
|
503
|
-
const s = [...t], [
|
|
504
|
-
I(
|
|
503
|
+
const s = [...t], [l, a] = r;
|
|
504
|
+
I(l != null, "Invalid first pivot index"), I(a != null, "Invalid second pivot index");
|
|
505
505
|
let d = 0;
|
|
506
506
|
if (o === "keyboard") {
|
|
507
507
|
{
|
|
508
|
-
const u = e < 0 ?
|
|
508
|
+
const u = e < 0 ? a : l, c = n[u];
|
|
509
509
|
I(c, `Panel constraints not found for index ${u}`);
|
|
510
510
|
const {
|
|
511
511
|
collapsedSize: m = 0,
|
|
@@ -521,7 +521,7 @@ function De({
|
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
523
|
{
|
|
524
|
-
const u = e < 0 ?
|
|
524
|
+
const u = e < 0 ? l : a, c = n[u];
|
|
525
525
|
I(c, `No panel constraints found for index ${u}`);
|
|
526
526
|
const {
|
|
527
527
|
collapsedSize: m = 0,
|
|
@@ -539,7 +539,7 @@ function De({
|
|
|
539
539
|
}
|
|
540
540
|
{
|
|
541
541
|
const u = e < 0 ? 1 : -1;
|
|
542
|
-
let c = e < 0 ?
|
|
542
|
+
let c = e < 0 ? a : l, m = 0;
|
|
543
543
|
for (; ; ) {
|
|
544
544
|
const g = t[c];
|
|
545
545
|
I(g != null, `Previous layout not found for panel index ${c}`);
|
|
@@ -555,7 +555,7 @@ function De({
|
|
|
555
555
|
e = e < 0 ? 0 - p : p;
|
|
556
556
|
}
|
|
557
557
|
{
|
|
558
|
-
let c = e < 0 ?
|
|
558
|
+
let c = e < 0 ? l : a;
|
|
559
559
|
for (; c >= 0 && c < n.length; ) {
|
|
560
560
|
const m = Math.abs(e) - Math.abs(d), p = t[c];
|
|
561
561
|
I(p != null, `Previous layout not found for panel index ${c}`);
|
|
@@ -574,7 +574,7 @@ function De({
|
|
|
574
574
|
if (mr(i, s))
|
|
575
575
|
return i;
|
|
576
576
|
{
|
|
577
|
-
const u = e < 0 ?
|
|
577
|
+
const u = e < 0 ? a : l, c = t[u];
|
|
578
578
|
I(c != null, `Previous layout not found for panel index ${u}`);
|
|
579
579
|
const m = c + d, p = Se({
|
|
580
580
|
panelConstraints: n,
|
|
@@ -582,7 +582,7 @@ function De({
|
|
|
582
582
|
size: m
|
|
583
583
|
});
|
|
584
584
|
if (s[u] = p, !ee(p, m)) {
|
|
585
|
-
let g = m - p, h = e < 0 ?
|
|
585
|
+
let g = m - p, h = e < 0 ? a : l;
|
|
586
586
|
for (; h >= 0 && h < n.length; ) {
|
|
587
587
|
const A = s[h];
|
|
588
588
|
I(A != null, `Previous layout not found for panel index ${h}`);
|
|
@@ -606,32 +606,32 @@ function gr({
|
|
|
606
606
|
pivotIndices: n
|
|
607
607
|
}) {
|
|
608
608
|
let r = 0, i = 100, o = 0, s = 0;
|
|
609
|
-
const
|
|
610
|
-
I(
|
|
609
|
+
const l = n[0];
|
|
610
|
+
I(l != null, "No pivot index found"), t.forEach((u, c) => {
|
|
611
611
|
const {
|
|
612
612
|
constraints: m
|
|
613
613
|
} = u, {
|
|
614
614
|
maxSize: p = 100,
|
|
615
615
|
minSize: g = 0
|
|
616
616
|
} = m;
|
|
617
|
-
c ===
|
|
617
|
+
c === l ? (r = g, i = p) : (o += g, s += p);
|
|
618
618
|
});
|
|
619
|
-
const
|
|
619
|
+
const a = Math.min(i, 100 - o), d = Math.max(r, 100 - s), f = e[l];
|
|
620
620
|
return {
|
|
621
|
-
valueMax:
|
|
621
|
+
valueMax: a,
|
|
622
622
|
valueMin: d,
|
|
623
623
|
valueNow: f
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
626
|
function Le(e, t = document) {
|
|
627
|
-
return Array.from(t.querySelectorAll(`[${
|
|
627
|
+
return Array.from(t.querySelectorAll(`[${q.resizeHandleId}][data-panel-group-id="${e}"]`));
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
const i = Le(e, n).findIndex((o) => o.getAttribute(
|
|
629
|
+
function qt(e, t, n = document) {
|
|
630
|
+
const i = Le(e, n).findIndex((o) => o.getAttribute(q.resizeHandleId) === t);
|
|
631
631
|
return i ?? null;
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
const r =
|
|
633
|
+
function Ot(e, t, n) {
|
|
634
|
+
const r = qt(e, t, n);
|
|
635
635
|
return r != null ? [r, r + 1] : [-1, -1];
|
|
636
636
|
}
|
|
637
637
|
function Gt(e, t = document) {
|
|
@@ -641,13 +641,13 @@ function Gt(e, t = document) {
|
|
|
641
641
|
const r = t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);
|
|
642
642
|
return r || null;
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
const n = t.querySelector(`[${
|
|
644
|
+
function Oe(e, t = document) {
|
|
645
|
+
const n = t.querySelector(`[${q.resizeHandleId}="${e}"]`);
|
|
646
646
|
return n || null;
|
|
647
647
|
}
|
|
648
648
|
function hr(e, t, n, r = document) {
|
|
649
|
-
var i, o, s,
|
|
650
|
-
const
|
|
649
|
+
var i, o, s, l;
|
|
650
|
+
const a = Oe(t, r), d = Le(e, r), f = a ? d.indexOf(a) : -1, u = (i = (o = n[f]) === null || o === void 0 ? void 0 : o.id) !== null && i !== void 0 ? i : null, c = (s = (l = n[f + 1]) === null || l === void 0 ? void 0 : l.id) !== null && s !== void 0 ? s : null;
|
|
651
651
|
return [u, c];
|
|
652
652
|
}
|
|
653
653
|
function yr({
|
|
@@ -659,13 +659,13 @@ function yr({
|
|
|
659
659
|
panelGroupElement: o,
|
|
660
660
|
setLayout: s
|
|
661
661
|
}) {
|
|
662
|
-
|
|
662
|
+
O({
|
|
663
663
|
didWarnAboutMissingResizeHandle: !1
|
|
664
664
|
}), ge(() => {
|
|
665
665
|
if (!o)
|
|
666
666
|
return;
|
|
667
|
-
const
|
|
668
|
-
for (let
|
|
667
|
+
const l = Le(n, o);
|
|
668
|
+
for (let a = 0; a < i.length - 1; a++) {
|
|
669
669
|
const {
|
|
670
670
|
valueMax: d,
|
|
671
671
|
valueMin: f,
|
|
@@ -673,33 +673,33 @@ function yr({
|
|
|
673
673
|
} = gr({
|
|
674
674
|
layout: r,
|
|
675
675
|
panelsArray: i,
|
|
676
|
-
pivotIndices: [
|
|
677
|
-
}), c = a
|
|
676
|
+
pivotIndices: [a, a + 1]
|
|
677
|
+
}), c = l[a];
|
|
678
678
|
if (c != null) {
|
|
679
|
-
const m = i[
|
|
680
|
-
I(m, `No panel data found for index "${
|
|
679
|
+
const m = i[a];
|
|
680
|
+
I(m, `No panel data found for index "${a}"`), c.setAttribute("aria-controls", m.id), c.setAttribute("aria-valuemax", "" + Math.round(d)), c.setAttribute("aria-valuemin", "" + Math.round(f)), c.setAttribute("aria-valuenow", u != null ? "" + Math.round(u) : "");
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
683
|
return () => {
|
|
684
|
-
|
|
685
|
-
|
|
684
|
+
l.forEach((a, d) => {
|
|
685
|
+
a.removeAttribute("aria-controls"), a.removeAttribute("aria-valuemax"), a.removeAttribute("aria-valuemin"), a.removeAttribute("aria-valuenow");
|
|
686
686
|
});
|
|
687
687
|
};
|
|
688
688
|
}, [n, r, i, o]), ne(() => {
|
|
689
689
|
if (!o)
|
|
690
690
|
return;
|
|
691
|
-
const
|
|
692
|
-
I(
|
|
691
|
+
const l = t.current;
|
|
692
|
+
I(l, "Eager values not found");
|
|
693
693
|
const {
|
|
694
|
-
panelDataArray:
|
|
695
|
-
} =
|
|
694
|
+
panelDataArray: a
|
|
695
|
+
} = l, d = Gt(n, o);
|
|
696
696
|
I(d != null, `No group found for id "${n}"`);
|
|
697
697
|
const f = Le(n, o);
|
|
698
698
|
I(f, `No resize handles found for group id "${n}"`);
|
|
699
699
|
const u = f.map((c) => {
|
|
700
|
-
const m = c.getAttribute(
|
|
700
|
+
const m = c.getAttribute(q.resizeHandleId);
|
|
701
701
|
I(m, "Resize handle element has no handle id attribute");
|
|
702
|
-
const [p, g] = hr(n, m,
|
|
702
|
+
const [p, g] = hr(n, m, a, o);
|
|
703
703
|
if (p == null || g == null)
|
|
704
704
|
return () => {
|
|
705
705
|
};
|
|
@@ -708,9 +708,9 @@ function yr({
|
|
|
708
708
|
switch (h.key) {
|
|
709
709
|
case "Enter": {
|
|
710
710
|
h.preventDefault();
|
|
711
|
-
const A =
|
|
711
|
+
const A = a.findIndex((x) => x.id === p);
|
|
712
712
|
if (A >= 0) {
|
|
713
|
-
const x =
|
|
713
|
+
const x = a[A];
|
|
714
714
|
I(x, `No panel data found for index ${A}`);
|
|
715
715
|
const R = r[A], {
|
|
716
716
|
collapsedSize: D = 0,
|
|
@@ -721,8 +721,8 @@ function yr({
|
|
|
721
721
|
const X = De({
|
|
722
722
|
delta: ee(R, D) ? C - D : D - R,
|
|
723
723
|
initialLayout: r,
|
|
724
|
-
panelConstraints:
|
|
725
|
-
pivotIndices:
|
|
724
|
+
panelConstraints: a.map((J) => J.constraints),
|
|
725
|
+
pivotIndices: Ot(n, m, o),
|
|
726
726
|
prevLayout: r,
|
|
727
727
|
trigger: "keyboard"
|
|
728
728
|
});
|
|
@@ -758,45 +758,45 @@ function Ut(e, t) {
|
|
|
758
758
|
return n ? r : i;
|
|
759
759
|
}
|
|
760
760
|
function vr(e, t, n, r, i) {
|
|
761
|
-
const o = n === "horizontal", s =
|
|
761
|
+
const o = n === "horizontal", s = Oe(t, i);
|
|
762
762
|
I(s, `No resize handle element found for id "${t}"`);
|
|
763
|
-
const
|
|
764
|
-
I(
|
|
763
|
+
const l = s.getAttribute(q.groupId);
|
|
764
|
+
I(l, "Resize handle element has no group id attribute");
|
|
765
765
|
let {
|
|
766
|
-
initialCursorPosition:
|
|
766
|
+
initialCursorPosition: a
|
|
767
767
|
} = r;
|
|
768
|
-
const d = Ut(n, e), f = Gt(
|
|
769
|
-
I(f, `No group element found for id "${
|
|
768
|
+
const d = Ut(n, e), f = Gt(l, i);
|
|
769
|
+
I(f, `No group element found for id "${l}"`);
|
|
770
770
|
const u = f.getBoundingClientRect(), c = o ? u.width : u.height;
|
|
771
|
-
return (d -
|
|
771
|
+
return (d - a) / c * 100;
|
|
772
772
|
}
|
|
773
773
|
function Sr(e, t, n, r, i, o) {
|
|
774
774
|
if (_t(e)) {
|
|
775
775
|
const s = n === "horizontal";
|
|
776
|
-
let a = 0;
|
|
777
|
-
e.shiftKey ? a = 100 : i != null ? a = i : a = 10;
|
|
778
776
|
let l = 0;
|
|
777
|
+
e.shiftKey ? l = 100 : i != null ? l = i : l = 10;
|
|
778
|
+
let a = 0;
|
|
779
779
|
switch (e.key) {
|
|
780
780
|
case "ArrowDown":
|
|
781
|
-
|
|
781
|
+
a = s ? 0 : l;
|
|
782
782
|
break;
|
|
783
783
|
case "ArrowLeft":
|
|
784
|
-
|
|
784
|
+
a = s ? -l : 0;
|
|
785
785
|
break;
|
|
786
786
|
case "ArrowRight":
|
|
787
|
-
|
|
787
|
+
a = s ? l : 0;
|
|
788
788
|
break;
|
|
789
789
|
case "ArrowUp":
|
|
790
|
-
|
|
790
|
+
a = s ? 0 : -l;
|
|
791
791
|
break;
|
|
792
792
|
case "End":
|
|
793
|
-
|
|
793
|
+
a = 100;
|
|
794
794
|
break;
|
|
795
795
|
case "Home":
|
|
796
|
-
|
|
796
|
+
a = -100;
|
|
797
797
|
break;
|
|
798
798
|
}
|
|
799
|
-
return
|
|
799
|
+
return a;
|
|
800
800
|
} else
|
|
801
801
|
return r == null ? 0 : vr(e, t, n, r, o);
|
|
802
802
|
}
|
|
@@ -809,19 +809,19 @@ function br({
|
|
|
809
809
|
const s = n[o];
|
|
810
810
|
I(s, `Panel constraints not found for index ${o}`);
|
|
811
811
|
const {
|
|
812
|
-
defaultSize:
|
|
812
|
+
defaultSize: l
|
|
813
813
|
} = s;
|
|
814
|
-
|
|
814
|
+
l != null && (r++, t[o] = l, i -= l);
|
|
815
815
|
}
|
|
816
816
|
for (let o = 0; o < e.length; o++) {
|
|
817
817
|
const s = n[o];
|
|
818
818
|
I(s, `Panel constraints not found for index ${o}`);
|
|
819
819
|
const {
|
|
820
|
-
defaultSize:
|
|
820
|
+
defaultSize: l
|
|
821
821
|
} = s;
|
|
822
|
-
if (
|
|
822
|
+
if (l != null)
|
|
823
823
|
continue;
|
|
824
|
-
const
|
|
824
|
+
const a = e.length - r, d = i / a;
|
|
825
825
|
r++, t[o] = d, i -= d;
|
|
826
826
|
}
|
|
827
827
|
return t;
|
|
@@ -832,20 +832,20 @@ function ye(e, t, n) {
|
|
|
832
832
|
I(o, `Panel data not found for index ${i}`);
|
|
833
833
|
const {
|
|
834
834
|
callbacks: s,
|
|
835
|
-
constraints:
|
|
836
|
-
id:
|
|
835
|
+
constraints: l,
|
|
836
|
+
id: a
|
|
837
837
|
} = o, {
|
|
838
838
|
collapsedSize: d = 0,
|
|
839
839
|
collapsible: f
|
|
840
|
-
} =
|
|
840
|
+
} = l, u = n[a];
|
|
841
841
|
if (u == null || r !== u) {
|
|
842
|
-
n[
|
|
842
|
+
n[a] = r;
|
|
843
843
|
const {
|
|
844
844
|
onCollapse: c,
|
|
845
845
|
onExpand: m,
|
|
846
846
|
onResize: p
|
|
847
847
|
} = s;
|
|
848
|
-
p && p(r, u), f && (c || m) && (m && (u == null ||
|
|
848
|
+
p && p(r, u), f && (c || m) && (m && (u == null || ae(u, d)) && !ae(r, d) && m(), c && (u == null || !ae(u, d)) && ae(r, d) && c());
|
|
849
849
|
}
|
|
850
850
|
});
|
|
851
851
|
}
|
|
@@ -866,10 +866,10 @@ function xr({
|
|
|
866
866
|
precision: o = 3
|
|
867
867
|
}) {
|
|
868
868
|
const s = n[i];
|
|
869
|
-
let
|
|
870
|
-
return s == null ?
|
|
869
|
+
let l;
|
|
870
|
+
return s == null ? l = e != null ? e.toPrecision(o) : "1" : r.length === 1 ? l = "1" : l = s.toPrecision(o), {
|
|
871
871
|
flexBasis: 0,
|
|
872
|
-
flexGrow:
|
|
872
|
+
flexGrow: l,
|
|
873
873
|
flexShrink: 1,
|
|
874
874
|
// Without this, Panel sizes may be unintentionally overridden by their content
|
|
875
875
|
overflow: "hidden",
|
|
@@ -932,13 +932,13 @@ function Pr(e, t, n) {
|
|
|
932
932
|
}
|
|
933
933
|
function wr(e, t, n, r, i) {
|
|
934
934
|
var o;
|
|
935
|
-
const s = Wt(e),
|
|
936
|
-
l
|
|
935
|
+
const s = Wt(e), l = Yt(t), a = (o = Xt(e, i)) !== null && o !== void 0 ? o : {};
|
|
936
|
+
a[l] = {
|
|
937
937
|
expandToSizes: Object.fromEntries(n.entries()),
|
|
938
938
|
layout: r
|
|
939
939
|
};
|
|
940
940
|
try {
|
|
941
|
-
i.setItem(s, JSON.stringify(
|
|
941
|
+
i.setItem(s, JSON.stringify(a));
|
|
942
942
|
} catch (d) {
|
|
943
943
|
console.error(d);
|
|
944
944
|
}
|
|
@@ -954,30 +954,30 @@ function St({
|
|
|
954
954
|
for (let o = 0; o < t.length; o++) {
|
|
955
955
|
const s = n[o];
|
|
956
956
|
I(s != null, `No layout data found for index ${o}`);
|
|
957
|
-
const
|
|
958
|
-
n[o] =
|
|
957
|
+
const l = 100 / r * s;
|
|
958
|
+
n[o] = l;
|
|
959
959
|
}
|
|
960
960
|
let i = 0;
|
|
961
961
|
for (let o = 0; o < t.length; o++) {
|
|
962
962
|
const s = n[o];
|
|
963
963
|
I(s != null, `No layout data found for index ${o}`);
|
|
964
|
-
const
|
|
964
|
+
const l = Se({
|
|
965
965
|
panelConstraints: t,
|
|
966
966
|
panelIndex: o,
|
|
967
967
|
size: s
|
|
968
968
|
});
|
|
969
|
-
s !=
|
|
969
|
+
s != l && (i += s - l, n[o] = l);
|
|
970
970
|
}
|
|
971
971
|
if (!ee(i, 0))
|
|
972
972
|
for (let o = 0; o < t.length; o++) {
|
|
973
973
|
const s = n[o];
|
|
974
974
|
I(s != null, `No layout data found for index ${o}`);
|
|
975
|
-
const
|
|
975
|
+
const l = s + i, a = Se({
|
|
976
976
|
panelConstraints: t,
|
|
977
977
|
panelIndex: o,
|
|
978
|
-
size:
|
|
978
|
+
size: l
|
|
979
979
|
});
|
|
980
|
-
if (s !==
|
|
980
|
+
if (s !== a && (i -= a - s, n[o] = a, ee(i, 0)))
|
|
981
981
|
break;
|
|
982
982
|
}
|
|
983
983
|
return n;
|
|
@@ -996,26 +996,26 @@ function jt({
|
|
|
996
996
|
forwardedRef: i,
|
|
997
997
|
id: o = null,
|
|
998
998
|
onLayout: s = null,
|
|
999
|
-
keyboardResizeBy:
|
|
1000
|
-
storage:
|
|
999
|
+
keyboardResizeBy: l = null,
|
|
1000
|
+
storage: a = Ae,
|
|
1001
1001
|
style: d,
|
|
1002
1002
|
tagName: f = "div",
|
|
1003
1003
|
...u
|
|
1004
1004
|
}) {
|
|
1005
|
-
const c = st(o), m =
|
|
1005
|
+
const c = st(o), m = O(null), [p, g] = de(null), [y, h] = de([]), A = pr(), x = O({}), R = O(/* @__PURE__ */ new Map()), D = O(0), L = O({
|
|
1006
1006
|
autoSaveId: e,
|
|
1007
1007
|
direction: r,
|
|
1008
1008
|
dragState: p,
|
|
1009
1009
|
id: c,
|
|
1010
|
-
keyboardResizeBy:
|
|
1010
|
+
keyboardResizeBy: l,
|
|
1011
1011
|
onLayout: s,
|
|
1012
|
-
storage:
|
|
1013
|
-
}), C =
|
|
1012
|
+
storage: a
|
|
1013
|
+
}), C = O({
|
|
1014
1014
|
layout: y,
|
|
1015
1015
|
panelDataArray: [],
|
|
1016
1016
|
panelDataArrayChanged: !1
|
|
1017
1017
|
});
|
|
1018
|
-
|
|
1018
|
+
O({
|
|
1019
1019
|
didLogIdAndOrderWarning: !1,
|
|
1020
1020
|
didLogPanelConstraintsWarning: !1,
|
|
1021
1021
|
prevPanelIds: []
|
|
@@ -1040,7 +1040,7 @@ function jt({
|
|
|
1040
1040
|
yt(E, S) || (h(S), C.current.layout = S, P && P(S), ye(z, S, x.current));
|
|
1041
1041
|
}
|
|
1042
1042
|
}), []), ge(() => {
|
|
1043
|
-
L.current.autoSaveId = e, L.current.direction = r, L.current.dragState = p, L.current.id = c, L.current.onLayout = s, L.current.storage =
|
|
1043
|
+
L.current.autoSaveId = e, L.current.direction = r, L.current.dragState = p, L.current.id = c, L.current.onLayout = s, L.current.storage = a;
|
|
1044
1044
|
}), yr({
|
|
1045
1045
|
committedValuesRef: L,
|
|
1046
1046
|
eagerValuesRef: C,
|
|
@@ -1059,9 +1059,9 @@ function jt({
|
|
|
1059
1059
|
let P = bt[e];
|
|
1060
1060
|
P == null && (P = zr(wr, Cr), bt[e] = P);
|
|
1061
1061
|
const E = [...v], z = new Map(R.current);
|
|
1062
|
-
P(e, E, z, y,
|
|
1062
|
+
P(e, E, z, y, a);
|
|
1063
1063
|
}
|
|
1064
|
-
}, [e, y,
|
|
1064
|
+
}, [e, y, a]), ne(() => {
|
|
1065
1065
|
});
|
|
1066
1066
|
const X = G((v) => {
|
|
1067
1067
|
const {
|
|
@@ -1076,7 +1076,7 @@ function jt({
|
|
|
1076
1076
|
panelSize: k,
|
|
1077
1077
|
pivotIndices: b
|
|
1078
1078
|
} = fe(z, v, E);
|
|
1079
|
-
if (I(k != null, `Panel size not found for panel "${v.id}"`), !
|
|
1079
|
+
if (I(k != null, `Panel size not found for panel "${v.id}"`), !ae(k, w)) {
|
|
1080
1080
|
R.current.set(v.id, k);
|
|
1081
1081
|
const Q = ve(z, v) === z.length - 1 ? k - w : w - k, V = De({
|
|
1082
1082
|
delta: Q,
|
|
@@ -1103,7 +1103,7 @@ function jt({
|
|
|
1103
1103
|
minSize: H = 0,
|
|
1104
1104
|
pivotIndices: Q
|
|
1105
1105
|
} = fe(S, v, z), V = P ?? H;
|
|
1106
|
-
if (
|
|
1106
|
+
if (ae(b, k)) {
|
|
1107
1107
|
const oe = R.current.get(v.id), Ee = oe != null && oe >= V ? oe : V, Ue = ve(S, v) === S.length - 1 ? b - Ee : Ee - b, Z = De({
|
|
1108
1108
|
delta: Ue,
|
|
1109
1109
|
initialLayout: z,
|
|
@@ -1143,7 +1143,7 @@ function jt({
|
|
|
1143
1143
|
collapsible: S,
|
|
1144
1144
|
panelSize: w
|
|
1145
1145
|
} = fe(E, v, P);
|
|
1146
|
-
return I(w != null, `Panel size not found for panel "${v.id}"`), S === !0 &&
|
|
1146
|
+
return I(w != null, `Panel size not found for panel "${v.id}"`), S === !0 && ae(w, z);
|
|
1147
1147
|
}, []), U = G((v) => {
|
|
1148
1148
|
const {
|
|
1149
1149
|
layout: P,
|
|
@@ -1213,7 +1213,7 @@ function jt({
|
|
|
1213
1213
|
panelDataArray: Ee
|
|
1214
1214
|
} = C.current, {
|
|
1215
1215
|
initialLayout: _e
|
|
1216
|
-
} = b ?? {}, Ue =
|
|
1216
|
+
} = b ?? {}, Ue = Ot(H, v, w);
|
|
1217
1217
|
let Z = Sr(S, v, k, b, Q, w);
|
|
1218
1218
|
const ut = k === "horizontal";
|
|
1219
1219
|
ut && P && (Z = -Z);
|
|
@@ -1262,7 +1262,7 @@ function jt({
|
|
|
1262
1262
|
} = v.constraints, {
|
|
1263
1263
|
panelSize: V
|
|
1264
1264
|
} = fe(z, v, E);
|
|
1265
|
-
V != null && (w && b &&
|
|
1265
|
+
V != null && (w && b && ae(V, S) ? ae(S, k) || F(v, k) : V < Q ? F(v, Q) : V > H && F(v, H));
|
|
1266
1266
|
}, [F]), Y = G((v, P) => {
|
|
1267
1267
|
const {
|
|
1268
1268
|
direction: E
|
|
@@ -1271,7 +1271,7 @@ function jt({
|
|
|
1271
1271
|
} = C.current;
|
|
1272
1272
|
if (!m.current)
|
|
1273
1273
|
return;
|
|
1274
|
-
const S =
|
|
1274
|
+
const S = Oe(v, m.current);
|
|
1275
1275
|
I(S, `Drag handle element not found for id "${v}"`);
|
|
1276
1276
|
const w = Ut(E, P);
|
|
1277
1277
|
g({
|
|
@@ -1287,7 +1287,7 @@ function jt({
|
|
|
1287
1287
|
panelDataArray: P
|
|
1288
1288
|
} = C.current, E = ve(P, v);
|
|
1289
1289
|
E >= 0 && (P.splice(E, 1), delete x.current[v.id], C.current.panelDataArrayChanged = !0, A());
|
|
1290
|
-
}, [A]),
|
|
1290
|
+
}, [A]), le = W(() => ({
|
|
1291
1291
|
collapsePanel: X,
|
|
1292
1292
|
direction: r,
|
|
1293
1293
|
dragState: p,
|
|
@@ -1313,7 +1313,7 @@ function jt({
|
|
|
1313
1313
|
width: "100%"
|
|
1314
1314
|
};
|
|
1315
1315
|
return xe(Ke.Provider, {
|
|
1316
|
-
value:
|
|
1316
|
+
value: le
|
|
1317
1317
|
}, xe(f, {
|
|
1318
1318
|
...u,
|
|
1319
1319
|
children: t,
|
|
@@ -1325,9 +1325,9 @@ function jt({
|
|
|
1325
1325
|
...d
|
|
1326
1326
|
},
|
|
1327
1327
|
// CSS selectors
|
|
1328
|
-
[
|
|
1329
|
-
[
|
|
1330
|
-
[
|
|
1328
|
+
[q.group]: "",
|
|
1329
|
+
[q.groupDirection]: r,
|
|
1330
|
+
[q.groupId]: c
|
|
1331
1331
|
}));
|
|
1332
1332
|
}
|
|
1333
1333
|
const Er = Fe((e, t) => xe(jt, {
|
|
@@ -1356,7 +1356,7 @@ function Ir({
|
|
|
1356
1356
|
ne(() => {
|
|
1357
1357
|
if (e || n == null || r == null)
|
|
1358
1358
|
return;
|
|
1359
|
-
const i =
|
|
1359
|
+
const i = Oe(t, r);
|
|
1360
1360
|
if (i == null)
|
|
1361
1361
|
return;
|
|
1362
1362
|
const o = (s) => {
|
|
@@ -1373,12 +1373,12 @@ function Ir({
|
|
|
1373
1373
|
}
|
|
1374
1374
|
case "F6": {
|
|
1375
1375
|
s.preventDefault();
|
|
1376
|
-
const
|
|
1377
|
-
I(
|
|
1378
|
-
const
|
|
1376
|
+
const l = i.getAttribute(q.groupId);
|
|
1377
|
+
I(l, `No group element found for id "${l}"`);
|
|
1378
|
+
const a = Le(l, r), d = qt(l, t, r);
|
|
1379
1379
|
I(d !== null, `No resize element found for id "${t}"`);
|
|
1380
|
-
const f = s.shiftKey ? d > 0 ? d - 1 :
|
|
1381
|
-
|
|
1380
|
+
const f = s.shiftKey ? d > 0 ? d - 1 : a.length - 1 : d + 1 < a.length ? d + 1 : 0;
|
|
1381
|
+
a[f].focus();
|
|
1382
1382
|
break;
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
@@ -1396,8 +1396,8 @@ function Rr({
|
|
|
1396
1396
|
id: i,
|
|
1397
1397
|
onBlur: o,
|
|
1398
1398
|
onClick: s,
|
|
1399
|
-
onDragging:
|
|
1400
|
-
onFocus:
|
|
1399
|
+
onDragging: l,
|
|
1400
|
+
onFocus: a,
|
|
1401
1401
|
onPointerDown: d,
|
|
1402
1402
|
onPointerUp: f,
|
|
1403
1403
|
style: u = {},
|
|
@@ -1406,14 +1406,14 @@ function Rr({
|
|
|
1406
1406
|
...p
|
|
1407
1407
|
}) {
|
|
1408
1408
|
var g, y;
|
|
1409
|
-
const h =
|
|
1409
|
+
const h = O(null), A = O({
|
|
1410
1410
|
onClick: s,
|
|
1411
|
-
onDragging:
|
|
1411
|
+
onDragging: l,
|
|
1412
1412
|
onPointerDown: d,
|
|
1413
1413
|
onPointerUp: f
|
|
1414
1414
|
});
|
|
1415
1415
|
ne(() => {
|
|
1416
|
-
A.current.onClick = s, A.current.onDragging =
|
|
1416
|
+
A.current.onClick = s, A.current.onDragging = l, A.current.onPointerDown = d, A.current.onPointerUp = f;
|
|
1417
1417
|
});
|
|
1418
1418
|
const x = rt(Ke);
|
|
1419
1419
|
if (x === null)
|
|
@@ -1425,7 +1425,7 @@ function Rr({
|
|
|
1425
1425
|
startDragging: C,
|
|
1426
1426
|
stopDragging: X,
|
|
1427
1427
|
panelGroupElement: J
|
|
1428
|
-
} = x, K = st(i), [M, _] = de("inactive"), [U, B] = de(!1), [$, F] = de(null), j =
|
|
1428
|
+
} = x, K = st(i), [M, _] = de("inactive"), [U, B] = de(!1), [$, F] = de(null), j = O({
|
|
1429
1429
|
state: M
|
|
1430
1430
|
});
|
|
1431
1431
|
ge(() => {
|
|
@@ -1434,18 +1434,18 @@ function Rr({
|
|
|
1434
1434
|
if (n)
|
|
1435
1435
|
F(null);
|
|
1436
1436
|
else {
|
|
1437
|
-
const
|
|
1438
|
-
F(() =>
|
|
1437
|
+
const le = L(K);
|
|
1438
|
+
F(() => le);
|
|
1439
1439
|
}
|
|
1440
1440
|
}, [n, K, L]);
|
|
1441
1441
|
const Y = (g = r == null ? void 0 : r.coarse) !== null && g !== void 0 ? g : 15, te = (y = r == null ? void 0 : r.fine) !== null && y !== void 0 ? y : 5;
|
|
1442
1442
|
return ne(() => {
|
|
1443
1443
|
if (n || $ == null)
|
|
1444
1444
|
return;
|
|
1445
|
-
const
|
|
1446
|
-
I(
|
|
1445
|
+
const le = h.current;
|
|
1446
|
+
I(le, "Element ref not attached");
|
|
1447
1447
|
let re = !1;
|
|
1448
|
-
return dr(K,
|
|
1448
|
+
return dr(K, le, R, {
|
|
1449
1449
|
coarse: Y,
|
|
1450
1450
|
fine: te
|
|
1451
1451
|
}, (P, E, z) => {
|
|
@@ -1496,7 +1496,7 @@ function Rr({
|
|
|
1496
1496
|
B(!1), o == null || o();
|
|
1497
1497
|
},
|
|
1498
1498
|
onFocus: () => {
|
|
1499
|
-
B(!0),
|
|
1499
|
+
B(!0), a == null || a();
|
|
1500
1500
|
},
|
|
1501
1501
|
ref: h,
|
|
1502
1502
|
role: "separator",
|
|
@@ -1509,23 +1509,23 @@ function Rr({
|
|
|
1509
1509
|
},
|
|
1510
1510
|
tabIndex: c,
|
|
1511
1511
|
// CSS selectors
|
|
1512
|
-
[
|
|
1513
|
-
[
|
|
1514
|
-
[
|
|
1515
|
-
[
|
|
1516
|
-
[
|
|
1517
|
-
[
|
|
1518
|
-
[
|
|
1512
|
+
[q.groupDirection]: R,
|
|
1513
|
+
[q.groupId]: D,
|
|
1514
|
+
[q.resizeHandle]: "",
|
|
1515
|
+
[q.resizeHandleActive]: M === "drag" ? "pointer" : U ? "keyboard" : void 0,
|
|
1516
|
+
[q.resizeHandleEnabled]: !n,
|
|
1517
|
+
[q.resizeHandleId]: K,
|
|
1518
|
+
[q.resizeHandleState]: M
|
|
1519
1519
|
});
|
|
1520
1520
|
}
|
|
1521
1521
|
Rr.displayName = "PanelResizeHandle";
|
|
1522
1522
|
function Qt() {
|
|
1523
|
-
var
|
|
1523
|
+
var a, d;
|
|
1524
1524
|
const e = ie((f) => f.card), t = ie((f) => f.frame), n = W(
|
|
1525
1525
|
() => Wn(t, e),
|
|
1526
1526
|
[t, e]
|
|
1527
1527
|
), { manifest: r } = Pt(
|
|
1528
|
-
((
|
|
1528
|
+
((a = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : a.url) || ""
|
|
1529
1529
|
), i = W(
|
|
1530
1530
|
() => {
|
|
1531
1531
|
var f;
|
|
@@ -1544,17 +1544,17 @@ function Qt() {
|
|
|
1544
1544
|
isMultiInputVisual: o === "multiple"
|
|
1545
1545
|
}),
|
|
1546
1546
|
[t, n, o]
|
|
1547
|
-
),
|
|
1547
|
+
), l = W(() => {
|
|
1548
1548
|
const f = s.findIndex(
|
|
1549
1549
|
(u) => (u == null ? void 0 : u.id) === e.id
|
|
1550
1550
|
);
|
|
1551
1551
|
return f < 0 ? -1 : Je(e, f);
|
|
1552
1552
|
}, [s, e]);
|
|
1553
|
-
return W(() => !n || o !== "multiple" ||
|
|
1553
|
+
return W(() => !n || o !== "multiple" || l < 0 ? e.type : Te(
|
|
1554
1554
|
e,
|
|
1555
|
-
|
|
1555
|
+
l,
|
|
1556
1556
|
i == null ? void 0 : i.slots
|
|
1557
|
-
) ?? e.type, [n, o,
|
|
1557
|
+
) ?? e.type, [n, o, l, e, i == null ? void 0 : i.slots]);
|
|
1558
1558
|
}
|
|
1559
1559
|
function Jt({
|
|
1560
1560
|
storeValue: e,
|
|
@@ -1562,14 +1562,14 @@ function Jt({
|
|
|
1562
1562
|
onStoreUpdate: n,
|
|
1563
1563
|
delay: r = 300
|
|
1564
1564
|
}) {
|
|
1565
|
-
const [i, o] = de(e ?? t), s =
|
|
1566
|
-
s.current && (clearTimeout(s.current), s.current = null), d.current &&
|
|
1565
|
+
const [i, o] = de(e ?? t), s = O(null), l = O(i), a = O(e), d = O(!1), f = G(() => {
|
|
1566
|
+
s.current && (clearTimeout(s.current), s.current = null), d.current && l.current !== (a.current ?? t) && (n(l.current), a.current = l.current);
|
|
1567
1567
|
}, [t, n]);
|
|
1568
1568
|
ne(() => {
|
|
1569
|
-
if (e !==
|
|
1569
|
+
if (e !== a.current) {
|
|
1570
1570
|
s.current && (clearTimeout(s.current), s.current = null);
|
|
1571
1571
|
const c = e ?? t;
|
|
1572
|
-
o(c),
|
|
1572
|
+
o(c), l.current = c, a.current = e, d.current = !1;
|
|
1573
1573
|
}
|
|
1574
1574
|
}, [e, t]), ne(() => {
|
|
1575
1575
|
if (d.current)
|
|
@@ -1584,7 +1584,7 @@ function Jt({
|
|
|
1584
1584
|
const u = G(
|
|
1585
1585
|
(c) => {
|
|
1586
1586
|
const m = c ?? t;
|
|
1587
|
-
d.current = !0,
|
|
1587
|
+
d.current = !0, l.current = m, o(m);
|
|
1588
1588
|
},
|
|
1589
1589
|
[t]
|
|
1590
1590
|
);
|
|
@@ -1601,9 +1601,9 @@ function Zt({
|
|
|
1601
1601
|
}
|
|
1602
1602
|
const Dr = 300;
|
|
1603
1603
|
function Ar({ className: e }, t) {
|
|
1604
|
-
const n = ie((x) => x.card.sql), r = ie((x) => x.sqlGen), i = ie((x) => x.card), o = Qt(), { setCardSql: s, setSqlGen:
|
|
1604
|
+
const n = ie((x) => x.card.sql), r = ie((x) => x.sqlGen), i = ie((x) => x.card), o = Qt(), { setCardSql: s, setSqlGen: l, setRunSql: a } = wt(), d = W(() => o !== i.type ? { ...i, type: o } : i, [i, o]), { queryKey: f } = ot(d), u = Ct(), c = O(f);
|
|
1605
1605
|
c.current = f;
|
|
1606
|
-
const m =
|
|
1606
|
+
const m = O(r);
|
|
1607
1607
|
m.current = r;
|
|
1608
1608
|
const p = G(
|
|
1609
1609
|
(x) => {
|
|
@@ -1622,7 +1622,7 @@ function Ar({ className: e }, t) {
|
|
|
1622
1622
|
});
|
|
1623
1623
|
ne(() => Et(h), [h]);
|
|
1624
1624
|
function A(x) {
|
|
1625
|
-
y(x), Yn(m.current) ||
|
|
1625
|
+
y(x), Yn(m.current) || l({});
|
|
1626
1626
|
}
|
|
1627
1627
|
return /* @__PURE__ */ N("div", { className: "relative h-full w-full", children: /* @__PURE__ */ N(
|
|
1628
1628
|
It,
|
|
@@ -1640,7 +1640,7 @@ function Ar({ className: e }, t) {
|
|
|
1640
1640
|
x.key === "Enter" && x.shiftKey && (x.preventDefault(), Zt({
|
|
1641
1641
|
queryClient: u,
|
|
1642
1642
|
readQueryKey: () => c.current,
|
|
1643
|
-
setRunSql:
|
|
1643
|
+
setRunSql: a
|
|
1644
1644
|
}));
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
@@ -1651,8 +1651,8 @@ const xo = Fe(Ar), Nr = 300, Mr = `# 'data' holds the SQL result.
|
|
|
1651
1651
|
# import pandas as pd
|
|
1652
1652
|
# result = pd.DataFrame(data).to_dict('records')`;
|
|
1653
1653
|
function Lr({ className: e }, t) {
|
|
1654
|
-
const n = ie((p) => p.card.python), r = ie((p) => p.card), i = Qt(), { setCardPython: o, setRunSql: s } = wt(),
|
|
1655
|
-
f.current =
|
|
1654
|
+
const n = ie((p) => p.card.python), r = ie((p) => p.card), i = Qt(), { setCardPython: o, setRunSql: s } = wt(), l = W(() => i !== r.type ? { ...r, type: i } : r, [r, i]), { queryKey: a } = ot(l), d = Ct(), f = O(a);
|
|
1655
|
+
f.current = a;
|
|
1656
1656
|
const { value: u, onChange: c, flush: m } = Jt({
|
|
1657
1657
|
storeValue: n,
|
|
1658
1658
|
onStoreUpdate: o,
|
|
@@ -1687,10 +1687,10 @@ function Lr({ className: e }, t) {
|
|
|
1687
1687
|
const zo = Fe(Lr);
|
|
1688
1688
|
function _r({ card: e }) {
|
|
1689
1689
|
var E, z, S, w, k;
|
|
1690
|
-
const t = Dn(), [n, r] = de({}), { authToken: i } = An(), o = Xn(i == null ? void 0 : i.accessToken), { compiledAppearance: s } = Jn(),
|
|
1690
|
+
const t = Dn(), [n, r] = de({}), { authToken: i } = An(), o = Xn(i == null ? void 0 : i.accessToken), { compiledAppearance: s } = Jn(), l = W(
|
|
1691
1691
|
() => Nn(s),
|
|
1692
1692
|
[s]
|
|
1693
|
-
),
|
|
1693
|
+
), a = ie((b) => b.frame), d = ie(
|
|
1694
1694
|
(b) => b.inlineFilterValuesMap[e.id]
|
|
1695
1695
|
), f = ie(
|
|
1696
1696
|
(b) => b.actions.setCardInlineFilterValue
|
|
@@ -1705,11 +1705,11 @@ function _r({ card: e }) {
|
|
|
1705
1705
|
}
|
|
1706
1706
|
), y = Nt(c, g) ?? "single", h = W(
|
|
1707
1707
|
() => Mt({
|
|
1708
|
-
frame:
|
|
1708
|
+
frame: a,
|
|
1709
1709
|
configCard: c,
|
|
1710
1710
|
isMultiInputVisual: y === "multiple"
|
|
1711
1711
|
}),
|
|
1712
|
-
[
|
|
1712
|
+
[a, c, y]
|
|
1713
1713
|
), A = W(() => {
|
|
1714
1714
|
const b = h.findIndex(
|
|
1715
1715
|
(H) => (H == null ? void 0 : H.id) === e.id
|
|
@@ -1783,7 +1783,7 @@ function _r({ card: e }) {
|
|
|
1783
1783
|
}));
|
|
1784
1784
|
},
|
|
1785
1785
|
[]
|
|
1786
|
-
), te = (S = c.customCardPreferences) == null ? void 0 : S.componentName, ce = te ? m(te) : null,
|
|
1786
|
+
), te = (S = c.customCardPreferences) == null ? void 0 : S.componentName, ce = te ? m(te) : null, le = kn(
|
|
1787
1787
|
(w = c.customCardPreferences) == null ? void 0 : w.settings,
|
|
1788
1788
|
c
|
|
1789
1789
|
), re = W(
|
|
@@ -1835,8 +1835,8 @@ function _r({ card: e }) {
|
|
|
1835
1835
|
{
|
|
1836
1836
|
editing: !0,
|
|
1837
1837
|
params: o,
|
|
1838
|
-
theme:
|
|
1839
|
-
settings:
|
|
1838
|
+
theme: l,
|
|
1839
|
+
settings: le,
|
|
1840
1840
|
cardMetadata: Vn({
|
|
1841
1841
|
// Its formats as its rows render, live model formats included (CF-D17).
|
|
1842
1842
|
card: C,
|
|
@@ -1884,8 +1884,8 @@ function _r({ card: e }) {
|
|
|
1884
1884
|
slotTypes: v,
|
|
1885
1885
|
multiInputData: n,
|
|
1886
1886
|
params: o,
|
|
1887
|
-
theme:
|
|
1888
|
-
chartSettings:
|
|
1887
|
+
theme: l,
|
|
1888
|
+
chartSettings: le,
|
|
1889
1889
|
filterInputs: $,
|
|
1890
1890
|
filters: F,
|
|
1891
1891
|
filterValues: [
|
|
@@ -1905,7 +1905,7 @@ function _r({ card: e }) {
|
|
|
1905
1905
|
}
|
|
1906
1906
|
const Po = wn(_r);
|
|
1907
1907
|
var en = "Toggle", tn = T.forwardRef((e, t) => {
|
|
1908
|
-
const { pressed: n, defaultPressed: r, onPressedChange: i, ...o } = e, [s,
|
|
1908
|
+
const { pressed: n, defaultPressed: r, onPressedChange: i, ...o } = e, [s, l] = Rt({
|
|
1909
1909
|
prop: n,
|
|
1910
1910
|
onChange: i,
|
|
1911
1911
|
defaultProp: r ?? !1,
|
|
@@ -1921,7 +1921,7 @@ var en = "Toggle", tn = T.forwardRef((e, t) => {
|
|
|
1921
1921
|
...o,
|
|
1922
1922
|
ref: t,
|
|
1923
1923
|
onClick: me(e.onClick, () => {
|
|
1924
|
-
e.disabled ||
|
|
1924
|
+
e.disabled || l(!s);
|
|
1925
1925
|
})
|
|
1926
1926
|
}
|
|
1927
1927
|
);
|
|
@@ -2002,9 +2002,9 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2002
2002
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
2003
2003
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
2004
2004
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
2005
|
-
}, Ce = "Slider", [et, Kr, Br] =
|
|
2005
|
+
}, Ce = "Slider", [et, Kr, Br] = qn(Ce), [ln] = Bn(Ce, [
|
|
2006
2006
|
Br
|
|
2007
|
-
]), [
|
|
2007
|
+
]), [qr, Ge] = ln(Ce), an = T.forwardRef(
|
|
2008
2008
|
(e, t) => {
|
|
2009
2009
|
const {
|
|
2010
2010
|
name: n,
|
|
@@ -2012,8 +2012,8 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2012
2012
|
max: i = 100,
|
|
2013
2013
|
step: o = 1,
|
|
2014
2014
|
orientation: s = "horizontal",
|
|
2015
|
-
disabled:
|
|
2016
|
-
minStepsBetweenThumbs:
|
|
2015
|
+
disabled: l = !1,
|
|
2016
|
+
minStepsBetweenThumbs: a = 0,
|
|
2017
2017
|
defaultValue: d = [r],
|
|
2018
2018
|
value: f,
|
|
2019
2019
|
onValueChange: u = () => {
|
|
@@ -2023,7 +2023,7 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2023
2023
|
inverted: m = !1,
|
|
2024
2024
|
form: p,
|
|
2025
2025
|
...g
|
|
2026
|
-
} = e, y = T.useRef(/* @__PURE__ */ new Set()), h = T.useRef(0), x = s === "horizontal" ?
|
|
2026
|
+
} = e, y = T.useRef(/* @__PURE__ */ new Set()), h = T.useRef(0), x = s === "horizontal" ? Or : Gr, [R = [], D] = Rt({
|
|
2027
2027
|
prop: f,
|
|
2028
2028
|
defaultProp: d,
|
|
2029
2029
|
onChange: (M) => {
|
|
@@ -2046,7 +2046,7 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2046
2046
|
const B = eo(o), $ = to(Math.round((M - r) / o) * o + r, B), F = At($, [r, i]);
|
|
2047
2047
|
D((j = []) => {
|
|
2048
2048
|
const Y = Yr(j, F, _);
|
|
2049
|
-
if (Zr(Y,
|
|
2049
|
+
if (Zr(Y, a * o)) {
|
|
2050
2050
|
h.current = Y.indexOf(F);
|
|
2051
2051
|
const te = String(Y) !== String(j);
|
|
2052
2052
|
return te && U && c(Y), te ? Y : j;
|
|
@@ -2055,11 +2055,11 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2055
2055
|
});
|
|
2056
2056
|
}
|
|
2057
2057
|
return /* @__PURE__ */ N(
|
|
2058
|
-
|
|
2058
|
+
qr,
|
|
2059
2059
|
{
|
|
2060
2060
|
scope: e.__scopeSlider,
|
|
2061
2061
|
name: n,
|
|
2062
|
-
disabled:
|
|
2062
|
+
disabled: l,
|
|
2063
2063
|
min: r,
|
|
2064
2064
|
max: i,
|
|
2065
2065
|
valueIndexToChangeRef: h,
|
|
@@ -2070,23 +2070,23 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2070
2070
|
children: /* @__PURE__ */ N(et.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ N(et.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ N(
|
|
2071
2071
|
x,
|
|
2072
2072
|
{
|
|
2073
|
-
"aria-disabled":
|
|
2074
|
-
"data-disabled":
|
|
2073
|
+
"aria-disabled": l,
|
|
2074
|
+
"data-disabled": l ? "" : void 0,
|
|
2075
2075
|
...g,
|
|
2076
2076
|
ref: t,
|
|
2077
2077
|
onPointerDown: me(g.onPointerDown, () => {
|
|
2078
|
-
|
|
2078
|
+
l || (L.current = R);
|
|
2079
2079
|
}),
|
|
2080
2080
|
min: r,
|
|
2081
2081
|
max: i,
|
|
2082
2082
|
inverted: m,
|
|
2083
|
-
onSlideStart:
|
|
2084
|
-
onSlideMove:
|
|
2085
|
-
onSlideEnd:
|
|
2086
|
-
onHomeKeyDown: () => !
|
|
2087
|
-
onEndKeyDown: () => !
|
|
2083
|
+
onSlideStart: l ? void 0 : C,
|
|
2084
|
+
onSlideMove: l ? void 0 : X,
|
|
2085
|
+
onSlideEnd: l ? void 0 : J,
|
|
2086
|
+
onHomeKeyDown: () => !l && K(r, 0, { commit: !0 }),
|
|
2087
|
+
onEndKeyDown: () => !l && K(i, R.length - 1, { commit: !0 }),
|
|
2088
2088
|
onStepKeyDown: ({ event: M, direction: _ }) => {
|
|
2089
|
-
if (!
|
|
2089
|
+
if (!l) {
|
|
2090
2090
|
const $ = rn.includes(M.key) || M.shiftKey && on.includes(M.key) ? 10 : 1, F = h.current, j = R[F], Y = o * $ * _;
|
|
2091
2091
|
K(j + Y, F, { commit: !0 });
|
|
2092
2092
|
}
|
|
@@ -2097,13 +2097,13 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2097
2097
|
);
|
|
2098
2098
|
}
|
|
2099
2099
|
);
|
|
2100
|
-
|
|
2101
|
-
var [cn, un] =
|
|
2100
|
+
an.displayName = Ce;
|
|
2101
|
+
var [cn, un] = ln(Ce, {
|
|
2102
2102
|
startEdge: "left",
|
|
2103
2103
|
endEdge: "right",
|
|
2104
2104
|
size: "width",
|
|
2105
2105
|
direction: 1
|
|
2106
|
-
}),
|
|
2106
|
+
}), Or = T.forwardRef(
|
|
2107
2107
|
(e, t) => {
|
|
2108
2108
|
const {
|
|
2109
2109
|
min: n,
|
|
@@ -2111,11 +2111,11 @@ var [cn, un] = an(Ce, {
|
|
|
2111
2111
|
dir: i,
|
|
2112
2112
|
inverted: o,
|
|
2113
2113
|
onSlideStart: s,
|
|
2114
|
-
onSlideMove:
|
|
2115
|
-
onSlideEnd:
|
|
2114
|
+
onSlideMove: l,
|
|
2115
|
+
onSlideEnd: a,
|
|
2116
2116
|
onStepKeyDown: d,
|
|
2117
2117
|
...f
|
|
2118
|
-
} = e, [u, c] = T.useState(null), m = Pe(t, (x) => c(x)), p = T.useRef(void 0), g =
|
|
2118
|
+
} = e, [u, c] = T.useState(null), m = Pe(t, (x) => c(x)), p = T.useRef(void 0), g = On(i), y = g === "ltr", h = y && !o || !y && o;
|
|
2119
2119
|
function A(x) {
|
|
2120
2120
|
const R = p.current || u.getBoundingClientRect(), D = [0, R.width], C = ct(D, h ? [n, r] : [r, n]);
|
|
2121
2121
|
return p.current = R, C(x - R.left);
|
|
@@ -2145,10 +2145,10 @@ var [cn, un] = an(Ce, {
|
|
|
2145
2145
|
},
|
|
2146
2146
|
onSlideMove: (x) => {
|
|
2147
2147
|
const R = A(x.clientX);
|
|
2148
|
-
|
|
2148
|
+
l == null || l(R);
|
|
2149
2149
|
},
|
|
2150
2150
|
onSlideEnd: () => {
|
|
2151
|
-
p.current = void 0,
|
|
2151
|
+
p.current = void 0, a == null || a();
|
|
2152
2152
|
},
|
|
2153
2153
|
onStepKeyDown: (x) => {
|
|
2154
2154
|
const D = sn[h ? "from-left" : "from-right"].includes(x.key);
|
|
@@ -2167,8 +2167,8 @@ var [cn, un] = an(Ce, {
|
|
|
2167
2167
|
inverted: i,
|
|
2168
2168
|
onSlideStart: o,
|
|
2169
2169
|
onSlideMove: s,
|
|
2170
|
-
onSlideEnd:
|
|
2171
|
-
onStepKeyDown:
|
|
2170
|
+
onSlideEnd: l,
|
|
2171
|
+
onStepKeyDown: a,
|
|
2172
2172
|
...d
|
|
2173
2173
|
} = e, f = T.useRef(null), u = Pe(t, f), c = T.useRef(void 0), m = !i;
|
|
2174
2174
|
function p(g) {
|
|
@@ -2202,11 +2202,11 @@ var [cn, un] = an(Ce, {
|
|
|
2202
2202
|
s == null || s(y);
|
|
2203
2203
|
},
|
|
2204
2204
|
onSlideEnd: () => {
|
|
2205
|
-
c.current = void 0,
|
|
2205
|
+
c.current = void 0, l == null || l();
|
|
2206
2206
|
},
|
|
2207
2207
|
onStepKeyDown: (g) => {
|
|
2208
2208
|
const h = sn[m ? "from-bottom" : "from-top"].includes(g.key);
|
|
2209
|
-
|
|
2209
|
+
a == null || a({ event: g, direction: h ? -1 : 1 });
|
|
2210
2210
|
}
|
|
2211
2211
|
}
|
|
2212
2212
|
)
|
|
@@ -2221,8 +2221,8 @@ var [cn, un] = an(Ce, {
|
|
|
2221
2221
|
onSlideMove: i,
|
|
2222
2222
|
onSlideEnd: o,
|
|
2223
2223
|
onHomeKeyDown: s,
|
|
2224
|
-
onEndKeyDown:
|
|
2225
|
-
onStepKeyDown:
|
|
2224
|
+
onEndKeyDown: l,
|
|
2225
|
+
onStepKeyDown: a,
|
|
2226
2226
|
...d
|
|
2227
2227
|
} = e, f = Ge(Ce, n);
|
|
2228
2228
|
return /* @__PURE__ */ N(
|
|
@@ -2231,7 +2231,7 @@ var [cn, un] = an(Ce, {
|
|
|
2231
2231
|
...d,
|
|
2232
2232
|
ref: t,
|
|
2233
2233
|
onKeyDown: me(e.onKeyDown, (u) => {
|
|
2234
|
-
u.key === "Home" ? (s(u), u.preventDefault()) : u.key === "End" ? (
|
|
2234
|
+
u.key === "Home" ? (s(u), u.preventDefault()) : u.key === "End" ? (l(u), u.preventDefault()) : rn.concat(on).includes(u.key) && (a(u), u.preventDefault());
|
|
2235
2235
|
}),
|
|
2236
2236
|
onPointerDown: me(e.onPointerDown, (u) => {
|
|
2237
2237
|
const c = u.target;
|
|
@@ -2264,16 +2264,16 @@ var [cn, un] = an(Ce, {
|
|
|
2264
2264
|
pn.displayName = fn;
|
|
2265
2265
|
var tt = "SliderRange", mn = T.forwardRef(
|
|
2266
2266
|
(e, t) => {
|
|
2267
|
-
const { __scopeSlider: n, ...r } = e, i = Ge(tt, n), o = un(tt, n), s = T.useRef(null),
|
|
2267
|
+
const { __scopeSlider: n, ...r } = e, i = Ge(tt, n), o = un(tt, n), s = T.useRef(null), l = Pe(t, s), a = i.values.length, d = i.values.map(
|
|
2268
2268
|
(c) => yn(c, i.min, i.max)
|
|
2269
|
-
), f =
|
|
2269
|
+
), f = a > 1 ? Math.min(...d) : 0, u = 100 - Math.max(...d);
|
|
2270
2270
|
return /* @__PURE__ */ N(
|
|
2271
2271
|
ze.span,
|
|
2272
2272
|
{
|
|
2273
2273
|
"data-orientation": i.orientation,
|
|
2274
2274
|
"data-disabled": i.disabled ? "" : void 0,
|
|
2275
2275
|
...r,
|
|
2276
|
-
ref:
|
|
2276
|
+
ref: l,
|
|
2277
2277
|
style: {
|
|
2278
2278
|
...e.style,
|
|
2279
2279
|
[o.startEdge]: f + "%",
|
|
@@ -2286,27 +2286,27 @@ var tt = "SliderRange", mn = T.forwardRef(
|
|
|
2286
2286
|
mn.displayName = tt;
|
|
2287
2287
|
var nt = "SliderThumb", gn = T.forwardRef(
|
|
2288
2288
|
(e, t) => {
|
|
2289
|
-
const n = Kr(e.__scopeSlider), [r, i] = T.useState(null), o = Pe(t, (
|
|
2290
|
-
() => r ? n().findIndex((
|
|
2289
|
+
const n = Kr(e.__scopeSlider), [r, i] = T.useState(null), o = Pe(t, (l) => i(l)), s = T.useMemo(
|
|
2290
|
+
() => r ? n().findIndex((l) => l.ref.current === r) : -1,
|
|
2291
2291
|
[n, r]
|
|
2292
2292
|
);
|
|
2293
2293
|
return /* @__PURE__ */ N(Ur, { ...e, ref: o, index: s });
|
|
2294
2294
|
}
|
|
2295
2295
|
), Ur = T.forwardRef(
|
|
2296
2296
|
(e, t) => {
|
|
2297
|
-
const { __scopeSlider: n, index: r, name: i, ...o } = e, s = Ge(nt, n),
|
|
2297
|
+
const { __scopeSlider: n, index: r, name: i, ...o } = e, s = Ge(nt, n), l = un(nt, n), [a, d] = T.useState(null), f = Pe(t, (A) => d(A)), u = a ? s.form || !!a.closest("form") : !0, c = Gn(a), m = s.values[r], p = m === void 0 ? 0 : yn(m, s.min, s.max), g = Xr(r, s.values.length), y = c == null ? void 0 : c[l.size], h = y ? Qr(y, p, l.direction) : 0;
|
|
2298
2298
|
return T.useEffect(() => {
|
|
2299
|
-
if (
|
|
2300
|
-
return s.thumbs.add(
|
|
2301
|
-
s.thumbs.delete(
|
|
2299
|
+
if (a)
|
|
2300
|
+
return s.thumbs.add(a), () => {
|
|
2301
|
+
s.thumbs.delete(a);
|
|
2302
2302
|
};
|
|
2303
|
-
}, [
|
|
2303
|
+
}, [a, s.thumbs]), /* @__PURE__ */ Ne(
|
|
2304
2304
|
"span",
|
|
2305
2305
|
{
|
|
2306
2306
|
style: {
|
|
2307
2307
|
transform: "var(--radix-slider-thumb-transform)",
|
|
2308
2308
|
position: "absolute",
|
|
2309
|
-
[
|
|
2309
|
+
[l.startEdge]: `calc(${p}% + ${h}px)`
|
|
2310
2310
|
},
|
|
2311
2311
|
children: [
|
|
2312
2312
|
/* @__PURE__ */ N(et.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ N(
|
|
@@ -2348,12 +2348,12 @@ var Wr = "RadioBubbleInput", hn = T.forwardRef(
|
|
|
2348
2348
|
({ __scopeSlider: e, value: t, ...n }, r) => {
|
|
2349
2349
|
const i = T.useRef(null), o = Pe(i, r), s = Un(t);
|
|
2350
2350
|
return T.useEffect(() => {
|
|
2351
|
-
const
|
|
2352
|
-
if (!
|
|
2353
|
-
const
|
|
2351
|
+
const l = i.current;
|
|
2352
|
+
if (!l) return;
|
|
2353
|
+
const a = window.HTMLInputElement.prototype, f = Object.getOwnPropertyDescriptor(a, "value").set;
|
|
2354
2354
|
if (s !== t && f) {
|
|
2355
2355
|
const u = new Event("input", { bubbles: !0 });
|
|
2356
|
-
f.call(
|
|
2356
|
+
f.call(l, t), l.dispatchEvent(u);
|
|
2357
2357
|
}
|
|
2358
2358
|
}, [s, t]), /* @__PURE__ */ N(
|
|
2359
2359
|
ze.input,
|
|
@@ -2411,7 +2411,7 @@ function to(e, t) {
|
|
|
2411
2411
|
const n = Math.pow(10, t);
|
|
2412
2412
|
return Math.round(e * n) / n;
|
|
2413
2413
|
}
|
|
2414
|
-
var vn =
|
|
2414
|
+
var vn = an, no = pn, ro = mn, oo = gn;
|
|
2415
2415
|
const io = T.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ Ne(
|
|
2416
2416
|
vn,
|
|
2417
2417
|
{
|
|
@@ -2428,9 +2428,9 @@ const io = T.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ Ne(
|
|
|
2428
2428
|
}
|
|
2429
2429
|
));
|
|
2430
2430
|
io.displayName = vn.displayName;
|
|
2431
|
-
const so = xt(null),
|
|
2431
|
+
const so = xt(null), lo = Kn();
|
|
2432
2432
|
function Sn(e) {
|
|
2433
|
-
const t = rt(so) ??
|
|
2433
|
+
const t = rt(so) ?? lo;
|
|
2434
2434
|
return En(t.subscribe, () => e(t.get()), () => e(null));
|
|
2435
2435
|
}
|
|
2436
2436
|
function wo(e) {
|