@factorialco/f0-react 1.279.0 → 1.280.0
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/experimental.d.ts +37 -28
- package/dist/experimental.js +14908 -21895
- package/dist/f0.d.ts +128 -28
- package/dist/f0.js +877 -763
- package/dist/{hooks-BPLedtdk.js → hooks-WCchcl_J.js} +37994 -30931
- package/package.json +1 -1
package/dist/f0.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { S as
|
|
2
|
-
import {
|
|
1
|
+
import { S as Ue, a as Xt, f as Re, L as Q, b as Jt, A as Zt, i as he, c as nt, d as ot, E as Qt, g as ue, e as ei, h as ti, C as ii, j as si, k as V, l as at, u as ri, G as ni, m as oi, n as qe, o as ai, p as lt, q as li, B as dt, X as ht, Y as ze, r as di, s as ct, t as hi, v as ci, w as ui, x as fi, y as gi, z as pi, D as mi, F as yi, H as Ke, I as vi, J as ee, K as Ne, M as bi, N as wi, O as xi, P as ut, Q as B, R as F, T as _i, U as Ei, V as Ci, W as Ri, Z as Ni, _ as Di, $ as Si, a0 as ft, a1 as zi, a2 as fe, a3 as gt, a4 as pt, a5 as ki, a6 as mt, a7 as yt, a8 as vt, a9 as Te, aa as Pi, ab as bt, ac as Ai, ad as Ti, ae as Oi, af as Ve, ag as De, ah as Li, ai as Mi, aj as wt, ak as Hi, al as Bi, am as xt, an as Ii, ao as _t, ap as Fi, aq as Gi, ar as Wi, as as $i, at as ji, au as Ui, av as qi, aw as Ki, ax as Et, ay as X, az as Ct, aA as Vi, aB as Yi, aC as Ye, aD as Xi, aE as Rt, aF as Ji, aG as Zi, aH as Qi, aI as es, aJ as ts, aK as is, aL as ss, aM as rs, aN as ns, aO as os, aP as as, aQ as ls } from "./hooks-WCchcl_J.js";
|
|
2
|
+
import { bg as Jr, bt as Zr, bC as Qr, aR as en, aS as tn, aT as sn, aU as rn, aV as nn, aW as on, aX as an, aY as ln, a_ as dn, a$ as hn, b0 as cn, b1 as un, b2 as fn, b3 as gn, by as pn, b5 as mn, b7 as yn, b8 as vn, b9 as bn, ba as wn, bd as xn, be as _n, bf as En, bi as Cn, b6 as Rn, bh as Nn, bc as Dn, bz as Sn, bs as zn, bn as kn, bq as Pn, bm as An, bD as Tn, bl as On, bk as Ln, aZ as Mn, b4 as Hn, bb as Bn, bj as In, bo as Fn, bu as Gn, bv as Wn, bw as $n, bE as jn, bp as Un, bx as qn, bB as Kn, br as Vn, bA as Yn } from "./hooks-WCchcl_J.js";
|
|
3
3
|
import { jsx as g, jsxs as z, Fragment as oe } from "react/jsx-runtime";
|
|
4
4
|
import * as Oe from "react";
|
|
5
|
-
import P, { PureComponent as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import './f0.css';const
|
|
5
|
+
import P, { PureComponent as ds, useState as A, forwardRef as $, useEffect as K, useMemo as te, useCallback as j, useRef as Y, createElement as Xe, useImperativeHandle as Nt, Children as hs, createContext as _e, useContext as Dt, useLayoutEffect as Je } from "react";
|
|
6
|
+
import { createPortal as cs } from "react-dom";
|
|
7
|
+
import './f0.css';const us = {
|
|
8
8
|
ad: "Andorra",
|
|
9
9
|
ae: "United Arab Emirates",
|
|
10
10
|
af: "Afghanistan",
|
|
@@ -106,8 +106,8 @@ import './f0.css';const as = {
|
|
|
106
106
|
jo: "Jordan",
|
|
107
107
|
jp: "Japan",
|
|
108
108
|
ke: "Kenya"
|
|
109
|
-
},
|
|
110
|
-
countries:
|
|
109
|
+
}, xr = {
|
|
110
|
+
countries: us,
|
|
111
111
|
approvals: {
|
|
112
112
|
history: "Approval history",
|
|
113
113
|
statuses: {
|
|
@@ -361,7 +361,7 @@ import './f0.css';const as = {
|
|
|
361
361
|
greaterThan: "It should be greater than {{min}}",
|
|
362
362
|
lessThan: "It should be less than {{max}}"
|
|
363
363
|
}
|
|
364
|
-
},
|
|
364
|
+
}, _r = [
|
|
365
365
|
"person",
|
|
366
366
|
"team",
|
|
367
367
|
"company",
|
|
@@ -376,41 +376,41 @@ function J(a) {
|
|
|
376
376
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
377
377
|
}, J(a);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function fs(a, e) {
|
|
380
380
|
if (!(a instanceof e))
|
|
381
381
|
throw new TypeError("Cannot call a class as a function");
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function gs(a, e) {
|
|
384
384
|
for (var t = 0; t < e.length; t++) {
|
|
385
385
|
var i = e[t];
|
|
386
|
-
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a,
|
|
386
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, kt(i.key), i);
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
return e &&
|
|
389
|
+
function ps(a, e, t) {
|
|
390
|
+
return e && gs(a.prototype, e), Object.defineProperty(a, "prototype", { writable: !1 }), a;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
return e = ge(e),
|
|
392
|
+
function ms(a, e, t) {
|
|
393
|
+
return e = ge(e), ys(a, St() ? Reflect.construct(e, t || [], ge(a).constructor) : e.apply(a, t));
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function ys(a, e) {
|
|
396
396
|
if (e && (J(e) === "object" || typeof e == "function"))
|
|
397
397
|
return e;
|
|
398
398
|
if (e !== void 0)
|
|
399
399
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
400
|
-
return
|
|
400
|
+
return vs(a);
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function vs(a) {
|
|
403
403
|
if (a === void 0)
|
|
404
404
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
405
405
|
return a;
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function St() {
|
|
408
408
|
try {
|
|
409
409
|
var a = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
410
410
|
}));
|
|
411
411
|
} catch {
|
|
412
412
|
}
|
|
413
|
-
return (
|
|
413
|
+
return (St = function() {
|
|
414
414
|
return !!a;
|
|
415
415
|
})();
|
|
416
416
|
}
|
|
@@ -419,24 +419,24 @@ function ge(a) {
|
|
|
419
419
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
420
420
|
}, ge(a);
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function bs(a, e) {
|
|
423
423
|
if (typeof e != "function" && e !== null)
|
|
424
424
|
throw new TypeError("Super expression must either be null or a function");
|
|
425
|
-
a.prototype = Object.create(e && e.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), Object.defineProperty(a, "prototype", { writable: !1 }), e &&
|
|
425
|
+
a.prototype = Object.create(e && e.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), Object.defineProperty(a, "prototype", { writable: !1 }), e && ke(a, e);
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
return
|
|
427
|
+
function ke(a, e) {
|
|
428
|
+
return ke = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
|
|
429
429
|
return i.__proto__ = s, i;
|
|
430
|
-
},
|
|
430
|
+
}, ke(a, e);
|
|
431
431
|
}
|
|
432
|
-
function
|
|
433
|
-
return e =
|
|
432
|
+
function zt(a, e, t) {
|
|
433
|
+
return e = kt(e), e in a ? Object.defineProperty(a, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[e] = t, a;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
436
|
-
var e =
|
|
435
|
+
function kt(a) {
|
|
436
|
+
var e = ws(a, "string");
|
|
437
437
|
return J(e) == "symbol" ? e : e + "";
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function ws(a, e) {
|
|
440
440
|
if (J(a) != "object" || !a) return a;
|
|
441
441
|
var t = a[Symbol.toPrimitive];
|
|
442
442
|
if (t !== void 0) {
|
|
@@ -448,23 +448,23 @@ function ps(a, e) {
|
|
|
448
448
|
}
|
|
449
449
|
var Ee = /* @__PURE__ */ function(a) {
|
|
450
450
|
function e() {
|
|
451
|
-
return
|
|
451
|
+
return fs(this, e), ms(this, e, arguments);
|
|
452
452
|
}
|
|
453
|
-
return
|
|
453
|
+
return bs(e, a), ps(e, [{
|
|
454
454
|
key: "render",
|
|
455
455
|
value: function() {
|
|
456
456
|
return null;
|
|
457
457
|
}
|
|
458
458
|
}]);
|
|
459
459
|
}(P.Component);
|
|
460
|
-
|
|
461
|
-
|
|
460
|
+
zt(Ee, "displayName", "ZAxis");
|
|
461
|
+
zt(Ee, "defaultProps", {
|
|
462
462
|
zAxisId: 0,
|
|
463
463
|
range: [64, 64],
|
|
464
464
|
scale: "auto",
|
|
465
465
|
type: "number"
|
|
466
466
|
});
|
|
467
|
-
var
|
|
467
|
+
var xs = ["option", "isActive"];
|
|
468
468
|
function ie() {
|
|
469
469
|
return ie = Object.assign ? Object.assign.bind() : function(a) {
|
|
470
470
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -475,9 +475,9 @@ function ie() {
|
|
|
475
475
|
return a;
|
|
476
476
|
}, ie.apply(this, arguments);
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function _s(a, e) {
|
|
479
479
|
if (a == null) return {};
|
|
480
|
-
var t =
|
|
480
|
+
var t = Es(a, e), i, s;
|
|
481
481
|
if (Object.getOwnPropertySymbols) {
|
|
482
482
|
var r = Object.getOwnPropertySymbols(a);
|
|
483
483
|
for (s = 0; s < r.length; s++)
|
|
@@ -485,7 +485,7 @@ function ys(a, e) {
|
|
|
485
485
|
}
|
|
486
486
|
return t;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Es(a, e) {
|
|
489
489
|
if (a == null) return {};
|
|
490
490
|
var t = {};
|
|
491
491
|
for (var i in a)
|
|
@@ -495,15 +495,15 @@ function vs(a, e) {
|
|
|
495
495
|
}
|
|
496
496
|
return t;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
499
|
-
var e = a.option, t = a.isActive, i =
|
|
500
|
-
return typeof e == "string" ? /* @__PURE__ */ P.createElement(
|
|
501
|
-
option: /* @__PURE__ */ P.createElement(
|
|
498
|
+
function Cs(a) {
|
|
499
|
+
var e = a.option, t = a.isActive, i = _s(a, xs);
|
|
500
|
+
return typeof e == "string" ? /* @__PURE__ */ P.createElement(Ue, ie({
|
|
501
|
+
option: /* @__PURE__ */ P.createElement(Xt, ie({
|
|
502
502
|
type: e
|
|
503
503
|
}, i)),
|
|
504
504
|
isActive: t,
|
|
505
505
|
shapeType: "symbols"
|
|
506
|
-
}, i)) : /* @__PURE__ */ P.createElement(
|
|
506
|
+
}, i)) : /* @__PURE__ */ P.createElement(Ue, ie({
|
|
507
507
|
option: e,
|
|
508
508
|
isActive: t,
|
|
509
509
|
shapeType: "symbols"
|
|
@@ -527,7 +527,7 @@ function se() {
|
|
|
527
527
|
return a;
|
|
528
528
|
}, se.apply(this, arguments);
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function Ze(a, e) {
|
|
531
531
|
var t = Object.keys(a);
|
|
532
532
|
if (Object.getOwnPropertySymbols) {
|
|
533
533
|
var i = Object.getOwnPropertySymbols(a);
|
|
@@ -540,49 +540,49 @@ function Ye(a, e) {
|
|
|
540
540
|
function H(a) {
|
|
541
541
|
for (var e = 1; e < arguments.length; e++) {
|
|
542
542
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
543
|
-
e % 2 ?
|
|
544
|
-
|
|
545
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) :
|
|
543
|
+
e % 2 ? Ze(Object(t), !0).forEach(function(i) {
|
|
544
|
+
q(a, i, t[i]);
|
|
545
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : Ze(Object(t)).forEach(function(i) {
|
|
546
546
|
Object.defineProperty(a, i, Object.getOwnPropertyDescriptor(t, i));
|
|
547
547
|
});
|
|
548
548
|
}
|
|
549
549
|
return a;
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function Rs(a, e) {
|
|
552
552
|
if (!(a instanceof e))
|
|
553
553
|
throw new TypeError("Cannot call a class as a function");
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function Qe(a, e) {
|
|
556
556
|
for (var t = 0; t < e.length; t++) {
|
|
557
557
|
var i = e[t];
|
|
558
|
-
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a,
|
|
558
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, At(i.key), i);
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
function
|
|
562
|
-
return e &&
|
|
561
|
+
function Ns(a, e, t) {
|
|
562
|
+
return e && Qe(a.prototype, e), t && Qe(a, t), Object.defineProperty(a, "prototype", { writable: !1 }), a;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
565
|
-
return e = pe(e),
|
|
564
|
+
function Ds(a, e, t) {
|
|
565
|
+
return e = pe(e), Ss(a, Pt() ? Reflect.construct(e, t || [], pe(a).constructor) : e.apply(a, t));
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function Ss(a, e) {
|
|
568
568
|
if (e && (Z(e) === "object" || typeof e == "function"))
|
|
569
569
|
return e;
|
|
570
570
|
if (e !== void 0)
|
|
571
571
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
572
|
-
return
|
|
572
|
+
return zs(a);
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function zs(a) {
|
|
575
575
|
if (a === void 0)
|
|
576
576
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
577
577
|
return a;
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function Pt() {
|
|
580
580
|
try {
|
|
581
581
|
var a = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
582
582
|
}));
|
|
583
583
|
} catch {
|
|
584
584
|
}
|
|
585
|
-
return (
|
|
585
|
+
return (Pt = function() {
|
|
586
586
|
return !!a;
|
|
587
587
|
})();
|
|
588
588
|
}
|
|
@@ -591,24 +591,24 @@ function pe(a) {
|
|
|
591
591
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
592
592
|
}, pe(a);
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function ks(a, e) {
|
|
595
595
|
if (typeof e != "function" && e !== null)
|
|
596
596
|
throw new TypeError("Super expression must either be null or a function");
|
|
597
|
-
a.prototype = Object.create(e && e.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), Object.defineProperty(a, "prototype", { writable: !1 }), e &&
|
|
597
|
+
a.prototype = Object.create(e && e.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), Object.defineProperty(a, "prototype", { writable: !1 }), e && Pe(a, e);
|
|
598
598
|
}
|
|
599
|
-
function
|
|
600
|
-
return
|
|
599
|
+
function Pe(a, e) {
|
|
600
|
+
return Pe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
|
|
601
601
|
return i.__proto__ = s, i;
|
|
602
|
-
},
|
|
602
|
+
}, Pe(a, e);
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
return e =
|
|
604
|
+
function q(a, e, t) {
|
|
605
|
+
return e = At(e), e in a ? Object.defineProperty(a, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[e] = t, a;
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
var e =
|
|
607
|
+
function At(a) {
|
|
608
|
+
var e = Ps(a, "string");
|
|
609
609
|
return Z(e) == "symbol" ? e : e + "";
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function Ps(a, e) {
|
|
612
612
|
if (Z(a) != "object" || !a) return a;
|
|
613
613
|
var t = a[Symbol.toPrimitive];
|
|
614
614
|
if (t !== void 0) {
|
|
@@ -621,46 +621,46 @@ function Ns(a, e) {
|
|
|
621
621
|
var ae = /* @__PURE__ */ function(a) {
|
|
622
622
|
function e() {
|
|
623
623
|
var t;
|
|
624
|
-
|
|
624
|
+
Rs(this, e);
|
|
625
625
|
for (var i = arguments.length, s = new Array(i), r = 0; r < i; r++)
|
|
626
626
|
s[r] = arguments[r];
|
|
627
|
-
return t =
|
|
627
|
+
return t = Ds(this, e, [].concat(s)), q(t, "state", {
|
|
628
628
|
isAnimationFinished: !1
|
|
629
|
-
}),
|
|
629
|
+
}), q(t, "handleAnimationEnd", function() {
|
|
630
630
|
t.setState({
|
|
631
631
|
isAnimationFinished: !0
|
|
632
632
|
});
|
|
633
|
-
}),
|
|
633
|
+
}), q(t, "handleAnimationStart", function() {
|
|
634
634
|
t.setState({
|
|
635
635
|
isAnimationFinished: !1
|
|
636
636
|
});
|
|
637
|
-
}),
|
|
637
|
+
}), q(t, "id", ri("recharts-scatter-")), t;
|
|
638
638
|
}
|
|
639
|
-
return
|
|
639
|
+
return ks(e, a), Ns(e, [{
|
|
640
640
|
key: "renderSymbolsStatically",
|
|
641
641
|
value: function(i) {
|
|
642
|
-
var s = this, r = this.props, n = r.shape, o = r.activeShape,
|
|
643
|
-
return i.map(function(l,
|
|
644
|
-
var f =
|
|
642
|
+
var s = this, r = this.props, n = r.shape, o = r.activeShape, d = r.activeIndex, c = Re(this.props, !1);
|
|
643
|
+
return i.map(function(l, h) {
|
|
644
|
+
var f = d === h, p = f ? o : n, m = H(H({}, c), l);
|
|
645
645
|
return /* @__PURE__ */ P.createElement(Q, se({
|
|
646
646
|
className: "recharts-scatter-symbol",
|
|
647
|
-
key: "symbol-".concat(l == null ? void 0 : l.cx, "-").concat(l == null ? void 0 : l.cy, "-").concat(l == null ? void 0 : l.size, "-").concat(
|
|
648
|
-
},
|
|
647
|
+
key: "symbol-".concat(l == null ? void 0 : l.cx, "-").concat(l == null ? void 0 : l.cy, "-").concat(l == null ? void 0 : l.size, "-").concat(h)
|
|
648
|
+
}, Jt(s.props, l, h), {
|
|
649
649
|
role: "img"
|
|
650
|
-
}), /* @__PURE__ */ P.createElement(
|
|
650
|
+
}), /* @__PURE__ */ P.createElement(Cs, se({
|
|
651
651
|
option: p,
|
|
652
652
|
isActive: f,
|
|
653
|
-
key: "symbol-".concat(
|
|
653
|
+
key: "symbol-".concat(h)
|
|
654
654
|
}, m)));
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
657
|
}, {
|
|
658
658
|
key: "renderSymbolsWithAnimation",
|
|
659
659
|
value: function() {
|
|
660
|
-
var i = this, s = this.props, r = s.points, n = s.isAnimationActive, o = s.animationBegin,
|
|
661
|
-
return /* @__PURE__ */ P.createElement(
|
|
660
|
+
var i = this, s = this.props, r = s.points, n = s.isAnimationActive, o = s.animationBegin, d = s.animationDuration, c = s.animationEasing, l = s.animationId, h = this.state.prevPoints;
|
|
661
|
+
return /* @__PURE__ */ P.createElement(Zt, {
|
|
662
662
|
begin: o,
|
|
663
|
-
duration:
|
|
663
|
+
duration: d,
|
|
664
664
|
isActive: n,
|
|
665
665
|
easing: c,
|
|
666
666
|
from: {
|
|
@@ -674,16 +674,16 @@ var ae = /* @__PURE__ */ function(a) {
|
|
|
674
674
|
onAnimationStart: this.handleAnimationStart
|
|
675
675
|
}, function(f) {
|
|
676
676
|
var p = f.t, m = r.map(function(y, b) {
|
|
677
|
-
var N =
|
|
677
|
+
var N = h && h[b];
|
|
678
678
|
if (N) {
|
|
679
|
-
var
|
|
679
|
+
var _ = he(N.cx, y.cx), C = he(N.cy, y.cy), D = he(N.size, y.size);
|
|
680
680
|
return H(H({}, y), {}, {
|
|
681
|
-
cx:
|
|
681
|
+
cx: _(p),
|
|
682
682
|
cy: C(p),
|
|
683
683
|
size: D(p)
|
|
684
684
|
});
|
|
685
685
|
}
|
|
686
|
-
var S =
|
|
686
|
+
var S = he(0, y.size);
|
|
687
687
|
return H(H({}, y), {}, {
|
|
688
688
|
size: S(p)
|
|
689
689
|
});
|
|
@@ -695,7 +695,7 @@ var ae = /* @__PURE__ */ function(a) {
|
|
|
695
695
|
key: "renderSymbols",
|
|
696
696
|
value: function() {
|
|
697
697
|
var i = this.props, s = i.points, r = i.isAnimationActive, n = this.state.prevPoints;
|
|
698
|
-
return r && s && s.length && (!n || !
|
|
698
|
+
return r && s && s.length && (!n || !nt(n, s)) ? this.renderSymbolsWithAnimation() : this.renderSymbolsStatically(s);
|
|
699
699
|
}
|
|
700
700
|
}, {
|
|
701
701
|
key: "renderErrorBar",
|
|
@@ -703,11 +703,11 @@ var ae = /* @__PURE__ */ function(a) {
|
|
|
703
703
|
var i = this.props.isAnimationActive;
|
|
704
704
|
if (i && !this.state.isAnimationFinished)
|
|
705
705
|
return null;
|
|
706
|
-
var s = this.props, r = s.points, n = s.xAxis, o = s.yAxis,
|
|
707
|
-
return c ? c.map(function(l,
|
|
706
|
+
var s = this.props, r = s.points, n = s.xAxis, o = s.yAxis, d = s.children, c = ot(d, Qt);
|
|
707
|
+
return c ? c.map(function(l, h) {
|
|
708
708
|
var f = l.props, p = f.direction, m = f.dataKey;
|
|
709
709
|
return /* @__PURE__ */ P.cloneElement(l, {
|
|
710
|
-
key: "".concat(p, "-").concat(m, "-").concat(r[
|
|
710
|
+
key: "".concat(p, "-").concat(m, "-").concat(r[h]),
|
|
711
711
|
data: r,
|
|
712
712
|
xAxis: n,
|
|
713
713
|
yAxis: o,
|
|
@@ -726,7 +726,7 @@ var ae = /* @__PURE__ */ function(a) {
|
|
|
726
726
|
}, {
|
|
727
727
|
key: "renderLine",
|
|
728
728
|
value: function() {
|
|
729
|
-
var i = this.props, s = i.points, r = i.line, n = i.lineType, o = i.lineJointType,
|
|
729
|
+
var i = this.props, s = i.points, r = i.line, n = i.lineType, o = i.lineJointType, d = Re(this.props, !1), c = Re(r, !1), l, h;
|
|
730
730
|
if (n === "joint")
|
|
731
731
|
l = s.map(function(C) {
|
|
732
732
|
return {
|
|
@@ -735,7 +735,7 @@ var ae = /* @__PURE__ */ function(a) {
|
|
|
735
735
|
};
|
|
736
736
|
});
|
|
737
737
|
else if (n === "fitting") {
|
|
738
|
-
var f =
|
|
738
|
+
var f = ei(s), p = f.xmin, m = f.xmax, y = f.a, b = f.b, N = function(D) {
|
|
739
739
|
return y * D + b;
|
|
740
740
|
};
|
|
741
741
|
l = [{
|
|
@@ -746,39 +746,39 @@ var ae = /* @__PURE__ */ function(a) {
|
|
|
746
746
|
y: N(m)
|
|
747
747
|
}];
|
|
748
748
|
}
|
|
749
|
-
var
|
|
749
|
+
var _ = H(H(H({}, d), {}, {
|
|
750
750
|
fill: "none",
|
|
751
|
-
stroke:
|
|
751
|
+
stroke: d && d.fill
|
|
752
752
|
}, c), {}, {
|
|
753
753
|
points: l
|
|
754
754
|
});
|
|
755
|
-
return /* @__PURE__ */ P.isValidElement(r) ?
|
|
755
|
+
return /* @__PURE__ */ P.isValidElement(r) ? h = /* @__PURE__ */ P.cloneElement(r, _) : ti(r) ? h = r(_) : h = /* @__PURE__ */ P.createElement(ii, se({}, _, {
|
|
756
756
|
type: o
|
|
757
757
|
})), /* @__PURE__ */ P.createElement(Q, {
|
|
758
758
|
className: "recharts-scatter-line",
|
|
759
759
|
key: "recharts-scatter-line"
|
|
760
|
-
},
|
|
760
|
+
}, h);
|
|
761
761
|
}
|
|
762
762
|
}, {
|
|
763
763
|
key: "render",
|
|
764
764
|
value: function() {
|
|
765
|
-
var i = this.props, s = i.hide, r = i.points, n = i.line, o = i.className,
|
|
765
|
+
var i = this.props, s = i.hide, r = i.points, n = i.line, o = i.className, d = i.xAxis, c = i.yAxis, l = i.left, h = i.top, f = i.width, p = i.height, m = i.id, y = i.isAnimationActive;
|
|
766
766
|
if (s || !r || !r.length)
|
|
767
767
|
return null;
|
|
768
|
-
var b = this.state.isAnimationFinished, N =
|
|
768
|
+
var b = this.state.isAnimationFinished, N = si("recharts-scatter", o), _ = d && d.allowDataOverflow, C = c && c.allowDataOverflow, D = _ || C, S = V(m) ? this.id : m;
|
|
769
769
|
return /* @__PURE__ */ P.createElement(Q, {
|
|
770
770
|
className: N,
|
|
771
771
|
clipPath: D ? "url(#clipPath-".concat(S, ")") : null
|
|
772
|
-
},
|
|
772
|
+
}, _ || C ? /* @__PURE__ */ P.createElement("defs", null, /* @__PURE__ */ P.createElement("clipPath", {
|
|
773
773
|
id: "clipPath-".concat(S)
|
|
774
774
|
}, /* @__PURE__ */ P.createElement("rect", {
|
|
775
|
-
x:
|
|
776
|
-
y: C ?
|
|
777
|
-
width:
|
|
775
|
+
x: _ ? l : l - f / 2,
|
|
776
|
+
y: C ? h : h - p / 2,
|
|
777
|
+
width: _ ? f : f * 2,
|
|
778
778
|
height: C ? p : p * 2
|
|
779
779
|
}))) : null, n && this.renderLine(), this.renderErrorBar(), /* @__PURE__ */ P.createElement(Q, {
|
|
780
780
|
key: "recharts-scatter-symbols"
|
|
781
|
-
}, this.renderSymbols()), (!y || b) &&
|
|
781
|
+
}, this.renderSymbols()), (!y || b) && at.renderCallByParent(this.props, r));
|
|
782
782
|
}
|
|
783
783
|
}], [{
|
|
784
784
|
key: "getDerivedStateFromProps",
|
|
@@ -792,9 +792,9 @@ var ae = /* @__PURE__ */ function(a) {
|
|
|
792
792
|
} : null;
|
|
793
793
|
}
|
|
794
794
|
}]);
|
|
795
|
-
}(
|
|
796
|
-
|
|
797
|
-
|
|
795
|
+
}(ds);
|
|
796
|
+
q(ae, "displayName", "Scatter");
|
|
797
|
+
q(ae, "defaultProps", {
|
|
798
798
|
xAxisId: 0,
|
|
799
799
|
yAxisId: 0,
|
|
800
800
|
zAxisId: 0,
|
|
@@ -804,19 +804,19 @@ U(ae, "defaultProps", {
|
|
|
804
804
|
data: [],
|
|
805
805
|
shape: "circle",
|
|
806
806
|
hide: !1,
|
|
807
|
-
isAnimationActive: !
|
|
807
|
+
isAnimationActive: !ni.isSsr,
|
|
808
808
|
animationBegin: 0,
|
|
809
809
|
animationDuration: 400,
|
|
810
810
|
animationEasing: "linear"
|
|
811
811
|
});
|
|
812
|
-
|
|
813
|
-
var e = a.xAxis, t = a.yAxis, i = a.zAxis, s = a.item, r = a.displayedData, n = a.xAxisTicks, o = a.yAxisTicks,
|
|
814
|
-
var S = ue(C,
|
|
812
|
+
q(ae, "getComposedData", function(a) {
|
|
813
|
+
var e = a.xAxis, t = a.yAxis, i = a.zAxis, s = a.item, r = a.displayedData, n = a.xAxisTicks, o = a.yAxisTicks, d = a.offset, c = s.props.tooltipType, l = ot(s.props.children, oi), h = V(e.dataKey) ? s.props.dataKey : e.dataKey, f = V(t.dataKey) ? s.props.dataKey : t.dataKey, p = i && i.dataKey, m = i ? i.range : Ee.defaultProps.range, y = m && m[0], b = e.scale.bandwidth ? e.scale.bandwidth() : 0, N = t.scale.bandwidth ? t.scale.bandwidth() : 0, _ = r.map(function(C, D) {
|
|
814
|
+
var S = ue(C, h), R = ue(C, f), E = !V(p) && ue(C, p) || "-", T = [{
|
|
815
815
|
name: V(e.dataKey) ? s.props.name : e.name || e.dataKey,
|
|
816
816
|
unit: e.unit || "",
|
|
817
817
|
value: S,
|
|
818
818
|
payload: C,
|
|
819
|
-
dataKey:
|
|
819
|
+
dataKey: h,
|
|
820
820
|
type: c
|
|
821
821
|
}, {
|
|
822
822
|
name: V(t.dataKey) ? s.props.name : t.name || t.dataKey,
|
|
@@ -826,7 +826,7 @@ U(ae, "getComposedData", function(a) {
|
|
|
826
826
|
dataKey: f,
|
|
827
827
|
type: c
|
|
828
828
|
}];
|
|
829
|
-
E !== "-" &&
|
|
829
|
+
E !== "-" && T.push({
|
|
830
830
|
name: i.name || i.dataKey,
|
|
831
831
|
unit: i.unit || "",
|
|
832
832
|
value: E,
|
|
@@ -834,72 +834,72 @@ U(ae, "getComposedData", function(a) {
|
|
|
834
834
|
dataKey: p,
|
|
835
835
|
type: c
|
|
836
836
|
});
|
|
837
|
-
var L =
|
|
837
|
+
var L = qe({
|
|
838
838
|
axis: e,
|
|
839
839
|
ticks: n,
|
|
840
840
|
bandSize: b,
|
|
841
841
|
entry: C,
|
|
842
842
|
index: D,
|
|
843
|
-
dataKey:
|
|
844
|
-
}),
|
|
843
|
+
dataKey: h
|
|
844
|
+
}), G = qe({
|
|
845
845
|
axis: t,
|
|
846
846
|
ticks: o,
|
|
847
847
|
bandSize: N,
|
|
848
848
|
entry: C,
|
|
849
849
|
index: D,
|
|
850
850
|
dataKey: f
|
|
851
|
-
}),
|
|
851
|
+
}), x = E !== "-" ? i.scale(E) : y, k = Math.sqrt(Math.max(x, 0) / Math.PI);
|
|
852
852
|
return H(H({}, C), {}, {
|
|
853
853
|
cx: L,
|
|
854
|
-
cy:
|
|
854
|
+
cy: G,
|
|
855
855
|
x: L - k,
|
|
856
|
-
y:
|
|
856
|
+
y: G - k,
|
|
857
857
|
xAxis: e,
|
|
858
858
|
yAxis: t,
|
|
859
859
|
zAxis: i,
|
|
860
860
|
width: 2 * k,
|
|
861
861
|
height: 2 * k,
|
|
862
|
-
size:
|
|
862
|
+
size: x,
|
|
863
863
|
node: {
|
|
864
864
|
x: S,
|
|
865
865
|
y: R,
|
|
866
866
|
z: E
|
|
867
867
|
},
|
|
868
|
-
tooltipPayload:
|
|
868
|
+
tooltipPayload: T,
|
|
869
869
|
tooltipPosition: {
|
|
870
870
|
x: L,
|
|
871
|
-
y:
|
|
871
|
+
y: G
|
|
872
872
|
},
|
|
873
873
|
payload: C
|
|
874
874
|
}, l && l[D] && l[D].props);
|
|
875
875
|
});
|
|
876
876
|
return H({
|
|
877
|
-
points:
|
|
878
|
-
},
|
|
877
|
+
points: _
|
|
878
|
+
}, d);
|
|
879
879
|
});
|
|
880
|
-
var
|
|
880
|
+
var As = ai({
|
|
881
881
|
chartName: "ComposedChart",
|
|
882
|
-
GraphicalChild: [
|
|
882
|
+
GraphicalChild: [lt, li, dt, ae],
|
|
883
883
|
axisComponents: [{
|
|
884
884
|
axisType: "xAxis",
|
|
885
|
-
AxisComp:
|
|
885
|
+
AxisComp: ht
|
|
886
886
|
}, {
|
|
887
887
|
axisType: "yAxis",
|
|
888
|
-
AxisComp:
|
|
888
|
+
AxisComp: ze
|
|
889
889
|
}, {
|
|
890
890
|
axisType: "zAxis",
|
|
891
891
|
AxisComp: Ee
|
|
892
892
|
}],
|
|
893
|
-
formatAxisMap:
|
|
893
|
+
formatAxisMap: di
|
|
894
894
|
});
|
|
895
|
-
const
|
|
895
|
+
const Ts = (a) => {
|
|
896
896
|
const e = (t) => {
|
|
897
897
|
const { cx: i, cy: s, fill: r, payload: n } = t, o = () => {
|
|
898
898
|
if (!n) return "-";
|
|
899
899
|
if (n[a] !== void 0)
|
|
900
900
|
return n[a];
|
|
901
|
-
for (const [
|
|
902
|
-
if (typeof c == "number" &&
|
|
901
|
+
for (const [d, c] of Object.entries(n))
|
|
902
|
+
if (typeof c == "number" && d !== "x")
|
|
903
903
|
return c;
|
|
904
904
|
return "-";
|
|
905
905
|
};
|
|
@@ -910,22 +910,22 @@ const Ss = (a) => {
|
|
|
910
910
|
fill: r,
|
|
911
911
|
stroke: "white",
|
|
912
912
|
strokeWidth: 2,
|
|
913
|
-
ref: (
|
|
914
|
-
|
|
913
|
+
ref: (d) => {
|
|
914
|
+
d != null && d.parentElement && d.parentElement.setAttribute("aria-label", `Data point: ${o()}`);
|
|
915
915
|
}
|
|
916
916
|
});
|
|
917
917
|
};
|
|
918
918
|
return e.displayName = `Scatter-${a}`, e;
|
|
919
|
-
},
|
|
919
|
+
}, Os = ({ dataConfig: a, data: e, xAxis: t, yAxis: i = {
|
|
920
920
|
hide: !0
|
|
921
|
-
}, label: s = !1, hideTooltip: r = !1, hideGrid: n = !1, aspect: o, legend:
|
|
922
|
-
var E,
|
|
923
|
-
const y =
|
|
924
|
-
return g(
|
|
921
|
+
}, label: s = !1, hideTooltip: r = !1, hideGrid: n = !1, aspect: o, legend: d, showValueUnderLabel: c = !1, bar: l, line: h, scatter: f, onClick: p }, m) => {
|
|
922
|
+
var E, T, L, G;
|
|
923
|
+
const y = hi(e), b = l != null && l.categories ? Array.isArray(l.categories) ? l.categories : [l.categories] : [], N = h != null && h.categories ? Array.isArray(h.categories) ? h.categories : [h.categories] : [], _ = f != null && f.categories ? Array.isArray(f.categories) ? f.categories : [f.categories] : [], C = [...b, ...N, ..._], D = Math.max(...y.flatMap((x) => C.map((k) => ci(i != null && i.tickFormatter ? i.tickFormatter(`${x[k]}`) : `${x[k]}`)))), S = [l, h, f].filter((x) => (x == null ? void 0 : x.axisPosition) === "left"), R = [l, h, f].filter((x) => (x == null ? void 0 : x.axisPosition) === "right");
|
|
924
|
+
return g(ui, {
|
|
925
925
|
config: a,
|
|
926
926
|
ref: m,
|
|
927
927
|
aspect: o,
|
|
928
|
-
children: z(
|
|
928
|
+
children: z(As, {
|
|
929
929
|
accessibilityLayer: !0,
|
|
930
930
|
data: y,
|
|
931
931
|
margin: {
|
|
@@ -935,52 +935,52 @@ const Ss = (a) => {
|
|
|
935
935
|
bottom: c ? 24 : 12
|
|
936
936
|
},
|
|
937
937
|
stackOffset: void 0,
|
|
938
|
-
onClick: (
|
|
939
|
-
if (!p || !
|
|
938
|
+
onClick: (x) => {
|
|
939
|
+
if (!p || !x.activeLabel || !x.activePayload)
|
|
940
940
|
return;
|
|
941
941
|
const k = {
|
|
942
|
-
label:
|
|
942
|
+
label: x.activeLabel,
|
|
943
943
|
values: {}
|
|
944
944
|
};
|
|
945
|
-
for (const le of
|
|
945
|
+
for (const le of x.activePayload)
|
|
946
946
|
k.values[le.name] = le.value;
|
|
947
947
|
p(k);
|
|
948
948
|
},
|
|
949
|
-
children: [!r && g(
|
|
950
|
-
...
|
|
951
|
-
content: g(
|
|
949
|
+
children: [!r && g(fi, {
|
|
950
|
+
...gi(),
|
|
951
|
+
content: g(pi, {
|
|
952
952
|
yAxisFormatter: i.tickFormatter
|
|
953
953
|
})
|
|
954
|
-
}), !n && g(
|
|
955
|
-
...
|
|
956
|
-
}), S.length > 0 && g(
|
|
957
|
-
...
|
|
954
|
+
}), !n && g(mi, {
|
|
955
|
+
...yi()
|
|
956
|
+
}), S.length > 0 && g(ze, {
|
|
957
|
+
...Ke(i),
|
|
958
958
|
tick: !0,
|
|
959
959
|
width: i.width ?? D + 20 + (R.length > 0 && ((E = S[0]) != null && E.axisLabel) ? 20 : 0),
|
|
960
|
-
hide: i.hide || S.some((
|
|
961
|
-
label: (
|
|
960
|
+
hide: i.hide || S.some((x) => x == null ? void 0 : x.hideAxis),
|
|
961
|
+
label: (T = S[0]) != null && T.axisLabel ? {
|
|
962
962
|
value: S[0].axisLabel,
|
|
963
963
|
angle: -90,
|
|
964
964
|
position: "insideLeft"
|
|
965
965
|
} : void 0
|
|
966
|
-
}), R.length > 0 && g(
|
|
967
|
-
...
|
|
966
|
+
}), R.length > 0 && g(ze, {
|
|
967
|
+
...Ke(i),
|
|
968
968
|
yAxisId: "right",
|
|
969
969
|
orientation: "right",
|
|
970
970
|
tick: !0,
|
|
971
971
|
width: i.width ?? D + 20 + (S.length > 0 && ((L = R[0]) != null && L.axisLabel) ? 20 : 0),
|
|
972
|
-
hide: i.hide || R.some((
|
|
973
|
-
label: (
|
|
972
|
+
hide: i.hide || R.some((x) => x == null ? void 0 : x.hideAxis),
|
|
973
|
+
label: (G = R[0]) != null && G.axisLabel ? {
|
|
974
974
|
value: R[0].axisLabel,
|
|
975
975
|
angle: 90,
|
|
976
976
|
position: "insideRight"
|
|
977
977
|
} : void 0
|
|
978
|
-
}), g(
|
|
979
|
-
...
|
|
978
|
+
}), g(ht, {
|
|
979
|
+
...vi(t),
|
|
980
980
|
hide: t == null ? void 0 : t.hide,
|
|
981
|
-
tick: c ? (
|
|
982
|
-
var
|
|
983
|
-
const { x: k, y: le, payload:
|
|
981
|
+
tick: c ? (x) => {
|
|
982
|
+
var $e, je;
|
|
983
|
+
const { x: k, y: le, payload: Ge } = x, We = (($e = e.find((Yt) => Yt.label === Ge.value)) == null ? void 0 : $e.values) || "", de = Object.keys(We).length === 1 ? (je = Object.values(We)) == null ? void 0 : je[0] : void 0, Vt = de !== void 0 && i.tickFormatter ? i.tickFormatter(`${de}`) : de.toLocaleString();
|
|
984
984
|
return z("g", {
|
|
985
985
|
transform: `translate(${k},${le})`,
|
|
986
986
|
children: [g("text", {
|
|
@@ -989,46 +989,46 @@ const Ss = (a) => {
|
|
|
989
989
|
dy: 12,
|
|
990
990
|
textAnchor: "middle",
|
|
991
991
|
className: "text-sm font-medium !text-f1-foreground-secondary",
|
|
992
|
-
children:
|
|
993
|
-
}), !!
|
|
992
|
+
children: Ge.value
|
|
993
|
+
}), !!de && g("text", {
|
|
994
994
|
x: 0,
|
|
995
995
|
y: 0,
|
|
996
996
|
dy: 28,
|
|
997
997
|
textAnchor: "middle",
|
|
998
998
|
className: "!fill-f1-foreground text-sm font-medium",
|
|
999
|
-
children:
|
|
999
|
+
children: Vt
|
|
1000
1000
|
})]
|
|
1001
1001
|
});
|
|
1002
1002
|
} : void 0
|
|
1003
|
-
}), b.map((
|
|
1003
|
+
}), b.map((x, k) => g(dt, {
|
|
1004
1004
|
isAnimationActive: !1,
|
|
1005
|
-
dataKey: String(
|
|
1006
|
-
fill: a[
|
|
1005
|
+
dataKey: String(x),
|
|
1006
|
+
fill: a[x].color ? ee(a[x].color) : Ne(k),
|
|
1007
1007
|
radius: 4,
|
|
1008
1008
|
maxBarSize: 32,
|
|
1009
|
-
children: s && g(
|
|
1009
|
+
children: s && g(at, {
|
|
1010
1010
|
position: "top",
|
|
1011
1011
|
offset: 10,
|
|
1012
1012
|
className: "fill-f1-foreground",
|
|
1013
1013
|
fontSize: 12
|
|
1014
|
-
}, `label-${String(
|
|
1015
|
-
}, `bar-${String(
|
|
1016
|
-
type: (
|
|
1017
|
-
dataKey: String(
|
|
1018
|
-
stroke: a[
|
|
1014
|
+
}, `label-${String(x)}`)
|
|
1015
|
+
}, `bar-${String(x)}`)), N.map((x, k) => g(lt, {
|
|
1016
|
+
type: (h == null ? void 0 : h.lineType) ?? "natural",
|
|
1017
|
+
dataKey: String(x),
|
|
1018
|
+
stroke: a[x].color ? ee(a[x].color) : Ne(b.length + k),
|
|
1019
1019
|
strokeWidth: 2,
|
|
1020
|
-
dot: (
|
|
1020
|
+
dot: (h == null ? void 0 : h.dot) ?? !1,
|
|
1021
1021
|
isAnimationActive: !1,
|
|
1022
|
-
yAxisId: (
|
|
1023
|
-
}, `line-${String(
|
|
1024
|
-
dataKey: String(
|
|
1025
|
-
fill: a[
|
|
1022
|
+
yAxisId: (h == null ? void 0 : h.axisPosition) === "right" ? "right" : void 0
|
|
1023
|
+
}, `line-${String(x)}`)), _.map((x, k) => g(ae, {
|
|
1024
|
+
dataKey: String(x),
|
|
1025
|
+
fill: a[x].color ? ee(a[x].color) : Ne(b.length + N.length + k),
|
|
1026
1026
|
r: 4,
|
|
1027
1027
|
isAnimationActive: !1,
|
|
1028
1028
|
yAxisId: (f == null ? void 0 : f.axisPosition) === "right" ? "right" : void 0,
|
|
1029
|
-
shape:
|
|
1030
|
-
}, `scatter-${String(
|
|
1031
|
-
content: g(
|
|
1029
|
+
shape: Ts(String(x))
|
|
1030
|
+
}, `scatter-${String(x)}`)), d && g(bi, {
|
|
1031
|
+
content: g(wi, {
|
|
1032
1032
|
nameKey: "label"
|
|
1033
1033
|
}),
|
|
1034
1034
|
align: "center",
|
|
@@ -1038,30 +1038,30 @@ const Ss = (a) => {
|
|
|
1038
1038
|
})]
|
|
1039
1039
|
})
|
|
1040
1040
|
});
|
|
1041
|
-
},
|
|
1042
|
-
var
|
|
1041
|
+
}, Ls = ct(Os);
|
|
1042
|
+
var Le = "Progress", Me = 100, [Ms, Er] = xi(Le), [Hs, Bs] = Ms(Le), Tt = Oe.forwardRef(
|
|
1043
1043
|
(a, e) => {
|
|
1044
1044
|
const {
|
|
1045
1045
|
__scopeProgress: t,
|
|
1046
1046
|
value: i = null,
|
|
1047
1047
|
max: s,
|
|
1048
|
-
getValueLabel: r =
|
|
1048
|
+
getValueLabel: r = Is,
|
|
1049
1049
|
...n
|
|
1050
1050
|
} = a;
|
|
1051
|
-
(s || s === 0) && !
|
|
1052
|
-
const o =
|
|
1053
|
-
i !== null && !
|
|
1054
|
-
const
|
|
1055
|
-
return /* @__PURE__ */ g(
|
|
1056
|
-
|
|
1051
|
+
(s || s === 0) && !et(s) && console.error(Fs(`${s}`, "Progress"));
|
|
1052
|
+
const o = et(s) ? s : Me;
|
|
1053
|
+
i !== null && !tt(i, o) && console.error(Gs(`${i}`, "Progress"));
|
|
1054
|
+
const d = tt(i, o) ? i : null, c = me(d) ? r(d, o) : void 0;
|
|
1055
|
+
return /* @__PURE__ */ g(Hs, { scope: t, value: d, max: o, children: /* @__PURE__ */ g(
|
|
1056
|
+
ut.div,
|
|
1057
1057
|
{
|
|
1058
1058
|
"aria-valuemax": o,
|
|
1059
1059
|
"aria-valuemin": 0,
|
|
1060
|
-
"aria-valuenow": me(
|
|
1060
|
+
"aria-valuenow": me(d) ? d : void 0,
|
|
1061
1061
|
"aria-valuetext": c,
|
|
1062
1062
|
role: "progressbar",
|
|
1063
|
-
"data-state":
|
|
1064
|
-
"data-value":
|
|
1063
|
+
"data-state": Mt(d, o),
|
|
1064
|
+
"data-value": d ?? void 0,
|
|
1065
1065
|
"data-max": o,
|
|
1066
1066
|
...n,
|
|
1067
1067
|
ref: e
|
|
@@ -1069,14 +1069,14 @@ var Te = "Progress", Le = 100, [Ps, pr] = yi(Te), [As, Os] = Ps(Te), zt = Oe.for
|
|
|
1069
1069
|
) });
|
|
1070
1070
|
}
|
|
1071
1071
|
);
|
|
1072
|
-
|
|
1073
|
-
var
|
|
1072
|
+
Tt.displayName = Le;
|
|
1073
|
+
var Ot = "ProgressIndicator", Lt = Oe.forwardRef(
|
|
1074
1074
|
(a, e) => {
|
|
1075
|
-
const { __scopeProgress: t, ...i } = a, s =
|
|
1075
|
+
const { __scopeProgress: t, ...i } = a, s = Bs(Ot, t);
|
|
1076
1076
|
return /* @__PURE__ */ g(
|
|
1077
|
-
|
|
1077
|
+
ut.div,
|
|
1078
1078
|
{
|
|
1079
|
-
"data-state":
|
|
1079
|
+
"data-state": Mt(s.value, s.max),
|
|
1080
1080
|
"data-value": s.value ?? void 0,
|
|
1081
1081
|
"data-max": s.max,
|
|
1082
1082
|
...i,
|
|
@@ -1085,39 +1085,39 @@ var kt = "ProgressIndicator", Pt = Oe.forwardRef(
|
|
|
1085
1085
|
);
|
|
1086
1086
|
}
|
|
1087
1087
|
);
|
|
1088
|
-
|
|
1089
|
-
function
|
|
1088
|
+
Lt.displayName = Ot;
|
|
1089
|
+
function Is(a, e) {
|
|
1090
1090
|
return `${Math.round(a / e * 100)}%`;
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function Mt(a, e) {
|
|
1093
1093
|
return a == null ? "indeterminate" : a === e ? "complete" : "loading";
|
|
1094
1094
|
}
|
|
1095
1095
|
function me(a) {
|
|
1096
1096
|
return typeof a == "number";
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function et(a) {
|
|
1099
1099
|
return me(a) && !isNaN(a) && a > 0;
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function tt(a, e) {
|
|
1102
1102
|
return me(a) && !isNaN(a) && a <= e && a >= 0;
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1105
|
-
return `Invalid prop \`max\` of value \`${a}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${
|
|
1104
|
+
function Fs(a, e) {
|
|
1105
|
+
return `Invalid prop \`max\` of value \`${a}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Me}\`.`;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function Gs(a, e) {
|
|
1108
1108
|
return `Invalid prop \`value\` of value \`${a}\` supplied to \`${e}\`. The \`value\` prop must be:
|
|
1109
1109
|
- a positive number
|
|
1110
|
-
- less than the value passed to \`max\` (or ${
|
|
1110
|
+
- less than the value passed to \`max\` (or ${Me} if no \`max\` prop is set)
|
|
1111
1111
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
1112
1112
|
|
|
1113
1113
|
Defaulting to \`null\`.`;
|
|
1114
1114
|
}
|
|
1115
|
-
var
|
|
1116
|
-
const
|
|
1115
|
+
var Ht = Tt, Ws = Lt;
|
|
1116
|
+
const Bt = Oe.forwardRef(({ className: a, value: e, ...t }, i) => g(Ht, {
|
|
1117
1117
|
ref: i,
|
|
1118
|
-
className:
|
|
1118
|
+
className: B("relative h-2 w-full overflow-hidden rounded-full bg-f1-background-secondary", a),
|
|
1119
1119
|
...t,
|
|
1120
|
-
children: g(
|
|
1120
|
+
children: g(Ws, {
|
|
1121
1121
|
className: "h-full w-full flex-1 transition-all",
|
|
1122
1122
|
style: {
|
|
1123
1123
|
backgroundColor: t.color,
|
|
@@ -1125,15 +1125,15 @@ const Tt = Oe.forwardRef(({ className: a, value: e, ...t }, i) => g(Ot, {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
})
|
|
1127
1127
|
}));
|
|
1128
|
-
|
|
1129
|
-
const
|
|
1128
|
+
Bt.displayName = Ht.displayName;
|
|
1129
|
+
const $s = ({ value: a, max: e = 100, label: t, color: i }, s) => {
|
|
1130
1130
|
const r = i ? ee(i) : ee("categorical-1"), n = a / e * 100;
|
|
1131
1131
|
return z("div", {
|
|
1132
1132
|
className: "flex items-center space-x-2",
|
|
1133
1133
|
"aria-live": "polite",
|
|
1134
1134
|
children: [g("div", {
|
|
1135
1135
|
className: "flex-grow",
|
|
1136
|
-
children: g(
|
|
1136
|
+
children: g(Bt, {
|
|
1137
1137
|
color: r,
|
|
1138
1138
|
value: n,
|
|
1139
1139
|
className: "w-full",
|
|
@@ -1147,78 +1147,78 @@ const Bs = ({ value: a, max: e = 100, label: t, color: i }, s) => {
|
|
|
1147
1147
|
children: t
|
|
1148
1148
|
})]
|
|
1149
1149
|
});
|
|
1150
|
-
},
|
|
1150
|
+
}, js = ct($s), Cr = F(
|
|
1151
1151
|
{
|
|
1152
1152
|
name: "AreaChart",
|
|
1153
1153
|
type: "info"
|
|
1154
1154
|
},
|
|
1155
|
-
|
|
1156
|
-
),
|
|
1155
|
+
Di
|
|
1156
|
+
), Rr = F(
|
|
1157
1157
|
{
|
|
1158
1158
|
name: "BarChart",
|
|
1159
1159
|
type: "info"
|
|
1160
1160
|
},
|
|
1161
|
-
|
|
1162
|
-
),
|
|
1161
|
+
_i
|
|
1162
|
+
), Nr = F(
|
|
1163
1163
|
{
|
|
1164
1164
|
name: "CategoryBarChart",
|
|
1165
1165
|
type: "info"
|
|
1166
1166
|
},
|
|
1167
|
-
|
|
1168
|
-
),
|
|
1167
|
+
Ei
|
|
1168
|
+
), Dr = F(
|
|
1169
1169
|
{
|
|
1170
1170
|
name: "LineChart",
|
|
1171
1171
|
type: "info"
|
|
1172
1172
|
},
|
|
1173
|
-
|
|
1174
|
-
),
|
|
1173
|
+
Ci
|
|
1174
|
+
), Sr = F(
|
|
1175
1175
|
{
|
|
1176
1176
|
name: "PieChart",
|
|
1177
1177
|
type: "info"
|
|
1178
1178
|
},
|
|
1179
|
-
|
|
1180
|
-
),
|
|
1179
|
+
Ri
|
|
1180
|
+
), zr = F(
|
|
1181
1181
|
{
|
|
1182
1182
|
name: "VerticalBarChart",
|
|
1183
1183
|
type: "info"
|
|
1184
1184
|
},
|
|
1185
|
-
|
|
1186
|
-
),
|
|
1185
|
+
Ni
|
|
1186
|
+
), kr = F(
|
|
1187
1187
|
{
|
|
1188
1188
|
name: "ProgressBarChart",
|
|
1189
1189
|
type: "info"
|
|
1190
1190
|
},
|
|
1191
|
-
|
|
1192
|
-
),
|
|
1191
|
+
js
|
|
1192
|
+
), Pr = F(
|
|
1193
1193
|
{
|
|
1194
1194
|
name: "ComboChart",
|
|
1195
1195
|
type: "info"
|
|
1196
1196
|
},
|
|
1197
|
-
|
|
1198
|
-
),
|
|
1197
|
+
Ls
|
|
1198
|
+
), Ar = Si, Tr = ft, Or = ["default", "outline", "neutral"], Lr = ft, Mr = ["sm", "md", "lg"], Hr = zi, Ae = ({ count: a, list: e }) => {
|
|
1199
1199
|
const [t, i] = A(!1), s = g(fe, {
|
|
1200
1200
|
label: `+${a}`
|
|
1201
1201
|
});
|
|
1202
|
-
return e != null && e.length ? z(
|
|
1202
|
+
return e != null && e.length ? z(gt, {
|
|
1203
1203
|
open: t,
|
|
1204
1204
|
onOpenChange: i,
|
|
1205
|
-
children: [g(
|
|
1205
|
+
children: [g(pt, {
|
|
1206
1206
|
asChild: !0,
|
|
1207
1207
|
children: g("button", {
|
|
1208
|
-
className:
|
|
1208
|
+
className: ki("inline-flex flex-shrink-0 items-center"),
|
|
1209
1209
|
children: s
|
|
1210
1210
|
})
|
|
1211
|
-
}), g(
|
|
1211
|
+
}), g(mt, {
|
|
1212
1212
|
className: "rounded-md border border-solid border-f1-border-secondary p-1 shadow-md",
|
|
1213
1213
|
align: "end",
|
|
1214
|
-
children: z(
|
|
1214
|
+
children: z(yt, {
|
|
1215
1215
|
className: "[*[data-state=visible]_div]:bg-f1-background flex max-h-[172px] flex-col",
|
|
1216
1216
|
children: [e.map((r, n) => g("div", {
|
|
1217
1217
|
className: "flex w-[220px] min-w-0 items-center gap-1.5 px-2 py-1 [&:first-child]:pt-2 [&:last-child]:pb-2",
|
|
1218
1218
|
children: g(fe, {
|
|
1219
1219
|
...r
|
|
1220
1220
|
})
|
|
1221
|
-
}, n)), g(
|
|
1221
|
+
}, n)), g(vt, {
|
|
1222
1222
|
orientation: "vertical",
|
|
1223
1223
|
className: "[&_div]:bg-f1-background"
|
|
1224
1224
|
})]
|
|
@@ -1226,19 +1226,19 @@ const Bs = ({ value: a, max: e = 100, label: t, color: i }, s) => {
|
|
|
1226
1226
|
})]
|
|
1227
1227
|
}) : s;
|
|
1228
1228
|
};
|
|
1229
|
-
|
|
1230
|
-
const
|
|
1229
|
+
Ae.displayName = "ChipCounter";
|
|
1230
|
+
const It = ({ chips: a, max: e = 4, remainingCount: t, layout: i = "compact" }) => {
|
|
1231
1231
|
if (i === "fill")
|
|
1232
|
-
return g(
|
|
1232
|
+
return g(Pi, {
|
|
1233
1233
|
items: a,
|
|
1234
|
-
renderListItem: (
|
|
1235
|
-
...
|
|
1234
|
+
renderListItem: (d) => g(fe, {
|
|
1235
|
+
...d
|
|
1236
1236
|
}),
|
|
1237
1237
|
renderDropdownItem: () => null,
|
|
1238
1238
|
forceShowingOverflowIndicator: t !== void 0,
|
|
1239
|
-
renderOverflowIndicator: (
|
|
1240
|
-
count: (t ?? 0) +
|
|
1241
|
-
list: t ? void 0 : a.slice(a.length -
|
|
1239
|
+
renderOverflowIndicator: (d) => g(Ae, {
|
|
1240
|
+
count: (t ?? 0) + d,
|
|
1241
|
+
list: t ? void 0 : a.slice(a.length - d)
|
|
1242
1242
|
}),
|
|
1243
1243
|
overflowIndicatorWithPopover: !1,
|
|
1244
1244
|
className: "flex-1"
|
|
@@ -1246,32 +1246,32 @@ const Lt = ({ chips: a, max: e = 4, remainingCount: t, layout: i = "compact" })
|
|
|
1246
1246
|
const s = a.slice(0, e), r = a.slice(e), n = t ?? a.length - e, o = n > 0;
|
|
1247
1247
|
return z("div", {
|
|
1248
1248
|
className: "flex items-center gap-2",
|
|
1249
|
-
children: [s.map((
|
|
1250
|
-
...
|
|
1251
|
-
}, c)), o && g(
|
|
1249
|
+
children: [s.map((d, c) => g(fe, {
|
|
1250
|
+
...d
|
|
1251
|
+
}, c)), o && g(Ae, {
|
|
1252
1252
|
count: n,
|
|
1253
1253
|
list: t ? void 0 : r
|
|
1254
1254
|
})]
|
|
1255
1255
|
});
|
|
1256
1256
|
};
|
|
1257
|
-
|
|
1258
|
-
const
|
|
1259
|
-
const [c, l] = A(""), [
|
|
1260
|
-
|
|
1257
|
+
It.displayName = "F0ChipList";
|
|
1258
|
+
const Br = Te("F0ChipList", It), Ft = $(({ value: a, onDateChange: e, granularity: t, onOpenChange: i, minDate: s, maxDate: r, onClear: n, ...o }, d) => {
|
|
1259
|
+
const [c, l] = A(""), [h, f] = A(!1), p = bt();
|
|
1260
|
+
K(() => {
|
|
1261
1261
|
l(t.toString(a == null ? void 0 : a.value, p));
|
|
1262
1262
|
}, [a, t, p]);
|
|
1263
|
-
const m = (
|
|
1263
|
+
const m = (_) => Oi(_, t, {
|
|
1264
1264
|
minDate: s,
|
|
1265
1265
|
maxDate: r
|
|
1266
|
-
}), y = (
|
|
1267
|
-
if (
|
|
1266
|
+
}), y = (_, C) => {
|
|
1267
|
+
if (_ === "") {
|
|
1268
1268
|
e == null || e({
|
|
1269
1269
|
value: void 0,
|
|
1270
1270
|
granularity: C.key
|
|
1271
1271
|
}), f(o.required ?? !1);
|
|
1272
1272
|
return;
|
|
1273
1273
|
}
|
|
1274
|
-
const D = C.toRange(C.fromString(
|
|
1274
|
+
const D = C.toRange(C.fromString(_, p));
|
|
1275
1275
|
D && m(D == null ? void 0 : D.from) && m(D == null ? void 0 : D.to) ? (e == null || e({
|
|
1276
1276
|
value: D,
|
|
1277
1277
|
granularity: C.key
|
|
@@ -1280,78 +1280,78 @@ const kr = Ae("F0ChipList", Lt), Mt = K(({ value: a, onDateChange: e, granularit
|
|
|
1280
1280
|
y(c, t);
|
|
1281
1281
|
};
|
|
1282
1282
|
return g(oe, {
|
|
1283
|
-
children: g(
|
|
1283
|
+
children: g(Ai, {
|
|
1284
1284
|
...o,
|
|
1285
|
-
icon:
|
|
1286
|
-
ref:
|
|
1285
|
+
icon: Ti,
|
|
1286
|
+
ref: d,
|
|
1287
1287
|
onFocus: () => i == null ? void 0 : i(!0),
|
|
1288
1288
|
onClear: () => {
|
|
1289
1289
|
n == null || n(), l(""), y("", t);
|
|
1290
1290
|
},
|
|
1291
|
-
onKeyDown: (
|
|
1292
|
-
|
|
1291
|
+
onKeyDown: (_) => {
|
|
1292
|
+
_.key === "Enter" && b();
|
|
1293
1293
|
},
|
|
1294
1294
|
type: "text",
|
|
1295
|
-
onChange: (
|
|
1296
|
-
l(
|
|
1295
|
+
onChange: (_) => {
|
|
1296
|
+
l(_);
|
|
1297
1297
|
},
|
|
1298
|
-
error:
|
|
1298
|
+
error: h || o.error,
|
|
1299
1299
|
onBlur: b,
|
|
1300
1300
|
value: c,
|
|
1301
1301
|
onClickContent: () => i == null ? void 0 : i(!0)
|
|
1302
1302
|
})
|
|
1303
1303
|
});
|
|
1304
1304
|
});
|
|
1305
|
-
|
|
1306
|
-
function
|
|
1307
|
-
const [
|
|
1308
|
-
|
|
1309
|
-
|
|
1305
|
+
Ft.displayName = "DateInput";
|
|
1306
|
+
function Us({ onChange: a, value: e, presets: t = [], granularities: i = ["day"], minDate: s, maxDate: r, open: n = !1, ...o }) {
|
|
1307
|
+
const [d, c] = A(), [l, h] = A(n);
|
|
1308
|
+
K(() => {
|
|
1309
|
+
h(n);
|
|
1310
1310
|
}, [n]);
|
|
1311
|
-
const f =
|
|
1311
|
+
const f = bt(), p = te(() => i[0] ?? "day", [i]), m = j((R) => {
|
|
1312
1312
|
const E = R || p;
|
|
1313
|
-
if (!
|
|
1313
|
+
if (!Ve[E])
|
|
1314
1314
|
throw new Error(`Invalid granularity ${E}`);
|
|
1315
1315
|
return {
|
|
1316
|
-
...
|
|
1316
|
+
...Ve[E],
|
|
1317
1317
|
key: E
|
|
1318
1318
|
};
|
|
1319
|
-
}, [p]), y =
|
|
1320
|
-
var
|
|
1319
|
+
}, [p]), y = j((R) => {
|
|
1320
|
+
var T;
|
|
1321
1321
|
if (!R)
|
|
1322
1322
|
return;
|
|
1323
1323
|
const E = m(R == null ? void 0 : R.granularity);
|
|
1324
1324
|
return R ? {
|
|
1325
|
-
value: E.toRange(E.calendarMode === "range" ? R.value : ((
|
|
1325
|
+
value: E.toRange(E.calendarMode === "range" ? R.value : ((T = R.value) == null ? void 0 : T.from) ?? void 0),
|
|
1326
1326
|
granularity: R.granularity
|
|
1327
1327
|
} : void 0;
|
|
1328
|
-
}, [m]), b = te(() => m(
|
|
1329
|
-
|
|
1328
|
+
}, [m]), b = te(() => m(d == null ? void 0 : d.granularity), [d == null ? void 0 : d.granularity, m]);
|
|
1329
|
+
K(() => {
|
|
1330
1330
|
const R = y(e);
|
|
1331
|
-
De(
|
|
1331
|
+
De(d, R) || c(R);
|
|
1332
1332
|
}, [e]);
|
|
1333
1333
|
const N = (R) => {
|
|
1334
|
-
const E = y(R), L = m(E == null ? void 0 : E.granularity).calendarMode !== "range" && (E == null ? void 0 : E.granularity) === (
|
|
1335
|
-
|
|
1336
|
-
},
|
|
1334
|
+
const E = y(R), L = m(E == null ? void 0 : E.granularity).calendarMode !== "range" && (E == null ? void 0 : E.granularity) === (d == null ? void 0 : d.granularity) && !De(E, d);
|
|
1335
|
+
_(E), L && h(!1);
|
|
1336
|
+
}, _ = (R) => {
|
|
1337
1337
|
const E = y(R);
|
|
1338
|
-
if (c(E), !De(E,
|
|
1339
|
-
const
|
|
1340
|
-
a == null || a(E,
|
|
1338
|
+
if (c(E), !De(E, d)) {
|
|
1339
|
+
const T = m(E == null ? void 0 : E.granularity);
|
|
1340
|
+
a == null || a(E, T.toString(E == null ? void 0 : E.value, f));
|
|
1341
1341
|
}
|
|
1342
1342
|
}, C = (R) => {
|
|
1343
1343
|
var E;
|
|
1344
|
-
|
|
1344
|
+
h(R), (E = o.onOpenChange) == null || E.call(o, R);
|
|
1345
1345
|
}, D = te(() => t.filter((R) => i.includes(R.granularity)), [t, i]), S = Y(null);
|
|
1346
|
-
return
|
|
1346
|
+
return K(() => {
|
|
1347
1347
|
l && S.current && requestAnimationFrame(() => {
|
|
1348
1348
|
var R;
|
|
1349
1349
|
(R = S.current) == null || R.focus();
|
|
1350
1350
|
});
|
|
1351
|
-
}, [l]), g(
|
|
1351
|
+
}, [l]), g(Li, {
|
|
1352
1352
|
hideCalendarInput: !0,
|
|
1353
1353
|
onSelect: N,
|
|
1354
|
-
value:
|
|
1354
|
+
value: d,
|
|
1355
1355
|
presets: D,
|
|
1356
1356
|
granularities: i,
|
|
1357
1357
|
minDate: s,
|
|
@@ -1359,39 +1359,151 @@ function Fs({ onChange: a, value: e, presets: t = [], granularities: i = ["day"]
|
|
|
1359
1359
|
open: l,
|
|
1360
1360
|
onOpenChange: C,
|
|
1361
1361
|
asChild: !0,
|
|
1362
|
-
children: g(
|
|
1362
|
+
children: g(Ft, {
|
|
1363
1363
|
ref: S,
|
|
1364
1364
|
...o,
|
|
1365
|
-
value:
|
|
1365
|
+
value: d,
|
|
1366
1366
|
granularity: b,
|
|
1367
|
-
onDateChange:
|
|
1367
|
+
onDateChange: _
|
|
1368
1368
|
})
|
|
1369
1369
|
});
|
|
1370
1370
|
}
|
|
1371
|
-
const
|
|
1371
|
+
const Ir = Mi, Fr = Te(
|
|
1372
1372
|
"F0DatePicker",
|
|
1373
|
-
|
|
1374
|
-
),
|
|
1373
|
+
Us
|
|
1374
|
+
), Se = wt({
|
|
1375
|
+
base: "text-base text-f1-foreground",
|
|
1376
|
+
variants: {
|
|
1377
|
+
variant: {
|
|
1378
|
+
// -- PUBLIC VARIANTS
|
|
1379
|
+
// Heading
|
|
1380
|
+
heading: "text-lg font-semibold",
|
|
1381
|
+
// Body
|
|
1382
|
+
body: "",
|
|
1383
|
+
description: "text-f1-foreground-secondary",
|
|
1384
|
+
small: "text-sm font-medium text-f1-foreground-secondary",
|
|
1385
|
+
inverse: "text-f1-foreground-inverse",
|
|
1386
|
+
code: "text-f1-foreground-secondary",
|
|
1387
|
+
// Label
|
|
1388
|
+
label: "font-medium",
|
|
1389
|
+
// -- PRIVATE VARIANTS
|
|
1390
|
+
// Heading
|
|
1391
|
+
"heading-large": "text-2xl font-semibold",
|
|
1392
|
+
// Label
|
|
1393
|
+
"label-input": "font-medium text-f1-foreground-secondary",
|
|
1394
|
+
// Semantic text
|
|
1395
|
+
selected: "font-medium text-f1-foreground-selected",
|
|
1396
|
+
warning: "text-f1-foreground-warning",
|
|
1397
|
+
critical: "text-f1-foreground-critical",
|
|
1398
|
+
positive: "text-f1-foreground-positive",
|
|
1399
|
+
info: "text-f1-foreground-info",
|
|
1400
|
+
"warning-strong": "font-semibold text-f1-foreground-warning",
|
|
1401
|
+
"critical-strong": "font-semibold text-f1-foreground-critical",
|
|
1402
|
+
"positive-strong": "font-semibold text-f1-foreground-positive",
|
|
1403
|
+
"info-strong": "font-semibold text-f1-foreground-info"
|
|
1404
|
+
},
|
|
1405
|
+
align: {
|
|
1406
|
+
left: "text-left",
|
|
1407
|
+
center: "text-center",
|
|
1408
|
+
right: "text-right"
|
|
1409
|
+
}
|
|
1410
|
+
},
|
|
1411
|
+
defaultVariants: {
|
|
1412
|
+
variant: "body",
|
|
1413
|
+
align: "left"
|
|
1414
|
+
}
|
|
1415
|
+
}), qs = {
|
|
1416
|
+
"heading-large": "h1",
|
|
1417
|
+
heading: "h2",
|
|
1418
|
+
body: "p",
|
|
1419
|
+
description: "p",
|
|
1420
|
+
label: "p",
|
|
1421
|
+
"label-input": "label",
|
|
1422
|
+
small: "p",
|
|
1423
|
+
selected: "p",
|
|
1424
|
+
inverse: "p",
|
|
1425
|
+
warning: "p",
|
|
1426
|
+
critical: "p",
|
|
1427
|
+
positive: "p",
|
|
1428
|
+
info: "p",
|
|
1429
|
+
"warning-strong": "p",
|
|
1430
|
+
"critical-strong": "p",
|
|
1431
|
+
"positive-strong": "p",
|
|
1432
|
+
"info-strong": "p",
|
|
1433
|
+
code: "code"
|
|
1434
|
+
}, He = $(({ content: a, variant: e, align: t, className: i, as: s, ellipsis: r, noEllipsisTooltip: n, markdown: o, ...d }, c) => {
|
|
1435
|
+
const l = s ?? qs[e ?? "body"];
|
|
1436
|
+
if (r !== void 0)
|
|
1437
|
+
return g(Hi, {
|
|
1438
|
+
ref: c,
|
|
1439
|
+
lines: typeof r == "number" ? r : 1,
|
|
1440
|
+
noTooltip: n,
|
|
1441
|
+
tag: l,
|
|
1442
|
+
className: B(Se({
|
|
1443
|
+
variant: e,
|
|
1444
|
+
align: t
|
|
1445
|
+
}), i),
|
|
1446
|
+
markdown: o,
|
|
1447
|
+
...d,
|
|
1448
|
+
children: a
|
|
1449
|
+
});
|
|
1450
|
+
if (o) {
|
|
1451
|
+
const h = Bi(a);
|
|
1452
|
+
return Xe(l, {
|
|
1453
|
+
...d,
|
|
1454
|
+
className: B(Se({
|
|
1455
|
+
variant: e,
|
|
1456
|
+
align: t
|
|
1457
|
+
}), i),
|
|
1458
|
+
ref: c,
|
|
1459
|
+
dangerouslySetInnerHTML: {
|
|
1460
|
+
__html: h
|
|
1461
|
+
}
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
return Xe(l, {
|
|
1465
|
+
...d,
|
|
1466
|
+
className: B(Se({
|
|
1467
|
+
variant: e,
|
|
1468
|
+
align: t
|
|
1469
|
+
}), i),
|
|
1470
|
+
ref: c
|
|
1471
|
+
}, a);
|
|
1472
|
+
});
|
|
1473
|
+
He.displayName = "Text";
|
|
1474
|
+
const Ks = $((a, e) => g(He, {
|
|
1475
|
+
ref: e,
|
|
1476
|
+
variant: "heading",
|
|
1477
|
+
...a
|
|
1478
|
+
}));
|
|
1479
|
+
Ks.displayName = "F0Heading";
|
|
1480
|
+
const Vs = $((a, e) => g(He, {
|
|
1481
|
+
ref: e,
|
|
1482
|
+
markdown: a.markdown ?? !0,
|
|
1483
|
+
...a
|
|
1484
|
+
}));
|
|
1485
|
+
Vs.displayName = "F0Text";
|
|
1486
|
+
const Ys = {
|
|
1375
1487
|
xs: 1,
|
|
1376
1488
|
sm: 2,
|
|
1377
1489
|
md: 2,
|
|
1378
1490
|
lg: 2
|
|
1379
|
-
},
|
|
1491
|
+
}, Xs = $(function({ widgets: e, children: t }, i) {
|
|
1380
1492
|
const s = Y(null);
|
|
1381
|
-
|
|
1382
|
-
const r =
|
|
1493
|
+
Nt(i, () => s.current);
|
|
1494
|
+
const r = hs.toArray(e).filter((n) => !!n).map((n, o) => g("div", {
|
|
1383
1495
|
className: "h-full @5xl:h-auto [&>div]:h-full",
|
|
1384
1496
|
children: n
|
|
1385
1497
|
}, o));
|
|
1386
|
-
return g(
|
|
1498
|
+
return g(xt, {
|
|
1387
1499
|
layout: "home",
|
|
1388
1500
|
children: z("div", {
|
|
1389
1501
|
ref: s,
|
|
1390
1502
|
className: "@container",
|
|
1391
1503
|
children: [z("div", {
|
|
1392
1504
|
className: "flex flex-col gap-6 px-5 pt-4 @md:pt-2 @5xl:hidden",
|
|
1393
|
-
children: [g(
|
|
1394
|
-
columns:
|
|
1505
|
+
children: [g(Ii, {
|
|
1506
|
+
columns: Ys,
|
|
1395
1507
|
showArrows: !1,
|
|
1396
1508
|
children: r
|
|
1397
1509
|
}), g("main", {
|
|
@@ -1412,78 +1524,78 @@ const Pr = Ai, Ar = Ae(
|
|
|
1412
1524
|
})]
|
|
1413
1525
|
})
|
|
1414
1526
|
});
|
|
1415
|
-
}),
|
|
1527
|
+
}), Js = $(function({ children: e, sideContent: t, mainColumnPosition: i = "left", sticky: s = !1 }, r) {
|
|
1416
1528
|
return g("div", {
|
|
1417
1529
|
ref: r,
|
|
1418
1530
|
className: "h-full",
|
|
1419
1531
|
children: z("div", {
|
|
1420
|
-
className:
|
|
1532
|
+
className: B("flex h-full max-w-full overflow-auto text-f1-foreground md:flex-row", "flex-col", "overflow-y-auto", s && "md:sticky md:top-0 md:max-h-full"),
|
|
1421
1533
|
children: [g("main", {
|
|
1422
|
-
className:
|
|
1534
|
+
className: B("sm:min-h-xs order-2 h-fit border-0 px-4 py-5 sm:flex-1 sm:border-solid md:order-2 md:px-6", s ? "md:h-full md:max-h-full md:overflow-y-auto" : "min-h-full", i === "right" ? "sm:border-l sm:border-l-f1-border-secondary" : "sm:border-r sm:border-r-f1-border-secondary", "border-t border-solid border-t-f1-border-secondary sm:border-t-0"),
|
|
1423
1535
|
children: e
|
|
1424
|
-
}), g(
|
|
1536
|
+
}), g(Zs, {
|
|
1425
1537
|
sticky: s,
|
|
1426
|
-
className:
|
|
1538
|
+
className: B("order-1", i === "right" ? "md:order-1" : "md:order-3"),
|
|
1427
1539
|
children: t
|
|
1428
1540
|
})]
|
|
1429
1541
|
})
|
|
1430
1542
|
});
|
|
1431
|
-
}),
|
|
1432
|
-
className:
|
|
1543
|
+
}), Zs = ({ children: a, className: e }) => g("aside", {
|
|
1544
|
+
className: B("min-w-30 py-5 pl-4 pr-4 sm:basis-1/4 sm:pb-6 md:max-w-80 md:pl-2", e),
|
|
1433
1545
|
children: a
|
|
1434
|
-
}),
|
|
1546
|
+
}), Qs = wt({
|
|
1435
1547
|
base: "relative flex min-h-full w-full flex-1 flex-col gap-4 place-self-center overflow-y-auto px-6 py-5",
|
|
1436
1548
|
variants: {
|
|
1437
1549
|
variant: {
|
|
1438
1550
|
narrow: "max-w-screen-lg"
|
|
1439
1551
|
}
|
|
1440
1552
|
}
|
|
1441
|
-
}),
|
|
1553
|
+
}), Gt = P.forwardRef(({ children: a, variant: e, className: t, ...i }, s) => g(xt, {
|
|
1442
1554
|
layout: "standard",
|
|
1443
1555
|
children: g("section", {
|
|
1444
1556
|
ref: s,
|
|
1445
|
-
className:
|
|
1557
|
+
className: B("relative flex-1 overflow-auto", t),
|
|
1446
1558
|
...i,
|
|
1447
1559
|
children: g("div", {
|
|
1448
|
-
className:
|
|
1560
|
+
className: B(Qs({
|
|
1449
1561
|
variant: e
|
|
1450
1562
|
})),
|
|
1451
1563
|
children: a
|
|
1452
1564
|
})
|
|
1453
1565
|
})
|
|
1454
1566
|
}));
|
|
1455
|
-
|
|
1456
|
-
const
|
|
1567
|
+
Gt.displayName = "StandardLayout";
|
|
1568
|
+
const Gr = F({
|
|
1457
1569
|
name: "StandardLayout",
|
|
1458
1570
|
type: "layout"
|
|
1459
|
-
},
|
|
1571
|
+
}, Gt), Wr = F({
|
|
1460
1572
|
name: "TwoColumnLayout",
|
|
1461
1573
|
type: "layout"
|
|
1462
|
-
},
|
|
1574
|
+
}, Js), $r = F({
|
|
1463
1575
|
name: "HomeLayout",
|
|
1464
1576
|
type: "layout"
|
|
1465
|
-
},
|
|
1466
|
-
function
|
|
1467
|
-
const a =
|
|
1577
|
+
}, Xs), Wt = _e(null);
|
|
1578
|
+
function Be() {
|
|
1579
|
+
const a = Dt(Wt);
|
|
1468
1580
|
if (!a)
|
|
1469
1581
|
throw new Error(
|
|
1470
1582
|
"useGridStackContext must be used within a GridStackProvider"
|
|
1471
1583
|
);
|
|
1472
1584
|
return a;
|
|
1473
1585
|
}
|
|
1474
|
-
function
|
|
1586
|
+
function er({ children: a, initialOptions: e, onResizeStop: t, onChange: i }) {
|
|
1475
1587
|
const [s, r] = A(null), [n, o] = A(() => {
|
|
1476
1588
|
var y;
|
|
1477
1589
|
const p = /* @__PURE__ */ new Map(), m = (b) => {
|
|
1478
|
-
var N,
|
|
1479
|
-
b.id && ((N = b.renderFn) != null && N.call(b)) && p.set(b.id, b), (
|
|
1590
|
+
var N, _;
|
|
1591
|
+
b.id && ((N = b.renderFn) != null && N.call(b)) && p.set(b.id, b), (_ = b.subGridOpts) != null && _.children && b.subGridOpts.children.forEach((C) => {
|
|
1480
1592
|
m(C);
|
|
1481
1593
|
});
|
|
1482
1594
|
};
|
|
1483
1595
|
return (y = e.children) == null || y.forEach((b) => {
|
|
1484
1596
|
m(b);
|
|
1485
1597
|
}), p;
|
|
1486
|
-
}),
|
|
1598
|
+
}), d = j(() => {
|
|
1487
1599
|
if (!s)
|
|
1488
1600
|
return;
|
|
1489
1601
|
const p = s.save();
|
|
@@ -1496,45 +1608,45 @@ function qs({ children: a, initialOptions: e, onResizeStop: t, onChange: i }) {
|
|
|
1496
1608
|
y: m.y ?? 0
|
|
1497
1609
|
}))));
|
|
1498
1610
|
}, [s]);
|
|
1499
|
-
|
|
1611
|
+
K(() => {
|
|
1500
1612
|
if (!s) return;
|
|
1501
1613
|
const p = (m, y) => {
|
|
1502
1614
|
t == null || t(m, y);
|
|
1503
1615
|
};
|
|
1504
|
-
return s.on("resizestop", p), s.on("change added removed",
|
|
1616
|
+
return s.on("resizestop", p), s.on("change added removed", d), () => {
|
|
1505
1617
|
s.off("resizestop"), s.off("change added removed");
|
|
1506
1618
|
};
|
|
1507
|
-
}, [s, t,
|
|
1508
|
-
s &&
|
|
1619
|
+
}, [s, t, d]), K(() => {
|
|
1620
|
+
s && d();
|
|
1509
1621
|
}, [s]);
|
|
1510
|
-
const c =
|
|
1622
|
+
const c = j((p) => {
|
|
1511
1623
|
s == null || s.addWidget(p), o((m) => {
|
|
1512
1624
|
const y = new Map(m);
|
|
1513
1625
|
return y.set(p.id, p), y;
|
|
1514
1626
|
});
|
|
1515
|
-
}, [s]), l =
|
|
1627
|
+
}, [s]), l = j((p) => {
|
|
1516
1628
|
s == null || s.addWidget(p), o((m) => {
|
|
1517
1629
|
var b, N;
|
|
1518
1630
|
const y = new Map(m);
|
|
1519
|
-
return (N = (b = p.subGridOpts) == null ? void 0 : b.children) == null || N.forEach((
|
|
1520
|
-
y.set(
|
|
1631
|
+
return (N = (b = p.subGridOpts) == null ? void 0 : b.children) == null || N.forEach((_) => {
|
|
1632
|
+
y.set(_.id, _);
|
|
1521
1633
|
}), y;
|
|
1522
1634
|
});
|
|
1523
|
-
}, [s]),
|
|
1635
|
+
}, [s]), h = j((p) => {
|
|
1524
1636
|
const m = document.body.querySelector(`[gs-id="${p}"]`);
|
|
1525
1637
|
m && (s == null || s.removeWidget(m)), o((y) => {
|
|
1526
1638
|
const b = new Map(y);
|
|
1527
1639
|
return b.delete(p), b;
|
|
1528
1640
|
});
|
|
1529
|
-
}, [s]), f =
|
|
1641
|
+
}, [s]), f = j(() => {
|
|
1530
1642
|
s == null || s.removeAll(), o(/* @__PURE__ */ new Map());
|
|
1531
1643
|
}, [s]);
|
|
1532
|
-
return g(
|
|
1644
|
+
return g(Wt.Provider, {
|
|
1533
1645
|
value: {
|
|
1534
1646
|
initialOptions: e,
|
|
1535
1647
|
gridStack: s,
|
|
1536
1648
|
addWidget: c,
|
|
1537
|
-
removeWidget:
|
|
1649
|
+
removeWidget: h,
|
|
1538
1650
|
addSubGrid: l,
|
|
1539
1651
|
removeAll: f,
|
|
1540
1652
|
_gridStack: {
|
|
@@ -1549,34 +1661,34 @@ function qs({ children: a, initialOptions: e, onResizeStop: t, onChange: i }) {
|
|
|
1549
1661
|
children: a
|
|
1550
1662
|
});
|
|
1551
1663
|
}
|
|
1552
|
-
const
|
|
1553
|
-
function
|
|
1554
|
-
const a =
|
|
1664
|
+
const $t = _e(null);
|
|
1665
|
+
function tr() {
|
|
1666
|
+
const a = Dt($t);
|
|
1555
1667
|
if (!a)
|
|
1556
1668
|
throw new Error(
|
|
1557
1669
|
"useGridStackRenderContext must be used within a GridStackProvider"
|
|
1558
1670
|
);
|
|
1559
1671
|
return a;
|
|
1560
1672
|
}
|
|
1561
|
-
const
|
|
1562
|
-
function
|
|
1563
|
-
const { _rawWidgetMetaMap: a } =
|
|
1673
|
+
const ir = _e(null);
|
|
1674
|
+
function sr() {
|
|
1675
|
+
const { _rawWidgetMetaMap: a } = Be(), { getWidgetContainer: e } = tr();
|
|
1564
1676
|
return g(oe, {
|
|
1565
1677
|
children: Array.from(a.value.entries()).map(([t, i]) => {
|
|
1566
1678
|
var r;
|
|
1567
1679
|
const s = e(t);
|
|
1568
|
-
return s ? g(
|
|
1680
|
+
return s ? g(ir.Provider, {
|
|
1569
1681
|
value: {
|
|
1570
1682
|
widget: {
|
|
1571
1683
|
id: t
|
|
1572
1684
|
}
|
|
1573
1685
|
},
|
|
1574
|
-
children:
|
|
1686
|
+
children: cs((r = i.renderFn) == null ? void 0 : r.call(i), s)
|
|
1575
1687
|
}, t) : null;
|
|
1576
1688
|
})
|
|
1577
1689
|
});
|
|
1578
1690
|
}
|
|
1579
|
-
function
|
|
1691
|
+
function rr(a, e, t, i, s) {
|
|
1580
1692
|
const r = (...n) => (console.warn("gridstack.js: Function `" + t + "` is deprecated in " + s + " and has been replaced with `" + i + "`. It will be **removed** in a future release"), e.apply(a, n));
|
|
1581
1693
|
return r.prototype = e.prototype, r;
|
|
1582
1694
|
}
|
|
@@ -1950,8 +2062,8 @@ class u {
|
|
|
1950
2062
|
const s = u.getScrollElement(e);
|
|
1951
2063
|
if (!s)
|
|
1952
2064
|
return;
|
|
1953
|
-
const r = e.getBoundingClientRect(), n = s.getBoundingClientRect(), o = window.innerHeight || document.documentElement.clientHeight,
|
|
1954
|
-
c < 0 && i < 0 ? e.offsetHeight > n.height ? s.scrollTop += i : s.scrollTop += Math.abs(c) > Math.abs(i) ? i : c :
|
|
2065
|
+
const r = e.getBoundingClientRect(), n = s.getBoundingClientRect(), o = window.innerHeight || document.documentElement.clientHeight, d = r.bottom - Math.min(n.bottom, o), c = r.top - Math.max(n.top, 0), l = s.scrollTop;
|
|
2066
|
+
c < 0 && i < 0 ? e.offsetHeight > n.height ? s.scrollTop += i : s.scrollTop += Math.abs(c) > Math.abs(i) ? i : c : d > 0 && i > 0 && (e.offsetHeight > n.height ? s.scrollTop += i : s.scrollTop += d > i ? i : d), t.top += s.scrollTop - l;
|
|
1955
2067
|
}
|
|
1956
2068
|
/**
|
|
1957
2069
|
* @internal Function used to scroll the page.
|
|
@@ -1961,8 +2073,8 @@ class u {
|
|
|
1961
2073
|
* @param distance Distance from the V edges to start scrolling
|
|
1962
2074
|
*/
|
|
1963
2075
|
static updateScrollResize(e, t, i) {
|
|
1964
|
-
const s = u.getScrollElement(t), r = s.clientHeight, n = s === u.getScrollElement() ? 0 : s.getBoundingClientRect().top, o = e.clientY - n,
|
|
1965
|
-
|
|
2076
|
+
const s = u.getScrollElement(t), r = s.clientHeight, n = s === u.getScrollElement() ? 0 : s.getBoundingClientRect().top, o = e.clientY - n, d = o < i, c = o > r - i;
|
|
2077
|
+
d ? s.scrollBy({ behavior: "smooth", top: o - i }) : c && s.scrollBy({ behavior: "smooth", top: i - (r - o) });
|
|
1966
2078
|
}
|
|
1967
2079
|
/** single level clone, returning a new object with same top fields. This will share sub objects and arrays */
|
|
1968
2080
|
static clone(e) {
|
|
@@ -2079,7 +2191,7 @@ class u {
|
|
|
2079
2191
|
return !(!e || e.w === e.h || e.locked || e.noResize || (t = e.grid) != null && t.opts.disableResize || e.minW && e.minW === e.maxW || e.minH && e.minH === e.maxH);
|
|
2080
2192
|
}
|
|
2081
2193
|
}
|
|
2082
|
-
class
|
|
2194
|
+
class U {
|
|
2083
2195
|
constructor(e = {}) {
|
|
2084
2196
|
this.addedNodes = [], this.removedNodes = [], this.defaultColumn = 12, this.column = e.column || this.defaultColumn, this.column > this.defaultColumn && (this.defaultColumn = this.column), this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
|
|
2085
2197
|
}
|
|
@@ -2116,9 +2228,9 @@ class $ {
|
|
|
2116
2228
|
!this._loading && this._useEntireRowArea(e, t) && (r = { x: 0, w: this.column, y: t.y, h: t.h }, i = this.collide(e, r, s.skip));
|
|
2117
2229
|
let n = !1;
|
|
2118
2230
|
const o = { nested: !0, pack: !1 };
|
|
2119
|
-
let
|
|
2231
|
+
let d = 0;
|
|
2120
2232
|
for (; i = i || this.collide(e, r, s.skip); ) {
|
|
2121
|
-
if (
|
|
2233
|
+
if (d++ > this.nodes.length * 2)
|
|
2122
2234
|
throw new Error("Infinite collide check");
|
|
2123
2235
|
let c;
|
|
2124
2236
|
if (i.locked || this._loading || e._moving && !e._skipDown && t.y > e.y && !this.float && // can take space we had, or before where we're going
|
|
@@ -2177,14 +2289,14 @@ class $ {
|
|
|
2177
2289
|
const s = e._rect, r = { ...t.rect };
|
|
2178
2290
|
r.y > s.y ? (r.h += r.y - s.y, r.y = s.y) : r.h += s.y - r.y, r.x > s.x ? (r.w += r.x - s.x, r.x = s.x) : r.w += s.x - r.x;
|
|
2179
2291
|
let n, o = 0.5;
|
|
2180
|
-
for (let
|
|
2181
|
-
if (
|
|
2292
|
+
for (let d of i) {
|
|
2293
|
+
if (d.locked || !d._rect)
|
|
2182
2294
|
break;
|
|
2183
|
-
const c =
|
|
2184
|
-
let l = Number.MAX_VALUE,
|
|
2185
|
-
s.y < c.y ? l = (r.y + r.h - c.y) / c.h : s.y + s.h > c.y + c.h && (l = (c.y + c.h - r.y) / c.h), s.x < c.x ?
|
|
2186
|
-
const f = Math.min(
|
|
2187
|
-
f > o && (o = f, n =
|
|
2295
|
+
const c = d._rect;
|
|
2296
|
+
let l = Number.MAX_VALUE, h = Number.MAX_VALUE;
|
|
2297
|
+
s.y < c.y ? l = (r.y + r.h - c.y) / c.h : s.y + s.h > c.y + c.h && (l = (c.y + c.h - r.y) / c.h), s.x < c.x ? h = (r.x + r.w - c.x) / c.w : s.x + s.w > c.x + c.w && (h = (c.x + c.w - r.x) / c.w);
|
|
2298
|
+
const f = Math.min(h, l);
|
|
2299
|
+
f > o && (o = f, n = d);
|
|
2188
2300
|
}
|
|
2189
2301
|
return t.collide = n, n;
|
|
2190
2302
|
}
|
|
@@ -2314,9 +2426,9 @@ class $ {
|
|
|
2314
2426
|
const s = this._inColumnResize;
|
|
2315
2427
|
s || (this._inColumnResize = !0);
|
|
2316
2428
|
const r = this.nodes;
|
|
2317
|
-
return this.nodes = [], r.forEach((n, o,
|
|
2429
|
+
return this.nodes = [], r.forEach((n, o, d) => {
|
|
2318
2430
|
let c;
|
|
2319
|
-
n.locked || (n.autoPosition = !0, e === "list" && o && (c =
|
|
2431
|
+
n.locked || (n.autoPosition = !0, e === "list" && o && (c = d[o - 1])), this.addNode(n, !1, c);
|
|
2320
2432
|
}), s || delete this._inColumnResize, i || this.batchUpdate(!1), this;
|
|
2321
2433
|
}
|
|
2322
2434
|
/**
|
|
@@ -2391,7 +2503,7 @@ class $ {
|
|
|
2391
2503
|
* console.log('Node prepared at:', prepared.x, prepared.y);
|
|
2392
2504
|
*/
|
|
2393
2505
|
prepareNode(e, t) {
|
|
2394
|
-
e._id = e._id ??
|
|
2506
|
+
e._id = e._id ?? U._idSeq++;
|
|
2395
2507
|
const i = e.id;
|
|
2396
2508
|
if (i) {
|
|
2397
2509
|
let r = 1;
|
|
@@ -2508,11 +2620,11 @@ class $ {
|
|
|
2508
2620
|
const r = s ? s.y * i + (s.x + s.w) : 0;
|
|
2509
2621
|
let n = !1;
|
|
2510
2622
|
for (let o = r; !n; ++o) {
|
|
2511
|
-
const
|
|
2512
|
-
if (
|
|
2623
|
+
const d = o % i, c = Math.floor(o / i);
|
|
2624
|
+
if (d + e.w > i)
|
|
2513
2625
|
continue;
|
|
2514
|
-
const l = { x:
|
|
2515
|
-
t.find((
|
|
2626
|
+
const l = { x: d, y: c, w: e.w, h: e.h };
|
|
2627
|
+
t.find((h) => u.isIntercepted(l, h)) || ((e.x !== d || e.y !== c) && (e._dirty = !0), e.x = d, e.y = c, delete e.autoPosition, n = !0);
|
|
2516
2628
|
}
|
|
2517
2629
|
return n;
|
|
2518
2630
|
}
|
|
@@ -2591,7 +2703,7 @@ class $ {
|
|
|
2591
2703
|
if (t.pack = !0, !this.maxRow)
|
|
2592
2704
|
return this.moveNode(e, t);
|
|
2593
2705
|
let i;
|
|
2594
|
-
const s = new
|
|
2706
|
+
const s = new U({
|
|
2595
2707
|
column: this.column,
|
|
2596
2708
|
float: this.float,
|
|
2597
2709
|
nodes: this.nodes.map((n) => n._id === e._id ? (i = { ...n }, i) : { ...n })
|
|
@@ -2605,7 +2717,7 @@ class $ {
|
|
|
2605
2717
|
return this._notify(), !0;
|
|
2606
2718
|
}
|
|
2607
2719
|
return r ? (s.nodes.filter((n) => n._dirty).forEach((n) => {
|
|
2608
|
-
const o = this.nodes.find((
|
|
2720
|
+
const o = this.nodes.find((d) => d._id === n._id);
|
|
2609
2721
|
o && (u.copyPos(o, n), o._dirty = !0);
|
|
2610
2722
|
}), this._notify(), !0) : !1;
|
|
2611
2723
|
}
|
|
@@ -2613,7 +2725,7 @@ class $ {
|
|
|
2613
2725
|
willItFit(e) {
|
|
2614
2726
|
if (delete e._willFitPos, !this.maxRow)
|
|
2615
2727
|
return !0;
|
|
2616
|
-
const t = new
|
|
2728
|
+
const t = new U({
|
|
2617
2729
|
column: this.column,
|
|
2618
2730
|
float: this.float,
|
|
2619
2731
|
nodes: this.nodes.map((s) => ({ ...s }))
|
|
@@ -2636,17 +2748,17 @@ class $ {
|
|
|
2636
2748
|
if (u.copyPos(r, t), this.nodeBoundFix(r, s), u.copyPos(t, r), !t.forceCollide && u.samePos(e, t))
|
|
2637
2749
|
return !1;
|
|
2638
2750
|
const n = u.copyPos({}, e), o = this.collideAll(e, r, t.skip);
|
|
2639
|
-
let
|
|
2751
|
+
let d = !0;
|
|
2640
2752
|
if (o.length) {
|
|
2641
|
-
const
|
|
2642
|
-
let f =
|
|
2643
|
-
if (
|
|
2753
|
+
const h = e._moving && !t.nested;
|
|
2754
|
+
let f = h ? this.directionCollideCoverage(e, t, o) : o[0];
|
|
2755
|
+
if (h && f && ((l = (c = e.grid) == null ? void 0 : c.opts) != null && l.subGridDynamic) && !e.grid._isTemp) {
|
|
2644
2756
|
const p = u.areaIntercept(t.rect, f._rect), m = u.area(t.rect), y = u.area(f._rect);
|
|
2645
2757
|
p / (m < y ? m : y) > 0.8 && (f.grid.makeSubGrid(f.el, void 0, e), f = void 0);
|
|
2646
2758
|
}
|
|
2647
|
-
f ?
|
|
2759
|
+
f ? d = !this._fixCollisions(e, r, f, t) : (d = !1, i && delete t.pack);
|
|
2648
2760
|
}
|
|
2649
|
-
return
|
|
2761
|
+
return d && !u.samePos(e, r) && (e._dirty = !0, u.copyPos(e, r)), t.pack && this._packNodes()._notify(), !u.samePos(e, n);
|
|
2650
2762
|
}
|
|
2651
2763
|
getRow() {
|
|
2652
2764
|
return this.nodes.reduce((e, t) => Math.max(e, t.y + t.h), 0);
|
|
@@ -2671,9 +2783,9 @@ class $ {
|
|
|
2671
2783
|
let r;
|
|
2672
2784
|
s && (i ? i !== this.column && (r = this._layouts[i]) : this.column !== s - 1 && (r = this._layouts[s - 1]));
|
|
2673
2785
|
const n = [];
|
|
2674
|
-
return this.sortNodes(), this.nodes.forEach((
|
|
2675
|
-
const c = r == null ? void 0 : r.find((
|
|
2676
|
-
u.removeInternalForSave(l, !e), t && t(
|
|
2786
|
+
return this.sortNodes(), this.nodes.forEach((d) => {
|
|
2787
|
+
const c = r == null ? void 0 : r.find((h) => h._id === d._id), l = { ...d, ...c || {} };
|
|
2788
|
+
u.removeInternalForSave(l, !e), t && t(d, l), n.push(l);
|
|
2677
2789
|
}), n;
|
|
2678
2790
|
}
|
|
2679
2791
|
/** @internal called whenever a node is added or moved - updates the cached layouts */
|
|
@@ -2712,19 +2824,19 @@ class $ {
|
|
|
2712
2824
|
s && this.sortNodes(1), t < e && this.cacheLayout(this.nodes, e), this.batchUpdate();
|
|
2713
2825
|
let r = [], n = s ? this.nodes : u.sort(this.nodes, -1);
|
|
2714
2826
|
if (t > e && this._layouts) {
|
|
2715
|
-
const
|
|
2716
|
-
!
|
|
2717
|
-
const
|
|
2718
|
-
|
|
2719
|
-
})),
|
|
2720
|
-
const
|
|
2721
|
-
if (
|
|
2722
|
-
const f = n[
|
|
2827
|
+
const d = this._layouts[t] || [], c = this._layouts.length - 1;
|
|
2828
|
+
!d.length && e !== c && ((o = this._layouts[c]) != null && o.length) && (e = c, this._layouts[c].forEach((l) => {
|
|
2829
|
+
const h = n.find((f) => f._id === l._id);
|
|
2830
|
+
h && (!s && !l.autoPosition && (h.x = l.x ?? h.x, h.y = l.y ?? h.y), h.w = l.w ?? h.w, (l.x == null || l.y === void 0) && (h.autoPosition = !0));
|
|
2831
|
+
})), d.forEach((l) => {
|
|
2832
|
+
const h = n.findIndex((f) => f._id === l._id);
|
|
2833
|
+
if (h !== -1) {
|
|
2834
|
+
const f = n[h];
|
|
2723
2835
|
if (s) {
|
|
2724
2836
|
f.w = l.w;
|
|
2725
2837
|
return;
|
|
2726
2838
|
}
|
|
2727
|
-
(l.autoPosition || isNaN(l.x) || isNaN(l.y)) && this.findEmptyPosition(l, r), l.autoPosition || (f.x = l.x ?? f.x, f.y = l.y ?? f.y, f.w = l.w ?? f.w, r.push(f)), n.splice(
|
|
2839
|
+
(l.autoPosition || isNaN(l.x) || isNaN(l.y)) && this.findEmptyPosition(l, r), l.autoPosition || (f.x = l.x ?? f.x, f.y = l.y ?? f.y, f.w = l.w ?? f.w, r.push(f)), n.splice(h, 1);
|
|
2728
2840
|
}
|
|
2729
2841
|
});
|
|
2730
2842
|
}
|
|
@@ -2735,16 +2847,16 @@ class $ {
|
|
|
2735
2847
|
if (typeof i == "function")
|
|
2736
2848
|
i(t, e, r, n);
|
|
2737
2849
|
else {
|
|
2738
|
-
const
|
|
2739
|
-
n.forEach((
|
|
2740
|
-
|
|
2850
|
+
const d = s || i === "none" ? 1 : t / e, c = i === "move" || i === "moveScale", l = i === "scale" || i === "moveScale";
|
|
2851
|
+
n.forEach((h) => {
|
|
2852
|
+
h.x = t === 1 ? 0 : c ? Math.round(h.x * d) : Math.min(h.x, t - 1), h.w = t === 1 || e === 1 ? 1 : l ? Math.round(h.w * d) || 1 : Math.min(h.w, t), r.push(h);
|
|
2741
2853
|
}), n = [];
|
|
2742
2854
|
}
|
|
2743
|
-
r = u.sort(r, -1), this._inColumnResize = !0, this.nodes = [], r.forEach((
|
|
2744
|
-
this.addNode(
|
|
2855
|
+
r = u.sort(r, -1), this._inColumnResize = !0, this.nodes = [], r.forEach((d) => {
|
|
2856
|
+
this.addNode(d, !1), delete d._orig;
|
|
2745
2857
|
});
|
|
2746
2858
|
}
|
|
2747
|
-
return this.nodes.forEach((
|
|
2859
|
+
return this.nodes.forEach((d) => delete d._orig), this.batchUpdate(!1, !s), delete this._inColumnResize, this;
|
|
2748
2860
|
}
|
|
2749
2861
|
/**
|
|
2750
2862
|
* call to cache the given layout internally to the given location so we can restore back when column changes size
|
|
@@ -2756,8 +2868,8 @@ class $ {
|
|
|
2756
2868
|
const s = [];
|
|
2757
2869
|
return e.forEach((r, n) => {
|
|
2758
2870
|
if (r._id === void 0) {
|
|
2759
|
-
const o = r.id ? this.nodes.find((
|
|
2760
|
-
r._id = (o == null ? void 0 : o._id) ??
|
|
2871
|
+
const o = r.id ? this.nodes.find((d) => d.id === r.id) : void 0;
|
|
2872
|
+
r._id = (o == null ? void 0 : o._id) ?? U._idSeq++;
|
|
2761
2873
|
}
|
|
2762
2874
|
s[n] = { x: r.x, y: r.y, w: r.w, _id: r._id };
|
|
2763
2875
|
}), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
|
|
@@ -2768,7 +2880,7 @@ class $ {
|
|
|
2768
2880
|
* @param column corresponding column index to save it under
|
|
2769
2881
|
*/
|
|
2770
2882
|
cacheOneLayout(e, t) {
|
|
2771
|
-
e._id = e._id ??
|
|
2883
|
+
e._id = e._id ?? U._idSeq++;
|
|
2772
2884
|
const i = { x: e.x, y: e.y, w: e.w, _id: e._id };
|
|
2773
2885
|
(e.autoPosition || e.x === void 0) && (delete i.x, delete i.y, e.autoPosition && (i.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[t] = this._layouts[t] || [];
|
|
2774
2886
|
const s = this.findCacheLayout(e, t);
|
|
@@ -2792,7 +2904,7 @@ class $ {
|
|
|
2792
2904
|
return this;
|
|
2793
2905
|
}
|
|
2794
2906
|
}
|
|
2795
|
-
|
|
2907
|
+
U._idSeq = 0;
|
|
2796
2908
|
const M = {
|
|
2797
2909
|
alwaysShowResizeHandle: "mobile",
|
|
2798
2910
|
animate: !0,
|
|
@@ -2824,37 +2936,37 @@ const M = {
|
|
|
2824
2936
|
};
|
|
2825
2937
|
class w {
|
|
2826
2938
|
}
|
|
2827
|
-
const
|
|
2828
|
-
class
|
|
2939
|
+
const I = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
|
|
2940
|
+
class W {
|
|
2829
2941
|
}
|
|
2830
2942
|
function ye(a, e) {
|
|
2831
2943
|
a.touches.length > 1 || (a.cancelable && a.preventDefault(), u.simulateMouseEvent(a.changedTouches[0], e));
|
|
2832
2944
|
}
|
|
2833
|
-
function
|
|
2945
|
+
function jt(a, e) {
|
|
2834
2946
|
a.cancelable && a.preventDefault(), u.simulateMouseEvent(a, e);
|
|
2835
2947
|
}
|
|
2836
2948
|
function ve(a) {
|
|
2837
|
-
|
|
2949
|
+
W.touchHandled || (W.touchHandled = !0, ye(a, "mousedown"));
|
|
2838
2950
|
}
|
|
2839
2951
|
function be(a) {
|
|
2840
|
-
|
|
2952
|
+
W.touchHandled && ye(a, "mousemove");
|
|
2841
2953
|
}
|
|
2842
2954
|
function we(a) {
|
|
2843
|
-
if (!
|
|
2955
|
+
if (!W.touchHandled)
|
|
2844
2956
|
return;
|
|
2845
|
-
|
|
2957
|
+
W.pointerLeaveTimeout && (window.clearTimeout(W.pointerLeaveTimeout), delete W.pointerLeaveTimeout);
|
|
2846
2958
|
const e = !!w.dragElement;
|
|
2847
|
-
ye(a, "mouseup"), e || ye(a, "click"),
|
|
2959
|
+
ye(a, "mouseup"), e || ye(a, "click"), W.touchHandled = !1;
|
|
2848
2960
|
}
|
|
2849
|
-
function
|
|
2961
|
+
function xe(a) {
|
|
2850
2962
|
a.pointerType !== "mouse" && a.target.releasePointerCapture(a.pointerId);
|
|
2851
2963
|
}
|
|
2852
|
-
function
|
|
2853
|
-
w.dragElement && a.pointerType !== "mouse" &&
|
|
2964
|
+
function it(a) {
|
|
2965
|
+
w.dragElement && a.pointerType !== "mouse" && jt(a, "mouseenter");
|
|
2854
2966
|
}
|
|
2855
|
-
function
|
|
2856
|
-
w.dragElement && a.pointerType !== "mouse" && (
|
|
2857
|
-
delete
|
|
2967
|
+
function st(a) {
|
|
2968
|
+
w.dragElement && a.pointerType !== "mouse" && (W.pointerLeaveTimeout = window.setTimeout(() => {
|
|
2969
|
+
delete W.pointerLeaveTimeout, jt(a, "mouseleave");
|
|
2858
2970
|
}, 10));
|
|
2859
2971
|
}
|
|
2860
2972
|
class Ce {
|
|
@@ -2864,15 +2976,15 @@ class Ce {
|
|
|
2864
2976
|
/** @internal */
|
|
2865
2977
|
_init() {
|
|
2866
2978
|
const e = this.el = document.createElement("div");
|
|
2867
|
-
return e.classList.add("ui-resizable-handle"), e.classList.add(`${Ce.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown),
|
|
2979
|
+
return e.classList.add("ui-resizable-handle"), e.classList.add(`${Ce.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), I && (this.el.addEventListener("touchstart", ve), this.el.addEventListener("pointerdown", xe)), this;
|
|
2868
2980
|
}
|
|
2869
2981
|
/** call this when resize handle needs to be removed and cleaned up */
|
|
2870
2982
|
destroy() {
|
|
2871
|
-
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown),
|
|
2983
|
+
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), I && (this.el.removeEventListener("touchstart", ve), this.el.removeEventListener("pointerdown", xe)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
|
|
2872
2984
|
}
|
|
2873
2985
|
/** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
|
|
2874
2986
|
_mouseDown(e) {
|
|
2875
|
-
this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0),
|
|
2987
|
+
this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), I && (this.el.addEventListener("touchmove", be), this.el.addEventListener("touchend", we)), e.stopPropagation(), e.preventDefault();
|
|
2876
2988
|
}
|
|
2877
2989
|
/** @internal */
|
|
2878
2990
|
_mouseMove(e) {
|
|
@@ -2881,7 +2993,7 @@ class Ce {
|
|
|
2881
2993
|
}
|
|
2882
2994
|
/** @internal */
|
|
2883
2995
|
_mouseUp(e) {
|
|
2884
|
-
this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0),
|
|
2996
|
+
this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), I && (this.el.removeEventListener("touchmove", be), this.el.removeEventListener("touchend", we)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
|
|
2885
2997
|
}
|
|
2886
2998
|
/** @internal call when keys are being pressed - use Esc to cancel */
|
|
2887
2999
|
_keyEvent(e) {
|
|
@@ -2894,7 +3006,7 @@ class Ce {
|
|
|
2894
3006
|
}
|
|
2895
3007
|
}
|
|
2896
3008
|
Ce.prefix = "ui-resizable-";
|
|
2897
|
-
class
|
|
3009
|
+
class Ie {
|
|
2898
3010
|
constructor() {
|
|
2899
3011
|
this._eventRegister = {};
|
|
2900
3012
|
}
|
|
@@ -2955,7 +3067,7 @@ class He {
|
|
|
2955
3067
|
return this._eventRegister[e](t);
|
|
2956
3068
|
}
|
|
2957
3069
|
}
|
|
2958
|
-
class re extends
|
|
3070
|
+
class re extends Ie {
|
|
2959
3071
|
// have to be public else complains for HTMLElementExtendOpt ?
|
|
2960
3072
|
constructor(e, t = {}) {
|
|
2961
3073
|
super(), this.el = e, this.option = t, this.rectScale = { x: 1, y: 1 }, this._ui = () => {
|
|
@@ -3077,15 +3189,15 @@ class re extends He {
|
|
|
3077
3189
|
left: this.originalRect.left,
|
|
3078
3190
|
top: this.originalRect.top - this.scrolled
|
|
3079
3191
|
}, r = e.clientX - i.clientX, n = this.sizeToContent ? 0 : e.clientY - i.clientY;
|
|
3080
|
-
let o,
|
|
3081
|
-
t.indexOf("e") > -1 ? s.width += r : t.indexOf("w") > -1 && (s.width -= r, s.left += r, o = !0), t.indexOf("s") > -1 ? s.height += n : t.indexOf("n") > -1 && (s.height -= n, s.top += n,
|
|
3082
|
-
const c = this._constrainSize(s.width, s.height, o,
|
|
3192
|
+
let o, d;
|
|
3193
|
+
t.indexOf("e") > -1 ? s.width += r : t.indexOf("w") > -1 && (s.width -= r, s.left += r, o = !0), t.indexOf("s") > -1 ? s.height += n : t.indexOf("n") > -1 && (s.height -= n, s.top += n, d = !0);
|
|
3194
|
+
const c = this._constrainSize(s.width, s.height, o, d);
|
|
3083
3195
|
return Math.round(s.width) !== Math.round(c.width) && (t.indexOf("w") > -1 && (s.left += s.width - c.width), s.width = c.width), Math.round(s.height) !== Math.round(c.height) && (t.indexOf("n") > -1 && (s.top += s.height - c.height), s.height = c.height), s;
|
|
3084
3196
|
}
|
|
3085
3197
|
/** @internal constrain the size to the set min/max values */
|
|
3086
3198
|
_constrainSize(e, t, i, s) {
|
|
3087
|
-
const r = this.option, n = (i ? r.maxWidthMoveLeft : r.maxWidth) || Number.MAX_SAFE_INTEGER, o = r.minWidth / this.rectScale.x || e,
|
|
3088
|
-
return { width: l, height:
|
|
3199
|
+
const r = this.option, n = (i ? r.maxWidthMoveLeft : r.maxWidth) || Number.MAX_SAFE_INTEGER, o = r.minWidth / this.rectScale.x || e, d = (s ? r.maxHeightMoveUp : r.maxHeight) || Number.MAX_SAFE_INTEGER, c = r.minHeight / this.rectScale.y || t, l = Math.min(n, Math.max(o, e)), h = Math.min(d, Math.max(c, t));
|
|
3200
|
+
return { width: l, height: h };
|
|
3089
3201
|
}
|
|
3090
3202
|
/** @internal */
|
|
3091
3203
|
_applyChange() {
|
|
@@ -3105,8 +3217,8 @@ class re extends He {
|
|
|
3105
3217
|
}
|
|
3106
3218
|
}
|
|
3107
3219
|
re._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
|
|
3108
|
-
const
|
|
3109
|
-
class ne extends
|
|
3220
|
+
const nr = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
|
|
3221
|
+
class ne extends Ie {
|
|
3110
3222
|
constructor(e, t = {}) {
|
|
3111
3223
|
var r;
|
|
3112
3224
|
super(), this.el = e, this.option = t, this.dragTransform = {
|
|
@@ -3126,12 +3238,12 @@ class ne extends He {
|
|
|
3126
3238
|
}
|
|
3127
3239
|
enable() {
|
|
3128
3240
|
this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
|
|
3129
|
-
e.addEventListener("mousedown", this._mouseDown),
|
|
3241
|
+
e.addEventListener("mousedown", this._mouseDown), I && (e.addEventListener("touchstart", ve), e.addEventListener("pointerdown", xe));
|
|
3130
3242
|
}), this.el.classList.remove("ui-draggable-disabled"));
|
|
3131
3243
|
}
|
|
3132
3244
|
disable(e = !1) {
|
|
3133
3245
|
this.disabled !== !0 && (super.disable(), this.dragEls.forEach((t) => {
|
|
3134
|
-
t.removeEventListener("mousedown", this._mouseDown),
|
|
3246
|
+
t.removeEventListener("mousedown", this._mouseDown), I && (t.removeEventListener("touchstart", ve), t.removeEventListener("pointerdown", xe));
|
|
3135
3247
|
}), e || this.el.classList.add("ui-draggable-disabled"));
|
|
3136
3248
|
}
|
|
3137
3249
|
destroy() {
|
|
@@ -3143,7 +3255,7 @@ class ne extends He {
|
|
|
3143
3255
|
/** @internal call when mouse goes down before a dragstart happens */
|
|
3144
3256
|
_mouseDown(e) {
|
|
3145
3257
|
if (!w.mouseHandled)
|
|
3146
|
-
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(
|
|
3258
|
+
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(nr) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete w.dragElement, delete w.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), I && (e.currentTarget.addEventListener("touchmove", be), e.currentTarget.addEventListener("touchend", we)), e.preventDefault(), document.activeElement && document.activeElement.blur(), w.mouseHandled = !0), !0;
|
|
3147
3259
|
}
|
|
3148
3260
|
/** @internal method to call actual drag event */
|
|
3149
3261
|
_callDrag(e) {
|
|
@@ -3174,7 +3286,7 @@ class ne extends He {
|
|
|
3174
3286
|
/** @internal call when the mouse gets released to drop the item at current location */
|
|
3175
3287
|
_mouseUp(e) {
|
|
3176
3288
|
var t, i;
|
|
3177
|
-
if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0),
|
|
3289
|
+
if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), I && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", be, !0), e.currentTarget.removeEventListener("touchend", we, !0)), this.dragging) {
|
|
3178
3290
|
delete this.dragging, (t = this.el.gridstackNode) == null || delete t._origRotate, document.removeEventListener("keydown", this._keyEvent), ((i = w.dropElement) == null ? void 0 : i.el) === this.el.parentElement && delete w.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
|
|
3179
3291
|
const s = u.initEvent(e, { target: this.el, type: "dragstop" });
|
|
3180
3292
|
this.option.stop && this.option.stop(s), this.triggerEvent("dragstop", s), w.dropElement && w.dropElement.drop(e);
|
|
@@ -3257,7 +3369,7 @@ class ne extends He {
|
|
|
3257
3369
|
}
|
|
3258
3370
|
}
|
|
3259
3371
|
ne.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
|
|
3260
|
-
class
|
|
3372
|
+
class or extends Ie {
|
|
3261
3373
|
constructor(e, t = {}) {
|
|
3262
3374
|
super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
|
|
3263
3375
|
}
|
|
@@ -3268,10 +3380,10 @@ class Zs extends He {
|
|
|
3268
3380
|
super.off(e);
|
|
3269
3381
|
}
|
|
3270
3382
|
enable() {
|
|
3271
|
-
this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave),
|
|
3383
|
+
this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), I && (this.el.addEventListener("pointerenter", it), this.el.addEventListener("pointerleave", st)));
|
|
3272
3384
|
}
|
|
3273
3385
|
disable(e = !1) {
|
|
3274
|
-
this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave),
|
|
3386
|
+
this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), I && (this.el.removeEventListener("pointerenter", it), this.el.removeEventListener("pointerleave", st)));
|
|
3275
3387
|
}
|
|
3276
3388
|
destroy() {
|
|
3277
3389
|
this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
|
|
@@ -3323,9 +3435,9 @@ class Zs extends He {
|
|
|
3323
3435
|
};
|
|
3324
3436
|
}
|
|
3325
3437
|
}
|
|
3326
|
-
class
|
|
3438
|
+
class Fe {
|
|
3327
3439
|
static init(e) {
|
|
3328
|
-
return e.ddElement || (e.ddElement = new
|
|
3440
|
+
return e.ddElement || (e.ddElement = new Fe(e)), e.ddElement;
|
|
3329
3441
|
}
|
|
3330
3442
|
constructor(e) {
|
|
3331
3443
|
this.el = e;
|
|
@@ -3349,13 +3461,13 @@ class Be {
|
|
|
3349
3461
|
return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
|
|
3350
3462
|
}
|
|
3351
3463
|
setupDroppable(e) {
|
|
3352
|
-
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new
|
|
3464
|
+
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new or(this.el, e), this;
|
|
3353
3465
|
}
|
|
3354
3466
|
cleanDroppable() {
|
|
3355
3467
|
return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
|
|
3356
3468
|
}
|
|
3357
3469
|
}
|
|
3358
|
-
class
|
|
3470
|
+
class ar {
|
|
3359
3471
|
/**
|
|
3360
3472
|
* Enable/disable/configure resizing for grid elements.
|
|
3361
3473
|
*
|
|
@@ -3379,12 +3491,12 @@ class Qs {
|
|
|
3379
3491
|
r.setupResizable({ [i]: s });
|
|
3380
3492
|
else {
|
|
3381
3493
|
const o = r.el.gridstackNode.grid;
|
|
3382
|
-
let
|
|
3383
|
-
|
|
3494
|
+
let d = r.el.getAttribute("gs-resize-handles") || o.opts.resizable.handles || "e,s,se";
|
|
3495
|
+
d === "all" && (d = "n,e,s,w,se,sw,ne,nw");
|
|
3384
3496
|
const c = !o.opts.alwaysShowResizeHandle;
|
|
3385
3497
|
r.setupResizable({
|
|
3386
3498
|
...o.opts.resizable,
|
|
3387
|
-
handles:
|
|
3499
|
+
handles: d,
|
|
3388
3500
|
autoHide: c,
|
|
3389
3501
|
start: t.start,
|
|
3390
3502
|
stop: t.stop,
|
|
@@ -3460,7 +3572,7 @@ class Qs {
|
|
|
3460
3572
|
/** @internal returns a list of DD elements, creating them on the fly by default unless option is to destroy or disable */
|
|
3461
3573
|
_getDDElements(e, t) {
|
|
3462
3574
|
const i = e.gridstack || t !== "destroy" && t !== "disable", s = u.getElements(e);
|
|
3463
|
-
return s.length ? s.map((n) => n.ddElement || (i ?
|
|
3575
|
+
return s.length ? s.map((n) => n.ddElement || (i ? Fe.init(n) : null)).filter((n) => n) : [];
|
|
3464
3576
|
}
|
|
3465
3577
|
}
|
|
3466
3578
|
/*!
|
|
@@ -3470,7 +3582,7 @@ class Qs {
|
|
|
3470
3582
|
* Copyright (c) 2021-2025 Alain Dumesny
|
|
3471
3583
|
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
3472
3584
|
*/
|
|
3473
|
-
const
|
|
3585
|
+
const O = new ar();
|
|
3474
3586
|
class v {
|
|
3475
3587
|
/**
|
|
3476
3588
|
* initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
|
|
@@ -3557,7 +3669,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3557
3669
|
const s = t.columnOpts;
|
|
3558
3670
|
if (s) {
|
|
3559
3671
|
const l = s.breakpoints;
|
|
3560
|
-
!s.columnWidth && !(l != null && l.length) ? delete t.columnOpts : (s.columnMax = s.columnMax || 12, (l == null ? void 0 : l.length) > 1 && l.sort((
|
|
3672
|
+
!s.columnWidth && !(l != null && l.length) ? delete t.columnOpts : (s.columnMax = s.columnMax || 12, (l == null ? void 0 : l.length) > 1 && l.sort((h, f) => (f.w || 0) - (h.w || 0)));
|
|
3561
3673
|
}
|
|
3562
3674
|
const r = {
|
|
3563
3675
|
...u.cloneDeep(M),
|
|
@@ -3583,16 +3695,16 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3583
3695
|
const l = t.cellHeight;
|
|
3584
3696
|
delete t.cellHeight, this.cellHeight(l);
|
|
3585
3697
|
}
|
|
3586
|
-
t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle =
|
|
3587
|
-
const
|
|
3588
|
-
if (this.engine = new
|
|
3698
|
+
t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = I), this._setStaticClass();
|
|
3699
|
+
const d = t.engineClass || v.engineClass || U;
|
|
3700
|
+
if (this.engine = new d({
|
|
3589
3701
|
column: this.getColumn(),
|
|
3590
3702
|
float: t.float,
|
|
3591
3703
|
maxRow: t.maxRow,
|
|
3592
3704
|
onChange: (l) => {
|
|
3593
|
-
l.forEach((
|
|
3594
|
-
const f =
|
|
3595
|
-
f && (
|
|
3705
|
+
l.forEach((h) => {
|
|
3706
|
+
const f = h.el;
|
|
3707
|
+
f && (h._removeDOM ? (f && f.remove(), delete h._removeDOM) : this._writePosAttr(f, h));
|
|
3596
3708
|
}), this._updateContainerHeight();
|
|
3597
3709
|
}
|
|
3598
3710
|
}), t.auto && (this.batchUpdate(), this.engine._loading = !0, this.getGridItems().forEach((l) => this._prepareElement(l)), delete this.engine._loading, this.batchUpdate(!1)), t.children) {
|
|
@@ -3682,15 +3794,15 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3682
3794
|
...n || {},
|
|
3683
3795
|
...t || r.subGridOpts || {}
|
|
3684
3796
|
}), r.subGridOpts = t;
|
|
3685
|
-
let
|
|
3686
|
-
t.column === "auto" && (
|
|
3687
|
-
let c = r.el.querySelector(".grid-stack-item-content"), l,
|
|
3688
|
-
if (s && (this._removeDD(r.el),
|
|
3689
|
-
const b =
|
|
3690
|
-
|
|
3797
|
+
let d;
|
|
3798
|
+
t.column === "auto" && (d = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
|
|
3799
|
+
let c = r.el.querySelector(".grid-stack-item-content"), l, h;
|
|
3800
|
+
if (s && (this._removeDD(r.el), h = { ...r, x: 0, y: 0 }, u.removeInternalForSave(h), delete h.subGridOpts, r.content && (h.content = r.content, delete r.content), v.addRemoveCB ? l = v.addRemoveCB(this.el, h, !0, !1) : (l = u.createDiv(["grid-stack-item"]), l.appendChild(c), c = u.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
|
|
3801
|
+
const b = d ? t.column : r.w, N = r.h + i.h, _ = r.el.style;
|
|
3802
|
+
_.transition = "none", this.update(r.el, { w: b, h: N }), setTimeout(() => _.transition = null);
|
|
3691
3803
|
}
|
|
3692
3804
|
const f = r.subGrid = v.addGrid(c, t);
|
|
3693
|
-
return i != null && i._moving && (f._isTemp = !0),
|
|
3805
|
+
return i != null && i._moving && (f._isTemp = !0), d && (f._autoColumn = !0), s && f.makeWidget(l, h), i && (i._moving ? window.setTimeout(() => u.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
|
|
3694
3806
|
}
|
|
3695
3807
|
/**
|
|
3696
3808
|
* called when an item was converted into a nested grid to accommodate a dragged over item, but then item leaves - return back
|
|
@@ -3721,10 +3833,10 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3721
3833
|
if (r.forEach((n) => {
|
|
3722
3834
|
var o;
|
|
3723
3835
|
if (e && n.el && !n.subGrid && !i) {
|
|
3724
|
-
const
|
|
3725
|
-
n.content =
|
|
3836
|
+
const d = n.el.querySelector(".grid-stack-item-content");
|
|
3837
|
+
n.content = d == null ? void 0 : d.innerHTML, n.content || delete n.content;
|
|
3726
3838
|
} else if (!e && !i && delete n.content, (o = n.subGrid) != null && o.el) {
|
|
3727
|
-
const
|
|
3839
|
+
const d = n.w || n.subGrid.getColumn(), c = n.subGrid.save(e, t, i, d);
|
|
3728
3840
|
n.subGridOpts = t ? c : { children: c }, delete n.subGrid;
|
|
3729
3841
|
}
|
|
3730
3842
|
delete n.el;
|
|
@@ -3785,23 +3897,23 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3785
3897
|
typeof t == "function" && (v.addRemoveCB = t);
|
|
3786
3898
|
const n = [];
|
|
3787
3899
|
this.batchUpdate();
|
|
3788
|
-
const o = !this.engine.nodes.length,
|
|
3789
|
-
|
|
3790
|
-
if (!
|
|
3900
|
+
const o = !this.engine.nodes.length, d = o && this.opts.animate;
|
|
3901
|
+
d && this.setAnimation(!1), !o && t && [...this.engine.nodes].forEach((h) => {
|
|
3902
|
+
if (!h.id)
|
|
3791
3903
|
return;
|
|
3792
|
-
u.find(e,
|
|
3904
|
+
u.find(e, h.id) || (v.addRemoveCB && v.addRemoveCB(this.el, h, !1, !1), n.push(h), this.removeWidget(h.el, !0, !1));
|
|
3793
3905
|
}), this.engine._loading = !0;
|
|
3794
3906
|
const c = [];
|
|
3795
3907
|
return this.engine.nodes = this.engine.nodes.filter((l) => u.find(e, l.id) ? (c.push(l), !1) : !0), e.forEach((l) => {
|
|
3796
3908
|
var f;
|
|
3797
|
-
const
|
|
3798
|
-
if (
|
|
3799
|
-
if (u.shouldSizeToContent(
|
|
3800
|
-
const p =
|
|
3909
|
+
const h = u.find(c, l.id);
|
|
3910
|
+
if (h) {
|
|
3911
|
+
if (u.shouldSizeToContent(h) && (l.h = h.h), this.engine.nodeBoundFix(l), (l.autoPosition || l.x === void 0 || l.y === void 0) && (l.w = l.w || h.w, l.h = l.h || h.h, this.engine.findEmptyPosition(l)), this.engine.nodes.push(h), u.samePos(h, l) && this.engine.nodes.length > 1 && (this.moveNode(h, { ...l, forceCollide: !0 }), u.copyPos(l, h)), this.update(h.el, l), (f = l.subGridOpts) != null && f.children) {
|
|
3912
|
+
const p = h.el.querySelector(".grid-stack");
|
|
3801
3913
|
p && p.gridstack && p.gridstack.load(l.subGridOpts.children);
|
|
3802
3914
|
}
|
|
3803
3915
|
} else t && this.addWidget(l);
|
|
3804
|
-
}), delete this.engine._loading, this.engine.removedNodes = n, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ? v.addRemoveCB = r : delete v.addRemoveCB,
|
|
3916
|
+
}), delete this.engine._loading, this.engine.removedNodes = n, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ? v.addRemoveCB = r : delete v.addRemoveCB, d && this.setAnimation(!0, !0), this;
|
|
3805
3917
|
}
|
|
3806
3918
|
/**
|
|
3807
3919
|
* use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
|
|
@@ -3906,7 +4018,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3906
4018
|
i = e.breakpoints[o++].c || t;
|
|
3907
4019
|
}
|
|
3908
4020
|
if (i !== t) {
|
|
3909
|
-
const o = (n = e.breakpoints) == null ? void 0 : n.find((
|
|
4021
|
+
const o = (n = e.breakpoints) == null ? void 0 : n.find((d) => d.c === i);
|
|
3910
4022
|
return this.column(i, (o == null ? void 0 : o.layout) || e.layout), !0;
|
|
3911
4023
|
}
|
|
3912
4024
|
return !1;
|
|
@@ -4058,8 +4170,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4058
4170
|
const i = this.el.getBoundingClientRect();
|
|
4059
4171
|
let s;
|
|
4060
4172
|
t ? s = { top: i.top + document.documentElement.scrollTop, left: i.left } : s = { top: this.el.offsetTop, left: this.el.offsetLeft };
|
|
4061
|
-
const r = e.left - s.left, n = e.top - s.top, o = i.width / this.getColumn(),
|
|
4062
|
-
return { x: Math.floor(r / o), y: Math.floor(n /
|
|
4173
|
+
const r = e.left - s.left, n = e.top - s.top, o = i.width / this.getColumn(), d = i.height / parseInt(this.el.getAttribute("gs-current-row"));
|
|
4174
|
+
return { x: Math.floor(r / o), y: Math.floor(n / d) };
|
|
4063
4175
|
}
|
|
4064
4176
|
/**
|
|
4065
4177
|
* Returns the current number of rows, which will be at least `minRow` if set.
|
|
@@ -4245,20 +4357,20 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4245
4357
|
this.engine.nodeBoundFix(r), delete r.autoPosition;
|
|
4246
4358
|
const n = ["x", "y", "w", "h"];
|
|
4247
4359
|
let o;
|
|
4248
|
-
if (n.some((
|
|
4249
|
-
o[
|
|
4360
|
+
if (n.some((h) => r[h] !== void 0 && r[h] !== s[h]) && (o = {}, n.forEach((h) => {
|
|
4361
|
+
o[h] = r[h] !== void 0 ? r[h] : s[h], delete r[h];
|
|
4250
4362
|
})), !o && (r.minW || r.minH || r.maxW || r.maxH) && (o = {}), r.content !== void 0) {
|
|
4251
|
-
const
|
|
4252
|
-
|
|
4363
|
+
const h = i.querySelector(".grid-stack-item-content");
|
|
4364
|
+
h && h.textContent !== r.content && (s.content = r.content, v.renderCB(h, r), (l = s.subGrid) != null && l.el && (h.appendChild(s.subGrid.el), s.subGrid._updateContainerHeight())), delete r.content;
|
|
4253
4365
|
}
|
|
4254
|
-
let
|
|
4255
|
-
for (const
|
|
4256
|
-
|
|
4366
|
+
let d = !1, c = !1;
|
|
4367
|
+
for (const h in r)
|
|
4368
|
+
h[0] !== "_" && s[h] !== r[h] && (s[h] = r[h], d = !0, c = c || !this.opts.staticGrid && (h === "noResize" || h === "noMove" || h === "locked"));
|
|
4257
4369
|
if (u.sanitizeMinMax(s), o) {
|
|
4258
|
-
const
|
|
4259
|
-
this.moveNode(s, o),
|
|
4370
|
+
const h = o.w !== void 0 && o.w !== s.w;
|
|
4371
|
+
this.moveNode(s, o), h && s.subGrid ? s.subGrid.onResize(this.hasAnimationCSS() ? s.w : void 0) : this.resizeToContentCheck(h, s), delete s._orig;
|
|
4260
4372
|
}
|
|
4261
|
-
(o ||
|
|
4373
|
+
(o || d) && this._writeAttr(i, s), c && this.prepareDragDrop(s.el), v.updateCB && v.updateCB(s);
|
|
4262
4374
|
}), this;
|
|
4263
4375
|
}
|
|
4264
4376
|
moveNode(e, t) {
|
|
@@ -4299,7 +4411,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4299
4411
|
let r = t.h ? t.h * s : e.clientHeight, n;
|
|
4300
4412
|
if (t.resizeToContentParent && (n = e.querySelector(t.resizeToContentParent)), n || (n = e.querySelector(v.resizeToContentParent)), !n)
|
|
4301
4413
|
return;
|
|
4302
|
-
const o = e.clientHeight - n.clientHeight,
|
|
4414
|
+
const o = e.clientHeight - n.clientHeight, d = t.h ? t.h * s - o : n.clientHeight;
|
|
4303
4415
|
let c;
|
|
4304
4416
|
if (t.subGrid) {
|
|
4305
4417
|
c = t.subGrid.getRow() * t.subGrid.getCellHeight(!0);
|
|
@@ -4314,15 +4426,15 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4314
4426
|
console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${v.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
|
|
4315
4427
|
return;
|
|
4316
4428
|
}
|
|
4317
|
-
c = m.getBoundingClientRect().height ||
|
|
4429
|
+
c = m.getBoundingClientRect().height || d;
|
|
4318
4430
|
}
|
|
4319
4431
|
}
|
|
4320
|
-
if (
|
|
4432
|
+
if (d === c)
|
|
4321
4433
|
return;
|
|
4322
|
-
r += c -
|
|
4434
|
+
r += c - d;
|
|
4323
4435
|
let l = Math.ceil(r / s);
|
|
4324
|
-
const
|
|
4325
|
-
|
|
4436
|
+
const h = Number.isInteger(t.sizeToContent) ? t.sizeToContent : 0;
|
|
4437
|
+
h && l > h && (l = h, e.classList.add("size-to-content-max")), t.minH && l < t.minH ? l = t.minH : t.maxH && l > t.maxH && (l = t.maxH), l !== t.h && (i._ignoreLayoutsNodeChange = !0, i.moveNode(t, { h: l }), delete i._ignoreLayoutsNodeChange);
|
|
4326
4438
|
}
|
|
4327
4439
|
/** call the user resize (so they can do extra work) else our build in version */
|
|
4328
4440
|
resizeToContentCBCheck(e) {
|
|
@@ -4350,8 +4462,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4350
4462
|
return;
|
|
4351
4463
|
const r = { w: s.h, h: s.w, minH: s.minW, minW: s.minH, maxH: s.maxW, maxW: s.maxH };
|
|
4352
4464
|
if (t) {
|
|
4353
|
-
const o = t.left > 0 ? Math.floor(t.left / this.cellWidth()) : 0,
|
|
4354
|
-
r.x = s.x + o - (s.h - (
|
|
4465
|
+
const o = t.left > 0 ? Math.floor(t.left / this.cellWidth()) : 0, d = t.top > 0 ? Math.floor(t.top / this.opts.cellHeight) : 0;
|
|
4466
|
+
r.x = s.x + o - (s.h - (d + 1)), r.y = s.y + d - o;
|
|
4355
4467
|
}
|
|
4356
4468
|
Object.keys(r).forEach((o) => {
|
|
4357
4469
|
r[o] === void 0 && delete r[o];
|
|
@@ -4600,7 +4712,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4600
4712
|
* // Access drag & drop functionality
|
|
4601
4713
|
*/
|
|
4602
4714
|
static getDD() {
|
|
4603
|
-
return
|
|
4715
|
+
return O;
|
|
4604
4716
|
}
|
|
4605
4717
|
/**
|
|
4606
4718
|
* call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
|
|
@@ -4613,7 +4725,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4613
4725
|
*/
|
|
4614
4726
|
static setupDragIn(e, t, i, s = document) {
|
|
4615
4727
|
(t == null ? void 0 : t.pause) !== void 0 && (w.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? u.getElements(e, s) : e).forEach((n, o) => {
|
|
4616
|
-
|
|
4728
|
+
O.isDraggable(n) || O.dragIn(n, t), i != null && i[o] && (n.gridstackNode = i[o]);
|
|
4617
4729
|
});
|
|
4618
4730
|
}
|
|
4619
4731
|
/**
|
|
@@ -4765,12 +4877,12 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4765
4877
|
}
|
|
4766
4878
|
/** @internal removes any drag&drop present (called during destroy) */
|
|
4767
4879
|
_removeDD(e) {
|
|
4768
|
-
return
|
|
4880
|
+
return O.draggable(e, "destroy").resizable(e, "destroy"), e.gridstackNode && delete e.gridstackNode._initDD, delete e.ddElement, this;
|
|
4769
4881
|
}
|
|
4770
4882
|
/** @internal called to add drag over to support widgets being added externally */
|
|
4771
4883
|
_setupAcceptWidget() {
|
|
4772
4884
|
if (this.opts.staticGrid || !this.opts.acceptWidgets && !this.opts.removable)
|
|
4773
|
-
return
|
|
4885
|
+
return O.droppable(this.el, "destroy"), this;
|
|
4774
4886
|
let e, t;
|
|
4775
4887
|
const i = (s, r, n) => {
|
|
4776
4888
|
var f;
|
|
@@ -4783,28 +4895,28 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4783
4895
|
const p = n.getBoundingClientRect();
|
|
4784
4896
|
n.style.left = p.x + (this.dragTransform.xScale - 1) * (s.clientX - p.x) / this.dragTransform.xScale + "px", n.style.top = p.y + (this.dragTransform.yScale - 1) * (s.clientY - p.y) / this.dragTransform.yScale + "px", n.style.transformOrigin = "0px 0px";
|
|
4785
4897
|
}
|
|
4786
|
-
let { top:
|
|
4898
|
+
let { top: d, left: c } = n.getBoundingClientRect();
|
|
4787
4899
|
const l = this.el.getBoundingClientRect();
|
|
4788
|
-
c -= l.left,
|
|
4789
|
-
const
|
|
4900
|
+
c -= l.left, d -= l.top;
|
|
4901
|
+
const h = {
|
|
4790
4902
|
position: {
|
|
4791
|
-
top:
|
|
4903
|
+
top: d * this.dragTransform.xScale,
|
|
4792
4904
|
left: c * this.dragTransform.yScale
|
|
4793
4905
|
}
|
|
4794
4906
|
};
|
|
4795
4907
|
if (o._temporaryRemoved) {
|
|
4796
|
-
if (o.x = Math.max(0, Math.round(c / t)), o.y = Math.max(0, Math.round(
|
|
4908
|
+
if (o.x = Math.max(0, Math.round(c / t)), o.y = Math.max(0, Math.round(d / e)), delete o.autoPosition, this.engine.nodeBoundFix(o), !this.engine.willItFit(o)) {
|
|
4797
4909
|
if (o.autoPosition = !0, !this.engine.willItFit(o)) {
|
|
4798
|
-
|
|
4910
|
+
O.off(r, "drag");
|
|
4799
4911
|
return;
|
|
4800
4912
|
}
|
|
4801
4913
|
o._willFitPos && (u.copyPos(o, o._willFitPos), delete o._willFitPos);
|
|
4802
4914
|
}
|
|
4803
|
-
this._onStartMoving(n, s,
|
|
4915
|
+
this._onStartMoving(n, s, h, o, t, e);
|
|
4804
4916
|
} else
|
|
4805
|
-
this._dragOrResize(n, s,
|
|
4917
|
+
this._dragOrResize(n, s, h, o, t, e);
|
|
4806
4918
|
};
|
|
4807
|
-
return
|
|
4919
|
+
return O.droppable(this.el, {
|
|
4808
4920
|
accept: (s) => {
|
|
4809
4921
|
const r = s.gridstackNode || this._readAttr(s, !1);
|
|
4810
4922
|
if ((r == null ? void 0 : r.grid) === this)
|
|
@@ -4841,9 +4953,9 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4841
4953
|
o || (o = this._readAttr(n)), o._sidebarOrig = { w: o.w, h: o.h };
|
|
4842
4954
|
}
|
|
4843
4955
|
o.grid || (o.el || (o = { ...o }), o._isExternal = !0, n.gridstackNode = o);
|
|
4844
|
-
const
|
|
4845
|
-
return o.grid && o.grid !== this ? (r._gridstackNodeOrig || (r._gridstackNodeOrig = o), r.gridstackNode = o = { ...o, w:
|
|
4846
|
-
o._temporaryRemoved = !0) : (o.w =
|
|
4956
|
+
const d = o.w || Math.round(n.offsetWidth / t) || 1, c = o.h || Math.round(n.offsetHeight / e) || 1;
|
|
4957
|
+
return o.grid && o.grid !== this ? (r._gridstackNodeOrig || (r._gridstackNodeOrig = o), r.gridstackNode = o = { ...o, w: d, h: c, grid: this }, delete o.x, delete o.y, this.engine.cleanupNode(o).nodeBoundFix(o), o._initDD = o._isExternal = // DOM needs to be re-parented on a drop
|
|
4958
|
+
o._temporaryRemoved = !0) : (o.w = d, o.h = c, o._temporaryRemoved = !0), v._itemRemoving(o.el, !1), O.on(r, "drag", i), i(s, r, n), !1;
|
|
4847
4959
|
}).on(this.el, "dropout", (s, r, n) => {
|
|
4848
4960
|
const o = (n == null ? void 0 : n.gridstackNode) || r.gridstackNode;
|
|
4849
4961
|
return o && (!o.grid || o.grid === this) && (this._leave(r, n), this._isTemp && this.removeAsSubGrid(o)), !1;
|
|
@@ -4852,17 +4964,17 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4852
4964
|
const o = (n == null ? void 0 : n.gridstackNode) || r.gridstackNode;
|
|
4853
4965
|
if ((o == null ? void 0 : o.grid) === this && !o._isExternal)
|
|
4854
4966
|
return !1;
|
|
4855
|
-
const
|
|
4856
|
-
this.placeholder.remove(), delete this.placeholder.gridstackNode,
|
|
4967
|
+
const d = !!this.placeholder.parentElement, c = r !== n;
|
|
4968
|
+
this.placeholder.remove(), delete this.placeholder.gridstackNode, d && this.opts.animate && (this.setAnimation(!1), this.setAnimation(!0, !0));
|
|
4857
4969
|
const l = r._gridstackNodeOrig;
|
|
4858
|
-
if (delete r._gridstackNodeOrig,
|
|
4970
|
+
if (delete r._gridstackNodeOrig, d && (l != null && l.grid) && l.grid !== this) {
|
|
4859
4971
|
const y = l.grid;
|
|
4860
4972
|
y.engine.removeNodeFromLayoutCache(l), y.engine.removedNodes.push(l), y._triggerRemoveEvent()._triggerChangeEvent(), y.parentGridNode && !y.engine.nodes.length && y.opts.subGridDynamic && y.removeAsSubGrid();
|
|
4861
4973
|
}
|
|
4862
|
-
if (!o || (
|
|
4974
|
+
if (!o || (d && (this.engine.cleanupNode(o), o.grid = this), (f = o.grid) == null || delete f._isTemp, O.off(r, "drag"), n !== r ? (n.remove(), r = n) : r.remove(), this._removeDD(r), !d))
|
|
4863
4975
|
return !1;
|
|
4864
|
-
const
|
|
4865
|
-
return u.copyPos(o, this._readAttr(this.placeholder)), u.removePositioningStyles(r), c && (o.content || o.subGridOpts || v.addRemoveCB) ? (delete o.el, r = this.addWidget(o)) : (this._prepareElement(r, !0, o), this.el.appendChild(r), this.resizeToContentCheck(!1, o),
|
|
4976
|
+
const h = (m = (p = o.subGrid) == null ? void 0 : p.el) == null ? void 0 : m.gridstack;
|
|
4977
|
+
return u.copyPos(o, this._readAttr(this.placeholder)), u.removePositioningStyles(r), c && (o.content || o.subGridOpts || v.addRemoveCB) ? (delete o.el, r = this.addWidget(o)) : (this._prepareElement(r, !0, o), this.el.appendChild(r), this.resizeToContentCheck(!1, o), h && (h.parentGridNode = o), this._updateContainerHeight()), this.engine.addedNodes.push(o), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, l && l.grid ? l : void 0, o), !1;
|
|
4866
4978
|
}), this;
|
|
4867
4979
|
}
|
|
4868
4980
|
/** @internal mark item for removal */
|
|
@@ -4877,7 +4989,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4877
4989
|
if (typeof this.opts.removable != "string")
|
|
4878
4990
|
return this;
|
|
4879
4991
|
const e = document.querySelector(this.opts.removable);
|
|
4880
|
-
return e ? (!this.opts.staticGrid && !
|
|
4992
|
+
return e ? (!this.opts.staticGrid && !O.isDroppable(e) && O.droppable(e, this.opts.removableOptions).on(e, "dropover", (t, i) => v._itemRemoving(i, !0)).on(e, "dropout", (t, i) => v._itemRemoving(i, !1)), this) : this;
|
|
4881
4993
|
}
|
|
4882
4994
|
/**
|
|
4883
4995
|
* prepares the element for drag&drop - this is normally called by makeWidget() unless are are delay loading
|
|
@@ -4892,12 +5004,12 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4892
5004
|
if ((t || n) && (i._initDD && (this._removeDD(e), delete i._initDD), n && e.classList.add("ui-draggable-disabled", "ui-resizable-disabled"), !t))
|
|
4893
5005
|
return this;
|
|
4894
5006
|
if (!i._initDD) {
|
|
4895
|
-
let o,
|
|
5007
|
+
let o, d;
|
|
4896
5008
|
const c = (f, p) => {
|
|
4897
|
-
this.triggerEvent(f, f.target), o = this.cellWidth(),
|
|
5009
|
+
this.triggerEvent(f, f.target), o = this.cellWidth(), d = this.getCellHeight(!0), this._onStartMoving(e, f, p, i, o, d);
|
|
4898
5010
|
}, l = (f, p) => {
|
|
4899
|
-
this._dragOrResize(e, f, p, i, o,
|
|
4900
|
-
},
|
|
5011
|
+
this._dragOrResize(e, f, p, i, o, d);
|
|
5012
|
+
}, h = (f) => {
|
|
4901
5013
|
this.placeholder.remove(), delete this.placeholder.gridstackNode, delete i._moving, delete i._resizing, delete i._event, delete i._lastTried;
|
|
4902
5014
|
const p = i.w !== i._orig.w, m = f.target;
|
|
4903
5015
|
if (!(!m.gridstackNode || m.gridstackNode.grid !== this)) {
|
|
@@ -4909,17 +5021,17 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4909
5021
|
this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), f.type === "resizestop" && (Number.isInteger(i.sizeToContent) && (i.sizeToContent = i.h), this.resizeToContentCheck(p, i));
|
|
4910
5022
|
}
|
|
4911
5023
|
};
|
|
4912
|
-
|
|
5024
|
+
O.draggable(e, {
|
|
4913
5025
|
start: c,
|
|
4914
|
-
stop:
|
|
5026
|
+
stop: h,
|
|
4915
5027
|
drag: l
|
|
4916
5028
|
}).resizable(e, {
|
|
4917
5029
|
start: c,
|
|
4918
|
-
stop:
|
|
5030
|
+
stop: h,
|
|
4919
5031
|
resize: l
|
|
4920
5032
|
}), i._initDD = !0;
|
|
4921
5033
|
}
|
|
4922
|
-
return
|
|
5034
|
+
return O.draggable(e, s ? "disable" : "enable").resizable(e, r ? "disable" : "enable"), this;
|
|
4923
5035
|
}
|
|
4924
5036
|
/** @internal handles actual drag/resize start */
|
|
4925
5037
|
_onStartMoving(e, t, i, s, r, n) {
|
|
@@ -4927,8 +5039,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4927
5039
|
if (this.engine.cleanNodes().beginUpdate(s), this._writePosAttr(this.placeholder, s), this.el.appendChild(this.placeholder), this.placeholder.gridstackNode = s, (o = s.grid) != null && o.el)
|
|
4928
5040
|
this.dragTransform = u.getValuesFromTransformedElement(e);
|
|
4929
5041
|
else if (this.placeholder && this.placeholder.closest(".grid-stack")) {
|
|
4930
|
-
const
|
|
4931
|
-
this.dragTransform = u.getValuesFromTransformedElement(
|
|
5042
|
+
const d = this.placeholder.closest(".grid-stack");
|
|
5043
|
+
this.dragTransform = u.getValuesFromTransformedElement(d);
|
|
4932
5044
|
} else
|
|
4933
5045
|
this.dragTransform = {
|
|
4934
5046
|
xScale: 1,
|
|
@@ -4937,22 +5049,22 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4937
5049
|
yOffset: 0
|
|
4938
5050
|
};
|
|
4939
5051
|
if (s.el = this.placeholder, s._lastUiPosition = i.position, s._prevYPix = i.position.top, s._moving = t.type === "dragstart", s._resizing = t.type === "resizestart", delete s._lastTried, t.type === "dropover" && s._temporaryRemoved && (this.engine.addNode(s), s._moving = !0), this.engine.cacheRects(r, n, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft), t.type === "resizestart") {
|
|
4940
|
-
const
|
|
4941
|
-
|
|
5052
|
+
const d = this.getColumn() - s.x, c = (this.opts.maxRow || Number.MAX_SAFE_INTEGER) - s.y;
|
|
5053
|
+
O.resizable(e, "option", "minWidth", r * Math.min(s.minW || 1, d)).resizable(e, "option", "minHeight", n * Math.min(s.minH || 1, c)).resizable(e, "option", "maxWidth", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, d)).resizable(e, "option", "maxWidthMoveLeft", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, s.x + s.w)).resizable(e, "option", "maxHeight", n * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, c)).resizable(e, "option", "maxHeightMoveUp", n * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, s.y + s.h));
|
|
4942
5054
|
}
|
|
4943
5055
|
}
|
|
4944
5056
|
/** @internal handles actual drag/resize */
|
|
4945
5057
|
_dragOrResize(e, t, i, s, r, n) {
|
|
4946
5058
|
const o = { ...s._orig };
|
|
4947
|
-
let
|
|
5059
|
+
let d, c = this.opts.marginLeft, l = this.opts.marginRight, h = this.opts.marginTop, f = this.opts.marginBottom;
|
|
4948
5060
|
const p = Math.round(n * 0.1), m = Math.round(r * 0.1);
|
|
4949
|
-
if (c = Math.min(c, m), l = Math.min(l, m),
|
|
5061
|
+
if (c = Math.min(c, m), l = Math.min(l, m), h = Math.min(h, p), f = Math.min(f, p), t.type === "drag") {
|
|
4950
5062
|
if (s._temporaryRemoved)
|
|
4951
5063
|
return;
|
|
4952
5064
|
const b = i.position.top - s._prevYPix;
|
|
4953
5065
|
s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && u.updateScrollPosition(e, i.position, b);
|
|
4954
|
-
const N = i.position.left + (i.position.left > s._lastUiPosition.left ? -l : c),
|
|
4955
|
-
o.x = Math.round(N / r), o.y = Math.round(
|
|
5066
|
+
const N = i.position.left + (i.position.left > s._lastUiPosition.left ? -l : c), _ = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : h);
|
|
5067
|
+
o.x = Math.round(N / r), o.y = Math.round(_ / n);
|
|
4956
5068
|
const C = this._extraDragRow;
|
|
4957
5069
|
if (this.engine.collide(s, o)) {
|
|
4958
5070
|
const D = this.getRow();
|
|
@@ -4963,20 +5075,20 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4963
5075
|
if (this._extraDragRow !== C && this._updateContainerHeight(), s.x === o.x && s.y === o.y)
|
|
4964
5076
|
return;
|
|
4965
5077
|
} else if (t.type === "resize") {
|
|
4966
|
-
if (o.x < 0 || (u.updateScrollResize(t, e, n), o.w = Math.round((i.size.width - c) / r), o.h = Math.round((i.size.height -
|
|
5078
|
+
if (o.x < 0 || (u.updateScrollResize(t, e, n), o.w = Math.round((i.size.width - c) / r), o.h = Math.round((i.size.height - h) / n), s.w === o.w && s.h === o.h) || s._lastTried && s._lastTried.w === o.w && s._lastTried.h === o.h)
|
|
4967
5079
|
return;
|
|
4968
|
-
const b = i.position.left + c, N = i.position.top +
|
|
4969
|
-
o.x = Math.round(b / r), o.y = Math.round(N / n),
|
|
5080
|
+
const b = i.position.left + c, N = i.position.top + h;
|
|
5081
|
+
o.x = Math.round(b / r), o.y = Math.round(N / n), d = !0;
|
|
4970
5082
|
}
|
|
4971
5083
|
s._event = t, s._lastTried = o;
|
|
4972
5084
|
const y = {
|
|
4973
5085
|
x: i.position.left + c,
|
|
4974
|
-
y: i.position.top +
|
|
5086
|
+
y: i.position.top + h,
|
|
4975
5087
|
w: (i.size ? i.size.width : s.w * r) - c - l,
|
|
4976
|
-
h: (i.size ? i.size.height : s.h * n) -
|
|
5088
|
+
h: (i.size ? i.size.height : s.h * n) - h - f
|
|
4977
5089
|
};
|
|
4978
|
-
if (this.engine.moveNodeCheck(s, { ...o, cellWidth: r, cellHeight: n, rect: y, resizing:
|
|
4979
|
-
s._lastUiPosition = i.position, this.engine.cacheRects(r, n,
|
|
5090
|
+
if (this.engine.moveNodeCheck(s, { ...o, cellWidth: r, cellHeight: n, rect: y, resizing: d })) {
|
|
5091
|
+
s._lastUiPosition = i.position, this.engine.cacheRects(r, n, h, l, f, c), delete s._skipDown, d && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
|
|
4980
5092
|
const b = t.target;
|
|
4981
5093
|
s._sidebarOrig || this._writePosAttr(b, s), this.triggerEvent(t, b);
|
|
4982
5094
|
}
|
|
@@ -4995,7 +5107,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4995
5107
|
_leave(e, t) {
|
|
4996
5108
|
t = t || e;
|
|
4997
5109
|
const i = t.gridstackNode;
|
|
4998
|
-
if (!i || (t.style.transform = t.style.transformOrigin = null,
|
|
5110
|
+
if (!i || (t.style.transform = t.style.transformOrigin = null, O.off(e, "drag"), i._temporaryRemoved))
|
|
4999
5111
|
return;
|
|
5000
5112
|
i._temporaryRemoved = !0, this.engine.removeNode(i), i.el = i._isExternal && t ? t : e;
|
|
5001
5113
|
const s = i._sidebarOrig;
|
|
@@ -5003,7 +5115,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
5003
5115
|
}
|
|
5004
5116
|
// legacy method removed
|
|
5005
5117
|
commit() {
|
|
5006
|
-
return
|
|
5118
|
+
return rr(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
|
|
5007
5119
|
}
|
|
5008
5120
|
}
|
|
5009
5121
|
v.renderCB = (a, e) => {
|
|
@@ -5011,31 +5123,31 @@ v.renderCB = (a, e) => {
|
|
|
5011
5123
|
};
|
|
5012
5124
|
v.resizeToContentParent = ".grid-stack-item-content";
|
|
5013
5125
|
v.Utils = u;
|
|
5014
|
-
v.Engine =
|
|
5126
|
+
v.Engine = U;
|
|
5015
5127
|
v.GDRev = "12.3.2";
|
|
5016
5128
|
const ce = /* @__PURE__ */ new WeakMap();
|
|
5017
|
-
function
|
|
5018
|
-
const { _gridStack: { value: e, set: t }, initialOptions: i } =
|
|
5129
|
+
function lr({ children: a }) {
|
|
5130
|
+
const { _gridStack: { value: e, set: t }, initialOptions: i } = Be(), s = Y(/* @__PURE__ */ new Map()), r = Y(null), n = Y(i), o = j((c, l) => {
|
|
5019
5131
|
if (l.id && l.grid) {
|
|
5020
|
-
let
|
|
5021
|
-
|
|
5132
|
+
let h = ce.get(l.grid);
|
|
5133
|
+
h || (h = /* @__PURE__ */ new Map(), ce.set(l.grid, h)), h.set(l.id, c), s.current.set(l.id, c);
|
|
5022
5134
|
}
|
|
5023
|
-
}, []),
|
|
5024
|
-
return
|
|
5025
|
-
if (!
|
|
5135
|
+
}, []), d = j(() => r.current ? (v.renderCB = o, v.init(n.current, r.current)) : null, [o]);
|
|
5136
|
+
return Je(() => {
|
|
5137
|
+
if (!nt(i, n.current) && e)
|
|
5026
5138
|
try {
|
|
5027
|
-
e.removeAll(!1), e.destroy(!1), s.current.clear(), ce.delete(e), n.current = i, t(
|
|
5139
|
+
e.removeAll(!1), e.destroy(!1), s.current.clear(), ce.delete(e), n.current = i, t(d());
|
|
5028
5140
|
} catch (c) {
|
|
5029
5141
|
console.error("Error reinitializing gridstack", c);
|
|
5030
5142
|
}
|
|
5031
|
-
}, [i, e,
|
|
5143
|
+
}, [i, e, d, t]), Je(() => {
|
|
5032
5144
|
if (!e)
|
|
5033
5145
|
try {
|
|
5034
|
-
t(
|
|
5146
|
+
t(d());
|
|
5035
5147
|
} catch (c) {
|
|
5036
5148
|
console.error("Error initializing gridstack", c);
|
|
5037
5149
|
}
|
|
5038
|
-
}, [e,
|
|
5150
|
+
}, [e, d, t]), g($t.Provider, {
|
|
5039
5151
|
value: te(() => ({
|
|
5040
5152
|
getWidgetContainer: (c) => {
|
|
5041
5153
|
if (e) {
|
|
@@ -5052,72 +5164,72 @@ function er({ children: a }) {
|
|
|
5052
5164
|
})
|
|
5053
5165
|
});
|
|
5054
5166
|
}
|
|
5055
|
-
const
|
|
5056
|
-
const t =
|
|
5057
|
-
return
|
|
5167
|
+
const Ut = $((a, e) => {
|
|
5168
|
+
const t = Be();
|
|
5169
|
+
return Nt(e, () => ({
|
|
5058
5170
|
addWidget: t.addWidget,
|
|
5059
5171
|
removeWidget: t.removeWidget,
|
|
5060
5172
|
addSubGrid: t.addSubGrid,
|
|
5061
5173
|
removeAll: t.removeAll
|
|
5062
5174
|
}), [t]), null;
|
|
5063
5175
|
});
|
|
5064
|
-
|
|
5065
|
-
const
|
|
5176
|
+
Ut.displayName = "RefHandler";
|
|
5177
|
+
const qt = $(({ options: a, widgets: e, onChange: t }, i) => {
|
|
5066
5178
|
const s = te(() => ({
|
|
5067
5179
|
...a,
|
|
5068
5180
|
children: e
|
|
5069
|
-
}), [e]), r = (o,
|
|
5070
|
-
let l = c[0],
|
|
5181
|
+
}), [e]), r = (o, d, c) => {
|
|
5182
|
+
let l = c[0], h = 1 / 0;
|
|
5071
5183
|
for (const f of c) {
|
|
5072
|
-
const p = f.w - o, m = f.h -
|
|
5073
|
-
y <
|
|
5184
|
+
const p = f.w - o, m = f.h - d, y = p * p + m * m;
|
|
5185
|
+
y < h && (h = y, l = f);
|
|
5074
5186
|
}
|
|
5075
5187
|
return l;
|
|
5076
5188
|
};
|
|
5077
|
-
return z(
|
|
5189
|
+
return z(er, {
|
|
5078
5190
|
initialOptions: s,
|
|
5079
|
-
onResizeStop: (o,
|
|
5191
|
+
onResizeStop: (o, d) => {
|
|
5080
5192
|
var f, p;
|
|
5081
|
-
const c =
|
|
5193
|
+
const c = d.gridstackNode;
|
|
5082
5194
|
if (!c) return;
|
|
5083
|
-
const l = ((f =
|
|
5195
|
+
const l = ((f = d.gridstackNode) == null ? void 0 : f.allowedSizes) ?? [];
|
|
5084
5196
|
if (l.length === 0)
|
|
5085
5197
|
return;
|
|
5086
|
-
const
|
|
5087
|
-
(c.w !==
|
|
5088
|
-
w:
|
|
5089
|
-
h:
|
|
5198
|
+
const h = r(c.w ?? 1, c.h ?? 1, l);
|
|
5199
|
+
(c.w !== h.w || c.h !== h.h) && ((p = c.grid) == null || p.update(d, {
|
|
5200
|
+
w: h.w,
|
|
5201
|
+
h: h.h
|
|
5090
5202
|
}));
|
|
5091
5203
|
},
|
|
5092
5204
|
onChange: t,
|
|
5093
|
-
children: [g(
|
|
5205
|
+
children: [g(Ut, {
|
|
5094
5206
|
ref: i
|
|
5095
|
-
}), g(
|
|
5096
|
-
children: g(
|
|
5207
|
+
}), g(lr, {
|
|
5208
|
+
children: g(sr, {})
|
|
5097
5209
|
})]
|
|
5098
5210
|
});
|
|
5099
5211
|
});
|
|
5100
|
-
|
|
5101
|
-
const
|
|
5212
|
+
qt.displayName = "F0GridStack";
|
|
5213
|
+
const jr = Te(
|
|
5102
5214
|
"F0GridStack",
|
|
5103
|
-
|
|
5104
|
-
),
|
|
5215
|
+
qt
|
|
5216
|
+
), dr = ({ benefits: a }) => g("div", {
|
|
5105
5217
|
className: "flex flex-col gap-2",
|
|
5106
|
-
children: a.map((e, t) => g(
|
|
5218
|
+
children: a.map((e, t) => g(hr, {
|
|
5107
5219
|
text: e
|
|
5108
5220
|
}, t))
|
|
5109
|
-
}),
|
|
5221
|
+
}), hr = ({ text: a }) => z("div", {
|
|
5110
5222
|
className: "flex flex-row items-start gap-2",
|
|
5111
|
-
children: [g(
|
|
5112
|
-
icon:
|
|
5223
|
+
children: [g(Wi, {
|
|
5224
|
+
icon: $i,
|
|
5113
5225
|
size: "md",
|
|
5114
5226
|
className: "text-f1-icon-positive"
|
|
5115
5227
|
}), g("span", {
|
|
5116
5228
|
children: a
|
|
5117
5229
|
})]
|
|
5118
|
-
}),
|
|
5230
|
+
}), Kt = $(({ title: a, image: e, benefits: t, actions: i, withShadow: s = !0, module: r, moduleName: n, tag: o, promoTag: d }, c) => z("div", {
|
|
5119
5231
|
ref: c,
|
|
5120
|
-
className:
|
|
5232
|
+
className: B("bg-white flex flex-row rounded-xl border border-f1-border-secondary", s && "shadow-md"),
|
|
5121
5233
|
children: [g("div", {
|
|
5122
5234
|
className: "aspect-auto flex-shrink-0 overflow-hidden rounded-xl py-1 pl-1",
|
|
5123
5235
|
children: g("img", {
|
|
@@ -5133,26 +5245,26 @@ const Mr = Ae(
|
|
|
5133
5245
|
className: "flex flex-col gap-2",
|
|
5134
5246
|
children: [z("div", {
|
|
5135
5247
|
className: "flex flex-row items-center gap-2",
|
|
5136
|
-
children: [r && g(
|
|
5248
|
+
children: [r && g(_t, {
|
|
5137
5249
|
module: r
|
|
5138
5250
|
}), n && g("p", {
|
|
5139
5251
|
className: "text-base font-medium text-f1-foreground",
|
|
5140
5252
|
children: n
|
|
5141
5253
|
})]
|
|
5142
|
-
}), (o ||
|
|
5254
|
+
}), (o || d) && z("div", {
|
|
5143
5255
|
className: "flex justify-start gap-2",
|
|
5144
|
-
children: [o && g(
|
|
5256
|
+
children: [o && g(Fi, {
|
|
5145
5257
|
icon: o.icon,
|
|
5146
5258
|
text: o.label
|
|
5147
|
-
}),
|
|
5148
|
-
variant:
|
|
5149
|
-
text:
|
|
5259
|
+
}), d && g(Gi, {
|
|
5260
|
+
variant: d.variant || "positive",
|
|
5261
|
+
text: d.label
|
|
5150
5262
|
})]
|
|
5151
5263
|
}), g("h2", {
|
|
5152
5264
|
className: "font-bold text-xl text-f1-foreground",
|
|
5153
5265
|
children: a
|
|
5154
5266
|
})]
|
|
5155
|
-
}), g(
|
|
5267
|
+
}), g(dr, {
|
|
5156
5268
|
benefits: t
|
|
5157
5269
|
})]
|
|
5158
5270
|
}), i && g("div", {
|
|
@@ -5161,38 +5273,38 @@ const Mr = Ae(
|
|
|
5161
5273
|
})]
|
|
5162
5274
|
})]
|
|
5163
5275
|
}));
|
|
5164
|
-
|
|
5165
|
-
function
|
|
5276
|
+
Kt.displayName = "ProductBlankslate";
|
|
5277
|
+
function cr({ isOpen: a, onClose: e, title: t, children: i, module: s, portalContainer: r }) {
|
|
5166
5278
|
const [n, o] = A(a);
|
|
5167
|
-
return
|
|
5279
|
+
return K(() => {
|
|
5168
5280
|
o(a);
|
|
5169
|
-
}, [a]), g(
|
|
5281
|
+
}, [a]), g(ji, {
|
|
5170
5282
|
open: n,
|
|
5171
5283
|
onOpenChange: (c) => {
|
|
5172
5284
|
o(c), c || e();
|
|
5173
5285
|
},
|
|
5174
5286
|
modal: !0,
|
|
5175
|
-
children: z(
|
|
5287
|
+
children: z(Ui, {
|
|
5176
5288
|
className: "max-h-[620px] w-[760px] overflow-y-auto overflow-x-hidden bg-f1-background",
|
|
5177
5289
|
container: r,
|
|
5178
5290
|
children: [z("div", {
|
|
5179
5291
|
className: "flex flex-row items-center justify-between px-4 py-4",
|
|
5180
|
-
children: [z(
|
|
5292
|
+
children: [z(qi, {
|
|
5181
5293
|
className: "flex flex-row items-center gap-2 text-lg font-semibold text-f1-foreground",
|
|
5182
|
-
children: [s && g(
|
|
5294
|
+
children: [s && g(_t, {
|
|
5183
5295
|
module: s,
|
|
5184
5296
|
size: "lg"
|
|
5185
5297
|
}), t]
|
|
5186
|
-
}), g(
|
|
5298
|
+
}), g(Ki, {
|
|
5187
5299
|
variant: "outline",
|
|
5188
|
-
icon:
|
|
5300
|
+
icon: Et,
|
|
5189
5301
|
onClick: e,
|
|
5190
5302
|
label: "Close modal",
|
|
5191
5303
|
hideLabel: !0
|
|
5192
5304
|
})]
|
|
5193
|
-
}), z(
|
|
5305
|
+
}), z(yt, {
|
|
5194
5306
|
className: "[*[data-state=visible]_div]:bg-f1-background flex max-h-[512px] flex-col",
|
|
5195
|
-
children: [i, g(
|
|
5307
|
+
children: [i, g(vt, {
|
|
5196
5308
|
orientation: "vertical",
|
|
5197
5309
|
className: "[&_div]:bg-f1-background"
|
|
5198
5310
|
})]
|
|
@@ -5200,8 +5312,8 @@ function sr({ isOpen: a, onClose: e, title: t, children: i, module: s, portalCon
|
|
|
5200
5312
|
})
|
|
5201
5313
|
});
|
|
5202
5314
|
}
|
|
5203
|
-
function
|
|
5204
|
-
const [
|
|
5315
|
+
function Ur({ isOpen: a, onClose: e, title: t, image: i, benefits: s, errorMessage: r, successMessage: n, loadingState: o, nextSteps: d, closeLabel: c, primaryAction: l, modalTitle: h, modalModule: f, secondaryAction: p, portalContainer: m, tag: y, promoTag: b, showResponseDialog: N = !0 }) {
|
|
5316
|
+
const [_, C] = A(a), [D, S] = A(null), [R, E] = A(!1), T = async () => {
|
|
5205
5317
|
if (l != null && l.onClick) {
|
|
5206
5318
|
E(!0);
|
|
5207
5319
|
try {
|
|
@@ -5214,17 +5326,17 @@ function Hr({ isOpen: a, onClose: e, title: t, image: i, benefits: s, errorMessa
|
|
|
5214
5326
|
}
|
|
5215
5327
|
}, L = () => {
|
|
5216
5328
|
C(!1), e == null || e();
|
|
5217
|
-
},
|
|
5329
|
+
}, G = R;
|
|
5218
5330
|
return z(oe, {
|
|
5219
|
-
children: [g(
|
|
5220
|
-
isOpen:
|
|
5331
|
+
children: [g(cr, {
|
|
5332
|
+
isOpen: _,
|
|
5221
5333
|
onClose: L,
|
|
5222
|
-
title:
|
|
5334
|
+
title: h,
|
|
5223
5335
|
module: f,
|
|
5224
5336
|
portalContainer: m,
|
|
5225
5337
|
children: g("div", {
|
|
5226
5338
|
className: "pb-4 pl-4",
|
|
5227
|
-
children: g(
|
|
5339
|
+
children: g(Kt, {
|
|
5228
5340
|
title: t,
|
|
5229
5341
|
image: i,
|
|
5230
5342
|
benefits: s,
|
|
@@ -5235,9 +5347,9 @@ function Hr({ isOpen: a, onClose: e, title: t, image: i, benefits: s, errorMessa
|
|
|
5235
5347
|
className: "flex gap-3",
|
|
5236
5348
|
children: [l && g(X, {
|
|
5237
5349
|
variant: l.variant,
|
|
5238
|
-
label:
|
|
5350
|
+
label: G ? o.label : l.label,
|
|
5239
5351
|
icon: l.icon || void 0,
|
|
5240
|
-
onClick:
|
|
5352
|
+
onClick: T,
|
|
5241
5353
|
loading: l.loading,
|
|
5242
5354
|
size: l.size
|
|
5243
5355
|
}), p && g(X, {
|
|
@@ -5250,7 +5362,7 @@ function Hr({ isOpen: a, onClose: e, title: t, image: i, benefits: s, errorMessa
|
|
|
5250
5362
|
})
|
|
5251
5363
|
})
|
|
5252
5364
|
})
|
|
5253
|
-
}), D && N && g(
|
|
5365
|
+
}), D && N && g(Ct, {
|
|
5254
5366
|
open: !0,
|
|
5255
5367
|
onClose: () => {
|
|
5256
5368
|
L(), S(null);
|
|
@@ -5258,35 +5370,35 @@ function Hr({ isOpen: a, onClose: e, title: t, image: i, benefits: s, errorMessa
|
|
|
5258
5370
|
success: D === "success",
|
|
5259
5371
|
errorMessage: r,
|
|
5260
5372
|
successMessage: n,
|
|
5261
|
-
nextSteps:
|
|
5373
|
+
nextSteps: d,
|
|
5262
5374
|
closeLabel: c,
|
|
5263
5375
|
portalContainer: m
|
|
5264
5376
|
})]
|
|
5265
5377
|
});
|
|
5266
5378
|
}
|
|
5267
|
-
function
|
|
5268
|
-
const [c, l] = A(!1),
|
|
5379
|
+
function ur({ mediaUrl: a, title: e, description: t, onClose: i, dismissible: s, width: r, trackVisibility: n, actions: o, showConfirmation: d = !0 }) {
|
|
5380
|
+
const [c, l] = A(!1), h = () => {
|
|
5269
5381
|
l(!0), i && i();
|
|
5270
5382
|
};
|
|
5271
|
-
|
|
5383
|
+
K(() => {
|
|
5272
5384
|
n && n(!c);
|
|
5273
5385
|
}, [n, c]);
|
|
5274
5386
|
const f = a == null ? void 0 : a.includes(".mp4");
|
|
5275
5387
|
return g(oe, {
|
|
5276
|
-
children: c ? null : z(
|
|
5388
|
+
children: c ? null : z(Vi, {
|
|
5277
5389
|
style: {
|
|
5278
5390
|
width: r
|
|
5279
5391
|
},
|
|
5280
5392
|
className: "relative bg-f1-background p-1",
|
|
5281
|
-
children: [z(
|
|
5393
|
+
children: [z(Yi, {
|
|
5282
5394
|
children: [s && g("div", {
|
|
5283
5395
|
className: "absolute right-2 top-2 z-10",
|
|
5284
5396
|
children: g(X, {
|
|
5285
5397
|
variant: "ghost",
|
|
5286
|
-
icon:
|
|
5398
|
+
icon: Et,
|
|
5287
5399
|
size: "sm",
|
|
5288
5400
|
hideLabel: !0,
|
|
5289
|
-
onClick:
|
|
5401
|
+
onClick: h,
|
|
5290
5402
|
label: "Close"
|
|
5291
5403
|
})
|
|
5292
5404
|
}), z("div", {
|
|
@@ -5305,18 +5417,18 @@ function rr({ mediaUrl: a, title: e, description: t, onClose: i, dismissible: s,
|
|
|
5305
5417
|
}))
|
|
5306
5418
|
}), z("div", {
|
|
5307
5419
|
className: "flex flex-col gap-[2px] p-3",
|
|
5308
|
-
children: [g(
|
|
5420
|
+
children: [g(Ye, {
|
|
5309
5421
|
className: "text-lg font-medium",
|
|
5310
5422
|
children: e
|
|
5311
|
-
}), g(
|
|
5423
|
+
}), g(Ye, {
|
|
5312
5424
|
className: "line-clamp-3 text-base font-normal text-f1-foreground-secondary",
|
|
5313
5425
|
children: t
|
|
5314
5426
|
})]
|
|
5315
5427
|
})]
|
|
5316
5428
|
})]
|
|
5317
|
-
}), o && g(
|
|
5429
|
+
}), o && g(Xi, {
|
|
5318
5430
|
className: "p-3",
|
|
5319
|
-
children: o.map((p) => p.type === "upsell" ? g(
|
|
5431
|
+
children: o.map((p) => p.type === "upsell" ? g(Rt, {
|
|
5320
5432
|
label: p.label,
|
|
5321
5433
|
onRequest: p.onClick,
|
|
5322
5434
|
errorMessage: p.errorMessage,
|
|
@@ -5324,7 +5436,7 @@ function rr({ mediaUrl: a, title: e, description: t, onClose: i, dismissible: s,
|
|
|
5324
5436
|
loadingState: p.loadingState,
|
|
5325
5437
|
nextSteps: p.nextSteps,
|
|
5326
5438
|
closeLabel: p.closeLabel,
|
|
5327
|
-
showConfirmation:
|
|
5439
|
+
showConfirmation: d && p.showConfirmation,
|
|
5328
5440
|
variant: p.variant
|
|
5329
5441
|
}, p.label) : g(X, {
|
|
5330
5442
|
label: p.label,
|
|
@@ -5335,28 +5447,28 @@ function rr({ mediaUrl: a, title: e, description: t, onClose: i, dismissible: s,
|
|
|
5335
5447
|
})
|
|
5336
5448
|
});
|
|
5337
5449
|
}
|
|
5338
|
-
const
|
|
5339
|
-
const r = (
|
|
5340
|
-
label:
|
|
5450
|
+
const fr = $(function({ primaryAction: e, secondaryAction: t, ...i }, s) {
|
|
5451
|
+
const r = (d) => d.variant === "promote" ? g(Rt, {
|
|
5452
|
+
label: d.label,
|
|
5341
5453
|
onRequest: async () => {
|
|
5342
|
-
await
|
|
5454
|
+
await d.onClick();
|
|
5343
5455
|
},
|
|
5344
|
-
errorMessage:
|
|
5345
|
-
successMessage:
|
|
5346
|
-
loadingState:
|
|
5347
|
-
nextSteps:
|
|
5348
|
-
closeLabel:
|
|
5349
|
-
showIcon:
|
|
5350
|
-
showConfirmation:
|
|
5351
|
-
variant:
|
|
5456
|
+
errorMessage: d.errorMessage,
|
|
5457
|
+
successMessage: d.successMessage,
|
|
5458
|
+
loadingState: d.loadingState,
|
|
5459
|
+
nextSteps: d.nextSteps,
|
|
5460
|
+
closeLabel: d.closeLabel,
|
|
5461
|
+
showIcon: d.showIcon,
|
|
5462
|
+
showConfirmation: d.showConfirmation,
|
|
5463
|
+
variant: d.variant
|
|
5352
5464
|
}) : g(X, {
|
|
5353
|
-
onClick:
|
|
5354
|
-
label:
|
|
5355
|
-
variant:
|
|
5465
|
+
onClick: d.onClick,
|
|
5466
|
+
label: d.label,
|
|
5467
|
+
variant: d.variant || "default",
|
|
5356
5468
|
size: "md",
|
|
5357
|
-
icon:
|
|
5469
|
+
icon: d.icon
|
|
5358
5470
|
}), n = (e == null ? void 0 : e.variant) !== "promote" ? e : void 0, o = (t == null ? void 0 : t.variant) !== "promote" ? t : void 0;
|
|
5359
|
-
return z(
|
|
5471
|
+
return z(Ji, {
|
|
5360
5472
|
ref: s,
|
|
5361
5473
|
...i,
|
|
5362
5474
|
primaryAction: n,
|
|
@@ -5364,56 +5476,56 @@ const nr = K(function({ primaryAction: e, secondaryAction: t, ...i }, s) {
|
|
|
5364
5476
|
children: [(e == null ? void 0 : e.variant) === "promote" && r(e), (t == null ? void 0 : t.variant) === "promote" && r(t)]
|
|
5365
5477
|
});
|
|
5366
5478
|
});
|
|
5367
|
-
|
|
5368
|
-
function
|
|
5369
|
-
const [N,
|
|
5479
|
+
fr.displayName = "UpsellingBanner";
|
|
5480
|
+
function qr({ isOpen: a, setIsOpen: e, label: t, variant: i = "promote", size: s = "md", showIcon: r = !0, side: n = "right", align: o = "center", icon: d = Zi, mediaUrl: c, title: l, description: h, width: f = "300px", trackVisibility: p, actions: m, onClick: y, hideLabel: b = !1 }) {
|
|
5481
|
+
const [N, _] = A(!1), [C, D] = A(null), [S, R] = A(null), E = (k) => {
|
|
5370
5482
|
e(k), y && y();
|
|
5371
|
-
},
|
|
5483
|
+
}, T = async (k) => {
|
|
5372
5484
|
if (k.type === "upsell") {
|
|
5373
5485
|
R(k);
|
|
5374
5486
|
try {
|
|
5375
|
-
await k.onClick(), k.showConfirmation && (
|
|
5487
|
+
await k.onClick(), k.showConfirmation && (_(!0), D("success"));
|
|
5376
5488
|
} catch {
|
|
5377
|
-
|
|
5489
|
+
_(!0), D("error");
|
|
5378
5490
|
}
|
|
5379
5491
|
}
|
|
5380
5492
|
}, L = () => {
|
|
5381
|
-
D(null),
|
|
5382
|
-
},
|
|
5493
|
+
D(null), _(!1), R(null), e(!1);
|
|
5494
|
+
}, G = a && !N, x = m == null ? void 0 : m.map((k) => k.type === "upsell" ? {
|
|
5383
5495
|
...k,
|
|
5384
|
-
onClick: () =>
|
|
5496
|
+
onClick: () => T(k)
|
|
5385
5497
|
} : k);
|
|
5386
5498
|
return z(oe, {
|
|
5387
|
-
children: [z(
|
|
5388
|
-
open:
|
|
5499
|
+
children: [z(gt, {
|
|
5500
|
+
open: G,
|
|
5389
5501
|
onOpenChange: E,
|
|
5390
|
-
children: [g(
|
|
5502
|
+
children: [g(pt, {
|
|
5391
5503
|
asChild: !0,
|
|
5392
5504
|
children: g(X, {
|
|
5393
5505
|
variant: i,
|
|
5394
5506
|
label: t,
|
|
5395
5507
|
size: s,
|
|
5396
|
-
icon: r ?
|
|
5508
|
+
icon: r ? d : void 0,
|
|
5397
5509
|
onClick: () => e(a),
|
|
5398
5510
|
hideLabel: b
|
|
5399
5511
|
})
|
|
5400
|
-
}), g(
|
|
5512
|
+
}), g(mt, {
|
|
5401
5513
|
side: n,
|
|
5402
5514
|
align: o,
|
|
5403
5515
|
className: "w-fit border-none bg-transparent p-2 shadow-none",
|
|
5404
|
-
children: g(
|
|
5516
|
+
children: g(ur, {
|
|
5405
5517
|
mediaUrl: c,
|
|
5406
5518
|
title: l,
|
|
5407
|
-
description:
|
|
5519
|
+
description: h,
|
|
5408
5520
|
onClose: () => e(!1),
|
|
5409
5521
|
dismissible: !1,
|
|
5410
5522
|
width: f,
|
|
5411
5523
|
trackVisibility: p,
|
|
5412
|
-
actions:
|
|
5524
|
+
actions: x,
|
|
5413
5525
|
showConfirmation: !1
|
|
5414
5526
|
})
|
|
5415
5527
|
})]
|
|
5416
|
-
}), (S == null ? void 0 : S.type) === "upsell" && S.showConfirmation && C && g(
|
|
5528
|
+
}), (S == null ? void 0 : S.type) === "upsell" && S.showConfirmation && C && g(Ct, {
|
|
5417
5529
|
open: !0,
|
|
5418
5530
|
onClose: L,
|
|
5419
5531
|
success: C === "success",
|
|
@@ -5425,45 +5537,45 @@ function Br({ isOpen: a, setIsOpen: e, label: t, variant: i = "promote", size: s
|
|
|
5425
5537
|
})]
|
|
5426
5538
|
});
|
|
5427
5539
|
}
|
|
5428
|
-
const
|
|
5540
|
+
const gr = _e(null), pr = ({ children: a, fullScreen: e = !0 }) => {
|
|
5429
5541
|
const t = Y(null), [i, s] = A(t.current);
|
|
5430
|
-
return
|
|
5542
|
+
return ls(() => {
|
|
5431
5543
|
s(t.current);
|
|
5432
|
-
}, []), g(
|
|
5544
|
+
}, []), g(gr.Provider, {
|
|
5433
5545
|
value: {
|
|
5434
5546
|
element: i
|
|
5435
5547
|
},
|
|
5436
5548
|
children: g("div", {
|
|
5437
5549
|
ref: t,
|
|
5438
5550
|
id: "f0-layout",
|
|
5439
|
-
className:
|
|
5551
|
+
className: B({
|
|
5440
5552
|
"flex h-screen w-screen flex-col bg-[#F5F6F8] dark:bg-[#0D1625]": e
|
|
5441
5553
|
}),
|
|
5442
5554
|
children: a
|
|
5443
5555
|
})
|
|
5444
5556
|
});
|
|
5445
|
-
},
|
|
5557
|
+
}, mr = ({ children: a }) => g(as, {
|
|
5446
5558
|
reducedMotion: "user",
|
|
5447
5559
|
children: a
|
|
5448
|
-
}),
|
|
5449
|
-
children: g(
|
|
5560
|
+
}), Kr = ({ children: a, layout: e, link: t, privacyModeInitiallyEnabled: i, image: s, i18n: r, l10n: n, isDev: o = !1, dataCollectionStorageHandler: d, showExperimentalWarnings: c = !1 }) => g(mr, {
|
|
5561
|
+
children: g(Qi, {
|
|
5450
5562
|
isDev: o,
|
|
5451
5563
|
showExperimentalWarnings: c,
|
|
5452
|
-
children: g(
|
|
5564
|
+
children: g(es, {
|
|
5453
5565
|
...n,
|
|
5454
|
-
children: g(
|
|
5566
|
+
children: g(ts, {
|
|
5455
5567
|
...r,
|
|
5456
|
-
children: g(
|
|
5568
|
+
children: g(is, {
|
|
5457
5569
|
...t,
|
|
5458
|
-
children: g(
|
|
5570
|
+
children: g(pr, {
|
|
5459
5571
|
...e,
|
|
5460
|
-
children: g(
|
|
5461
|
-
children: g(
|
|
5572
|
+
children: g(ss, {
|
|
5573
|
+
children: g(rs, {
|
|
5462
5574
|
initiallyEnabled: i,
|
|
5463
|
-
children: g(
|
|
5575
|
+
children: g(ns, {
|
|
5464
5576
|
...s,
|
|
5465
|
-
children: g(
|
|
5466
|
-
handler:
|
|
5577
|
+
children: g(os, {
|
|
5578
|
+
handler: d,
|
|
5467
5579
|
children: a
|
|
5468
5580
|
})
|
|
5469
5581
|
})
|
|
@@ -5474,104 +5586,106 @@ const or = xe(null), ar = ({ children: a, fullScreen: e = !0 }) => {
|
|
|
5474
5586
|
})
|
|
5475
5587
|
})
|
|
5476
5588
|
})
|
|
5477
|
-
}),
|
|
5589
|
+
}), rt = (a) => `datacollection-${a}`, Vr = {
|
|
5478
5590
|
get: async (a) => JSON.parse(
|
|
5479
|
-
localStorage.getItem(
|
|
5591
|
+
localStorage.getItem(rt(a)) ?? "{}"
|
|
5480
5592
|
),
|
|
5481
5593
|
set: async (a, e) => {
|
|
5482
|
-
localStorage.setItem(
|
|
5594
|
+
localStorage.setItem(rt(a), JSON.stringify(e));
|
|
5483
5595
|
}
|
|
5484
5596
|
};
|
|
5485
5597
|
export {
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5598
|
+
Cr as AreaChart,
|
|
5599
|
+
Jr as Await,
|
|
5600
|
+
Rr as BarChart,
|
|
5601
|
+
Nr as CategoryBarChart,
|
|
5602
|
+
Pr as ComboChart,
|
|
5603
|
+
Zr as DndProvider,
|
|
5604
|
+
Qr as EmojiImage,
|
|
5605
|
+
en as F0Avatar,
|
|
5606
|
+
tn as F0AvatarAlert,
|
|
5607
|
+
sn as F0AvatarCompany,
|
|
5608
|
+
rn as F0AvatarDate,
|
|
5609
|
+
nn as F0AvatarEmoji,
|
|
5610
|
+
on as F0AvatarFile,
|
|
5611
|
+
an as F0AvatarIcon,
|
|
5612
|
+
ln as F0AvatarList,
|
|
5613
|
+
_t as F0AvatarModule,
|
|
5614
|
+
dn as F0AvatarPerson,
|
|
5615
|
+
hn as F0AvatarTeam,
|
|
5504
5616
|
X as F0Button,
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5617
|
+
cn as F0ButtonDropdown,
|
|
5618
|
+
un as F0ButtonToggle,
|
|
5619
|
+
fn as F0Card,
|
|
5620
|
+
gn as F0Checkbox,
|
|
5621
|
+
Br as F0ChipList,
|
|
5622
|
+
Fr as F0DatePicker,
|
|
5623
|
+
pn as F0EventCatcherProvider,
|
|
5624
|
+
jr as F0GridStack,
|
|
5625
|
+
Ks as F0Heading,
|
|
5626
|
+
Wi as F0Icon,
|
|
5627
|
+
mn as F0Link,
|
|
5628
|
+
Kr as F0Provider,
|
|
5629
|
+
yn as F0TagAlert,
|
|
5630
|
+
vn as F0TagBalance,
|
|
5631
|
+
bn as F0TagCompany,
|
|
5632
|
+
wn as F0TagDot,
|
|
5633
|
+
xn as F0TagList,
|
|
5634
|
+
_n as F0TagPerson,
|
|
5635
|
+
Fi as F0TagRaw,
|
|
5636
|
+
Gi as F0TagStatus,
|
|
5637
|
+
En as F0TagTeam,
|
|
5638
|
+
Vs as F0Text,
|
|
5639
|
+
Cn as GROUP_ID_SYMBOL,
|
|
5640
|
+
$r as HomeLayout,
|
|
5641
|
+
Dr as LineChart,
|
|
5642
|
+
Rn as OneFilterPicker,
|
|
5643
|
+
Sr as PieChart,
|
|
5644
|
+
rs as PrivacyModeProvider,
|
|
5645
|
+
Kt as ProductBlankslate,
|
|
5646
|
+
Nn as ProductCard,
|
|
5647
|
+
Ur as ProductModal,
|
|
5648
|
+
ur as ProductWidget,
|
|
5649
|
+
kr as ProgressBarChart,
|
|
5650
|
+
Gr as StandardLayout,
|
|
5651
|
+
Dn as TagCounter,
|
|
5652
|
+
Wr as TwoColumnLayout,
|
|
5653
|
+
Ct as UpsellRequestResponseDialog,
|
|
5654
|
+
fr as UpsellingBanner,
|
|
5655
|
+
Rt as UpsellingButton,
|
|
5656
|
+
qr as UpsellingPopover,
|
|
5657
|
+
zr as VerticalBarChart,
|
|
5658
|
+
_r as avatarVariants,
|
|
5659
|
+
Sn as buildTranslations,
|
|
5660
|
+
Lr as buttonDropdownSizes,
|
|
5661
|
+
Or as buttonDropdownVariants,
|
|
5662
|
+
Tr as buttonSizes,
|
|
5663
|
+
Mr as buttonToggleSizes,
|
|
5664
|
+
Ar as buttonVariants,
|
|
5665
|
+
zn as createAtlaskitDriver,
|
|
5666
|
+
kn as createDataSourceDefinition,
|
|
5667
|
+
Vr as dataCollectionLocalStorageHandler,
|
|
5668
|
+
Ir as datepickerSizes,
|
|
5669
|
+
xr as defaultTranslations,
|
|
5670
|
+
Te as experimental,
|
|
5671
|
+
Pn as getAnimationVariants,
|
|
5672
|
+
An as getDataSourcePaginationType,
|
|
5673
|
+
Tn as getEmojiLabel,
|
|
5674
|
+
On as isInfiniteScrollPagination,
|
|
5675
|
+
Ln as isPageBasedPagination,
|
|
5676
|
+
Hr as linkVariants,
|
|
5677
|
+
Mn as modules,
|
|
5678
|
+
Hn as predefinedPresets,
|
|
5679
|
+
Bn as tagDotColors,
|
|
5680
|
+
In as useData,
|
|
5681
|
+
Fn as useDataSource,
|
|
5682
|
+
Gn as useDndEvents,
|
|
5683
|
+
Wn as useDraggable,
|
|
5684
|
+
$n as useDroppableList,
|
|
5685
|
+
jn as useEmojiConfetti,
|
|
5686
|
+
Un as useGroups,
|
|
5687
|
+
qn as usePrivacyMode,
|
|
5688
|
+
Kn as useReducedMotion,
|
|
5689
|
+
Vn as useSelectable,
|
|
5690
|
+
Yn as useXRay
|
|
5577
5691
|
};
|