@epam/uui 6.1.1-beta.0 → 6.1.1
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/components/datePickers/RangeDatePickerBody.d.ts +5 -5
- package/components/datePickers/RangeDatePickerBody.d.ts.map +1 -1
- package/components/datePickers/RangeDatePickerInput.d.ts.map +1 -1
- package/components/datePickers/helpers.d.ts +2 -1
- package/components/datePickers/helpers.d.ts.map +1 -1
- package/components/filters/FilterColumnBody.d.ts +4 -0
- package/components/filters/FilterColumnBody.d.ts.map +1 -0
- package/components/filters/FilterPredicatePanel.d.ts +13 -0
- package/components/filters/FilterPredicatePanel.d.ts.map +1 -0
- package/components/filters/FiltersPanel.d.ts.map +1 -1
- package/components/filters/FiltersPanelItem.d.ts.map +1 -1
- package/components/filters/defaultPredicates.d.ts +2 -1
- package/components/filters/defaultPredicates.d.ts.map +1 -1
- package/components/filters/helpers/predicateHelpers.d.ts +4 -0
- package/components/filters/helpers/predicateHelpers.d.ts.map +1 -0
- package/components/layout/VirtualList.d.ts +7 -0
- package/components/layout/VirtualList.d.ts.map +1 -1
- package/components/pickers/DataPickerBody.d.ts.map +1 -1
- package/components/pickers/DataPickerRow.d.ts.map +1 -1
- package/components/pickers/PickerModal.d.ts.map +1 -1
- package/components/widgets/DataRowAddons.d.ts.map +1 -1
- package/helpers/useColumnsWithFilters.d.ts.map +1 -1
- package/index.esm.js +1048 -952
- package/index.esm.js.map +1 -1
- package/index.js +1046 -949
- package/index.js.map +1 -1
- package/package.json +5 -5
- package/settings.d.ts +2 -1
- package/settings.d.ts.map +1 -1
- package/stats.html +1 -1
- package/styles.css +1258 -1235
- package/styles.css.map +1 -1
package/index.js
CHANGED
|
@@ -185,7 +185,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
185
185
|
xmlns: "http://www.w3.org/2000/svg",
|
|
186
186
|
ref: ref
|
|
187
187
|
}, props), /*#__PURE__*/React__namespace.createElement("g", {
|
|
188
|
-
clipPath: "url(#
|
|
188
|
+
clipPath: "url(#9l7x0xu2fje5j0bij_a)"
|
|
189
189
|
}, _path$I || (_path$I = /*#__PURE__*/React__namespace.createElement("path", {
|
|
190
190
|
d: "M150.585 1.535C49.483-11.495 27.481 61.805 45.725 97.481c10.581 20.69-39.64 70.792 17.744 81.468 27.538 5.123 36-13.341 62.433-10.655 35.4 3.6 148.167-4.73 88.349-78.915-31.713-39.335 1.026-79.506-63.666-87.844Z",
|
|
191
191
|
fill: "#F5F6FA"
|
|
@@ -206,7 +206,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
206
206
|
d: "M86.786 22.982c-2.55 0-4.965 2.07-4.965 4.552V120.6c0 2.484 2.4 4.572 4.965 4.572h88.101c2.582 0 4.986-2.089 4.986-4.572V27.534c0-2.464-2.418-4.552-4.986-4.552h-88.1Zm-5.793 4.552c0-3.022 2.874-5.38 5.793-5.38h88.101c2.935 0 5.814 2.374 5.814 5.38V120.6c0 3.021-2.86 5.4-5.814 5.4h-88.1c-2.94 0-5.794-2.381-5.794-5.4V27.534Z",
|
|
207
207
|
fill: "#1D1E26"
|
|
208
208
|
})), /*#__PURE__*/React__namespace.createElement("mask", {
|
|
209
|
-
id: "
|
|
209
|
+
id: "9l7x0xtlqfqu58qx_b",
|
|
210
210
|
style: {
|
|
211
211
|
maskType: "alpha"
|
|
212
212
|
},
|
|
@@ -219,7 +219,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
219
219
|
d: "M174.887 125.586h-88.1c-2.752 0-5.38-2.234-5.38-4.986V27.534c0-2.752 2.644-4.966 5.38-4.966h88.1c2.752 0 5.4 2.23 5.4 4.966V120.6c0 2.752-2.632 4.986-5.4 4.986Z",
|
|
220
220
|
fill: "#9BDEFF"
|
|
221
221
|
}))), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
222
|
-
mask: "url(#
|
|
222
|
+
mask: "url(#9l7x0xtlqfqu58qx_b)",
|
|
223
223
|
fillRule: "evenodd",
|
|
224
224
|
clipRule: "evenodd"
|
|
225
225
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -305,7 +305,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
305
305
|
d: "M24.73 96.184a.414.414 0 0 1 .581.06l48.646 59.751a.413.413 0 1 1-.642.523L24.67 96.766a.414.414 0 0 1 .06-.582Z",
|
|
306
306
|
fill: "#fff"
|
|
307
307
|
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
308
|
-
id: "
|
|
308
|
+
id: "9l7x0xu2fje5j0bij_a"
|
|
309
309
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
310
310
|
fill: "#fff",
|
|
311
311
|
transform: "translate(.552)",
|
|
@@ -956,14 +956,14 @@ var SvgSearchWithBackground = function SvgSearchWithBackground(props, ref) {
|
|
|
956
956
|
};
|
|
957
957
|
var ForwardRef$4 = /*#__PURE__*/React.forwardRef(SvgSearchWithBackground);
|
|
958
958
|
|
|
959
|
-
var css$1w = {"root":"
|
|
959
|
+
var css$1w = {"root":"lpoilb","uui-spinner":"sVDjSB","uuiSpinner":"sVDjSB"};
|
|
960
960
|
|
|
961
961
|
function applySpinnerMods() {
|
|
962
962
|
return [css$1w.root, 'uui-spinner'];
|
|
963
963
|
}
|
|
964
964
|
const Spinner = /* @__PURE__ */uuiCore.withMods(uuiComponents.Spinner, applySpinnerMods);
|
|
965
965
|
|
|
966
|
-
var css$1v = {"root":"
|
|
966
|
+
var css$1v = {"root":"FBLOc0","loading-word":"JkZzdB","loadingWord":"JkZzdB","animated-loading":"lFlRHo","animatedLoading":"lFlRHo","skeleton_loading":"hbp-Uz","skeletonLoading":"hbp-Uz"};
|
|
967
967
|
|
|
968
968
|
const TextPlaceholder = (props) => {
|
|
969
969
|
const pattern = ' ';
|
|
@@ -980,7 +980,7 @@ const TextPlaceholder = (props) => {
|
|
|
980
980
|
]), dangerouslySetInnerHTML: { __html: it } })))));
|
|
981
981
|
};
|
|
982
982
|
|
|
983
|
-
var css$1u = {"root":"
|
|
983
|
+
var css$1u = {"root":"rBUWga","line-height":"nrY8nN","lineHeight":"nrY8nN","font-size":"_4UQjff","fontSize":"_4UQjff"};
|
|
984
984
|
|
|
985
985
|
function applyTextMods(mods) {
|
|
986
986
|
return [
|
|
@@ -1007,6 +1007,10 @@ const Text = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Text, appl
|
|
|
1007
1007
|
};
|
|
1008
1008
|
});
|
|
1009
1009
|
|
|
1010
|
+
var css$1t = {"root":"Dx6fgP"};
|
|
1011
|
+
|
|
1012
|
+
const Blocker = /* @__PURE__ */uuiCore.withMods(uuiComponents.Blocker, () => [css$1t.root], () => ({ renderSpinner: settings.blocker.renderSpinner }));
|
|
1013
|
+
|
|
1010
1014
|
const accordionSettings = {
|
|
1011
1015
|
icons: {
|
|
1012
1016
|
dropdownIcon: ForwardRef$P,
|
|
@@ -1268,6 +1272,7 @@ const paginatorSettings = {
|
|
|
1268
1272
|
const pickerInputSettings = {
|
|
1269
1273
|
renderPlaceholder: (props) => React__namespace.default.createElement(Text, { size: props.rowSize },
|
|
1270
1274
|
React__namespace.default.createElement(TextPlaceholder, null)),
|
|
1275
|
+
renderBlocker: (props) => React__namespace.default.createElement(Blocker, { isEnabled: props.isLoading }),
|
|
1271
1276
|
icons: {
|
|
1272
1277
|
toggler: {
|
|
1273
1278
|
clearIcon: ForwardRef$Q,
|
|
@@ -1490,11 +1495,11 @@ const settings = {
|
|
|
1490
1495
|
textInput: textInputSettings,
|
|
1491
1496
|
};
|
|
1492
1497
|
|
|
1493
|
-
var css$
|
|
1498
|
+
var css$1s = {"root":"LvZsFX"};
|
|
1494
1499
|
|
|
1495
1500
|
function applyButtonMods(mods) {
|
|
1496
1501
|
return [
|
|
1497
|
-
css$
|
|
1502
|
+
css$1s.root,
|
|
1498
1503
|
'uui-button',
|
|
1499
1504
|
`uui-fill-${mods.fill || 'solid'}`,
|
|
1500
1505
|
`uui-color-${mods.color || 'primary'}`,
|
|
@@ -1508,10 +1513,10 @@ const Button = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Button,
|
|
|
1508
1513
|
};
|
|
1509
1514
|
});
|
|
1510
1515
|
|
|
1511
|
-
var css$
|
|
1516
|
+
var css$1r = {"root":"WMMKMw"};
|
|
1512
1517
|
|
|
1513
1518
|
function applyIconButtonMods(props) {
|
|
1514
|
-
return ['uui-icon_button', `uui-color-${props.color || 'neutral'}`, css$
|
|
1519
|
+
return ['uui-icon_button', `uui-color-${props.color || 'neutral'}`, css$1r.root];
|
|
1515
1520
|
}
|
|
1516
1521
|
const IconButton = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.IconButton, applyIconButtonMods, (props) => {
|
|
1517
1522
|
const isDeprecated = ['info', 'success', 'error', 'warning'].includes(props.color);
|
|
@@ -1545,7 +1550,7 @@ function getIconClass(props) {
|
|
|
1545
1550
|
return [classList['has-left-icon'] ? 'uui-has-left-icon' : 'uui-no-left-icon', classList['has-right-icon'] ? 'uui-has-right-icon' : 'uui-no-right-icon'];
|
|
1546
1551
|
}
|
|
1547
1552
|
|
|
1548
|
-
var css$
|
|
1553
|
+
var css$1q = {"root":"s1p-zs"};
|
|
1549
1554
|
|
|
1550
1555
|
const DEFAULT_COLOR = 'primary';
|
|
1551
1556
|
const LinkButton = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
@@ -1560,7 +1565,7 @@ const LinkButton = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
|
1560
1565
|
}
|
|
1561
1566
|
const rootStyles = [
|
|
1562
1567
|
'uui-link_button',
|
|
1563
|
-
css$
|
|
1568
|
+
css$1q.root,
|
|
1564
1569
|
`uui-size-${props.size || settings.linkButton.sizes.default}`,
|
|
1565
1570
|
...getIconClass(props),
|
|
1566
1571
|
`uui-color-${props.color || DEFAULT_COLOR}`,
|
|
@@ -1575,11 +1580,11 @@ const LinkButton = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
|
1575
1580
|
props.isDropdown && (React__namespace.createElement(uuiComponents.IconContainer, { icon: DropdownIcon, flipY: props.isOpen }))));
|
|
1576
1581
|
});
|
|
1577
1582
|
|
|
1578
|
-
var css$
|
|
1583
|
+
var css$1p = {"root":"Vt0Fr-"};
|
|
1579
1584
|
|
|
1580
1585
|
const CountIndicator = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
1581
1586
|
return (React__namespace.default.createElement("div", { ref: ref, className: cx__default.default([
|
|
1582
|
-
css$
|
|
1587
|
+
css$1p.root,
|
|
1583
1588
|
'uui-count_indicator',
|
|
1584
1589
|
`uui-size-${props.size || settings.countIndicator.sizes.default}`,
|
|
1585
1590
|
props.color && `uui-color-${props.color}`,
|
|
@@ -1587,11 +1592,11 @@ const CountIndicator = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
1587
1592
|
]) }, props.caption));
|
|
1588
1593
|
});
|
|
1589
1594
|
|
|
1590
|
-
var css$
|
|
1595
|
+
var css$1o = {"root":"_0K-UIR","withNotify":"_5LYwFT"};
|
|
1591
1596
|
|
|
1592
1597
|
const TabButton = /* @__PURE__ */React__namespace.default.forwardRef((props, ref) => {
|
|
1593
1598
|
const styles = [
|
|
1594
|
-
css$
|
|
1599
|
+
css$1o.root,
|
|
1595
1600
|
'uui-tab-button',
|
|
1596
1601
|
`uui-size-${props.size || settings.tabButton.sizes.default}`,
|
|
1597
1602
|
...getIconClass(props),
|
|
@@ -1608,25 +1613,25 @@ const TabButton = /* @__PURE__ */React__namespace.default.forwardRef((props, ref
|
|
|
1608
1613
|
props.icon && props.iconPosition !== 'right' && (React__namespace.default.createElement(uuiComponents.IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
1609
1614
|
(props.caption || props.withNotify) && (React__namespace.default.createElement("div", { className: uuiCore.cx(uuiCore.uuiElement.caption) },
|
|
1610
1615
|
props.caption,
|
|
1611
|
-
props.withNotify && React__namespace.default.createElement("div", { className: css$
|
|
1616
|
+
props.withNotify && React__namespace.default.createElement("div", { className: css$1o.withNotify }))),
|
|
1612
1617
|
props.icon && props.iconPosition === 'right' && (React__namespace.default.createElement(uuiComponents.IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
1613
1618
|
props.count !== undefined && props.count !== null && (React__namespace.default.createElement(CountIndicator, { color: "neutral", size: settings.tabButton.sizes.countIndicatorMap[props.size || settings.tabButton.sizes.default], caption: props.count })),
|
|
1614
1619
|
props.isDropdown && (React__namespace.default.createElement(uuiComponents.IconContainer, { icon: DropdownIcon, flipY: props.isOpen })),
|
|
1615
1620
|
props.onClear && !props.isDisabled && (React__namespace.default.createElement(uuiComponents.IconContainer, { cx: uuiCore.uuiMarkers.clickable, icon: ClearIcon, onClick: props.onClear }))));
|
|
1616
1621
|
});
|
|
1617
1622
|
|
|
1618
|
-
var css$
|
|
1623
|
+
var css$1n = {"root":"aJjlD6"};
|
|
1619
1624
|
|
|
1620
1625
|
function applyVerticalTabButtonMods() {
|
|
1621
|
-
return [css$
|
|
1626
|
+
return [css$1n.root, 'uui-vertical-tab-button'];
|
|
1622
1627
|
}
|
|
1623
1628
|
const VerticalTabButton = /* @__PURE__ */uuiCore.withMods(TabButton, applyVerticalTabButtonMods);
|
|
1624
1629
|
|
|
1625
|
-
var css$
|
|
1630
|
+
var css$1m = {"root":"iSN8ad"};
|
|
1626
1631
|
|
|
1627
1632
|
function applyCheckboxMods(mods) {
|
|
1628
1633
|
return [
|
|
1629
|
-
css$
|
|
1634
|
+
css$1m.root,
|
|
1630
1635
|
`uui-size-${mods.size || settings.checkbox.sizes.default}`,
|
|
1631
1636
|
'uui-control-mode-' + (mods.mode || 'form'),
|
|
1632
1637
|
'uui-color-primary',
|
|
@@ -1640,11 +1645,11 @@ const applyUUICheckboxProps = (props) => {
|
|
|
1640
1645
|
};
|
|
1641
1646
|
const Checkbox = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Checkbox, applyCheckboxMods, applyUUICheckboxProps);
|
|
1642
1647
|
|
|
1643
|
-
var css$
|
|
1648
|
+
var css$1l = {"root":"ZD-bnJ"};
|
|
1644
1649
|
|
|
1645
1650
|
function applyRadioInputMods(mods) {
|
|
1646
1651
|
return [
|
|
1647
|
-
css$
|
|
1652
|
+
css$1l.root,
|
|
1648
1653
|
`uui-size-${mods.size || settings.radioInput.sizes.default}`,
|
|
1649
1654
|
'uui-radio-input-container',
|
|
1650
1655
|
'uui-color-primary',
|
|
@@ -1652,11 +1657,11 @@ function applyRadioInputMods(mods) {
|
|
|
1652
1657
|
}
|
|
1653
1658
|
const RadioInput = /* @__PURE__ */uuiCore.withMods(uuiComponents.RadioInput, applyRadioInputMods, (props) => ({ icon: props.icon ? props.icon : settings.radioInput.icons.dotIcon }));
|
|
1654
1659
|
|
|
1655
|
-
var css$
|
|
1660
|
+
var css$1k = {"root":"fwp9WK"};
|
|
1656
1661
|
|
|
1657
1662
|
function applySwitchMods(mods) {
|
|
1658
1663
|
return [
|
|
1659
|
-
css$
|
|
1664
|
+
css$1k.root,
|
|
1660
1665
|
`uui-size-${mods.size || settings.switch.sizes.default}`,
|
|
1661
1666
|
'uui-color-primary',
|
|
1662
1667
|
];
|
|
@@ -1676,7 +1681,7 @@ var EditMode;
|
|
|
1676
1681
|
EditMode["INLINE"] = "inline";
|
|
1677
1682
|
})(EditMode || (EditMode = {}));
|
|
1678
1683
|
|
|
1679
|
-
var textInputCss = {"root":"
|
|
1684
|
+
var textInputCss = {"root":"jiu2Fc"};
|
|
1680
1685
|
|
|
1681
1686
|
const DEFAULT_MODE$3 = EditMode.FORM;
|
|
1682
1687
|
function applyTextInputMods(mods) {
|
|
@@ -1701,9 +1706,9 @@ const SearchInput = /* @__PURE__ */React__namespace.default.forwardRef((props, r
|
|
|
1701
1706
|
} }));
|
|
1702
1707
|
});
|
|
1703
1708
|
|
|
1704
|
-
var css$
|
|
1709
|
+
var css$1j = {"root":"ItDOGS"};
|
|
1705
1710
|
|
|
1706
|
-
const ControlGroup = /* @__PURE__ */uuiCore.withMods(uuiComponents.ControlGroup, () => [css$
|
|
1711
|
+
const ControlGroup = /* @__PURE__ */uuiCore.withMods(uuiComponents.ControlGroup, () => [css$1j.root, 'uui-control-group']);
|
|
1707
1712
|
|
|
1708
1713
|
function MultiSwitchComponent(props, ref) {
|
|
1709
1714
|
return (React__namespace.createElement(ControlGroup, { ref: ref, rawProps: {
|
|
@@ -1717,13 +1722,13 @@ function MultiSwitchComponent(props, ref) {
|
|
|
1717
1722
|
}
|
|
1718
1723
|
const MultiSwitch = /* @__PURE__ */React__namespace.forwardRef(MultiSwitchComponent);
|
|
1719
1724
|
|
|
1720
|
-
var css$
|
|
1725
|
+
var css$1i = {"root":"oKS3F5"};
|
|
1721
1726
|
|
|
1722
1727
|
const DEFAULT_MODE$2 = EditMode.FORM;
|
|
1723
1728
|
function applyNumericInputMods(mods) {
|
|
1724
1729
|
return [
|
|
1725
1730
|
textInputCss.root,
|
|
1726
|
-
css$
|
|
1731
|
+
css$1i.root,
|
|
1727
1732
|
`uui-size-${mods.size || settings.numericInput.sizes.default}`,
|
|
1728
1733
|
'uui-control-mode-' + (mods.mode || DEFAULT_MODE$2),
|
|
1729
1734
|
];
|
|
@@ -1737,12 +1742,12 @@ const NumericInput = /* @__PURE__ */uuiCore.withMods(uuiComponents.NumericInput,
|
|
|
1737
1742
|
};
|
|
1738
1743
|
});
|
|
1739
1744
|
|
|
1740
|
-
var css$
|
|
1745
|
+
var css$1h = {"root":"MSTlg8"};
|
|
1741
1746
|
|
|
1742
1747
|
const DEFAULT_MODE$1 = EditMode.FORM;
|
|
1743
1748
|
function applyTextAreaMods(mods) {
|
|
1744
1749
|
return [
|
|
1745
|
-
css$
|
|
1750
|
+
css$1h.root,
|
|
1746
1751
|
'uui-textarea',
|
|
1747
1752
|
'uui-size-' + (mods.size || settings.textArea.sizes.default),
|
|
1748
1753
|
'uui-control-mode-' + (mods.mode || DEFAULT_MODE$1),
|
|
@@ -1778,18 +1783,18 @@ function TREE_SHAKEABLE_INIT$1() {
|
|
|
1778
1783
|
};
|
|
1779
1784
|
}
|
|
1780
1785
|
|
|
1781
|
-
var css$
|
|
1786
|
+
var css$1g = {"root":"Fj-MkA"};
|
|
1782
1787
|
|
|
1783
1788
|
function applyDropdownContainerMods(mods) {
|
|
1784
1789
|
return [
|
|
1785
|
-
css$
|
|
1790
|
+
css$1g.root,
|
|
1786
1791
|
mods.vPadding && `vPadding-${mods.vPadding}`,
|
|
1787
1792
|
mods.padding && `padding-${mods.padding}`,
|
|
1788
1793
|
];
|
|
1789
1794
|
}
|
|
1790
1795
|
const DropdownContainer = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.DropdownContainer, applyDropdownContainerMods);
|
|
1791
1796
|
|
|
1792
|
-
var css$
|
|
1797
|
+
var css$1f = {"root":"YCSBR1","timepicker-input":"FVJor4","timepickerInput":"FVJor4","ltr-always":"_8Ogt91","ltrAlways":"_8Ogt91"};
|
|
1793
1798
|
|
|
1794
1799
|
const uuiTimePicker = {
|
|
1795
1800
|
container: 'uui-timepicker-container',
|
|
@@ -1828,8 +1833,8 @@ function TimePickerBody(props) {
|
|
|
1828
1833
|
const minutesToSubtract = value.minute() % minutesStep === 0 ? minutesStep : value.minute() % minutesStep;
|
|
1829
1834
|
onMinutesChange(value.subtract(minutesToSubtract, 'm').minute());
|
|
1830
1835
|
};
|
|
1831
|
-
return (React__namespace.createElement("div", { className: uuiCore.cx(css$
|
|
1832
|
-
React__namespace.createElement("div", { className: css$
|
|
1836
|
+
return (React__namespace.createElement("div", { className: uuiCore.cx(css$1f.root, uuiTimePicker.container, props.cx), ref: props.forwardedRef, ...props.rawProps },
|
|
1837
|
+
React__namespace.createElement("div", { className: css$1f.ltrAlways },
|
|
1833
1838
|
React__namespace.createElement("div", { className: uuiTimePicker.elementContainer },
|
|
1834
1839
|
React__namespace.createElement(uuiComponents.IconContainer, { size: 18, rawProps: { 'aria-label': 'Increment hours' }, cx: uuiTimePicker.iconUp, icon: ForwardRef$P, onClick: () => onHoursChange(uuiDayjs.dayjs().set(props.value).add(1, 'h').hour()) }),
|
|
1835
1840
|
React__namespace.createElement(uuiComponents.NumericInput, { cx: uuiTimePicker.input, onValueChange: onHoursChange, value: +(uuiDayjs.dayjs()
|
|
@@ -1972,7 +1977,7 @@ function TimePickerComponent(props, ref) {
|
|
|
1972
1977
|
state.value && state.inputValue && saveTime(state.value);
|
|
1973
1978
|
};
|
|
1974
1979
|
const renderInput = (inputProps) => {
|
|
1975
|
-
return (React__namespace.default.createElement(TextInput, { ...inputProps, onClick: null, size: props.size, isDisabled: props.isDisabled, isReadonly: props.isReadonly, isInvalid: props.isInvalid, cx: [css$
|
|
1980
|
+
return (React__namespace.default.createElement(TextInput, { ...inputProps, onClick: null, size: props.size, isDisabled: props.isDisabled, isReadonly: props.isReadonly, isInvalid: props.isInvalid, cx: [css$1f.root, css$1f.timepickerInput, props.inputCx], value: state.inputValue, onValueChange: handleInputChange, onCancel: !props.disableClear && onClear, onFocus: handleFocus, onBlur: handleBlur, isDropdown: false, placeholder: props.placeholder ? props.placeholder : getFormat(), mode: props.mode || DEFAULT_MODE, rawProps: props.rawProps?.input }));
|
|
1976
1981
|
};
|
|
1977
1982
|
const renderBody = (bodyProps) => {
|
|
1978
1983
|
const { forwardedRef, onValueChange, ...timePickerBodyProps } = props;
|
|
@@ -1983,37 +1988,37 @@ function TimePickerComponent(props, ref) {
|
|
|
1983
1988
|
}
|
|
1984
1989
|
const TimePicker = /* @__PURE__ */React__namespace.default.forwardRef(TimePickerComponent);
|
|
1985
1990
|
|
|
1986
|
-
var css$
|
|
1991
|
+
var css$1e = {"root":"naMHF1"};
|
|
1987
1992
|
|
|
1988
1993
|
function applyInputAddonMods() {
|
|
1989
1994
|
return [
|
|
1990
|
-
css$
|
|
1995
|
+
css$1e.root,
|
|
1991
1996
|
];
|
|
1992
1997
|
}
|
|
1993
1998
|
const InputAddon = /* @__PURE__ */uuiCore.withMods(uuiComponents.InputAddon, applyInputAddonMods);
|
|
1994
1999
|
|
|
1995
|
-
var css$
|
|
2000
|
+
var css$1d = {"root":"_0zIzP8"};
|
|
1996
2001
|
|
|
1997
2002
|
function applySliderMods() {
|
|
1998
|
-
return [css$
|
|
2003
|
+
return [css$1d.root, 'uui-color-neutral'];
|
|
1999
2004
|
}
|
|
2000
2005
|
const Slider = /* @__PURE__ */uuiCore.withMods(uuiComponents.Slider, applySliderMods);
|
|
2001
2006
|
|
|
2002
|
-
var css$
|
|
2007
|
+
var css$1c = {"root":"wVtZ9H"};
|
|
2003
2008
|
|
|
2004
2009
|
function applyTooltipMods(mods) {
|
|
2005
2010
|
return [
|
|
2006
|
-
css$
|
|
2011
|
+
css$1c.root,
|
|
2007
2012
|
`uui-color-${mods.color || 'inverted'}`,
|
|
2008
2013
|
];
|
|
2009
2014
|
}
|
|
2010
2015
|
const Tooltip = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Tooltip, applyTooltipMods);
|
|
2011
2016
|
|
|
2012
|
-
var css$
|
|
2017
|
+
var css$1b = {"root":"iWGNyF","tooltip":"IM7BGh"};
|
|
2013
2018
|
|
|
2014
2019
|
function applyRatingMods(mods) {
|
|
2015
2020
|
return [
|
|
2016
|
-
css$
|
|
2021
|
+
css$1b.root,
|
|
2017
2022
|
`uui-size-${mods.size || settings.rating.sizes.default}`,
|
|
2018
2023
|
];
|
|
2019
2024
|
}
|
|
@@ -2023,17 +2028,17 @@ const Rating = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Rating,
|
|
|
2023
2028
|
Tooltip,
|
|
2024
2029
|
}));
|
|
2025
2030
|
|
|
2026
|
-
var css$
|
|
2031
|
+
var css$1a = {"root":"qoPWPH","main-path":"P5D2sx","mainPath":"P5D2sx","content-wrapper":"FTPp2R","contentWrapper":"FTPp2R","content":"KBzuJ-","action-wrapper":"NFl92L","actionWrapper":"NFl92L","icon-wrapper":"SJzPzb","iconWrapper":"SJzPzb","icon":"C60jAv","close-icon":"e5AYJU","closeIcon":"e5AYJU"};
|
|
2027
2032
|
|
|
2028
|
-
const Alert = /* @__PURE__ */React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", { role: "alert", ref: ref, className: cx__default.default('uui-alert', css$
|
|
2029
|
-
React__namespace.createElement("div", { className: css$
|
|
2030
|
-
React__namespace.createElement("div", { className: css$
|
|
2031
|
-
props.icon && (React__namespace.createElement("div", { className: css$
|
|
2032
|
-
React__namespace.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$
|
|
2033
|
-
React__namespace.createElement("div", { className: css$
|
|
2033
|
+
const Alert = /* @__PURE__ */React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", { role: "alert", ref: ref, className: cx__default.default('uui-alert', css$1a.root, props.color && `uui-color-${props.color}`, props.cx, `uui-size-${props.size || settings.alert.sizes.default}`), ...props.rawProps },
|
|
2034
|
+
React__namespace.createElement("div", { className: css$1a.mainPath },
|
|
2035
|
+
React__namespace.createElement("div", { className: css$1a.contentWrapper },
|
|
2036
|
+
props.icon && (React__namespace.createElement("div", { className: css$1a.iconWrapper },
|
|
2037
|
+
React__namespace.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$1a.icon }))),
|
|
2038
|
+
React__namespace.createElement("div", { className: css$1a.content },
|
|
2034
2039
|
props.children,
|
|
2035
|
-
props.actions && (React__namespace.createElement("div", { className: css$
|
|
2036
|
-
props.onClose && React__namespace.createElement(IconButton, { icon: settings.alert.icons.closeIcon, color: "neutral", onClick: props.onClose, cx: css$
|
|
2040
|
+
props.actions && (React__namespace.createElement("div", { className: css$1a.actionWrapper }, props.actions.map((action) => (React__namespace.createElement(LinkButton, { caption: action.name, onClick: action.action, key: action.name, cx: css$1a.actionLink, size: settings.alert.sizes.actionMap[props.size || settings.alert.sizes.default] }))))))),
|
|
2041
|
+
props.onClose && React__namespace.createElement(IconButton, { icon: settings.alert.icons.closeIcon, color: "neutral", onClick: props.onClose, cx: css$1a.closeIcon })))));
|
|
2037
2042
|
const WarningAlert = /* @__PURE__ */React__namespace.forwardRef((props, ref) => React__namespace.createElement(Alert, { icon: settings.alert.icons.warningIcon, color: "warning", ref: ref, ...props }));
|
|
2038
2043
|
const SuccessAlert = /* @__PURE__ */React__namespace.forwardRef((props, ref) => React__namespace.createElement(Alert, { icon: settings.alert.icons.successIcon, color: "success", ref: ref, ...props }));
|
|
2039
2044
|
const HintAlert = /* @__PURE__ */React__namespace.forwardRef((props, ref) => React__namespace.createElement(Alert, { icon: settings.alert.icons.infoIcon, color: "info", ref: ref, ...props }));
|
|
@@ -2041,7 +2046,7 @@ const ErrorAlert = /* @__PURE__ */React__namespace.forwardRef((props, ref) => Re
|
|
|
2041
2046
|
|
|
2042
2047
|
const Dropdown = /* @__PURE__ */uuiCore.withMods(uuiComponents.Dropdown);
|
|
2043
2048
|
|
|
2044
|
-
var css$
|
|
2049
|
+
var css$19 = {"submenu-root-item-rtl":"_0k5n5A","submenuRootItemRtl":"_0k5n5A","icon-after":"U6bpFN","iconAfter":"U6bpFN","submenu-root-item":"_1HjPKu","submenuRootItem":"_1HjPKu","icon-check":"GFnONx","iconCheck":"GFnONx","splitter-root":"rqIhmo","splitterRoot":"rqIhmo","splitter":"_575uFj","header-root":"vTb1P9","headerRoot":"vTb1P9","item-root":"sZMvs-","itemRoot":"sZMvs-","icon":"tGfVOG","link":"dYJqbl","indent":"NMqowm","selected-mark":"t-yjP2","selectedMark":"t-yjP2"};
|
|
2045
2050
|
|
|
2046
2051
|
exports.IDropdownControlKeys = void 0;
|
|
2047
2052
|
(function (IDropdownControlKeys) {
|
|
@@ -2106,29 +2111,29 @@ const DropdownMenuButton = /* @__PURE__ */React__namespace.default.forwardRef((p
|
|
|
2106
2111
|
const getMenuButtonContent = () => {
|
|
2107
2112
|
const isIconBefore = Boolean(icon && iconPosition !== 'right');
|
|
2108
2113
|
const isIconAfter = Boolean(icon && iconPosition === 'right');
|
|
2109
|
-
const iconElement = (React__namespace.default.createElement(IconButton, { icon: icon, color: isActive ? 'primary' : 'neutral', onClick: onIconClick, isDisabled: isDisabled, cx: uuiCore.cx(css$
|
|
2114
|
+
const iconElement = (React__namespace.default.createElement(IconButton, { icon: icon, color: isActive ? 'primary' : 'neutral', onClick: onIconClick, isDisabled: isDisabled, cx: uuiCore.cx(css$19.icon, iconPosition === 'right' ? css$19.iconAfter : css$19.iconBefore) }));
|
|
2110
2115
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
2111
2116
|
isIconBefore && iconElement,
|
|
2112
|
-
React__namespace.default.createElement(uuiComponents.Text, { cx: props.indent && css$
|
|
2117
|
+
React__namespace.default.createElement(uuiComponents.Text, { cx: props.indent && css$19.indent }, caption),
|
|
2113
2118
|
isIconAfter && (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
2114
2119
|
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
2115
2120
|
iconElement))));
|
|
2116
2121
|
};
|
|
2117
2122
|
const isAnchor = Boolean(link || href);
|
|
2118
|
-
const itemClassNames = uuiCore.cx(props.cx, css$
|
|
2119
|
-
return isAnchor ? (React__namespace.default.createElement(uuiComponents.Anchor, { cx: uuiCore.cx(css$
|
|
2123
|
+
const itemClassNames = uuiCore.cx(props.cx, css$19.itemRoot, isDisabled && uuiCore.uuiMod.disabled, isActive && uuiCore.uuiMod.active, isOpen && uuiCore.uuiMod.opened, (!isDisabled && onClick) && uuiCore.uuiMarkers.clickable);
|
|
2124
|
+
return isAnchor ? (React__namespace.default.createElement(uuiComponents.Anchor, { cx: uuiCore.cx(css$19.link, itemClassNames), link: link, href: href, rawProps: { role: 'menuitem', tabIndex: isDisabled ? -1 : 0 }, onClick: handleClick, isLinkActive: isActive, isDisabled: isDisabled, target: target }, getMenuButtonContent())) : (React__namespace.default.createElement("div", { tabIndex: isDisabled ? -1 : 0, role: "menuitem", onKeyDown: isDisabled ? null : handleOpenDropdown, className: itemClassNames, onClick: handleClick, ref: ref },
|
|
2120
2125
|
getMenuButtonContent(),
|
|
2121
2126
|
isSelected && (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
2122
2127
|
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
2123
|
-
React__namespace.default.createElement(uuiComponents.IconContainer, { icon: settings.dropdownMenu.icons.acceptIcon, cx: css$
|
|
2128
|
+
React__namespace.default.createElement(uuiComponents.IconContainer, { icon: settings.dropdownMenu.icons.acceptIcon, cx: css$19.selectedMark })))));
|
|
2124
2129
|
});
|
|
2125
2130
|
function DropdownMenuSplitter(props) {
|
|
2126
|
-
return (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$
|
|
2127
|
-
React__namespace.default.createElement("hr", { className: css$
|
|
2131
|
+
return (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$19.splitterRoot) },
|
|
2132
|
+
React__namespace.default.createElement("hr", { className: css$19.splitter })));
|
|
2128
2133
|
}
|
|
2129
2134
|
function DropdownMenuHeader(props) {
|
|
2130
|
-
return (React__namespace.default.createElement("div", { className: uuiCore.cx('uui-dropdown-menu-header', props.cx, css$
|
|
2131
|
-
React__namespace.default.createElement("span", { className: css$
|
|
2135
|
+
return (React__namespace.default.createElement("div", { className: uuiCore.cx('uui-dropdown-menu-header', props.cx, css$19.headerRoot) },
|
|
2136
|
+
React__namespace.default.createElement("span", { className: css$19.header }, props.caption)));
|
|
2132
2137
|
}
|
|
2133
2138
|
function DropdownSubMenu(props) {
|
|
2134
2139
|
const subMenuMiddleware = [
|
|
@@ -2143,7 +2148,7 @@ function DropdownSubMenu(props) {
|
|
|
2143
2148
|
}),
|
|
2144
2149
|
];
|
|
2145
2150
|
const isRtl = uuiCore.getDir() === 'rtl';
|
|
2146
|
-
return (React__namespace.default.createElement(uuiComponents.Dropdown, { openOnHover: props.openOnHover || true, closeOnMouseLeave: "boundary", openDelay: 400, closeDelay: 400, placement: isRtl ? 'left-start' : 'right-start', middleware: subMenuMiddleware, renderBody: (dropdownProps) => !props.isDisabled && (React__namespace.default.createElement(DropdownMenuBody, { closeOnKey: exports.IDropdownControlKeys.LEFT_ARROW, ...props, ...dropdownProps })), renderTarget: ({ toggleDropdownOpening, ...targetProps }) => (React__namespace.default.createElement(DropdownMenuButton, { cx: uuiCore.cx(isRtl ? css$
|
|
2151
|
+
return (React__namespace.default.createElement(uuiComponents.Dropdown, { openOnHover: props.openOnHover || true, closeOnMouseLeave: "boundary", openDelay: 400, closeDelay: 400, placement: isRtl ? 'left-start' : 'right-start', middleware: subMenuMiddleware, renderBody: (dropdownProps) => !props.isDisabled && (React__namespace.default.createElement(DropdownMenuBody, { closeOnKey: exports.IDropdownControlKeys.LEFT_ARROW, ...props, ...dropdownProps })), renderTarget: ({ toggleDropdownOpening, ...targetProps }) => (React__namespace.default.createElement(DropdownMenuButton, { cx: uuiCore.cx(isRtl ? css$19.submenuRootItemRtl : css$19.submenuRootItem), icon: settings.dropdownMenu.icons.dropdownIcon, iconPosition: "right", isDropdown: true, toggleDropdownOpening: toggleDropdownOpening, ...props, ...targetProps })) }));
|
|
2147
2152
|
}
|
|
2148
2153
|
function DropdownMenuSwitchButton(props) {
|
|
2149
2154
|
const context = React.useContext(uuiCore.UuiContext);
|
|
@@ -2159,29 +2164,29 @@ function DropdownMenuSwitchButton(props) {
|
|
|
2159
2164
|
onHandleValueChange(!isSelected);
|
|
2160
2165
|
}
|
|
2161
2166
|
};
|
|
2162
|
-
return (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$
|
|
2163
|
-
icon && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icon, cx: css$
|
|
2167
|
+
return (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$19.itemRoot, isDisabled && uuiCore.uuiMod.disabled, (!isDisabled || onValueChange) && uuiCore.uuiMarkers.clickable), onClick: () => onHandleValueChange(!isSelected), role: "menuitem", onKeyDown: handleKeySelect, tabIndex: isDisabled ? -1 : 0 },
|
|
2168
|
+
icon && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icon, cx: css$19.iconBefore }),
|
|
2164
2169
|
React__namespace.default.createElement(uuiComponents.Text, null, caption),
|
|
2165
2170
|
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
2166
2171
|
React__namespace.default.createElement(Switch, { value: isSelected, tabIndex: -1, onValueChange: onHandleValueChange })));
|
|
2167
2172
|
}
|
|
2168
2173
|
|
|
2169
|
-
var css$
|
|
2174
|
+
var css$18 = {"root":"Smkgw7","mode-block":"K-zqEM","modeBlock":"K-zqEM","mode-inline":"ca8Lhn","modeInline":"ca8Lhn","padding-0":"OXJ-iI","padding0":"OXJ-iI","padding-6":"_3QiAmD","padding6":"_3QiAmD","padding-12":"S2IS6q","padding12":"S2IS6q","padding-18":"_43VsVy","padding18":"_43VsVy"};
|
|
2170
2175
|
|
|
2171
2176
|
function applyAccordionMods(mods) {
|
|
2172
2177
|
return [
|
|
2173
|
-
css$
|
|
2174
|
-
css$
|
|
2175
|
-
mods.padding && css$
|
|
2178
|
+
css$18.root,
|
|
2179
|
+
css$18[`mode-${mods.mode || 'block'}`],
|
|
2180
|
+
mods.padding && css$18['padding-' + mods.padding],
|
|
2176
2181
|
];
|
|
2177
2182
|
}
|
|
2178
2183
|
const Accordion = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Accordion, applyAccordionMods, (mods) => ({
|
|
2179
2184
|
dropdownIcon: mods.dropdownIcon !== null && settings.accordion.icons.dropdownIcon,
|
|
2180
2185
|
}));
|
|
2181
2186
|
|
|
2182
|
-
var css$
|
|
2187
|
+
var css$17 = {"root":"Bb0cNr","align-items":"RUG07H","alignItems":"RUG07H","justify-content":"of19Mn","justifyContent":"of19Mn","border-top":"jTKQxS","borderTop":"jTKQxS","border-bottom":"_93XWek","borderBottom":"_93XWek","top-shadow":"X3Lzqv","topShadow":"X3Lzqv","padding":"oDhIbS","margin":"TggVlR","vPadding":"LUyMRi","column-gap":"tzvI-H","columnGap":"tzvI-H","row-gap":"v2TPYz","rowGap":"v2TPYz","spacing":"GDKene"};
|
|
2183
2188
|
|
|
2184
|
-
const FlexCell = /* @__PURE__ */uuiCore.withMods(uuiComponents.FlexCell, () => [css$
|
|
2189
|
+
const FlexCell = /* @__PURE__ */uuiCore.withMods(uuiComponents.FlexCell, () => [css$17.flexCell]);
|
|
2185
2190
|
|
|
2186
2191
|
const FlexRow = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
2187
2192
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2190,22 +2195,22 @@ const FlexRow = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
2190
2195
|
}
|
|
2191
2196
|
}
|
|
2192
2197
|
const classNames = uuiCore.cx([
|
|
2193
|
-
css$
|
|
2198
|
+
css$17.root,
|
|
2194
2199
|
'uui-flex-row',
|
|
2195
2200
|
props.onClick && uuiCore.uuiMarkers.clickable,
|
|
2196
2201
|
props.cx,
|
|
2197
2202
|
props.size !== null && 'uui-size-' + (props.size || settings.flexRow.sizes.default),
|
|
2198
|
-
props.alignItems && css$
|
|
2199
|
-
props.justifyContent && css$
|
|
2200
|
-
props.padding && css$
|
|
2201
|
-
props.vPadding && css$
|
|
2202
|
-
props.margin && css$
|
|
2203
|
-
props.topShadow && css$
|
|
2204
|
-
props.borderBottom && css$
|
|
2205
|
-
props.borderTop && css$
|
|
2206
|
-
props.columnGap && css$
|
|
2207
|
-
props.rowGap && css$
|
|
2208
|
-
props.spacing && css$
|
|
2203
|
+
props.alignItems && css$17.alignItems,
|
|
2204
|
+
props.justifyContent && css$17.justifyContent,
|
|
2205
|
+
props.padding && css$17.padding,
|
|
2206
|
+
props.vPadding && css$17.vPadding,
|
|
2207
|
+
props.margin && css$17.margin,
|
|
2208
|
+
props.topShadow && css$17.topShadow,
|
|
2209
|
+
props.borderBottom && css$17.borderBottom,
|
|
2210
|
+
props.borderTop && css$17.borderTop,
|
|
2211
|
+
props.columnGap && css$17.columnGap,
|
|
2212
|
+
props.rowGap && css$17.rowGap,
|
|
2213
|
+
props.spacing && css$17.spacing,
|
|
2209
2214
|
props.background && `uui-flex-row-bg-${props.background}`,
|
|
2210
2215
|
]);
|
|
2211
2216
|
let alignItemsValue = props.alignItems;
|
|
@@ -2231,22 +2236,22 @@ const FlexRow = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
2231
2236
|
} }, props.children));
|
|
2232
2237
|
});
|
|
2233
2238
|
|
|
2234
|
-
var css$
|
|
2239
|
+
var css$16 = {"root":"b4MALG","margin-24":"MeaDaG","margin24":"MeaDaG","padding-12":"ocyyUU","padding12":"ocyyUU","padding-24":"_4iLZ83","padding24":"_4iLZ83","shadow":"Qk4GUe","uui-surface-main":"aKcOAp","uuiSurfaceMain":"aKcOAp"};
|
|
2235
2240
|
|
|
2236
2241
|
const Panel = /* @__PURE__ */uuiCore.withMods(uuiComponents.VPanel, (props) => [
|
|
2237
2242
|
'uui-panel',
|
|
2238
|
-
css$
|
|
2239
|
-
props.shadow && css$
|
|
2240
|
-
props.margin && css$
|
|
2241
|
-
props.background && css$
|
|
2243
|
+
css$16.root,
|
|
2244
|
+
props.shadow && css$16.shadow,
|
|
2245
|
+
props.margin && css$16['margin-' + props.margin],
|
|
2246
|
+
props.background && css$16[`uui-${props.background}`],
|
|
2242
2247
|
]);
|
|
2243
2248
|
|
|
2244
|
-
var css$
|
|
2249
|
+
var css$15 = {"root":"enVw7n"};
|
|
2245
2250
|
|
|
2246
2251
|
function applyLabeledInputMods(mods) {
|
|
2247
2252
|
return [
|
|
2248
2253
|
'uui-labeled-input',
|
|
2249
|
-
css$
|
|
2254
|
+
css$15.root,
|
|
2250
2255
|
'uui-size-' + (mods.size || settings.labeledInput.sizes.default),
|
|
2251
2256
|
];
|
|
2252
2257
|
}
|
|
@@ -2258,7 +2263,7 @@ function applyLabeledInputProps(props) {
|
|
|
2258
2263
|
}
|
|
2259
2264
|
const LabeledInput = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.LabeledInput, applyLabeledInputMods, applyLabeledInputProps);
|
|
2260
2265
|
|
|
2261
|
-
var css$
|
|
2266
|
+
var css$14 = {"root":"LMv-XN"};
|
|
2262
2267
|
|
|
2263
2268
|
function RadioGroup(props) {
|
|
2264
2269
|
const direction = props.direction || 'vertical';
|
|
@@ -2267,26 +2272,22 @@ function RadioGroup(props) {
|
|
|
2267
2272
|
props.onValueChange(newVal);
|
|
2268
2273
|
}
|
|
2269
2274
|
};
|
|
2270
|
-
return (React__namespace.createElement("fieldset", { ref: props.forwardedRef, className: uuiCore.cx(css$
|
|
2275
|
+
return (React__namespace.createElement("fieldset", { ref: props.forwardedRef, className: uuiCore.cx(css$14.root, uuiCore.directionMode[direction], props.cx), onFocus: props.onFocus, onBlur: props.onBlur, ...props.rawProps }, props.items.map((i) => {
|
|
2271
2276
|
const { id, name, renderName, ...restItemProps } = i;
|
|
2272
2277
|
return (React__namespace.createElement(RadioInput, { name: props.name, renderLabel: i.renderName ? i.renderName : () => i.name, value: props.value === i.id, onValueChange: () => handleChange(i.id), isDisabled: props.isDisabled || i.isDisabled, isReadonly: props.isReadonly, isInvalid: props.isInvalid, isRequired: props.isRequired, key: i.id.toString(), size: props.size || i.size, ...restItemProps }));
|
|
2273
2278
|
})));
|
|
2274
2279
|
}
|
|
2275
2280
|
|
|
2276
|
-
var css$
|
|
2281
|
+
var css$13 = {"root":"Jrgzym"};
|
|
2277
2282
|
|
|
2278
2283
|
function applyScrollBarsMods() {
|
|
2279
2284
|
return [
|
|
2280
|
-
css$
|
|
2285
|
+
css$13.root, 'uui-scroll-bars', 'uui-shadow-top', 'uui-shadow-bottom',
|
|
2281
2286
|
];
|
|
2282
2287
|
}
|
|
2283
2288
|
const ScrollBars = /* @__PURE__ */uuiCore.withMods(uuiComponents.ScrollBars, applyScrollBarsMods);
|
|
2284
2289
|
|
|
2285
|
-
var css$
|
|
2286
|
-
|
|
2287
|
-
var css$12 = {"root":"_2PfsNy"};
|
|
2288
|
-
|
|
2289
|
-
const Blocker = /* @__PURE__ */uuiCore.withMods(uuiComponents.Blocker, () => [css$12.root], () => ({ renderSpinner: settings.blocker.renderSpinner }));
|
|
2290
|
+
var css$12 = {"scroll-container":"_04b4AF","scrollContainer":"_04b4AF","list-container":"j4QBN-","listContainer":"j4QBN-"};
|
|
2290
2291
|
|
|
2291
2292
|
const VirtualList = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
2292
2293
|
const { listContainerRef, offsetY, handleScroll, estimatedHeight, scrollContainerRef, } = uuiCore.useVirtualList({
|
|
@@ -2300,15 +2301,15 @@ const VirtualList = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
|
2300
2301
|
const scrollShadows = uuiCore.useScrollShadows({ root: scrollContainerRef.current });
|
|
2301
2302
|
const renderRows = () => props.renderRows?.({
|
|
2302
2303
|
listContainerRef, estimatedHeight, offsetY, scrollShadows,
|
|
2303
|
-
}) || (React__namespace.createElement("div", { className: css$
|
|
2304
|
+
}) || (React__namespace.createElement("div", { className: css$12.listContainer, style: { minHeight: `${estimatedHeight}px` } },
|
|
2304
2305
|
React__namespace.createElement("div", { ref: listContainerRef, role: props.role, style: { marginTop: offsetY } }, props.rows)));
|
|
2305
|
-
const renderView = ({ style }) => (React__namespace.createElement(VirtualListView, { isLoading: props.isLoading, style: style, rawProps: props.rawProps }));
|
|
2306
|
+
const renderView = ({ style }) => (React__namespace.createElement(VirtualListView, { isLoading: props.isLoading, style: style, rawProps: props.rawProps, renderBlocker: props.renderBlocker }));
|
|
2306
2307
|
const scrollBarsRef = React__namespace.useCallback((scrollbars) => {
|
|
2307
2308
|
if (!scrollbars?.container?.firstChild)
|
|
2308
2309
|
return;
|
|
2309
2310
|
scrollContainerRef.current = scrollbars.container.firstChild;
|
|
2310
2311
|
}, []);
|
|
2311
|
-
return (React__namespace.createElement(ScrollBars, { cx: uuiCore.cx(css$
|
|
2312
|
+
return (React__namespace.createElement(ScrollBars, { cx: uuiCore.cx(css$12.scrollContainer, props.cx, {
|
|
2312
2313
|
[uuiCore.uuiMarkers.scrolledLeft]: scrollShadows.horizontalLeft,
|
|
2313
2314
|
[uuiCore.uuiMarkers.scrolledRight]: scrollShadows.horizontalRight,
|
|
2314
2315
|
[uuiCore.uuiMarkers.scrolledTop]: scrollShadows.verticalTop,
|
|
@@ -2327,10 +2328,10 @@ const VirtualListView = /* @__PURE__ */React__namespace.forwardRef((props, ref)
|
|
|
2327
2328
|
marginRight: props.isLoading ? 0 : props.style.marginRight,
|
|
2328
2329
|
marginBottom: props.isLoading ? 0 : props.style.marginBottom,
|
|
2329
2330
|
}, ref: ref }, props.children),
|
|
2330
|
-
React__namespace.createElement(Blocker, { isEnabled: props.isLoading })));
|
|
2331
|
+
props.renderBlocker ? props.renderBlocker({ isLoading: props.isLoading }) : React__namespace.createElement(Blocker, { isEnabled: props.isLoading })));
|
|
2331
2332
|
});
|
|
2332
2333
|
|
|
2333
|
-
var css$11 = {"root":"
|
|
2334
|
+
var css$11 = {"root":"P6vhUh"};
|
|
2334
2335
|
|
|
2335
2336
|
function CheckboxGroup(props) {
|
|
2336
2337
|
const currentValue = props.value || [];
|
|
@@ -2352,7 +2353,7 @@ function CheckboxGroup(props) {
|
|
|
2352
2353
|
})));
|
|
2353
2354
|
}
|
|
2354
2355
|
|
|
2355
|
-
var css$10 = {"root":"
|
|
2356
|
+
var css$10 = {"root":"-RGUT-","modal-blocker":"cdfoAE","modalBlocker":"cdfoAE","animateModalBlocker":"LegIr6","modal":"IeWIz1","modal-footer":"CfJg8L","modalFooter":"CfJg8L","border-top":"Dj9L9d","borderTop":"Dj9L9d","modal-header":"e1D2TU","modalHeader":"e1D2TU","border-bottom":"SKzQtq","borderBottom":"SKzQtq"};
|
|
2356
2357
|
|
|
2357
2358
|
const ModalBlocker = /* @__PURE__ */uuiCore.withMods(uuiComponents.ModalBlocker, () => [css$10.modalBlocker]);
|
|
2358
2359
|
const ModalWindow = /* @__PURE__ */uuiCore.withMods(uuiComponents.ModalWindow, () => [css$10.root, css$10.modal], (props) => {
|
|
@@ -2543,7 +2544,7 @@ const TREE_SHAKEABLE_INIT = () => ({
|
|
|
2543
2544
|
});
|
|
2544
2545
|
const i18n = /* @__PURE__ */TREE_SHAKEABLE_INIT();
|
|
2545
2546
|
|
|
2546
|
-
var css$$ = {"root":"
|
|
2547
|
+
var css$$ = {"root":"o4J3JS","icon-wrapper":"GzWvii","iconWrapper":"GzWvii","action-wrapper":"oVNJhc","actionWrapper":"oVNJhc","close-icon":"vag5dL","closeIcon":"vag5dL","main-path":"PAKp2p","mainPath":"PAKp2p","content":"q-WDoD","close-wrapper":"MCvzcD","closeWrapper":"MCvzcD","clear-notifications":"daePwD","clearNotifications":"daePwD"};
|
|
2547
2548
|
|
|
2548
2549
|
const NotificationCard = /* @__PURE__ */React__namespace.default.forwardRef((props, ref) => {
|
|
2549
2550
|
const notificationCardNode = React__namespace.default.useRef(null);
|
|
@@ -2576,7 +2577,7 @@ function ClearNotification() {
|
|
|
2576
2577
|
React__namespace.default.createElement(LinkButton, { caption: i18n.notificationCard.closeAllNotificationsButton, onClick: () => uuiCtx.uuiNotifications.clearAll() })));
|
|
2577
2578
|
}
|
|
2578
2579
|
|
|
2579
|
-
var css$_ = {"footer":"
|
|
2580
|
+
var css$_ = {"footer":"sMt3Lh"};
|
|
2580
2581
|
|
|
2581
2582
|
class ConfirmationModal extends React__namespace.Component {
|
|
2582
2583
|
render() {
|
|
@@ -2618,7 +2619,7 @@ function useReliableForceUpdate() {
|
|
|
2618
2619
|
return red[1];
|
|
2619
2620
|
}
|
|
2620
2621
|
|
|
2621
|
-
var css$Z = {"root":"
|
|
2622
|
+
var css$Z = {"root":"-NVSOT","container":"_0ZqNg3"};
|
|
2622
2623
|
|
|
2623
2624
|
const defaultFormat = 'MMM D, YYYY';
|
|
2624
2625
|
const valueFormat = 'YYYY-MM-DD';
|
|
@@ -2637,7 +2638,7 @@ const defaultRangeValue = {
|
|
|
2637
2638
|
from: null,
|
|
2638
2639
|
to: null,
|
|
2639
2640
|
};
|
|
2640
|
-
const
|
|
2641
|
+
const getDisplayedMonth = (selectedDate, focus) => {
|
|
2641
2642
|
if (selectedDate.from && selectedDate.to && focus) {
|
|
2642
2643
|
return uuiDayjs.dayjs(selectedDate[focus]);
|
|
2643
2644
|
}
|
|
@@ -2746,6 +2747,13 @@ const getPrevYearsList = (currentDate) => {
|
|
|
2746
2747
|
const getNextYearsList = (currentDate) => {
|
|
2747
2748
|
return currentDate.add(16, 'year');
|
|
2748
2749
|
};
|
|
2750
|
+
const isValidAndInFilter = (dateValue, inputType, filter) => {
|
|
2751
|
+
if (!dateValue[inputType])
|
|
2752
|
+
return false;
|
|
2753
|
+
if (!isValidRange(dateValue))
|
|
2754
|
+
return false;
|
|
2755
|
+
return !(filter && filter(uuiDayjs.dayjs(dateValue[inputType])) === false);
|
|
2756
|
+
};
|
|
2749
2757
|
|
|
2750
2758
|
const uuiHeader = {
|
|
2751
2759
|
container: 'uui-datepicker-header-container',
|
|
@@ -2829,14 +2837,14 @@ function DatePickerHeader({ navIconLeft, navIconRight, value: { month, view }, o
|
|
|
2829
2837
|
React__namespace.createElement(Button, { icon: navIconRight || settings.datePicker.icons.body.nextIcon, color: "secondary", fill: "ghost", cx: uuiHeader.navIconRight, onClick: !isDisabled && (() => onRightNavigationArrow()), isDisabled: disableNext }))));
|
|
2830
2838
|
}
|
|
2831
2839
|
|
|
2832
|
-
var css$Y = {"root":"
|
|
2840
|
+
var css$Y = {"root":"_4vgg2Z"};
|
|
2833
2841
|
|
|
2834
2842
|
function applyDateSelectionMods() {
|
|
2835
2843
|
return [css$Y.root, `uui-size-${settings.datePicker.sizes.body}`];
|
|
2836
2844
|
}
|
|
2837
2845
|
const Calendar = /* @__PURE__ */uuiCore.withMods(uuiComponents.Calendar, applyDateSelectionMods);
|
|
2838
2846
|
|
|
2839
|
-
var css$X = {"root":"
|
|
2847
|
+
var css$X = {"root":"bbSvDK"};
|
|
2840
2848
|
|
|
2841
2849
|
const uuiDatePickerBody = {
|
|
2842
2850
|
wrapper: 'uui-datepicker-body-wrapper',
|
|
@@ -2957,7 +2965,7 @@ function DatePickerComponent(props, ref) {
|
|
|
2957
2965
|
}
|
|
2958
2966
|
const DatePicker = /* @__PURE__ */React__namespace.default.forwardRef(DatePickerComponent);
|
|
2959
2967
|
|
|
2960
|
-
var css$W = {"date-input":"
|
|
2968
|
+
var css$W = {"date-input":"GsiXsw","dateInput":"GsiXsw","root":"kiSAPW","separator":"GHS-RA"};
|
|
2961
2969
|
|
|
2962
2970
|
const RangeDatePickerInput = /* @__PURE__ */React.forwardRef(({ isDisabled, isInvalid, isReadonly, size, disableClear, rawProps, value, inFocus, format, onValueChange, onFocusInput, onBlurInput, onClick, getPlaceholder, filter, onKeyDown, preventEmptyFromDate, preventEmptyToDate, id, cx: classes, }, ref) => {
|
|
2963
2971
|
const [inputValue, setInputValue] = React.useState(toCustomDateRangeFormat(value, format));
|
|
@@ -2965,10 +2973,15 @@ const RangeDatePickerInput = /* @__PURE__ */React.forwardRef(({ isDisabled, isIn
|
|
|
2965
2973
|
setInputValue(toCustomDateRangeFormat(value, format));
|
|
2966
2974
|
}, [format, value, setInputValue]);
|
|
2967
2975
|
const onInputChange = (newValue, inputType) => {
|
|
2968
|
-
|
|
2976
|
+
const updatedInputValue = {
|
|
2969
2977
|
...inputValue,
|
|
2970
2978
|
[inputType]: newValue,
|
|
2971
|
-
}
|
|
2979
|
+
};
|
|
2980
|
+
setInputValue(updatedInputValue);
|
|
2981
|
+
const selectedDate = toValueDateRangeFormat(updatedInputValue, format);
|
|
2982
|
+
if (isValidAndInFilter(selectedDate, inputType, filter)) {
|
|
2983
|
+
onValueChange(selectedDate);
|
|
2984
|
+
}
|
|
2972
2985
|
};
|
|
2973
2986
|
const handleFocus = (event, inputType) => {
|
|
2974
2987
|
onFocusInput(event, inputType);
|
|
@@ -2980,20 +2993,20 @@ const RangeDatePickerInput = /* @__PURE__ */React.forwardRef(({ isDisabled, isIn
|
|
|
2980
2993
|
to: !preventEmptyToDate,
|
|
2981
2994
|
};
|
|
2982
2995
|
const selectedDate = toValueDateRangeFormat(inputValue, format);
|
|
2983
|
-
// If new value is null and input can't be empty, set the value to the last selected value
|
|
2996
|
+
// If the new value is null and the input can't be empty, set the value to the last selected value
|
|
2984
2997
|
if (selectedDate[inputType] === null && !canBeEmpty[inputType]) {
|
|
2985
2998
|
selectedDate[inputType] = value[inputType];
|
|
2986
2999
|
}
|
|
2987
|
-
|
|
2988
|
-
if (isValidRange(selectedDate) && !isDateDisabled) {
|
|
3000
|
+
if (isValidAndInFilter(selectedDate, inputType, filter)) {
|
|
2989
3001
|
setInputValue(toCustomDateRangeFormat(selectedDate, format));
|
|
2990
3002
|
onValueChange(selectedDate);
|
|
2991
3003
|
}
|
|
2992
3004
|
else {
|
|
3005
|
+
const newInputValue = !canBeEmpty[inputType] ? toCustomDateRangeFormat(value, format)[inputType] : null;
|
|
2993
3006
|
const newValue = !canBeEmpty[inputType] ? value[inputType] : null;
|
|
2994
3007
|
setInputValue({
|
|
2995
3008
|
...inputValue,
|
|
2996
|
-
[inputType]:
|
|
3009
|
+
[inputType]: newInputValue,
|
|
2997
3010
|
});
|
|
2998
3011
|
onValueChange({
|
|
2999
3012
|
...selectedDate,
|
|
@@ -3023,7 +3036,7 @@ const RangeDatePickerInput = /* @__PURE__ */React.forwardRef(({ isDisabled, isIn
|
|
|
3023
3036
|
React__namespace.default.createElement(TextInput, { cx: uuiCore.cx(css$W.dateInput, inFocus === 'to' && uuiCore.uuiMod.focus), placeholder: getPlaceholder ? getPlaceholder('to') : i18n.rangeDatePicker.pickerPlaceholderTo, size: size || settings.rangeDatePicker.sizes.default, value: inputValue.to || undefined, onCancel: clearAllowed ? onClear : undefined, onValueChange: (v) => onInputChange(v || '', 'to'), onFocus: (e) => handleFocus(e, 'to'), onBlur: (e) => handleBlur(e, 'to'), isInvalid: isInvalid, isDisabled: isDisabled, isReadonly: isReadonly, isDropdown: false, rawProps: rawProps?.to, onClick: onClick, onKeyDown: onInputKeyDown })));
|
|
3024
3037
|
});
|
|
3025
3038
|
|
|
3026
|
-
var css$V = {"root":"
|
|
3039
|
+
var css$V = {"root":"aG6aZL"};
|
|
3027
3040
|
|
|
3028
3041
|
const uuiPresets = {
|
|
3029
3042
|
container: 'uui-presets-container',
|
|
@@ -3043,7 +3056,7 @@ function CalendarPresets(props) {
|
|
|
3043
3056
|
getPresets(props.presets).map((item) => (React__namespace.createElement(LinkButton, { key: item.key, caption: item.name, onClick: () => props.onPresetSet(item), size: settings.rangeDatePicker.sizes.preset })))));
|
|
3044
3057
|
}
|
|
3045
3058
|
|
|
3046
|
-
var css$U = {"root":"
|
|
3059
|
+
var css$U = {"root":"tAAVkC","container":"qoqXZc","day-selection":"fU-vsF","daySelection":"fU-vsF","from-picker":"_6eHrp0","fromPicker":"_6eHrp0","to-picker":"wsrFIF","toPicker":"wsrFIF","bodes-wrapper":"HppESd","bodesWrapper":"HppESd","blocker":"_8sQ5J4"};
|
|
3047
3060
|
|
|
3048
3061
|
const uuiRangeDatePickerBody = {
|
|
3049
3062
|
inRange: 'uui-range-datepicker-in-range',
|
|
@@ -3122,10 +3135,10 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3122
3135
|
const { value: _value, filter } = props;
|
|
3123
3136
|
const { selectedDate: _selectedDate, inFocus, } = _value;
|
|
3124
3137
|
const selectedDate = _selectedDate || defaultRangeValue; // also handles null in comparison to default value
|
|
3125
|
-
const [activeMonth, setActiveMonth] = React.useState(inFocus);
|
|
3126
3138
|
const [view, setView] = React.useState('DAY_SELECTION');
|
|
3139
|
+
const [disabledPanel, setDisabledPanel] = React.useState(null);
|
|
3127
3140
|
const [month, setMonth] = React.useState(() => {
|
|
3128
|
-
return
|
|
3141
|
+
return getDisplayedMonth(selectedDate, inFocus);
|
|
3129
3142
|
});
|
|
3130
3143
|
const getRange = (newValue) => {
|
|
3131
3144
|
if (!filter || filter(uuiDayjs.dayjs(newValue))) {
|
|
@@ -3137,7 +3150,7 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3137
3150
|
}
|
|
3138
3151
|
}
|
|
3139
3152
|
};
|
|
3140
|
-
const onBodyValueChange = (v
|
|
3153
|
+
const onBodyValueChange = (v) => {
|
|
3141
3154
|
// selectedDate can be null, other params should always have values
|
|
3142
3155
|
const newRange = v ? getRange(v) : selectedDate;
|
|
3143
3156
|
let newInFocus = null;
|
|
@@ -3146,25 +3159,28 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3146
3159
|
if (inFocus === 'from' && fromChanged) {
|
|
3147
3160
|
newInFocus = 'to';
|
|
3148
3161
|
}
|
|
3149
|
-
else if (inFocus === 'to' && toChanged) {
|
|
3162
|
+
else if (inFocus === 'to' && toChanged && !fromChanged) { // for the case when we change the value "to" less than the value "from" and do not want to get stuck on the focus "from"
|
|
3150
3163
|
newInFocus = 'from';
|
|
3151
3164
|
}
|
|
3152
|
-
setActiveMonth(part);
|
|
3153
3165
|
props.onValueChange({
|
|
3154
3166
|
selectedDate: newRange ? newRange : selectedDate,
|
|
3155
3167
|
inFocus: newInFocus ?? inFocus,
|
|
3156
3168
|
});
|
|
3157
3169
|
};
|
|
3158
3170
|
const renderDay = (renderProps) => {
|
|
3159
|
-
|
|
3171
|
+
const { inRange, isFirst, isLast } = getDayState(renderProps.value, selectedDate);
|
|
3172
|
+
return (React__namespace.default.createElement(uuiComponents.Day, { ...renderProps, cx: getDayCX({ inRange, isFirst, isLast }), rawProps: {
|
|
3173
|
+
...renderProps.rawProps,
|
|
3174
|
+
'aria-selected': (isFirst || isLast || inRange) ? 'true' : undefined,
|
|
3175
|
+
} }));
|
|
3160
3176
|
};
|
|
3161
3177
|
const from = {
|
|
3162
3178
|
month,
|
|
3163
|
-
view:
|
|
3179
|
+
view: disabledPanel === 'right' ? view : 'DAY_SELECTION',
|
|
3164
3180
|
value: null,
|
|
3165
3181
|
};
|
|
3166
3182
|
const to = {
|
|
3167
|
-
view:
|
|
3183
|
+
view: disabledPanel === 'left' ? view : 'DAY_SELECTION',
|
|
3168
3184
|
month: month.add(1, 'month'),
|
|
3169
3185
|
value: null,
|
|
3170
3186
|
};
|
|
@@ -3174,6 +3190,7 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3174
3190
|
React__namespace.default.createElement(CalendarPresets, { onPresetSet: (presetVal) => {
|
|
3175
3191
|
// enable day if smth other were selected
|
|
3176
3192
|
setView('DAY_SELECTION');
|
|
3193
|
+
setDisabledPanel(null);
|
|
3177
3194
|
setMonth(uuiDayjs.dayjs(presetVal.from));
|
|
3178
3195
|
props.onValueChange({
|
|
3179
3196
|
inFocus: props.value.inFocus,
|
|
@@ -3184,25 +3201,44 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3184
3201
|
});
|
|
3185
3202
|
}, presets: presets })));
|
|
3186
3203
|
};
|
|
3187
|
-
|
|
3204
|
+
uuiCore.useLayoutEffectSafeForSsr(() => {
|
|
3205
|
+
const monthToSet = getDisplayedMonth(selectedDate, inFocus);
|
|
3206
|
+
// To avoid re-rendering the body if the current month being displayed is equal to or greater than 1
|
|
3207
|
+
const shouldNotIgnoreUpdate = !(uuiDayjs.dayjs(month).isSame(monthToSet, 'month') || uuiDayjs.dayjs(month).add(1, 'month').isSame(monthToSet, 'month'));
|
|
3208
|
+
if (shouldNotIgnoreUpdate) {
|
|
3209
|
+
setMonth(monthToSet);
|
|
3210
|
+
}
|
|
3211
|
+
}, [selectedDate]);
|
|
3212
|
+
return (React__namespace.default.createElement("div", { ref: ref, className: cx__default.default(css$U.root, uuiDatePickerBodyBase.container, props.cx), ...props.rawProps, "aria-multiselectable": "true" },
|
|
3188
3213
|
React__namespace.default.createElement(FlexRow, { cx: [view === 'DAY_SELECTION' && css$U.daySelection, css$U.container], alignItems: "top" },
|
|
3189
3214
|
React__namespace.default.createElement(FlexCell, { width: "auto" },
|
|
3190
3215
|
React__namespace.default.createElement(FlexRow, null,
|
|
3191
3216
|
React__namespace.default.createElement(FlexRow, { cx: css$U.bodesWrapper, alignItems: "top" },
|
|
3192
|
-
React__namespace.default.createElement(StatelessDatePickerBody, { key: "date-picker-body-left", cx: cx__default.default(css$U.fromPicker), ...from, onValueChange: (v) => onBodyValueChange(v
|
|
3217
|
+
React__namespace.default.createElement(StatelessDatePickerBody, { key: "date-picker-body-left", cx: cx__default.default(css$U.fromPicker), ...from, onValueChange: (v) => onBodyValueChange(v), onMonthChange: (m) => {
|
|
3193
3218
|
setMonth(m);
|
|
3194
|
-
}, onViewChange: (v) =>
|
|
3195
|
-
|
|
3219
|
+
}, onViewChange: (v) => {
|
|
3220
|
+
setView(v);
|
|
3221
|
+
setDisabledPanel(v !== 'DAY_SELECTION' ? 'right' : null);
|
|
3222
|
+
}, filter: props.filter, isHoliday: props.isHoliday, renderDay: props.renderDay || renderDay, isDisabled: disabledPanel === 'left' }),
|
|
3223
|
+
React__namespace.default.createElement(StatelessDatePickerBody, { key: "date-picker-body-right", cx: cx__default.default(css$U.toPicker), ...to, onValueChange: (v) => onBodyValueChange(v), onMonthChange: (m) => {
|
|
3196
3224
|
setMonth(m.subtract(1, 'month'));
|
|
3197
|
-
}, onViewChange: (v) =>
|
|
3225
|
+
}, onViewChange: (v) => {
|
|
3226
|
+
setView(v);
|
|
3227
|
+
setDisabledPanel(v !== 'DAY_SELECTION' ? 'left' : null);
|
|
3228
|
+
}, filter: props.filter, renderDay: props.renderDay || renderDay, isHoliday: props.isHoliday, isDisabled: disabledPanel === 'right' }),
|
|
3198
3229
|
view !== 'DAY_SELECTION' && (React__namespace.default.createElement("div", { style: {
|
|
3199
|
-
left:
|
|
3200
|
-
right:
|
|
3230
|
+
left: disabledPanel === 'right' ? '50%' : undefined,
|
|
3231
|
+
right: disabledPanel === 'left' ? '50%' : undefined,
|
|
3201
3232
|
}, className: css$U.blocker }))),
|
|
3202
3233
|
props.presets && renderPresets(props.presets)),
|
|
3203
3234
|
props.renderFooter && props.renderFooter()))));
|
|
3204
3235
|
}
|
|
3205
|
-
const getDayCX = (
|
|
3236
|
+
const getDayCX = ({ inRange, isFirst, isLast }) => {
|
|
3237
|
+
return [
|
|
3238
|
+
cx__default.default(inRange && uuiRangeDatePickerBody.inRange, isFirst && uuiRangeDatePickerBody.firstDayInRangeWrapper, !inRange && isFirst && uuiRangeDatePickerBody.lastDayInRangeWrapper, isLast && uuiRangeDatePickerBody.lastDayInRangeWrapper, !inRange && isLast && uuiRangeDatePickerBody.firstDayInRangeWrapper, (isFirst || isLast) && uuiComponents.uuiDaySelection.selectedDay),
|
|
3239
|
+
];
|
|
3240
|
+
};
|
|
3241
|
+
const getDayState = (day, selectedDate) => {
|
|
3206
3242
|
const dayValue = day.valueOf();
|
|
3207
3243
|
const fromValue = selectedDate?.from
|
|
3208
3244
|
? uuiDayjs.dayjs(selectedDate.from).valueOf() : null;
|
|
@@ -3215,10 +3251,14 @@ const getDayCX = (day, selectedDate) => {
|
|
|
3215
3251
|
&& fromValue !== toValue;
|
|
3216
3252
|
const isFirst = dayValue === fromValue;
|
|
3217
3253
|
const isLast = dayValue === toValue;
|
|
3218
|
-
return
|
|
3254
|
+
return {
|
|
3255
|
+
inRange,
|
|
3256
|
+
isFirst,
|
|
3257
|
+
isLast,
|
|
3258
|
+
};
|
|
3219
3259
|
};
|
|
3220
3260
|
|
|
3221
|
-
var css$T = {"dropdown-container":"
|
|
3261
|
+
var css$T = {"dropdown-container":"uBQN9c","dropdownContainer":"uBQN9c"};
|
|
3222
3262
|
|
|
3223
3263
|
function RangeDatePickerComponent(props, ref) {
|
|
3224
3264
|
const { value: _value, format = defaultFormat, size = settings.rangeDatePicker.sizes.default } = props;
|
|
@@ -3286,7 +3326,7 @@ function RangeDatePickerComponent(props, ref) {
|
|
|
3286
3326
|
}
|
|
3287
3327
|
const RangeDatePicker = /* @__PURE__ */React__namespace.default.forwardRef(RangeDatePickerComponent);
|
|
3288
3328
|
|
|
3289
|
-
var css$S = {"root":"
|
|
3329
|
+
var css$S = {"root":"M0Ddpv","blocker":"HYg-ro","marker":"NsUHDF","top":"_6szlT4","bottom":"sjy1OE","left":"T--QNm","right":"ErrPbF","inside":"BReapR"};
|
|
3290
3330
|
|
|
3291
3331
|
function DropMarker(props) {
|
|
3292
3332
|
return props.isDndInProgress
|
|
@@ -3303,15 +3343,15 @@ function DropMarker(props) {
|
|
|
3303
3343
|
|
|
3304
3344
|
const RichTextView = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.RichTextView, (mods) => ['uui-typography', `uui-typography-size-${mods.size || settings.richTextView.sizes.default}`]);
|
|
3305
3345
|
|
|
3306
|
-
var css$R = {"search-wrapper":"
|
|
3346
|
+
var css$R = {"search-wrapper":"zLkJ7-","searchWrapper":"zLkJ7-","no-data":"_7022y7","noData":"_7022y7"};
|
|
3307
3347
|
|
|
3308
|
-
var css$Q = {"picker-row":"
|
|
3348
|
+
var css$Q = {"picker-row":"AbMukL","pickerRow":"AbMukL","align-widgets-top":"iYtV-i","alignWidgetsTop":"iYtV-i","row-content":"XYYJu-","rowContent":"XYYJu-","align-widgets-center":"np-G7P","alignWidgetsCenter":"np-G7P","icon-container":"FEfGii","iconContainer":"FEfGii","content-wrapper":"MNc2X6","contentWrapper":"MNc2X6","icon-wrapper":"gaG0l-","iconWrapper":"gaG0l-","icon-default":"OT3k40","iconDefault":"OT3k40","selected-mark":"-abbcb","selectedMark":"-abbcb"};
|
|
3309
3349
|
|
|
3310
|
-
var css$P = {"root":"
|
|
3350
|
+
var css$P = {"root":"pKMwAQ"};
|
|
3311
3351
|
|
|
3312
3352
|
const AvatarStack = /* @__PURE__ */uuiCore.withMods(uuiComponents.AvatarStack, () => [css$P.root]);
|
|
3313
3353
|
|
|
3314
|
-
var css$O = {"root":"
|
|
3354
|
+
var css$O = {"root":"GTWyHr"};
|
|
3315
3355
|
|
|
3316
3356
|
const DEFAULT_FILL = 'solid';
|
|
3317
3357
|
function applyBadgeMods(mods) {
|
|
@@ -3339,7 +3379,7 @@ const Badge = /* @__PURE__ */React__namespace.default.forwardRef((props, ref) =>
|
|
|
3339
3379
|
props.isDropdown && (React__namespace.default.createElement(uuiComponents.IconContainer, { icon: DropdownIcon, flipY: props.isOpen }))));
|
|
3340
3380
|
});
|
|
3341
3381
|
|
|
3342
|
-
var css$N = {"root":"
|
|
3382
|
+
var css$N = {"root":"fICQyy"};
|
|
3343
3383
|
|
|
3344
3384
|
function applyTagMods(props) {
|
|
3345
3385
|
return [
|
|
@@ -3367,7 +3407,7 @@ const Tag = /* @__PURE__ */React__namespace.default.forwardRef((props, ref) => {
|
|
|
3367
3407
|
props.onClear && !props.isDisabled && (React__namespace.default.createElement(uuiComponents.IconContainer, { cx: uuiCore.uuiMarkers.clickable, icon: ClearIcon, onClick: props.onClear }))));
|
|
3368
3408
|
});
|
|
3369
3409
|
|
|
3370
|
-
var css$M = {"root":"
|
|
3410
|
+
var css$M = {"root":"syAz-F","page":"Z6AZYc","spacer":"_4uT9Qr","mode-ghost":"tYmAfG","modeGhost":"tYmAfG"};
|
|
3371
3411
|
|
|
3372
3412
|
function Paginator(props) {
|
|
3373
3413
|
const renderPaginator = (params) => (React__namespace.default.createElement("nav", { role: "navigation", className: cx__default.default(css$M.root, 'uui-paginator', `uui-size-${props.size || settings.paginator.sizes.default}`), ...params.rawProps },
|
|
@@ -3384,14 +3424,14 @@ function Paginator(props) {
|
|
|
3384
3424
|
return React__namespace.default.createElement(uuiComponents.Paginator, { ...props, render: renderPaginator });
|
|
3385
3425
|
}
|
|
3386
3426
|
|
|
3387
|
-
var css$L = {"root":"
|
|
3427
|
+
var css$L = {"root":"_3ntsOj","progress-bar":"WuKIZ1","progressBar":"WuKIZ1","progressBar-indeterminate":"cj1mnj","progressBarIndeterminate":"cj1mnj","size-12":"iFV517","size12":"iFV517","size-18":"jeZs0g","size18":"jeZs0g","size-24":"orXw0A","size24":"orXw0A"};
|
|
3388
3428
|
|
|
3389
3429
|
const IndeterminateBar = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
3390
3430
|
return (React__namespace.createElement("div", { ref: ref, className: cx__default.default('uui-indeterminate_bar', props.cx, css$L.root, css$L[`size-${props.size || 12}`]) },
|
|
3391
3431
|
React__namespace.createElement("div", { className: cx__default.default(css$L.progressBar) })));
|
|
3392
3432
|
});
|
|
3393
3433
|
|
|
3394
|
-
var css$K = {"root":"
|
|
3434
|
+
var css$K = {"root":"J-9CIA","striped":"wbPol5","animate-stripes":"_-8Hhhq","animateStripes":"_-8Hhhq","size-12":"UzL78T","size12":"UzL78T","size-18":"ZKMfFn","size18":"ZKMfFn","size-24":"nMvE1Z","size24":"nMvE1Z"};
|
|
3395
3435
|
|
|
3396
3436
|
const DEFAULT_SIZE = '12';
|
|
3397
3437
|
function applyProgressBarMods(mods) {
|
|
@@ -3406,14 +3446,14 @@ const ProgressBar = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Pro
|
|
|
3406
3446
|
hideLabel: props.hideLabel || props.striped,
|
|
3407
3447
|
}));
|
|
3408
3448
|
|
|
3409
|
-
var css$J = {"root":"
|
|
3449
|
+
var css$J = {"root":"QpCsO4"};
|
|
3410
3450
|
|
|
3411
3451
|
const IndicatorBar = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
3412
3452
|
const { progress } = props;
|
|
3413
3453
|
return progress || progress === 0 ? (React__namespace.createElement(ProgressBar, { ref: ref, progress: progress, cx: cx__default.default(css$J.root, props.cx), hideLabel: true })) : (React__namespace.createElement(IndeterminateBar, { ref: ref, cx: cx__default.default(css$J.root, props.cx) }));
|
|
3414
3454
|
});
|
|
3415
3455
|
|
|
3416
|
-
var css$I = {"root":"
|
|
3456
|
+
var css$I = {"root":"k0MxET"};
|
|
3417
3457
|
|
|
3418
3458
|
const StatusIndicator = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
3419
3459
|
return (React__namespace.default.createElement("div", { ref: ref, className: cx__default.default([
|
|
@@ -3428,7 +3468,7 @@ const StatusIndicator = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
3428
3468
|
React__namespace.default.createElement("p", { className: "uui-status_indicator-caption" }, props.caption)));
|
|
3429
3469
|
});
|
|
3430
3470
|
|
|
3431
|
-
var css$H = {"drag-handle":"
|
|
3471
|
+
var css$H = {"drag-handle-wrapper":"cXRZfe","dragHandleWrapper":"cXRZfe","with-indent":"_2nvwIJ","withIndent":"_2nvwIJ","drag-handle":"-qdXtz","dragHandle":"-qdXtz","icon-container":"dcKp0w","iconContainer":"dcKp0w"};
|
|
3432
3472
|
|
|
3433
3473
|
function DataRowAddons(props) {
|
|
3434
3474
|
const row = props.rowProps;
|
|
@@ -3439,7 +3479,8 @@ function DataRowAddons(props) {
|
|
|
3439
3479
|
return settings.dataTable.sizes.body.indentWidthMap[props.size || settings.dataTable.sizes.body.row];
|
|
3440
3480
|
};
|
|
3441
3481
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
3442
|
-
row.dnd?.srcData && React__namespace.default.createElement(
|
|
3482
|
+
row.dnd?.srcData && (React__namespace.default.createElement("div", { key: "dh", className: cx__default.default(css$H.dragHandleWrapper, row.indent > 0 && css$H.withIndent), style: { width: row.indent > 0 ? (getIndent() + getWidth()) : 0 }, ...props.eventHandlers },
|
|
3483
|
+
React__namespace.default.createElement(uuiComponents.DragHandle, { cx: css$H.dragHandle }))),
|
|
3443
3484
|
row?.checkbox?.isVisible && (React__namespace.default.createElement(Checkbox, { key: "cb", cx: "uui-dr_addons-checkbox", tabIndex: props.tabIndex, size: settings.dataTable.sizes.body.checkboxMap[props.size], value: row.isChecked, indeterminate: !row.isChecked && row.isChildrenChecked, onValueChange: () => row.onCheck?.(row), isDisabled: row.checkbox.isDisabled, isInvalid: row.checkbox.isInvalid })),
|
|
3444
3485
|
row.indent > 0 && (React__namespace.default.createElement("div", { key: "fold", className: cx__default.default('uui-dr_addons-indent', `uui-size-${props.size || settings.dataTable.sizes.body.row}`), style: { marginInlineStart: getIndent(), width: getWidth() } }, row.isFoldable && (React__namespace.default.createElement(uuiComponents.IconContainer, { rawProps: {
|
|
3445
3486
|
'aria-label': row.isFolded ? 'Unfold' : 'Fold',
|
|
@@ -3514,7 +3555,7 @@ const getHighlightedSearchMatches = (str, search) => {
|
|
|
3514
3555
|
return getDecoratedText(str, ranges);
|
|
3515
3556
|
};
|
|
3516
3557
|
|
|
3517
|
-
var css$G = {"root":"
|
|
3558
|
+
var css$G = {"root":"_-01Pr-","column-gap":"_0UleJC","columnGap":"_0UleJC","title":"TObxj2","subtitle":"aUw96Y","disabled":"zJpgJ7","multiline":"CMtVMR"};
|
|
3518
3559
|
|
|
3519
3560
|
function PickerItem(props) {
|
|
3520
3561
|
const { highlightSearchMatches = true, size, avatarUrl, isLoading, isDisabled, icon, } = props;
|
|
@@ -3537,6 +3578,9 @@ function getAvatarSize(size, isMultiline) {
|
|
|
3537
3578
|
|
|
3538
3579
|
function DataPickerRow(props) {
|
|
3539
3580
|
const rowNode = React__namespace.useRef(null);
|
|
3581
|
+
const handleMouseEnter = React.useCallback(() => {
|
|
3582
|
+
props.onFocus && props.onFocus(props.index);
|
|
3583
|
+
}, [props.onFocus, props.index]);
|
|
3540
3584
|
React__namespace.useEffect(() => {
|
|
3541
3585
|
if (props.onFocus) {
|
|
3542
3586
|
rowNode.current?.addEventListener('mouseenter', handleMouseEnter);
|
|
@@ -3544,10 +3588,7 @@ function DataPickerRow(props) {
|
|
|
3544
3588
|
return () => {
|
|
3545
3589
|
rowNode.current?.removeEventListener('mouseenter', handleMouseEnter);
|
|
3546
3590
|
};
|
|
3547
|
-
}, [props.onFocus]);
|
|
3548
|
-
const handleMouseEnter = () => {
|
|
3549
|
-
props.onFocus && props.onFocus(props.index);
|
|
3550
|
-
};
|
|
3591
|
+
}, [props.onFocus, handleMouseEnter]);
|
|
3551
3592
|
const getSubtitle = ({ path }) => {
|
|
3552
3593
|
if (!props.dataSourceState?.search)
|
|
3553
3594
|
return;
|
|
@@ -3659,8 +3700,9 @@ function DataPickerBody({ highlightSearchMatches = true, ...props }) {
|
|
|
3659
3700
|
? renderEmpty() : (React__namespace.default.createElement(VirtualList, { value: props.value, onValueChange: props.onValueChange, rows: renderedDataRows, rawProps: {
|
|
3660
3701
|
'aria-multiselectable': props.selectionMode === 'multi' ? true : null,
|
|
3661
3702
|
'aria-orientation': 'vertical',
|
|
3703
|
+
tabIndex: -1,
|
|
3662
3704
|
...props.rawProps,
|
|
3663
|
-
}, rowsCount: props.rowsCount, isLoading: props.isReloading })))));
|
|
3705
|
+
}, rowsCount: props.rowsCount, isLoading: props.isReloading, renderBlocker: settings.pickerInput.renderBlocker })))));
|
|
3664
3706
|
}
|
|
3665
3707
|
|
|
3666
3708
|
function DataPickerFooterImpl(props) {
|
|
@@ -3687,7 +3729,7 @@ function DataPickerFooterImpl(props) {
|
|
|
3687
3729
|
}
|
|
3688
3730
|
const DataPickerFooter = /* @__PURE__ */React__namespace.default.memo(DataPickerFooterImpl);
|
|
3689
3731
|
|
|
3690
|
-
var css$F = {"header":"
|
|
3732
|
+
var css$F = {"header":"jPZdqS","title":"al4-Uc","close":"nkM7P1"};
|
|
3691
3733
|
|
|
3692
3734
|
const DataPickerMobileHeaderImpl = (props) => {
|
|
3693
3735
|
const title = props.title && typeof props.title === 'string' ? props.title.charAt(0).toUpperCase() + props.title.slice(1) : '';
|
|
@@ -3697,7 +3739,7 @@ const DataPickerMobileHeaderImpl = (props) => {
|
|
|
3697
3739
|
};
|
|
3698
3740
|
const DataPickerMobileHeader = /* @__PURE__ */React__namespace.default.memo(DataPickerMobileHeaderImpl);
|
|
3699
3741
|
|
|
3700
|
-
var css$E = {"done":"
|
|
3742
|
+
var css$E = {"done":"pNgBB-","container":"eTofk2"};
|
|
3701
3743
|
|
|
3702
3744
|
const PickerBodyMobileView = (props) => {
|
|
3703
3745
|
const isMobileView = uuiCore.isMobile();
|
|
@@ -3709,7 +3751,7 @@ const PickerBodyMobileView = (props) => {
|
|
|
3709
3751
|
isMobileView && (React__namespace.default.createElement(LinkButton, { caption: i18n.pickerInput.doneButton, onClick: () => props.onClose?.(), cx: css$E.done, size: settings.pickerInput.sizes.body.mobileFooterLinkButton }))));
|
|
3710
3752
|
};
|
|
3711
3753
|
|
|
3712
|
-
var css$D = {"sub-header-wrapper":"
|
|
3754
|
+
var css$D = {"sub-header-wrapper":"XNwoaN","subHeaderWrapper":"XNwoaN","switch":"creXF9","no-found-modal-container":"LP28fr","noFoundModalContainer":"LP28fr","no-found-modal-container-icon":"_5opuMC","noFoundModalContainerIcon":"_5opuMC","no-found-modal-container-text":"YvKrki","noFoundModalContainerText":"YvKrki","body":"ydBJYo"};
|
|
3713
3755
|
|
|
3714
3756
|
function PickerModal(props) {
|
|
3715
3757
|
const { view, selection, dataSourceStateLens, dataSourceState, getName, clearSelection, getRows, getListProps, getFooterProps, isSingleSelect, handleDataSourceValueChange, } = uuiComponents.usePickerModal(props);
|
|
@@ -3733,6 +3775,7 @@ function PickerModal(props) {
|
|
|
3733
3775
|
React__namespace.default.createElement(Text, { cx: css$D.noFoundModalContainerText, fontSize: "12", lineHeight: "18", color: "primary" }, i18n.dataPickerBody.noRecordsSubTitle)));
|
|
3734
3776
|
};
|
|
3735
3777
|
const dataRows = getRows();
|
|
3778
|
+
const isSearching = dataSourceState.search && dataSourceState.search.length > 0;
|
|
3736
3779
|
return (React__namespace.default.createElement(ModalBlocker, { ...props },
|
|
3737
3780
|
React__namespace.default.createElement(ModalWindow, { width: 600, height: 700, cx: css$D.body },
|
|
3738
3781
|
React__namespace.default.createElement(ModalHeader, { title: props.caption || i18n.pickerModal.headerTitle, onClose: () => props.abort() }),
|
|
@@ -3745,13 +3788,13 @@ function PickerModal(props) {
|
|
|
3745
3788
|
rows: dataRows,
|
|
3746
3789
|
searchPosition: 'body',
|
|
3747
3790
|
}, e), autoFocus: true, placeholder: i18n.pickerModal.searchPlaceholder, rawProps: { dir: 'auto' } })),
|
|
3748
|
-
!isSingleSelect() && (React__namespace.default.createElement(Switch, { cx: css$D.switch, size: settings.pickerInput.sizes.body.footerSwitchMap[settings.pickerInput.sizes.body.row], ...getFooterProps().showSelected, isDisabled: view.getSelectedRowsCount() < 1, label: "Show only selected" })),
|
|
3791
|
+
!isSingleSelect() && (React__namespace.default.createElement(Switch, { cx: css$D.switch, size: settings.pickerInput.sizes.body.footerSwitchMap[settings.pickerInput.sizes.body.row], ...getFooterProps().showSelected, isDisabled: isSearching || view.getSelectedRowsCount() < 1, label: "Show only selected" })),
|
|
3749
3792
|
props.renderFilter && React__namespace.default.createElement(FlexCell, { grow: 2 }, props.renderFilter(dataSourceStateLens.prop('filter').toProps()))),
|
|
3750
3793
|
React__namespace.default.createElement(DataPickerBody, { ...getListProps(), value: dataSourceState, onValueChange: handleDataSourceValueChange, showSearch: false, getName: getName, rows: dataRows, renderRow: renderRow, renderEmpty: renderNotFound, size: settings.pickerInput.sizes.body.row }),
|
|
3751
3794
|
React__namespace.default.createElement(ModalFooter, null, props.renderFooter ? props.renderFooter(getFooterProps()) : renderFooter()))));
|
|
3752
3795
|
}
|
|
3753
3796
|
|
|
3754
|
-
var css$C = {"tooltip":"
|
|
3797
|
+
var css$C = {"tooltip":"eoabab"};
|
|
3755
3798
|
|
|
3756
3799
|
const PickerTogglerTag = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
3757
3800
|
const tagProps = {
|
|
@@ -3770,7 +3813,7 @@ const PickerTogglerTag = /* @__PURE__ */React__namespace.forwardRef((props, ref)
|
|
|
3770
3813
|
}
|
|
3771
3814
|
});
|
|
3772
3815
|
|
|
3773
|
-
var css$B = {"root":"
|
|
3816
|
+
var css$B = {"root":"Rrzzff"};
|
|
3774
3817
|
|
|
3775
3818
|
const defaultMode = EditMode.FORM;
|
|
3776
3819
|
function applyPickerTogglerMods(mods) {
|
|
@@ -3852,7 +3895,7 @@ function PickerInputComponent(props, ref) {
|
|
|
3852
3895
|
}
|
|
3853
3896
|
const PickerInput = /* @__PURE__ */React__namespace.default.forwardRef(PickerInputComponent);
|
|
3854
3897
|
|
|
3855
|
-
var css$A = {"row":"
|
|
3898
|
+
var css$A = {"row":"l0lC-Q"};
|
|
3856
3899
|
|
|
3857
3900
|
function PickerListRow(props) {
|
|
3858
3901
|
let label;
|
|
@@ -3872,7 +3915,7 @@ function PickerListRow(props) {
|
|
|
3872
3915
|
return (React__namespace.default.createElement("div", { role: "option", "aria-selected": props.isSelectable ? props.isSelected : undefined, "aria-busy": props.isLoading, "aria-posinset": props.index + 1, ...(props.checkbox?.isVisible && { 'aria-checked': props.isChecked }), className: css$A.row }, component));
|
|
3873
3916
|
}
|
|
3874
3917
|
|
|
3875
|
-
var css$z = {"root":"
|
|
3918
|
+
var css$z = {"root":"Fsqj8t"};
|
|
3876
3919
|
|
|
3877
3920
|
function PickerList(props) {
|
|
3878
3921
|
const { context, view, onlySelectedView, getName, getEntityName, appendLastSelected, getSelectedIdsArray, buildRowsList, getMaxDefaultItems, getModalTogglerCaption, } = uuiComponents.usePickerList(props);
|
|
@@ -3907,7 +3950,7 @@ function PickerList(props) {
|
|
|
3907
3950
|
}, selectedRows)));
|
|
3908
3951
|
}
|
|
3909
3952
|
|
|
3910
|
-
var css$y = {"root":"
|
|
3953
|
+
var css$y = {"root":"_08YOU7","wrapper":"imbolo","align-widgets-top":"AqAHVp","alignWidgetsTop":"AqAHVp","align-widgets-center":"paIvaX","alignWidgetsCenter":"paIvaX"};
|
|
3911
3954
|
|
|
3912
3955
|
function DataTableCell(initialProps) {
|
|
3913
3956
|
const props = { ...initialProps };
|
|
@@ -3957,7 +4000,7 @@ function DataTableCell(initialProps) {
|
|
|
3957
4000
|
return React__namespace.createElement(uuiComponents.DataTableCell, { ...props });
|
|
3958
4001
|
}
|
|
3959
4002
|
|
|
3960
|
-
var css$x = {"root":"
|
|
4003
|
+
var css$x = {"root":"d2xvZ7"};
|
|
3961
4004
|
|
|
3962
4005
|
// Here we define a single instance of the renderCell function to make DataTableRow#shouldComponentUpdate work.
|
|
3963
4006
|
// As we need our mods to style the cell properly, we extract them from DataTableCellProps.rowProps, which is a hack, but it's reliable enough.
|
|
@@ -3973,7 +4016,7 @@ const DataTableRow = /* @__PURE__ */uuiCore.withMods(uuiComponents.DataTableRow,
|
|
|
3973
4016
|
];
|
|
3974
4017
|
}, () => propsMods);
|
|
3975
4018
|
|
|
3976
|
-
var css$w = {"sorting-panel-container":"
|
|
4019
|
+
var css$w = {"sorting-panel-container":"QeYb2b","sortingPanelContainer":"QeYb2b"};
|
|
3977
4020
|
|
|
3978
4021
|
const SortingPanelImpl = ({ sortDirection, onSort }) => {
|
|
3979
4022
|
const sortAsc = React.useCallback(() => onSort(sortDirection === 'asc' ? undefined : 'asc'), [onSort]);
|
|
@@ -3993,7 +4036,7 @@ const ColumnHeaderDropdownImpl = (props) => {
|
|
|
3993
4036
|
};
|
|
3994
4037
|
const ColumnHeaderDropdown = /* @__PURE__ */React__namespace.default.memo(ColumnHeaderDropdownImpl);
|
|
3995
4038
|
|
|
3996
|
-
var css$v = {"root":"
|
|
4039
|
+
var css$v = {"root":"IlbHTY","caption-wrapper":"_8OoFTY","captionWrapper":"_8OoFTY","sort-icon":"upJaPX","sortIcon":"upJaPX","dropdown-icon":"_35hlRE","dropdownIcon":"_35hlRE","infoIcon":"vkc8lC","align-right":"avrCkG","alignRight":"avrCkG","align-center":"_00OM2q","alignCenter":"_00OM2q","caption":"SEA4Js","truncate":"zg3K4k","upper-case":"X34Hdm","upperCase":"X34Hdm","checkbox":"yJjBU3","icon":"fJBrO9","fold-all-icon":"NApwch","foldAllIcon":"NApwch","cell-tooltip":"qEt01T","cellTooltip":"qEt01T","resizing-marker":"_0WCOZ8","resizingMarker":"_0WCOZ8","pinned-right":"lUYepH","pinnedRight":"lUYepH","draggable":"dHujBI","ghost":"_76ZaGA","is-dragged-out":"_0EJy1E","isDraggedOut":"_0EJy1E","dnd-marker-left":"sXLDHf","dndMarkerLeft":"sXLDHf","dnd-marker-right":"iwq1Q4","dndMarkerRight":"iwq1Q4","cell-tooltip-wrapper":"_2X6trX","cellTooltipWrapper":"_2X6trX","cell-tooltip-text":"fM193P","cellTooltipText":"fM193P","tooltip-caption":"rkYWXV","tooltipCaption":"rkYWXV","tooltip-info":"_2y-7L-","tooltipInfo":"_2y-7L-"};
|
|
3997
4040
|
|
|
3998
4041
|
class DataTableHeaderCell extends React__namespace.Component {
|
|
3999
4042
|
constructor() {
|
|
@@ -4087,7 +4130,7 @@ class DataTableHeaderCell extends React__namespace.Component {
|
|
|
4087
4130
|
}
|
|
4088
4131
|
}
|
|
4089
4132
|
|
|
4090
|
-
var css$u = {"root":"
|
|
4133
|
+
var css$u = {"root":"Zpk3gd","caption-wrapper":"EhJqll","captionWrapper":"EhJqll","align-center":"vbfV86","alignCenter":"vbfV86","caption":"XbmxsS","truncate":"Zii2FT","upper-case":"RofbWZ","upperCase":"RofbWZ","group-cell-tooltip":"MUH2i3","groupCellTooltip":"MUH2i3","group-cell-tooltip-wrapper":"FJnsff","groupCellTooltipWrapper":"FJnsff","group-cell-tooltip-text":"ge8v7K","groupCellTooltipText":"ge8v7K","tooltip-caption":"z0VPWA","tooltipCaption":"z0VPWA","tooltip-info":"_1n1KkI","tooltipInfo":"_1n1KkI"};
|
|
4091
4134
|
|
|
4092
4135
|
class DataTableHeaderGroupCell extends React__namespace.Component {
|
|
4093
4136
|
constructor() {
|
|
@@ -4127,7 +4170,7 @@ class DataTableHeaderGroupCell extends React__namespace.Component {
|
|
|
4127
4170
|
}
|
|
4128
4171
|
}
|
|
4129
4172
|
|
|
4130
|
-
var css$t = {"root":"
|
|
4173
|
+
var css$t = {"root":"dvZkYS"};
|
|
4131
4174
|
|
|
4132
4175
|
const DataTableHeaderRow = /* @__PURE__ */uuiCore.withMods(uuiComponents.DataTableHeaderRow, () => [css$t.root, 'uui-dt-vars'], (mods) => ({
|
|
4133
4176
|
renderCell: (props) => (React__namespace.createElement(DataTableHeaderCell, { ...props, size: mods.size, textCase: mods.textCase || 'normal', key: props.column.key, columnsGap: mods.columnsGap })),
|
|
@@ -4135,6 +4178,85 @@ const DataTableHeaderRow = /* @__PURE__ */uuiCore.withMods(uuiComponents.DataTab
|
|
|
4135
4178
|
renderConfigButton: () => (React__namespace.createElement(IconButton, { key: "configuration", onClick: mods.onConfigButtonClick, cx: ['config-icon', `uui-size-${settings.dataTable.sizes.header.iconMap[mods.size || settings.dataTable.sizes.header.row]}`], color: "neutral", icon: settings.dataTable.icons.header.configIcon })),
|
|
4136
4179
|
}));
|
|
4137
4180
|
|
|
4181
|
+
const normalizeFilterWithPredicates = (filter) => {
|
|
4182
|
+
if (!filter) {
|
|
4183
|
+
return {};
|
|
4184
|
+
}
|
|
4185
|
+
const result = filter;
|
|
4186
|
+
const keys = Object.keys(filter);
|
|
4187
|
+
for (let n = 0; n < keys.length; n++) {
|
|
4188
|
+
const key = keys[n];
|
|
4189
|
+
const filterValue = filter[key];
|
|
4190
|
+
if (filterValue && typeof filterValue === 'object') {
|
|
4191
|
+
if (Object.keys(filterValue).length === 0) {
|
|
4192
|
+
delete filter[key];
|
|
4193
|
+
continue;
|
|
4194
|
+
}
|
|
4195
|
+
if ('from' in filterValue && 'to' in filterValue) {
|
|
4196
|
+
continue;
|
|
4197
|
+
}
|
|
4198
|
+
if ('in' in filterValue && (!Array.isArray(filterValue.in) || !filterValue.in.length)) {
|
|
4199
|
+
delete filter[key];
|
|
4200
|
+
}
|
|
4201
|
+
if ('nin' in filterValue && (!Array.isArray(filterValue.nin) || !filterValue.nin.length)) {
|
|
4202
|
+
delete filter[key];
|
|
4203
|
+
}
|
|
4204
|
+
if ('inRange' in filterValue) {
|
|
4205
|
+
if (!filterValue.inRange || (!filterValue.inRange.from && !filterValue.inRange.to)) {
|
|
4206
|
+
delete filter[key];
|
|
4207
|
+
}
|
|
4208
|
+
}
|
|
4209
|
+
if ('notInRange' in filterValue) {
|
|
4210
|
+
if (!filterValue.notInRange || (!filterValue.notInRange.from && !filterValue.notInRange.to)) {
|
|
4211
|
+
delete filter[key];
|
|
4212
|
+
}
|
|
4213
|
+
}
|
|
4214
|
+
Object.keys(filterValue).forEach((predicate) => {
|
|
4215
|
+
if (filterValue[predicate] === null || filterValue[predicate] === undefined) {
|
|
4216
|
+
delete filter[key];
|
|
4217
|
+
}
|
|
4218
|
+
});
|
|
4219
|
+
}
|
|
4220
|
+
}
|
|
4221
|
+
return result;
|
|
4222
|
+
};
|
|
4223
|
+
const getValue = (predicate, value) => predicate ? value?.[predicate] : value;
|
|
4224
|
+
|
|
4225
|
+
function FilterPredicatePanel(props) {
|
|
4226
|
+
if (!props.predicates)
|
|
4227
|
+
return null;
|
|
4228
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
4229
|
+
React.useEffect(() => {
|
|
4230
|
+
// This effect needs when the filter dropdown was closed and opened again
|
|
4231
|
+
if (props.predicates && props.value && Object.keys(props.value).length > 0) {
|
|
4232
|
+
const predicateFromValue = Object.keys(props.value)[0];
|
|
4233
|
+
if (predicateFromValue !== props.predicate) {
|
|
4234
|
+
props.setPredicate(predicateFromValue);
|
|
4235
|
+
}
|
|
4236
|
+
}
|
|
4237
|
+
}, [props.value]);
|
|
4238
|
+
const changePredicate = (val) => {
|
|
4239
|
+
const isInRange = (p) => p === 'inRange' || p === 'notInRange';
|
|
4240
|
+
if (props.type === 'numeric') {
|
|
4241
|
+
let predicateValue = { [val]: getValue(props.predicate, props.value) };
|
|
4242
|
+
if (isInRange(val) && !isInRange(props.predicate)) {
|
|
4243
|
+
// from simple predicate -> to Range
|
|
4244
|
+
predicateValue = { [val]: { from: null, to: null } };
|
|
4245
|
+
}
|
|
4246
|
+
else if (!isInRange(val) && isInRange(props.predicate)) {
|
|
4247
|
+
// from Range -> to simple predicate
|
|
4248
|
+
predicateValue = { [val]: null };
|
|
4249
|
+
}
|
|
4250
|
+
props.onValueChange(predicateValue);
|
|
4251
|
+
}
|
|
4252
|
+
else {
|
|
4253
|
+
props.onValueChange({ [val]: getValue(props.predicate, props.value) });
|
|
4254
|
+
}
|
|
4255
|
+
props.setPredicate(val);
|
|
4256
|
+
};
|
|
4257
|
+
return (React__namespace.default.createElement(MultiSwitch, { items: props.predicates?.map((i) => ({ id: i.predicate, caption: i.name })), value: props.predicate, onValueChange: changePredicate, size: settings.filtersPanel.sizes.pickerBodyMultiSwitch }));
|
|
4258
|
+
}
|
|
4259
|
+
|
|
4138
4260
|
const UUI_FILTERS_PANEL_ADD_BUTTON = 'uui-filters-panel-add-button';
|
|
4139
4261
|
const UUI_FILTERS_PANEL_ADD_BUTTON_BODY = 'uui-filters-panel-add-button-body';
|
|
4140
4262
|
const UUI_FILTERS_PANEL_ITEM_BODY = 'uui-filters-panel-item-body';
|
|
@@ -4144,315 +4266,647 @@ const UUI_FILTERS_PANEL_ITEM_TOGGLER_SELECTION = 'uui-filters-panel-item-toggler
|
|
|
4144
4266
|
const UUI_FILTERS_PANEL_ITEM_TOGGLER_POSTFIX = 'uui-filters-panel-item-toggler-postfix';
|
|
4145
4267
|
const UUI_FILTERS_PANEL_BODY_FOOTER = 'uui-filters-panel-item-footer';
|
|
4146
4268
|
|
|
4147
|
-
var css$s = {"
|
|
4269
|
+
var css$s = {"body":"LSc8Q3","header":"Nuwfs-","title":"gySx8A","removeButton":"RyTt9M","with-search":"pnhTP-","withSearch":"pnhTP-"};
|
|
4148
4270
|
|
|
4149
|
-
|
|
4150
|
-
const
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
!uuiCore.isEventTargetInsideClickable(e) && props.onClick?.();
|
|
4155
|
-
};
|
|
4156
|
-
const onKeyDownHandler = (e) => {
|
|
4157
|
-
if (props.isDisabled)
|
|
4158
|
-
return;
|
|
4159
|
-
if (e.key === 'Enter' && !props.isOpen) {
|
|
4160
|
-
e.preventDefault();
|
|
4161
|
-
props.toggleDropdownOpening(true);
|
|
4271
|
+
function FilterColumnBody(props) {
|
|
4272
|
+
const [predicate, setPredicate] = React.useState(getDefaultPredicate(props.predicates, props.value));
|
|
4273
|
+
const onValueChange = (value) => {
|
|
4274
|
+
if (props.predicates) {
|
|
4275
|
+
props.onValueChange({ [predicate]: value });
|
|
4162
4276
|
}
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
props.toggleDropdownOpening(false);
|
|
4277
|
+
else {
|
|
4278
|
+
props.onValueChange(value);
|
|
4166
4279
|
}
|
|
4167
4280
|
};
|
|
4168
|
-
const
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
getSelectionText(),
|
|
4177
|
-
props.postfix && (React__namespace.createElement("div", { className: cx__default.default(css$s.postfix, UUI_FILTERS_PANEL_ITEM_TOGGLER_POSTFIX) }, props.postfix))))),
|
|
4178
|
-
!props.isDisabled && React__namespace.createElement(uuiComponents.IconContainer, { icon: settings.filtersPanel.icons.itemDropdownIcon, flipY: props.isOpen, cx: "uui-icon-dropdown" })));
|
|
4179
|
-
});
|
|
4180
|
-
|
|
4181
|
-
const pickerHeight = 300;
|
|
4182
|
-
function FilterPickerBody({ highlightSearchMatches = true, ...restProps }) {
|
|
4183
|
-
const props = { ...restProps, highlightSearchMatches };
|
|
4184
|
-
const [dsState, setDsState] = React.useState({
|
|
4185
|
-
focusedIndex: 0,
|
|
4186
|
-
topIndex: 0,
|
|
4187
|
-
visibleCount: 20,
|
|
4188
|
-
checked: [],
|
|
4189
|
-
});
|
|
4190
|
-
const { showSelected, setShowSelected } = uuiComponents.useShowSelected({ dataSourceState: dsState });
|
|
4191
|
-
const { view, getName, dataSourceState, getListProps, handleDataSourceValueChange, clearSelection, } = uuiComponents.usePickerApi({ ...props, dataSourceState: dsState, setDataSourceState: setDsState, showSelectedOnly: showSelected });
|
|
4192
|
-
const prevValue = uuiCore.usePrevious(props.value);
|
|
4193
|
-
const prevOpened = uuiCore.usePrevious(props.isOpen);
|
|
4194
|
-
React__namespace.useLayoutEffect(() => {
|
|
4195
|
-
if (prevOpened === props.isOpen && props.isOpen
|
|
4196
|
-
&& prevValue !== props.value && props.value !== props.emptyValue
|
|
4197
|
-
&& props.selectionMode === 'single') {
|
|
4198
|
-
props.onClose();
|
|
4199
|
-
}
|
|
4200
|
-
}, [props.value]);
|
|
4201
|
-
const renderFooter = () => {
|
|
4202
|
-
const footerProps = {
|
|
4203
|
-
view,
|
|
4204
|
-
showSelected: {
|
|
4205
|
-
value: showSelected,
|
|
4206
|
-
onValueChange: setShowSelected,
|
|
4207
|
-
},
|
|
4208
|
-
clearSelection,
|
|
4209
|
-
selectionMode: props.selectionMode,
|
|
4210
|
-
selection: props.value,
|
|
4211
|
-
search: dataSourceState.search,
|
|
4281
|
+
const renderHeader = () => {
|
|
4282
|
+
const panelProps = {
|
|
4283
|
+
predicates: props.predicates,
|
|
4284
|
+
predicate,
|
|
4285
|
+
type: props.type,
|
|
4286
|
+
onValueChange: props.onValueChange,
|
|
4287
|
+
value: props.value,
|
|
4288
|
+
setPredicate,
|
|
4212
4289
|
};
|
|
4213
|
-
return props.
|
|
4214
|
-
|
|
4215
|
-
: React__namespace.createElement(DataPickerFooter, { ...footerProps, cx: UUI_FILTERS_PANEL_BODY_FOOTER, size: settings.pickerInput.sizes.body.row });
|
|
4216
|
-
};
|
|
4217
|
-
const renderBody = () => {
|
|
4218
|
-
const rows = view.getVisibleRows();
|
|
4219
|
-
const maxHeight = uuiCore.isMobile() ? document.documentElement.clientHeight : props.maxBodyHeight || pickerHeight;
|
|
4220
|
-
const maxWidth = uuiCore.isMobile() ? undefined : 360;
|
|
4221
|
-
const onKeyDown = (e) => uuiComponents.handleDataSourceKeyboard({
|
|
4222
|
-
value: dataSourceState,
|
|
4223
|
-
onValueChange: handleDataSourceValueChange,
|
|
4224
|
-
listView: view,
|
|
4225
|
-
searchPosition: 'body',
|
|
4226
|
-
rows,
|
|
4227
|
-
}, e);
|
|
4228
|
-
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4229
|
-
React__namespace.createElement(DataPickerBody, { ...getListProps(), selectionMode: props.selectionMode, rows: rows, maxHeight: maxHeight, maxWidth: maxWidth, searchSize: settings.pickerInput.sizes.body.row, showSearch: props.showSearch ?? true, getName: getName, value: dataSourceState, onValueChange: handleDataSourceValueChange, renderRow: props.renderRow, onKeyDown: onKeyDown, minCharsToSearch: props.minCharsToSearch, searchDebounceDelay: props.searchDebounceDelay, rawProps: props.rawProps?.body, highlightSearchMatches: props.highlightSearchMatches, flattenSearchResults: view.getConfig().flattenSearchResults }),
|
|
4230
|
-
renderFooter()));
|
|
4290
|
+
return props.predicates?.length > 0 && (React__namespace.default.createElement("div", { className: css$s.header },
|
|
4291
|
+
React__namespace.default.createElement(FilterPredicatePanel, { ...panelProps })));
|
|
4231
4292
|
};
|
|
4232
|
-
return
|
|
4293
|
+
return (React__namespace.default.createElement(DropdownContainer, { style: { minWidth: '360px' }, cx: [css$s.body, UUI_FILTERS_PANEL_ITEM_BODY], ...props },
|
|
4294
|
+
renderHeader(),
|
|
4295
|
+
React__namespace.default.createElement(FilterItemBody, { ...props, selectedPredicate: predicate, value: getValue(predicate, props.value), onValueChange: onValueChange })));
|
|
4233
4296
|
}
|
|
4234
4297
|
|
|
4235
|
-
const
|
|
4236
|
-
function
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4298
|
+
const useColumnsWithFilters = (initialColumns, filters) => {
|
|
4299
|
+
const makeFilterRenderCallback = React.useCallback((key) => function (filterLens, dropdownProps) {
|
|
4300
|
+
const filter = filters?.find((f) => f.columnKey === key);
|
|
4301
|
+
if (!filter)
|
|
4302
|
+
return null;
|
|
4303
|
+
const props = filterLens
|
|
4304
|
+
.onChange((oldFilter, newFilter) => normalizeFilterWithPredicates(newFilter))
|
|
4305
|
+
.prop(filter.field)
|
|
4306
|
+
.toProps();
|
|
4307
|
+
return React__namespace.default.createElement(FilterColumnBody, { ...props, ...filter, ...dropdownProps });
|
|
4308
|
+
}, [filters]);
|
|
4309
|
+
const columns = React.useMemo(() => {
|
|
4310
|
+
if (filters) {
|
|
4311
|
+
const filterKeys = filters.map((f) => f.columnKey);
|
|
4312
|
+
const newColumns = (initialColumns.map((column) => {
|
|
4313
|
+
if (filterKeys.includes(column.key)) {
|
|
4314
|
+
return {
|
|
4315
|
+
...column,
|
|
4316
|
+
renderFilter: makeFilterRenderCallback(column.key),
|
|
4317
|
+
};
|
|
4318
|
+
}
|
|
4319
|
+
else {
|
|
4320
|
+
return column;
|
|
4321
|
+
}
|
|
4322
|
+
}));
|
|
4323
|
+
return newColumns;
|
|
4324
|
+
}
|
|
4325
|
+
return initialColumns;
|
|
4326
|
+
}, [filters, initialColumns]);
|
|
4327
|
+
return columns;
|
|
4328
|
+
};
|
|
4243
4329
|
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
const
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4330
|
+
var css$r = {"unpin-icon":"PgNXu7","unpinIcon":"PgNXu7","pin-toggler-icon":"gEjRnd","pinTogglerIcon":"gEjRnd"};
|
|
4331
|
+
|
|
4332
|
+
function PinIconButton(props) {
|
|
4333
|
+
const i18nLocal = i18n.tables.columnsConfigurationModal;
|
|
4334
|
+
const { onTogglePin, pinPosition, canUnpin, } = props;
|
|
4335
|
+
const isPinned = !!pinPosition;
|
|
4336
|
+
const isPinnedAlways = isPinned && !canUnpin;
|
|
4337
|
+
let pinUnpinNode;
|
|
4338
|
+
if (isPinned) {
|
|
4339
|
+
const unpinIcon = getUnpinIcon({ isPinnedAlways, pinPosition });
|
|
4340
|
+
const iconTooltip = isPinnedAlways ? i18nLocal.lockedColumnPinButton : i18nLocal.unPinColumnButton;
|
|
4341
|
+
const unpinClickHandler = isPinnedAlways ? undefined : () => onTogglePin(undefined);
|
|
4342
|
+
pinUnpinNode = (React__namespace.createElement(Tooltip, { content: iconTooltip, placement: "bottom", color: "inverted" },
|
|
4343
|
+
React__namespace.createElement(IconButton, { cx: uuiCore.cx(!isPinnedAlways && css$r.unpinIcon, css$r.pinTogglerIcon), icon: unpinIcon, onClick: unpinClickHandler, isDisabled: isPinnedAlways, color: "primary" })));
|
|
4344
|
+
}
|
|
4345
|
+
else {
|
|
4346
|
+
pinUnpinNode = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4347
|
+
React__namespace.createElement(Tooltip, { content: i18nLocal.pinColumnToTheLeftButton, placement: "bottom", color: "inverted" },
|
|
4348
|
+
React__namespace.createElement(IconButton, { cx: css$r.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon, onClick: () => onTogglePin('left'), isDisabled: isPinnedAlways })),
|
|
4349
|
+
React__namespace.createElement(Tooltip, { content: i18nLocal.pinColumnToTheRightButton, placement: "bottom", color: "inverted" },
|
|
4350
|
+
React__namespace.createElement(IconButton, { cx: css$r.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinRightIcon, onClick: () => onTogglePin('right'), isDisabled: isPinnedAlways }))));
|
|
4351
|
+
}
|
|
4352
|
+
return pinUnpinNode;
|
|
4353
|
+
}
|
|
4354
|
+
function getUnpinIcon(params) {
|
|
4355
|
+
const { isPinnedAlways, pinPosition } = params;
|
|
4356
|
+
if (isPinnedAlways) {
|
|
4357
|
+
return settings.dataTable.icons.columnsConfigurationModal.lockIcon;
|
|
4358
|
+
}
|
|
4359
|
+
switch (pinPosition) {
|
|
4360
|
+
case 'left': {
|
|
4361
|
+
return settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon;
|
|
4252
4362
|
}
|
|
4253
|
-
|
|
4254
|
-
|
|
4363
|
+
case 'right': {
|
|
4364
|
+
return settings.dataTable.icons.columnsConfigurationModal.pinRightIcon;
|
|
4255
4365
|
}
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
if (newValue && value !== newValue) {
|
|
4259
|
-
handleValueChange(newValue);
|
|
4366
|
+
default: {
|
|
4367
|
+
return;
|
|
4260
4368
|
}
|
|
4261
|
-
};
|
|
4262
|
-
function renderFooter() {
|
|
4263
|
-
const footerProps = {
|
|
4264
|
-
value,
|
|
4265
|
-
onValueChange: handleValueChange,
|
|
4266
|
-
};
|
|
4267
|
-
return props.renderFooter ? props.renderFooter(footerProps) : React__namespace.default.createElement(FilterDatePickerBodyFooter, { ...footerProps });
|
|
4268
4369
|
}
|
|
4269
|
-
return (React__namespace.default.createElement(React.Fragment, null,
|
|
4270
|
-
React__namespace.default.createElement(FlexRow, { borderBottom: true },
|
|
4271
|
-
React__namespace.default.createElement(DatePickerBody, { filter: props.filter, value: value, onValueChange: handleBodyChange, renderDay: props.renderDay, isHoliday: props.isHoliday, rawProps: props.rawProps?.body })),
|
|
4272
|
-
renderFooter()));
|
|
4273
4370
|
}
|
|
4274
4371
|
|
|
4275
|
-
|
|
4276
|
-
function FilterRangeDatePickerBodyFooter(props) {
|
|
4277
|
-
const shouldShowClearButton = (!props.preventEmptyToDate || !props.preventEmptyFromDate) && !props.disableClear;
|
|
4278
|
-
return (React__namespace.default.createElement(FlexCell, { alignSelf: "stretch" },
|
|
4279
|
-
React__namespace.default.createElement(FlexRow, { cx: UUI_FILTERS_PANEL_RDTP_FOOTER },
|
|
4280
|
-
React__namespace.default.createElement(RangeDatePickerInput, { size: settings.filtersPanel.sizes.rangeDatePickerInput, disableClear: props.disableClear, inFocus: props.inFocus, format: props.format, value: props.value, onValueChange: props.onValueChange, onFocusInput: (event, inputType) => {
|
|
4281
|
-
if (props.onFocus) {
|
|
4282
|
-
props.onFocus(event, inputType);
|
|
4283
|
-
}
|
|
4284
|
-
props.setInFocus(inputType);
|
|
4285
|
-
}, onBlurInput: props.onBlur, preventEmptyFromDate: props.preventEmptyFromDate, preventEmptyToDate: props.preventEmptyToDate }),
|
|
4286
|
-
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
4287
|
-
shouldShowClearButton && (React__namespace.default.createElement(LinkButton, { isDisabled: !props.value.from && !props.value.to, caption: i18n.filterToolbar.rangeDatePicker.clearCaption, onClick: props.onClear })))));
|
|
4288
|
-
}
|
|
4372
|
+
var css$q = {"row-wrapper":"HqrWXh","rowWrapper":"HqrWXh","pin-icon-button":"jEIrO4","pinIconButton":"jEIrO4","not-pinned":"ptsMZ-","notPinned":"ptsMZ-","checkbox":"LntbW2","drag-handle":"hhhojw","dragHandle":"hhhojw","dnd-disabled":"_39y8GS","dndDisabled":"_39y8GS"};
|
|
4289
4373
|
|
|
4290
|
-
function
|
|
4291
|
-
const {
|
|
4292
|
-
const
|
|
4293
|
-
const
|
|
4294
|
-
const
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4374
|
+
const ColumnRow = /* @__PURE__ */React__namespace.memo(function ColumnRow(props) {
|
|
4375
|
+
const { column } = props;
|
|
4376
|
+
const { toggleVisibility, togglePin, onCanAcceptDrop, onDrop, columnConfig, isDndAllowed, isPinnedAlways, } = column;
|
|
4377
|
+
const { isVisible, fix } = columnConfig;
|
|
4378
|
+
const pinPosition = fix || (isPinnedAlways ? 'left' : undefined);
|
|
4379
|
+
const isPinned = !!pinPosition;
|
|
4380
|
+
const data = { column, columnConfig };
|
|
4381
|
+
const renderContent = (dndActorParams) => {
|
|
4382
|
+
const wrapperClasses = uuiCore.cx(css$q.rowWrapper, !isPinned && css$q.notPinned, dndActorParams.isDragGhost && uuiCore.uuiDndState.dragGhost, 'uui-dt-columns-config-row');
|
|
4383
|
+
const { onTouchStart, onPointerDown, ...restEventHandlers } = dndActorParams.eventHandlers;
|
|
4384
|
+
const { ref, ...dndActorPropsWithoutRef } = dndActorParams;
|
|
4385
|
+
return (React__namespace.createElement(FlexRow, { size: settings.dataTable.sizes.columnsConfigurationModal.columnRow, cx: wrapperClasses, ref: dndActorParams.ref, rawProps: { ...restEventHandlers }, alignItems: "top" },
|
|
4386
|
+
React__namespace.createElement(uuiComponents.DragHandle, { dragHandleIcon: settings.dataTable.icons.columnsConfigurationModal.dragIndicator, rawProps: { onTouchStart, onPointerDown }, isDisabled: !isDndAllowed, cx: uuiCore.cx(css$q.dragHandle, !isDndAllowed && css$q.dndDisabled) }),
|
|
4387
|
+
React__namespace.createElement(Checkbox, { key: column.key, label: props.renderItem ? props.renderItem(props.column) : column.caption, value: isVisible, onValueChange: toggleVisibility, isReadonly: column.isAlwaysVisible || column.isLocked, cx: css$q.checkbox }),
|
|
4388
|
+
React__namespace.createElement(FlexRow, { size: null, cx: css$q.pinIconButton },
|
|
4389
|
+
React__namespace.createElement(PinIconButton, { pinPosition: pinPosition, canUnpin: !isPinnedAlways, onTogglePin: togglePin })),
|
|
4390
|
+
React__namespace.createElement(DropMarker, { ...dndActorPropsWithoutRef })));
|
|
4299
4391
|
};
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4392
|
+
return (React__namespace.createElement(uuiCore.DndActor, { key: column.key, srcData: isDndAllowed && data, dstData: data, canAcceptDrop: onCanAcceptDrop, onDrop: onDrop, render: renderContent }));
|
|
4393
|
+
});
|
|
4394
|
+
|
|
4395
|
+
var css$p = {"root":"XjlMmM","main-panel":"xP1rU-","mainPanel":"xP1rU-","group":"I-ME2R","group-title":"ZdYRzs","groupTitle":"ZdYRzs","group-items":"Qq8rn1","groupItems":"Qq8rn1","no-data":"ASJA-v","noData":"ASJA-v","no-data-title":"H2kxVC","noDataTitle":"H2kxVC","no-data-sub-title":"YMA3-F","noDataSubTitle":"YMA3-F","h-divider":"-jVy-h","hDivider":"-jVy-h","search-area":"VHak-q","searchArea":"VHak-q","subgroup-accordion":"i-2omt","subgroupAccordion":"i-2omt","subgroup":"PrFSBb","subgroup-title":"_354tAm","subgroupTitle":"_354tAm"};
|
|
4396
|
+
|
|
4397
|
+
const renderGroupTitle = (title, amount) => (React__namespace.createElement(FlexRow, { cx: css$p.group },
|
|
4398
|
+
React__namespace.createElement(Text, { size: "none", cx: css$p.groupTitle }, title),
|
|
4399
|
+
React__namespace.createElement(CountIndicator, { caption: amount, color: "neutral", size: settings.dataTable.sizes.columnsConfigurationModal.countIndicator }),
|
|
4400
|
+
React__namespace.createElement(uuiComponents.FlexSpacer, null)));
|
|
4401
|
+
function ColumnsConfigurationModal(props) {
|
|
4402
|
+
const i18n$1 = i18n.tables.columnsConfigurationModal;
|
|
4403
|
+
const { columns, columnsConfig: initialColumnsConfig, defaultConfig, ...modalProps } = props;
|
|
4404
|
+
const { groupedColumns, searchValue, columnsConfig, reset, checkAll, uncheckAll, setSearchValue, hasAnySelectedColumns, } = uuiComponents.useColumnsConfiguration({
|
|
4405
|
+
initialColumnsConfig,
|
|
4406
|
+
columns,
|
|
4407
|
+
defaultConfig,
|
|
4408
|
+
getSearchFields: props.getSearchFields,
|
|
4409
|
+
});
|
|
4410
|
+
const apply = React.useCallback(() => modalProps.success(columnsConfig), [columnsConfig, modalProps]);
|
|
4411
|
+
const close = React.useCallback(() => modalProps.abort(), [modalProps]);
|
|
4412
|
+
const isNoData = React.useMemo(() => Object.values(groupedColumns).every((v) => !v.length), [groupedColumns]);
|
|
4413
|
+
const renderVisible = () => {
|
|
4414
|
+
const amountPinnedLeft = groupedColumns.displayedPinnedLeft.length;
|
|
4415
|
+
const amountPinnedRight = groupedColumns.displayedPinnedRight.length;
|
|
4416
|
+
const amountUnPinned = groupedColumns.displayedUnpinned.length;
|
|
4417
|
+
const totalAmountOfVisibleColumns = amountPinnedLeft + amountUnPinned + amountPinnedRight;
|
|
4418
|
+
if (!totalAmountOfVisibleColumns) {
|
|
4419
|
+
return null;
|
|
4310
4420
|
}
|
|
4421
|
+
const hasDividerBelowPinnedLeft = !!(amountPinnedLeft && amountUnPinned);
|
|
4422
|
+
const hasDividerAbovePinnedRight = !!(amountPinnedRight && amountUnPinned);
|
|
4423
|
+
const divider = (React__namespace.createElement(FlexRow, { size: null, cx: css$p.hDivider }));
|
|
4424
|
+
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4425
|
+
renderGroupTitle(i18n$1.displayedSectionTitle, totalAmountOfVisibleColumns),
|
|
4426
|
+
React__namespace.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.pinnedToTheLeftSubgroupTitle, items: groupedColumns.displayedPinnedLeft }),
|
|
4427
|
+
hasDividerBelowPinnedLeft && divider,
|
|
4428
|
+
React__namespace.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.notPinnedSubgroupTitle, items: groupedColumns.displayedUnpinned }),
|
|
4429
|
+
hasDividerAbovePinnedRight && divider,
|
|
4430
|
+
React__namespace.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.pinnedToTheRightSubgroupTitle, items: groupedColumns.displayedPinnedRight })));
|
|
4311
4431
|
};
|
|
4312
|
-
const
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
&& inFocus === 'to'
|
|
4318
|
-
&& toChanged;
|
|
4319
|
-
if (closeBody) {
|
|
4320
|
-
onOpenChange(false);
|
|
4432
|
+
const renderHidden = () => {
|
|
4433
|
+
const items = groupedColumns.hidden;
|
|
4434
|
+
const title = renderGroupTitle(i18n$1.hiddenSectionTitle, items.length);
|
|
4435
|
+
if (!items.length) {
|
|
4436
|
+
return null;
|
|
4321
4437
|
}
|
|
4438
|
+
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4439
|
+
title,
|
|
4440
|
+
React__namespace.createElement(SubGroup, { renderItem: props.renderItem, items: items })));
|
|
4322
4441
|
};
|
|
4323
|
-
const
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
return props.renderFooter ? props.renderFooter(footerProps) : React__namespace.default.createElement(FilterRangeDatePickerBodyFooter, { ...footerProps });
|
|
4345
|
-
}
|
|
4346
|
-
return (React__namespace.default.createElement(React.Fragment, null,
|
|
4347
|
-
React__namespace.default.createElement(FlexRow, { borderBottom: true },
|
|
4348
|
-
React__namespace.default.createElement(RangeDatePickerBody, { value: {
|
|
4349
|
-
selectedDate: value,
|
|
4350
|
-
inFocus,
|
|
4351
|
-
}, onValueChange: onBodyValueChange, filter: props.filter, presets: props.presets })),
|
|
4352
|
-
renderFooter()));
|
|
4442
|
+
const applyButton = React__namespace.createElement(Button, { caption: i18n$1.applyButton, isDisabled: !hasAnySelectedColumns, color: "primary", onClick: apply });
|
|
4443
|
+
return (React__namespace.createElement(ModalBlocker, { ...modalProps },
|
|
4444
|
+
React__namespace.createElement(ModalWindow, { cx: [css$p.root, 'uui-columns-config-modal'], height: "95dvh", maxHeight: "95dvh" },
|
|
4445
|
+
React__namespace.createElement(ModalHeader, { title: i18n$1.configureColumnsTitle, onClose: close }),
|
|
4446
|
+
React__namespace.createElement(FlexRow, { borderBottom: true, cx: css$p.searchArea },
|
|
4447
|
+
React__namespace.createElement(SearchInput, { size: settings.dataTable.sizes.columnsConfigurationModal.searchInput, value: searchValue, onValueChange: setSearchValue, placeholder: i18n$1.searchPlaceholder }),
|
|
4448
|
+
React__namespace.createElement(Dropdown, { closeOnTargetClick: true, renderBody: () => (React__namespace.createElement(DropdownMenuBody, { minWidth: 100 },
|
|
4449
|
+
React__namespace.createElement(DropdownMenuButton, { caption: i18n$1.clearAllButton, onClick: uncheckAll }),
|
|
4450
|
+
React__namespace.createElement(DropdownMenuButton, { caption: i18n$1.selectAllButton, onClick: checkAll }))), renderTarget: (props) => (React__namespace.createElement(Button, { ...props, fill: "none", icon: settings.dataTable.icons.columnsConfigurationModal.menuIcon, size: settings.dataTable.sizes.columnsConfigurationModal.menuButton, color: "secondary", isDropdown: false })) })),
|
|
4451
|
+
React__namespace.createElement(Panel, { background: "surface-main", cx: css$p.mainPanel },
|
|
4452
|
+
React__namespace.createElement(ScrollBars, null,
|
|
4453
|
+
renderVisible(),
|
|
4454
|
+
renderHidden(),
|
|
4455
|
+
isNoData && (React__namespace.createElement(FlexRow, { cx: css$p.noData },
|
|
4456
|
+
React__namespace.createElement(Text, { cx: css$p.noDataTitle }, i18n$1.noResultsFound.title),
|
|
4457
|
+
React__namespace.createElement(Text, { cx: css$p.noDataSubTitle }, i18n$1.noResultsFound.subTitle))))),
|
|
4458
|
+
React__namespace.createElement(ModalFooter, { borderTop: true },
|
|
4459
|
+
React__namespace.createElement(LinkButton, { icon: settings.dataTable.icons.columnsConfigurationModal.resetIcon, caption: i18n$1.resetToDefaultButton, onClick: reset }),
|
|
4460
|
+
React__namespace.createElement(uuiComponents.FlexSpacer, null),
|
|
4461
|
+
React__namespace.createElement(Button, { fill: "none", color: "secondary", caption: i18n$1.cancelButton, onClick: close }),
|
|
4462
|
+
!hasAnySelectedColumns ? (React__namespace.createElement(Tooltip, { content: i18n$1.enableAtLeastOneColumnMessage, placement: "top-end", color: "critical" }, applyButton)) : (applyButton)))));
|
|
4353
4463
|
}
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
if (
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
props.onValueChange({
|
|
4369
|
-
from: val,
|
|
4370
|
-
to: value?.to ?? null,
|
|
4371
|
-
});
|
|
4372
|
-
break;
|
|
4373
|
-
}
|
|
4374
|
-
case 'to': {
|
|
4375
|
-
props.onValueChange({
|
|
4376
|
-
from: value?.from ?? null,
|
|
4377
|
-
to: val,
|
|
4378
|
-
});
|
|
4379
|
-
break;
|
|
4380
|
-
}
|
|
4464
|
+
function SubGroup(props) {
|
|
4465
|
+
const [isExpanded, setIsExpanded] = React.useState(true);
|
|
4466
|
+
const { title, items, renderItem } = props;
|
|
4467
|
+
const isCollapsible = !!title;
|
|
4468
|
+
if (items.length) {
|
|
4469
|
+
const content = (React__namespace.createElement(FlexRow, { cx: css$p.groupItems, size: settings.dataTable.sizes.columnsConfigurationModal.columnRow }, items.map((c) => (React__namespace.createElement(ColumnRow, { column: c, key: c.key, renderItem: renderItem })))));
|
|
4470
|
+
if (isCollapsible) {
|
|
4471
|
+
const renderTitle = (isOpened) => {
|
|
4472
|
+
const toggleIcon = settings.dataTable.icons.columnsConfigurationModal[isOpened ? 'expandedIcon' : 'collapsedIcon'];
|
|
4473
|
+
return (React__namespace.createElement(FlexRow, { cx: uuiCore.cx(css$p.subgroup) },
|
|
4474
|
+
React__namespace.createElement(uuiComponents.IconContainer, { icon: toggleIcon }),
|
|
4475
|
+
React__namespace.createElement(Text, { size: "none", color: "tertiary", cx: css$p.subgroupTitle }, title)));
|
|
4476
|
+
};
|
|
4477
|
+
return (React__namespace.createElement(uuiComponents.Accordion, { value: isExpanded, onValueChange: setIsExpanded, renderTitle: renderTitle, cx: css$p.subgroupAccordion }, content));
|
|
4381
4478
|
}
|
|
4382
|
-
|
|
4383
|
-
const renderFooter = () => {
|
|
4384
|
-
const clearSelection = () => {
|
|
4385
|
-
if (isInRangePredicate) {
|
|
4386
|
-
props.onValueChange({
|
|
4387
|
-
from: undefined,
|
|
4388
|
-
to: undefined,
|
|
4389
|
-
});
|
|
4390
|
-
}
|
|
4391
|
-
else {
|
|
4392
|
-
props.onValueChange(undefined);
|
|
4393
|
-
}
|
|
4394
|
-
};
|
|
4395
|
-
const isClearDisabled = typeof props.value !== 'number' && typeof props.value !== 'object';
|
|
4396
|
-
return (React__namespace.default.createElement(FlexRow, { padding: "12" },
|
|
4397
|
-
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
4398
|
-
React__namespace.default.createElement(FlexCell, { width: "auto", alignSelf: "center" },
|
|
4399
|
-
React__namespace.default.createElement(LinkButton, { isDisabled: isClearDisabled, size: settings.filtersPanel.sizes[uuiCore.isMobile() ? 'mobileFooterLinkButton' : 'footerLinkButton'], caption: i18n.pickerInput.clearSelectionButtonSingle, onClick: clearSelection }))));
|
|
4400
|
-
};
|
|
4401
|
-
if (isInRangePredicate) {
|
|
4402
|
-
const value = props.value;
|
|
4403
|
-
return (React__namespace.default.createElement("div", null,
|
|
4404
|
-
React__namespace.default.createElement(FlexRow, { padding: "12", alignItems: "center", columnGap: "12", borderBottom: true, cx: css$r.container },
|
|
4405
|
-
React__namespace.default.createElement(FlexCell, { width: "100%" },
|
|
4406
|
-
React__namespace.default.createElement(NumericInput, { size: settings.filtersPanel.sizes.default, value: value?.from ?? null, onValueChange: rangeValueHandler('from'), placeholder: "Min", formatOptions: { maximumFractionDigits: 2 } })),
|
|
4407
|
-
React__namespace.default.createElement(FlexCell, { width: "100%" },
|
|
4408
|
-
React__namespace.default.createElement(NumericInput, { size: settings.filtersPanel.sizes.default, value: value?.to ?? null, onValueChange: rangeValueHandler('to'), placeholder: "Max", formatOptions: { maximumFractionDigits: 2 }, isInvalid: isWrongRange(value?.from, value?.to) }))),
|
|
4409
|
-
renderFooter()));
|
|
4479
|
+
return content;
|
|
4410
4480
|
}
|
|
4411
|
-
return
|
|
4412
|
-
React__namespace.default.createElement(FlexRow, { padding: "12", alignItems: "center", borderBottom: true, cx: css$r.container },
|
|
4413
|
-
React__namespace.default.createElement(FlexCell, { width: 130 },
|
|
4414
|
-
React__namespace.default.createElement(NumericInput, { size: settings.filtersPanel.sizes.default, value: typeof props.value === 'number' ? props.value : null, onValueChange: props.onValueChange, placeholder: "Enter a number", formatOptions: { maximumFractionDigits: 2 } }))),
|
|
4415
|
-
renderFooter()));
|
|
4481
|
+
return null;
|
|
4416
4482
|
}
|
|
4417
4483
|
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
case 'numeric':
|
|
4423
|
-
return React__namespace.default.createElement(FilterNumericBody, { ...props });
|
|
4424
|
-
case 'multiPicker':
|
|
4425
|
-
return React__namespace.default.createElement(FilterPickerBody, { ...props, selectionMode: "multi", valueType: "id" });
|
|
4426
|
-
case 'datePicker':
|
|
4427
|
-
return React__namespace.default.createElement(FilterDatePickerBody, { ...props, format: props.format || 'DD/MM/YYYY' });
|
|
4428
|
-
case 'rangeDatePicker':
|
|
4429
|
-
return React__namespace.default.createElement(FilterRangeDatePickerBody, { ...props, format: props.format || 'DD/MM/YYYY', value: props.value || { from: null, to: null } });
|
|
4430
|
-
case 'custom':
|
|
4431
|
-
return props.render(props);
|
|
4484
|
+
const getChildrenAndRest = (row, rows) => {
|
|
4485
|
+
const firstNotChildIndex = rows.findIndex((other) => other.depth < row.depth || (row.depth === other.depth && other.isPinned));
|
|
4486
|
+
if (firstNotChildIndex === -1) {
|
|
4487
|
+
return [rows, []];
|
|
4432
4488
|
}
|
|
4433
|
-
|
|
4489
|
+
if (firstNotChildIndex === 0) {
|
|
4490
|
+
return [[], rows];
|
|
4491
|
+
}
|
|
4492
|
+
const children = rows.slice(0, firstNotChildIndex);
|
|
4493
|
+
const rest = rows.slice(firstNotChildIndex, rows.length);
|
|
4494
|
+
return [children, rest];
|
|
4495
|
+
};
|
|
4434
4496
|
|
|
4435
|
-
var css$
|
|
4497
|
+
var css$o = {"listContainer":"IP-lCK","header":"ZVtQ-Y","group":"EYSSZW","stickyHeader":"_2RXqqB"};
|
|
4436
4498
|
|
|
4437
|
-
function
|
|
4438
|
-
const
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4499
|
+
function DataRowsGroup({ row, childRows, renderRow, top = 1, }) {
|
|
4500
|
+
const rowRef = React.useRef(undefined);
|
|
4501
|
+
const childrenPinnedTop = row.isPinned ? (top + (rowRef.current?.clientHeight ?? 0)) : top;
|
|
4502
|
+
return (React__namespace.default.createElement("div", { className: css$o.group, key: row.rowKey },
|
|
4503
|
+
React__namespace.default.createElement("div", { className: row.isPinned ? css$o.stickyHeader : css$o.header,
|
|
4504
|
+
// Gaps between pinned parents should be removed by -1 from top height.
|
|
4505
|
+
// Otherwise, sometimes top value is rounded top.
|
|
4506
|
+
style: { zIndex: row.depth + 10, top: top - 1 }, ref: rowRef }, renderRow(row)),
|
|
4507
|
+
childRows.length > 0 && (React__namespace.default.createElement("div", null,
|
|
4508
|
+
React__namespace.default.createElement(DataRowsGroups, { rows: childRows, renderRow: renderRow, top: childrenPinnedTop })))));
|
|
4509
|
+
}
|
|
4510
|
+
const renderRows = (rows, renderRow, top) => {
|
|
4511
|
+
if (!rows.length)
|
|
4512
|
+
return [];
|
|
4513
|
+
const [row, ...rest] = rows;
|
|
4514
|
+
if (!rest.length) {
|
|
4515
|
+
return [renderRow(row)];
|
|
4516
|
+
}
|
|
4517
|
+
const [next] = rest;
|
|
4518
|
+
if (next.depth <= row.depth && !row.isPinned) {
|
|
4519
|
+
return [renderRow(row)].concat(renderRows(rest, renderRow, top));
|
|
4520
|
+
}
|
|
4521
|
+
const [children, otherRows] = getChildrenAndRest(row, rest);
|
|
4522
|
+
const group = (React__namespace.default.createElement(DataRowsGroup, { row: row, childRows: children, renderRow: renderRow, top: top, key: row.rowKey }));
|
|
4523
|
+
return [group].concat(renderRows(otherRows, renderRow, top));
|
|
4524
|
+
};
|
|
4525
|
+
function DataRowsGroups({ rows, renderRow, top = 1, }) {
|
|
4526
|
+
const rowsWithGroups = renderRows(rows, renderRow, top);
|
|
4527
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
4528
|
+
return (React__namespace.default.createElement(React__namespace.default.Fragment, null, rowsWithGroups));
|
|
4529
|
+
}
|
|
4530
|
+
|
|
4531
|
+
function DataRowsContainer({ estimatedHeight, listContainerRef, offsetY, rows, renderRow, headerRef, }) {
|
|
4532
|
+
return (React__namespace.default.createElement("div", { className: cx__default.default(css$o.listContainer, 'uui-dt-data_row_container'), style: { minHeight: `${estimatedHeight}px` } },
|
|
4533
|
+
React__namespace.default.createElement("div", { ref: listContainerRef, role: "rowgroup", style: { marginTop: offsetY } },
|
|
4534
|
+
React__namespace.default.createElement(DataRowsGroups, { rows: rows, renderRow: renderRow, top: headerRef?.current?.clientHeight }))));
|
|
4535
|
+
}
|
|
4536
|
+
|
|
4537
|
+
var css$n = {"root":"Sgq252","sticky-header":"D2QEgn","stickyHeader":"D2QEgn","no-results":"w1vRX8","noResults":"w1vRX8","icon":"kYP-6P","title":"IEbCHB"};
|
|
4538
|
+
|
|
4539
|
+
function DataTable(props) {
|
|
4540
|
+
const { uuiModals } = uuiCore.useUuiContext();
|
|
4541
|
+
const headerRef = React__namespace.useRef(undefined);
|
|
4542
|
+
const columnsWithFilters = useColumnsWithFilters(props.columns, props.filters);
|
|
4543
|
+
const { columns, config, defaultConfig } = uuiCore.useColumnsConfig(columnsWithFilters, props.value?.columnsConfig);
|
|
4544
|
+
const defaultRenderRow = React__namespace.useCallback((rowProps) => {
|
|
4545
|
+
return (React__namespace.createElement(DataTableRow, { size: props.size || settings.dataTable.sizes.body.row, columnsGap: props.columnsGap, borderBottom: props.border, ...rowProps, key: rowProps.rowKey, cx: css$n.cell }));
|
|
4546
|
+
}, []);
|
|
4547
|
+
const renderRow = (row) => (props.renderRow ?? defaultRenderRow)({ ...row, columns });
|
|
4548
|
+
const rows = props.getRows?.() ?? props.rows ?? [];
|
|
4549
|
+
const renderNoResultsBlock = React__namespace.useCallback(() => {
|
|
4550
|
+
return (React__namespace.createElement("div", { className: css$n.noResults }, props.renderNoResultsBlock ? (props.renderNoResultsBlock?.()) : (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4551
|
+
React__namespace.createElement(uuiComponents.IconContainer, { cx: css$n.icon, icon: settings.dataTable.icons.emptyTable }),
|
|
4552
|
+
React__namespace.createElement(Text, { cx: css$n.title, fontSize: "24", lineHeight: "30", color: "primary", fontWeight: "600" }, i18n.tables.noResultsBlock.title),
|
|
4553
|
+
React__namespace.createElement(Text, { fontSize: "16", lineHeight: "24", color: "primary" }, i18n.tables.noResultsBlock.message)))));
|
|
4554
|
+
}, [props.renderNoResultsBlock]);
|
|
4555
|
+
const onConfigurationButtonClick = React__namespace.useCallback(() => {
|
|
4556
|
+
const configProps = { columns: props.columns, columnsConfig: { ...config }, defaultConfig };
|
|
4557
|
+
uuiModals
|
|
4558
|
+
.show((modalProps) => {
|
|
4559
|
+
return (props.renderColumnsConfigurationModal
|
|
4560
|
+
? props.renderColumnsConfigurationModal({ ...configProps, ...modalProps })
|
|
4561
|
+
: (React__namespace.createElement(ColumnsConfigurationModal, { ...modalProps, columns: props.columns, columnsConfig: config, defaultConfig: defaultConfig })));
|
|
4562
|
+
})
|
|
4563
|
+
.then((columnsConfig) => props.onValueChange({ ...props.value, columnsConfig }))
|
|
4564
|
+
.catch(() => null);
|
|
4565
|
+
}, [
|
|
4566
|
+
props.columns, config, defaultConfig, props.value, props.onValueChange, props.renderColumnsConfigurationModal,
|
|
4567
|
+
]);
|
|
4568
|
+
const renderRowsContainer = React__namespace.useCallback(({ listContainerRef, estimatedHeight, offsetY, scrollShadows }) => (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4569
|
+
React__namespace.createElement("div", { className: uuiCore.cx(css$n.stickyHeader, 'uui-dt-sticky_header'), ref: headerRef },
|
|
4570
|
+
React__namespace.createElement(DataTableHeaderRow, { columns: columns, columnGroups: props.columnGroups, onConfigButtonClick: props.showColumnsConfig && onConfigurationButtonClick, selectAll: props.selectAll, size: props.headerSize || settings.dataTable.sizes.header.row, textCase: props.headerTextCase, allowColumnsReordering: props.allowColumnsReordering, allowColumnsResizing: props.allowColumnsResizing, showFoldAll: props.showFoldAll, value: { ...props.value, columnsConfig: config }, onValueChange: props.onValueChange, columnsGap: props.columnsGap }),
|
|
4571
|
+
React__namespace.createElement("div", { className: uuiCore.cx(uuiCore.uuiScrollShadows.top, {
|
|
4572
|
+
[uuiCore.uuiScrollShadows.topVisible]: scrollShadows.verticalTop,
|
|
4573
|
+
}) })),
|
|
4574
|
+
props.exactRowsCount !== 0 ? (React__namespace.createElement(DataRowsContainer, { headerRef: headerRef, listContainerRef: listContainerRef, estimatedHeight: estimatedHeight, offsetY: offsetY, scrollShadows: scrollShadows, renderRow: renderRow, rows: rows })) : (renderNoResultsBlock?.()))), [
|
|
4575
|
+
props, columns, rows, renderNoResultsBlock, onConfigurationButtonClick,
|
|
4576
|
+
]);
|
|
4577
|
+
return (React__namespace.createElement(uuiComponents.DataTableSelectionProvider, { onCopy: props.onCopy, rows: rows, columns: columns },
|
|
4578
|
+
React__namespace.createElement(uuiComponents.DataTableFocusProvider, { dataTableFocusManager: props.dataTableFocusManager },
|
|
4579
|
+
React__namespace.createElement(VirtualList, { value: props.value, onValueChange: props.onValueChange, onScroll: props.onScroll, rowsCount: props.rowsCount, renderRows: renderRowsContainer, cx: uuiCore.cx(css$n.root, props.cx, 'uui-dt-vars', 'uui-data_table'), isLoading: props.isReloading, rowsSelector: "[role=row]", rawProps: {
|
|
4580
|
+
role: 'table',
|
|
4581
|
+
'aria-colcount': columns.length,
|
|
4582
|
+
'aria-rowcount': props.rowsCount,
|
|
4583
|
+
} }))));
|
|
4584
|
+
}
|
|
4585
|
+
|
|
4586
|
+
var css$m = {"root":"Qcghyd","title-wrapper":"EJWZMK","titleWrapper":"EJWZMK","title":"qUE-ge","text-wrapper":"_0RCvXA","textWrapper":"_0RCvXA","selection":"l7Mkx-","postfix":"_02Rn5U","selected":"VAO5TQ"};
|
|
4587
|
+
|
|
4588
|
+
const FilterPanelItemToggler = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
4589
|
+
const togglerPickerOpened = (e) => {
|
|
4590
|
+
if (props.isDisabled)
|
|
4591
|
+
return;
|
|
4592
|
+
e.preventDefault();
|
|
4593
|
+
!uuiCore.isEventTargetInsideClickable(e) && props.onClick?.();
|
|
4594
|
+
};
|
|
4595
|
+
const onKeyDownHandler = (e) => {
|
|
4596
|
+
if (props.isDisabled)
|
|
4597
|
+
return;
|
|
4598
|
+
if (e.key === 'Enter' && !props.isOpen) {
|
|
4599
|
+
e.preventDefault();
|
|
4600
|
+
props.toggleDropdownOpening(true);
|
|
4601
|
+
}
|
|
4602
|
+
if (e.key === 'Escape' && props.isOpen) {
|
|
4603
|
+
e.preventDefault();
|
|
4604
|
+
props.toggleDropdownOpening(false);
|
|
4605
|
+
}
|
|
4606
|
+
};
|
|
4607
|
+
const getTitle = props.predicateName ? `${props.title} ${props.predicateName}` : `${props.title}${props.selection ? ':' : ''}`;
|
|
4608
|
+
const getSelectionText = () => props.selection.map((i, index) => (React__namespace.createElement(React__namespace.Fragment, { key: `${i}${index}` },
|
|
4609
|
+
React__namespace.createElement("div", { className: cx__default.default(css$m.selection, UUI_FILTERS_PANEL_ITEM_TOGGLER_SELECTION) }, i),
|
|
4610
|
+
(props.postfix || index !== props.selection.length - 1) && React__namespace.createElement("span", null, ",\u00A0"))));
|
|
4611
|
+
return (React__namespace.createElement("div", { style: { maxWidth: `${props.maxWidth ? props.maxWidth + 'px' : 'auto'}` }, role: "button", tabIndex: props.isDisabled ? -1 : 0, onKeyDown: onKeyDownHandler, className: cx__default.default(UUI_FILTERS_PANEL_ITEM_TOGGLER, css$m.root, uuiCore.uuiElement.inputBox, uuiCore.uuiMarkers.clickable, props.isOpen && uuiCore.uuiMod.opened, props.selection?.length > 0 && uuiCore.uuiMarkers.hasValue, `uui-size-${props.size || settings.pickerInput.sizes.toggler.default}`, props.cx), onClick: togglerPickerOpened, ref: ref },
|
|
4612
|
+
React__namespace.createElement("div", { className: css$m.titleWrapper },
|
|
4613
|
+
React__namespace.createElement("div", { className: cx__default.default(css$m.title, UUI_FILTERS_PANEL_ITEM_TOGGLER_TITLE) }, getTitle),
|
|
4614
|
+
props.selection && (React__namespace.createElement("div", { className: css$m.textWrapper },
|
|
4615
|
+
getSelectionText(),
|
|
4616
|
+
props.postfix && (React__namespace.createElement("div", { className: cx__default.default(css$m.postfix, UUI_FILTERS_PANEL_ITEM_TOGGLER_POSTFIX) }, props.postfix))))),
|
|
4617
|
+
!props.isDisabled && React__namespace.createElement(uuiComponents.IconContainer, { icon: settings.filtersPanel.icons.itemDropdownIcon, flipY: props.isOpen, cx: "uui-icon-dropdown" })));
|
|
4618
|
+
});
|
|
4619
|
+
|
|
4620
|
+
const defaultPredicates = {
|
|
4621
|
+
numeric: [
|
|
4622
|
+
{ predicate: 'eq', name: '=', isDefault: true }, { predicate: 'neq', name: '≠' }, { predicate: 'lte', name: '≤' }, { predicate: 'gte', name: '≥' }, { predicate: 'inRange', name: 'In Range' },
|
|
4623
|
+
],
|
|
4624
|
+
multiPicker: [{ predicate: 'in', name: 'is', isDefault: true }, { predicate: 'nin', name: 'is not' }],
|
|
4625
|
+
rangeDatePicker: [{ predicate: 'inRange', name: 'In Range', isDefault: true }, { predicate: 'notInRange', name: 'Not in Range' }],
|
|
4626
|
+
};
|
|
4627
|
+
const getDefaultPredicate = (predicates, value) => {
|
|
4628
|
+
if (!predicates) {
|
|
4629
|
+
return null;
|
|
4630
|
+
}
|
|
4631
|
+
return Object.keys(value || {})[0]
|
|
4632
|
+
|| predicates.find((i) => i.isDefault)?.predicate
|
|
4633
|
+
|| predicates?.[0].predicate;
|
|
4634
|
+
};
|
|
4635
|
+
|
|
4636
|
+
const pickerHeight = 300;
|
|
4637
|
+
function FilterPickerBody({ highlightSearchMatches = true, ...restProps }) {
|
|
4638
|
+
const props = { ...restProps, highlightSearchMatches };
|
|
4639
|
+
const [dsState, setDsState] = React.useState({
|
|
4640
|
+
focusedIndex: 0,
|
|
4641
|
+
topIndex: 0,
|
|
4642
|
+
visibleCount: 20,
|
|
4643
|
+
checked: [],
|
|
4644
|
+
});
|
|
4645
|
+
const { showSelected, setShowSelected } = uuiComponents.useShowSelected({ dataSourceState: dsState });
|
|
4646
|
+
const { view, getName, dataSourceState, getListProps, handleDataSourceValueChange, clearSelection, } = uuiComponents.usePickerApi({ ...props, dataSourceState: dsState, setDataSourceState: setDsState, showSelectedOnly: showSelected });
|
|
4647
|
+
const prevValue = uuiCore.usePrevious(props.value);
|
|
4648
|
+
const prevOpened = uuiCore.usePrevious(props.isOpen);
|
|
4649
|
+
React__namespace.useLayoutEffect(() => {
|
|
4650
|
+
if (prevOpened === props.isOpen && props.isOpen
|
|
4651
|
+
&& prevValue !== props.value && props.value !== props.emptyValue
|
|
4652
|
+
&& props.selectionMode === 'single') {
|
|
4653
|
+
props.onClose();
|
|
4654
|
+
}
|
|
4655
|
+
}, [props.value]);
|
|
4656
|
+
const renderFooter = () => {
|
|
4657
|
+
const footerProps = {
|
|
4658
|
+
view,
|
|
4659
|
+
showSelected: {
|
|
4660
|
+
value: showSelected,
|
|
4661
|
+
onValueChange: setShowSelected,
|
|
4662
|
+
},
|
|
4663
|
+
clearSelection,
|
|
4664
|
+
selectionMode: props.selectionMode,
|
|
4665
|
+
selection: props.value,
|
|
4666
|
+
search: dataSourceState.search,
|
|
4667
|
+
};
|
|
4668
|
+
return props.renderFooter
|
|
4669
|
+
? props.renderFooter(footerProps)
|
|
4670
|
+
: React__namespace.createElement(DataPickerFooter, { ...footerProps, cx: UUI_FILTERS_PANEL_BODY_FOOTER, size: settings.pickerInput.sizes.body.row });
|
|
4671
|
+
};
|
|
4672
|
+
const renderBody = () => {
|
|
4673
|
+
const rows = view.getVisibleRows();
|
|
4674
|
+
const maxHeight = uuiCore.isMobile() ? document.documentElement.clientHeight : props.maxBodyHeight || pickerHeight;
|
|
4675
|
+
const maxWidth = uuiCore.isMobile() ? undefined : 360;
|
|
4676
|
+
const onKeyDown = (e) => uuiComponents.handleDataSourceKeyboard({
|
|
4677
|
+
value: dataSourceState,
|
|
4678
|
+
onValueChange: handleDataSourceValueChange,
|
|
4679
|
+
listView: view,
|
|
4680
|
+
searchPosition: 'body',
|
|
4681
|
+
rows,
|
|
4682
|
+
}, e);
|
|
4683
|
+
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4684
|
+
React__namespace.createElement(DataPickerBody, { ...getListProps(), selectionMode: props.selectionMode, rows: rows, maxHeight: maxHeight, maxWidth: maxWidth, searchSize: settings.pickerInput.sizes.body.row, showSearch: props.showSearch ?? true, getName: getName, value: dataSourceState, onValueChange: handleDataSourceValueChange, renderRow: props.renderRow, onKeyDown: onKeyDown, minCharsToSearch: props.minCharsToSearch, searchDebounceDelay: props.searchDebounceDelay, rawProps: props.rawProps?.body, highlightSearchMatches: props.highlightSearchMatches, flattenSearchResults: view.getConfig().flattenSearchResults }),
|
|
4685
|
+
renderFooter()));
|
|
4686
|
+
};
|
|
4687
|
+
return renderBody();
|
|
4688
|
+
}
|
|
4689
|
+
|
|
4690
|
+
const UUI_FILTERS_PANEL_DTP_FOOTER = 'uui-filters-panel-dtp-footer';
|
|
4691
|
+
function FilterDatePickerBodyFooter({ value, onValueChange }) {
|
|
4692
|
+
return (React__namespace.default.createElement(FlexCell, { alignSelf: "stretch" },
|
|
4693
|
+
React__namespace.default.createElement(FlexRow, { cx: UUI_FILTERS_PANEL_DTP_FOOTER },
|
|
4694
|
+
React__namespace.default.createElement(Text, null, value ? uuiDayjs.dayjs(value).format('MMM DD, YYYY') : ''),
|
|
4695
|
+
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
4696
|
+
React__namespace.default.createElement(LinkButton, { isDisabled: !value, caption: i18n.filterToolbar.datePicker.clearCaption, onClick: () => onValueChange(undefined) }))));
|
|
4697
|
+
}
|
|
4698
|
+
|
|
4699
|
+
function FilterDatePickerBody(props) {
|
|
4700
|
+
const { value } = props;
|
|
4701
|
+
const context = uuiCore.useUuiContext();
|
|
4702
|
+
const handleValueChange = (newValue) => {
|
|
4703
|
+
props.onValueChange(newValue);
|
|
4704
|
+
if (props.getValueChangeAnalyticsEvent) {
|
|
4705
|
+
const event = props.getValueChangeAnalyticsEvent(newValue, value);
|
|
4706
|
+
context.uuiAnalytics.sendEvent(event);
|
|
4707
|
+
}
|
|
4708
|
+
if (newValue) {
|
|
4709
|
+
props.onClose?.();
|
|
4710
|
+
}
|
|
4711
|
+
};
|
|
4712
|
+
const handleBodyChange = (newValue) => {
|
|
4713
|
+
if (newValue && value !== newValue) {
|
|
4714
|
+
handleValueChange(newValue);
|
|
4715
|
+
}
|
|
4716
|
+
};
|
|
4717
|
+
function renderFooter() {
|
|
4718
|
+
const footerProps = {
|
|
4719
|
+
value,
|
|
4720
|
+
onValueChange: handleValueChange,
|
|
4721
|
+
};
|
|
4722
|
+
return props.renderFooter ? props.renderFooter(footerProps) : React__namespace.default.createElement(FilterDatePickerBodyFooter, { ...footerProps });
|
|
4723
|
+
}
|
|
4724
|
+
return (React__namespace.default.createElement(React.Fragment, null,
|
|
4725
|
+
React__namespace.default.createElement(FlexRow, { borderBottom: true },
|
|
4726
|
+
React__namespace.default.createElement(DatePickerBody, { filter: props.filter, value: value, onValueChange: handleBodyChange, renderDay: props.renderDay, isHoliday: props.isHoliday, rawProps: props.rawProps?.body })),
|
|
4727
|
+
renderFooter()));
|
|
4728
|
+
}
|
|
4729
|
+
|
|
4730
|
+
const UUI_FILTERS_PANEL_RDTP_FOOTER = 'uui-filters-panel-rdtp-footer';
|
|
4731
|
+
function FilterRangeDatePickerBodyFooter(props) {
|
|
4732
|
+
const shouldShowClearButton = (!props.preventEmptyToDate || !props.preventEmptyFromDate) && !props.disableClear;
|
|
4733
|
+
return (React__namespace.default.createElement(FlexCell, { alignSelf: "stretch" },
|
|
4734
|
+
React__namespace.default.createElement(FlexRow, { cx: UUI_FILTERS_PANEL_RDTP_FOOTER },
|
|
4735
|
+
React__namespace.default.createElement(RangeDatePickerInput, { size: settings.filtersPanel.sizes.rangeDatePickerInput, disableClear: props.disableClear, inFocus: props.inFocus, format: props.format, value: props.value, onValueChange: props.onValueChange, onFocusInput: (event, inputType) => {
|
|
4736
|
+
if (props.onFocus) {
|
|
4737
|
+
props.onFocus(event, inputType);
|
|
4738
|
+
}
|
|
4739
|
+
props.setInFocus(inputType);
|
|
4740
|
+
}, onBlurInput: props.onBlur, preventEmptyFromDate: props.preventEmptyFromDate, preventEmptyToDate: props.preventEmptyToDate }),
|
|
4741
|
+
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
4742
|
+
shouldShowClearButton && (React__namespace.default.createElement(LinkButton, { isDisabled: !props.value.from && !props.value.to, caption: i18n.filterToolbar.rangeDatePicker.clearCaption, onClick: props.onClear })))));
|
|
4743
|
+
}
|
|
4744
|
+
|
|
4745
|
+
function FilterRangeDatePickerBody(props) {
|
|
4746
|
+
const { value: _value, format = defaultFormat } = props;
|
|
4747
|
+
const value = _value || defaultRangeValue; // also handles null in comparison to default value
|
|
4748
|
+
const context = uuiCore.useUuiContext();
|
|
4749
|
+
const onOpenChange = (newIsOpen) => {
|
|
4750
|
+
{
|
|
4751
|
+
props.onClose?.();
|
|
4752
|
+
}
|
|
4753
|
+
props.onOpenChange?.(newIsOpen);
|
|
4754
|
+
};
|
|
4755
|
+
const [inFocus, setInFocus] = React.useState('from');
|
|
4756
|
+
const onValueChange = (newValue) => {
|
|
4757
|
+
const fromChanged = value?.from !== newValue?.from;
|
|
4758
|
+
const toChanged = value?.to !== newValue?.to;
|
|
4759
|
+
if (fromChanged || toChanged) {
|
|
4760
|
+
props.onValueChange(newValue);
|
|
4761
|
+
if (props.getValueChangeAnalyticsEvent) {
|
|
4762
|
+
const event = props.getValueChangeAnalyticsEvent(newValue, value);
|
|
4763
|
+
context.uuiAnalytics.sendEvent(event);
|
|
4764
|
+
}
|
|
4765
|
+
}
|
|
4766
|
+
};
|
|
4767
|
+
const onBodyValueChange = (newValue) => {
|
|
4768
|
+
setInFocus(newValue.inFocus ?? inFocus);
|
|
4769
|
+
onValueChange(newValue.selectedDate);
|
|
4770
|
+
const toChanged = value.to !== newValue.selectedDate.to;
|
|
4771
|
+
const closeBody = newValue.selectedDate.from && newValue.selectedDate.to
|
|
4772
|
+
&& inFocus === 'to'
|
|
4773
|
+
&& toChanged;
|
|
4774
|
+
if (closeBody) {
|
|
4775
|
+
onOpenChange(false);
|
|
4776
|
+
}
|
|
4777
|
+
};
|
|
4778
|
+
const onClear = () => {
|
|
4779
|
+
const newValue = {
|
|
4780
|
+
from: props.preventEmptyFromDate ? value.from : null,
|
|
4781
|
+
to: props.preventEmptyToDate ? value.to : null,
|
|
4782
|
+
};
|
|
4783
|
+
onValueChange(newValue);
|
|
4784
|
+
};
|
|
4785
|
+
function renderFooter() {
|
|
4786
|
+
const footerProps = {
|
|
4787
|
+
value,
|
|
4788
|
+
onValueChange,
|
|
4789
|
+
format: format,
|
|
4790
|
+
disableClear: props.disableClear,
|
|
4791
|
+
preventEmptyFromDate: props.preventEmptyFromDate,
|
|
4792
|
+
preventEmptyToDate: props.preventEmptyToDate,
|
|
4793
|
+
onFocus: props.onFocus,
|
|
4794
|
+
onBlur: props.onBlur,
|
|
4795
|
+
inFocus,
|
|
4796
|
+
setInFocus,
|
|
4797
|
+
onClear,
|
|
4798
|
+
};
|
|
4799
|
+
return props.renderFooter ? props.renderFooter(footerProps) : React__namespace.default.createElement(FilterRangeDatePickerBodyFooter, { ...footerProps });
|
|
4800
|
+
}
|
|
4801
|
+
return (React__namespace.default.createElement(React.Fragment, null,
|
|
4802
|
+
React__namespace.default.createElement(FlexRow, { borderBottom: true },
|
|
4803
|
+
React__namespace.default.createElement(RangeDatePickerBody, { value: {
|
|
4804
|
+
selectedDate: value,
|
|
4805
|
+
inFocus,
|
|
4806
|
+
}, onValueChange: onBodyValueChange, filter: props.filter, presets: props.presets })),
|
|
4807
|
+
renderFooter()));
|
|
4808
|
+
}
|
|
4809
|
+
|
|
4810
|
+
var css$l = {"container":"lIs0PD"};
|
|
4811
|
+
|
|
4812
|
+
function FilterNumericBody(props) {
|
|
4813
|
+
const isInRangePredicate = props?.selectedPredicate === 'inRange' || props?.selectedPredicate === 'notInRange';
|
|
4814
|
+
const isWrongRange = (from, to) => {
|
|
4815
|
+
if (!to && to !== 0)
|
|
4816
|
+
return false;
|
|
4817
|
+
return from > to;
|
|
4818
|
+
};
|
|
4819
|
+
const rangeValueHandler = (type) => (val) => {
|
|
4820
|
+
const value = props.value;
|
|
4821
|
+
switch (type) {
|
|
4822
|
+
case 'from': {
|
|
4823
|
+
props.onValueChange({
|
|
4824
|
+
from: val,
|
|
4825
|
+
to: value?.to ?? null,
|
|
4826
|
+
});
|
|
4827
|
+
break;
|
|
4828
|
+
}
|
|
4829
|
+
case 'to': {
|
|
4830
|
+
props.onValueChange({
|
|
4831
|
+
from: value?.from ?? null,
|
|
4832
|
+
to: val,
|
|
4833
|
+
});
|
|
4834
|
+
break;
|
|
4835
|
+
}
|
|
4836
|
+
}
|
|
4837
|
+
};
|
|
4838
|
+
const renderFooter = () => {
|
|
4839
|
+
const clearSelection = () => {
|
|
4840
|
+
if (isInRangePredicate) {
|
|
4841
|
+
props.onValueChange({
|
|
4842
|
+
from: undefined,
|
|
4843
|
+
to: undefined,
|
|
4844
|
+
});
|
|
4845
|
+
}
|
|
4846
|
+
else {
|
|
4847
|
+
props.onValueChange(undefined);
|
|
4848
|
+
}
|
|
4849
|
+
};
|
|
4850
|
+
const isClearDisabled = typeof props.value !== 'number' && typeof props.value !== 'object';
|
|
4851
|
+
return (React__namespace.default.createElement(FlexRow, { padding: "12" },
|
|
4852
|
+
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
4853
|
+
React__namespace.default.createElement(FlexCell, { width: "auto", alignSelf: "center" },
|
|
4854
|
+
React__namespace.default.createElement(LinkButton, { isDisabled: isClearDisabled, size: settings.filtersPanel.sizes[uuiCore.isMobile() ? 'mobileFooterLinkButton' : 'footerLinkButton'], caption: i18n.pickerInput.clearSelectionButtonSingle, onClick: clearSelection }))));
|
|
4855
|
+
};
|
|
4856
|
+
if (isInRangePredicate) {
|
|
4857
|
+
const value = props.value;
|
|
4858
|
+
return (React__namespace.default.createElement("div", null,
|
|
4859
|
+
React__namespace.default.createElement(FlexRow, { padding: "12", alignItems: "center", columnGap: "12", borderBottom: true, cx: css$l.container },
|
|
4860
|
+
React__namespace.default.createElement(FlexCell, { width: "100%" },
|
|
4861
|
+
React__namespace.default.createElement(NumericInput, { size: settings.filtersPanel.sizes.default, value: value?.from ?? null, onValueChange: rangeValueHandler('from'), placeholder: "Min", formatOptions: { maximumFractionDigits: 2 } })),
|
|
4862
|
+
React__namespace.default.createElement(FlexCell, { width: "100%" },
|
|
4863
|
+
React__namespace.default.createElement(NumericInput, { size: settings.filtersPanel.sizes.default, value: value?.to ?? null, onValueChange: rangeValueHandler('to'), placeholder: "Max", formatOptions: { maximumFractionDigits: 2 }, isInvalid: isWrongRange(value?.from, value?.to) }))),
|
|
4864
|
+
renderFooter()));
|
|
4865
|
+
}
|
|
4866
|
+
return (React__namespace.default.createElement("div", null,
|
|
4867
|
+
React__namespace.default.createElement(FlexRow, { padding: "12", alignItems: "center", borderBottom: true, cx: css$l.container },
|
|
4868
|
+
React__namespace.default.createElement(FlexCell, { width: 130 },
|
|
4869
|
+
React__namespace.default.createElement(NumericInput, { size: settings.filtersPanel.sizes.default, value: typeof props.value === 'number' ? props.value : null, onValueChange: props.onValueChange, placeholder: "Enter a number", formatOptions: { maximumFractionDigits: 2 } }))),
|
|
4870
|
+
renderFooter()));
|
|
4871
|
+
}
|
|
4872
|
+
|
|
4873
|
+
function FilterItemBody(props) {
|
|
4874
|
+
switch (props.type) {
|
|
4875
|
+
case 'singlePicker':
|
|
4876
|
+
return React__namespace.default.createElement(FilterPickerBody, { ...props, selectionMode: "single", valueType: "id" });
|
|
4877
|
+
case 'numeric':
|
|
4878
|
+
return React__namespace.default.createElement(FilterNumericBody, { ...props });
|
|
4879
|
+
case 'multiPicker':
|
|
4880
|
+
return React__namespace.default.createElement(FilterPickerBody, { ...props, selectionMode: "multi", valueType: "id" });
|
|
4881
|
+
case 'datePicker':
|
|
4882
|
+
return React__namespace.default.createElement(FilterDatePickerBody, { ...props, format: props.format || 'DD/MM/YYYY' });
|
|
4883
|
+
case 'rangeDatePicker':
|
|
4884
|
+
return React__namespace.default.createElement(FilterRangeDatePickerBody, { ...props, format: props.format || 'DD/MM/YYYY', value: props.value || { from: null, to: null } });
|
|
4885
|
+
case 'custom':
|
|
4886
|
+
return props.render(props);
|
|
4887
|
+
}
|
|
4888
|
+
}
|
|
4889
|
+
|
|
4890
|
+
function useView(props, value) {
|
|
4891
|
+
const forceUpdate = uuiCore.useForceUpdate();
|
|
4892
|
+
let useViewFn;
|
|
4893
|
+
const dataSourceState = {};
|
|
4894
|
+
if (props.type === 'singlePicker' || props.type === 'multiPicker') {
|
|
4895
|
+
useViewFn = props.dataSource.useView.bind(props.dataSource);
|
|
4896
|
+
if (props.type === 'singlePicker') {
|
|
4897
|
+
dataSourceState.selectedId = value;
|
|
4898
|
+
}
|
|
4899
|
+
if (props.type === 'multiPicker') {
|
|
4900
|
+
dataSourceState.checked = value;
|
|
4901
|
+
}
|
|
4902
|
+
}
|
|
4903
|
+
return useViewFn?.(dataSourceState, forceUpdate, { showSelectedOnly: true });
|
|
4904
|
+
}
|
|
4905
|
+
function FiltersToolbarItemImpl(props) {
|
|
4453
4906
|
const { maxCount = 2 } = props;
|
|
4454
4907
|
const isPickersType = props?.type === 'multiPicker' || props?.type === 'singlePicker';
|
|
4455
4908
|
const isMobileScreen = uuiCore.isMobile();
|
|
4909
|
+
const hideHeaderTitle = isPickersType && isMobileScreen;
|
|
4456
4910
|
const floatingMiddleware = React.useMemo(() => {
|
|
4457
4911
|
const middleware = [
|
|
4458
4912
|
react.offset(() => {
|
|
@@ -4464,65 +4918,38 @@ function FiltersToolbarItemImpl(props) {
|
|
|
4464
4918
|
}
|
|
4465
4919
|
return middleware;
|
|
4466
4920
|
}, [isPickersType]);
|
|
4467
|
-
const getDefaultPredicate = () => {
|
|
4468
|
-
if (!props.predicates) {
|
|
4469
|
-
return null;
|
|
4470
|
-
}
|
|
4471
|
-
return Object.keys(props.value || {})[0] || props.predicates.find((i) => i.isDefault)?.predicate || props.predicates?.[0].predicate;
|
|
4472
|
-
};
|
|
4473
4921
|
const [isOpen, isOpenChange] = React.useState(props.autoFocus);
|
|
4474
|
-
const [predicate, setPredicate] = React.useState(getDefaultPredicate());
|
|
4922
|
+
const [predicate, setPredicate] = React.useState(getDefaultPredicate(props.predicates, props.value));
|
|
4475
4923
|
const predicateName = React__namespace.default.useMemo(() => predicate && props.predicates.find((p) => p.predicate === predicate).name, [predicate]);
|
|
4476
|
-
|
|
4477
|
-
if (props.predicates && Object.keys(props.value || {})[0] && Object.keys(props.value || {})[0] !== predicate) {
|
|
4478
|
-
setPredicate(Object.keys(props.value || {})[0]);
|
|
4479
|
-
}
|
|
4480
|
-
}, [props.value]);
|
|
4481
|
-
const onValueChange = React.useCallback((value) => {
|
|
4924
|
+
const onValueChange = (value) => {
|
|
4482
4925
|
if (props.predicates) {
|
|
4483
|
-
props.onValueChange({ [
|
|
4926
|
+
props.onValueChange({ [predicate]: value });
|
|
4484
4927
|
}
|
|
4485
4928
|
else {
|
|
4486
|
-
props.onValueChange(
|
|
4929
|
+
props.onValueChange(value);
|
|
4487
4930
|
}
|
|
4488
|
-
}, [props.field, props.onValueChange]);
|
|
4489
|
-
const removeOnclickHandler = () => {
|
|
4490
|
-
props.removeFilter(props.field);
|
|
4491
4931
|
};
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
if (props.
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
if (isInRange(val) && !isInRange(predicate)) {
|
|
4499
|
-
// from simple predicate -> to Range
|
|
4500
|
-
predicateValue = { [props.field]: { [val]: { from: null, to: null } } };
|
|
4501
|
-
}
|
|
4502
|
-
else if (!isInRange(val) && isInRange(predicate)) {
|
|
4503
|
-
// from Range -> to simple predicate
|
|
4504
|
-
predicateValue = { [props.field]: { [val]: null } };
|
|
4932
|
+
React.useEffect(() => {
|
|
4933
|
+
// This effect needs when the filter dropdown was closed and opened again
|
|
4934
|
+
if (props.predicates && props.value && Object.keys(props.value).length > 0) {
|
|
4935
|
+
const predicateFromValue = Object.keys(props.value)[0];
|
|
4936
|
+
if (predicateFromValue !== predicate) {
|
|
4937
|
+
setPredicate(predicateFromValue);
|
|
4505
4938
|
}
|
|
4506
|
-
props.onValueChange(predicateValue);
|
|
4507
|
-
}
|
|
4508
|
-
else {
|
|
4509
|
-
props.onValueChange({ [props.field]: { [val]: getValue() } });
|
|
4510
4939
|
}
|
|
4511
|
-
|
|
4940
|
+
}, [props.value]);
|
|
4941
|
+
const removeOnclickHandler = () => {
|
|
4942
|
+
props.removeFilter(props.field);
|
|
4512
4943
|
};
|
|
4513
|
-
const renderHeader = (hideTitle) => (React__namespace.default.createElement("div", { className: cx__default.default(css$
|
|
4514
|
-
props.predicates ? (React__namespace.default.createElement(
|
|
4515
|
-
!props?.isAlwaysVisible && (React__namespace.default.createElement(LinkButton, { cx: css$
|
|
4944
|
+
const renderHeader = (hideTitle) => (React__namespace.default.createElement("div", { className: cx__default.default(css$s.header, isPickersType && (props.showSearch ?? css$s.withSearch)) },
|
|
4945
|
+
props.predicates ? (React__namespace.default.createElement(FilterPredicatePanel, { predicates: props.predicates, predicate: predicate, type: props.type, onValueChange: props.onValueChange, value: props.value, setPredicate: setPredicate })) : (!hideTitle && (React__namespace.default.createElement("div", { className: css$s.title }, props.title))),
|
|
4946
|
+
!props?.isAlwaysVisible && (React__namespace.default.createElement(LinkButton, { cx: css$s.removeButton, caption: i18n.filterToolbar.datePicker.removeCaption, onClick: removeOnclickHandler, size: settings.filtersPanel.sizes.pickerBodyLinkButton, icon: settings.filtersPanel.icons.pickerBodyRemoveIcon }))));
|
|
4516
4947
|
const renderBody = (dropdownProps) => {
|
|
4517
|
-
|
|
4518
|
-
return isPickersType ? (React__namespace.default.createElement(PickerBodyMobileView, { ...dropdownProps, cx: [css$q.body, UUI_FILTERS_PANEL_ITEM_BODY], title: props.title, width: settings.filtersPanel.sizes.pickerBodyMinWidth, onClose: () => isOpenChange(false) },
|
|
4948
|
+
return isPickersType ? (React__namespace.default.createElement(PickerBodyMobileView, { ...dropdownProps, cx: [css$s.body, UUI_FILTERS_PANEL_ITEM_BODY], title: props.title, width: settings.filtersPanel.sizes.pickerBodyMinWidth, onClose: () => isOpenChange(false) },
|
|
4519
4949
|
renderHeader(hideHeaderTitle),
|
|
4520
|
-
React__namespace.default.createElement(FilterItemBody, { ...props, ...dropdownProps, selectedPredicate: predicate, value: getValue(), onValueChange: onValueChange }))) : (React__namespace.default.createElement(DropdownContainer, { cx: [css$
|
|
4950
|
+
React__namespace.default.createElement(FilterItemBody, { ...props, ...dropdownProps, selectedPredicate: predicate, value: getValue(predicate, props.value), onValueChange: onValueChange }))) : (React__namespace.default.createElement(DropdownContainer, { cx: [css$s.body, UUI_FILTERS_PANEL_ITEM_BODY], ...dropdownProps },
|
|
4521
4951
|
renderHeader(hideHeaderTitle),
|
|
4522
|
-
React__namespace.default.createElement(FilterItemBody, { ...props, ...dropdownProps, selectedPredicate: predicate, value: getValue(), onValueChange: onValueChange })));
|
|
4523
|
-
};
|
|
4524
|
-
const getValue = () => {
|
|
4525
|
-
return predicate ? props.value?.[predicate] : props.value;
|
|
4952
|
+
React__namespace.default.createElement(FilterItemBody, { ...props, ...dropdownProps, selectedPredicate: predicate, value: getValue(predicate, props.value), onValueChange: onValueChange })));
|
|
4526
4953
|
};
|
|
4527
4954
|
const getPickerItemName = (item, config) => {
|
|
4528
4955
|
if (item.isLoading) {
|
|
@@ -4533,9 +4960,9 @@ function FiltersToolbarItemImpl(props) {
|
|
|
4533
4960
|
}
|
|
4534
4961
|
return config.getName ? config.getName(item.value) : item.value.name;
|
|
4535
4962
|
};
|
|
4536
|
-
const view = useView(props, getValue());
|
|
4963
|
+
const view = useView(props, getValue(predicate, props.value));
|
|
4537
4964
|
const getTogglerValue = () => {
|
|
4538
|
-
const currentValue = getValue();
|
|
4965
|
+
const currentValue = getValue(predicate, props.value);
|
|
4539
4966
|
const defaultFormat = 'MMM DD, YYYY';
|
|
4540
4967
|
switch (props.type) {
|
|
4541
4968
|
case 'multiPicker': {
|
|
@@ -4601,44 +5028,6 @@ function FiltersToolbarItemImpl(props) {
|
|
|
4601
5028
|
}
|
|
4602
5029
|
const FiltersPanelItem = /* @__PURE__ */React__namespace.default.memo(FiltersToolbarItemImpl);
|
|
4603
5030
|
|
|
4604
|
-
const normalizeFilterWithPredicates = (filter) => {
|
|
4605
|
-
if (!filter) {
|
|
4606
|
-
return {};
|
|
4607
|
-
}
|
|
4608
|
-
const result = filter;
|
|
4609
|
-
const keys = Object.keys(filter);
|
|
4610
|
-
for (let n = 0; n < keys.length; n++) {
|
|
4611
|
-
const key = keys[n];
|
|
4612
|
-
const filterValue = filter[key];
|
|
4613
|
-
if (filterValue && typeof filterValue === 'object') {
|
|
4614
|
-
if ('from' in filterValue && 'to' in filterValue) {
|
|
4615
|
-
continue;
|
|
4616
|
-
}
|
|
4617
|
-
if ('in' in filterValue && (!Array.isArray(filterValue.in) || !filterValue.in.length)) {
|
|
4618
|
-
delete filter[key];
|
|
4619
|
-
}
|
|
4620
|
-
if ('nin' in filterValue && (!Array.isArray(filterValue.nin) || !filterValue.nin.length)) {
|
|
4621
|
-
delete filter[key];
|
|
4622
|
-
}
|
|
4623
|
-
if ('inRange' in filterValue) {
|
|
4624
|
-
if (!filterValue.inRange || (!filterValue.inRange.from && !filterValue.inRange.to)) {
|
|
4625
|
-
delete filter[key];
|
|
4626
|
-
}
|
|
4627
|
-
}
|
|
4628
|
-
if ('notInRange' in filterValue) {
|
|
4629
|
-
if (!filterValue.notInRange || (!filterValue.notInRange.from && !filterValue.notInRange.to)) {
|
|
4630
|
-
delete filter[key];
|
|
4631
|
-
}
|
|
4632
|
-
}
|
|
4633
|
-
Object.keys(filterValue).forEach((predicate) => {
|
|
4634
|
-
if (filterValue[predicate] === null || filterValue[predicate] === undefined) {
|
|
4635
|
-
delete filter[key];
|
|
4636
|
-
}
|
|
4637
|
-
});
|
|
4638
|
-
}
|
|
4639
|
-
}
|
|
4640
|
-
return result;
|
|
4641
|
-
};
|
|
4642
5031
|
function FiltersToolbarImpl(props) {
|
|
4643
5032
|
const { filters, tableState, setTableState, size = (settings.filtersPanel.sizes.default) } = props;
|
|
4644
5033
|
const [newFilterId, setNewFilterId] = React.useState(null);
|
|
@@ -4671,8 +5060,8 @@ function FiltersToolbarImpl(props) {
|
|
|
4671
5060
|
filter: newFilter,
|
|
4672
5061
|
});
|
|
4673
5062
|
};
|
|
4674
|
-
const handleFilterChange = (newFilter) => {
|
|
4675
|
-
const filter = normalizeFilterWithPredicates({ ...tableState.filter,
|
|
5063
|
+
const handleFilterChange = (newFilter, field) => {
|
|
5064
|
+
const filter = normalizeFilterWithPredicates({ ...tableState.filter, [field]: newFilter });
|
|
4676
5065
|
setTableState({
|
|
4677
5066
|
...tableState,
|
|
4678
5067
|
filter: filter,
|
|
@@ -4721,7 +5110,7 @@ function FiltersToolbarImpl(props) {
|
|
|
4721
5110
|
}, [newFilterId, sortedActiveFilters]);
|
|
4722
5111
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
4723
5112
|
sortedActiveFilters.map((f) => (React__namespace.default.createElement(uuiComponents.FlexCell, { width: "auto", key: f.field },
|
|
4724
|
-
React__namespace.default.createElement(FiltersPanelItem, { ...f, value: tableState.filter?.[f.field], onValueChange: handleFilterChange, key: f.field, autoFocus: newFilterId === f.field, removeFilter: removeFilter, size: size })))),
|
|
5113
|
+
React__namespace.default.createElement(FiltersPanelItem, { ...f, value: tableState.filter?.[f.field], onValueChange: (newFilter) => handleFilterChange(newFilter, f.field), key: f.field, autoFocus: newFilterId === f.field, removeFilter: removeFilter, size: size })))),
|
|
4725
5114
|
!isAllFiltersAlwaysVisible && (React__namespace.default.createElement(PickerInput, { dataSource: dataSource, value: selectedFilters, onValueChange: onFiltersChange, selectionMode: "multi", valueType: "entity", renderRow: (props) => (React__namespace.default.createElement(DataPickerRow, { ...props, padding: "12", key: props.key, onCheck: (row) => {
|
|
4726
5115
|
props.onCheck && props.onCheck(row);
|
|
4727
5116
|
setNewFilterId(row.value.field);
|
|
@@ -4729,7 +5118,7 @@ function FiltersToolbarImpl(props) {
|
|
|
4729
5118
|
}
|
|
4730
5119
|
const FiltersPanel = /* @__PURE__ */React__namespace.default.memo(FiltersToolbarImpl);
|
|
4731
5120
|
|
|
4732
|
-
var css$
|
|
5121
|
+
var css$k = {"delete-button":"G-vsF6","deleteButton":"G-vsF6","tab-button":"ukt8Jm","tabButton":"ukt8Jm","targetOpen":"ON2vdE"};
|
|
4733
5122
|
|
|
4734
5123
|
function PresetActionsDropdown(props) {
|
|
4735
5124
|
const { uuiNotifications } = uuiCore.useUuiContext();
|
|
@@ -4788,416 +5177,123 @@ function PresetActionsDropdown(props) {
|
|
|
4788
5177
|
React__namespace.default.createElement(DropdownMenuButton, { key: `${props.preset.id}-copyLink`, icon: settings.presetsPanel.icons.copyLinkIcon, caption: "Copy Link", onClick: copyUrlToClipboard }),
|
|
4789
5178
|
!isReadonlyPreset && (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
4790
5179
|
React__namespace.default.createElement(DropdownMenuSplitter, { key: "delete-splitter" }),
|
|
4791
|
-
React__namespace.default.createElement(DropdownMenuButton, { icon: settings.presetsPanel.icons.deleteIcon, caption: "Delete", cx: css$
|
|
5180
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: settings.presetsPanel.icons.deleteIcon, caption: "Delete", cx: css$k.deleteButton, onClick: deleteHandler })))));
|
|
4792
5181
|
};
|
|
4793
5182
|
const renderTarget = React.useCallback((dropdownProps) => {
|
|
4794
|
-
return (React__namespace.default.createElement(IconButton, { cx: [css$
|
|
4795
|
-
}, []);
|
|
4796
|
-
return (React__namespace.default.createElement(Dropdown, { renderBody: renderBody, renderTarget: renderTarget, placement: "bottom-end", middleware: [react.offset(22)] }));
|
|
4797
|
-
}
|
|
4798
|
-
|
|
4799
|
-
const UUI_PRESETS_PANEL_ADD_BUTTON = 'uui-presets-panel-add-button';
|
|
4800
|
-
const UUI_PRESETS_PANEL_MORE_BUTTON = 'uui-presets-panel-more-button';
|
|
4801
|
-
const UUI_PRESETS_PANEL_INPUT = 'uui-presets-panel-input';
|
|
4802
|
-
const UUI_PRESETS_PANEL_PRESET = 'uui-presets-panel-preset';
|
|
4803
|
-
|
|
4804
|
-
var css$o = {"preset-input-cell":"YV-mX-","presetInputCell":"YV-mX-","preset-input":"cp3R-D","presetInput":"cp3R-D"};
|
|
4805
|
-
|
|
4806
|
-
function PresetInput(props) {
|
|
4807
|
-
const [presetCaption, setPresetCaption] = React.useState(props.preset?.name || '');
|
|
4808
|
-
const [readonly, setReadonly] = React.useState(false);
|
|
4809
|
-
const cancelActionHandler = React.useCallback(() => {
|
|
4810
|
-
setPresetCaption('');
|
|
4811
|
-
props.onCancel();
|
|
4812
|
-
}, [props.onCancel]);
|
|
4813
|
-
const acceptActionHandler = React.useCallback(async () => {
|
|
4814
|
-
setReadonly(() => true);
|
|
4815
|
-
if (presetCaption) {
|
|
4816
|
-
await props.onSuccess(presetCaption);
|
|
4817
|
-
}
|
|
4818
|
-
props.onCancel();
|
|
4819
|
-
setReadonly(() => false);
|
|
4820
|
-
}, [presetCaption]);
|
|
4821
|
-
const newPresetOnBlurHandler = React.useCallback(() => {
|
|
4822
|
-
if (presetCaption.length) {
|
|
4823
|
-
return;
|
|
4824
|
-
}
|
|
4825
|
-
props.onCancel();
|
|
4826
|
-
}, [presetCaption.length, props.onCancel]);
|
|
4827
|
-
return (React__namespace.default.createElement(FlexCell, { cx: [css$o.presetInputCell, UUI_PRESETS_PANEL_INPUT], minWidth: 180 },
|
|
4828
|
-
React__namespace.default.createElement(TextInput, { cx: css$o.presetInput, onValueChange: setPresetCaption, value: presetCaption, onCancel: cancelActionHandler, onAccept: acceptActionHandler, onBlur: newPresetOnBlurHandler, autoFocus: true, maxLength: 50, isReadonly: readonly })));
|
|
4829
|
-
}
|
|
4830
|
-
|
|
4831
|
-
var css$n = {"preset":"v4dEih","activePreset":"GQBEYQ"};
|
|
4832
|
-
|
|
4833
|
-
function Preset(props) {
|
|
4834
|
-
const [isRenamePreset, setIsRenamePreset] = React.useState(false);
|
|
4835
|
-
const choosePresetHandler = React.useCallback(() => props.choosePreset(props.preset), [props]);
|
|
4836
|
-
const cancelRenamePreset = React.useCallback(() => {
|
|
4837
|
-
setIsRenamePreset(() => false);
|
|
4838
|
-
}, []);
|
|
4839
|
-
const setPresetForRename = React.useCallback(() => {
|
|
4840
|
-
if (!isRenamePreset) {
|
|
4841
|
-
setIsRenamePreset(() => true);
|
|
4842
|
-
}
|
|
4843
|
-
}, []);
|
|
4844
|
-
const handlePresetRename = React.useCallback((name) => {
|
|
4845
|
-
const newPreset = {
|
|
4846
|
-
...props.preset,
|
|
4847
|
-
name: name,
|
|
4848
|
-
};
|
|
4849
|
-
return props.updatePreset(newPreset);
|
|
4850
|
-
}, [props.preset]);
|
|
4851
|
-
const isPresetActive = props.activePresetId === props.preset.id;
|
|
4852
|
-
const PresetActionsDropdownComponent = React.useCallback(() => React__namespace.default.createElement(PresetActionsDropdown, { renamePreset: setPresetForRename, ...props }), [props.preset, props.tableState, props.activePresetId]);
|
|
4853
|
-
return (React__namespace.default.createElement(FlexCell, { key: props.preset.id, alignSelf: "center", width: "auto" }, isRenamePreset ? (React__namespace.default.createElement(PresetInput, { onCancel: cancelRenamePreset, onSuccess: handlePresetRename, preset: props.preset })) : (React__namespace.default.createElement(TabButton, { caption: props.preset.name, onClick: !isPresetActive && choosePresetHandler, cx: [css$n.preset, isPresetActive && css$n.activePreset, UUI_PRESETS_PANEL_PRESET], size: settings.presetsPanel.sizes.tabButton, withNotify: isPresetActive && props.hasPresetChanged(props.preset), icon: PresetActionsDropdownComponent, iconPosition: "right", isLinkActive: isPresetActive }))));
|
|
4854
|
-
}
|
|
4855
|
-
|
|
4856
|
-
var css$m = {"divider":"TG-HIb","dropdownDeleteIcon":"TXplNC","presetsWrapper":"pG6E8M","addPresetContainer":"nEdkxo","dropContainer":"cTodOA"};
|
|
4857
|
-
|
|
4858
|
-
function PresetsPanel(props) {
|
|
4859
|
-
const [isAddingPreset, setIsAddingPreset] = React.useState(false);
|
|
4860
|
-
const setAddingPreset = React.useCallback(() => {
|
|
4861
|
-
setIsAddingPreset(true);
|
|
4862
|
-
}, []);
|
|
4863
|
-
const cancelAddingPreset = React.useCallback(() => {
|
|
4864
|
-
setIsAddingPreset(false);
|
|
4865
|
-
}, []);
|
|
4866
|
-
const { presets, ...presetApi } = props;
|
|
4867
|
-
const renderPreset = (preset) => {
|
|
4868
|
-
return React__namespace.default.createElement(Preset, { key: preset.id, preset: preset, addPreset: setAddingPreset, ...presetApi });
|
|
4869
|
-
};
|
|
4870
|
-
const renderAddPresetButton = React.useCallback(() => {
|
|
4871
|
-
return (React__namespace.default.createElement("div", { key: "addingPresetBlock", className: css$m.addPresetContainer }, !isAddingPreset ? (React__namespace.default.createElement(Button, { cx: UUI_PRESETS_PANEL_ADD_BUTTON, onClick: setAddingPreset, caption: i18n.presetPanel.addCaption, icon: settings.presetsPanel.icons.addIcon, iconPosition: "left", fill: "ghost", color: "primary" })) : (React__namespace.default.createElement(PresetInput, { onCancel: cancelAddingPreset, onSuccess: props.createNewPreset }))));
|
|
4872
|
-
}, [isAddingPreset]);
|
|
4873
|
-
const onPresetDropdownSelect = (preset) => {
|
|
4874
|
-
props.choosePreset(preset.preset);
|
|
4875
|
-
};
|
|
4876
|
-
const renderMoreButtonDropdown = (item, hiddenItems) => {
|
|
4877
|
-
return (React__namespace.default.createElement(Dropdown, { key: "more", renderTarget: (props) => (React__namespace.default.createElement(FlexRow, null,
|
|
4878
|
-
React__namespace.default.createElement("div", { className: css$m.divider }),
|
|
4879
|
-
React__namespace.default.createElement(Button, { cx: UUI_PRESETS_PANEL_MORE_BUTTON, fill: "ghost", color: "secondary", caption: `${hiddenItems?.length || ''} more`, ...props }))), renderBody: (propsBody) => (React__namespace.default.createElement(DropdownMenuBody, { minWidth: 230, maxHeight: 300, ...propsBody },
|
|
4880
|
-
React__namespace.default.createElement(ScrollBars, null, hiddenItems.map((hiddenItem) => (React__namespace.default.createElement(DropdownMenuButton, { key: hiddenItem.preset.id, onClick: () => onPresetDropdownSelect(hiddenItem), caption: hiddenItem.preset.name, icon: !hiddenItem.preset.isReadonly && settings.presetsPanel.icons.deleteIcon, iconPosition: "right", cx: css$m.dropdownDeleteIcon, onIconClick: !hiddenItem.preset.isReadonly && (() => props.deletePreset(hiddenItem.preset)) })))))) }));
|
|
4881
|
-
};
|
|
4882
|
-
const getPresetPriority = (preset, index) => {
|
|
4883
|
-
return preset.id === props.activePresetId ? 100499 : 1000 - index;
|
|
4884
|
-
};
|
|
4885
|
-
const getPanelItems = () => {
|
|
4886
|
-
return [
|
|
4887
|
-
...uuiCore.orderBy(props.presets, ({ order }) => order)
|
|
4888
|
-
.map((preset, index) => ({
|
|
4889
|
-
id: preset.id.toString(),
|
|
4890
|
-
render: () => renderPreset(preset),
|
|
4891
|
-
priority: getPresetPriority(preset, index),
|
|
4892
|
-
preset: preset,
|
|
4893
|
-
})),
|
|
4894
|
-
{
|
|
4895
|
-
id: 'collapsedContainer', render: renderMoreButtonDropdown, priority: 100501, collapsedContainer: true,
|
|
4896
|
-
},
|
|
4897
|
-
{ id: 'addPreset', render: renderAddPresetButton, priority: 100501 },
|
|
4898
|
-
];
|
|
4899
|
-
};
|
|
4900
|
-
return (React__namespace.default.createElement(FlexCell, { grow: 1, minWidth: 310, rawProps: props.rawProps },
|
|
4901
|
-
React__namespace.default.createElement(FlexRow, { size: null, columnGap: "12", cx: css$m.presetsWrapper },
|
|
4902
|
-
React__namespace.default.createElement(uuiComponents.AdaptivePanel, { items: getPanelItems() }))));
|
|
4903
|
-
}
|
|
4904
|
-
|
|
4905
|
-
const defaultPredicates = {
|
|
4906
|
-
numeric: [
|
|
4907
|
-
{ predicate: 'eq', name: '=', isDefault: true }, { predicate: 'neq', name: '≠' }, { predicate: 'lte', name: '≤' }, { predicate: 'gte', name: '≥' }, { predicate: 'inRange', name: 'In Range' },
|
|
4908
|
-
],
|
|
4909
|
-
multiPicker: [{ predicate: 'in', name: 'is', isDefault: true }, { predicate: 'nin', name: 'is not' }],
|
|
4910
|
-
rangeDatePicker: [{ predicate: 'inRange', name: 'In Range', isDefault: true }, { predicate: 'notInRange', name: 'Not in Range' }],
|
|
4911
|
-
};
|
|
4912
|
-
|
|
4913
|
-
const useColumnsWithFilters = (initialColumns, filters) => {
|
|
4914
|
-
const makeFilterRenderCallback = React.useCallback((key) => function (filterLens, dropdownProps) {
|
|
4915
|
-
const filter = filters?.find((f) => f.columnKey === key);
|
|
4916
|
-
if (!filter)
|
|
4917
|
-
return null;
|
|
4918
|
-
const props = filterLens.prop(filter.field).toProps();
|
|
4919
|
-
return React__namespace.default.createElement(FilterItemBody, { ...props, ...filter, ...dropdownProps });
|
|
4920
|
-
}, [filters]);
|
|
4921
|
-
const columns = React.useMemo(() => {
|
|
4922
|
-
if (filters) {
|
|
4923
|
-
const filterKeys = filters.map((f) => f.columnKey);
|
|
4924
|
-
const newColumns = (initialColumns.map((column) => {
|
|
4925
|
-
if (filterKeys.includes(column.key)) {
|
|
4926
|
-
return {
|
|
4927
|
-
...column,
|
|
4928
|
-
renderFilter: makeFilterRenderCallback(column.key),
|
|
4929
|
-
};
|
|
4930
|
-
}
|
|
4931
|
-
else {
|
|
4932
|
-
return column;
|
|
4933
|
-
}
|
|
4934
|
-
}));
|
|
4935
|
-
return newColumns;
|
|
4936
|
-
}
|
|
4937
|
-
return initialColumns;
|
|
4938
|
-
}, [filters, initialColumns]);
|
|
4939
|
-
return columns;
|
|
4940
|
-
};
|
|
4941
|
-
|
|
4942
|
-
var css$l = {"unpin-icon":"XM3Xu-","unpinIcon":"XM3Xu-","pin-toggler-icon":"NF9tuf","pinTogglerIcon":"NF9tuf"};
|
|
4943
|
-
|
|
4944
|
-
function PinIconButton(props) {
|
|
4945
|
-
const i18nLocal = i18n.tables.columnsConfigurationModal;
|
|
4946
|
-
const { onTogglePin, pinPosition, canUnpin, } = props;
|
|
4947
|
-
const isPinned = !!pinPosition;
|
|
4948
|
-
const isPinnedAlways = isPinned && !canUnpin;
|
|
4949
|
-
let pinUnpinNode;
|
|
4950
|
-
if (isPinned) {
|
|
4951
|
-
const unpinIcon = getUnpinIcon({ isPinnedAlways, pinPosition });
|
|
4952
|
-
const iconTooltip = isPinnedAlways ? i18nLocal.lockedColumnPinButton : i18nLocal.unPinColumnButton;
|
|
4953
|
-
const unpinClickHandler = isPinnedAlways ? undefined : () => onTogglePin(undefined);
|
|
4954
|
-
pinUnpinNode = (React__namespace.createElement(Tooltip, { content: iconTooltip, placement: "bottom", color: "inverted" },
|
|
4955
|
-
React__namespace.createElement(IconButton, { cx: uuiCore.cx(!isPinnedAlways && css$l.unpinIcon, css$l.pinTogglerIcon), icon: unpinIcon, onClick: unpinClickHandler, isDisabled: isPinnedAlways, color: "primary" })));
|
|
4956
|
-
}
|
|
4957
|
-
else {
|
|
4958
|
-
pinUnpinNode = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4959
|
-
React__namespace.createElement(Tooltip, { content: i18nLocal.pinColumnToTheLeftButton, placement: "bottom", color: "inverted" },
|
|
4960
|
-
React__namespace.createElement(IconButton, { cx: css$l.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon, onClick: () => onTogglePin('left'), isDisabled: isPinnedAlways })),
|
|
4961
|
-
React__namespace.createElement(Tooltip, { content: i18nLocal.pinColumnToTheRightButton, placement: "bottom", color: "inverted" },
|
|
4962
|
-
React__namespace.createElement(IconButton, { cx: css$l.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinRightIcon, onClick: () => onTogglePin('right'), isDisabled: isPinnedAlways }))));
|
|
4963
|
-
}
|
|
4964
|
-
return pinUnpinNode;
|
|
4965
|
-
}
|
|
4966
|
-
function getUnpinIcon(params) {
|
|
4967
|
-
const { isPinnedAlways, pinPosition } = params;
|
|
4968
|
-
if (isPinnedAlways) {
|
|
4969
|
-
return settings.dataTable.icons.columnsConfigurationModal.lockIcon;
|
|
4970
|
-
}
|
|
4971
|
-
switch (pinPosition) {
|
|
4972
|
-
case 'left': {
|
|
4973
|
-
return settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon;
|
|
4974
|
-
}
|
|
4975
|
-
case 'right': {
|
|
4976
|
-
return settings.dataTable.icons.columnsConfigurationModal.pinRightIcon;
|
|
4977
|
-
}
|
|
4978
|
-
default: {
|
|
4979
|
-
return;
|
|
4980
|
-
}
|
|
4981
|
-
}
|
|
5183
|
+
return (React__namespace.default.createElement(IconButton, { cx: [css$k.tabButton, dropdownProps.isOpen && css$k.targetOpen], color: props.preset.id === props.activePresetId ? 'primary' : 'neutral', ...dropdownProps, icon: settings.presetsPanel.icons.menuIcon, size: settings.presetsPanel.sizes.dropdownTargetIconButton }));
|
|
5184
|
+
}, []);
|
|
5185
|
+
return (React__namespace.default.createElement(Dropdown, { renderBody: renderBody, renderTarget: renderTarget, placement: "bottom-end", middleware: [react.offset(22)] }));
|
|
4982
5186
|
}
|
|
4983
5187
|
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
const
|
|
4987
|
-
|
|
4988
|
-
const { toggleVisibility, togglePin, onCanAcceptDrop, onDrop, columnConfig, isDndAllowed, isPinnedAlways, } = column;
|
|
4989
|
-
const { isVisible, fix } = columnConfig;
|
|
4990
|
-
const pinPosition = fix || (isPinnedAlways ? 'left' : undefined);
|
|
4991
|
-
const isPinned = !!pinPosition;
|
|
4992
|
-
const data = { column, columnConfig };
|
|
4993
|
-
const renderContent = (dndActorParams) => {
|
|
4994
|
-
const wrapperClasses = uuiCore.cx(css$k.rowWrapper, !isPinned && css$k.notPinned, dndActorParams.isDragGhost && uuiCore.uuiDndState.dragGhost, 'uui-dt-columns-config-row');
|
|
4995
|
-
const { onTouchStart, onPointerDown, ...restEventHandlers } = dndActorParams.eventHandlers;
|
|
4996
|
-
const { ref, ...dndActorPropsWithoutRef } = dndActorParams;
|
|
4997
|
-
return (React__namespace.createElement(FlexRow, { size: settings.dataTable.sizes.columnsConfigurationModal.columnRow, cx: wrapperClasses, ref: dndActorParams.ref, rawProps: { ...restEventHandlers }, alignItems: "top" },
|
|
4998
|
-
React__namespace.createElement(uuiComponents.DragHandle, { dragHandleIcon: settings.dataTable.icons.columnsConfigurationModal.dragIndicator, rawProps: { onTouchStart, onPointerDown }, isDisabled: !isDndAllowed, cx: uuiCore.cx(css$k.dragHandle, !isDndAllowed && css$k.dndDisabled) }),
|
|
4999
|
-
React__namespace.createElement(Checkbox, { key: column.key, label: props.renderItem ? props.renderItem(props.column) : column.caption, value: isVisible, onValueChange: toggleVisibility, isReadonly: column.isAlwaysVisible || column.isLocked, cx: css$k.checkbox }),
|
|
5000
|
-
React__namespace.createElement(FlexRow, { size: null, cx: css$k.pinIconButton },
|
|
5001
|
-
React__namespace.createElement(PinIconButton, { pinPosition: pinPosition, canUnpin: !isPinnedAlways, onTogglePin: togglePin })),
|
|
5002
|
-
React__namespace.createElement(DropMarker, { ...dndActorPropsWithoutRef })));
|
|
5003
|
-
};
|
|
5004
|
-
return (React__namespace.createElement(uuiCore.DndActor, { key: column.key, srcData: isDndAllowed && data, dstData: data, canAcceptDrop: onCanAcceptDrop, onDrop: onDrop, render: renderContent }));
|
|
5005
|
-
});
|
|
5188
|
+
const UUI_PRESETS_PANEL_ADD_BUTTON = 'uui-presets-panel-add-button';
|
|
5189
|
+
const UUI_PRESETS_PANEL_MORE_BUTTON = 'uui-presets-panel-more-button';
|
|
5190
|
+
const UUI_PRESETS_PANEL_INPUT = 'uui-presets-panel-input';
|
|
5191
|
+
const UUI_PRESETS_PANEL_PRESET = 'uui-presets-panel-preset';
|
|
5006
5192
|
|
|
5007
|
-
var css$j = {"
|
|
5193
|
+
var css$j = {"preset-input-cell":"_-5vEGf","presetInputCell":"_-5vEGf","preset-input":"SMKs80","presetInput":"SMKs80"};
|
|
5008
5194
|
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
const
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
getSearchFields: props.getSearchFields,
|
|
5021
|
-
});
|
|
5022
|
-
const apply = React.useCallback(() => modalProps.success(columnsConfig), [columnsConfig, modalProps]);
|
|
5023
|
-
const close = React.useCallback(() => modalProps.abort(), [modalProps]);
|
|
5024
|
-
const isNoData = React.useMemo(() => Object.values(groupedColumns).every((v) => !v.length), [groupedColumns]);
|
|
5025
|
-
const renderVisible = () => {
|
|
5026
|
-
const amountPinnedLeft = groupedColumns.displayedPinnedLeft.length;
|
|
5027
|
-
const amountPinnedRight = groupedColumns.displayedPinnedRight.length;
|
|
5028
|
-
const amountUnPinned = groupedColumns.displayedUnpinned.length;
|
|
5029
|
-
const totalAmountOfVisibleColumns = amountPinnedLeft + amountUnPinned + amountPinnedRight;
|
|
5030
|
-
if (!totalAmountOfVisibleColumns) {
|
|
5031
|
-
return null;
|
|
5032
|
-
}
|
|
5033
|
-
const hasDividerBelowPinnedLeft = !!(amountPinnedLeft && amountUnPinned);
|
|
5034
|
-
const hasDividerAbovePinnedRight = !!(amountPinnedRight && amountUnPinned);
|
|
5035
|
-
const divider = (React__namespace.createElement(FlexRow, { size: null, cx: css$j.hDivider }));
|
|
5036
|
-
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
5037
|
-
renderGroupTitle(i18n$1.displayedSectionTitle, totalAmountOfVisibleColumns),
|
|
5038
|
-
React__namespace.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.pinnedToTheLeftSubgroupTitle, items: groupedColumns.displayedPinnedLeft }),
|
|
5039
|
-
hasDividerBelowPinnedLeft && divider,
|
|
5040
|
-
React__namespace.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.notPinnedSubgroupTitle, items: groupedColumns.displayedUnpinned }),
|
|
5041
|
-
hasDividerAbovePinnedRight && divider,
|
|
5042
|
-
React__namespace.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.pinnedToTheRightSubgroupTitle, items: groupedColumns.displayedPinnedRight })));
|
|
5043
|
-
};
|
|
5044
|
-
const renderHidden = () => {
|
|
5045
|
-
const items = groupedColumns.hidden;
|
|
5046
|
-
const title = renderGroupTitle(i18n$1.hiddenSectionTitle, items.length);
|
|
5047
|
-
if (!items.length) {
|
|
5048
|
-
return null;
|
|
5195
|
+
function PresetInput(props) {
|
|
5196
|
+
const [presetCaption, setPresetCaption] = React.useState(props.preset?.name || '');
|
|
5197
|
+
const [readonly, setReadonly] = React.useState(false);
|
|
5198
|
+
const cancelActionHandler = React.useCallback(() => {
|
|
5199
|
+
setPresetCaption('');
|
|
5200
|
+
props.onCancel();
|
|
5201
|
+
}, [props.onCancel]);
|
|
5202
|
+
const acceptActionHandler = React.useCallback(async () => {
|
|
5203
|
+
setReadonly(() => true);
|
|
5204
|
+
if (presetCaption) {
|
|
5205
|
+
await props.onSuccess(presetCaption);
|
|
5049
5206
|
}
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
React__namespace.createElement(ModalWindow, { cx: [css$j.root, 'uui-columns-config-modal'], height: "95dvh", maxHeight: "95dvh" },
|
|
5057
|
-
React__namespace.createElement(ModalHeader, { title: i18n$1.configureColumnsTitle, onClose: close }),
|
|
5058
|
-
React__namespace.createElement(FlexRow, { borderBottom: true, cx: css$j.searchArea },
|
|
5059
|
-
React__namespace.createElement(SearchInput, { size: settings.dataTable.sizes.columnsConfigurationModal.searchInput, value: searchValue, onValueChange: setSearchValue, placeholder: i18n$1.searchPlaceholder }),
|
|
5060
|
-
React__namespace.createElement(Dropdown, { closeOnTargetClick: true, renderBody: () => (React__namespace.createElement(DropdownMenuBody, { minWidth: 100 },
|
|
5061
|
-
React__namespace.createElement(DropdownMenuButton, { caption: i18n$1.clearAllButton, onClick: uncheckAll }),
|
|
5062
|
-
React__namespace.createElement(DropdownMenuButton, { caption: i18n$1.selectAllButton, onClick: checkAll }))), renderTarget: (props) => (React__namespace.createElement(Button, { ...props, fill: "none", icon: settings.dataTable.icons.columnsConfigurationModal.menuIcon, size: settings.dataTable.sizes.columnsConfigurationModal.menuButton, color: "secondary", isDropdown: false })) })),
|
|
5063
|
-
React__namespace.createElement(Panel, { background: "surface-main", cx: css$j.mainPanel },
|
|
5064
|
-
React__namespace.createElement(ScrollBars, null,
|
|
5065
|
-
renderVisible(),
|
|
5066
|
-
renderHidden(),
|
|
5067
|
-
isNoData && (React__namespace.createElement(FlexRow, { cx: css$j.noData },
|
|
5068
|
-
React__namespace.createElement(Text, { cx: css$j.noDataTitle }, i18n$1.noResultsFound.title),
|
|
5069
|
-
React__namespace.createElement(Text, { cx: css$j.noDataSubTitle }, i18n$1.noResultsFound.subTitle))))),
|
|
5070
|
-
React__namespace.createElement(ModalFooter, { borderTop: true },
|
|
5071
|
-
React__namespace.createElement(LinkButton, { icon: settings.dataTable.icons.columnsConfigurationModal.resetIcon, caption: i18n$1.resetToDefaultButton, onClick: reset }),
|
|
5072
|
-
React__namespace.createElement(uuiComponents.FlexSpacer, null),
|
|
5073
|
-
React__namespace.createElement(Button, { fill: "none", color: "secondary", caption: i18n$1.cancelButton, onClick: close }),
|
|
5074
|
-
!hasAnySelectedColumns ? (React__namespace.createElement(Tooltip, { content: i18n$1.enableAtLeastOneColumnMessage, placement: "top-end", color: "critical" }, applyButton)) : (applyButton)))));
|
|
5075
|
-
}
|
|
5076
|
-
function SubGroup(props) {
|
|
5077
|
-
const [isExpanded, setIsExpanded] = React.useState(true);
|
|
5078
|
-
const { title, items, renderItem } = props;
|
|
5079
|
-
const isCollapsible = !!title;
|
|
5080
|
-
if (items.length) {
|
|
5081
|
-
const content = (React__namespace.createElement(FlexRow, { cx: css$j.groupItems, size: settings.dataTable.sizes.columnsConfigurationModal.columnRow }, items.map((c) => (React__namespace.createElement(ColumnRow, { column: c, key: c.key, renderItem: renderItem })))));
|
|
5082
|
-
if (isCollapsible) {
|
|
5083
|
-
const renderTitle = (isOpened) => {
|
|
5084
|
-
const toggleIcon = settings.dataTable.icons.columnsConfigurationModal[isOpened ? 'expandedIcon' : 'collapsedIcon'];
|
|
5085
|
-
return (React__namespace.createElement(FlexRow, { cx: uuiCore.cx(css$j.subgroup) },
|
|
5086
|
-
React__namespace.createElement(uuiComponents.IconContainer, { icon: toggleIcon }),
|
|
5087
|
-
React__namespace.createElement(Text, { size: "none", color: "tertiary", cx: css$j.subgroupTitle }, title)));
|
|
5088
|
-
};
|
|
5089
|
-
return (React__namespace.createElement(uuiComponents.Accordion, { value: isExpanded, onValueChange: setIsExpanded, renderTitle: renderTitle, cx: css$j.subgroupAccordion }, content));
|
|
5207
|
+
props.onCancel();
|
|
5208
|
+
setReadonly(() => false);
|
|
5209
|
+
}, [presetCaption]);
|
|
5210
|
+
const newPresetOnBlurHandler = React.useCallback(() => {
|
|
5211
|
+
if (presetCaption.length) {
|
|
5212
|
+
return;
|
|
5090
5213
|
}
|
|
5091
|
-
|
|
5092
|
-
}
|
|
5093
|
-
return
|
|
5214
|
+
props.onCancel();
|
|
5215
|
+
}, [presetCaption.length, props.onCancel]);
|
|
5216
|
+
return (React__namespace.default.createElement(FlexCell, { cx: [css$j.presetInputCell, UUI_PRESETS_PANEL_INPUT], minWidth: 180 },
|
|
5217
|
+
React__namespace.default.createElement(TextInput, { cx: css$j.presetInput, onValueChange: setPresetCaption, value: presetCaption, onCancel: cancelActionHandler, onAccept: acceptActionHandler, onBlur: newPresetOnBlurHandler, autoFocus: true, maxLength: 50, isReadonly: readonly })));
|
|
5094
5218
|
}
|
|
5095
5219
|
|
|
5096
|
-
|
|
5097
|
-
const firstNotChildIndex = rows.findIndex((other) => other.depth < row.depth || (row.depth === other.depth && other.isPinned));
|
|
5098
|
-
if (firstNotChildIndex === -1) {
|
|
5099
|
-
return [rows, []];
|
|
5100
|
-
}
|
|
5101
|
-
if (firstNotChildIndex === 0) {
|
|
5102
|
-
return [[], rows];
|
|
5103
|
-
}
|
|
5104
|
-
const children = rows.slice(0, firstNotChildIndex);
|
|
5105
|
-
const rest = rows.slice(firstNotChildIndex, rows.length);
|
|
5106
|
-
return [children, rest];
|
|
5107
|
-
};
|
|
5108
|
-
|
|
5109
|
-
var css$i = {"listContainer":"O-A1s0","header":"Q3P5sV","group":"j-Z6lo","stickyHeader":"bLkOtn"};
|
|
5110
|
-
|
|
5111
|
-
function DataRowsGroup({ row, childRows, renderRow, top = 1, }) {
|
|
5112
|
-
const rowRef = React.useRef(undefined);
|
|
5113
|
-
const childrenPinnedTop = row.isPinned ? (top + (rowRef.current?.clientHeight ?? 0)) : top;
|
|
5114
|
-
return (React__namespace.default.createElement("div", { className: css$i.group, key: row.rowKey },
|
|
5115
|
-
React__namespace.default.createElement("div", { className: row.isPinned ? css$i.stickyHeader : css$i.header,
|
|
5116
|
-
// Gaps between pinned parents should be removed by -1 from top height.
|
|
5117
|
-
// Otherwise, sometimes top value is rounded top.
|
|
5118
|
-
style: { zIndex: row.depth + 10, top: top - 1 }, ref: rowRef }, renderRow(row)),
|
|
5119
|
-
childRows.length > 0 && (React__namespace.default.createElement("div", null,
|
|
5120
|
-
React__namespace.default.createElement(DataRowsGroups, { rows: childRows, renderRow: renderRow, top: childrenPinnedTop })))));
|
|
5121
|
-
}
|
|
5122
|
-
const renderRows = (rows, renderRow, top) => {
|
|
5123
|
-
if (!rows.length)
|
|
5124
|
-
return [];
|
|
5125
|
-
const [row, ...rest] = rows;
|
|
5126
|
-
if (!rest.length) {
|
|
5127
|
-
return [renderRow(row)];
|
|
5128
|
-
}
|
|
5129
|
-
const [next] = rest;
|
|
5130
|
-
if (next.depth <= row.depth && !row.isPinned) {
|
|
5131
|
-
return [renderRow(row)].concat(renderRows(rest, renderRow, top));
|
|
5132
|
-
}
|
|
5133
|
-
const [children, otherRows] = getChildrenAndRest(row, rest);
|
|
5134
|
-
const group = (React__namespace.default.createElement(DataRowsGroup, { row: row, childRows: children, renderRow: renderRow, top: top, key: row.rowKey }));
|
|
5135
|
-
return [group].concat(renderRows(otherRows, renderRow, top));
|
|
5136
|
-
};
|
|
5137
|
-
function DataRowsGroups({ rows, renderRow, top = 1, }) {
|
|
5138
|
-
const rowsWithGroups = renderRows(rows, renderRow, top);
|
|
5139
|
-
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
5140
|
-
return (React__namespace.default.createElement(React__namespace.default.Fragment, null, rowsWithGroups));
|
|
5141
|
-
}
|
|
5220
|
+
var css$i = {"preset":"Bvv6qX","activePreset":"pJ2Nkh"};
|
|
5142
5221
|
|
|
5143
|
-
function
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5222
|
+
function Preset(props) {
|
|
5223
|
+
const [isRenamePreset, setIsRenamePreset] = React.useState(false);
|
|
5224
|
+
const choosePresetHandler = React.useCallback(() => props.choosePreset(props.preset), [props]);
|
|
5225
|
+
const cancelRenamePreset = React.useCallback(() => {
|
|
5226
|
+
setIsRenamePreset(() => false);
|
|
5227
|
+
}, []);
|
|
5228
|
+
const setPresetForRename = React.useCallback(() => {
|
|
5229
|
+
if (!isRenamePreset) {
|
|
5230
|
+
setIsRenamePreset(() => true);
|
|
5231
|
+
}
|
|
5232
|
+
}, []);
|
|
5233
|
+
const handlePresetRename = React.useCallback((name) => {
|
|
5234
|
+
const newPreset = {
|
|
5235
|
+
...props.preset,
|
|
5236
|
+
name: name,
|
|
5237
|
+
};
|
|
5238
|
+
return props.updatePreset(newPreset);
|
|
5239
|
+
}, [props.preset]);
|
|
5240
|
+
const isPresetActive = props.activePresetId === props.preset.id;
|
|
5241
|
+
const PresetActionsDropdownComponent = React.useCallback(() => React__namespace.default.createElement(PresetActionsDropdown, { renamePreset: setPresetForRename, ...props }), [props.preset, props.tableState, props.activePresetId]);
|
|
5242
|
+
return (React__namespace.default.createElement(FlexCell, { key: props.preset.id, alignSelf: "center", width: "auto" }, isRenamePreset ? (React__namespace.default.createElement(PresetInput, { onCancel: cancelRenamePreset, onSuccess: handlePresetRename, preset: props.preset })) : (React__namespace.default.createElement(TabButton, { caption: props.preset.name, onClick: !isPresetActive && choosePresetHandler, cx: [css$i.preset, isPresetActive && css$i.activePreset, UUI_PRESETS_PANEL_PRESET], size: settings.presetsPanel.sizes.tabButton, withNotify: isPresetActive && props.hasPresetChanged(props.preset), icon: PresetActionsDropdownComponent, iconPosition: "right", isLinkActive: isPresetActive }))));
|
|
5147
5243
|
}
|
|
5148
5244
|
|
|
5149
|
-
var css$h = {"
|
|
5245
|
+
var css$h = {"divider":"lnbSjC","dropdownDeleteIcon":"_4aIEmS","presetsWrapper":"mOOabL","addPresetContainer":"_5qCjcl","dropContainer":"_8-raMS"};
|
|
5150
5246
|
|
|
5151
|
-
function
|
|
5152
|
-
const
|
|
5153
|
-
const
|
|
5154
|
-
|
|
5155
|
-
const { columns, config, defaultConfig } = uuiCore.useColumnsConfig(columnsWithFilters, props.value?.columnsConfig);
|
|
5156
|
-
const defaultRenderRow = React__namespace.useCallback((rowProps) => {
|
|
5157
|
-
return (React__namespace.createElement(DataTableRow, { size: props.size || settings.dataTable.sizes.body.row, columnsGap: props.columnsGap, borderBottom: props.border, ...rowProps, key: rowProps.rowKey, cx: css$h.cell }));
|
|
5247
|
+
function PresetsPanel(props) {
|
|
5248
|
+
const [isAddingPreset, setIsAddingPreset] = React.useState(false);
|
|
5249
|
+
const setAddingPreset = React.useCallback(() => {
|
|
5250
|
+
setIsAddingPreset(true);
|
|
5158
5251
|
}, []);
|
|
5159
|
-
const
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
}
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5252
|
+
const cancelAddingPreset = React.useCallback(() => {
|
|
5253
|
+
setIsAddingPreset(false);
|
|
5254
|
+
}, []);
|
|
5255
|
+
const { presets, ...presetApi } = props;
|
|
5256
|
+
const renderPreset = (preset) => {
|
|
5257
|
+
return React__namespace.default.createElement(Preset, { key: preset.id, preset: preset, addPreset: setAddingPreset, ...presetApi });
|
|
5258
|
+
};
|
|
5259
|
+
const renderAddPresetButton = React.useCallback(() => {
|
|
5260
|
+
return (React__namespace.default.createElement("div", { key: "addingPresetBlock", className: css$h.addPresetContainer }, !isAddingPreset ? (React__namespace.default.createElement(Button, { cx: UUI_PRESETS_PANEL_ADD_BUTTON, onClick: setAddingPreset, caption: i18n.presetPanel.addCaption, icon: settings.presetsPanel.icons.addIcon, iconPosition: "left", fill: "ghost", color: "primary" })) : (React__namespace.default.createElement(PresetInput, { onCancel: cancelAddingPreset, onSuccess: props.createNewPreset }))));
|
|
5261
|
+
}, [isAddingPreset]);
|
|
5262
|
+
const onPresetDropdownSelect = (preset) => {
|
|
5263
|
+
props.choosePreset(preset.preset);
|
|
5264
|
+
};
|
|
5265
|
+
const renderMoreButtonDropdown = (item, hiddenItems) => {
|
|
5266
|
+
return (React__namespace.default.createElement(Dropdown, { key: "more", renderTarget: (props) => (React__namespace.default.createElement(FlexRow, null,
|
|
5267
|
+
React__namespace.default.createElement("div", { className: css$h.divider }),
|
|
5268
|
+
React__namespace.default.createElement(Button, { cx: UUI_PRESETS_PANEL_MORE_BUTTON, fill: "ghost", color: "secondary", caption: `${hiddenItems?.length || ''} more`, ...props }))), renderBody: (propsBody) => (React__namespace.default.createElement(DropdownMenuBody, { minWidth: 230, maxHeight: 300, ...propsBody },
|
|
5269
|
+
React__namespace.default.createElement(ScrollBars, null, hiddenItems.map((hiddenItem) => (React__namespace.default.createElement(DropdownMenuButton, { key: hiddenItem.preset.id, onClick: () => onPresetDropdownSelect(hiddenItem), caption: hiddenItem.preset.name, icon: !hiddenItem.preset.isReadonly && settings.presetsPanel.icons.deleteIcon, iconPosition: "right", cx: css$h.dropdownDeleteIcon, onIconClick: !hiddenItem.preset.isReadonly && (() => props.deletePreset(hiddenItem.preset)) })))))) }));
|
|
5270
|
+
};
|
|
5271
|
+
const getPresetPriority = (preset, index) => {
|
|
5272
|
+
return preset.id === props.activePresetId ? 100499 : 1000 - index;
|
|
5273
|
+
};
|
|
5274
|
+
const getPanelItems = () => {
|
|
5275
|
+
return [
|
|
5276
|
+
...uuiCore.orderBy(props.presets, ({ order }) => order)
|
|
5277
|
+
.map((preset, index) => ({
|
|
5278
|
+
id: preset.id.toString(),
|
|
5279
|
+
render: () => renderPreset(preset),
|
|
5280
|
+
priority: getPresetPriority(preset, index),
|
|
5281
|
+
preset: preset,
|
|
5282
|
+
})),
|
|
5283
|
+
{
|
|
5284
|
+
id: 'collapsedContainer', render: renderMoreButtonDropdown, priority: 100501, collapsedContainer: true,
|
|
5285
|
+
},
|
|
5286
|
+
{ id: 'addPreset', render: renderAddPresetButton, priority: 100501 },
|
|
5287
|
+
];
|
|
5288
|
+
};
|
|
5289
|
+
return (React__namespace.default.createElement(FlexCell, { grow: 1, minWidth: 310, rawProps: props.rawProps },
|
|
5290
|
+
React__namespace.default.createElement(FlexRow, { size: null, columnGap: "12", cx: css$h.presetsWrapper },
|
|
5291
|
+
React__namespace.default.createElement(uuiComponents.AdaptivePanel, { items: getPanelItems() }))));
|
|
5196
5292
|
}
|
|
5197
5293
|
|
|
5198
|
-
var css$g = {"root":"
|
|
5294
|
+
var css$g = {"root":"j88Ip7"};
|
|
5199
5295
|
|
|
5200
|
-
var css$f = {"root":"
|
|
5296
|
+
var css$f = {"root":"euSR2M","burger-content":"_5IoB7J","burgerContent":"_5IoB7J"};
|
|
5201
5297
|
|
|
5202
5298
|
var _path$3;
|
|
5203
5299
|
function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
|
|
@@ -5240,7 +5336,7 @@ var SvgNavigationArrowDownOutline = function SvgNavigationArrowDownOutline(props
|
|
|
5240
5336
|
};
|
|
5241
5337
|
var ForwardRef$2 = /*#__PURE__*/React.forwardRef(SvgNavigationArrowDownOutline);
|
|
5242
5338
|
|
|
5243
|
-
var css$e = {"root":"
|
|
5339
|
+
var css$e = {"root":"w3TTjw","button-primary":"_1g50KI","buttonPrimary":"_1g50KI","button-secondary":"OEj9qi","buttonSecondary":"OEj9qi","hasIcon":"baJGGE","dropdown":"_-0Tage"};
|
|
5244
5340
|
|
|
5245
5341
|
const BurgerButton = /* @__PURE__ */uuiCore.withMods(uuiComponents.Button, (props) => [
|
|
5246
5342
|
css$e.root,
|
|
@@ -5251,13 +5347,13 @@ const BurgerButton = /* @__PURE__ */uuiCore.withMods(uuiComponents.Button, (prop
|
|
|
5251
5347
|
props.icon && css$e.hasIcon,
|
|
5252
5348
|
], () => ({ dropdownIcon: ForwardRef$2, dropdownIconPosition: 'left', role: 'menuitem' }));
|
|
5253
5349
|
|
|
5254
|
-
var css$d = {"search-input":"
|
|
5350
|
+
var css$d = {"search-input":"UXbmGP","searchInput":"UXbmGP"};
|
|
5255
5351
|
|
|
5256
5352
|
function BurgerSearch(props) {
|
|
5257
5353
|
return (React__namespace.createElement(uuiComponents.TextInput, { cx: cx__default.default(css$d.searchInput, 'uui-main_menu-burger-search'), iconPosition: "left", icon: ForwardRef$M, placeholder: props.placeholder, value: props.value, onValueChange: props.onValueChange, onCancel: props.onCancel, cancelIcon: props.value && ForwardRef$Q }));
|
|
5258
5354
|
}
|
|
5259
5355
|
|
|
5260
|
-
var css$c = {"root":"
|
|
5356
|
+
var css$c = {"root":"_4P2Jz6","group-header":"EJCs7M","groupHeader":"EJCs7M","group-name":"_0ycmk9","groupName":"_0ycmk9","line":"ugRQT0"};
|
|
5261
5357
|
|
|
5262
5358
|
function BurgerGroupHeader(props) {
|
|
5263
5359
|
return (React__namespace.createElement("div", { className: cx__default.default(css$c.root, css$c.groupHeader, 'uui-burger-group-header') },
|
|
@@ -5265,7 +5361,7 @@ function BurgerGroupHeader(props) {
|
|
|
5265
5361
|
React__namespace.createElement("span", { className: css$c.groupName }, props.caption)));
|
|
5266
5362
|
}
|
|
5267
5363
|
|
|
5268
|
-
var css$b = {"root":"
|
|
5364
|
+
var css$b = {"root":"ddb9WL","type-primary":"NqVc-u","typePrimary":"NqVc-u","type-secondary":"-R06Pf","typeSecondary":"-R06Pf"};
|
|
5269
5365
|
|
|
5270
5366
|
const MainMenuButton = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
5271
5367
|
const { type, ...clickableProps } = props;
|
|
@@ -5287,7 +5383,7 @@ const MainMenuButton = /* @__PURE__ */React__namespace.forwardRef((props, ref) =
|
|
|
5287
5383
|
props.isDropdown && (React__namespace.createElement(uuiComponents.IconContainer, { icon: ForwardRef$P, flipY: props.isOpen }))));
|
|
5288
5384
|
});
|
|
5289
5385
|
|
|
5290
|
-
var css$a = {"dropdown-body":"
|
|
5386
|
+
var css$a = {"dropdown-body":"xeukO9","dropdownBody":"xeukO9"};
|
|
5291
5387
|
|
|
5292
5388
|
class MainMenuDropdown extends React__namespace.Component {
|
|
5293
5389
|
render() {
|
|
@@ -5346,12 +5442,12 @@ var SvgNavigationGlobalMenuOutlineOutline = function SvgNavigationGlobalMenuOutl
|
|
|
5346
5442
|
};
|
|
5347
5443
|
var ForwardRef$1 = /*#__PURE__*/React.forwardRef(SvgNavigationGlobalMenuOutlineOutline);
|
|
5348
5444
|
|
|
5349
|
-
var css$9 = {"global-menu-btn":"
|
|
5445
|
+
var css$9 = {"global-menu-btn":"CGxtfU","globalMenuBtn":"CGxtfU","global-menu-icon":"R4hrqd","globalMenuIcon":"R4hrqd"};
|
|
5350
5446
|
|
|
5351
5447
|
const GlobalMenu = /* @__PURE__ */React__namespace.forwardRef((props, ref) => (React__namespace.createElement("button", { ref: ref, id: "global_menu_toggle", className: cx__default.default(css$9.globalMenuBtn, props.cx), ...props.rawProps },
|
|
5352
5448
|
React__namespace.createElement(uuiComponents.IconContainer, { size: 36, icon: ForwardRef$1, cx: css$9.globalMenuIcon }))));
|
|
5353
5449
|
|
|
5354
|
-
var css$8 = {"container":"
|
|
5450
|
+
var css$8 = {"container":"S1zR0N","open":"g3KDdD","folding-arrow":"kjftOu","foldingArrow":"kjftOu"};
|
|
5355
5451
|
|
|
5356
5452
|
const MainMenuAvatar = /* @__PURE__ */React__namespace.forwardRef((props, ref) => (React__namespace.createElement("button", { ref: ref, className: cx__default.default(css$8.container, props.isDropdown && css$8.dropdown, props.isOpen && css$8.open, props.onClick && uuiCore.uuiMarkers.clickable, props.cx), onClick: props.onClick, ...props.rawProps },
|
|
5357
5453
|
React__namespace.createElement(uuiComponents.Avatar, { size: "36", img: props.avatarUrl }),
|
|
@@ -5359,15 +5455,15 @@ const MainMenuAvatar = /* @__PURE__ */React__namespace.forwardRef((props, ref) =
|
|
|
5359
5455
|
props.isDropdown && (React__namespace.createElement("div", null,
|
|
5360
5456
|
React__namespace.createElement(uuiComponents.IconContainer, { size: 18, icon: ForwardRef$P, flipY: props.isOpen, cx: css$8.foldingArrow }))))));
|
|
5361
5457
|
|
|
5362
|
-
var css$7 = {"search-input":"
|
|
5458
|
+
var css$7 = {"search-input":"NN2BF-","searchInput":"NN2BF-"};
|
|
5363
5459
|
|
|
5364
5460
|
const MainMenuSearch = /* @__PURE__ */React__namespace.forwardRef((props, ref) => (React__namespace.createElement(uuiCore.IEditableDebouncer, { ...props, render: (iEditable) => (React__namespace.createElement(uuiComponents.TextInput, { iconPosition: "left", icon: ForwardRef$M, cancelIcon: props.value?.length > 0 && ForwardRef$Q, ...props, ...iEditable, ref: ref, cx: uuiCore.cx(css$7.searchInput, props.cx), ...props.rawProps })) })));
|
|
5365
5461
|
|
|
5366
|
-
var css$6 = {"container":"
|
|
5462
|
+
var css$6 = {"container":"EJcA4l"};
|
|
5367
5463
|
|
|
5368
5464
|
const MainMenuIcon = /* @__PURE__ */React__namespace.forwardRef((props, ref) => (React__namespace.createElement(IconButton, { ref: ref, icon: props.icon, cx: uuiCore.cx(props.cx, css$6.container), ...props })));
|
|
5369
5465
|
|
|
5370
|
-
var css$5 = {"root":"
|
|
5466
|
+
var css$5 = {"root":"-PyHHH"};
|
|
5371
5467
|
|
|
5372
5468
|
const Anchor = /* @__PURE__ */uuiCore.withMods(uuiComponents.Anchor, () => [css$5.root]);
|
|
5373
5469
|
|
|
@@ -5425,7 +5521,7 @@ var SvgFileCloudUploadFill = function SvgFileCloudUploadFill(props, ref) {
|
|
|
5425
5521
|
};
|
|
5426
5522
|
var ForwardRef = /*#__PURE__*/React.forwardRef(SvgFileCloudUploadFill);
|
|
5427
5523
|
|
|
5428
|
-
var css$4 = {"root":"
|
|
5524
|
+
var css$4 = {"root":"YGbC6y","drop-start":"sugNfp","dropStart":"sugNfp","drop-over":"N5UGwm","dropOver":"N5UGwm","link":"SlXvfl","drop-area":"RhR58o","dropArea":"RhR58o","drop-caption":"RHhPMS","dropCaption":"RHhPMS","icon-blue":"_9tz16R","iconBlue":"_9tz16R"};
|
|
5429
5525
|
|
|
5430
5526
|
function DropSpot(props) {
|
|
5431
5527
|
const getInfoText = typeof props.infoText === 'string'
|
|
@@ -5443,7 +5539,7 @@ function DropSpot(props) {
|
|
|
5443
5539
|
return React__namespace.createElement(uuiComponents.DropSpot, { render: renderAttachmentArea, onFilesDropped: props.onUploadFiles });
|
|
5444
5540
|
}
|
|
5445
5541
|
|
|
5446
|
-
var css$3 = {"root":"
|
|
5542
|
+
var css$3 = {"root":"-z-c-3"};
|
|
5447
5543
|
|
|
5448
5544
|
const SvgCircleProgress = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
5449
5545
|
const outsetRadius = props.size / 2 - 1;
|
|
@@ -5454,7 +5550,7 @@ const SvgCircleProgress = /* @__PURE__ */React__namespace.forwardRef((props, ref
|
|
|
5454
5550
|
React__namespace.createElement("circle", { strokeWidth: 1, fill: "transparent", r: outsetRadius, cx: props.size / 2, cy: props.size / 2 })));
|
|
5455
5551
|
});
|
|
5456
5552
|
|
|
5457
|
-
var css$2 = {"root":"
|
|
5553
|
+
var css$2 = {"root":"AuYJ3s","file-name":"xc9OXq","fileName":"xc9OXq","default-color":"NuRN4E","defaultColor":"NuRN4E","doc-color":"BCI-Hg","docColor":"BCI-Hg","xls-color":"kKGhMt","xlsColor":"kKGhMt","pdf-color":"_-2DhwP","pdfColor":"_-2DhwP","movie-color":"I5Hw8R","movieColor":"I5Hw8R","img-color":"tqJ6c9","imgColor":"tqJ6c9","mov-color":"KxAgox","movColor":"KxAgox","error-block":"_4pcG0J","errorBlock":"_4pcG0J","icons-block":"XVH--U","iconsBlock":"XVH--U"};
|
|
5458
5554
|
|
|
5459
5555
|
const FileCard = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
5460
5556
|
const [isLoadingShow, setIsLoadingShow] = React__namespace.useState(true);
|
|
@@ -5573,7 +5669,7 @@ const getErrorPageConfig = () => ({
|
|
|
5573
5669
|
},
|
|
5574
5670
|
});
|
|
5575
5671
|
|
|
5576
|
-
var css$1 = {"container":"
|
|
5672
|
+
var css$1 = {"container":"petk3l"};
|
|
5577
5673
|
|
|
5578
5674
|
const ErrorPage = (props) => {
|
|
5579
5675
|
const isMobileScreen = uuiCore.isMobile();
|
|
@@ -5585,7 +5681,7 @@ const ErrorPage = (props) => {
|
|
|
5585
5681
|
props?.supportLink && React__namespace.default.createElement("div", { className: "uui-error-support-link" }, props?.supportLink))));
|
|
5586
5682
|
};
|
|
5587
5683
|
|
|
5588
|
-
var css = {"recovery-spinner":"
|
|
5684
|
+
var css = {"recovery-spinner":"h1QYl0","recoverySpinner":"h1QYl0","recovery-message":"UVEnxn","recoveryMessage":"UVEnxn","modal-blocker":"_0E-ysL","modalBlocker":"_0E-ysL","modalFadeIn":"BYQS8K"};
|
|
5589
5685
|
|
|
5590
5686
|
function ErrorHandler(props) {
|
|
5591
5687
|
const { uuiNotifications, uuiModals, uuiApi } = uuiCore.useUuiContext();
|
|
@@ -5776,6 +5872,7 @@ exports.WarningAlert = WarningAlert;
|
|
|
5776
5872
|
exports.WarningNotification = WarningNotification;
|
|
5777
5873
|
exports.applyDateSelectionMods = applyDateSelectionMods;
|
|
5778
5874
|
exports.defaultPredicates = defaultPredicates;
|
|
5875
|
+
exports.getDefaultPredicate = getDefaultPredicate;
|
|
5779
5876
|
exports.getErrorPageConfig = getErrorPageConfig;
|
|
5780
5877
|
exports.getHighlightRanges = getHighlightRanges;
|
|
5781
5878
|
exports.getHighlightedSearchMatches = getHighlightedSearchMatches;
|