@oliasoft-open-source/react-ui-library 6.10.0-beta-7 → 6.10.0-beta-8
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/components/color-input/color-input-popover.d.ts +2 -1
- package/dist/components/color-input/color-input-popover.d.ts.map +1 -1
- package/dist/components/color-input/color-input.d.ts +1 -1
- package/dist/components/color-input/color-input.d.ts.map +1 -1
- package/dist/components/color-input/color-input.stories.d.ts +1 -0
- package/dist/components/color-input/color-input.stories.d.ts.map +1 -1
- package/dist/components/color-input/color-input.test-case.stories.d.ts +1 -0
- package/dist/components/color-input/color-input.test-case.stories.d.ts.map +1 -1
- package/dist/global.css +1 -1
- package/dist/index.js +726 -701
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1424,7 +1424,21 @@ var Rr = /* @__PURE__ */ function(e) {
|
|
|
1424
1424
|
})]
|
|
1425
1425
|
})) })
|
|
1426
1426
|
})] });
|
|
1427
|
-
}, xa = (e) => /* @__PURE__ */ v(ui, { children: /* @__PURE__ */ v(ba, { ...e }) }), Sa = {
|
|
1427
|
+
}, xa = (e) => /* @__PURE__ */ v(ui, { children: /* @__PURE__ */ v(ba, { ...e }) }), Sa = { grid: "_grid_obkz4_1" }, Ca = (e) => typeof e == "boolean" ? e ? "var(--padding)" : "0px" : typeof e == "number" ? `${e}px` : e || "initial", wa = (e) => typeof e == "number" ? `${e}px` : e || "initial", Ta = ({ rows: e = "initial", columns: t = "initial", columnsTablet: n = null, columnsMobile: r = null, gap: i = !1, height: a = "initial", children: o }) => {
|
|
1428
|
+
let s = {
|
|
1429
|
+
"--grid-gap": Ca(i),
|
|
1430
|
+
"--grid-rows": wa(e),
|
|
1431
|
+
"--grid-columns": wa(t),
|
|
1432
|
+
"--grid-height": wa(a),
|
|
1433
|
+
...n != null && { "--grid-columns-tablet": wa(n) },
|
|
1434
|
+
...r != null && { "--grid-columns-mobile": wa(r) }
|
|
1435
|
+
};
|
|
1436
|
+
return /* @__PURE__ */ v("div", {
|
|
1437
|
+
className: Sa.grid,
|
|
1438
|
+
style: s,
|
|
1439
|
+
children: o
|
|
1440
|
+
});
|
|
1441
|
+
}, Ea = {
|
|
1428
1442
|
colorInput: "_colorInput_7lrll_1",
|
|
1429
1443
|
swatch: "_swatch_7lrll_5",
|
|
1430
1444
|
small: "_small_7lrll_12",
|
|
@@ -1436,70 +1450,70 @@ var Rr = /* @__PURE__ */ function(e) {
|
|
|
1436
1450
|
colorThumb: "_colorThumb_7lrll_39",
|
|
1437
1451
|
hueSliderTrack: "_hueSliderTrack_7lrll_48",
|
|
1438
1452
|
hueSlider: "_hueSlider_7lrll_48"
|
|
1439
|
-
},
|
|
1440
|
-
className:
|
|
1453
|
+
}, Da = ({ disabled: e }) => /* @__PURE__ */ y("div", {
|
|
1454
|
+
className: Ea.areaPicker,
|
|
1441
1455
|
children: [/* @__PURE__ */ v(bn, {
|
|
1442
|
-
className:
|
|
1456
|
+
className: Ea.colorArea,
|
|
1443
1457
|
colorSpace: "hsb",
|
|
1444
1458
|
xChannel: "saturation",
|
|
1445
1459
|
yChannel: "brightness",
|
|
1446
1460
|
isDisabled: e,
|
|
1447
|
-
children: /* @__PURE__ */ v(En, { className:
|
|
1461
|
+
children: /* @__PURE__ */ v(En, { className: Ea.colorThumb })
|
|
1448
1462
|
}), /* @__PURE__ */ v(Sn, {
|
|
1449
|
-
className:
|
|
1463
|
+
className: Ea.hueSlider,
|
|
1450
1464
|
colorSpace: "hsb",
|
|
1451
1465
|
channel: "hue",
|
|
1452
1466
|
isDisabled: e,
|
|
1453
1467
|
children: /* @__PURE__ */ v(Dn, {
|
|
1454
|
-
className:
|
|
1455
|
-
children: /* @__PURE__ */ v(En, { className:
|
|
1468
|
+
className: Ea.hueSliderTrack,
|
|
1469
|
+
children: /* @__PURE__ */ v(En, { className: Ea.colorThumb })
|
|
1456
1470
|
})
|
|
1457
1471
|
})]
|
|
1458
1472
|
});
|
|
1459
1473
|
//#endregion
|
|
1460
1474
|
//#region src/components/color-input/color-input-utils.ts
|
|
1461
1475
|
An([jn]);
|
|
1462
|
-
var
|
|
1476
|
+
var Oa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), ka = (e) => {
|
|
1463
1477
|
try {
|
|
1464
1478
|
return Mn(e);
|
|
1465
1479
|
} catch {
|
|
1466
1480
|
return;
|
|
1467
1481
|
}
|
|
1468
|
-
},
|
|
1482
|
+
}, Aa = (e) => {
|
|
1469
1483
|
let t = kn(e);
|
|
1470
1484
|
if (t.isValid()) return Mn(t.toHex());
|
|
1471
|
-
let n =
|
|
1485
|
+
let n = Oa(e);
|
|
1472
1486
|
if (n === e) return;
|
|
1473
1487
|
let r = kn(n);
|
|
1474
1488
|
return r.isValid() ? Mn(r.toHex()) : void 0;
|
|
1475
|
-
},
|
|
1489
|
+
}, ja = (e) => {
|
|
1476
1490
|
var t;
|
|
1477
|
-
if (e) return (t =
|
|
1478
|
-
},
|
|
1491
|
+
if (e) return (t = ka(e)) == null ? Aa(e) : t;
|
|
1492
|
+
}, Ma = (e) => {
|
|
1479
1493
|
var t;
|
|
1480
|
-
return ((t =
|
|
1481
|
-
},
|
|
1494
|
+
return ((t = ja(e)) == null ? Mn("#808080") : t).toFormat("hsb");
|
|
1495
|
+
}, Na = (e) => e.toString("hex"), Pa = (e) => {
|
|
1482
1496
|
let t = e.toFormat("hsb");
|
|
1483
1497
|
return t.getChannelValue("saturation") === 0 || t.getChannelValue("brightness") === 0;
|
|
1484
|
-
},
|
|
1498
|
+
}, Fa = (e, t) => {
|
|
1485
1499
|
if (e.toString("hex") !== t.toString("hex")) return !1;
|
|
1486
1500
|
let n = e.toFormat("hsb"), r = t.toFormat("hsb");
|
|
1487
|
-
return
|
|
1488
|
-
},
|
|
1489
|
-
if (
|
|
1501
|
+
return Pa(n) ? n.getChannelValue("hue") === r.getChannelValue("hue") : !0;
|
|
1502
|
+
}, Ia = (e, t) => {
|
|
1503
|
+
if (Fa(e, t)) return t.toFormat("hsb");
|
|
1490
1504
|
let n = e.toFormat("hsb"), r = t.toFormat("hsb");
|
|
1491
|
-
return n.toString("hex") === r.toString("hex") &&
|
|
1492
|
-
},
|
|
1505
|
+
return n.toString("hex") === r.toString("hex") && Pa(n) ? n.withChannelValue("hue", r.getChannelValue("hue")) : n;
|
|
1506
|
+
}, La = ({ columns: e, options: t, onSwatchSelect: n, selectedValue: r }) => /* @__PURE__ */ v(wn, {
|
|
1493
1507
|
layout: "grid",
|
|
1494
|
-
className:
|
|
1508
|
+
className: Ea.swatchPicker,
|
|
1495
1509
|
style: e ? {
|
|
1496
1510
|
display: "grid",
|
|
1497
1511
|
gridTemplateColumns: `repeat(${e}, auto)`
|
|
1498
1512
|
} : void 0,
|
|
1499
1513
|
children: t.map((e) => {
|
|
1500
|
-
let t =
|
|
1514
|
+
let t = ja(e.value);
|
|
1501
1515
|
if (!t) return null;
|
|
1502
|
-
let i = r &&
|
|
1516
|
+
let i = r && Fa(t, r);
|
|
1503
1517
|
return /* @__PURE__ */ v(Tn, {
|
|
1504
1518
|
color: t,
|
|
1505
1519
|
"aria-label": e.label,
|
|
@@ -1508,7 +1522,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1508
1522
|
round: !0,
|
|
1509
1523
|
basic: !0,
|
|
1510
1524
|
icon: /* @__PURE__ */ v(Cn, {
|
|
1511
|
-
className:
|
|
1525
|
+
className: Ea.swatch,
|
|
1512
1526
|
color: t,
|
|
1513
1527
|
colorName: e.label
|
|
1514
1528
|
}),
|
|
@@ -1517,87 +1531,112 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1517
1531
|
})
|
|
1518
1532
|
}, e.value);
|
|
1519
1533
|
})
|
|
1520
|
-
}),
|
|
1521
|
-
let { locale:
|
|
1522
|
-
c(() => () =>
|
|
1523
|
-
if (
|
|
1524
|
-
let e =
|
|
1525
|
-
|
|
1526
|
-
}, [
|
|
1527
|
-
let
|
|
1534
|
+
}), Ra = 150, za = ({ adjustColorsInDarkMode: e = !1, children: t, columns: n, disabled: r, hideAreaPicker: i = !1, onChange: a, onConfirm: o, options: s = [], testId: l, value: u }) => {
|
|
1535
|
+
let { locale: f } = On(), [p, h] = m(!1), [_, b] = m(() => Ma(u)), x = ja(u), S = d(() => Qt((e) => a == null ? void 0 : a(e), Ra), [a]);
|
|
1536
|
+
c(() => () => S.cancel(), [S]), c(() => {
|
|
1537
|
+
if (p) return;
|
|
1538
|
+
let e = Ma(u);
|
|
1539
|
+
b((t) => Ia(e, t));
|
|
1540
|
+
}, [u, p]);
|
|
1541
|
+
let C = (e) => {
|
|
1528
1542
|
let t = e.toFormat("hsb");
|
|
1529
|
-
|
|
1530
|
-
},
|
|
1531
|
-
|
|
1532
|
-
}, w = (e) => {
|
|
1533
|
-
e ? _((e) => Ma(Oa(l), e)) : C(), p(e);
|
|
1543
|
+
b(t), !o && S(Na(t));
|
|
1544
|
+
}, w = () => {
|
|
1545
|
+
S.cancel(), Fa(Ma(u), _) || a == null || a(Na(_));
|
|
1534
1546
|
}, T = (e) => {
|
|
1547
|
+
e ? b((e) => Ia(Ma(u), e)) : o || w(), h(e);
|
|
1548
|
+
}, E = (e) => {
|
|
1535
1549
|
let t = e.toFormat("hsb");
|
|
1536
|
-
|
|
1537
|
-
},
|
|
1550
|
+
S.cancel(), b(t), !o && (a == null || a(Na(t)), h(!1));
|
|
1551
|
+
}, D = () => {
|
|
1552
|
+
w(), o == null || o(Na(_)), h(!1);
|
|
1553
|
+
}, O = () => {
|
|
1554
|
+
h(!1);
|
|
1555
|
+
}, k = d(() => {
|
|
1538
1556
|
var e;
|
|
1539
|
-
let t = (e =
|
|
1540
|
-
let t =
|
|
1541
|
-
return t &&
|
|
1557
|
+
let t = (e = s.find((e) => {
|
|
1558
|
+
let t = ja(e.value);
|
|
1559
|
+
return t && Fa(t, _);
|
|
1542
1560
|
})) == null ? void 0 : e.label;
|
|
1543
1561
|
if (t) return t;
|
|
1544
|
-
let n =
|
|
1562
|
+
let n = _.getColorName(f).split(" ").pop();
|
|
1545
1563
|
return n ? vn(n) : void 0;
|
|
1546
1564
|
}, [
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
]),
|
|
1551
|
-
isOpen:
|
|
1552
|
-
colorName:
|
|
1553
|
-
displayColor:
|
|
1565
|
+
s,
|
|
1566
|
+
_,
|
|
1567
|
+
f
|
|
1568
|
+
]), A = e ? Ea.adjustColorsInDarkMode : void 0, j = typeof t == "function" ? t({
|
|
1569
|
+
isOpen: p,
|
|
1570
|
+
colorName: k,
|
|
1571
|
+
displayColor: x
|
|
1554
1572
|
}) : t;
|
|
1555
1573
|
return /* @__PURE__ */ v("div", {
|
|
1556
|
-
className: g(
|
|
1574
|
+
className: g(Ea.colorInput, A),
|
|
1557
1575
|
children: /* @__PURE__ */ v(xn, {
|
|
1558
|
-
value:
|
|
1559
|
-
onChange:
|
|
1576
|
+
value: _,
|
|
1577
|
+
onChange: C,
|
|
1560
1578
|
children: /* @__PURE__ */ v(xa, {
|
|
1561
1579
|
placement: "bottom-start",
|
|
1562
|
-
isOpen:
|
|
1563
|
-
onToggle:
|
|
1580
|
+
isOpen: p,
|
|
1581
|
+
onToggle: T,
|
|
1564
1582
|
disabled: r,
|
|
1565
|
-
testId:
|
|
1583
|
+
testId: l,
|
|
1566
1584
|
content: /* @__PURE__ */ y("div", {
|
|
1567
|
-
className: g(
|
|
1568
|
-
children: [
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1585
|
+
className: g(Ea.popoverContent, A),
|
|
1586
|
+
children: [
|
|
1587
|
+
!i && /* @__PURE__ */ v(Da, { disabled: r }),
|
|
1588
|
+
s.length > 0 && /* @__PURE__ */ v(La, {
|
|
1589
|
+
columns: n,
|
|
1590
|
+
options: s,
|
|
1591
|
+
onSwatchSelect: E,
|
|
1592
|
+
selectedValue: _
|
|
1593
|
+
}),
|
|
1594
|
+
o && /* @__PURE__ */ y(Ta, {
|
|
1595
|
+
columns: "1fr 1fr",
|
|
1596
|
+
gap: "var(--padding-sm)",
|
|
1597
|
+
children: [/* @__PURE__ */ v(K, {
|
|
1598
|
+
small: !0,
|
|
1599
|
+
icon: "check",
|
|
1600
|
+
onClick: D,
|
|
1601
|
+
testId: l ? `${l}-confirm` : void 0,
|
|
1602
|
+
width: "100%"
|
|
1603
|
+
}), /* @__PURE__ */ v(K, {
|
|
1604
|
+
small: !0,
|
|
1605
|
+
icon: "times",
|
|
1606
|
+
onClick: O,
|
|
1607
|
+
testId: l ? `${l}-cancel` : void 0,
|
|
1608
|
+
width: "100%"
|
|
1609
|
+
})]
|
|
1610
|
+
})
|
|
1611
|
+
]
|
|
1574
1612
|
}),
|
|
1575
|
-
children:
|
|
1613
|
+
children: j
|
|
1576
1614
|
})
|
|
1577
1615
|
})
|
|
1578
1616
|
});
|
|
1579
|
-
},
|
|
1617
|
+
}, Ba = ({ adjustColorsInDarkMode: e, columns: t, disabled: n, hideAreaPicker: r = !1, onChange: i, onConfirm: a, options: o = [], small: s, testId: c, value: l }) => /* @__PURE__ */ v(za, {
|
|
1580
1618
|
adjustColorsInDarkMode: e,
|
|
1581
1619
|
columns: t,
|
|
1582
1620
|
disabled: n,
|
|
1583
1621
|
hideAreaPicker: r,
|
|
1584
1622
|
onChange: i,
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1623
|
+
onConfirm: a,
|
|
1624
|
+
options: o,
|
|
1625
|
+
testId: c,
|
|
1626
|
+
value: l,
|
|
1588
1627
|
children: ({ isOpen: e, colorName: t, displayColor: r }) => /* @__PURE__ */ v(K, {
|
|
1589
1628
|
round: !0,
|
|
1590
1629
|
disabled: n,
|
|
1591
1630
|
basic: !0,
|
|
1592
|
-
small:
|
|
1631
|
+
small: s,
|
|
1593
1632
|
active: e,
|
|
1594
1633
|
tooltip: t,
|
|
1595
1634
|
icon: /* @__PURE__ */ v(Cn, {
|
|
1596
|
-
className: g(
|
|
1635
|
+
className: g(Ea.swatch, s && Ea.small),
|
|
1597
1636
|
color: r
|
|
1598
1637
|
})
|
|
1599
1638
|
})
|
|
1600
|
-
}),
|
|
1639
|
+
}), Va = {
|
|
1601
1640
|
inputInTable: "_inputInTable_10dx9_1",
|
|
1602
1641
|
inputHover: "_inputHover_10dx9_13",
|
|
1603
1642
|
inputFocus: "_inputFocus_10dx9_18",
|
|
@@ -1609,15 +1648,15 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1609
1648
|
noScrollbar: "_noScrollbar_10dx9_94",
|
|
1610
1649
|
inner: "_inner_10dx9_104",
|
|
1611
1650
|
innerFlexbox: "_innerFlexbox_10dx9_111"
|
|
1612
|
-
},
|
|
1651
|
+
}, Ha = (e) => {
|
|
1613
1652
|
if (typeof e == "string") return e;
|
|
1614
1653
|
if (typeof e == "number") return `${e}px`;
|
|
1615
|
-
},
|
|
1654
|
+
}, Ua = (e) => {
|
|
1616
1655
|
if (e === !0) return "1px solid var(--color-border)";
|
|
1617
1656
|
if (typeof e == "string") return e;
|
|
1618
|
-
},
|
|
1657
|
+
}, Wa = (e) => e === !0 ? "var(--padding)" : e === !1 ? "0" : e, Ga = ({ background: e = "transparent", borderLeft: t, borderRight: n, children: r = null, flex: i = !0, flexbox: a = !1, padding: o = !1, scroll: s = !1, showScrollbar: c = !0, spacing: l = "var(--padding)", width: u, widthMobile: d, widthTablet: f, testId: p }) => {
|
|
1619
1658
|
var m, h, _;
|
|
1620
|
-
let y =
|
|
1659
|
+
let y = Ha(u), b = Ha(f), x = Ha(d), S = Ua(t), C = Ua(n), w = Wa(o), T = {
|
|
1621
1660
|
"--column-width": y || "auto",
|
|
1622
1661
|
"--column-width-tablet": (m = b == null ? y : b) == null ? "auto" : m,
|
|
1623
1662
|
"--column-width-mobile": (h = (_ = x == null ? b : x) == null ? y : _) == null ? "auto" : h,
|
|
@@ -1630,20 +1669,20 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1630
1669
|
padding: l ? `0 calc(${l} / 2)` : 0
|
|
1631
1670
|
};
|
|
1632
1671
|
return /* @__PURE__ */ v("div", {
|
|
1633
|
-
className: g(
|
|
1672
|
+
className: g(Va.column, !c && Va.noScrollbar),
|
|
1634
1673
|
style: T,
|
|
1635
1674
|
children: /* @__PURE__ */ v("div", {
|
|
1636
|
-
className: g(
|
|
1675
|
+
className: g(Va.inner, a && !s && Va.innerFlexbox),
|
|
1637
1676
|
style: { padding: w },
|
|
1638
1677
|
"data-testid": p,
|
|
1639
1678
|
children: r
|
|
1640
1679
|
})
|
|
1641
1680
|
});
|
|
1642
|
-
},
|
|
1681
|
+
}, Ka = {
|
|
1643
1682
|
divider: "_divider_2bfzh_1",
|
|
1644
1683
|
alignLeft: "_alignLeft_2bfzh_12",
|
|
1645
1684
|
alignRight: "_alignRight_2bfzh_15"
|
|
1646
|
-
},
|
|
1685
|
+
}, qa = {
|
|
1647
1686
|
bold: "_bold_11ofj_1",
|
|
1648
1687
|
center: "_center_11ofj_4",
|
|
1649
1688
|
muted: "_muted_11ofj_7",
|
|
@@ -1653,41 +1692,41 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1653
1692
|
error: "_error_11ofj_19",
|
|
1654
1693
|
small: "_small_11ofj_22",
|
|
1655
1694
|
link: "_link_11ofj_25"
|
|
1656
|
-
},
|
|
1657
|
-
className: g(t &&
|
|
1695
|
+
}, Ja = ({ children: e, bold: t = !1, center: n = !1, error: r = !1, faint: i = !1, link: a = !1, muted: o = !1, onClick: s, small: c = !1, success: l = !1, warning: u = !1 }) => /* @__PURE__ */ v("span", {
|
|
1696
|
+
className: g(t && qa.bold, n && qa.center, r && qa.error, i && qa.faint, a && qa.link, o && qa.muted, s && qa.clickable, c && qa.small, l && qa.success, u && qa.warning),
|
|
1658
1697
|
onClick: s,
|
|
1659
1698
|
children: e
|
|
1660
|
-
}),
|
|
1699
|
+
}), Ya = (e) => {
|
|
1661
1700
|
switch (e) {
|
|
1662
|
-
case Br.LEFT: return
|
|
1663
|
-
case Br.RIGHT: return
|
|
1701
|
+
case Br.LEFT: return Ka.alignLeft;
|
|
1702
|
+
case Br.RIGHT: return Ka.alignRight;
|
|
1664
1703
|
default: return "";
|
|
1665
1704
|
}
|
|
1666
|
-
},
|
|
1667
|
-
className: `${
|
|
1705
|
+
}, Xa = ({ children: e, margin: t = "var(--padding)", color: n = "var(--color-border)", align: r = Br.CENTER }) => /* @__PURE__ */ v("div", {
|
|
1706
|
+
className: `${Ka.divider} ${Ya(r)}`,
|
|
1668
1707
|
style: {
|
|
1669
1708
|
marginTop: t,
|
|
1670
1709
|
marginBottom: t,
|
|
1671
1710
|
"--color": n
|
|
1672
1711
|
},
|
|
1673
|
-
children: typeof e == "string" ? /* @__PURE__ */ v(
|
|
1712
|
+
children: typeof e == "string" ? /* @__PURE__ */ v(Ja, {
|
|
1674
1713
|
muted: !0,
|
|
1675
1714
|
children: e
|
|
1676
1715
|
}) : e
|
|
1677
|
-
}),
|
|
1716
|
+
}), Za = {
|
|
1678
1717
|
heading: "_heading_yhdiy_1",
|
|
1679
1718
|
top: "_top_yhdiy_10",
|
|
1680
1719
|
icons: "_icons_yhdiy_20"
|
|
1681
|
-
},
|
|
1720
|
+
}, Qa = ({ children: e, helpText: t, onClick: n, onClickHelp: r, onIconClick: i, icon: a, libraryIcon: o, marginBottom: s, top: c = !1, testId: l }) => {
|
|
1682
1721
|
var u;
|
|
1683
1722
|
let d = !!t || !!r;
|
|
1684
1723
|
return /* @__PURE__ */ y("div", {
|
|
1685
|
-
className: g(
|
|
1724
|
+
className: g(Za.heading, c ? Za.top : ""),
|
|
1686
1725
|
style: { marginBottom: s },
|
|
1687
1726
|
onClick: n,
|
|
1688
1727
|
"data-testid": l,
|
|
1689
1728
|
children: [e, /* @__PURE__ */ y("div", {
|
|
1690
|
-
className:
|
|
1729
|
+
className: Za.icons,
|
|
1691
1730
|
children: [
|
|
1692
1731
|
a && /* @__PURE__ */ v(Si, {
|
|
1693
1732
|
onClick: i,
|
|
@@ -1705,7 +1744,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1705
1744
|
]
|
|
1706
1745
|
})]
|
|
1707
1746
|
});
|
|
1708
|
-
},
|
|
1747
|
+
}, $a = {
|
|
1709
1748
|
dialog: "_dialog_xouqi_1",
|
|
1710
1749
|
inline: "_inline_xouqi_18",
|
|
1711
1750
|
scroll: "_scroll_xouqi_21",
|
|
@@ -1714,14 +1753,14 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1714
1753
|
subheading: "_subheading_xouqi_38",
|
|
1715
1754
|
content: "_content_xouqi_41",
|
|
1716
1755
|
footer: "_footer_xouqi_50"
|
|
1717
|
-
},
|
|
1756
|
+
}, eo = (e) => tn(e) ? e.map((e, n) => /* @__PURE__ */ y(t, { children: [
|
|
1718
1757
|
e,
|
|
1719
1758
|
" ",
|
|
1720
1759
|
/* @__PURE__ */ v("br", {})
|
|
1721
|
-
] }, n)) : e,
|
|
1760
|
+
] }, n)) : e, to = ({ dialog: e }) => {
|
|
1722
1761
|
let { heading: t, subheading: n, content: r, contentPadding: i = "var(--padding)", footer: a, scroll: o, width: s, height: c, onClose: l, testId: u } = e;
|
|
1723
1762
|
return /* @__PURE__ */ y("div", {
|
|
1724
|
-
className: g(
|
|
1763
|
+
className: g($a.dialog, s ? $a.inline : null, o ? $a.scroll : null),
|
|
1725
1764
|
style: {
|
|
1726
1765
|
width: s,
|
|
1727
1766
|
height: c
|
|
@@ -1729,17 +1768,17 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1729
1768
|
"data-testid": u == null ? null : u,
|
|
1730
1769
|
children: [
|
|
1731
1770
|
/* @__PURE__ */ y("div", {
|
|
1732
|
-
className:
|
|
1733
|
-
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v(
|
|
1771
|
+
className: $a.header,
|
|
1772
|
+
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v(Qa, {
|
|
1734
1773
|
testId: u && `${u}-heading`,
|
|
1735
1774
|
top: !0,
|
|
1736
1775
|
marginBottom: 0,
|
|
1737
1776
|
children: t
|
|
1738
1777
|
}), /* @__PURE__ */ v("div", {
|
|
1739
|
-
className:
|
|
1778
|
+
className: $a.subheading,
|
|
1740
1779
|
children: n
|
|
1741
1780
|
})] }), l ? /* @__PURE__ */ v("div", {
|
|
1742
|
-
className:
|
|
1781
|
+
className: $a.dismiss,
|
|
1743
1782
|
children: /* @__PURE__ */ v(K, {
|
|
1744
1783
|
icon: H.CLOSE,
|
|
1745
1784
|
round: !0,
|
|
@@ -1754,18 +1793,18 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1754
1793
|
}),
|
|
1755
1794
|
/* @__PURE__ */ v("div", {
|
|
1756
1795
|
"data-testid": u && `${u}-content`,
|
|
1757
|
-
className:
|
|
1796
|
+
className: $a.content,
|
|
1758
1797
|
style: { padding: i },
|
|
1759
|
-
children:
|
|
1798
|
+
children: eo(r)
|
|
1760
1799
|
}),
|
|
1761
1800
|
a && /* @__PURE__ */ v("div", {
|
|
1762
1801
|
"data-testid": u && `${u}-footer`,
|
|
1763
|
-
className:
|
|
1802
|
+
className: $a.footer,
|
|
1764
1803
|
children: a
|
|
1765
1804
|
})
|
|
1766
1805
|
]
|
|
1767
1806
|
});
|
|
1768
|
-
},
|
|
1807
|
+
}, no = {
|
|
1769
1808
|
inputInTable: "_inputInTable_c4h57_1",
|
|
1770
1809
|
inputHover: "_inputHover_c4h57_13",
|
|
1771
1810
|
inputFocus: "_inputFocus_c4h57_18",
|
|
@@ -1791,19 +1830,19 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1791
1830
|
disabled: "_disabled_c4h57_224",
|
|
1792
1831
|
tabsContent: "_tabsContent_c4h57_231",
|
|
1793
1832
|
resizeHandle: "_resizeHandle_c4h57_237"
|
|
1794
|
-
},
|
|
1833
|
+
}, ro = ({ badge: e, children: t }) => e ? /* @__PURE__ */ v(Xi, {
|
|
1795
1834
|
small: !0,
|
|
1796
1835
|
margin: 4,
|
|
1797
1836
|
title: e.toString(),
|
|
1798
1837
|
children: t
|
|
1799
|
-
}) : /* @__PURE__ */ v(_, { children: t }),
|
|
1800
|
-
className:
|
|
1838
|
+
}) : /* @__PURE__ */ v(_, { children: t }), io = ({ tabs: e, activeTab: t, open: n, background: r, handleTabClick: i, width: a, testId: o }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", {
|
|
1839
|
+
className: no.tabs,
|
|
1801
1840
|
children: e.map((e, a) => sn(e) || rn(e) ? null : /* @__PURE__ */ v("div", {
|
|
1802
|
-
className: g(
|
|
1841
|
+
className: g(no.tab, t === a && n ? no.active : "", e.disabled ? no.disabled : ""),
|
|
1803
1842
|
style: { background: r },
|
|
1804
1843
|
onClick: e.disabled ? void 0 : () => i(a),
|
|
1805
1844
|
"data-testid": o && `${o}-icon-${a}`,
|
|
1806
|
-
children: /* @__PURE__ */ v(
|
|
1845
|
+
children: /* @__PURE__ */ v(ro, {
|
|
1807
1846
|
badge: e.badge,
|
|
1808
1847
|
children: e.icon
|
|
1809
1848
|
})
|
|
@@ -1816,21 +1855,21 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1816
1855
|
width: typeof a == "number" ? `${a}px` : a,
|
|
1817
1856
|
display: i ? "block" : "none"
|
|
1818
1857
|
},
|
|
1819
|
-
className:
|
|
1858
|
+
className: no.tabsContent,
|
|
1820
1859
|
"data-testid": o && `${o}-content-${r}`,
|
|
1821
1860
|
children: i && n && e.content
|
|
1822
1861
|
}, r);
|
|
1823
|
-
})] }),
|
|
1862
|
+
})] }), ao = r((e, t) => {
|
|
1824
1863
|
let { handleAxis: n, ...r } = e;
|
|
1825
1864
|
return /* @__PURE__ */ v("div", {
|
|
1826
1865
|
ref: t,
|
|
1827
|
-
className:
|
|
1866
|
+
className: no.resizeHandle,
|
|
1828
1867
|
...r,
|
|
1829
1868
|
children: /* @__PURE__ */ v(W, { icon: H.DRAG })
|
|
1830
1869
|
});
|
|
1831
|
-
}),
|
|
1870
|
+
}), oo = Nn, so = ({ children: e = null, width: t = 400, right: n = !1, onResize: r, setOpen: i, maxOpenWidth: a }) => {
|
|
1832
1871
|
let [o, s] = m(!1), c = a == null ? window.innerWidth / 2 : a;
|
|
1833
|
-
return r ? /* @__PURE__ */ v(
|
|
1872
|
+
return r ? /* @__PURE__ */ v(oo, {
|
|
1834
1873
|
width: _n(t),
|
|
1835
1874
|
height: 100,
|
|
1836
1875
|
minConstraints: [35, Infinity],
|
|
@@ -1838,10 +1877,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1838
1877
|
onResize: (e, { size: t }) => {
|
|
1839
1878
|
r && r(t.width);
|
|
1840
1879
|
},
|
|
1841
|
-
handle: /* @__PURE__ */ v(
|
|
1880
|
+
handle: /* @__PURE__ */ v(ao, {}),
|
|
1842
1881
|
resizeHandles: n ? ["w"] : ["e"],
|
|
1843
1882
|
axis: "x",
|
|
1844
|
-
className: o ?
|
|
1883
|
+
className: o ? no.isResizing : "",
|
|
1845
1884
|
onResizeStart: () => {
|
|
1846
1885
|
i && i(!0), r && r(t), s(!0);
|
|
1847
1886
|
},
|
|
@@ -1850,25 +1889,25 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1850
1889
|
},
|
|
1851
1890
|
children: e
|
|
1852
1891
|
}) : /* @__PURE__ */ v(_, { children: e });
|
|
1853
|
-
},
|
|
1892
|
+
}, co = ({ background: e = "var(--color-background-raised)", fixed: t = !1, open: n = !1, setOpen: r, right: a = !1, width: o = 400, closedWidth: s = 0, shadow: c = !1, top: l = 0, button: u = null, buttonAnimate: d = !0, buttonPosition: f = Vr.BOTTOM, border: p = !1, children: h = null, tabs: _, defaultTabIndex: b = 0, activeTab: x, setActiveTab: S, testId: C, onResize: w, getActiveTab: T, onClose: E, onOpen: D, maxOpenWidth: O }) => {
|
|
1854
1893
|
let k = u === !0, A = !k && i(u), [j, M] = r ? [n, r] : k || _ ? m(n) : [n, () => {}], [N, P] = m(b), F = r ? n : j, I = r || M, L = S === void 0 ? N : x, R = S || P, ee = Array.isArray(o) ? o[L || 0] : o, te = F ? ee : _ ? 35 : s;
|
|
1855
|
-
return /* @__PURE__ */ v(
|
|
1894
|
+
return /* @__PURE__ */ v(so, {
|
|
1856
1895
|
width: te,
|
|
1857
1896
|
onResize: w,
|
|
1858
1897
|
setOpen: I,
|
|
1859
1898
|
right: a,
|
|
1860
1899
|
maxOpenWidth: O,
|
|
1861
1900
|
children: /* @__PURE__ */ y("div", {
|
|
1862
|
-
className: g(
|
|
1901
|
+
className: g(no.drawer, c ? no.shadow : "", t ? no.fixed : no.inline, a ? no.right : no.left),
|
|
1863
1902
|
style: { top: l },
|
|
1864
1903
|
children: [/* @__PURE__ */ v("div", {
|
|
1865
|
-
className: g(
|
|
1904
|
+
className: g(no.drawerContent, p && no.border),
|
|
1866
1905
|
style: {
|
|
1867
1906
|
background: e,
|
|
1868
1907
|
borderColor: typeof p == "string" ? p : void 0,
|
|
1869
1908
|
width: te
|
|
1870
1909
|
},
|
|
1871
|
-
children: _ ? /* @__PURE__ */ v(
|
|
1910
|
+
children: _ ? /* @__PURE__ */ v(io, {
|
|
1872
1911
|
width: ee,
|
|
1873
1912
|
testId: C,
|
|
1874
1913
|
tabs: _,
|
|
@@ -1893,7 +1932,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1893
1932
|
children: h
|
|
1894
1933
|
})
|
|
1895
1934
|
}), u && /* @__PURE__ */ v("span", {
|
|
1896
|
-
className: g(
|
|
1935
|
+
className: g(no.toggleButton, j && (k || A && d) ? no.toggleButtonOpen : "", f === "top" ? no.top : no.bottom),
|
|
1897
1936
|
children: A ? u : /* @__PURE__ */ v(K, {
|
|
1898
1937
|
onClick: I ? () => I(!F) : void 0,
|
|
1899
1938
|
round: !0,
|
|
@@ -1902,20 +1941,20 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1902
1941
|
})]
|
|
1903
1942
|
})
|
|
1904
1943
|
});
|
|
1905
|
-
},
|
|
1944
|
+
}, lo = { inputGroup: "_inputGroup_biuoa_1" }, uo = (e) => i(e) && typeof e.type == "string", fo = ({ children: n, small: r = !1, width: a = "100%" }) => {
|
|
1906
1945
|
let o = Array.isArray(n) ? n.filter((e) => i(e)) : [n], s = o.map((n, i) => {
|
|
1907
|
-
let a =
|
|
1946
|
+
let a = uo(n), { groupOrder: s } = a ? { groupOrder: null } : n.props, c = o.length, l = i === 0, u = i === c - 1, d = s || (!c || c === 1 ? null : l ? V.FIRST : u ? V.LAST : V.MIDDLE);
|
|
1908
1947
|
return a ? n : /* @__PURE__ */ v(t, { children: e.cloneElement(n, {
|
|
1909
1948
|
groupOrder: d,
|
|
1910
1949
|
small: r
|
|
1911
1950
|
}) }, i);
|
|
1912
1951
|
});
|
|
1913
1952
|
return /* @__PURE__ */ v("div", {
|
|
1914
|
-
className: g(
|
|
1953
|
+
className: g(lo.inputGroup),
|
|
1915
1954
|
style: { width: a },
|
|
1916
1955
|
children: s
|
|
1917
1956
|
});
|
|
1918
|
-
},
|
|
1957
|
+
}, po = {
|
|
1919
1958
|
inputInTable: "_inputInTable_crjt7_1",
|
|
1920
1959
|
inputHover: "_inputHover_crjt7_13",
|
|
1921
1960
|
inputFocus: "_inputFocus_crjt7_18",
|
|
@@ -1932,18 +1971,18 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1932
1971
|
groupOrderMiddle: "_groupOrderMiddle_crjt7_177",
|
|
1933
1972
|
groupOrderLast: "_groupOrderLast_crjt7_181",
|
|
1934
1973
|
icon: "_icon_crjt7_186"
|
|
1935
|
-
},
|
|
1974
|
+
}, mo = r(({ error: e = null, tooltip: t = null, isInTable: n, width: r = void 0, small: i = !1, onChange: a = pn, placeholder: o = "", value: c = "", icon: l, onKeyPress: u = () => {}, onFocus: d = () => {}, onBlur: f = () => {}, onPaste: p = () => {}, onKeyDown: m = () => {}, selectOnFocus: h = !0, name: _ = void 0, type: b = "text", tabIndex: x = 0, disabled: S = !1, right: C = !1, warning: w = null, groupOrder: T = null, maxTooltipWidth: E = void 0, testId: D = void 0, size: O = null }, k) => {
|
|
1936
1975
|
let A = s(U), j = (() => {
|
|
1937
1976
|
if (T) switch (T) {
|
|
1938
|
-
case V.FIRST: return
|
|
1939
|
-
case V.LAST: return
|
|
1940
|
-
default: return
|
|
1977
|
+
case V.FIRST: return po.groupOrderFirst;
|
|
1978
|
+
case V.LAST: return po.groupOrderLast;
|
|
1979
|
+
default: return po.groupOrderMiddle;
|
|
1941
1980
|
}
|
|
1942
1981
|
return "";
|
|
1943
1982
|
})(), M = r || (O ? "auto" : "100%");
|
|
1944
1983
|
return /* @__PURE__ */ v("div", {
|
|
1945
1984
|
style: { width: M },
|
|
1946
|
-
className: g(j,
|
|
1985
|
+
className: g(j, po.wrapper),
|
|
1947
1986
|
children: /* @__PURE__ */ y(G, {
|
|
1948
1987
|
error: !!e,
|
|
1949
1988
|
warning: !!w,
|
|
@@ -1952,7 +1991,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1952
1991
|
maxWidth: E,
|
|
1953
1992
|
display: "block",
|
|
1954
1993
|
children: [l && /* @__PURE__ */ v("span", {
|
|
1955
|
-
className:
|
|
1994
|
+
className: po.icon,
|
|
1956
1995
|
children: /* @__PURE__ */ v(W, { icon: l })
|
|
1957
1996
|
}), /* @__PURE__ */ v("input", {
|
|
1958
1997
|
ref: k,
|
|
@@ -1974,7 +2013,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1974
2013
|
tabIndex: x,
|
|
1975
2014
|
autoComplete: "off",
|
|
1976
2015
|
disabled: S || A,
|
|
1977
|
-
className: g(
|
|
2016
|
+
className: g(po.input, C ? po.right : "", i ? po.small : "", n ? po.isInTable : ""),
|
|
1978
2017
|
style: { width: M },
|
|
1979
2018
|
"data-error": e || null,
|
|
1980
2019
|
"data-warning": w || null,
|
|
@@ -1982,9 +2021,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1982
2021
|
})]
|
|
1983
2022
|
})
|
|
1984
2023
|
});
|
|
1985
|
-
}),
|
|
2024
|
+
}), ho = { fileInput: "_fileInput_1elar_1" }, go = /* @__PURE__ */ function(e) {
|
|
1986
2025
|
return e.READ_AS_TEXT = "readAsText", e.READ_AS_ARRAY_BUFFER = "readAsArrayBuffer", e.READ_AS_DATA_URL = "readAsDataURL", e.READ_AS_BINARY_STRING = "readAsBinaryString", e;
|
|
1987
|
-
}({}),
|
|
2026
|
+
}({}), _o = (e = new Blob(), t = go.READ_AS_TEXT) => {
|
|
1988
2027
|
let n = new FileReader();
|
|
1989
2028
|
return new Promise((r, i) => {
|
|
1990
2029
|
if (t in n) n[t](e);
|
|
@@ -1996,7 +2035,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
1996
2035
|
n.result === null ? i(/* @__PURE__ */ Error("File reading resulted in null")) : r(n.result);
|
|
1997
2036
|
}, n.onerror = (e) => i(e);
|
|
1998
2037
|
});
|
|
1999
|
-
},
|
|
2038
|
+
}, vo = (e, t) => {
|
|
2000
2039
|
let n;
|
|
2001
2040
|
if (!e) return null;
|
|
2002
2041
|
if (t) {
|
|
@@ -2004,15 +2043,15 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2004
2043
|
n = `Selected - ${(r = Object.keys(e)) == null ? void 0 : r.length} files`;
|
|
2005
2044
|
} else n = e == null ? void 0 : e.name;
|
|
2006
2045
|
return n || null;
|
|
2007
|
-
},
|
|
2008
|
-
let f = s(U), m = p(null), h =
|
|
2046
|
+
}, yo = ({ label: e = "Select", loading: t = !1, placeholder: n = "No file selected", disabled: r = !1, file: i, accept: a, multi: o, name: c, width: l, onChange: u = pn, testId: d }) => {
|
|
2047
|
+
let f = s(U), m = p(null), h = vo(i, o);
|
|
2009
2048
|
return /* @__PURE__ */ y("div", {
|
|
2010
2049
|
onClick: () => {
|
|
2011
2050
|
var e;
|
|
2012
2051
|
r || f || (e = m.current) == null || e.click();
|
|
2013
2052
|
},
|
|
2014
2053
|
style: { width: l },
|
|
2015
|
-
children: [/* @__PURE__ */ y(
|
|
2054
|
+
children: [/* @__PURE__ */ y(fo, { children: [/* @__PURE__ */ v(mo, {
|
|
2016
2055
|
value: h || "",
|
|
2017
2056
|
placeholder: n,
|
|
2018
2057
|
disabled: !0
|
|
@@ -2024,7 +2063,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2024
2063
|
})] }), /* @__PURE__ */ v("input", {
|
|
2025
2064
|
name: c,
|
|
2026
2065
|
ref: m,
|
|
2027
|
-
className:
|
|
2066
|
+
className: ho.fileInput,
|
|
2028
2067
|
type: "file",
|
|
2029
2068
|
accept: a,
|
|
2030
2069
|
multiple: o,
|
|
@@ -2042,13 +2081,13 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2042
2081
|
"data-testid": d
|
|
2043
2082
|
})]
|
|
2044
2083
|
});
|
|
2045
|
-
},
|
|
2084
|
+
}, bo = ({ height: e = "var(--padding)", width: t = null, flex: n = !1 }) => /* @__PURE__ */ v("div", { style: {
|
|
2046
2085
|
height: e,
|
|
2047
2086
|
width: t || "auto",
|
|
2048
2087
|
flexGrow: +!!n,
|
|
2049
2088
|
flexShrink: 0,
|
|
2050
2089
|
display: t ? "inline-block" : "block"
|
|
2051
|
-
} }),
|
|
2090
|
+
} }), xo = (e, t, n = [], r) => {
|
|
2052
2091
|
c(() => {
|
|
2053
2092
|
let n = (n) => {
|
|
2054
2093
|
var i, a, o;
|
|
@@ -2059,12 +2098,12 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2059
2098
|
window.removeEventListener("keydown", n);
|
|
2060
2099
|
};
|
|
2061
2100
|
}, n);
|
|
2062
|
-
},
|
|
2101
|
+
}, So = ({ id: e, children: t }) => {
|
|
2063
2102
|
let n = document.querySelector(`#${e}`), [r, i] = m(!1);
|
|
2064
2103
|
return u(() => {
|
|
2065
2104
|
r || i(!0);
|
|
2066
2105
|
}, [e]), n ? Pn(t, n) : null;
|
|
2067
|
-
},
|
|
2106
|
+
}, Co = {
|
|
2068
2107
|
wrapper: "_wrapper_1sv3a_1",
|
|
2069
2108
|
enter: "_enter_1sv3a_15",
|
|
2070
2109
|
enterActive: "_enterActive_1sv3a_18",
|
|
@@ -2073,7 +2112,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2073
2112
|
contentContainer: "_contentContainer_1sv3a_29",
|
|
2074
2113
|
centered: "_centered_1sv3a_52",
|
|
2075
2114
|
newLine: "_newLine_1sv3a_56"
|
|
2076
|
-
},
|
|
2115
|
+
}, wo = ({ children: e, visible: t }) => {
|
|
2077
2116
|
let n = p(null);
|
|
2078
2117
|
return c(() => {
|
|
2079
2118
|
if (n.current) {
|
|
@@ -2085,24 +2124,24 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2085
2124
|
in: t,
|
|
2086
2125
|
timeout: 100,
|
|
2087
2126
|
classNames: {
|
|
2088
|
-
enter:
|
|
2089
|
-
enterActive:
|
|
2090
|
-
exit:
|
|
2091
|
-
exitActive:
|
|
2127
|
+
enter: Co.enter,
|
|
2128
|
+
enterActive: Co.enterActive,
|
|
2129
|
+
exit: Co.exit,
|
|
2130
|
+
exitActive: Co.exitActive
|
|
2092
2131
|
},
|
|
2093
2132
|
unmountOnExit: !0,
|
|
2094
2133
|
children: /* @__PURE__ */ v("div", {
|
|
2095
2134
|
ref: n,
|
|
2096
2135
|
tabIndex: -1,
|
|
2097
|
-
className: g(
|
|
2136
|
+
className: g(Co.wrapper),
|
|
2098
2137
|
children: t && e
|
|
2099
2138
|
})
|
|
2100
2139
|
});
|
|
2101
|
-
},
|
|
2102
|
-
className: g(
|
|
2140
|
+
}, To = ({ children: e, width: t, centered: n }) => /* @__PURE__ */ v("div", {
|
|
2141
|
+
className: g(Co.contentContainer, n ? Co.centered : ""),
|
|
2103
2142
|
style: { maxWidth: t },
|
|
2104
2143
|
children: e
|
|
2105
|
-
}),
|
|
2144
|
+
}), Eo = ({ children: e, visible: t = !1, centered: n = !1, width: r = "100%", onEnter: i, onEscape: a }) => {
|
|
2106
2145
|
let o = "modalContainer";
|
|
2107
2146
|
return c(() => {
|
|
2108
2147
|
if (document.getElementById(o)) return;
|
|
@@ -2110,22 +2149,22 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2110
2149
|
return e.id = o, document.body.insertBefore(e, document.body.firstChild), () => {
|
|
2111
2150
|
document.body.removeChild(e);
|
|
2112
2151
|
};
|
|
2113
|
-
}, []),
|
|
2152
|
+
}, []), xo("Enter", () => {
|
|
2114
2153
|
t && i && i();
|
|
2115
|
-
}, [t, i]),
|
|
2154
|
+
}, [t, i]), xo("Escape", () => {
|
|
2116
2155
|
t && a && a();
|
|
2117
|
-
}, [t, a]), /* @__PURE__ */ v(
|
|
2156
|
+
}, [t, a]), /* @__PURE__ */ v(So, {
|
|
2118
2157
|
id: o,
|
|
2119
|
-
children: /* @__PURE__ */ v(
|
|
2158
|
+
children: /* @__PURE__ */ v(wo, {
|
|
2120
2159
|
visible: t,
|
|
2121
|
-
children: /* @__PURE__ */ v(
|
|
2160
|
+
children: /* @__PURE__ */ v(To, {
|
|
2122
2161
|
width: r,
|
|
2123
2162
|
centered: n,
|
|
2124
2163
|
children: e
|
|
2125
2164
|
})
|
|
2126
2165
|
})
|
|
2127
2166
|
});
|
|
2128
|
-
},
|
|
2167
|
+
}, Do = {
|
|
2129
2168
|
progress: "_progress_23ror_1",
|
|
2130
2169
|
inverted: "_inverted_23ror_9",
|
|
2131
2170
|
bar: "_bar_23ror_12",
|
|
@@ -2136,30 +2175,30 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2136
2175
|
yellow: "_yellow_23ror_33",
|
|
2137
2176
|
green: "_green_23ror_36",
|
|
2138
2177
|
label: "_label_23ror_39"
|
|
2139
|
-
},
|
|
2178
|
+
}, Oo = (e) => e < 20 ? Do.grey : e < 40 ? Do.red : e < 60 ? Do.orange : e < 80 ? Do.yellow : Do.green, ko = ({ width: e = "auto", inverted: t = !1, colored: n = !0, showProgressColors: r = !1, percentage: i = 0, noLabel: a = !1 }) => /* @__PURE__ */ v("div", {
|
|
2140
2179
|
style: { width: e },
|
|
2141
2180
|
"data-percent": i,
|
|
2142
2181
|
children: /* @__PURE__ */ y("div", {
|
|
2143
|
-
className: g(
|
|
2182
|
+
className: g(Do.progress, t ? Do.inverted : ""),
|
|
2144
2183
|
style: { width: e },
|
|
2145
2184
|
children: [/* @__PURE__ */ v("div", {
|
|
2146
|
-
className: g(
|
|
2185
|
+
className: g(Do.bar, r ? Oo(i) : n ? Do.colored : ""),
|
|
2147
2186
|
style: { width: `${i}%` },
|
|
2148
2187
|
children: /* @__PURE__ */ v("div", {
|
|
2149
|
-
className:
|
|
2188
|
+
className: Do.label,
|
|
2150
2189
|
children: !a && `${i}%`
|
|
2151
2190
|
})
|
|
2152
2191
|
}), /* @__PURE__ */ v("div", {
|
|
2153
|
-
className:
|
|
2192
|
+
className: Do.label,
|
|
2154
2193
|
children: !a && `${i}%`
|
|
2155
2194
|
})]
|
|
2156
2195
|
})
|
|
2157
|
-
}),
|
|
2196
|
+
}), Ao = 250, jo = 4e4, Mo = 20, No = 500, Po = ({ visible: e, prompt: t, onCloseModal: n, onUpload: r, onComplete: i, onFailed: a, onError: o, width: s, heading: l, dialogText: u, fileInputText: d, fileInputPlaceholder: f, uploadText: p, cancelText: h, testId: g }) => {
|
|
2158
2197
|
let [b, x] = m(null), [S, C] = m(!1), [w, T] = m(0), E = 0, D = () => {
|
|
2159
|
-
E +=
|
|
2198
|
+
E += Ao, T(E);
|
|
2160
2199
|
}, O = (e) => {
|
|
2161
2200
|
let t = E + e;
|
|
2162
|
-
t >= .99 *
|
|
2201
|
+
t >= .99 * jo && (t = jo), E = t, T(E);
|
|
2163
2202
|
};
|
|
2164
2203
|
c(() => {
|
|
2165
2204
|
x(null);
|
|
@@ -2168,7 +2207,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2168
2207
|
e.target.value && x(e.target.value);
|
|
2169
2208
|
}, A = async () => {
|
|
2170
2209
|
T(0);
|
|
2171
|
-
let n = setInterval(D,
|
|
2210
|
+
let n = setInterval(D, Ao);
|
|
2172
2211
|
try {
|
|
2173
2212
|
if (!b) return;
|
|
2174
2213
|
C(!0);
|
|
@@ -2176,10 +2215,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2176
2215
|
if (!e) return;
|
|
2177
2216
|
if (o) {
|
|
2178
2217
|
clearInterval(n);
|
|
2179
|
-
let e = setInterval(O,
|
|
2218
|
+
let e = setInterval(O, No / Mo, (jo - E) / (Mo - 1));
|
|
2180
2219
|
setTimeout(() => {
|
|
2181
2220
|
i(o), clearInterval(e), C(!1);
|
|
2182
|
-
},
|
|
2221
|
+
}, No);
|
|
2183
2222
|
} else a == null || a(), C(!1);
|
|
2184
2223
|
} catch (e) {
|
|
2185
2224
|
o == null || o(e), C(!1);
|
|
@@ -2191,9 +2230,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2191
2230
|
}, M = () => {
|
|
2192
2231
|
n();
|
|
2193
2232
|
}, N = /* @__PURE__ */ y(_, { children: [
|
|
2194
|
-
/* @__PURE__ */ v(
|
|
2195
|
-
/* @__PURE__ */ v(
|
|
2196
|
-
/* @__PURE__ */ v(
|
|
2233
|
+
/* @__PURE__ */ v(Ja, { children: u || "Upload file and extract data using a LLM" }),
|
|
2234
|
+
/* @__PURE__ */ v(bo, {}),
|
|
2235
|
+
/* @__PURE__ */ v(yo, {
|
|
2197
2236
|
placeholder: f || "No file",
|
|
2198
2237
|
label: d || "Select",
|
|
2199
2238
|
file: b || void 0,
|
|
@@ -2201,7 +2240,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2201
2240
|
testId: `${g}-file-input`,
|
|
2202
2241
|
accept: "image/*"
|
|
2203
2242
|
}),
|
|
2204
|
-
S && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(
|
|
2243
|
+
S && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(bo, {}), /* @__PURE__ */ v(ko, { percentage: Zn(100 * w / jo, 3) })] })
|
|
2205
2244
|
] }), P = /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(K, {
|
|
2206
2245
|
label: p || "Upload",
|
|
2207
2246
|
colored: !0,
|
|
@@ -2213,10 +2252,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2213
2252
|
onClick: M,
|
|
2214
2253
|
testId: `${g}-button-cancel`
|
|
2215
2254
|
})] });
|
|
2216
|
-
return
|
|
2255
|
+
return xo("Escape", () => M()), /* @__PURE__ */ v(Eo, {
|
|
2217
2256
|
visible: e,
|
|
2218
2257
|
centered: !0,
|
|
2219
|
-
children: /* @__PURE__ */ v(
|
|
2258
|
+
children: /* @__PURE__ */ v(to, { dialog: {
|
|
2220
2259
|
scroll: !0,
|
|
2221
2260
|
heading: l || "Smart Upload",
|
|
2222
2261
|
content: N,
|
|
@@ -2226,11 +2265,11 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2226
2265
|
testId: g
|
|
2227
2266
|
} })
|
|
2228
2267
|
});
|
|
2229
|
-
},
|
|
2268
|
+
}, Fo = {
|
|
2230
2269
|
helpContainer: "_helpContainer_1pgey_1",
|
|
2231
2270
|
codeBlockStyle: "_codeBlockStyle_1pgey_8",
|
|
2232
2271
|
listStyle: "_listStyle_1pgey_15"
|
|
2233
|
-
},
|
|
2272
|
+
}, Io = ({ validationRules: e, t }) => {
|
|
2234
2273
|
let n = (t) => {
|
|
2235
2274
|
let n = e.filter((e) => !e.optionalColumn);
|
|
2236
2275
|
return [
|
|
@@ -2240,32 +2279,32 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2240
2279
|
].map((e, r) => n.map(() => r * 10).join(t)).join("\n");
|
|
2241
2280
|
};
|
|
2242
2281
|
return /* @__PURE__ */ y("div", {
|
|
2243
|
-
className:
|
|
2282
|
+
className: Fo.helpContainer,
|
|
2244
2283
|
children: [
|
|
2245
2284
|
/* @__PURE__ */ v("p", { children: t("youCanImportDataByPastingOrByMessage") }),
|
|
2246
2285
|
/* @__PURE__ */ y("p", { children: [t("theValuesCanBeSeparatedByDifferentDelimiters"), ":"] }),
|
|
2247
2286
|
/* @__PURE__ */ y("ul", {
|
|
2248
|
-
className:
|
|
2287
|
+
className: Fo.listStyle,
|
|
2249
2288
|
children: [/* @__PURE__ */ v("li", { children: t("tabSeparatedValues") }), /* @__PURE__ */ v("li", { children: t("semicolonSeparatedValues") })]
|
|
2250
2289
|
}),
|
|
2251
2290
|
/* @__PURE__ */ y("p", { children: [t("toUploadOrImportFromClipboardMessage"), ":"] }),
|
|
2252
2291
|
/* @__PURE__ */ v("p", { children: /* @__PURE__ */ y("strong", { children: [t("examples"), ":"] }) }),
|
|
2253
2292
|
/* @__PURE__ */ v("div", { children: /* @__PURE__ */ v("pre", {
|
|
2254
|
-
className:
|
|
2293
|
+
className: Fo.codeBlockStyle,
|
|
2255
2294
|
children: /* @__PURE__ */ v("code", { children: n(";") })
|
|
2256
2295
|
}) }),
|
|
2257
2296
|
/* @__PURE__ */ v("div", { children: /* @__PURE__ */ v("pre", {
|
|
2258
|
-
className:
|
|
2297
|
+
className: Fo.codeBlockStyle,
|
|
2259
2298
|
children: /* @__PURE__ */ v("code", { children: n(" ") })
|
|
2260
2299
|
}) })
|
|
2261
2300
|
]
|
|
2262
2301
|
});
|
|
2263
|
-
},
|
|
2302
|
+
}, Lo = ({ visible: e, setModalVisibility: t, validationRules: n = [], t: r }) => /* @__PURE__ */ v(Eo, {
|
|
2264
2303
|
visible: e,
|
|
2265
2304
|
centered: !0,
|
|
2266
|
-
children: /* @__PURE__ */ v(
|
|
2305
|
+
children: /* @__PURE__ */ v(to, { dialog: {
|
|
2267
2306
|
heading: r("importingData"),
|
|
2268
|
-
content: /* @__PURE__ */ v(
|
|
2307
|
+
content: /* @__PURE__ */ v(Io, {
|
|
2269
2308
|
validationRules: n,
|
|
2270
2309
|
t: r
|
|
2271
2310
|
}),
|
|
@@ -2276,7 +2315,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2276
2315
|
onClose: () => t("helpModal", !1),
|
|
2277
2316
|
width: "95%"
|
|
2278
2317
|
} })
|
|
2279
|
-
}),
|
|
2318
|
+
}), Ro = {
|
|
2280
2319
|
headerContainer: "_headerContainer_esg1i_1",
|
|
2281
2320
|
modalContent: "_modalContent_esg1i_10",
|
|
2282
2321
|
resultContainer: "_resultContainer_esg1i_17",
|
|
@@ -2284,7 +2323,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2284
2323
|
emptyState: "_emptyState_esg1i_39",
|
|
2285
2324
|
emptyMainText: "_emptyMainText_esg1i_47",
|
|
2286
2325
|
emptyHint: "_emptyHint_esg1i_51"
|
|
2287
|
-
},
|
|
2326
|
+
}, zo = {
|
|
2288
2327
|
inputInTable: "_inputInTable_1okhq_1",
|
|
2289
2328
|
inputHover: "_inputHover_1okhq_13",
|
|
2290
2329
|
inputFocus: "_inputFocus_1okhq_18",
|
|
@@ -2306,46 +2345,46 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2306
2345
|
legendToggle: "_legendToggle_1okhq_155",
|
|
2307
2346
|
detailsText: "_detailsText_1okhq_165",
|
|
2308
2347
|
footer: "_footer_1okhq_169"
|
|
2309
|
-
},
|
|
2348
|
+
}, Bo = /* @__PURE__ */ function(e) {
|
|
2310
2349
|
return e.INFO = "Info", e.SUCCESS = "Success", e.WARNING = "Warning", e.ERROR = "Error", e;
|
|
2311
|
-
}({}),
|
|
2350
|
+
}({}), Vo = /* @__PURE__ */ function(e) {
|
|
2312
2351
|
return e.TOGGLE_DETAILS = "TOGGLE_DETAILS", e;
|
|
2313
|
-
}({}),
|
|
2314
|
-
className: g(
|
|
2352
|
+
}({}), Ho = ({ type: e, onClose: t, isInToast: n, testId: r }) => /* @__PURE__ */ v("div", {
|
|
2353
|
+
className: g(zo.dismiss, n ? zo.absolute : "", e === Bo.INFO ? zo.info : e === Bo.SUCCESS ? zo.success : e === Bo.WARNING ? zo.warning : e === Bo.ERROR ? zo.error : null),
|
|
2315
2354
|
children: /* @__PURE__ */ v(W, {
|
|
2316
2355
|
icon: H.CLOSE,
|
|
2317
2356
|
onClick: t,
|
|
2318
2357
|
testId: r
|
|
2319
2358
|
})
|
|
2320
|
-
}),
|
|
2359
|
+
}), Uo = (e, t) => {
|
|
2321
2360
|
switch (t.type) {
|
|
2322
|
-
case
|
|
2361
|
+
case Vo.TOGGLE_DETAILS: return {
|
|
2323
2362
|
...e,
|
|
2324
2363
|
detailsVisible: !e.detailsVisible
|
|
2325
2364
|
};
|
|
2326
2365
|
default: return e;
|
|
2327
2366
|
}
|
|
2328
|
-
},
|
|
2329
|
-
className: g(
|
|
2367
|
+
}, Wo = ({ details: e, visible: t, dispatch: n }) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
|
|
2368
|
+
className: g(zo.legendToggle),
|
|
2330
2369
|
onClick: n,
|
|
2331
2370
|
children: t ? "Hide details" : "Show details"
|
|
2332
2371
|
}), /* @__PURE__ */ v(ai, {
|
|
2333
2372
|
expanded: t,
|
|
2334
2373
|
children: /* @__PURE__ */ v("div", {
|
|
2335
|
-
className:
|
|
2374
|
+
className: zo.detailsText,
|
|
2336
2375
|
children: e
|
|
2337
2376
|
})
|
|
2338
|
-
})] }),
|
|
2377
|
+
})] }), Go = ({ type: e }) => {
|
|
2339
2378
|
switch (e) {
|
|
2340
|
-
case
|
|
2379
|
+
case Bo.SUCCESS: return /* @__PURE__ */ v(W, {
|
|
2341
2380
|
icon: H.SUCCESS,
|
|
2342
2381
|
size: 16
|
|
2343
2382
|
});
|
|
2344
|
-
case
|
|
2383
|
+
case Bo.WARNING: return /* @__PURE__ */ v(W, {
|
|
2345
2384
|
icon: H.WARNING,
|
|
2346
2385
|
size: 16
|
|
2347
2386
|
});
|
|
2348
|
-
case
|
|
2387
|
+
case Bo.ERROR: return /* @__PURE__ */ v(W, {
|
|
2349
2388
|
icon: H.ERROR,
|
|
2350
2389
|
size: 16
|
|
2351
2390
|
});
|
|
@@ -2354,45 +2393,45 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2354
2393
|
size: 16
|
|
2355
2394
|
});
|
|
2356
2395
|
}
|
|
2357
|
-
},
|
|
2358
|
-
let { visible: t, type: n =
|
|
2396
|
+
}, Ko = ({ message: e }) => {
|
|
2397
|
+
let { visible: t, type: n = Bo.INFO, icon: r, heading: i, content: a, details: o, detailsVisible: s = !1, footer: c, withDismiss: l, onClose: u, width: d, maxHeight: p } = e, [m, h] = f(Uo, { detailsVisible: s });
|
|
2359
2398
|
return /* @__PURE__ */ v(_, { children: t ? /* @__PURE__ */ y("div", {
|
|
2360
|
-
className: g(
|
|
2399
|
+
className: g(zo.container, d ? zo.block : null, n === Bo.SUCCESS ? zo.success : n === Bo.WARNING ? zo.warning : n === Bo.ERROR ? zo.error : zo.info),
|
|
2361
2400
|
style: {
|
|
2362
2401
|
width: d,
|
|
2363
2402
|
maxHeight: p
|
|
2364
2403
|
},
|
|
2365
2404
|
children: [
|
|
2366
2405
|
/* @__PURE__ */ v("div", { children: r ? /* @__PURE__ */ v("div", {
|
|
2367
|
-
className:
|
|
2368
|
-
children: /* @__PURE__ */ v(
|
|
2406
|
+
className: zo.icon,
|
|
2407
|
+
children: /* @__PURE__ */ v(Go, { type: n })
|
|
2369
2408
|
}) : null }),
|
|
2370
2409
|
/* @__PURE__ */ y("div", {
|
|
2371
|
-
className:
|
|
2410
|
+
className: zo.content,
|
|
2372
2411
|
children: [
|
|
2373
2412
|
i ? /* @__PURE__ */ v("div", {
|
|
2374
|
-
className:
|
|
2413
|
+
className: zo.heading,
|
|
2375
2414
|
children: i
|
|
2376
2415
|
}) : null,
|
|
2377
2416
|
/* @__PURE__ */ v("div", { children: a }),
|
|
2378
|
-
o ? /* @__PURE__ */ v(
|
|
2417
|
+
o ? /* @__PURE__ */ v(Wo, {
|
|
2379
2418
|
details: o,
|
|
2380
2419
|
visible: m.detailsVisible,
|
|
2381
|
-
dispatch: () => h({ type:
|
|
2420
|
+
dispatch: () => h({ type: Vo.TOGGLE_DETAILS })
|
|
2382
2421
|
}) : null,
|
|
2383
2422
|
!!c && /* @__PURE__ */ v("div", {
|
|
2384
|
-
className:
|
|
2423
|
+
className: zo.footer,
|
|
2385
2424
|
children: c
|
|
2386
2425
|
})
|
|
2387
2426
|
]
|
|
2388
2427
|
}),
|
|
2389
|
-
l ? /* @__PURE__ */ v(
|
|
2428
|
+
l ? /* @__PURE__ */ v(Ho, {
|
|
2390
2429
|
type: n,
|
|
2391
2430
|
onClose: u
|
|
2392
2431
|
}) : null
|
|
2393
2432
|
]
|
|
2394
2433
|
}) : null });
|
|
2395
|
-
},
|
|
2434
|
+
}, qo = {
|
|
2396
2435
|
inputInTable: "_inputInTable_1d3yn_1",
|
|
2397
2436
|
inputHover: "_inputHover_1d3yn_13",
|
|
2398
2437
|
inputFocus: "_inputFocus_1d3yn_18",
|
|
@@ -2407,11 +2446,11 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2407
2446
|
dragOverlay: "_dragOverlay_1d3yn_145",
|
|
2408
2447
|
virtualScroll: "_virtualScroll_1d3yn_180",
|
|
2409
2448
|
striped: "_striped_1d3yn_200"
|
|
2410
|
-
},
|
|
2449
|
+
}, Jo = { title: "_title_zn5s7_1" }, Yo = ({ name: e = null, actions: t = null, actionsRight: n = !1, testId: r }) => {
|
|
2411
2450
|
let i = e !== null, a = t !== null;
|
|
2412
2451
|
return !i && !a ? null : /* @__PURE__ */ y("div", {
|
|
2413
|
-
className:
|
|
2414
|
-
children: [i ? /* @__PURE__ */ v(
|
|
2452
|
+
className: Jo.title,
|
|
2453
|
+
children: [i ? /* @__PURE__ */ v(Qa, { children: /* @__PURE__ */ v("span", {
|
|
2415
2454
|
"data-testid": r,
|
|
2416
2455
|
children: e
|
|
2417
2456
|
}) }) : null, (() => {
|
|
@@ -2420,10 +2459,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2420
2459
|
return n ? e : /* @__PURE__ */ v("div", { children: e });
|
|
2421
2460
|
})()]
|
|
2422
2461
|
});
|
|
2423
|
-
},
|
|
2462
|
+
}, Xo = {
|
|
2424
2463
|
footer: "_footer_4sumy_1",
|
|
2425
2464
|
section: "_section_4sumy_7"
|
|
2426
|
-
},
|
|
2465
|
+
}, Zo = {
|
|
2427
2466
|
inputInTable: "_inputInTable_sl2b5_1",
|
|
2428
2467
|
inputHover: "_inputHover_sl2b5_13",
|
|
2429
2468
|
inputFocus: "_inputFocus_sl2b5_18",
|
|
@@ -2439,7 +2478,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2439
2478
|
groupOrderFirst: "_groupOrderFirst_sl2b5_193",
|
|
2440
2479
|
groupOrderMiddle: "_groupOrderMiddle_sl2b5_194",
|
|
2441
2480
|
groupOrderLast: "_groupOrderLast_sl2b5_198"
|
|
2442
|
-
},
|
|
2481
|
+
}, Qo = ({ disabled: e = !1, error: t = null, warning: n = null, tooltip: r = null, options: i, onChange: a = pn, onFocus: o = pn, onBlur: c = pn, right: l = !1, small: u = !1, tabIndex: d = 0, selectedOption: f, width: p = null, groupOrder: m, testId: h, isInTable: _ = !1, clearable: y, placeholder: b, hasNonExistentValue: x, maxTooltipWidth: S, borderRadius: C }) => {
|
|
2443
2482
|
let w = s(U), T = f === null || (f == null ? void 0 : f.value) === null ? "unselected" : f == null ? void 0 : f.value, E = T === "unselected", D = (T === "unselected" || y ? [/* @__PURE__ */ v("option", {
|
|
2444
2483
|
value: "unselected",
|
|
2445
2484
|
disabled: !y,
|
|
@@ -2455,9 +2494,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2455
2494
|
children: e.label
|
|
2456
2495
|
}, t))), O = (() => {
|
|
2457
2496
|
if (m) switch (m) {
|
|
2458
|
-
case V.FIRST: return
|
|
2459
|
-
case V.LAST: return
|
|
2460
|
-
default: return
|
|
2497
|
+
case V.FIRST: return Zo.groupOrderFirst;
|
|
2498
|
+
case V.LAST: return Zo.groupOrderLast;
|
|
2499
|
+
default: return Zo.groupOrderMiddle;
|
|
2461
2500
|
}
|
|
2462
2501
|
return "";
|
|
2463
2502
|
})();
|
|
@@ -2468,7 +2507,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2468
2507
|
enabled: r && J(r) || t && J(t) || n && J(n) || !1,
|
|
2469
2508
|
maxWidth: S,
|
|
2470
2509
|
children: /* @__PURE__ */ v("select", {
|
|
2471
|
-
className: g(
|
|
2510
|
+
className: g(Zo.select, E ? Zo.unSelected : "", l ? Zo.right : "", u ? Zo.small : "", _ ? Zo.isInTable : "", O),
|
|
2472
2511
|
style: {
|
|
2473
2512
|
width: p || "",
|
|
2474
2513
|
borderRadius: C || ""
|
|
@@ -2488,12 +2527,12 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2488
2527
|
children: D
|
|
2489
2528
|
})
|
|
2490
2529
|
});
|
|
2491
|
-
},
|
|
2530
|
+
}, $o = () => {
|
|
2492
2531
|
let e = p(null);
|
|
2493
2532
|
return [e, () => {
|
|
2494
2533
|
e.current && e.current.focus();
|
|
2495
2534
|
}];
|
|
2496
|
-
},
|
|
2535
|
+
}, es = () => {
|
|
2497
2536
|
let [e, t] = m(!1), n = p(!0);
|
|
2498
2537
|
return c(() => () => {
|
|
2499
2538
|
n.current = !1;
|
|
@@ -2504,12 +2543,12 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2504
2543
|
});
|
|
2505
2544
|
})();
|
|
2506
2545
|
}, []), e;
|
|
2507
|
-
},
|
|
2508
|
-
let [e, t] = m(
|
|
2546
|
+
}, ts = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, ns = () => {
|
|
2547
|
+
let [e, t] = m(ts()), n = Qt(() => t(ts()), 150);
|
|
2509
2548
|
return c(() => (window.addEventListener("resize", n), () => {
|
|
2510
2549
|
window.removeEventListener("resize", n);
|
|
2511
2550
|
}), []), e;
|
|
2512
|
-
},
|
|
2551
|
+
}, rs = {
|
|
2513
2552
|
layerContainer: "_layerContainer_q5iac_1",
|
|
2514
2553
|
layer: "_layer_q5iac_1",
|
|
2515
2554
|
enter: "_enter_q5iac_14",
|
|
@@ -2526,64 +2565,64 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2526
2565
|
label: "_label_q5iac_109",
|
|
2527
2566
|
icon: "_icon_q5iac_116",
|
|
2528
2567
|
details: "_details_q5iac_121"
|
|
2529
|
-
},
|
|
2568
|
+
}, is = (e, t) => {
|
|
2530
2569
|
let n = document.createElement("canvas").getContext("2d");
|
|
2531
2570
|
return n ? (n.font = t, n.measureText(e).width) : 0;
|
|
2532
|
-
},
|
|
2533
|
-
let i =
|
|
2571
|
+
}, as = "13px", os = "12px", ss = "Roobert", cs = "sans-serif", ls = 12, us = 8, ds = 30, fs = 24, ps = 5, ms = 3, hs = 1, gs = 2, _s = (e = !1, t = !1) => `${e ? os : as} ${t ? ss : cs}`, vs = (e = !1, t = !1) => (e ? us : ls) + (e ? fs : ds) + (t ? 17 : 0), ys = (e, t, n, r) => {
|
|
2572
|
+
let i = _s(t, n), a = r ? is(r, i) : 0;
|
|
2534
2573
|
return Math.ceil(e.reduce((e, n) => {
|
|
2535
2574
|
var r, a;
|
|
2536
|
-
let o = ((r = n == null || (a = n.actions) == null ? void 0 : a.length) == null ? 0 : r) * 24, s = n.icon ? parseInt(t ?
|
|
2575
|
+
let o = ((r = n == null || (a = n.actions) == null ? void 0 : a.length) == null ? 0 : r) * 24, s = n.icon ? parseInt(t ? os : as) + 7 : 0, c = is(`${n.label} ${n.details || ""}`, i) + o + s;
|
|
2537
2576
|
return e = c > e ? c : e, e;
|
|
2538
|
-
}, a)) +
|
|
2539
|
-
},
|
|
2540
|
-
let r =
|
|
2541
|
-
return Math.ceil(i + ((t ?
|
|
2542
|
-
},
|
|
2577
|
+
}, a)) + vs(t, !0);
|
|
2578
|
+
}, bs = (e, t, n) => {
|
|
2579
|
+
let r = _s(!0, n), i = is(e.label, r);
|
|
2580
|
+
return Math.ceil(i + ((t ? ms : ps) * 2 + hs * 2 + gs));
|
|
2581
|
+
}, xs = ({ label: e }) => /* @__PURE__ */ v("div", {
|
|
2543
2582
|
onClick: (e) => e.stopPropagation(),
|
|
2544
|
-
className:
|
|
2583
|
+
className: rs.heading,
|
|
2545
2584
|
children: e
|
|
2546
|
-
}),
|
|
2547
|
-
className: g(
|
|
2585
|
+
}), Ss = ({ details: e, label: t, icon: n, disabled: r = !1, selected: i = !1, focused: a = !1, onSelectOption: o, actions: s, closeLayer: c, testId: l }) => /* @__PURE__ */ y("div", {
|
|
2586
|
+
className: g(rs.option, r ? rs.disabled : "", i ? rs == null ? void 0 : rs.selected : "", a ? rs.focused : ""),
|
|
2548
2587
|
onClick: !r && o ? o : void 0,
|
|
2549
2588
|
"data-testid": l,
|
|
2550
2589
|
children: [
|
|
2551
2590
|
/* @__PURE__ */ v("div", {
|
|
2552
|
-
className:
|
|
2591
|
+
className: rs.optionContent,
|
|
2553
2592
|
children: /* @__PURE__ */ y("span", {
|
|
2554
|
-
className:
|
|
2593
|
+
className: rs.label,
|
|
2555
2594
|
title: String(t),
|
|
2556
2595
|
children: [t, n && /* @__PURE__ */ v("span", {
|
|
2557
|
-
className:
|
|
2596
|
+
className: rs.icon,
|
|
2558
2597
|
children: n
|
|
2559
2598
|
})]
|
|
2560
2599
|
})
|
|
2561
2600
|
}),
|
|
2562
2601
|
e && /* @__PURE__ */ v("div", {
|
|
2563
|
-
className: g(
|
|
2564
|
-
children: /* @__PURE__ */ v(
|
|
2602
|
+
className: g(rs.details),
|
|
2603
|
+
children: /* @__PURE__ */ v(Ja, {
|
|
2565
2604
|
faint: !0,
|
|
2566
2605
|
children: e
|
|
2567
2606
|
})
|
|
2568
2607
|
}),
|
|
2569
2608
|
!!(s != null && s.length) && /* @__PURE__ */ v("div", {
|
|
2570
|
-
className: g(
|
|
2609
|
+
className: g(rs.actions),
|
|
2571
2610
|
children: /* @__PURE__ */ v(ua, {
|
|
2572
2611
|
actions: s,
|
|
2573
2612
|
closeLayer: c
|
|
2574
2613
|
})
|
|
2575
2614
|
}),
|
|
2576
2615
|
/* @__PURE__ */ v("span", {
|
|
2577
|
-
className:
|
|
2616
|
+
className: rs.check,
|
|
2578
2617
|
children: i ? /* @__PURE__ */ v(W, { icon: H.CHECK }) : null
|
|
2579
2618
|
})
|
|
2580
2619
|
]
|
|
2581
|
-
}),
|
|
2620
|
+
}), Cs = ({ section: e, selected: t, focused: n, onSelectOption: r, closeLayer: i }) => {
|
|
2582
2621
|
let a = s(U);
|
|
2583
2622
|
switch (e.type) {
|
|
2584
|
-
case Li.HEADING: return /* @__PURE__ */ v(
|
|
2623
|
+
case Li.HEADING: return /* @__PURE__ */ v(xs, { label: e.label });
|
|
2585
2624
|
case Li.OPTION:
|
|
2586
|
-
default: return /* @__PURE__ */ v(
|
|
2625
|
+
default: return /* @__PURE__ */ v(Ss, {
|
|
2587
2626
|
closeLayer: i,
|
|
2588
2627
|
actions: e.actions,
|
|
2589
2628
|
label: e.label,
|
|
@@ -2596,22 +2635,22 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2596
2635
|
testId: e.testId
|
|
2597
2636
|
});
|
|
2598
2637
|
}
|
|
2599
|
-
},
|
|
2600
|
-
let n = e.findIndex((e) =>
|
|
2638
|
+
}, ws = (e, t) => !e || e.type === Li.HEADING ? !1 : Array.isArray(t) ? t.some((t) => t && t.value == e.value) : e.value == (t == null ? void 0 : t.value), Ts = (e, t) => {
|
|
2639
|
+
let n = e.findIndex((e) => ws(e, t));
|
|
2601
2640
|
return n === -1 ? null : n;
|
|
2602
|
-
},
|
|
2641
|
+
}, Es = ({ index: e, style: t, closeLayer: n, focusedOptionIndex: r, onSelectOption: i, sections: a, selectedOptions: o }) => /* @__PURE__ */ v("div", {
|
|
2603
2642
|
style: t,
|
|
2604
|
-
children: /* @__PURE__ */ v(
|
|
2643
|
+
children: /* @__PURE__ */ v(Cs, {
|
|
2605
2644
|
closeLayer: n,
|
|
2606
2645
|
section: a[e],
|
|
2607
|
-
selected:
|
|
2646
|
+
selected: ws(a[e], o),
|
|
2608
2647
|
focused: r === e,
|
|
2609
2648
|
onSelectOption: (t) => i(t, a[e])
|
|
2610
2649
|
})
|
|
2611
|
-
}),
|
|
2650
|
+
}), Ds = ({ listRef: e, isMulti: t, sections: n, selectedOptions: r, onSelectOption: i, focusedOptionIndex: a, width: s, small: c, closeLayer: l, testId: u }) => {
|
|
2612
2651
|
let d = o((t) => {
|
|
2613
2652
|
e.current = t;
|
|
2614
|
-
let i =
|
|
2653
|
+
let i = Ts(n, r);
|
|
2615
2654
|
i !== null && t !== null && t.element !== null && t.scrollToRow({
|
|
2616
2655
|
index: i,
|
|
2617
2656
|
align: "start"
|
|
@@ -2623,10 +2662,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2623
2662
|
]), f = c ? 24 : 30, p = n.length < 10 ? f * n.length : f * 10;
|
|
2624
2663
|
return /* @__PURE__ */ v("div", {
|
|
2625
2664
|
"data-testid": u,
|
|
2626
|
-
className: g(
|
|
2665
|
+
className: g(rs.layer, c && rs.small),
|
|
2627
2666
|
children: n.length ? /* @__PURE__ */ v(cr, {
|
|
2628
2667
|
listRef: d,
|
|
2629
|
-
rowComponent:
|
|
2668
|
+
rowComponent: Es,
|
|
2630
2669
|
rowCount: n.length,
|
|
2631
2670
|
rowHeight: f,
|
|
2632
2671
|
rowProps: {
|
|
@@ -2642,7 +2681,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2642
2681
|
width: s
|
|
2643
2682
|
}
|
|
2644
2683
|
}) : /* @__PURE__ */ v("ul", { children: /* @__PURE__ */ v("li", { children: /* @__PURE__ */ v("div", {
|
|
2645
|
-
className:
|
|
2684
|
+
className: rs.message,
|
|
2646
2685
|
style: { width: s },
|
|
2647
2686
|
children: "No matches"
|
|
2648
2687
|
}) }) })
|
|
@@ -2677,12 +2716,12 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2677
2716
|
groupOrderMiddle: "_groupOrderMiddle_7uwhv_298",
|
|
2678
2717
|
groupOrderLast: "_groupOrderLast_7uwhv_302",
|
|
2679
2718
|
detailedLabel: "_detailedLabel_7uwhv_307"
|
|
2680
|
-
},
|
|
2681
|
-
let i =
|
|
2719
|
+
}, Os = ({ selectedOptions: e, small: t, width: n, testId: r }) => {
|
|
2720
|
+
let i = es(), [a, o] = m([]), [s, l] = m([]);
|
|
2682
2721
|
return c(() => {
|
|
2683
2722
|
let r = [], a = [], s = 0;
|
|
2684
2723
|
e.forEach((o, c) => {
|
|
2685
|
-
s +=
|
|
2724
|
+
s += bs(o, t, i), c === e.length - 1 && s < n || s < n - 24 ? r.push(o) : a.push(o);
|
|
2686
2725
|
}), o(r), l(a);
|
|
2687
2726
|
}, [
|
|
2688
2727
|
e,
|
|
@@ -2706,12 +2745,12 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2706
2745
|
})
|
|
2707
2746
|
})]
|
|
2708
2747
|
});
|
|
2709
|
-
},
|
|
2748
|
+
}, ks = ({ selectedOptions: e, searchable: t = !1, searchValue: n, onChange: r = pn, inputRef: i, error: a, placeholder: o = "Select...", small: s, testId: c }) => {
|
|
2710
2749
|
let l = p(null), u = Array.isArray(e), d = u ? e.length > 0 : !!e, f = n ? n.length + 1 : 1;
|
|
2711
2750
|
return /* @__PURE__ */ y("div", {
|
|
2712
2751
|
className: Y.triggerInputContainer,
|
|
2713
2752
|
ref: l,
|
|
2714
|
-
children: [d ? u ? /* @__PURE__ */ v(
|
|
2753
|
+
children: [d ? u ? /* @__PURE__ */ v(Os, {
|
|
2715
2754
|
selectedOptions: e,
|
|
2716
2755
|
small: s,
|
|
2717
2756
|
width: (() => {
|
|
@@ -2737,9 +2776,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2737
2776
|
"data-testid": c && `${c}-input`
|
|
2738
2777
|
}) : null]
|
|
2739
2778
|
});
|
|
2740
|
-
},
|
|
2779
|
+
}, As = ({ selectedOptions: e, searchValue: t, searchable: n, clearable: r, onClickTrigger: i, element: a, error: o, warning: s, tooltip: c, small: l, isInTable: u, disabled: d, onChangeSearch: f, onClickClear: p, tabIndex: m, isOpen: h, triggerRef: b, clearAllIsFocused: x, onFocus: S, onBlur: C, groupOrder: w, maxTooltipWidth: T, placeholder: E, right: D, testId: O }) => {
|
|
2741
2780
|
var k;
|
|
2742
|
-
let [A, j] =
|
|
2781
|
+
let [A, j] = $o(), M = Array.isArray(e) ? e.length > 0 && ((k = e[0]) == null ? void 0 : k.value) : e == null ? void 0 : e.value, N = r && M, P = (() => {
|
|
2743
2782
|
if (w) switch (w) {
|
|
2744
2783
|
case V.FIRST: return Y.groupOrderFirst;
|
|
2745
2784
|
case V.LAST: return Y.groupOrderLast;
|
|
@@ -2750,7 +2789,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2750
2789
|
...e,
|
|
2751
2790
|
label: /* @__PURE__ */ y("div", {
|
|
2752
2791
|
className: g(Y.detailedLabel),
|
|
2753
|
-
children: [/* @__PURE__ */ v(
|
|
2792
|
+
children: [/* @__PURE__ */ v(Ja, { children: e.label }), /* @__PURE__ */ v(Ja, {
|
|
2754
2793
|
muted: !0,
|
|
2755
2794
|
children: e.details
|
|
2756
2795
|
})]
|
|
@@ -2769,7 +2808,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2769
2808
|
"data-error": o || null,
|
|
2770
2809
|
"data-warning": s || null,
|
|
2771
2810
|
"data-testid": O,
|
|
2772
|
-
children: [/* @__PURE__ */ v(
|
|
2811
|
+
children: [/* @__PURE__ */ v(ks, {
|
|
2773
2812
|
selectedOptions: F,
|
|
2774
2813
|
placeholder: E,
|
|
2775
2814
|
searchable: n,
|
|
@@ -2802,28 +2841,28 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2802
2841
|
maxWidth: T,
|
|
2803
2842
|
children: I
|
|
2804
2843
|
}) });
|
|
2805
|
-
},
|
|
2844
|
+
}, js = /* @__PURE__ */ function(e) {
|
|
2806
2845
|
return e.SET_VISIBLE_OPTIONS = "SET_VISIBLE_OPTIONS", e.RESET_LAYER_FOCUS = "RESET_LAYER_FOCUS", e.CLEAR_SEARCH = "CLEAR_SEARCH", e.ON_CHANGE_SEARCH = "ON_CHANGE_SEARCH", e.FOCUS_TRIGGER_INPUTS = "FOCUS_TRIGGER_INPUTS", e.BLUR_TRIGGER_INPUTS = "BLUR_TRIGGER_INPUTS", e.FOCUS_LAYER_OPTIONS = "FOCUS_LAYER_OPTIONS", e.OPEN_LAYER = "OPEN_LAYER", e.CLOSE_LAYER = "CLOSE_LAYER", e;
|
|
2807
|
-
}({}),
|
|
2846
|
+
}({}), Ms = {
|
|
2808
2847
|
options: ["none", "clearAll"],
|
|
2809
2848
|
currentIndex: 0,
|
|
2810
2849
|
currentOption: !1,
|
|
2811
2850
|
clearAll: !1
|
|
2812
|
-
},
|
|
2813
|
-
let n = ["none", ...e.map((e, t) => e.type === Li.HEADING ? null : t).filter((e) => e !== null)], r =
|
|
2851
|
+
}, Ns = (e) => e === null ? 0 : e + 1, Ps = (e, t) => {
|
|
2852
|
+
let n = ["none", ...e.map((e, t) => e.type === Li.HEADING ? null : t).filter((e) => e !== null)], r = Ns(t);
|
|
2814
2853
|
return {
|
|
2815
2854
|
options: n,
|
|
2816
2855
|
currentIndex: r,
|
|
2817
2856
|
current: n[r]
|
|
2818
2857
|
};
|
|
2819
|
-
},
|
|
2858
|
+
}, Fs = (e, t) => {
|
|
2820
2859
|
let n = e === "up" ? -1 : 1, r = t.currentIndex + n, i = (r < 0 ? t.options.length - 1 : r) % t.options.length, a = t.options[i];
|
|
2821
2860
|
return {
|
|
2822
2861
|
...t,
|
|
2823
2862
|
currentIndex: i,
|
|
2824
2863
|
current: a
|
|
2825
2864
|
};
|
|
2826
|
-
},
|
|
2865
|
+
}, Is = (e, t, n) => {
|
|
2827
2866
|
let r = e === "left" ? -1 : 1, i = t && t.length ? [
|
|
2828
2867
|
"none",
|
|
2829
2868
|
...Array.from({ length: t.length }, (e, t) => t),
|
|
@@ -2835,26 +2874,26 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2835
2874
|
currentOption: s,
|
|
2836
2875
|
clearAll: s === "clearAll"
|
|
2837
2876
|
};
|
|
2838
|
-
},
|
|
2877
|
+
}, Ls = () => Ms, Rs = (e) => ({
|
|
2839
2878
|
...e,
|
|
2840
2879
|
currentIndex: 0,
|
|
2841
2880
|
current: "none"
|
|
2842
|
-
}),
|
|
2881
|
+
}), zs = (e, t) => {
|
|
2843
2882
|
switch (t.type) {
|
|
2844
|
-
case
|
|
2883
|
+
case js.SET_VISIBLE_OPTIONS: return {
|
|
2845
2884
|
...e,
|
|
2846
2885
|
visibleOptions: t.options || []
|
|
2847
2886
|
};
|
|
2848
|
-
case
|
|
2887
|
+
case js.RESET_LAYER_FOCUS: return {
|
|
2849
2888
|
...e,
|
|
2850
|
-
layerFocus:
|
|
2889
|
+
layerFocus: Ps(t.options || [], t.firstSelectedOptionIndex || 0)
|
|
2851
2890
|
};
|
|
2852
|
-
case
|
|
2891
|
+
case js.CLEAR_SEARCH: return {
|
|
2853
2892
|
...e,
|
|
2854
2893
|
visibleOptions: t.options || [],
|
|
2855
2894
|
searchValue: ""
|
|
2856
2895
|
};
|
|
2857
|
-
case
|
|
2896
|
+
case js.ON_CHANGE_SEARCH: {
|
|
2858
2897
|
let n = [...(t.options || []).filter((e) => (String(e.label) + (e.details ? String(e.details) : "")).toLowerCase().includes(String(t.value || "").toLowerCase()))];
|
|
2859
2898
|
return t.createAble && t.value && t.value !== "" && n.push({
|
|
2860
2899
|
label: `Create "${t.value}"`,
|
|
@@ -2864,48 +2903,48 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2864
2903
|
...e,
|
|
2865
2904
|
searchValue: t.value,
|
|
2866
2905
|
visibleOptions: n,
|
|
2867
|
-
layerFocus:
|
|
2906
|
+
layerFocus: Rs(e.layerFocus)
|
|
2868
2907
|
};
|
|
2869
2908
|
}
|
|
2870
|
-
case
|
|
2909
|
+
case js.FOCUS_TRIGGER_INPUTS: return {
|
|
2871
2910
|
...e,
|
|
2872
|
-
triggerFocus:
|
|
2873
|
-
layerFocus:
|
|
2911
|
+
triggerFocus: Is(t.direction || "right", t.selectedOptions || [], e.triggerFocus),
|
|
2912
|
+
layerFocus: Rs(e.layerFocus)
|
|
2874
2913
|
};
|
|
2875
|
-
case
|
|
2914
|
+
case js.BLUR_TRIGGER_INPUTS: return {
|
|
2876
2915
|
...e,
|
|
2877
|
-
triggerFocus:
|
|
2916
|
+
triggerFocus: Ls()
|
|
2878
2917
|
};
|
|
2879
|
-
case
|
|
2918
|
+
case js.FOCUS_LAYER_OPTIONS: return t.nextLayerFocus ? {
|
|
2880
2919
|
...e,
|
|
2881
2920
|
layerFocus: t.nextLayerFocus,
|
|
2882
|
-
triggerFocus:
|
|
2921
|
+
triggerFocus: Ls()
|
|
2883
2922
|
} : e;
|
|
2884
|
-
case
|
|
2923
|
+
case js.OPEN_LAYER: return {
|
|
2885
2924
|
...e,
|
|
2886
2925
|
isLayerOpen: !0
|
|
2887
2926
|
};
|
|
2888
|
-
case
|
|
2927
|
+
case js.CLOSE_LAYER: return {
|
|
2889
2928
|
...e,
|
|
2890
2929
|
isLayerOpen: !1
|
|
2891
2930
|
};
|
|
2892
2931
|
default: return e;
|
|
2893
2932
|
}
|
|
2894
|
-
},
|
|
2933
|
+
}, Bs = {
|
|
2895
2934
|
possiblePlacements: ["bottom-start", "top-start"],
|
|
2896
2935
|
placement: "bottom-start"
|
|
2897
|
-
},
|
|
2936
|
+
}, Vs = /* @__PURE__ */ function(e) {
|
|
2898
2937
|
return e.CLOSE_LAYER = "CLOSE_LAYER", e.OPEN_LAYER = "OPEN_LAYER", e.SET_VISIBLE_OPTIONS = "SET_VISIBLE_OPTIONS", e.CLEAR_SEARCH = "CLEAR_SEARCH", e.RESET_LAYER_FOCUS = "RESET_LAYER_FOCUS", e.FOCUS_LAYER_OPTIONS = "FOCUS_LAYER_OPTIONS", e.BLUR_TRIGGER_INPUTS = "BLUR_TRIGGER_INPUTS", e.FOCUS_TRIGGER_INPUTS = "FOCUS_TRIGGER_INPUTS", e.ON_CHANGE_SEARCH = "ON_CHANGE_SEARCH", e;
|
|
2899
|
-
}({}),
|
|
2938
|
+
}({}), Hs = /* @__PURE__ */ function(e) {
|
|
2900
2939
|
return e.RIGHT = "ArrowRight", e.LEFT = "ArrowLeft", e.UP = "ArrowUp", e.DOWN = "ArrowDown", e.ENTER = "Enter", e.ESC = "Escape", e.TAB = "Tab", e;
|
|
2901
|
-
}({}),
|
|
2940
|
+
}({}), Us = ({ state: e, dispatch: t, options: n, setTriggerFocus: r, disabled: i, disabledContext: a, onCreate: s, onChange: l, selectedOptions: u, width: d, small: f, isFontLoaded: m, placeholder: h, firstSelectedOptionIndex: g, createAble: _, listRef: v, autoLayerWidth: y }) => {
|
|
2902
2941
|
var b;
|
|
2903
2942
|
let x = () => {
|
|
2904
|
-
e.isLayerOpen && t({ type:
|
|
2905
|
-
}, S = () => t({ type:
|
|
2943
|
+
e.isLayerOpen && t({ type: Vs.CLOSE_LAYER }), r();
|
|
2944
|
+
}, S = () => t({ type: Vs.OPEN_LAYER }), C = p(!0);
|
|
2906
2945
|
c(() => {
|
|
2907
2946
|
C.current ? C.current = !1 : t({
|
|
2908
|
-
type:
|
|
2947
|
+
type: Vs.SET_VISIBLE_OPTIONS,
|
|
2909
2948
|
options: n
|
|
2910
2949
|
});
|
|
2911
2950
|
}, [n]);
|
|
@@ -2919,15 +2958,15 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2919
2958
|
} else l && l(e, o);
|
|
2920
2959
|
}
|
|
2921
2960
|
t({
|
|
2922
|
-
type:
|
|
2961
|
+
type: Vs.CLEAR_SEARCH,
|
|
2923
2962
|
options: n
|
|
2924
2963
|
}), r();
|
|
2925
2964
|
}
|
|
2926
|
-
}, T = o(() => d ? d === "auto" ?
|
|
2965
|
+
}, T = o(() => d ? d === "auto" ? ys(n, f, m, h) : d : "100%", [n, m]), E = o((e) => y ? Math.max(ys(n, f, m, h), e == null ? void 0 : e.width) : e == null ? void 0 : e.width, [n, m]), { renderLayer: D, layerProps: O, triggerProps: k, triggerBounds: A } = hi({
|
|
2927
2966
|
isOpen: (b = e == null ? void 0 : e.isLayerOpen) == null ? !1 : b,
|
|
2928
2967
|
matchReferenceWidth: !0,
|
|
2929
2968
|
overflowContainer: !0,
|
|
2930
|
-
...
|
|
2969
|
+
...Bs,
|
|
2931
2970
|
onOutsideClick: x
|
|
2932
2971
|
}), j = () => {
|
|
2933
2972
|
if (!(i || a)) {
|
|
@@ -2936,7 +2975,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2936
2975
|
return;
|
|
2937
2976
|
}
|
|
2938
2977
|
r(), t({
|
|
2939
|
-
type:
|
|
2978
|
+
type: Vs.RESET_LAYER_FOCUS,
|
|
2940
2979
|
options: n,
|
|
2941
2980
|
firstSelectedOptionIndex: g
|
|
2942
2981
|
}), S();
|
|
@@ -2944,7 +2983,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2944
2983
|
}, M = p(!0);
|
|
2945
2984
|
c(() => {
|
|
2946
2985
|
M.current ? M.current = !1 : e.isLayerOpen || t({
|
|
2947
|
-
type:
|
|
2986
|
+
type: Vs.CLEAR_SEARCH,
|
|
2948
2987
|
options: n
|
|
2949
2988
|
});
|
|
2950
2989
|
}, [e.isLayerOpen]);
|
|
@@ -2955,23 +2994,23 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2955
2994
|
let t = u instanceof Array ? [] : { value: null };
|
|
2956
2995
|
l && l(e, t);
|
|
2957
2996
|
}, F = (e) => t({
|
|
2958
|
-
type:
|
|
2997
|
+
type: Vs.ON_CHANGE_SEARCH,
|
|
2959
2998
|
options: n,
|
|
2960
2999
|
value: e,
|
|
2961
3000
|
createAble: _
|
|
2962
3001
|
}), I = () => {
|
|
2963
|
-
S(), t({ type:
|
|
3002
|
+
S(), t({ type: Vs.BLUR_TRIGGER_INPUTS });
|
|
2964
3003
|
}, L = (e) => {
|
|
2965
3004
|
v.current && Number.isInteger(e) && v.current.scrollToRow({ index: e });
|
|
2966
3005
|
}, R = (n) => {
|
|
2967
|
-
let r =
|
|
3006
|
+
let r = Fs(n, e.layerFocus);
|
|
2968
3007
|
t({
|
|
2969
|
-
type:
|
|
3008
|
+
type: Vs.FOCUS_LAYER_OPTIONS,
|
|
2970
3009
|
nextLayerFocus: r
|
|
2971
3010
|
}), L(r.current);
|
|
2972
3011
|
}, ee = (e) => {
|
|
2973
3012
|
t({
|
|
2974
|
-
type:
|
|
3013
|
+
type: Vs.FOCUS_TRIGGER_INPUTS,
|
|
2975
3014
|
ICustomSelectDirection: e,
|
|
2976
3015
|
selectedOptions: u
|
|
2977
3016
|
});
|
|
@@ -2985,26 +3024,26 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
2985
3024
|
getTriggerWidth: T,
|
|
2986
3025
|
onKeyEvent: (n, r) => {
|
|
2987
3026
|
switch (n) {
|
|
2988
|
-
case
|
|
3027
|
+
case Hs.UP:
|
|
2989
3028
|
R("up");
|
|
2990
3029
|
break;
|
|
2991
|
-
case
|
|
3030
|
+
case Hs.DOWN:
|
|
2992
3031
|
e.isLayerOpen ? R("down") : I();
|
|
2993
3032
|
break;
|
|
2994
|
-
case
|
|
3033
|
+
case Hs.LEFT:
|
|
2995
3034
|
ee("left");
|
|
2996
3035
|
break;
|
|
2997
|
-
case
|
|
3036
|
+
case Hs.RIGHT:
|
|
2998
3037
|
ee("right");
|
|
2999
3038
|
break;
|
|
3000
|
-
case
|
|
3039
|
+
case Hs.ENTER:
|
|
3001
3040
|
z ? te(r) : ne ? re(r) : ie(r);
|
|
3002
3041
|
break;
|
|
3003
|
-
case
|
|
3042
|
+
case Hs.ESC:
|
|
3004
3043
|
x();
|
|
3005
3044
|
break;
|
|
3006
|
-
case
|
|
3007
|
-
t({ type:
|
|
3045
|
+
case Hs.TAB:
|
|
3046
|
+
t({ type: Vs.CLOSE_LAYER });
|
|
3008
3047
|
break;
|
|
3009
3048
|
default:
|
|
3010
3049
|
}
|
|
@@ -3022,17 +3061,17 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3022
3061
|
getLayerWidth: E,
|
|
3023
3062
|
triggerBounds: A
|
|
3024
3063
|
};
|
|
3025
|
-
},
|
|
3026
|
-
let { multi: t = !1, disabled: n = !1, error: r = null, warning: i = null, tooltip: a = null, options: o, selectedOptions: c, onCreate: l = null, placeholder: u = "", small: d = !1, tabIndex: m = 0, onFocus: h = () => {}, onBlur: g = () => {}, searchable: b = !0, clearable: x = !1, maxTooltipWidth: S, closeOnOptionActionClick: C, isInTable: w = !1, groupOrder: T, firstSelectedOptionIndex: E = 0, right: D = !1, testId: O = void 0 } = e, k = s(U), A = l !== null, j = p(null), M = p(null), [N, P] =
|
|
3064
|
+
}, Ws = (e) => {
|
|
3065
|
+
let { multi: t = !1, disabled: n = !1, error: r = null, warning: i = null, tooltip: a = null, options: o, selectedOptions: c, onCreate: l = null, placeholder: u = "", small: d = !1, tabIndex: m = 0, onFocus: h = () => {}, onBlur: g = () => {}, searchable: b = !0, clearable: x = !1, maxTooltipWidth: S, closeOnOptionActionClick: C, isInTable: w = !1, groupOrder: T, firstSelectedOptionIndex: E = 0, right: D = !1, testId: O = void 0 } = e, k = s(U), A = l !== null, j = p(null), M = p(null), [N, P] = $o(), F = es(), [I, L] = f(zs, {
|
|
3027
3066
|
options: o,
|
|
3028
3067
|
firstSelectedOptionIndex: E
|
|
3029
3068
|
}, ({ options: e }) => ({
|
|
3030
3069
|
searchValue: "",
|
|
3031
3070
|
visibleOptions: e,
|
|
3032
|
-
layerFocus:
|
|
3033
|
-
triggerFocus:
|
|
3071
|
+
layerFocus: Ps(e, E == null ? 0 : E),
|
|
3072
|
+
triggerFocus: Ms,
|
|
3034
3073
|
isLayerOpen: !1
|
|
3035
|
-
})), { getTriggerWidth: R, onKeyEvent: ee, clearAllIsFocused: te, triggerProps: ne, onClickTrigger: re, onChangeSearch: ie, onClickDeselectOption: z, onClickClearAll: ae, renderLayer: oe, layerProps: se, closeLayer: ce, onSelectOption: B, getLayerWidth: le, triggerBounds: ue } =
|
|
3074
|
+
})), { getTriggerWidth: R, onKeyEvent: ee, clearAllIsFocused: te, triggerProps: ne, onClickTrigger: re, onChangeSearch: ie, onClickDeselectOption: z, onClickClearAll: ae, renderLayer: oe, layerProps: se, closeLayer: ce, onSelectOption: B, getLayerWidth: le, triggerBounds: ue } = Us({
|
|
3036
3075
|
...e,
|
|
3037
3076
|
state: I,
|
|
3038
3077
|
dispatch: L,
|
|
@@ -3045,9 +3084,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3045
3084
|
return /* @__PURE__ */ y("div", {
|
|
3046
3085
|
style: { width: R() },
|
|
3047
3086
|
onKeyDown: (e) => {
|
|
3048
|
-
Object.values(
|
|
3087
|
+
Object.values(Hs).includes(e.key) && ee(e.key, e);
|
|
3049
3088
|
},
|
|
3050
|
-
children: [/* @__PURE__ */ v(
|
|
3089
|
+
children: [/* @__PURE__ */ v(As, {
|
|
3051
3090
|
selectedOptions: c,
|
|
3052
3091
|
searchValue: I.searchValue,
|
|
3053
3092
|
isOpen: I.isLayerOpen,
|
|
@@ -3079,15 +3118,15 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3079
3118
|
in: I.isLayerOpen,
|
|
3080
3119
|
timeout: 100,
|
|
3081
3120
|
classNames: {
|
|
3082
|
-
enter:
|
|
3083
|
-
enterActive:
|
|
3121
|
+
enter: rs.enter,
|
|
3122
|
+
enterActive: rs.enterActive
|
|
3084
3123
|
},
|
|
3085
3124
|
unmountOnExit: !0,
|
|
3086
3125
|
children: /* @__PURE__ */ v(_, { children: I.isLayerOpen && oe(/* @__PURE__ */ v("div", {
|
|
3087
3126
|
...se,
|
|
3088
3127
|
ref: fe,
|
|
3089
|
-
className:
|
|
3090
|
-
children: /* @__PURE__ */ v(
|
|
3128
|
+
className: rs.layerContainer,
|
|
3129
|
+
children: /* @__PURE__ */ v(Ds, {
|
|
3091
3130
|
listRef: j,
|
|
3092
3131
|
isMulti: t,
|
|
3093
3132
|
sections: I.visibleOptions,
|
|
@@ -3107,36 +3146,36 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3107
3146
|
})) })
|
|
3108
3147
|
})]
|
|
3109
3148
|
});
|
|
3110
|
-
},
|
|
3149
|
+
}, Gs = (e) => /* @__PURE__ */ v(ui, { children: /* @__PURE__ */ v(Ws, { ...e }) }), Ks = (e) => e == null || e === "", qs = (e) => /^-?\d+(\.\d+)?$/.test(e.trim()), Js = (e) => e instanceof Array, Ys = (e, t) => t && Array.isArray(e) ? e.map((e) => typeof e == "string" || typeof e == "number" ? {
|
|
3111
3150
|
label: e,
|
|
3112
3151
|
value: e
|
|
3113
|
-
} : e) : e,
|
|
3152
|
+
} : e) : e, Xs = (e, t) => {
|
|
3114
3153
|
if (typeof t == "object" && t && t.hasOwnProperty("label") && t.hasOwnProperty("value")) return t;
|
|
3115
3154
|
{
|
|
3116
3155
|
let n = typeof t == "object" && t && t.hasOwnProperty("value") ? t.value : t;
|
|
3117
|
-
return (Array.isArray(e) ? e.filter((e) => e.type !== Li.HEADING).find((e) => e.value == n) : void 0) || (
|
|
3156
|
+
return (Array.isArray(e) ? e.filter((e) => e.type !== Li.HEADING).find((e) => e.value == n) : void 0) || (Ks(n) ? void 0 : {
|
|
3118
3157
|
value: n,
|
|
3119
3158
|
label: n
|
|
3120
3159
|
});
|
|
3121
3160
|
}
|
|
3122
|
-
},
|
|
3161
|
+
}, Zs = (e, t) => Js(t) ? t.map((t) => Xs(e, t)).filter((e) => e !== void 0) : t === null ? void 0 : Xs(e, t), Qs = (e) => Array.isArray(e) && e.some((e) => typeof e == "string" || typeof e == "number"), $s = (e, t) => {
|
|
3123
3162
|
let n = t instanceof Array ? t.length ? t[0] : null : t, r = n == null ? null : typeof n == "string" || typeof n == "number" || typeof n == "boolean" ? n : n.value, i = e.filter((e) => e.type !== Li.HEADING).findIndex((e) => typeof e == "string" || typeof e == "number" ? e == r : e.value == r);
|
|
3124
3163
|
return i === -1 ? null : i;
|
|
3125
|
-
},
|
|
3126
|
-
let n =
|
|
3164
|
+
}, ec = (e, t) => {
|
|
3165
|
+
let n = Js(t) ? t : Ks(t) ? [] : [t];
|
|
3127
3166
|
return !(n != null && n.every((t) => (e == null ? void 0 : e.find((e) => (e == null ? void 0 : e.value) === (t == null ? void 0 : t.value))) !== void 0));
|
|
3128
|
-
},
|
|
3129
|
-
let i = Array.isArray(e) ? e : [], a =
|
|
3167
|
+
}, tc = (e, t, n, r) => {
|
|
3168
|
+
let i = Array.isArray(e) ? e : [], a = Js(t), o = Qs(i), s = Ys(i, o), c = n ? $s(i, t) : null, l = Zs(s, t);
|
|
3130
3169
|
return {
|
|
3131
3170
|
options: s,
|
|
3132
3171
|
selectedOptions: l,
|
|
3133
3172
|
multi: a,
|
|
3134
3173
|
simpleInputs: o,
|
|
3135
3174
|
firstSelectedOptionIndex: c,
|
|
3136
|
-
hasNonExistentValue: r && l !== void 0 ?
|
|
3175
|
+
hasNonExistentValue: r && l !== void 0 ? ec(s, l) : !1
|
|
3137
3176
|
};
|
|
3138
|
-
},
|
|
3139
|
-
let { name: t = "", options: n = [], value: r, native: i = !1, onChange: a = pn, deprecatedEventHandler: o = !1, autoScroll: s = !0, warning: c, error: l, checkNonExistentValues: u = !0, closeOnOptionActionClick: d = !0, testId: f, disabled: p } = e, { multi: m, simpleInputs: h, options: g, selectedOptions: _, firstSelectedOptionIndex: b, hasNonExistentValue: x } =
|
|
3177
|
+
}, nc = (e) => {
|
|
3178
|
+
let { name: t = "", options: n = [], value: r, native: i = !1, onChange: a = pn, deprecatedEventHandler: o = !1, autoScroll: s = !0, warning: c, error: l, checkNonExistentValues: u = !0, closeOnOptionActionClick: d = !0, testId: f, disabled: p } = e, { multi: m, simpleInputs: h, options: g, selectedOptions: _, firstSelectedOptionIndex: b, hasNonExistentValue: x } = tc(n, r, !i && s === !0, u), S = !m, C = i && S;
|
|
3140
3179
|
i && !S && console.warn("Native select does not support provided props (see stories)");
|
|
3141
3180
|
let w = "Value no longer available for re-selection", T = x && !p ? c ? /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", { children: w }), /* @__PURE__ */ v("div", { children: c })] }) : w : c, E = x && l && !p ? /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", { children: w }), /* @__PURE__ */ v("div", { children: l })] }) : l, D = (e, n) => {
|
|
3142
3181
|
if (o) {
|
|
@@ -3155,7 +3194,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3155
3194
|
});
|
|
3156
3195
|
}
|
|
3157
3196
|
};
|
|
3158
|
-
return C ? /* @__PURE__ */ v(
|
|
3197
|
+
return C ? /* @__PURE__ */ v(Qo, {
|
|
3159
3198
|
...e,
|
|
3160
3199
|
options: g,
|
|
3161
3200
|
selectedOption: _,
|
|
@@ -3164,7 +3203,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3164
3203
|
warning: T,
|
|
3165
3204
|
error: E,
|
|
3166
3205
|
testId: f
|
|
3167
|
-
}) : /* @__PURE__ */ v(
|
|
3206
|
+
}) : /* @__PURE__ */ v(Gs, {
|
|
3168
3207
|
...e,
|
|
3169
3208
|
options: g,
|
|
3170
3209
|
selectedOptions: _,
|
|
@@ -3176,11 +3215,11 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3176
3215
|
testId: f,
|
|
3177
3216
|
closeOnOptionActionClick: d
|
|
3178
3217
|
});
|
|
3179
|
-
},
|
|
3218
|
+
}, rc = (e, t) => t || e && e.reduce((e, t) => t != null && t.selected ? Number(t == null ? void 0 : t.value) : e, 10) || 10, ic = (e, t) => {
|
|
3180
3219
|
if (!t || !e) return 10;
|
|
3181
3220
|
let { options: n, value: r } = t, i = Number(r);
|
|
3182
|
-
return i === 0 ? 1 : Math.ceil(e /
|
|
3183
|
-
},
|
|
3221
|
+
return i === 0 ? 1 : Math.ceil(e / rc(n, i));
|
|
3222
|
+
}, ac = (e, t, n = "Selected page must be a positive whole number between 1 and") => {
|
|
3184
3223
|
let r = `${n} ${t}`, i = {
|
|
3185
3224
|
valid: !0,
|
|
3186
3225
|
error: null
|
|
@@ -3189,40 +3228,40 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3189
3228
|
valid: !1,
|
|
3190
3229
|
error: r
|
|
3191
3230
|
} : i;
|
|
3192
|
-
},
|
|
3231
|
+
}, oc = { paginationContainer: "_paginationContainer_1tmz4_1" }, sc = {
|
|
3193
3232
|
addon: "_addon_b4w53_1",
|
|
3194
3233
|
small: "_small_b4w53_12",
|
|
3195
3234
|
groupOrderFirst: "_groupOrderFirst_b4w53_16",
|
|
3196
3235
|
groupOrderMiddle: "_groupOrderMiddle_b4w53_17",
|
|
3197
3236
|
groupOrderLast: "_groupOrderLast_b4w53_21"
|
|
3198
|
-
},
|
|
3237
|
+
}, cc = ({ children: e, groupOrder: t, small: n = !1 }) => {
|
|
3199
3238
|
let r = (() => {
|
|
3200
3239
|
if (t) switch (t) {
|
|
3201
|
-
case V.FIRST: return
|
|
3202
|
-
case V.LAST: return
|
|
3203
|
-
default: return
|
|
3240
|
+
case V.FIRST: return sc.groupOrderFirst;
|
|
3241
|
+
case V.LAST: return sc.groupOrderLast;
|
|
3242
|
+
default: return sc.groupOrderMiddle;
|
|
3204
3243
|
}
|
|
3205
3244
|
return "";
|
|
3206
3245
|
})();
|
|
3207
3246
|
return /* @__PURE__ */ v("span", {
|
|
3208
|
-
className: g(
|
|
3247
|
+
className: g(sc.addon, r, n ? sc.small : ""),
|
|
3209
3248
|
children: e
|
|
3210
3249
|
});
|
|
3211
|
-
},
|
|
3212
|
-
let { rowCount: t, selectedPage: n, small: r, onSelectPage: i, rowsPerPage: a, errorMessageTemplate: o, testIds: s } = e, l = Number(a == null ? void 0 : a.value) === 0, u =
|
|
3250
|
+
}, lc = ({ pagination: e }) => {
|
|
3251
|
+
let { rowCount: t, selectedPage: n, small: r, onSelectPage: i, rowsPerPage: a, errorMessageTemplate: o, testIds: s } = e, l = Number(a == null ? void 0 : a.value) === 0, u = ic(t, a), [d, f] = m(String(n));
|
|
3213
3252
|
c(() => {
|
|
3214
3253
|
f(String(n));
|
|
3215
3254
|
}, [n]);
|
|
3216
|
-
let { error: p } =
|
|
3217
|
-
let { valid: t } =
|
|
3255
|
+
let { error: p } = ac(d, u, o), h = (e) => {
|
|
3256
|
+
let { valid: t } = ac(e, u, o);
|
|
3218
3257
|
f(e), t && e !== "" && i && i(Number(e));
|
|
3219
3258
|
};
|
|
3220
3259
|
return /* @__PURE__ */ y("div", {
|
|
3221
|
-
className:
|
|
3260
|
+
className: oc.paginationContainer,
|
|
3222
3261
|
children: [
|
|
3223
3262
|
a && /* @__PURE__ */ v("div", {
|
|
3224
3263
|
style: { flexShrink: 0 },
|
|
3225
|
-
children: /* @__PURE__ */ v(
|
|
3264
|
+
children: /* @__PURE__ */ v(nc, {
|
|
3226
3265
|
onChange: (e) => {
|
|
3227
3266
|
a.onChange && a.onChange(e), h("1");
|
|
3228
3267
|
},
|
|
@@ -3249,10 +3288,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3249
3288
|
onClick: () => h(String(Number(n) - 1)),
|
|
3250
3289
|
disabled: l || n === 1
|
|
3251
3290
|
}),
|
|
3252
|
-
/* @__PURE__ */ y(
|
|
3291
|
+
/* @__PURE__ */ y(fo, {
|
|
3253
3292
|
small: r,
|
|
3254
3293
|
width: "auto",
|
|
3255
|
-
children: [/* @__PURE__ */ v(
|
|
3294
|
+
children: [/* @__PURE__ */ v(mo, {
|
|
3256
3295
|
right: !0,
|
|
3257
3296
|
value: d,
|
|
3258
3297
|
placeholder: String(n),
|
|
@@ -3260,7 +3299,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3260
3299
|
width: "50px",
|
|
3261
3300
|
disabled: l || u <= 1,
|
|
3262
3301
|
error: p
|
|
3263
|
-
}), /* @__PURE__ */ y(
|
|
3302
|
+
}), /* @__PURE__ */ y(cc, { children: ["of ", u] })]
|
|
3264
3303
|
}),
|
|
3265
3304
|
/* @__PURE__ */ v(K, {
|
|
3266
3305
|
small: r,
|
|
@@ -3281,7 +3320,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3281
3320
|
})
|
|
3282
3321
|
]
|
|
3283
3322
|
});
|
|
3284
|
-
},
|
|
3323
|
+
}, uc = ({ pagination: e, actions: t, content: n, testId: r }) => {
|
|
3285
3324
|
let i = t && t.length, a = n != null, o = () => {
|
|
3286
3325
|
if (e) {
|
|
3287
3326
|
var t;
|
|
@@ -3291,26 +3330,26 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3291
3330
|
return !1;
|
|
3292
3331
|
};
|
|
3293
3332
|
return i || a || o() ? /* @__PURE__ */ y("div", {
|
|
3294
|
-
className:
|
|
3333
|
+
className: Xo.footer,
|
|
3295
3334
|
"data-testid": `${r == null ? "pagination" : r}-footer`,
|
|
3296
3335
|
children: [a ? /* @__PURE__ */ v("div", {
|
|
3297
|
-
className:
|
|
3336
|
+
className: Xo.section,
|
|
3298
3337
|
children: /* @__PURE__ */ v("div", { children: n })
|
|
3299
3338
|
}) : null, i || o() ? /* @__PURE__ */ y("div", {
|
|
3300
|
-
className:
|
|
3301
|
-
children: [e && o() ? /* @__PURE__ */ v(
|
|
3339
|
+
className: Xo.section,
|
|
3340
|
+
children: [e && o() ? /* @__PURE__ */ v(lc, { pagination: e }) : /* @__PURE__ */ v("div", {}), i && /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(ua, { actions: t }) })]
|
|
3302
3341
|
}) : null]
|
|
3303
3342
|
}) : null;
|
|
3304
|
-
},
|
|
3343
|
+
}, dc = (e) => {
|
|
3305
3344
|
let t = Math.max(...e.reduce((e, t) => {
|
|
3306
3345
|
let n = t.cells.map((e) => e.colSpan ? e.colSpan : 1).reduce((e, t) => e + t, 0);
|
|
3307
3346
|
return e.concat(n);
|
|
3308
3347
|
}, []));
|
|
3309
3348
|
return isNaN(t) ? 0 : t;
|
|
3310
|
-
},
|
|
3311
|
-
let n = [
|
|
3349
|
+
}, fc = (e, t) => {
|
|
3350
|
+
let n = [dc(t), dc(e)];
|
|
3312
3351
|
return Math.max(...n);
|
|
3313
|
-
},
|
|
3352
|
+
}, pc = (e) => e.reduce((e, t) => t.actions && t.actions.length > 0 ? 1 : e, 0), mc = (e, t) => pc(t) > 0 || pc(e) > 0, hc = {
|
|
3314
3353
|
clickableRow: "_clickableRow_g8hv8_1",
|
|
3315
3354
|
hoverableRow: "_hoverableRow_g8hv8_4",
|
|
3316
3355
|
rowActive: "_rowActive_g8hv8_4",
|
|
@@ -3319,11 +3358,11 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3319
3358
|
dragIconCell: "_dragIconCell_g8hv8_34",
|
|
3320
3359
|
dragIcon: "_dragIcon_g8hv8_34",
|
|
3321
3360
|
dragIconDisabled: "_dragIconDisabled_g8hv8_55"
|
|
3322
|
-
},
|
|
3361
|
+
}, gc = ({ colSpan: e, children: t, flush: n }) => /* @__PURE__ */ v("tr", { children: /* @__PURE__ */ v("td", {
|
|
3323
3362
|
colSpan: e,
|
|
3324
|
-
className: g(
|
|
3363
|
+
className: g(hc.expandableRow, n ? hc.flush : ""),
|
|
3325
3364
|
children: t
|
|
3326
|
-
}) }),
|
|
3365
|
+
}) }), _c = (e, t = {
|
|
3327
3366
|
leftAligned: "",
|
|
3328
3367
|
rightAligned: "",
|
|
3329
3368
|
centerAligned: ""
|
|
@@ -3336,7 +3375,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3336
3375
|
case Br.CENTER: return n ? Br.CENTER : t.centerAligned;
|
|
3337
3376
|
default: return n ? Br.LEFT : t.leftAligned;
|
|
3338
3377
|
}
|
|
3339
|
-
},
|
|
3378
|
+
}, vc = (e, t = !1, n = 0) => {
|
|
3340
3379
|
if (!e || e.length === 0) return [];
|
|
3341
3380
|
let r = e.every((e) => Array.isArray(e)), i = e.every((e) => typeof e == "string");
|
|
3342
3381
|
return r && t ? e[n] || [] : i ? e : (console.warn("getHeaderAlignment: alignments array contains a mix of strings and arrays, returning an empty array."), []);
|
|
@@ -3370,7 +3409,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3370
3409
|
popover: "_popover_1flvp_207",
|
|
3371
3410
|
disabledPointerEvents: "_disabledPointerEvents_1flvp_210",
|
|
3372
3411
|
standaloneCheckbox: "_standaloneCheckbox_1flvp_213"
|
|
3373
|
-
},
|
|
3412
|
+
}, yc = ({ cell: e, columnAlignment: t, testId: n, type: r }) => /* @__PURE__ */ v(mo, {
|
|
3374
3413
|
name: e.name,
|
|
3375
3414
|
value: e.value,
|
|
3376
3415
|
onChange: (t) => {
|
|
@@ -3395,9 +3434,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3395
3434
|
tabIndex: e.disabled ? -1 : 0,
|
|
3396
3435
|
tooltip: e.tooltip,
|
|
3397
3436
|
type: r
|
|
3398
|
-
}),
|
|
3437
|
+
}), bc = 14, xc = (e) => String(rr(e)), Sc = (e) => Kn(e) ? e : xc($n(nr(e), bc)), Cc = (e) => e ? typeof e == "string" ? e : tn(e) ? e[0] : e.fieldName : "", wc = ({ name: e, placeholder: t = "", disabled: n = !1, error: r = !1, left: i = !1, small: a = !1, width: o = "100%", value: s = "", onChange: l = () => {}, onFocus: u = () => {}, onBlur: d = () => {}, selectOnFocus: f = !0, tabIndex: h = 0, testId: g, tooltip: _ = null, warning: y = !1, validationCallback: b = () => {}, allowEmpty: x = !1, isInTable: S, groupOrder: C, enableCosmeticRounding: w = !0, enableDisplayRounding: T = !1, roundDisplayValue: E, disableInternalErrorValidationMessages: D = !1, disableValidationOnFocus: O = !1 }) => {
|
|
3399
3438
|
let k = (e) => {
|
|
3400
|
-
let n = ar(e), r = t &&
|
|
3439
|
+
let n = ar(e), r = t && Ks(e);
|
|
3401
3440
|
return [Infinity, -Infinity].includes(Number(e)) || r ? {
|
|
3402
3441
|
valid: !0,
|
|
3403
3442
|
errors: []
|
|
@@ -3409,10 +3448,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3409
3448
|
}, A = (e) => {
|
|
3410
3449
|
var t;
|
|
3411
3450
|
let n = !!(e != null && e.endsWith("0"));
|
|
3412
|
-
return
|
|
3413
|
-
}, j = p(null), [M, N] = m(A(
|
|
3451
|
+
return xc(w && e && !n && (t = k(e)) != null && t.valid ? Sc(e) : e);
|
|
3452
|
+
}, j = p(null), [M, N] = m(A(xc(s))), [P, F] = m(!1), I = Cc(e), { valid: L, errors: R } = k(M), ee = R && R.length && !D ? R[0] : null;
|
|
3414
3453
|
c(() => {
|
|
3415
|
-
let e = A(
|
|
3454
|
+
let e = A(xc(s));
|
|
3416
3455
|
nr(M) !== nr(e) && N(e);
|
|
3417
3456
|
}, [
|
|
3418
3457
|
s,
|
|
@@ -3428,11 +3467,11 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3428
3467
|
let te = (e) => {
|
|
3429
3468
|
var n, r;
|
|
3430
3469
|
let i = "key" in e ? M : e == null || (n = e.target) == null ? void 0 : n.value, a = Rn(i.replaceAll(" ", "").replaceAll("|", ""));
|
|
3431
|
-
N(a), ((r = k(a)) != null && r.valid || t &&
|
|
3470
|
+
N(a), ((r = k(a)) != null && r.valid || t && Ks(i)) && l({
|
|
3432
3471
|
...e,
|
|
3433
3472
|
target: {
|
|
3434
3473
|
...e.target,
|
|
3435
|
-
value: tr(
|
|
3474
|
+
value: tr(xc(a)),
|
|
3436
3475
|
name: I
|
|
3437
3476
|
}
|
|
3438
3477
|
});
|
|
@@ -3441,17 +3480,17 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3441
3480
|
if (j && j != null && j.current && T && P) {
|
|
3442
3481
|
let e = j.current;
|
|
3443
3482
|
e && !f && setTimeout(() => {
|
|
3444
|
-
let { length: t } =
|
|
3483
|
+
let { length: t } = xc(M);
|
|
3445
3484
|
e.setSelectionRange(t, t);
|
|
3446
3485
|
}, 0);
|
|
3447
3486
|
}
|
|
3448
|
-
}, [P]), /* @__PURE__ */ v(
|
|
3487
|
+
}, [P]), /* @__PURE__ */ v(mo, {
|
|
3449
3488
|
type: "text",
|
|
3450
3489
|
name: I,
|
|
3451
3490
|
testId: g,
|
|
3452
3491
|
disabled: n,
|
|
3453
3492
|
placeholder: t,
|
|
3454
|
-
value: T && !P && L ? E ?
|
|
3493
|
+
value: T && !P && L ? E ? xc(E(M)) : ((e) => S ? Qn(e, 2) : Xn(e, 4))(s) : M,
|
|
3455
3494
|
onChange: te,
|
|
3456
3495
|
onFocus: (e) => {
|
|
3457
3496
|
F(!0), u(e);
|
|
@@ -3460,7 +3499,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3460
3499
|
F(!1), d(e);
|
|
3461
3500
|
},
|
|
3462
3501
|
onKeyDown: (e) => {
|
|
3463
|
-
e.key ===
|
|
3502
|
+
e.key === Hs.ENTER && te(e);
|
|
3464
3503
|
},
|
|
3465
3504
|
error: ee || r,
|
|
3466
3505
|
warning: y,
|
|
@@ -3474,9 +3513,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3474
3513
|
tooltip: _,
|
|
3475
3514
|
ref: j
|
|
3476
3515
|
}, I);
|
|
3477
|
-
},
|
|
3516
|
+
}, Tc = ({ cell: e, columnAlignment: t, testId: n }) => {
|
|
3478
3517
|
var r;
|
|
3479
|
-
return /* @__PURE__ */ v(
|
|
3518
|
+
return /* @__PURE__ */ v(wc, {
|
|
3480
3519
|
name: e.name,
|
|
3481
3520
|
value: e.value,
|
|
3482
3521
|
onChange: (t) => {
|
|
@@ -3502,7 +3541,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3502
3541
|
roundDisplayValue: e.roundDisplayValue,
|
|
3503
3542
|
disableValidationOnFocus: e.disableValidationOnFocus
|
|
3504
3543
|
});
|
|
3505
|
-
},
|
|
3544
|
+
}, Ec = ({ cell: e, columnAlignment: t, testId: n }) => /* @__PURE__ */ v(nc, {
|
|
3506
3545
|
name: e.name,
|
|
3507
3546
|
borderRadius: 0,
|
|
3508
3547
|
options: e.options,
|
|
@@ -3528,26 +3567,26 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3528
3567
|
right: t === Br.RIGHT,
|
|
3529
3568
|
testId: n,
|
|
3530
3569
|
tabIndex: e.disabled ? -1 : 0
|
|
3531
|
-
}),
|
|
3570
|
+
}), Dc = ({ cell: e, columnAlignment: t, testId: n }) => /* @__PURE__ */ v("div", {
|
|
3532
3571
|
className: g(X.inputWrapper, e.type === "NumberInput" ? X.numberInputWrapper : ""),
|
|
3533
|
-
children: e.type === "Input" ? /* @__PURE__ */ v(
|
|
3572
|
+
children: e.type === "Input" ? /* @__PURE__ */ v(yc, {
|
|
3534
3573
|
cell: e,
|
|
3535
3574
|
columnAlignment: t,
|
|
3536
3575
|
testId: n
|
|
3537
|
-
}) : e.type === "NumberInput" ? /* @__PURE__ */ v(
|
|
3576
|
+
}) : e.type === "NumberInput" ? /* @__PURE__ */ v(Tc, {
|
|
3538
3577
|
cell: e,
|
|
3539
3578
|
columnAlignment: t,
|
|
3540
3579
|
testId: n
|
|
3541
|
-
}) : e.type === "DateInput" ? /* @__PURE__ */ v(
|
|
3580
|
+
}) : e.type === "DateInput" ? /* @__PURE__ */ v(yc, {
|
|
3542
3581
|
cell: e,
|
|
3543
3582
|
testId: n,
|
|
3544
3583
|
type: "date"
|
|
3545
|
-
}) : e.type === "Select" ? /* @__PURE__ */ v(
|
|
3584
|
+
}) : e.type === "Select" ? /* @__PURE__ */ v(Ec, {
|
|
3546
3585
|
cell: e,
|
|
3547
3586
|
columnAlignment: t,
|
|
3548
3587
|
testId: n
|
|
3549
3588
|
}) : null
|
|
3550
|
-
}),
|
|
3589
|
+
}), Oc = ({ cell: e, testId: t }) => {
|
|
3551
3590
|
let n = s(U), { error: r, warning: i, tooltip: a, maxTooltipWidth: o } = e, c = (e) => J(e);
|
|
3552
3591
|
return /* @__PURE__ */ v("div", {
|
|
3553
3592
|
className: X.inputWrapper,
|
|
@@ -3573,7 +3612,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3573
3612
|
})
|
|
3574
3613
|
})
|
|
3575
3614
|
});
|
|
3576
|
-
},
|
|
3615
|
+
}, kc = ({ cell: e, testId: t }) => /* @__PURE__ */ v("div", {
|
|
3577
3616
|
className: e.label ? "" : X.standaloneCheckbox,
|
|
3578
3617
|
children: /* @__PURE__ */ v(G, {
|
|
3579
3618
|
text: e.tooltip,
|
|
@@ -3589,7 +3628,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3589
3628
|
indeterminate: e.indeterminate
|
|
3590
3629
|
})
|
|
3591
3630
|
})
|
|
3592
|
-
}),
|
|
3631
|
+
}), Ac = {
|
|
3593
3632
|
container: "_container_1rezb_1",
|
|
3594
3633
|
small: "_small_1rezb_9",
|
|
3595
3634
|
vertical: "_vertical_1rezb_12",
|
|
@@ -3605,17 +3644,17 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3605
3644
|
markActive: "_markActive_1rezb_146",
|
|
3606
3645
|
sliderDisabled: "_sliderDisabled_1rezb_149",
|
|
3607
3646
|
label: "_label_1rezb_156"
|
|
3608
|
-
},
|
|
3647
|
+
}, jc = (e, t) => hn(tn(e) ? e : [e]).slice(0, t ? 2 : 1), Mc = (e, t) => t ? e : e[0], Nc = mr((e) => e.map(({ label: e, tooltip: t, value: n }) => ({
|
|
3609
3648
|
label: e,
|
|
3610
3649
|
tooltip: t,
|
|
3611
3650
|
value: Number(n)
|
|
3612
|
-
})), hr),
|
|
3651
|
+
})), hr), Pc = ({ name: e, label: t, width: n = "100%", labelWidth: r = "auto", testId: i, value: a, min: o, max: c, step: l = 1, marks: u = [], showArrows: f = !1, showTooltip: p = !1, tooltipFormatter: h = (e) => e, disabled: b = !1, range: x = !1, small: S = !1, vertical: C = {
|
|
3613
3652
|
enabled: !1,
|
|
3614
3653
|
width: "100px",
|
|
3615
3654
|
height: "400px"
|
|
3616
3655
|
}, onChange: w, onChangeComplete: T }) => {
|
|
3617
|
-
let E = s(U), D = b || E, [O, k] = m(null), A =
|
|
3618
|
-
let r =
|
|
3656
|
+
let E = s(U), D = b || E, [O, k] = m(null), A = Nc(u), j = d(() => jc(a, x), [x, a]), M = (n) => {
|
|
3657
|
+
let r = Mc(n, x);
|
|
3619
3658
|
return { target: {
|
|
3620
3659
|
name: e == null ? "" : e,
|
|
3621
3660
|
value: r,
|
|
@@ -3628,7 +3667,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3628
3667
|
}, F = (e) => {
|
|
3629
3668
|
N(e), P(e);
|
|
3630
3669
|
}, I = () => /* @__PURE__ */ v("div", {
|
|
3631
|
-
className:
|
|
3670
|
+
className: Ac.button,
|
|
3632
3671
|
children: /* @__PURE__ */ v(K, {
|
|
3633
3672
|
basic: !0,
|
|
3634
3673
|
small: !0,
|
|
@@ -3640,7 +3679,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3640
3679
|
icon: H.FAST_BACKWARD
|
|
3641
3680
|
})
|
|
3642
3681
|
}), L = () => /* @__PURE__ */ v("div", {
|
|
3643
|
-
className:
|
|
3682
|
+
className: Ac.button,
|
|
3644
3683
|
children: /* @__PURE__ */ v(K, {
|
|
3645
3684
|
basic: !0,
|
|
3646
3685
|
small: !0,
|
|
@@ -3658,7 +3697,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3658
3697
|
if (i) return x ? `${i}-handle-${e}` : `${i}-handle`;
|
|
3659
3698
|
}, ne = (e) => x ? j[0] <= e && e <= j[1] : j[0] >= e, re = (e) => x ? Math.abs(e - j[0]) <= Math.abs(e - j[1]) ? [Yt(e, o, j[1]), j[1]] : [j[0], Yt(e, j[0], c)] : [Yt(e, o, c)];
|
|
3660
3699
|
return /* @__PURE__ */ y("div", {
|
|
3661
|
-
className: g(
|
|
3700
|
+
className: g(Ac.container, S ? Ac.small : "", C.enabled ? Ac.vertical : ""),
|
|
3662
3701
|
style: C.enabled ? {
|
|
3663
3702
|
width: C.width,
|
|
3664
3703
|
height: C.height
|
|
@@ -3666,7 +3705,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3666
3705
|
children: [
|
|
3667
3706
|
f && (C.enabled ? /* @__PURE__ */ v(L, {}) : /* @__PURE__ */ v(I, {})),
|
|
3668
3707
|
/* @__PURE__ */ y(pr.Root, {
|
|
3669
|
-
className: g(
|
|
3708
|
+
className: g(Ac.slider, D && Ac.sliderDisabled, f && Ac.hasArrows),
|
|
3670
3709
|
"data-testid": i,
|
|
3671
3710
|
disabled: D,
|
|
3672
3711
|
max: c,
|
|
@@ -3681,14 +3720,14 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3681
3720
|
step: l,
|
|
3682
3721
|
value: j,
|
|
3683
3722
|
children: [/* @__PURE__ */ y(pr.Track, {
|
|
3684
|
-
className:
|
|
3685
|
-
children: [/* @__PURE__ */ v(pr.Range, { className:
|
|
3686
|
-
className:
|
|
3723
|
+
className: Ac.track,
|
|
3724
|
+
children: [/* @__PURE__ */ v(pr.Range, { className: Ac.range }), A.length > 0 && /* @__PURE__ */ v("span", {
|
|
3725
|
+
className: Ac.marks,
|
|
3687
3726
|
children: A.map(({ label: e, tooltip: t, value: n }) => {
|
|
3688
3727
|
let r = Number(n), i = ne(r), a = { [C.enabled ? "bottom" : "left"]: R(r) };
|
|
3689
3728
|
return /* @__PURE__ */ v("button", {
|
|
3690
3729
|
"aria-label": String(e == null ? n : e),
|
|
3691
|
-
className: g(
|
|
3730
|
+
className: g(Ac.mark, i && Ac.markActive),
|
|
3692
3731
|
disabled: D,
|
|
3693
3732
|
onClick: () => F(re(r)),
|
|
3694
3733
|
style: a,
|
|
@@ -3699,7 +3738,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3699
3738
|
t ? ": " : "",
|
|
3700
3739
|
e == null ? n : e
|
|
3701
3740
|
] }),
|
|
3702
|
-
children: /* @__PURE__ */ v("span", { className:
|
|
3741
|
+
children: /* @__PURE__ */ v("span", { className: Ac.dot })
|
|
3703
3742
|
})
|
|
3704
3743
|
}, String(n));
|
|
3705
3744
|
})
|
|
@@ -3708,7 +3747,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3708
3747
|
var i;
|
|
3709
3748
|
return /* @__PURE__ */ v(pr.Thumb, {
|
|
3710
3749
|
"aria-label": String((i = t == null ? e : t) == null ? "Slider" : i),
|
|
3711
|
-
className:
|
|
3750
|
+
className: Ac.thumb,
|
|
3712
3751
|
"data-testid": te(r),
|
|
3713
3752
|
onKeyDown: () => k(r),
|
|
3714
3753
|
onKeyUp: () => k(null),
|
|
@@ -3717,7 +3756,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3717
3756
|
style: ee(n),
|
|
3718
3757
|
children: p && O === r && /* @__PURE__ */ v(G, {
|
|
3719
3758
|
display: "block",
|
|
3720
|
-
text: h(
|
|
3759
|
+
text: h(Mc(j, x)),
|
|
3721
3760
|
forceOpen: !0,
|
|
3722
3761
|
triggerStyle: {
|
|
3723
3762
|
position: "absolute",
|
|
@@ -3729,15 +3768,15 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3729
3768
|
}),
|
|
3730
3769
|
f && (C.enabled ? /* @__PURE__ */ v(I, {}) : /* @__PURE__ */ v(L, {})),
|
|
3731
3770
|
t && /* @__PURE__ */ v("label", {
|
|
3732
|
-
className:
|
|
3771
|
+
className: Ac.label,
|
|
3733
3772
|
style: { width: r },
|
|
3734
3773
|
children: t
|
|
3735
3774
|
})
|
|
3736
3775
|
]
|
|
3737
3776
|
});
|
|
3738
|
-
},
|
|
3777
|
+
}, Fc = ({ cell: e }) => /* @__PURE__ */ v("div", {
|
|
3739
3778
|
className: X.inputWrapper,
|
|
3740
|
-
children: /* @__PURE__ */ v(
|
|
3779
|
+
children: /* @__PURE__ */ v(Pc, {
|
|
3741
3780
|
label: e.label,
|
|
3742
3781
|
testId: e.testId,
|
|
3743
3782
|
value: e.value,
|
|
@@ -3751,7 +3790,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3751
3790
|
tooltipFormatter: e.tooltipFormatter,
|
|
3752
3791
|
disabled: e.disabled
|
|
3753
3792
|
})
|
|
3754
|
-
}),
|
|
3793
|
+
}), Ic = ({ cell: e }) => {
|
|
3755
3794
|
let { tooltip: t, icon: n } = e;
|
|
3756
3795
|
return /* @__PURE__ */ v("div", {
|
|
3757
3796
|
className: X.iconCellWrapper,
|
|
@@ -3763,7 +3802,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3763
3802
|
children: /* @__PURE__ */ v(W, { icon: n })
|
|
3764
3803
|
})
|
|
3765
3804
|
});
|
|
3766
|
-
},
|
|
3805
|
+
}, Lc = ({ cell: e }) => /* @__PURE__ */ v(ua, { actions: e.actions }), Rc = ({ cell: e }) => {
|
|
3767
3806
|
let { helpIcon: t } = e;
|
|
3768
3807
|
return t ? /* @__PURE__ */ v("div", {
|
|
3769
3808
|
className: X.icon,
|
|
@@ -3772,7 +3811,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3772
3811
|
text: t.tooltip
|
|
3773
3812
|
})
|
|
3774
3813
|
}) : null;
|
|
3775
|
-
},
|
|
3814
|
+
}, zc = ({ cell: e }) => {
|
|
3776
3815
|
let { libraryIcon: t } = e;
|
|
3777
3816
|
return t ? /* @__PURE__ */ v("div", {
|
|
3778
3817
|
className: X.icon,
|
|
@@ -3782,22 +3821,22 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3782
3821
|
icon: H.LIBRARY
|
|
3783
3822
|
})
|
|
3784
3823
|
}) : null;
|
|
3785
|
-
},
|
|
3824
|
+
}, Bc = ({ cell: e }) => {
|
|
3786
3825
|
let { hasSort: t, sort: n, sortPriority: r } = e;
|
|
3787
3826
|
return t ? /* @__PURE__ */ y("span", {
|
|
3788
3827
|
className: X.sortingCellIcon,
|
|
3789
|
-
children: [n === "down" ? /* @__PURE__ */ v(
|
|
3828
|
+
children: [n === "down" ? /* @__PURE__ */ v(Ja, {
|
|
3790
3829
|
link: !0,
|
|
3791
3830
|
children: /* @__PURE__ */ v(W, { icon: H.SORT_ASCENDING })
|
|
3792
|
-
}) : n === "up" ? /* @__PURE__ */ v(
|
|
3831
|
+
}) : n === "up" ? /* @__PURE__ */ v(Ja, {
|
|
3793
3832
|
link: !0,
|
|
3794
3833
|
children: /* @__PURE__ */ v(W, { icon: H.SORT_DESCENDING })
|
|
3795
|
-
}) : /* @__PURE__ */ v(
|
|
3834
|
+
}) : /* @__PURE__ */ v(Ja, {
|
|
3796
3835
|
faint: !0,
|
|
3797
3836
|
children: /* @__PURE__ */ v(W, { icon: H.SORT_DESCENDING })
|
|
3798
3837
|
}), r && n ? /* @__PURE__ */ v("sup", { children: r }) : null]
|
|
3799
3838
|
}) : null;
|
|
3800
|
-
},
|
|
3839
|
+
}, Vc = ({ cell: e, isHeader: t, testId: n }) => {
|
|
3801
3840
|
let { error: r, warning: i, tooltip: a, maxTooltipWidth: o, hasSort: s, onSort: c, type: l } = e, u = /* @__PURE__ */ y("div", {
|
|
3802
3841
|
className: g(X.staticCellContent, l === "Unit" ? X.unit : ""),
|
|
3803
3842
|
onClick: s ? (e) => c && c(e) : () => {},
|
|
@@ -3805,9 +3844,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3805
3844
|
"data-warning": i || null,
|
|
3806
3845
|
"data-testid": n,
|
|
3807
3846
|
children: [e.value, t ? /* @__PURE__ */ y(_, { children: [
|
|
3808
|
-
/* @__PURE__ */ v(
|
|
3809
|
-
/* @__PURE__ */ v(
|
|
3810
|
-
/* @__PURE__ */ v(
|
|
3847
|
+
/* @__PURE__ */ v(Rc, { cell: e }),
|
|
3848
|
+
/* @__PURE__ */ v(zc, { cell: e }),
|
|
3849
|
+
/* @__PURE__ */ v(Bc, { cell: e })
|
|
3811
3850
|
] }) : null]
|
|
3812
3851
|
});
|
|
3813
3852
|
return /* @__PURE__ */ v("div", {
|
|
@@ -3822,7 +3861,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3822
3861
|
children: u
|
|
3823
3862
|
})
|
|
3824
3863
|
});
|
|
3825
|
-
},
|
|
3864
|
+
}, Hc = ({ cell: e, testId: t }) => {
|
|
3826
3865
|
let { content: n, fullWidth: r, closeOnOutsideClick: i, disabled: a } = e;
|
|
3827
3866
|
return /* @__PURE__ */ v(xa, {
|
|
3828
3867
|
content: n,
|
|
@@ -3831,13 +3870,13 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3831
3870
|
disabled: a,
|
|
3832
3871
|
children: /* @__PURE__ */ v("div", {
|
|
3833
3872
|
className: X.popover,
|
|
3834
|
-
children: /* @__PURE__ */ v(
|
|
3873
|
+
children: /* @__PURE__ */ v(Vc, {
|
|
3835
3874
|
cell: e,
|
|
3836
3875
|
testId: t
|
|
3837
3876
|
})
|
|
3838
3877
|
})
|
|
3839
3878
|
});
|
|
3840
|
-
},
|
|
3879
|
+
}, Uc = {
|
|
3841
3880
|
wrapper: "_wrapper_1u1qo_1",
|
|
3842
3881
|
inline: "_inline_1u1qo_1",
|
|
3843
3882
|
radio: "_radio_1u1qo_5",
|
|
@@ -3848,10 +3887,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3848
3887
|
disabled: "_disabled_1u1qo_98",
|
|
3849
3888
|
isInTable: "_isInTable_1u1qo_114",
|
|
3850
3889
|
helpIconEnabled: "_helpIconEnabled_1u1qo_119"
|
|
3851
|
-
},
|
|
3890
|
+
}, Wc = ({ name: e, label: t, value: n, selected: r, disabled: i = !1, small: a = !1, onChange: o, noMargin: s = !1, testId: c, helpText: l, onClickHelp: u, textTransform: d = Hr.CAPITALIZE }) => {
|
|
3852
3891
|
let f = l || u;
|
|
3853
3892
|
return /* @__PURE__ */ y("div", {
|
|
3854
|
-
className: g(
|
|
3893
|
+
className: g(Uc.radio, i ? Uc.disabled : null, a ? Uc.small : null, s ? Uc.noMargin : null, t ? null : Uc.noLabel),
|
|
3855
3894
|
onClick: o,
|
|
3856
3895
|
"data-testid": c,
|
|
3857
3896
|
children: [
|
|
@@ -3869,13 +3908,13 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3869
3908
|
children: t
|
|
3870
3909
|
}),
|
|
3871
3910
|
f && /* @__PURE__ */ v("div", {
|
|
3872
|
-
className:
|
|
3911
|
+
className: Uc.helpIconEnabled,
|
|
3873
3912
|
onClick: u,
|
|
3874
3913
|
children: /* @__PURE__ */ v(Si, { text: l })
|
|
3875
3914
|
})
|
|
3876
3915
|
]
|
|
3877
3916
|
});
|
|
3878
|
-
},
|
|
3917
|
+
}, Gc = ({ cell: e, testId: t }) => /* @__PURE__ */ v(Wc, {
|
|
3879
3918
|
selected: e.selected,
|
|
3880
3919
|
name: e.name,
|
|
3881
3920
|
value: e.value,
|
|
@@ -3883,42 +3922,42 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3883
3922
|
disabled: e.disabled,
|
|
3884
3923
|
onChange: (t) => e.onChange(t),
|
|
3885
3924
|
testId: t
|
|
3886
|
-
}),
|
|
3925
|
+
}), Kc = ({ cell: e, isHeader: t, columnAlignment: n, testId: r }) => {
|
|
3887
3926
|
if (!e) return null;
|
|
3888
3927
|
switch (e.type) {
|
|
3889
3928
|
case "Input":
|
|
3890
3929
|
case "NumberInput":
|
|
3891
3930
|
case "DateInput":
|
|
3892
|
-
case "Select": return /* @__PURE__ */ v(
|
|
3931
|
+
case "Select": return /* @__PURE__ */ v(Dc, {
|
|
3893
3932
|
cell: e,
|
|
3894
3933
|
columnAlignment: n,
|
|
3895
3934
|
testId: r
|
|
3896
3935
|
});
|
|
3897
|
-
case "Link": return /* @__PURE__ */ v(
|
|
3936
|
+
case "Link": return /* @__PURE__ */ v(Oc, {
|
|
3898
3937
|
cell: e,
|
|
3899
3938
|
testId: r
|
|
3900
3939
|
});
|
|
3901
|
-
case "CheckBox": return /* @__PURE__ */ v(
|
|
3940
|
+
case "CheckBox": return /* @__PURE__ */ v(kc, {
|
|
3902
3941
|
cell: e,
|
|
3903
3942
|
testId: r
|
|
3904
3943
|
});
|
|
3905
|
-
case "Radio": return /* @__PURE__ */ v(
|
|
3944
|
+
case "Radio": return /* @__PURE__ */ v(Gc, {
|
|
3906
3945
|
cell: e,
|
|
3907
3946
|
testId: r
|
|
3908
3947
|
});
|
|
3909
|
-
case "Slider": return /* @__PURE__ */ v(
|
|
3910
|
-
case "Icon": return /* @__PURE__ */ v(
|
|
3911
|
-
case "Actions": return /* @__PURE__ */ v(
|
|
3912
|
-
case "Popover": return /* @__PURE__ */ v(
|
|
3913
|
-
default: return /* @__PURE__ */ v(
|
|
3948
|
+
case "Slider": return /* @__PURE__ */ v(Fc, { cell: e });
|
|
3949
|
+
case "Icon": return /* @__PURE__ */ v(Ic, { cell: e });
|
|
3950
|
+
case "Actions": return /* @__PURE__ */ v(Lc, { cell: e });
|
|
3951
|
+
case "Popover": return /* @__PURE__ */ v(Hc, { cell: e });
|
|
3952
|
+
default: return /* @__PURE__ */ v(Vc, {
|
|
3914
3953
|
cell: e,
|
|
3915
3954
|
isHeader: t,
|
|
3916
3955
|
testId: r
|
|
3917
3956
|
});
|
|
3918
3957
|
}
|
|
3919
|
-
},
|
|
3958
|
+
}, qc = /* @__PURE__ */ function(e) {
|
|
3920
3959
|
return e.INPUT = "Input", e.NUMBER_INPUT = "NumberInput", e.SELECT = "Select", e.POPOVER = "Popover", e.SLIDER = "Slider", e.CHECKBOX = "CheckBox", e.RADIO = "Radio", e.ACTIONS = "Actions", e.AUTO_UNIT = "AutoUnit", e.UNIT = "Unit", e.STATIC = "Static", e;
|
|
3921
|
-
}({}),
|
|
3960
|
+
}({}), Jc = ({ cell: e, isHeader: t, columnHeaderAlignment: n, columnAlignment: r = Br.LEFT, width: i, testId: a }) => {
|
|
3922
3961
|
var o;
|
|
3923
3962
|
if (!e) return null;
|
|
3924
3963
|
let { style: s, colSpan: c, rowSpan: l, width: u, textAlign: d } = e, f = p(null), m = {
|
|
@@ -3926,7 +3965,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3926
3965
|
headerAlignment: n,
|
|
3927
3966
|
textAlign: d,
|
|
3928
3967
|
isHeader: t
|
|
3929
|
-
}, h =
|
|
3968
|
+
}, h = _c(m, X), _ = _c(m, X, !0), y = e.type === qc.INPUT || e.type === qc.NUMBER_INPUT || e.type === qc.SELECT || e.type === qc.POPOVER ? X.inputCell : e.type === qc.SLIDER ? X.sliderCell : e.type === qc.CHECKBOX || e.type === qc.RADIO ? X.checkBoxCell : e.type === qc.ACTIONS ? X.actionsCell : X.staticCell, b = g(X.cell, y, e.hasSort ? X.sortingCell : null, h, e.breakWord ? X.breakWord : ""), x = (o = u == null ? i : u) == null ? void 0 : o, S = e.type === qc.STATIC || !e.type, C = {
|
|
3930
3969
|
width: x,
|
|
3931
3970
|
minWidth: x,
|
|
3932
3971
|
textTransform: t && S ? Hr.CAPITALIZE : void 0,
|
|
@@ -3938,17 +3977,17 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3938
3977
|
style: C,
|
|
3939
3978
|
colSpan: c,
|
|
3940
3979
|
rowSpan: l,
|
|
3941
|
-
children: /* @__PURE__ */ v(
|
|
3980
|
+
children: /* @__PURE__ */ v(Kc, {
|
|
3942
3981
|
cell: e,
|
|
3943
3982
|
columnAlignment: _ == null ? Br.RIGHT : _,
|
|
3944
3983
|
isHeader: t,
|
|
3945
3984
|
testId: a
|
|
3946
3985
|
})
|
|
3947
3986
|
});
|
|
3948
|
-
},
|
|
3949
|
-
let p =
|
|
3987
|
+
}, Yc = ({ row: e, rowIndex: t, isHeader: n = !1, columnCount: r, colSpan: i, columnHeaderAlignments: a = [], columnAlignment: o = [], hasRowActions: s, draggableTable: c = !1, columnWidths: l, dropDisabled: u = !1, height: d, testId: f }) => {
|
|
3988
|
+
let p = vc(a, n, t), { onRowClick: m, onRowFocus: h, onRowMouseEnter: b, onRowMouseLeave: x, expandedContent: S, error: C, warning: w, active: T } = e, E = e.cells.map((e, r) => {
|
|
3950
3989
|
let i = `${+!n}_${t}_${r}`;
|
|
3951
|
-
return /* @__PURE__ */ v(
|
|
3990
|
+
return /* @__PURE__ */ v(Jc, {
|
|
3952
3991
|
cell: e,
|
|
3953
3992
|
isHeader: n,
|
|
3954
3993
|
columnAlignment: o[r],
|
|
@@ -3956,9 +3995,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3956
3995
|
width: l ? l[r] : void 0,
|
|
3957
3996
|
testId: e.testId
|
|
3958
3997
|
}, i);
|
|
3959
|
-
}), D = s && /* @__PURE__ */ v(
|
|
3998
|
+
}), D = s && /* @__PURE__ */ v(Jc, {
|
|
3960
3999
|
cell: {
|
|
3961
|
-
type:
|
|
4000
|
+
type: qc.ACTIONS,
|
|
3962
4001
|
actions: e.actions
|
|
3963
4002
|
},
|
|
3964
4003
|
isHeader: n
|
|
@@ -3977,13 +4016,13 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3977
4016
|
onMouseLeave: x,
|
|
3978
4017
|
onFocus: h,
|
|
3979
4018
|
"data-testid": f,
|
|
3980
|
-
className: g(m ?
|
|
4019
|
+
className: g(m ? hc.clickableRow : null, b ? hc.hoverableRow : null),
|
|
3981
4020
|
children: [
|
|
3982
4021
|
c ? /* @__PURE__ */ v("th", {}) : null,
|
|
3983
4022
|
E,
|
|
3984
4023
|
D
|
|
3985
4024
|
]
|
|
3986
|
-
}, t), S && S.content ? /* @__PURE__ */ v(
|
|
4025
|
+
}, t), S && S.content ? /* @__PURE__ */ v(gc, {
|
|
3987
4026
|
colSpan: i,
|
|
3988
4027
|
flush: S.flush === !0,
|
|
3989
4028
|
children: S.content
|
|
@@ -3993,7 +4032,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
3993
4032
|
onMouseEnter: b,
|
|
3994
4033
|
onMouseLeave: x,
|
|
3995
4034
|
onFocus: h,
|
|
3996
|
-
className: g(m && !m.noStyle ?
|
|
4035
|
+
className: g(m && !m.noStyle ? hc.clickableRow : null, b && !b.noStyle ? hc.hoverableRow : null, T ? hc.rowActive : null),
|
|
3997
4036
|
"data-active": T || null,
|
|
3998
4037
|
"data-error": C || null,
|
|
3999
4038
|
"data-warning": w || null,
|
|
@@ -4003,9 +4042,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4003
4042
|
style: P,
|
|
4004
4043
|
children: [
|
|
4005
4044
|
c ? e.noDrag ? /* @__PURE__ */ v("td", { "aria-labelledby": "unique-label-id" }) : /* @__PURE__ */ v("td", {
|
|
4006
|
-
className:
|
|
4045
|
+
className: hc.dragIconCell,
|
|
4007
4046
|
children: /* @__PURE__ */ v("div", {
|
|
4008
|
-
className: g(
|
|
4047
|
+
className: g(hc.dragIcon, u ? hc.dragIconDisabled : ""),
|
|
4009
4048
|
...O,
|
|
4010
4049
|
...k,
|
|
4011
4050
|
children: /* @__PURE__ */ v(W, { icon: H.DRAG })
|
|
@@ -4014,12 +4053,12 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4014
4053
|
E,
|
|
4015
4054
|
D
|
|
4016
4055
|
]
|
|
4017
|
-
}, t), S && S.content ? /* @__PURE__ */ v(
|
|
4056
|
+
}, t), S && S.content ? /* @__PURE__ */ v(gc, {
|
|
4018
4057
|
colSpan: i,
|
|
4019
4058
|
flush: S.flush === !0,
|
|
4020
4059
|
children: S.content
|
|
4021
4060
|
}, `${t}_expanded_content`) : null] });
|
|
4022
|
-
},
|
|
4061
|
+
}, Xc = (e) => {
|
|
4023
4062
|
let { children: t, colSpan: n, columnAlignment: r, columnCount: i, draggable: a, onListReorder: o = () => {}, canListReorder: s = () => !0, rowActions: c, rows: l = [], tbodyRef: u } = e, [f, p] = m(null), [h, _] = m(!1), b = d(() => l.map((e, t) => t.toString()), [l]);
|
|
4024
4063
|
return a ? /* @__PURE__ */ y(gr, {
|
|
4025
4064
|
collisionDetection: vr,
|
|
@@ -4053,8 +4092,8 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4053
4092
|
}), !!f && Pn(/* @__PURE__ */ v(_r, {
|
|
4054
4093
|
dropAnimation: null,
|
|
4055
4094
|
children: /* @__PURE__ */ v("table", {
|
|
4056
|
-
className: g(
|
|
4057
|
-
children: /* @__PURE__ */ v("tbody", { children: /* @__PURE__ */ v(
|
|
4095
|
+
className: g(qo.table, qo.dragOverlay),
|
|
4096
|
+
children: /* @__PURE__ */ v("tbody", { children: /* @__PURE__ */ v(Yc, {
|
|
4058
4097
|
rowIndex: Number(f),
|
|
4059
4098
|
row: l[Number(f)],
|
|
4060
4099
|
columnCount: i,
|
|
@@ -4074,7 +4113,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4074
4113
|
})
|
|
4075
4114
|
}), document.body)]
|
|
4076
4115
|
}) : t({});
|
|
4077
|
-
},
|
|
4116
|
+
}, Zc = ({ table: e, children: t }) => {
|
|
4078
4117
|
var n, r, i;
|
|
4079
4118
|
let a = p(null), o = yr({
|
|
4080
4119
|
count: (n = (r = e == null ? void 0 : e.rowCount) == null ? (i = e.rows) == null ? void 0 : i.length : r) == null ? 0 : n,
|
|
@@ -4084,7 +4123,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4084
4123
|
});
|
|
4085
4124
|
return /* @__PURE__ */ v("div", {
|
|
4086
4125
|
id: "scrollWrapper",
|
|
4087
|
-
className: g(
|
|
4126
|
+
className: g(qo.scroll, qo.virtualScroll),
|
|
4088
4127
|
ref: a,
|
|
4089
4128
|
children: t({
|
|
4090
4129
|
virtualizer: o,
|
|
@@ -4097,7 +4136,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4097
4136
|
})()
|
|
4098
4137
|
})
|
|
4099
4138
|
});
|
|
4100
|
-
},
|
|
4139
|
+
}, Qc = ({ activeIndex: e, triggerScrollToActiveRow: t, isVirtualized: n, virtualizer: r }) => (c(() => {
|
|
4101
4140
|
if (t && !(e == null || e < 0)) {
|
|
4102
4141
|
if (n && r) r.scrollToIndex(e, {
|
|
4103
4142
|
behavior: "auto",
|
|
@@ -4116,11 +4155,11 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4116
4155
|
t,
|
|
4117
4156
|
n,
|
|
4118
4157
|
r
|
|
4119
|
-
]), null),
|
|
4158
|
+
]), null), $c = ({ table: e, children: t }) => {
|
|
4120
4159
|
let { infiniteScroll: n = !1, triggerScrollToActiveRow: r = !1, rows: i } = e, a = d(() => typeof e.activeRowIndex == "number" ? e.activeRowIndex : Array.isArray(i) && i.length ? i.findIndex((e) => e && e.active) : -1, [i, e.activeRowIndex]);
|
|
4121
|
-
return n ? /* @__PURE__ */ v(
|
|
4160
|
+
return n ? /* @__PURE__ */ v(Zc, {
|
|
4122
4161
|
table: e,
|
|
4123
|
-
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(
|
|
4162
|
+
children: ({ virtualizer: e, tableStyle: n }) => /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(Qc, {
|
|
4124
4163
|
isVirtualized: !0,
|
|
4125
4164
|
virtualizer: e,
|
|
4126
4165
|
activeIndex: a,
|
|
@@ -4131,16 +4170,16 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4131
4170
|
})] })
|
|
4132
4171
|
}) : /* @__PURE__ */ y("div", {
|
|
4133
4172
|
id: "scrollWrapper",
|
|
4134
|
-
className:
|
|
4135
|
-
children: [/* @__PURE__ */ v(
|
|
4173
|
+
className: qo.scroll,
|
|
4174
|
+
children: [/* @__PURE__ */ v(Qc, {
|
|
4136
4175
|
isVirtualized: !1,
|
|
4137
4176
|
activeIndex: a,
|
|
4138
4177
|
triggerScrollToActiveRow: r
|
|
4139
4178
|
}), t({})]
|
|
4140
4179
|
});
|
|
4141
|
-
},
|
|
4180
|
+
}, el = (e) => {
|
|
4142
4181
|
var t, n, r, i, a;
|
|
4143
|
-
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: m = [], actions: h, actionsRight: _, columnHeaderAlignments: b, columnAlignment: x, striped: S = !0, testId: C, draggable: w, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = p(null), j = en(e, "table.headers", []), M =
|
|
4182
|
+
let { onListReorder: o = () => {}, canListReorder: s = () => !0, beforeRenderRow: c, table: l } = e, { columnWidths: u, footer: d, name: f, rows: m = [], actions: h, actionsRight: _, columnHeaderAlignments: b, columnAlignment: x, striped: S = !0, testId: C, draggable: w, defaultEmptyRow: T = null, onAddRow: E = null, bordered: D = !0, maxHeight: O, fixedWidth: k } = l, A = p(null), j = en(e, "table.headers", []), M = fc(m, j), N = mc(m, j), P = M + +!!N, F = d ? (d == null || (t = d.pagination) == null || (t = t.rowsPerPage) == null ? void 0 : t.value) === 0 || Number(d == null || (n = d.pagination) == null ? void 0 : n.selectedPage) >= Number(d == null || (r = d.pagination) == null ? void 0 : r.rowCount) / Number(d == null || (i = d.pagination) == null || (i = i.rowsPerPage) == null ? void 0 : i.value) : !0, I = (T == null || (a = T.cells) == null ? void 0 : a.length) && E && F, L = {
|
|
4144
4183
|
cells: I ? T.cells.map((e, t) => (e == null ? void 0 : e.type) === "Input" ? {
|
|
4145
4184
|
...e,
|
|
4146
4185
|
onChange: (e) => {
|
|
@@ -4164,20 +4203,20 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4164
4203
|
rows: R
|
|
4165
4204
|
};
|
|
4166
4205
|
return /* @__PURE__ */ y("div", {
|
|
4167
|
-
className: g(
|
|
4206
|
+
className: g(qo.wrapper, D ? qo.bordered : ""),
|
|
4168
4207
|
style: {
|
|
4169
4208
|
maxHeight: O,
|
|
4170
4209
|
width: k,
|
|
4171
4210
|
display: k === "auto" ? "inline-flex" : "flex"
|
|
4172
4211
|
},
|
|
4173
4212
|
children: [
|
|
4174
|
-
/* @__PURE__ */ v(
|
|
4213
|
+
/* @__PURE__ */ v(Yo, {
|
|
4175
4214
|
actions: h,
|
|
4176
4215
|
actionsRight: _,
|
|
4177
4216
|
name: f,
|
|
4178
4217
|
testId: C && `${C}-title`
|
|
4179
4218
|
}),
|
|
4180
|
-
/* @__PURE__ */ v(
|
|
4219
|
+
/* @__PURE__ */ v(Xc, {
|
|
4181
4220
|
colSpan: P,
|
|
4182
4221
|
columnAlignment: x,
|
|
4183
4222
|
columnCount: M,
|
|
@@ -4187,13 +4226,13 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4187
4226
|
rows: R,
|
|
4188
4227
|
tbodyRef: A,
|
|
4189
4228
|
canListReorder: s,
|
|
4190
|
-
children: ({ dropDisabled: e }) => /* @__PURE__ */ v(
|
|
4229
|
+
children: ({ dropDisabled: e }) => /* @__PURE__ */ v($c, {
|
|
4191
4230
|
table: ee,
|
|
4192
4231
|
children: ({ virtualizer: t, tableStyle: n }) => /* @__PURE__ */ y("table", {
|
|
4193
|
-
className: g(
|
|
4232
|
+
className: g(qo.table, S ? qo.striped : ""),
|
|
4194
4233
|
"data-testid": C,
|
|
4195
4234
|
style: n,
|
|
4196
|
-
children: [/* @__PURE__ */ v("thead", { children: j.map((e, t) => /* @__PURE__ */ v(
|
|
4235
|
+
children: [/* @__PURE__ */ v("thead", { children: j.map((e, t) => /* @__PURE__ */ v(Yc, {
|
|
4197
4236
|
rowIndex: t,
|
|
4198
4237
|
isHeader: !0,
|
|
4199
4238
|
row: e,
|
|
@@ -4208,7 +4247,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4208
4247
|
ref: A,
|
|
4209
4248
|
children: t ? t.getVirtualItems().map((t) => {
|
|
4210
4249
|
let n = t.index, r = R[n];
|
|
4211
|
-
return /* @__PURE__ */ v(
|
|
4250
|
+
return /* @__PURE__ */ v(Yc, {
|
|
4212
4251
|
rowIndex: n,
|
|
4213
4252
|
row: c ? c({
|
|
4214
4253
|
row: r,
|
|
@@ -4223,7 +4262,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4223
4262
|
height: t.size,
|
|
4224
4263
|
dropDisabled: e
|
|
4225
4264
|
}, `1_${n}`);
|
|
4226
|
-
}) : R.map((t, n) => /* @__PURE__ */ v(
|
|
4265
|
+
}) : R.map((t, n) => /* @__PURE__ */ v(Yc, {
|
|
4227
4266
|
rowIndex: n,
|
|
4228
4267
|
row: c ? c({
|
|
4229
4268
|
row: t,
|
|
@@ -4241,24 +4280,24 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4241
4280
|
})
|
|
4242
4281
|
})
|
|
4243
4282
|
}),
|
|
4244
|
-
d && /* @__PURE__ */ v(
|
|
4283
|
+
d && /* @__PURE__ */ v(uc, {
|
|
4245
4284
|
pagination: d.pagination,
|
|
4246
4285
|
actions: d.actions,
|
|
4247
4286
|
content: d.content
|
|
4248
4287
|
})
|
|
4249
4288
|
]
|
|
4250
4289
|
});
|
|
4251
|
-
},
|
|
4290
|
+
}, tl = "blank", nl = 1e4, rl = (e, t, n, r) => {
|
|
4252
4291
|
let i = `${t} → ${n}:`, a = e.filter((e) => !e.startsWith(i)), o = r ? [...a, `${i} ${r}`] : a;
|
|
4253
4292
|
return {
|
|
4254
4293
|
updatedErrors: o,
|
|
4255
4294
|
isValid: o.length === 0
|
|
4256
4295
|
};
|
|
4257
|
-
},
|
|
4258
|
-
let i = d(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, s] = m(
|
|
4296
|
+
}, il = 20, al = 1, ol = ({ validationRules: e, parsedResult: t, updateState: n, testId: r }) => {
|
|
4297
|
+
let i = d(() => t.fields.map((e) => ({ value: e })), [t.fields]), [a, s] = m(il), [l, u] = m(al), f = p([]), h = (l - 1) * a, g = a === 0 ? t.rows.length : h + a, [_, y] = m([]), b = d(() => {
|
|
4259
4298
|
let n = e.filter((e) => !e.optionalColumn);
|
|
4260
4299
|
return t.fields.length === n.length ? n : e;
|
|
4261
|
-
}, [e, t.fields.length]), x = o((e, r) => (!f.current.length && t.rows.length && (f.current = t.rows[0].map((e) =>
|
|
4300
|
+
}, [e, t.fields.length]), x = o((e, r) => (!f.current.length && t.rows.length && (f.current = t.rows[0].map((e) => qs(e) ? "NumberInput" : "Input")), {
|
|
4262
4301
|
cells: e.map((e, a) => {
|
|
4263
4302
|
var o, s, c, l, u;
|
|
4264
4303
|
let { columnMessage: d = {}, validator: p = () => null } = (o = b == null ? void 0 : b[a]) == null ? {} : o, m = i == null || (s = i[a]) == null ? void 0 : s.value, h = `${`Row ${r + 1}`} → ${m}:`, g = p(e), _ = (c = t == null || (l = t.errors) == null ? void 0 : l.find((e) => e.startsWith(h))) == null ? null : c, v = g || _ || null;
|
|
@@ -4269,7 +4308,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4269
4308
|
disableValidationOnFocus: !0,
|
|
4270
4309
|
error: v,
|
|
4271
4310
|
validationCallback: (e, i) => {
|
|
4272
|
-
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } =
|
|
4311
|
+
let a = `Row ${r + 1}`, { updatedErrors: o, isValid: s } = rl(t.errors, a, e, i);
|
|
4273
4312
|
n({ parsedResult: {
|
|
4274
4313
|
...t,
|
|
4275
4314
|
errors: o,
|
|
@@ -4278,7 +4317,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4278
4317
|
},
|
|
4279
4318
|
onChange: (e) => {
|
|
4280
4319
|
var i;
|
|
4281
|
-
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } =
|
|
4320
|
+
let { value: o } = (i = e == null ? void 0 : e.target) == null ? {} : i, s = `Row ${r + 1}`, c = p(o), { updatedErrors: l, isValid: u } = rl(t.errors, s, m, c), d = t.rows.map((e, t) => t === r ? e.map((e, t) => t === a ? o : e) : e);
|
|
4282
4321
|
n({ parsedResult: {
|
|
4283
4322
|
...t,
|
|
4284
4323
|
rows: d,
|
|
@@ -4320,7 +4359,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4320
4359
|
]);
|
|
4321
4360
|
let S = d(() => t.fields.map((e, r) => {
|
|
4322
4361
|
var a, o, s;
|
|
4323
|
-
let c = b == null ? void 0 : b[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => gn(e) ===
|
|
4362
|
+
let c = b == null ? void 0 : b[r], l = Array.isArray(c == null ? void 0 : c.validUnits) ? c.validUnits : [], u = l == null ? void 0 : l.some((e) => gn(e) === tl);
|
|
4324
4363
|
if (!l.length || u) return {};
|
|
4325
4364
|
let d = t == null || (a = t.units) == null ? void 0 : a[r], f = gn(d), p = l != null && l.some((e) => gn(e) === f) ? d : (o = c == null ? void 0 : c.defaultUnit) == null ? "" : o;
|
|
4326
4365
|
return {
|
|
@@ -4358,7 +4397,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4358
4397
|
h,
|
|
4359
4398
|
g
|
|
4360
4399
|
]);
|
|
4361
|
-
return /* @__PURE__ */ v(
|
|
4400
|
+
return /* @__PURE__ */ v(el, {
|
|
4362
4401
|
beforeRenderRow: o(({ rowIndex: e }) => {
|
|
4363
4402
|
let n = h + e, r = t.rows[n];
|
|
4364
4403
|
return r ? x(r, n) : {
|
|
@@ -4431,7 +4470,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4431
4470
|
} }
|
|
4432
4471
|
}
|
|
4433
4472
|
});
|
|
4434
|
-
},
|
|
4473
|
+
}, sl = { listStyle: "_listStyle_yjfjw_1" }, cl = ({ errors: e, t }) => {
|
|
4435
4474
|
var n;
|
|
4436
4475
|
let r = (n = [...e]) == null ? void 0 : n.sort((e, t) => {
|
|
4437
4476
|
let n = (e) => {
|
|
@@ -4447,18 +4486,18 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4447
4486
|
content: t("unableToImportPleaseCorrectError", { rows: e == null ? void 0 : e.length }),
|
|
4448
4487
|
type: "Error",
|
|
4449
4488
|
details: /* @__PURE__ */ v("ul", {
|
|
4450
|
-
className:
|
|
4489
|
+
className: sl.listStyle,
|
|
4451
4490
|
children: r.map((e, t) => /* @__PURE__ */ v("li", { children: e }, t))
|
|
4452
4491
|
})
|
|
4453
4492
|
};
|
|
4454
|
-
},
|
|
4493
|
+
}, ll = ({ errors: e, t }) => e.length ? /* @__PURE__ */ v(Ko, { message: cl({
|
|
4455
4494
|
errors: e,
|
|
4456
4495
|
t
|
|
4457
|
-
}) }) : null,
|
|
4496
|
+
}) }) : null, ul = {
|
|
4458
4497
|
empty: "_empty_fe425_1",
|
|
4459
4498
|
text: "_text_fe425_11"
|
|
4460
|
-
},
|
|
4461
|
-
className:
|
|
4499
|
+
}, dl = ({ width: e = "auto", height: t = "auto", text: n = "No data", children: r, testId: i }) => /* @__PURE__ */ y("div", {
|
|
4500
|
+
className: ul.empty,
|
|
4462
4501
|
style: {
|
|
4463
4502
|
width: e,
|
|
4464
4503
|
height: t
|
|
@@ -4494,60 +4533,60 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4494
4533
|
})
|
|
4495
4534
|
}),
|
|
4496
4535
|
n !== "" && /* @__PURE__ */ v("div", {
|
|
4497
|
-
className:
|
|
4498
|
-
children: /* @__PURE__ */ v(
|
|
4536
|
+
className: ul.text,
|
|
4537
|
+
children: /* @__PURE__ */ v(Ja, {
|
|
4499
4538
|
faint: !0,
|
|
4500
4539
|
children: n
|
|
4501
4540
|
})
|
|
4502
4541
|
}),
|
|
4503
4542
|
r
|
|
4504
4543
|
]
|
|
4505
|
-
}),
|
|
4544
|
+
}), fl = (e) => {
|
|
4506
4545
|
var t;
|
|
4507
4546
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4508
4547
|
let t = e == null ? void 0 : e.match(/[.,]/g);
|
|
4509
4548
|
return t && t.length > 1;
|
|
4510
4549
|
});
|
|
4511
|
-
},
|
|
4550
|
+
}, pl = (e) => {
|
|
4512
4551
|
var t;
|
|
4513
4552
|
return e == null || (t = e.split(/;|\t|\n/)) == null ? void 0 : t.some((e) => {
|
|
4514
4553
|
var t;
|
|
4515
4554
|
return !(e != null && e.includes(".")) && (e == null || (t = e.match(/,/g)) == null ? void 0 : t.length) === 1;
|
|
4516
4555
|
});
|
|
4517
|
-
},
|
|
4556
|
+
}, ml = (e, t, n) => e >= t - n, hl = (e) => !!e && e !== "blank" && e.trim() !== "", gl = (e, t, n, r, i, a, o) => {
|
|
4518
4557
|
let s = [], c = r.filter((e) => e.optionalColumn).length, l = r.length, u = c ? `${l - c} or ${l}` : `${l}`, d = i && a ? 2 : i || a ? 1 : 0;
|
|
4519
|
-
if (i && !
|
|
4558
|
+
if (i && !ml(e.length, l, c) && s.push(o("incorrectNumberOfFieldNameHeaderColumns", { expectedLengthMessage: u })), a) {
|
|
4520
4559
|
var f, p;
|
|
4521
4560
|
let e = r.filter((e) => {
|
|
4522
4561
|
var t;
|
|
4523
|
-
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(
|
|
4562
|
+
return !e.optionalColumn && Array.isArray(e == null ? void 0 : e.validUnits) && (e == null || (t = e.validUnits) == null ? void 0 : t.some(hl));
|
|
4524
4563
|
}).length;
|
|
4525
|
-
|
|
4564
|
+
ml(t == null || (f = t.filter(hl)) == null ? void 0 : f.length, e, r == null || (p = r.filter((e) => (e == null ? void 0 : e.optionalColumn) || !Array.isArray(e == null ? void 0 : e.validUnits) || e.validUnits.includes("blank"))) == null ? void 0 : p.length) || s.push(o("incorrectNumberOfUnitHeaderColumns", { expectedLengthMessage: u }));
|
|
4526
4565
|
}
|
|
4527
4566
|
return n.length === 0 ? s.push(o("incorrectNumberOfDataColumns", {
|
|
4528
4567
|
expectedLengthMessage: u,
|
|
4529
4568
|
dataRowStartIndex: d
|
|
4530
4569
|
})) : n.forEach((e, t) => {
|
|
4531
|
-
|
|
4570
|
+
ml(e.length, l, c) || s.push(o("incorrectNumberOfDataColumns", {
|
|
4532
4571
|
expectedLengthMessage: u,
|
|
4533
4572
|
dataRowStartIndex: d + t
|
|
4534
4573
|
}));
|
|
4535
4574
|
}), s;
|
|
4536
|
-
},
|
|
4575
|
+
}, _l = (e) => e.toUpperCase().replace(/\(.*?\)/g, "").replace(/[^A-Z0-9]/g, "").trim(), vl = ({ value: e, defaultAllowedValues: t }) => {
|
|
4537
4576
|
var n;
|
|
4538
|
-
let r =
|
|
4539
|
-
return (n = t == null ? void 0 : t.some((e) =>
|
|
4540
|
-
},
|
|
4577
|
+
let r = _l(e);
|
|
4578
|
+
return (n = t == null ? void 0 : t.some((e) => _l(e).includes(r) || r.includes(_l(e)))) == null ? !1 : n;
|
|
4579
|
+
}, yl = ({ value: e, defaultAllowedValues: t }) => {
|
|
4541
4580
|
var n;
|
|
4542
4581
|
return (n = t == null ? void 0 : t.includes(e)) == null ? !1 : n;
|
|
4543
|
-
},
|
|
4582
|
+
}, bl = (e, t, n, r, i, a) => {
|
|
4544
4583
|
let o = [];
|
|
4545
4584
|
if (r) {
|
|
4546
4585
|
let r = n.map((e) => e.fieldName).filter(Boolean);
|
|
4547
4586
|
e.forEach((i, s) => {
|
|
4548
4587
|
var c, l;
|
|
4549
4588
|
let u = n[s];
|
|
4550
|
-
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ?
|
|
4589
|
+
if (!(!u || !(u != null && u.fieldName)) && !((c = (l = n[s]) == null ? void 0 : l.fieldNameValidator) == null ? vl : c)({
|
|
4551
4590
|
value: i,
|
|
4552
4591
|
defaultAllowedValues: r,
|
|
4553
4592
|
columnIndex: s,
|
|
@@ -4569,7 +4608,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4569
4608
|
var l, u;
|
|
4570
4609
|
let d = n[c];
|
|
4571
4610
|
if (!d || d != null && d.optionalColumn) return;
|
|
4572
|
-
let f = (l = d.unitsValidator) == null ?
|
|
4611
|
+
let f = (l = d.unitsValidator) == null ? yl : l, p = (u = i == null ? void 0 : i[c]) == null ? [] : u;
|
|
4573
4612
|
f({
|
|
4574
4613
|
value: r,
|
|
4575
4614
|
defaultAllowedValues: p,
|
|
@@ -4585,7 +4624,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4585
4624
|
});
|
|
4586
4625
|
}
|
|
4587
4626
|
return o;
|
|
4588
|
-
},
|
|
4627
|
+
}, xl = (e, t, n) => {
|
|
4589
4628
|
let r = [];
|
|
4590
4629
|
return e.forEach((e, i) => {
|
|
4591
4630
|
e.forEach((e, a) => {
|
|
@@ -4598,91 +4637,91 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4598
4637
|
})}`);
|
|
4599
4638
|
});
|
|
4600
4639
|
}), r;
|
|
4601
|
-
},
|
|
4602
|
-
let s =
|
|
4603
|
-
return s.length === 0 && (s = s.concat(
|
|
4640
|
+
}, Sl = (e, t, n, r, i, a, o) => {
|
|
4641
|
+
let s = gl(e, t, n, r, i, a, o);
|
|
4642
|
+
return s.length === 0 && (s = s.concat(bl(e, t, r, i, a, o), xl(n, r, o))), {
|
|
4604
4643
|
isValid: s.length === 0,
|
|
4605
4644
|
errors: s
|
|
4606
4645
|
};
|
|
4607
|
-
},
|
|
4646
|
+
}, Cl = (e, t, n) => {
|
|
4608
4647
|
var r, i, a, o, s, c, l, u, d, f, p, m, h, g;
|
|
4609
4648
|
let _ = (e) => e.replace(/,/g, "."), v = (r = (i = e[0]) == null ? void 0 : i.some((e) => isNaN(Number(_(e))))) == null ? !1 : r, y = (a = (o = e[1]) == null ? void 0 : o.some((e) => isNaN(Number(_(e))))) == null ? !1 : a, b = (s = (c = e[0]) == null ? void 0 : c.some((e) => t.includes(e))) == null ? !1 : s, x = (l = (u = e[0]) == null ? void 0 : u.some((e) => n.includes(e))) == null ? !1 : l, S = (d = (f = e[1]) == null ? void 0 : f.some((e) => n.includes(e))) == null ? !1 : d, C = (p = (m = e[0]) == null ? void 0 : m.some((e) => !isNaN(Number(_(e))))) == null ? !1 : p, w = (h = (g = e[1]) == null ? void 0 : g.some((e) => !isNaN(Number(_(e))))) == null ? !1 : h;
|
|
4610
4649
|
return {
|
|
4611
4650
|
hasFieldNameHeader: b || v && !x && !C || v && y && !C,
|
|
4612
4651
|
hasUnitHeader: x || S || v && y && !x && !C && !w || v && y && !C && !w
|
|
4613
4652
|
};
|
|
4614
|
-
},
|
|
4653
|
+
}, wl = (e, { validationRules: t }) => {
|
|
4615
4654
|
var n, r, i;
|
|
4616
4655
|
let a = (t == null ? void 0 : t.length) === ((n = e == null || (r = e[0]) == null ? void 0 : r.length) == null ? 0 : n) ? t : t == null ? void 0 : t.filter((e) => !(e != null && e.optionalColumn)), o = a == null ? void 0 : a.map((e) => e == null ? void 0 : e.fieldName), s = (e) => Array.isArray(e) && e.length ? e[0] : "", c = a == null ? void 0 : a.map((e) => {
|
|
4617
4656
|
var t;
|
|
4618
4657
|
return (t = e == null ? void 0 : e.defaultUnit) == null ? s(e == null ? void 0 : e.validUnits) : t;
|
|
4619
|
-
}), { hasFieldNameHeader: l, hasUnitHeader: u } =
|
|
4658
|
+
}), { hasFieldNameHeader: l, hasUnitHeader: u } = Cl(e, o, a == null || (i = a.map((e) => e == null ? void 0 : e.validUnits)) == null || (i = i.filter((e) => !!e)) == null ? void 0 : i.flat());
|
|
4620
4659
|
return l || e == null || e.unshift(o), u || e == null || e.splice(1, 0, c), {
|
|
4621
4660
|
hasFieldNameHeader: l,
|
|
4622
4661
|
hasUnitHeader: u
|
|
4623
4662
|
};
|
|
4624
|
-
},
|
|
4663
|
+
}, Tl = (e) => Math.round(e * 100) / 100, El = (e) => e.join(", ").replace(/,\s*$/, ""), Dl = {
|
|
4625
4664
|
skipEmptyLines: !0,
|
|
4626
4665
|
delimiter: (e) => {
|
|
4627
4666
|
var t, n;
|
|
4628
4667
|
let r = e.substring(0, 200), i = ((t = r.match(/\t/g)) == null ? [] : t).length, a = ((n = r.match(/;/g)) == null ? [] : n).length;
|
|
4629
4668
|
return i === 0 && a === 0 ? "," : i > a ? " " : ";";
|
|
4630
4669
|
}
|
|
4631
|
-
},
|
|
4670
|
+
}, Ol = [
|
|
4632
4671
|
"text/csv",
|
|
4633
4672
|
"text/plain",
|
|
4634
4673
|
"application/json",
|
|
4635
4674
|
"application/vnd.ms-excel"
|
|
4636
|
-
],
|
|
4675
|
+
], kl = (e) => Ol.includes(e.type), Al = (e) => e instanceof File, jl = (e) => e.trim().startsWith("["), Ml = (e) => {
|
|
4637
4676
|
try {
|
|
4638
4677
|
var t;
|
|
4639
4678
|
return !!((t = JSON.parse(e)) != null && t.path);
|
|
4640
4679
|
} catch {
|
|
4641
4680
|
return !1;
|
|
4642
4681
|
}
|
|
4643
|
-
},
|
|
4682
|
+
}, Nl = (e) => new Promise((t, n) => {
|
|
4644
4683
|
let r = new FileReader();
|
|
4645
4684
|
r.onload = () => t(String(r.result)), r.onerror = n, r.readAsText(e);
|
|
4646
|
-
}),
|
|
4685
|
+
}), Pl = async (e, t, n) => {
|
|
4647
4686
|
try {
|
|
4648
|
-
return
|
|
4687
|
+
return Vl({
|
|
4649
4688
|
data: JSON.parse(e),
|
|
4650
4689
|
errors: []
|
|
4651
4690
|
}, t, n);
|
|
4652
4691
|
} catch (e) {
|
|
4653
4692
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4654
4693
|
}
|
|
4655
|
-
},
|
|
4694
|
+
}, Fl = async (e, t, n) => {
|
|
4656
4695
|
try {
|
|
4657
4696
|
let r = JSON.parse(e).path.map((e) => [
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4697
|
+
Tl(e.md),
|
|
4698
|
+
Tl(e.inclination),
|
|
4699
|
+
Tl(e.gridAzimuth)
|
|
4661
4700
|
]);
|
|
4662
4701
|
return r.unshift([
|
|
4663
4702
|
"m",
|
|
4664
4703
|
"deg",
|
|
4665
4704
|
"deg"
|
|
4666
|
-
]),
|
|
4705
|
+
]), Vl({
|
|
4667
4706
|
data: r,
|
|
4668
4707
|
errors: []
|
|
4669
4708
|
}, t, n);
|
|
4670
4709
|
} catch (e) {
|
|
4671
4710
|
throw Error(`${n("jsonParseFailed")} ${e.message}`);
|
|
4672
4711
|
}
|
|
4673
|
-
},
|
|
4712
|
+
}, Il = (e) => e.replace(",", "."), Ll = (e) => e.map((e) => e.map((e) => Il(e))), Rl = (e, { importLimit: t, ...n }, r) => new Promise((i) => {
|
|
4674
4713
|
xr.parse(e, {
|
|
4675
|
-
...
|
|
4714
|
+
...Dl,
|
|
4676
4715
|
preview: t,
|
|
4677
4716
|
complete: (e) => {
|
|
4678
|
-
let a =
|
|
4717
|
+
let a = Vl(e, {
|
|
4679
4718
|
importLimit: t,
|
|
4680
4719
|
...n
|
|
4681
4720
|
}, r);
|
|
4682
|
-
a.rows =
|
|
4721
|
+
a.rows = Ll(a.rows), i(a);
|
|
4683
4722
|
}
|
|
4684
4723
|
});
|
|
4685
|
-
}),
|
|
4724
|
+
}), zl = async (e, t, n) => {
|
|
4686
4725
|
let r = {
|
|
4687
4726
|
isValid: !1,
|
|
4688
4727
|
fields: [],
|
|
@@ -4691,13 +4730,13 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4691
4730
|
errors: []
|
|
4692
4731
|
};
|
|
4693
4732
|
try {
|
|
4694
|
-
if (
|
|
4695
|
-
let i =
|
|
4696
|
-
return
|
|
4733
|
+
if (Al(e) && !kl(e)) return r.errors.push(`${n("wrongFileFormatExpectedOneOf")} ${El(Array.from(Ol))}`), r;
|
|
4734
|
+
let i = Al(e) ? await Nl(e) : e;
|
|
4735
|
+
return jl(i) ? await Pl(i, t, n) : Ml(i) ? await Fl(i, t, n) : await Rl(e, t, n);
|
|
4697
4736
|
} catch (e) {
|
|
4698
4737
|
return r.errors.push(e.message), r;
|
|
4699
4738
|
}
|
|
4700
|
-
},
|
|
4739
|
+
}, Bl = (e, t, n, r) => {
|
|
4701
4740
|
var i;
|
|
4702
4741
|
let a = (i = r == null ? void 0 : r.delimiter) == null ? "," : i, o = [
|
|
4703
4742
|
e,
|
|
@@ -4709,7 +4748,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4709
4748
|
header: !0,
|
|
4710
4749
|
delimiter: a
|
|
4711
4750
|
});
|
|
4712
|
-
},
|
|
4751
|
+
}, Vl = (e, t, n) => {
|
|
4713
4752
|
let { data: r, errors: i } = e, a = {
|
|
4714
4753
|
isValid: !1,
|
|
4715
4754
|
fields: [],
|
|
@@ -4718,24 +4757,24 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4718
4757
|
errors: i.map((e) => e.message)
|
|
4719
4758
|
};
|
|
4720
4759
|
if (i.length > 0) return a;
|
|
4721
|
-
let { hasFieldNameHeader: o, hasUnitHeader: s } =
|
|
4760
|
+
let { hasFieldNameHeader: o, hasUnitHeader: s } = wl(r, t);
|
|
4722
4761
|
a.fields = r[0].map((e) => e.trim()), a.units = r[1].map((e) => e.trim()).filter(Boolean), a.rows = r.slice(2);
|
|
4723
4762
|
let { validationRules: c } = t;
|
|
4724
4763
|
if (c.length) {
|
|
4725
|
-
let { isValid: e, errors: t } =
|
|
4764
|
+
let { isValid: e, errors: t } = Sl(a.fields, a.units, a.rows, c, o, s, n);
|
|
4726
4765
|
a.errors.push(...t), a.isValid = e && t.length === 0;
|
|
4727
4766
|
} else a.isValid = a.errors.length === 0;
|
|
4728
4767
|
return a;
|
|
4729
|
-
},
|
|
4730
|
-
type:
|
|
4768
|
+
}, Hl = ({ id: e, message: t = {
|
|
4769
|
+
type: Bo.INFO,
|
|
4731
4770
|
content: ""
|
|
4732
4771
|
}, autoClose: n = 6e3, onClose: r }) => {
|
|
4733
|
-
let { type: i =
|
|
4772
|
+
let { type: i = Bo.INFO } = t == null ? {} : t, a = ({ closeToast: t }) => /* @__PURE__ */ v(Ho, {
|
|
4734
4773
|
type: i,
|
|
4735
4774
|
onClose: t,
|
|
4736
4775
|
isInToast: !0,
|
|
4737
4776
|
testId: e === void 0 ? void 0 : e.toString() + "-dismiss"
|
|
4738
|
-
}), o = /* @__PURE__ */ v(
|
|
4777
|
+
}), o = /* @__PURE__ */ v(Ko, { message: {
|
|
4739
4778
|
...t,
|
|
4740
4779
|
visible: !0,
|
|
4741
4780
|
width: "100%",
|
|
@@ -4743,9 +4782,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4743
4782
|
withDismiss: !1
|
|
4744
4783
|
} }), s = (() => {
|
|
4745
4784
|
switch (t == null ? void 0 : t.type) {
|
|
4746
|
-
case
|
|
4747
|
-
case
|
|
4748
|
-
case
|
|
4785
|
+
case Bo.SUCCESS: return "success";
|
|
4786
|
+
case Bo.WARNING: return "warning";
|
|
4787
|
+
case Bo.ERROR: return "error";
|
|
4749
4788
|
default: return "info";
|
|
4750
4789
|
}
|
|
4751
4790
|
})();
|
|
@@ -4767,22 +4806,22 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4767
4806
|
transition: Sr,
|
|
4768
4807
|
type: s
|
|
4769
4808
|
});
|
|
4770
|
-
},
|
|
4809
|
+
}, Ul = (e) => {
|
|
4771
4810
|
wr.dismiss(e);
|
|
4772
|
-
},
|
|
4811
|
+
}, Wl = (e, t) => {
|
|
4773
4812
|
t(() => {
|
|
4774
|
-
|
|
4813
|
+
Hl({ ...e });
|
|
4775
4814
|
});
|
|
4776
|
-
},
|
|
4815
|
+
}, Gl = {
|
|
4777
4816
|
toggle: "_toggle_18fme_9",
|
|
4778
4817
|
small: "_small_18fme_25",
|
|
4779
4818
|
disabled: "_disabled_18fme_105",
|
|
4780
4819
|
noMargin: "_noMargin_18fme_113",
|
|
4781
4820
|
helpIconEnabled: "_helpIconEnabled_18fme_116"
|
|
4782
|
-
},
|
|
4821
|
+
}, Kl = ({ name: e, label: t, checked: n = !1, disabled: r, display: i, small: a = !1, onChange: o, noMargin: c = !1, testId: l, helpText: u, onClickHelp: d, textTransform: f = Hr.CAPITALIZE }) => {
|
|
4783
4822
|
let p = s(U), m = u || d, h = r || p;
|
|
4784
4823
|
return /* @__PURE__ */ y("div", {
|
|
4785
|
-
className: g(
|
|
4824
|
+
className: g(Gl.toggle, h ? Gl.disabled : null, a ? Gl.small : null, c ? Gl.noMargin : null),
|
|
4786
4825
|
style: { display: i },
|
|
4787
4826
|
onClick: (t) => {
|
|
4788
4827
|
h || (t.target.name = e, t.target.checked = !n, t.target.value = !n, o(t));
|
|
@@ -4802,13 +4841,13 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4802
4841
|
children: t
|
|
4803
4842
|
}),
|
|
4804
4843
|
m && /* @__PURE__ */ v("div", {
|
|
4805
|
-
className:
|
|
4844
|
+
className: Gl.helpIconEnabled,
|
|
4806
4845
|
onClick: d,
|
|
4807
4846
|
children: /* @__PURE__ */ v(Si, { text: u })
|
|
4808
4847
|
})
|
|
4809
4848
|
]
|
|
4810
4849
|
});
|
|
4811
|
-
},
|
|
4850
|
+
}, ql = ({ config: e, state: t, updateState: n, setModalVisibility: r, onCloseModal: i, readAndParseInput: a, validationRules: s = [], onCompleteImport: c = () => {}, prevalidationConfig: l, t: u, loading: d, startTransition: f, testId: h }) => {
|
|
4812
4851
|
let { modalVisibility: { reviewPasteModal: g, pasteModalHelpVisible: b, helpModal: x } } = t, { warningMessage: S, actionButtonLabel: C, changeRulesAction: w, checkPrevalidationNeed: T } = l == null ? {} : l, E = p(null), [D, O] = m(!1), [k, A] = m({
|
|
4813
4852
|
pastedText: "",
|
|
4814
4853
|
parsedResult: {
|
|
@@ -4819,7 +4858,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4819
4858
|
errors: []
|
|
4820
4859
|
}
|
|
4821
4860
|
});
|
|
4822
|
-
|
|
4861
|
+
xo("v", async () => {
|
|
4823
4862
|
let e = await a({ showSuccessToast: !1 });
|
|
4824
4863
|
e && A(e);
|
|
4825
4864
|
}, [a], {
|
|
@@ -4831,8 +4870,8 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4831
4870
|
var n, r, i;
|
|
4832
4871
|
let t = br(I == null || (n = I.rows) == null ? void 0 : n.map(([e, t]) => [Number(e), Number(t)]), .001).map(([e, t]) => [e.toString(), t.toString()]), a = {
|
|
4833
4872
|
validationRules: s,
|
|
4834
|
-
importLimit: (r = e.importLimit) == null ?
|
|
4835
|
-
}, o =
|
|
4873
|
+
importLimit: (r = e.importLimit) == null ? nl : r
|
|
4874
|
+
}, o = Bl(I.fields.slice(0, 2), ((i = I.units) == null ? [] : i).slice(0, 2), t, a);
|
|
4836
4875
|
f(() => A({
|
|
4837
4876
|
parsedResult: {
|
|
4838
4877
|
...I,
|
|
@@ -4862,17 +4901,17 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4862
4901
|
}, N = () => {
|
|
4863
4902
|
r("helpModal", !x);
|
|
4864
4903
|
}, P = () => {
|
|
4865
|
-
n(k), c(k.parsedResult), i(),
|
|
4904
|
+
n(k), c(k.parsedResult), i(), Wl({ message: {
|
|
4866
4905
|
type: "Success",
|
|
4867
4906
|
content: u("pasteSuccessful")
|
|
4868
4907
|
} }, f);
|
|
4869
|
-
}, { pastedText: F, parsedResult: I } = k, L = T && T(I), { isValid: R, errors: ee } = I, te = ee.length, ne = F === "", re =
|
|
4908
|
+
}, { pastedText: F, parsedResult: I } = k, L = T && T(I), { isValid: R, errors: ee } = I, te = ee.length, ne = F === "", re = pl(F), ie = fl(F), z = /* @__PURE__ */ y(_, { children: [
|
|
4870
4909
|
/* @__PURE__ */ y("div", {
|
|
4871
|
-
className:
|
|
4910
|
+
className: Ro.headerContainer,
|
|
4872
4911
|
children: [
|
|
4873
4912
|
/* @__PURE__ */ v(G, {
|
|
4874
4913
|
text: u("downsampleTooltip"),
|
|
4875
|
-
children: /* @__PURE__ */ v(
|
|
4914
|
+
children: /* @__PURE__ */ v(Kl, {
|
|
4876
4915
|
label: u("downsampled"),
|
|
4877
4916
|
checked: D,
|
|
4878
4917
|
onChange: () => j(!D),
|
|
@@ -4899,23 +4938,23 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4899
4938
|
})
|
|
4900
4939
|
]
|
|
4901
4940
|
}),
|
|
4902
|
-
b && /* @__PURE__ */ v(
|
|
4941
|
+
b && /* @__PURE__ */ v(Io, {
|
|
4903
4942
|
validationRules: s,
|
|
4904
4943
|
t: u
|
|
4905
4944
|
}),
|
|
4906
4945
|
ne ? /* @__PURE__ */ v("div", {
|
|
4907
|
-
className:
|
|
4908
|
-
children: /* @__PURE__ */ v(
|
|
4946
|
+
className: Ro.resultContainer,
|
|
4947
|
+
children: /* @__PURE__ */ v(dl, {
|
|
4909
4948
|
text: null,
|
|
4910
4949
|
children: /* @__PURE__ */ y("div", {
|
|
4911
|
-
className:
|
|
4950
|
+
className: Ro.emptyState,
|
|
4912
4951
|
children: [
|
|
4913
4952
|
/* @__PURE__ */ v("p", {
|
|
4914
|
-
className:
|
|
4953
|
+
className: Ro.emptyMainText,
|
|
4915
4954
|
children: u("noDataPastedYet")
|
|
4916
4955
|
}),
|
|
4917
4956
|
/* @__PURE__ */ y("p", {
|
|
4918
|
-
className:
|
|
4957
|
+
className: Ro.emptyHint,
|
|
4919
4958
|
children: [
|
|
4920
4959
|
"(",
|
|
4921
4960
|
u("pasteShortcutHint"),
|
|
@@ -4939,24 +4978,24 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4939
4978
|
})
|
|
4940
4979
|
})
|
|
4941
4980
|
}) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
|
|
4942
|
-
className:
|
|
4981
|
+
className: Ro.messagesContainer,
|
|
4943
4982
|
children: [
|
|
4944
|
-
te ? /* @__PURE__ */ v(
|
|
4983
|
+
te ? /* @__PURE__ */ v(ll, {
|
|
4945
4984
|
errors: ee,
|
|
4946
4985
|
t: u
|
|
4947
4986
|
}) : null,
|
|
4948
|
-
re && /* @__PURE__ */ v(
|
|
4987
|
+
re && /* @__PURE__ */ v(Ja, {
|
|
4949
4988
|
muted: !0,
|
|
4950
4989
|
children: u("commasAsDecimals")
|
|
4951
4990
|
}),
|
|
4952
|
-
ie && /* @__PURE__ */ v(
|
|
4991
|
+
ie && /* @__PURE__ */ v(Ko, { message: {
|
|
4953
4992
|
visible: !0,
|
|
4954
4993
|
icon: !0,
|
|
4955
4994
|
width: "100%",
|
|
4956
4995
|
content: u("extraSeparators"),
|
|
4957
4996
|
type: "Warning"
|
|
4958
4997
|
} }),
|
|
4959
|
-
L && /* @__PURE__ */ v(
|
|
4998
|
+
L && /* @__PURE__ */ v(Ko, { message: {
|
|
4960
4999
|
visible: !0,
|
|
4961
5000
|
icon: !0,
|
|
4962
5001
|
width: "100%",
|
|
@@ -4964,7 +5003,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4964
5003
|
type: "Warning"
|
|
4965
5004
|
} })
|
|
4966
5005
|
]
|
|
4967
|
-
}), /* @__PURE__ */ v(
|
|
5006
|
+
}), /* @__PURE__ */ v(ol, {
|
|
4968
5007
|
validationRules: s,
|
|
4969
5008
|
parsedResult: I,
|
|
4970
5009
|
updateState: (e) => A((t) => ({
|
|
@@ -4973,16 +5012,16 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
4973
5012
|
}))
|
|
4974
5013
|
})] })
|
|
4975
5014
|
] });
|
|
4976
|
-
return /* @__PURE__ */ v(
|
|
5015
|
+
return /* @__PURE__ */ v(Eo, {
|
|
4977
5016
|
visible: g,
|
|
4978
5017
|
centered: !0,
|
|
4979
|
-
children: /* @__PURE__ */ v(
|
|
5018
|
+
children: /* @__PURE__ */ v(to, { dialog: {
|
|
4980
5019
|
width: "60vw",
|
|
4981
5020
|
height: "650px",
|
|
4982
5021
|
scroll: !0,
|
|
4983
5022
|
heading: u("pasteWithReviewRoundBrackets"),
|
|
4984
5023
|
content: /* @__PURE__ */ v("div", {
|
|
4985
|
-
className:
|
|
5024
|
+
className: Ro.modalContent,
|
|
4986
5025
|
children: z
|
|
4987
5026
|
}),
|
|
4988
5027
|
footer: /* @__PURE__ */ y(_, { children: [
|
|
@@ -5006,7 +5045,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5006
5045
|
onClose: i
|
|
5007
5046
|
} })
|
|
5008
5047
|
});
|
|
5009
|
-
},
|
|
5048
|
+
}, Jl = ({ modals: e = [], modalVisibility: n, onCloseModal: r, testId: i }) => e.length ? /* @__PURE__ */ v(_, { children: e.map(({ name: e, component: a, props: o = {} }) => {
|
|
5010
5049
|
var s;
|
|
5011
5050
|
return /* @__PURE__ */ v(t, { children: /* @__PURE__ */ v(a, {
|
|
5012
5051
|
testId: `${i}-modal-render-${e}`,
|
|
@@ -5014,7 +5053,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5014
5053
|
onClose: () => r({ name: e }),
|
|
5015
5054
|
...o
|
|
5016
5055
|
}) }, e);
|
|
5017
|
-
}) }) : null,
|
|
5056
|
+
}) }) : null, Yl = ({ sections: e, iconName: t, testId: n, tooltip: r }) => /* @__PURE__ */ v(ca, {
|
|
5018
5057
|
loading: !0,
|
|
5019
5058
|
menu: {
|
|
5020
5059
|
component: /* @__PURE__ */ v(K, {
|
|
@@ -5030,18 +5069,18 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5030
5069
|
sections: e
|
|
5031
5070
|
},
|
|
5032
5071
|
testId: n
|
|
5033
|
-
}),
|
|
5072
|
+
}), Xl = (e, t, n) => o(async () => {
|
|
5034
5073
|
if (n) try {
|
|
5035
5074
|
return await n();
|
|
5036
5075
|
} catch (t) {
|
|
5037
|
-
console.error("beforeExportData failed", t),
|
|
5076
|
+
console.error("beforeExportData failed", t), Hl({ message: {
|
|
5038
5077
|
type: "Error",
|
|
5039
5078
|
content: e("unableToPrepareExportData")
|
|
5040
5079
|
} });
|
|
5041
5080
|
return;
|
|
5042
5081
|
}
|
|
5043
5082
|
return t;
|
|
5044
|
-
}, [t, n]),
|
|
5083
|
+
}, [t, n]), Zl = {
|
|
5045
5084
|
cancel: "Cancel",
|
|
5046
5085
|
chooseFile: "Choose file",
|
|
5047
5086
|
copyDecimalComma: "Copy (decimal comma)",
|
|
@@ -5100,26 +5139,26 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5100
5139
|
smartUpload_description: "Upload image and extract table content using a LLM",
|
|
5101
5140
|
smartUpload_smartUpload: "Smart Upload",
|
|
5102
5141
|
toUploadOrImportFromClipboardMessage: "To upload or import from clipboard please select your preferred unit in the table header and upload or paste numbers only for Depth, Inc, Azi. Follow example below"
|
|
5103
|
-
},
|
|
5104
|
-
let t = Object.keys(
|
|
5105
|
-
let r =
|
|
5142
|
+
}, Ql = (e, t = {}) => e == null ? void 0 : e.replace(/\{\{(\w+)\}\}/g, (e, n) => (t == null ? void 0 : t[n]) === void 0 ? "" : String(t == null ? void 0 : t[n])), $l = (e) => d(() => {
|
|
5143
|
+
let t = Object.keys(Zl).reduce((t, n) => {
|
|
5144
|
+
let r = Zl == null ? void 0 : Zl[n], i = e == null ? void 0 : e[n];
|
|
5106
5145
|
return t[n] = i == null ? r : i, t;
|
|
5107
5146
|
}, {});
|
|
5108
5147
|
return (e, n) => {
|
|
5109
5148
|
let r = t[e];
|
|
5110
|
-
return n ?
|
|
5149
|
+
return n ? Ql(r, n) : r;
|
|
5111
5150
|
};
|
|
5112
|
-
}, [e]),
|
|
5151
|
+
}, [e]), eu = /^\s*-?\d+(?:[.,]\d+)?(?:e[+-]?\d+)?\s*$/i, tu = (e) => {
|
|
5113
5152
|
var t;
|
|
5114
5153
|
return {
|
|
5115
5154
|
...e,
|
|
5116
5155
|
rows: e == null || (t = e.rows) == null ? void 0 : t.map((e) => e.map((e) => {
|
|
5117
5156
|
let t = String(e == null ? "" : e);
|
|
5118
|
-
return
|
|
5157
|
+
return eu.test(t) ? Rn(t) : t;
|
|
5119
5158
|
}))
|
|
5120
5159
|
};
|
|
5121
|
-
},
|
|
5122
|
-
let { exportData: a, beforeExportData: s, importLimit: c =
|
|
5160
|
+
}, nu = ({ config: e, state: t, setState: n, smartUploadConfig: r, startTransition: i }) => {
|
|
5161
|
+
let { exportData: a, beforeExportData: s, importLimit: c = nl, validationRules: l = [], translations: u, onImportComplete: d = () => {}, disablePasteSuccessfulToast: f, prevalidationConfig: p, onDeleteRows: m } = e == null ? {} : e, { parsedResult: h } = t, { checkPrevalidationNeed: g } = p == null ? {} : p, _ = $l(u), v = Xl(_, a, s), y = o((e) => {
|
|
5123
5162
|
n((t) => ({
|
|
5124
5163
|
...t,
|
|
5125
5164
|
...e
|
|
@@ -5163,9 +5202,9 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5163
5202
|
let t = {
|
|
5164
5203
|
validationRules: l,
|
|
5165
5204
|
importLimit: c
|
|
5166
|
-
}, n =
|
|
5205
|
+
}, n = tu(await zl(e, t, _));
|
|
5167
5206
|
if (g && g(h)) {
|
|
5168
|
-
let { fields: e, units: r, rows: a } = n, o =
|
|
5207
|
+
let { fields: e, units: r, rows: a } = n, o = Bl(e, r == null ? [] : r, a, t);
|
|
5169
5208
|
return i(() => y({
|
|
5170
5209
|
pastedText: o,
|
|
5171
5210
|
parsedResult: h
|
|
@@ -5191,20 +5230,20 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5191
5230
|
let { fromFile: t, showSuccessToast: n = !0 } = e == null ? {} : e, r;
|
|
5192
5231
|
try {
|
|
5193
5232
|
if (r = t ? await t.text() : await navigator.clipboard.readText(), !r) {
|
|
5194
|
-
|
|
5233
|
+
Wl({ message: {
|
|
5195
5234
|
type: "Error",
|
|
5196
5235
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed")
|
|
5197
5236
|
} }, i);
|
|
5198
5237
|
return;
|
|
5199
5238
|
}
|
|
5200
|
-
let e =
|
|
5239
|
+
let e = tu(await zl(r, {
|
|
5201
5240
|
validationRules: l,
|
|
5202
5241
|
importLimit: c
|
|
5203
5242
|
}, _));
|
|
5204
|
-
return e != null && e.isValid ||
|
|
5243
|
+
return e != null && e.isValid || Wl({ message: {
|
|
5205
5244
|
type: "Error",
|
|
5206
5245
|
content: _("clipboardReadFailed")
|
|
5207
|
-
} }, i), n &&
|
|
5246
|
+
} }, i), n && Wl({ message: {
|
|
5208
5247
|
type: "Success",
|
|
5209
5248
|
content: _("pasteSuccessful")
|
|
5210
5249
|
} }, i), {
|
|
@@ -5212,7 +5251,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5212
5251
|
parsedResult: e
|
|
5213
5252
|
};
|
|
5214
5253
|
} catch (e) {
|
|
5215
|
-
|
|
5254
|
+
Wl({ message: {
|
|
5216
5255
|
type: "Error",
|
|
5217
5256
|
content: _(t ? "fileReadOrParseFailed" : "clipboardReadNotAllowed"),
|
|
5218
5257
|
details: e.message
|
|
@@ -5225,10 +5264,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5225
5264
|
let n = e == null || (t = e.target) == null || (t = t.files) == null ? void 0 : t[0];
|
|
5226
5265
|
if (!n) return;
|
|
5227
5266
|
let r = await C(await n.text());
|
|
5228
|
-
r.isValid ? (f ||
|
|
5267
|
+
r.isValid ? (f || Wl({ message: {
|
|
5229
5268
|
type: "Success",
|
|
5230
5269
|
content: _("pasteSuccessful")
|
|
5231
|
-
} }, i), i(() => d(r))) :
|
|
5270
|
+
} }, i), i(() => d(r))) : Wl({ message: {
|
|
5232
5271
|
type: "Error",
|
|
5233
5272
|
content: _("fileParsingFailed")
|
|
5234
5273
|
} }, i);
|
|
@@ -5242,7 +5281,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5242
5281
|
try {
|
|
5243
5282
|
let t = await navigator.clipboard.readText();
|
|
5244
5283
|
if (!t) {
|
|
5245
|
-
|
|
5284
|
+
Wl({ message: {
|
|
5246
5285
|
type: "Error",
|
|
5247
5286
|
content: _("clipboardIsEmpty")
|
|
5248
5287
|
} }, i);
|
|
@@ -5250,18 +5289,18 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5250
5289
|
}
|
|
5251
5290
|
let n = await C(t);
|
|
5252
5291
|
if (!n.isValid) {
|
|
5253
|
-
|
|
5292
|
+
Wl({ message: {
|
|
5254
5293
|
type: "Error",
|
|
5255
5294
|
content: _("clipboardReadFailed")
|
|
5256
5295
|
} }, i);
|
|
5257
5296
|
return;
|
|
5258
5297
|
}
|
|
5259
|
-
f ||
|
|
5298
|
+
f || Wl({ message: {
|
|
5260
5299
|
type: "Success",
|
|
5261
5300
|
content: _("pasteSuccessful")
|
|
5262
5301
|
} }, i), e && i(() => d(n));
|
|
5263
5302
|
} catch {
|
|
5264
|
-
|
|
5303
|
+
Wl({ message: {
|
|
5265
5304
|
type: "Error",
|
|
5266
5305
|
content: _("clipboardReadNotAllowed")
|
|
5267
5306
|
} }, i);
|
|
@@ -5276,14 +5315,14 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5276
5315
|
onClickCopyClipboard: o(async (e) => {
|
|
5277
5316
|
let t = await v();
|
|
5278
5317
|
if (!t) return;
|
|
5279
|
-
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e :
|
|
5318
|
+
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : tl).slice(0, n.length), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = Bl(n, o, a.map((t) => t.map((t) => Tr(t) ? "" : s(t.toString(), e))), { delimiter: " " });
|
|
5280
5319
|
try {
|
|
5281
|
-
await navigator.clipboard.writeText(c),
|
|
5320
|
+
await navigator.clipboard.writeText(c), Wl({ message: {
|
|
5282
5321
|
type: "Success",
|
|
5283
5322
|
content: _("copiedToClipboard")
|
|
5284
5323
|
} }, i);
|
|
5285
5324
|
} catch (e) {
|
|
5286
|
-
|
|
5325
|
+
Wl({ message: {
|
|
5287
5326
|
type: "Error",
|
|
5288
5327
|
content: _("unableToCopyToClipboard"),
|
|
5289
5328
|
details: e.message
|
|
@@ -5293,14 +5332,14 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5293
5332
|
onSmartUploadResult: o((e) => {
|
|
5294
5333
|
let t = un(e) && dn(e.errorMessage) ? e.errorMessage : void 0;
|
|
5295
5334
|
if (t) {
|
|
5296
|
-
|
|
5335
|
+
Wl({ message: {
|
|
5297
5336
|
type: "Error",
|
|
5298
5337
|
content: t || "Smart upload failed."
|
|
5299
5338
|
} }, i);
|
|
5300
5339
|
return;
|
|
5301
5340
|
}
|
|
5302
5341
|
if (!tn(e) || e.length < 2 || !$t(e, (e) => un(e) && $t(yn(e), dn))) {
|
|
5303
|
-
|
|
5342
|
+
Wl({ message: {
|
|
5304
5343
|
type: "Error",
|
|
5305
5344
|
content: "Smart upload returned unexpected format.",
|
|
5306
5345
|
details: JSON.stringify(e)
|
|
@@ -5332,14 +5371,14 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5332
5371
|
]),
|
|
5333
5372
|
deleteAllRows: x
|
|
5334
5373
|
};
|
|
5335
|
-
},
|
|
5374
|
+
}, ru = (e, t) => {
|
|
5336
5375
|
var n, r;
|
|
5337
|
-
let { fields: i, rows: a } = e, o =
|
|
5376
|
+
let { fields: i, rows: a } = e, o = Bl(i, (n = (r = e.units) == null ? void 0 : r.map((e) => e || "blank")) == null ? [] : n, a, { delimiter: " " }), s = new Blob([o], { type: "text/plain" }), c = document.createElement("a");
|
|
5338
5377
|
c.href = window.URL.createObjectURL(s), c.download = `${t}.csv`, document.body.appendChild(c), c.click(), document.body.removeChild(c);
|
|
5339
|
-
},
|
|
5378
|
+
}, iu = (e) => ln(e) && "modalKey" in e, au = (e, t, n) => Zt(e, (e) => {
|
|
5340
5379
|
if (tn(e) || !un(e)) return;
|
|
5341
5380
|
let { modalKey: r } = e == null ? {} : e;
|
|
5342
|
-
if (
|
|
5381
|
+
if (iu(e) && typeof e.onClick != "function") {
|
|
5343
5382
|
let i = () => {
|
|
5344
5383
|
var e;
|
|
5345
5384
|
n(r, !((e = t.modalVisibility) != null && e[r]));
|
|
@@ -5349,7 +5388,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5349
5388
|
onClick: i
|
|
5350
5389
|
};
|
|
5351
5390
|
}
|
|
5352
|
-
}),
|
|
5391
|
+
}), ou = (e, t, n) => au(e, t, n), su = {
|
|
5353
5392
|
pastedText: "",
|
|
5354
5393
|
parsedResult: {
|
|
5355
5394
|
isValid: !1,
|
|
@@ -5364,16 +5403,16 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5364
5403
|
reviewPasteModal: !1,
|
|
5365
5404
|
helpModal: !1
|
|
5366
5405
|
}
|
|
5367
|
-
},
|
|
5406
|
+
}, cu = ({ config: e, smartUploadConfig: t, testId: n }) => {
|
|
5368
5407
|
var r, i, a, o;
|
|
5369
|
-
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: g = !0, copyFromClipBoard: _ = !0, showDeleteOptions: b = !0, showHelpOption: x = !0, showUploadFileOption: S = !0, modals: C = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = m(
|
|
5408
|
+
let { exportData: s, beforeExportData: c, prevalidationConfig: l, validationRules: u, title: d, translations: f, textOnly: p = !1, showImportOptions: g = !0, copyFromClipBoard: _ = !0, showDeleteOptions: b = !0, showHelpOption: x = !0, showUploadFileOption: S = !0, modals: C = [], dynamicOptions: w, onImportComplete: T } = e == null ? {} : e, [E, D] = m(su), { modalVisibility: { smartUploadModal: O = !1, reviewPasteModal: k = !1, helpModal: A = !1 } } = E, { enabled: j, prompt: M = "", onClose: N, onError: P, service: F = () => Promise.resolve() } = t == null ? {} : t, I = $l(f), L = Xl(I, s, c), [R, ee] = h(), te = nu({
|
|
5370
5409
|
config: e,
|
|
5371
5410
|
state: E,
|
|
5372
5411
|
setState: D,
|
|
5373
5412
|
smartUploadConfig: t,
|
|
5374
5413
|
startTransition: ee
|
|
5375
5414
|
}), { readAndParseInput: ne, updateState: re, closeModals: ie, setModalVisibility: z, onFileChange: ae, onClickQuickPasteFromClipBoard: oe, onClickCopyClipboard: se, onSmartUploadResult: ce, deleteAllRows: B } = te == null ? {} : te;
|
|
5376
|
-
|
|
5415
|
+
xo("Escape", () => ie());
|
|
5377
5416
|
let le = g ? [
|
|
5378
5417
|
...S ? [{
|
|
5379
5418
|
type: "Option",
|
|
@@ -5401,14 +5440,14 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5401
5440
|
onClick: () => z("smartUploadModal", !O),
|
|
5402
5441
|
testId: `${n}-smart-upload`
|
|
5403
5442
|
}] : [],
|
|
5404
|
-
...
|
|
5443
|
+
...ou((r = w == null ? void 0 : w.importOptions) == null ? [] : r, E, z)
|
|
5405
5444
|
] : [], ue = [
|
|
5406
5445
|
{
|
|
5407
5446
|
type: "Option",
|
|
5408
5447
|
label: I("downloadFile"),
|
|
5409
5448
|
onClick: async () => {
|
|
5410
5449
|
let e = await L();
|
|
5411
|
-
e && e &&
|
|
5450
|
+
e && e && ru(e, d);
|
|
5412
5451
|
}
|
|
5413
5452
|
},
|
|
5414
5453
|
...p ? [{
|
|
@@ -5433,20 +5472,20 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5433
5472
|
}]
|
|
5434
5473
|
}
|
|
5435
5474
|
}],
|
|
5436
|
-
...
|
|
5475
|
+
...ou((i = w == null ? void 0 : w.exportOptions) == null ? [] : i, E, z)
|
|
5437
5476
|
], de = b ? [{
|
|
5438
5477
|
type: "Option",
|
|
5439
5478
|
label: I("deleteAllRows"),
|
|
5440
5479
|
onClick: () => B(),
|
|
5441
5480
|
testId: `${n}-delete-all-rows`
|
|
5442
|
-
}, ...
|
|
5481
|
+
}, ...ou((a = w == null ? void 0 : w.deleteOptions) == null ? [] : a, E, z)] : [], fe = x ? [
|
|
5443
5482
|
{ type: "Divider" },
|
|
5444
5483
|
{
|
|
5445
5484
|
type: "Option",
|
|
5446
5485
|
label: I("help"),
|
|
5447
5486
|
onClick: () => z("helpModal", !A)
|
|
5448
5487
|
},
|
|
5449
|
-
...
|
|
5488
|
+
...ou((o = w == null ? void 0 : w.helpOptions) == null ? [] : o, E, z)
|
|
5450
5489
|
] : [], pe = [
|
|
5451
5490
|
...le.length ? [{
|
|
5452
5491
|
section: [...le, ...fe],
|
|
@@ -5472,13 +5511,13 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5472
5511
|
small: !0,
|
|
5473
5512
|
dark: !0
|
|
5474
5513
|
}),
|
|
5475
|
-
pe.map((e, t) => /* @__PURE__ */ v(
|
|
5514
|
+
pe.map((e, t) => /* @__PURE__ */ v(Yl, {
|
|
5476
5515
|
sections: e.section,
|
|
5477
5516
|
iconName: e.iconName,
|
|
5478
5517
|
tooltip: e.tooltip,
|
|
5479
5518
|
testId: `data-${e == null ? void 0 : e.name}-menu`
|
|
5480
5519
|
}, t)),
|
|
5481
|
-
k && /* @__PURE__ */ v(
|
|
5520
|
+
k && /* @__PURE__ */ v(ql, {
|
|
5482
5521
|
config: e,
|
|
5483
5522
|
state: E,
|
|
5484
5523
|
updateState: re,
|
|
@@ -5493,13 +5532,13 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5493
5532
|
startTransition: ee,
|
|
5494
5533
|
testId: n
|
|
5495
5534
|
}),
|
|
5496
|
-
A && /* @__PURE__ */ v(
|
|
5535
|
+
A && /* @__PURE__ */ v(Lo, {
|
|
5497
5536
|
visible: A,
|
|
5498
5537
|
setModalVisibility: z,
|
|
5499
5538
|
validationRules: u,
|
|
5500
5539
|
t: I
|
|
5501
5540
|
}),
|
|
5502
|
-
j && t && /* @__PURE__ */ v(
|
|
5541
|
+
j && t && /* @__PURE__ */ v(Po, {
|
|
5503
5542
|
visible: O,
|
|
5504
5543
|
prompt: M,
|
|
5505
5544
|
onUpload: F,
|
|
@@ -5514,14 +5553,14 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5514
5553
|
cancelText: I("cancel"),
|
|
5515
5554
|
testId: n
|
|
5516
5555
|
}),
|
|
5517
|
-
/* @__PURE__ */ v(
|
|
5556
|
+
/* @__PURE__ */ v(Jl, {
|
|
5518
5557
|
modals: C,
|
|
5519
5558
|
modalVisibility: E == null ? void 0 : E.modalVisibility,
|
|
5520
5559
|
onCloseModal: ie,
|
|
5521
5560
|
testId: n
|
|
5522
5561
|
})
|
|
5523
5562
|
] });
|
|
5524
|
-
},
|
|
5563
|
+
}, lu = ({ file: e, accept: t, multi: n, name: r, disabled: i, onChange: a = pn, ...o }) => {
|
|
5525
5564
|
let c = s(U), l = p(null), u = () => {
|
|
5526
5565
|
var e;
|
|
5527
5566
|
i || c || (e = l.current) == null || e.click();
|
|
@@ -5549,12 +5588,12 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5549
5588
|
multiple: n,
|
|
5550
5589
|
onChange: d
|
|
5551
5590
|
})] });
|
|
5552
|
-
},
|
|
5591
|
+
}, uu = {
|
|
5553
5592
|
label: "_label_uxk69_1",
|
|
5554
5593
|
labelLeft: "_labelLeft_uxk69_5",
|
|
5555
5594
|
icons: "_icons_uxk69_13",
|
|
5556
5595
|
small: "_small_uxk69_27"
|
|
5557
|
-
},
|
|
5596
|
+
}, du = ({ label: e = null, width: t = "auto", helpText: n = "", helpTextMaxWidth: r = "300px", onClickHelp: i = void 0, lock: a = {
|
|
5558
5597
|
visible: !1,
|
|
5559
5598
|
active: !1,
|
|
5560
5599
|
onClick: () => {},
|
|
@@ -5563,14 +5602,14 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5563
5602
|
}, info: o, libraryIcon: s, labelLeft: c = !1, small: l = !1, textTransform: u = Hr.CAPITALIZE }) => {
|
|
5564
5603
|
var d;
|
|
5565
5604
|
return /* @__PURE__ */ v("div", {
|
|
5566
|
-
className: g(
|
|
5605
|
+
className: g(uu.label, c ? uu.labelLeft : "", l ? uu.small : ""),
|
|
5567
5606
|
children: /* @__PURE__ */ y("label", {
|
|
5568
5607
|
style: {
|
|
5569
5608
|
textTransform: u,
|
|
5570
5609
|
width: t || ""
|
|
5571
5610
|
},
|
|
5572
5611
|
children: [e, /* @__PURE__ */ y("div", {
|
|
5573
|
-
className:
|
|
5612
|
+
className: uu.icons,
|
|
5574
5613
|
children: [
|
|
5575
5614
|
(n || i) && /* @__PURE__ */ v(Si, {
|
|
5576
5615
|
text: n,
|
|
@@ -5596,23 +5635,23 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5596
5635
|
})]
|
|
5597
5636
|
})
|
|
5598
5637
|
});
|
|
5599
|
-
},
|
|
5638
|
+
}, fu = {
|
|
5600
5639
|
field: "_field_1xoss_1",
|
|
5601
5640
|
labelLeft: "_labelLeft_1xoss_5",
|
|
5602
5641
|
fieldInput: "_fieldInput_1xoss_9",
|
|
5603
5642
|
formRow: "_formRow_1xoss_12",
|
|
5604
5643
|
"form-row": "_form-row_1xoss_13",
|
|
5605
5644
|
button: "_button_1xoss_22"
|
|
5606
|
-
},
|
|
5645
|
+
}, pu = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children: r, helpText: i, helpTextMaxWidth: a = "300px", onClickHelp: o, lock: s = {
|
|
5607
5646
|
visible: !1,
|
|
5608
5647
|
active: !1,
|
|
5609
5648
|
onClick: () => {},
|
|
5610
5649
|
tooltip: "",
|
|
5611
5650
|
testId: void 0
|
|
5612
5651
|
}, info: c, libraryIcon: l, small: u = !1, testId: d, textTransform: f = Hr.CAPITALIZE }) => /* @__PURE__ */ y("div", {
|
|
5613
|
-
className: g(
|
|
5652
|
+
className: g(fu.field, t ? fu.labelLeft : ""),
|
|
5614
5653
|
"data-testid": d,
|
|
5615
|
-
children: [(e || t) && /* @__PURE__ */ v(
|
|
5654
|
+
children: [(e || t) && /* @__PURE__ */ v(du, {
|
|
5616
5655
|
label: e,
|
|
5617
5656
|
width: n,
|
|
5618
5657
|
helpText: i,
|
|
@@ -5625,10 +5664,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5625
5664
|
small: u,
|
|
5626
5665
|
textTransform: f
|
|
5627
5666
|
}), /* @__PURE__ */ v("div", {
|
|
5628
|
-
className:
|
|
5667
|
+
className: fu.fieldInput,
|
|
5629
5668
|
children: r
|
|
5630
5669
|
})]
|
|
5631
|
-
}),
|
|
5670
|
+
}), mu = ({ alignItems: e = "initial", justifyContent: t = "initial", direction: n = "initial", height: r = "initial", width: i = "initial", children: a = null, wrap: o = !0, gap: s = !1 }) => /* @__PURE__ */ v("div", {
|
|
5632
5671
|
style: {
|
|
5633
5672
|
display: "flex",
|
|
5634
5673
|
flexDirection: n,
|
|
@@ -5640,24 +5679,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5640
5679
|
gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
|
|
5641
5680
|
},
|
|
5642
5681
|
children: a
|
|
5643
|
-
}),
|
|
5644
|
-
className:
|
|
5682
|
+
}), hu = { formRow: "_formRow_odewu_1" }, gu = ({ children: e }) => /* @__PURE__ */ v("div", {
|
|
5683
|
+
className: hu.formRow,
|
|
5645
5684
|
children: e
|
|
5646
|
-
}),
|
|
5647
|
-
let s = {
|
|
5648
|
-
"--grid-gap": mu(i),
|
|
5649
|
-
"--grid-rows": hu(e),
|
|
5650
|
-
"--grid-columns": hu(t),
|
|
5651
|
-
"--grid-height": hu(a),
|
|
5652
|
-
...n != null && { "--grid-columns-tablet": hu(n) },
|
|
5653
|
-
...r != null && { "--grid-columns-mobile": hu(r) }
|
|
5654
|
-
};
|
|
5655
|
-
return /* @__PURE__ */ v("div", {
|
|
5656
|
-
className: pu.grid,
|
|
5657
|
-
style: s,
|
|
5658
|
-
children: o
|
|
5659
|
-
});
|
|
5660
|
-
}, Z = {
|
|
5685
|
+
}), Z = {
|
|
5661
5686
|
inputInTable: "_inputInTable_1dcn1_1",
|
|
5662
5687
|
inputHover: "_inputHover_1dcn1_13",
|
|
5663
5688
|
inputFocus: "_inputFocus_1dcn1_18",
|
|
@@ -5714,7 +5739,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
5714
5739
|
}),
|
|
5715
5740
|
e && /* @__PURE__ */ v("div", {
|
|
5716
5741
|
className: Z.headerTitle,
|
|
5717
|
-
children: /* @__PURE__ */ v(
|
|
5742
|
+
children: /* @__PURE__ */ v(Qa, {
|
|
5718
5743
|
top: !0,
|
|
5719
5744
|
marginBottom: 0,
|
|
5720
5745
|
children: e
|
|
@@ -6116,10 +6141,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
6116
6141
|
children: "Invert"
|
|
6117
6142
|
})
|
|
6118
6143
|
]
|
|
6119
|
-
}), /* @__PURE__ */ v(
|
|
6144
|
+
}), /* @__PURE__ */ v(Xa, { margin: 0 })] }), e.map((n, r) => {
|
|
6120
6145
|
switch (n.type) {
|
|
6121
6146
|
case Fu.HEADING: return /* @__PURE__ */ v(Pu, { label: n.label }, r);
|
|
6122
|
-
case Fu.DIVIDER: return /* @__PURE__ */ v(
|
|
6147
|
+
case Fu.DIVIDER: return /* @__PURE__ */ v(Xa, { margin: 0 }, r);
|
|
6123
6148
|
default: return /* @__PURE__ */ v(Nu, {
|
|
6124
6149
|
option: n,
|
|
6125
6150
|
onChange: (r) => {
|
|
@@ -6175,15 +6200,15 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
6175
6200
|
simpleInputs: !1,
|
|
6176
6201
|
options: f,
|
|
6177
6202
|
selectedOptions: void 0
|
|
6178
|
-
} :
|
|
6203
|
+
} : tc(n, r), S = h || x == null ? void 0 : _ ? x : x.value, C = h ? d : t;
|
|
6179
6204
|
return /* @__PURE__ */ y("div", {
|
|
6180
|
-
className: g(
|
|
6205
|
+
className: g(Uc.wrapper, u ? Uc.inline : null, p === "inline fields" ? Uc.inline : null),
|
|
6181
6206
|
children: [d && /* @__PURE__ */ v("label", {
|
|
6182
|
-
className: g(u &&
|
|
6207
|
+
className: g(u && Uc.labelMargin),
|
|
6183
6208
|
children: C
|
|
6184
6209
|
}), b.map((t, n) => {
|
|
6185
6210
|
let r = (t == null ? void 0 : t.checked) || (t == null ? void 0 : t.value) === S || !1;
|
|
6186
|
-
return /* @__PURE__ */ v(
|
|
6211
|
+
return /* @__PURE__ */ v(Wc, {
|
|
6187
6212
|
name: t.name || t.value,
|
|
6188
6213
|
label: t.label,
|
|
6189
6214
|
value: t.value,
|
|
@@ -6382,7 +6407,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
6382
6407
|
let [i, a] = m(t), o = (e, t, n, r) => {
|
|
6383
6408
|
e.preventDefault(), typeof r == "function" && (e.currentTarget.value = t, e.currentTarget.label = n, r(e)), a(!1);
|
|
6384
6409
|
}, s = e.sections.length > 0;
|
|
6385
|
-
return /* @__PURE__ */ v(
|
|
6410
|
+
return /* @__PURE__ */ v(co, {
|
|
6386
6411
|
fixed: !0,
|
|
6387
6412
|
open: i,
|
|
6388
6413
|
top: r,
|
|
@@ -6475,7 +6500,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
6475
6500
|
simpleInputs: !1,
|
|
6476
6501
|
options: h,
|
|
6477
6502
|
selectedOptions: void 0
|
|
6478
|
-
} :
|
|
6503
|
+
} : tc(h, r), S = m || x == null ? void 0 : _ ? x : x.value, C = u === void 0 ? b == null ? void 0 : b.findIndex((e) => e.value === S) : u, w = C === -1 ? 0 : C, T = (t, n, r) => {
|
|
6479
6504
|
if (m) l(t, n.key || n.label || null);
|
|
6480
6505
|
else {
|
|
6481
6506
|
let t = r.target;
|
|
@@ -6511,7 +6536,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
6511
6536
|
target: n,
|
|
6512
6537
|
onClick: i,
|
|
6513
6538
|
"data-testid": r,
|
|
6514
|
-
children: /* @__PURE__ */ v(
|
|
6539
|
+
children: /* @__PURE__ */ v(Ja, {
|
|
6515
6540
|
link: !0,
|
|
6516
6541
|
children: e
|
|
6517
6542
|
})
|
|
@@ -6715,7 +6740,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
6715
6740
|
className: _d.popConfirm,
|
|
6716
6741
|
children: [e && /* @__PURE__ */ v("div", {
|
|
6717
6742
|
className: _d.content,
|
|
6718
|
-
children: /* @__PURE__ */ v(
|
|
6743
|
+
children: /* @__PURE__ */ v(Ja, {
|
|
6719
6744
|
small: !0,
|
|
6720
6745
|
children: e
|
|
6721
6746
|
})
|
|
@@ -7028,7 +7053,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7028
7053
|
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${M ? n + 1 : n})`})` : r;
|
|
7029
7054
|
};
|
|
7030
7055
|
return /* @__PURE__ */ v("table", {
|
|
7031
|
-
className:
|
|
7056
|
+
className: qo.table,
|
|
7032
7057
|
"data-testid": O,
|
|
7033
7058
|
onDrop: p,
|
|
7034
7059
|
onDragEnter: u,
|
|
@@ -7038,10 +7063,10 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7038
7063
|
onClick: j,
|
|
7039
7064
|
className: g(wd.treeTableRow, A ? wd.active : void 0),
|
|
7040
7065
|
children: [
|
|
7041
|
-
C && /* @__PURE__ */ v(
|
|
7066
|
+
C && /* @__PURE__ */ v(Jc, {
|
|
7042
7067
|
isHeader: !1,
|
|
7043
7068
|
cell: {
|
|
7044
|
-
type:
|
|
7069
|
+
type: qc.CHECKBOX,
|
|
7045
7070
|
checked: b,
|
|
7046
7071
|
disabled: S,
|
|
7047
7072
|
indeterminate: x,
|
|
@@ -7075,16 +7100,16 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7075
7100
|
})
|
|
7076
7101
|
})
|
|
7077
7102
|
}),
|
|
7078
|
-
D.map((t, n) => /* @__PURE__ */ v(
|
|
7103
|
+
D.map((t, n) => /* @__PURE__ */ v(Jc, {
|
|
7079
7104
|
isHeader: !1,
|
|
7080
7105
|
cell: t,
|
|
7081
7106
|
width: N(n),
|
|
7082
7107
|
columnAlignment: e ? e[n] : null
|
|
7083
7108
|
}, n)),
|
|
7084
|
-
o && /* @__PURE__ */ v(
|
|
7109
|
+
o && /* @__PURE__ */ v(Jc, {
|
|
7085
7110
|
isHeader: !1,
|
|
7086
7111
|
cell: {
|
|
7087
|
-
type:
|
|
7112
|
+
type: qc.ACTIONS,
|
|
7088
7113
|
actions: k
|
|
7089
7114
|
}
|
|
7090
7115
|
})
|
|
@@ -7094,28 +7119,28 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7094
7119
|
}, Pd = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
7095
7120
|
let a = jd(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
7096
7121
|
return /* @__PURE__ */ v("table", {
|
|
7097
|
-
className: g(
|
|
7122
|
+
className: g(qo.table, wd.treeTableHeader),
|
|
7098
7123
|
children: /* @__PURE__ */ v("thead", { children: i.map((i, c) => /* @__PURE__ */ y("tr", { children: [
|
|
7099
|
-
s && c === 0 ? /* @__PURE__ */ v(
|
|
7124
|
+
s && c === 0 ? /* @__PURE__ */ v(Jc, {
|
|
7100
7125
|
isHeader: !0,
|
|
7101
7126
|
cell: {
|
|
7102
|
-
type:
|
|
7127
|
+
type: qc.CHECKBOX,
|
|
7103
7128
|
checked: o.checked,
|
|
7104
7129
|
indeterminate: o.indeterminate,
|
|
7105
7130
|
onChange: a.toggleHeaderCheck
|
|
7106
7131
|
}
|
|
7107
7132
|
}) : s ? /* @__PURE__ */ v("td", {}) : null,
|
|
7108
7133
|
n && /* @__PURE__ */ v("th", { className: wd.dragCell }),
|
|
7109
|
-
i.cells.map((n, r) => /* @__PURE__ */ v(
|
|
7134
|
+
i.cells.map((n, r) => /* @__PURE__ */ v(Jc, {
|
|
7110
7135
|
isHeader: !0,
|
|
7111
7136
|
cell: n,
|
|
7112
7137
|
width: t ? t[r] : void 0,
|
|
7113
7138
|
columnAlignment: e ? e[r] : void 0
|
|
7114
7139
|
}, r)),
|
|
7115
|
-
r && /* @__PURE__ */ v(
|
|
7140
|
+
r && /* @__PURE__ */ v(Jc, {
|
|
7116
7141
|
isHeader: !0,
|
|
7117
7142
|
cell: {
|
|
7118
|
-
type:
|
|
7143
|
+
type: qc.ACTIONS,
|
|
7119
7144
|
actions: i.actions,
|
|
7120
7145
|
width: 31
|
|
7121
7146
|
}
|
|
@@ -7123,7 +7148,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7123
7148
|
] }, c)) })
|
|
7124
7149
|
});
|
|
7125
7150
|
}, Fd = ({ allowParentReassignment: e, autoOpenActiveItems: t = !1, canDrop: n, draggable: r = !1, icons: i, isInitialOpen: a = !1, itemHasChild: o, onItemToggle: s, onListReorder: c, onChangeOpen: l, rowCheckboxes: u, table: d, testId: f, treeRef: p }) => {
|
|
7126
|
-
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: b = [] } = d, x =
|
|
7151
|
+
let { columnAlignment: m, columnWidths: h, fixedWidth: g, headers: _, rows: b = [] } = d, x = mc(b, _ == null ? [] : _);
|
|
7127
7152
|
return /* @__PURE__ */ v(Md, {
|
|
7128
7153
|
rowCheckboxes: u,
|
|
7129
7154
|
rows: b,
|
|
@@ -7232,7 +7257,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7232
7257
|
toUnit: n,
|
|
7233
7258
|
unitkey: t
|
|
7234
7259
|
}) ? {
|
|
7235
|
-
value: Wn(
|
|
7260
|
+
value: Wn(xc(a ? Bn(e, n) : zn(e, n))),
|
|
7236
7261
|
error: null
|
|
7237
7262
|
} : {
|
|
7238
7263
|
value: Wn(e),
|
|
@@ -7392,7 +7417,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7392
7417
|
predefinedOption: t
|
|
7393
7418
|
} }));
|
|
7394
7419
|
},
|
|
7395
|
-
label: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(
|
|
7420
|
+
label: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(Ja, { children: t.label }), /* @__PURE__ */ v(bo, {
|
|
7396
7421
|
width: "20px",
|
|
7397
7422
|
height: "0"
|
|
7398
7423
|
})] }),
|
|
@@ -7430,7 +7455,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7430
7455
|
}, Te = !E && (!R || R === V.FIRST) ? V.FIRST : V.MIDDLE, Ee = !R || R === V.LAST ? V.LAST : V.MIDDLE;
|
|
7431
7456
|
return /* @__PURE__ */ v("div", {
|
|
7432
7457
|
className: de === zd.PREDEFINED ? g($d.predefinedMenuActive) : "",
|
|
7433
|
-
children: /* @__PURE__ */ y(
|
|
7458
|
+
children: /* @__PURE__ */ y(fo, {
|
|
7434
7459
|
small: o,
|
|
7435
7460
|
width: s,
|
|
7436
7461
|
children: [
|
|
@@ -7455,7 +7480,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7455
7480
|
}),
|
|
7456
7481
|
/* @__PURE__ */ v("div", {
|
|
7457
7482
|
className: $d.inputWrapper,
|
|
7458
|
-
children: /* @__PURE__ */ v(
|
|
7483
|
+
children: /* @__PURE__ */ v(wc, {
|
|
7459
7484
|
name: xe,
|
|
7460
7485
|
testId: w,
|
|
7461
7486
|
disabled: n,
|
|
@@ -7478,7 +7503,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7478
7503
|
tooltip: ee
|
|
7479
7504
|
}, xe)
|
|
7480
7505
|
}),
|
|
7481
|
-
ye && (be || !ae ? /* @__PURE__ */ v(
|
|
7506
|
+
ye && (be || !ae ? /* @__PURE__ */ v(cc, {
|
|
7482
7507
|
groupOrder: Ee,
|
|
7483
7508
|
small: o,
|
|
7484
7509
|
children: ye
|
|
@@ -7559,7 +7584,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7559
7584
|
cells: e.cells.map((e, s) => {
|
|
7560
7585
|
if ("autoUnit" in e && e != null && e.autoUnit && (typeof (e == null ? void 0 : e.value) == "string" || typeof (e == null ? void 0 : e.value) == "number")) {
|
|
7561
7586
|
let { unitKey: c, value: l, formatDisplayValue: u } = e, d = o && "roundDisplayValue" in e ? e == null ? void 0 : e.roundDisplayValue : null, f = n[c], p = r[c], m = p && f !== p, { value: h = l } = Ud({
|
|
7562
|
-
value:
|
|
7587
|
+
value: xc(l),
|
|
7563
7588
|
unitkey: c,
|
|
7564
7589
|
toUnit: f,
|
|
7565
7590
|
fromUnit: p
|
|
@@ -7601,12 +7626,12 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7601
7626
|
return e ? e.map((e) => ({
|
|
7602
7627
|
...e,
|
|
7603
7628
|
cells: e.cells.map((e) => {
|
|
7604
|
-
if (e.type ===
|
|
7629
|
+
if (e.type === qc.AUTO_UNIT) {
|
|
7605
7630
|
var a;
|
|
7606
7631
|
let { testId: o, unitKey: s, disabled: c = !1, error: l } = e, u = n[s];
|
|
7607
7632
|
return {
|
|
7608
7633
|
value: u && t[s],
|
|
7609
|
-
type:
|
|
7634
|
+
type: qc.SELECT,
|
|
7610
7635
|
error: !u && (i == null ? void 0 : i.unitIsMissing) || l,
|
|
7611
7636
|
disabled: c || !u,
|
|
7612
7637
|
searchable: !1,
|
|
@@ -7664,7 +7689,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7664
7689
|
value: n
|
|
7665
7690
|
});
|
|
7666
7691
|
});
|
|
7667
|
-
}, [t]), /* @__PURE__ */ v(
|
|
7692
|
+
}, [t]), /* @__PURE__ */ v(el, {
|
|
7668
7693
|
table: {
|
|
7669
7694
|
...d,
|
|
7670
7695
|
headers: uf({
|
|
@@ -7696,18 +7721,18 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7696
7721
|
return /* @__PURE__ */ y("div", {
|
|
7697
7722
|
className: ff.settingField,
|
|
7698
7723
|
"data-testid": u,
|
|
7699
|
-
children: [/* @__PURE__ */ y(
|
|
7724
|
+
children: [/* @__PURE__ */ y(mu, {
|
|
7700
7725
|
justifyContent: "space-between",
|
|
7701
7726
|
wrap: !1,
|
|
7702
7727
|
children: [i, !s && /* @__PURE__ */ v("div", {
|
|
7703
7728
|
style: { flexShrink: 0 },
|
|
7704
|
-
children: /* @__PURE__ */ y(
|
|
7729
|
+
children: /* @__PURE__ */ y(mu, {
|
|
7705
7730
|
gap: "8px",
|
|
7706
7731
|
alignItems: "center",
|
|
7707
7732
|
children: [m && /* @__PURE__ */ v(Si, {
|
|
7708
7733
|
text: ar(o).valid ? `${d == null ? void 0 : d.companySetting}: ${Jn(o) ? or(o) : o}` : d == null ? void 0 : d.companySettingDifferent,
|
|
7709
7734
|
icon: H.INFO
|
|
7710
|
-
}), /* @__PURE__ */ v(
|
|
7735
|
+
}), /* @__PURE__ */ v(nc, {
|
|
7711
7736
|
small: !0,
|
|
7712
7737
|
searchable: !1,
|
|
7713
7738
|
name: "userType",
|
|
@@ -7721,7 +7746,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7721
7746
|
})]
|
|
7722
7747
|
})
|
|
7723
7748
|
})]
|
|
7724
|
-
}), t && /* @__PURE__ */ v(
|
|
7749
|
+
}), t && /* @__PURE__ */ v(Ja, {
|
|
7725
7750
|
muted: !0,
|
|
7726
7751
|
children: f(t)
|
|
7727
7752
|
})]
|
|
@@ -7749,16 +7774,16 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7749
7774
|
}, { added: d, removed: f } = mf(e, t), p = d + f > 3500;
|
|
7750
7775
|
return /* @__PURE__ */ v(_, { children: /* @__PURE__ */ v(va, {
|
|
7751
7776
|
bordered: !0,
|
|
7752
|
-
heading: /* @__PURE__ */ y(
|
|
7777
|
+
heading: /* @__PURE__ */ y(mu, {
|
|
7753
7778
|
gap: !0,
|
|
7754
|
-
children: [/* @__PURE__ */ v(
|
|
7779
|
+
children: [/* @__PURE__ */ v(Qa, { children: /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y(Ja, {
|
|
7755
7780
|
success: !0,
|
|
7756
7781
|
children: [
|
|
7757
7782
|
"+",
|
|
7758
7783
|
d,
|
|
7759
7784
|
" "
|
|
7760
7785
|
]
|
|
7761
|
-
}), /* @__PURE__ */ y(
|
|
7786
|
+
}), /* @__PURE__ */ y(Ja, {
|
|
7762
7787
|
error: !0,
|
|
7763
7788
|
children: ["-", f]
|
|
7764
7789
|
})] }) }), !p && /* @__PURE__ */ v(Hu, {
|
|
@@ -7772,7 +7797,7 @@ var wa = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ta =
|
|
|
7772
7797
|
padding: !1,
|
|
7773
7798
|
children: p ? /* @__PURE__ */ v("div", {
|
|
7774
7799
|
style: { padding: "5px" },
|
|
7775
|
-
children: /* @__PURE__ */ v(
|
|
7800
|
+
children: /* @__PURE__ */ v(Ja, {
|
|
7776
7801
|
muted: !0,
|
|
7777
7802
|
children: a == null ? void 0 : a.changesTooLarge
|
|
7778
7803
|
})
|
|
@@ -9203,7 +9228,7 @@ var up = (e = {}) => lp({
|
|
|
9203
9228
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9204
9229
|
default: return `${e} changed ${n}${c}.`;
|
|
9205
9230
|
}
|
|
9206
|
-
}, Ep = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => /* @__PURE__ */ v(
|
|
9231
|
+
}, Ep = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => /* @__PURE__ */ v(el, { table: {
|
|
9207
9232
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9208
9233
|
rows: n.map((n) => {
|
|
9209
9234
|
let { deltaFormat: i, path: a } = n, o = pp(e, a, r), { type: s, before: c, after: l } = hp(i);
|
|
@@ -9232,10 +9257,10 @@ var up = (e = {}) => lp({
|
|
|
9232
9257
|
})), [l, u] = m(c[0]), { diffs: d = void 0 } = e || {};
|
|
9233
9258
|
if (!d) return null;
|
|
9234
9259
|
let { oldJson: f, newJson: p, error: h } = yp(e, t, n);
|
|
9235
|
-
return /* @__PURE__ */ v(
|
|
9260
|
+
return /* @__PURE__ */ v(Eo, {
|
|
9236
9261
|
visible: r,
|
|
9237
9262
|
centered: !0,
|
|
9238
|
-
children: /* @__PURE__ */ v(
|
|
9263
|
+
children: /* @__PURE__ */ v(to, { dialog: {
|
|
9239
9264
|
scroll: !0,
|
|
9240
9265
|
heading: "Comparison view",
|
|
9241
9266
|
content: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(od, {
|
|
@@ -9337,12 +9362,12 @@ var up = (e = {}) => lp({
|
|
|
9337
9362
|
};
|
|
9338
9363
|
});
|
|
9339
9364
|
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(va, {
|
|
9340
|
-
heading: /* @__PURE__ */ y(
|
|
9365
|
+
heading: /* @__PURE__ */ y(mu, {
|
|
9341
9366
|
gap: !0,
|
|
9342
9367
|
wrap: !0,
|
|
9343
|
-
children: [/* @__PURE__ */ v(
|
|
9368
|
+
children: [/* @__PURE__ */ v(Qa, { children: "Changes" }), c.map((e) => {
|
|
9344
9369
|
var t;
|
|
9345
|
-
return /* @__PURE__ */ v(
|
|
9370
|
+
return /* @__PURE__ */ v(Kl, {
|
|
9346
9371
|
small: (t = e.small) == null ? !0 : t,
|
|
9347
9372
|
checked: e.checked,
|
|
9348
9373
|
onChange: e.onChange,
|
|
@@ -9356,7 +9381,7 @@ var up = (e = {}) => lp({
|
|
|
9356
9381
|
height: "100px",
|
|
9357
9382
|
theme: Ur.WHITE,
|
|
9358
9383
|
children: /* @__PURE__ */ v(Ai, { dark: !0 })
|
|
9359
|
-
}) : /* @__PURE__ */ v(
|
|
9384
|
+
}) : /* @__PURE__ */ v(el, { table: {
|
|
9360
9385
|
headers: T,
|
|
9361
9386
|
testId: "auditlog-table",
|
|
9362
9387
|
rows: E,
|
|
@@ -9416,4 +9441,4 @@ var up = (e = {}) => lp({
|
|
|
9416
9441
|
});
|
|
9417
9442
|
};
|
|
9418
9443
|
//#endregion
|
|
9419
|
-
export { ci as Accordion, Di as AccordionWithDefaultToggle, ua as Actions, Br as Align, jp as AuditLog, Xi as Badge, ma as Breadcrumb, fa as BreadcrumbLinkType, K as Button, ga as ButtonGroup, Vr as ButtonPosition, ji as ButtonType, va as Card, Ci as CheckBox, ni as Chevron, ai as Collapse, zr as Color,
|
|
9444
|
+
export { ci as Accordion, Di as AccordionWithDefaultToggle, ua as Actions, Br as Align, jp as AuditLog, Xi as Badge, ma as Breadcrumb, fa as BreadcrumbLinkType, K as Button, ga as ButtonGroup, Vr as ButtonPosition, ji as ButtonType, va as Card, Ci as CheckBox, ni as Chevron, ai as Collapse, zr as Color, Ba as ColorInput, za as ColorInputPopover, Ga as Column, to as Dialog, _f as DiffViewer, U as DisabledContext, Xa as Divider, co as Drawer, pd as ElementType, dl as Empty, pu as Field, lu as FileButton, yo as FileInput, mu as Flex, gu as FormRow, Ta as Grid, V as GroupOrder, Qa as Heading, Si as HelpIcon, W as Icon, H as IconType, mo as Input, fo as InputGroup, cc as InputGroupAddon, go as InputReaderMethods, Wr as InputType, du as Label, ku as List, vu as ListHeading, wu as ListSubheading, ju as Loader, ca as Menu, Ri as MenuCarat, Li as MenuType, Ko as Message, Bo as MessageType, Eo as Modal, Qo as NativeSelect, wc as NumberInput, Lu as OptionDropdown, zu as Page, lc as Pagination, yd as PopConfirm, xa as Popover, So as Portal, Vu as PrintHeader, ko as ProgressBar, Hu as RadioButton, qu as RichTextInput, Yu as Row, nc as Select, pf as SettingField, ed as SideBar, nd as Skeleton, Pc as Slider, Po as SmartUploadModal, bo as Spacer, Ai as Spinner, el as Table, cu as TableImportExport, od as Tabs, Ja as Text, ld as TextArea, sd as TextLink, Hr as TextTransform, Ur as Theme, Cr as Toaster, Kl as Toggle, G as Tooltip, gd as TopBar, Cd as Tree, Fd as TreeTable, Rr as TriggerType, ef as UnitInput, df as UnitTable, Mp as UsageTracker, Ul as dismissToast, Zd as initializeContext, Pp as initializeGuiLibrary, _o as readFile, Hl as toast, $o as useFocus, xo as useKeyboardEvent, ns as useWindowWidth };
|