@epam/uui 6.1.1-beta.1 → 6.1.2
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/inputs/MultiSwitch.d.ts +1 -2
- package/components/inputs/MultiSwitch.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 +1044 -949
- package/index.esm.js.map +1 -1
- package/index.js +1042 -946
- package/index.js.map +1 -1
- package/package.json +5 -5
- package/settings.d.ts +1 -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(#axwv14sdhgjn8a90k_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: "axwv14qvw39x99h9_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(#axwv14qvw39x99h9_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: "axwv14sdhgjn8a90k_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":"pLfOrx","uui-spinner":"roRxrl","uuiSpinner":"roRxrl"};
|
|
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":"PmJhXe","loading-word":"cpJtJG","loadingWord":"cpJtJG","animated-loading":"_8nZ3Ji","animatedLoading":"_8nZ3Ji","skeleton_loading":"OC40xx","skeletonLoading":"OC40xx"};
|
|
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":"PzgChz","line-height":"cpwwQO","lineHeight":"cpwwQO","font-size":"_3L7mbo","fontSize":"_3L7mbo"};
|
|
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":"U4Un-b"};
|
|
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,
|
|
@@ -1491,11 +1495,11 @@ const settings = {
|
|
|
1491
1495
|
textInput: textInputSettings,
|
|
1492
1496
|
};
|
|
1493
1497
|
|
|
1494
|
-
var css$
|
|
1498
|
+
var css$1s = {"root":"RLJjpT"};
|
|
1495
1499
|
|
|
1496
1500
|
function applyButtonMods(mods) {
|
|
1497
1501
|
return [
|
|
1498
|
-
css$
|
|
1502
|
+
css$1s.root,
|
|
1499
1503
|
'uui-button',
|
|
1500
1504
|
`uui-fill-${mods.fill || 'solid'}`,
|
|
1501
1505
|
`uui-color-${mods.color || 'primary'}`,
|
|
@@ -1509,10 +1513,10 @@ const Button = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Button,
|
|
|
1509
1513
|
};
|
|
1510
1514
|
});
|
|
1511
1515
|
|
|
1512
|
-
var css$
|
|
1516
|
+
var css$1r = {"root":"A175gu"};
|
|
1513
1517
|
|
|
1514
1518
|
function applyIconButtonMods(props) {
|
|
1515
|
-
return ['uui-icon_button', `uui-color-${props.color || 'neutral'}`, css$
|
|
1519
|
+
return ['uui-icon_button', `uui-color-${props.color || 'neutral'}`, css$1r.root];
|
|
1516
1520
|
}
|
|
1517
1521
|
const IconButton = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.IconButton, applyIconButtonMods, (props) => {
|
|
1518
1522
|
const isDeprecated = ['info', 'success', 'error', 'warning'].includes(props.color);
|
|
@@ -1546,7 +1550,7 @@ function getIconClass(props) {
|
|
|
1546
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'];
|
|
1547
1551
|
}
|
|
1548
1552
|
|
|
1549
|
-
var css$
|
|
1553
|
+
var css$1q = {"root":"_9qIOia"};
|
|
1550
1554
|
|
|
1551
1555
|
const DEFAULT_COLOR = 'primary';
|
|
1552
1556
|
const LinkButton = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
@@ -1561,7 +1565,7 @@ const LinkButton = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
|
1561
1565
|
}
|
|
1562
1566
|
const rootStyles = [
|
|
1563
1567
|
'uui-link_button',
|
|
1564
|
-
css$
|
|
1568
|
+
css$1q.root,
|
|
1565
1569
|
`uui-size-${props.size || settings.linkButton.sizes.default}`,
|
|
1566
1570
|
...getIconClass(props),
|
|
1567
1571
|
`uui-color-${props.color || DEFAULT_COLOR}`,
|
|
@@ -1576,11 +1580,11 @@ const LinkButton = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
|
1576
1580
|
props.isDropdown && (React__namespace.createElement(uuiComponents.IconContainer, { icon: DropdownIcon, flipY: props.isOpen }))));
|
|
1577
1581
|
});
|
|
1578
1582
|
|
|
1579
|
-
var css$
|
|
1583
|
+
var css$1p = {"root":"rK-LrI"};
|
|
1580
1584
|
|
|
1581
1585
|
const CountIndicator = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
1582
1586
|
return (React__namespace.default.createElement("div", { ref: ref, className: cx__default.default([
|
|
1583
|
-
css$
|
|
1587
|
+
css$1p.root,
|
|
1584
1588
|
'uui-count_indicator',
|
|
1585
1589
|
`uui-size-${props.size || settings.countIndicator.sizes.default}`,
|
|
1586
1590
|
props.color && `uui-color-${props.color}`,
|
|
@@ -1588,11 +1592,11 @@ const CountIndicator = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
1588
1592
|
]) }, props.caption));
|
|
1589
1593
|
});
|
|
1590
1594
|
|
|
1591
|
-
var css$
|
|
1595
|
+
var css$1o = {"root":"eVEbFZ","withNotify":"-xDjo0"};
|
|
1592
1596
|
|
|
1593
1597
|
const TabButton = /* @__PURE__ */React__namespace.default.forwardRef((props, ref) => {
|
|
1594
1598
|
const styles = [
|
|
1595
|
-
css$
|
|
1599
|
+
css$1o.root,
|
|
1596
1600
|
'uui-tab-button',
|
|
1597
1601
|
`uui-size-${props.size || settings.tabButton.sizes.default}`,
|
|
1598
1602
|
...getIconClass(props),
|
|
@@ -1609,25 +1613,25 @@ const TabButton = /* @__PURE__ */React__namespace.default.forwardRef((props, ref
|
|
|
1609
1613
|
props.icon && props.iconPosition !== 'right' && (React__namespace.default.createElement(uuiComponents.IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
1610
1614
|
(props.caption || props.withNotify) && (React__namespace.default.createElement("div", { className: uuiCore.cx(uuiCore.uuiElement.caption) },
|
|
1611
1615
|
props.caption,
|
|
1612
|
-
props.withNotify && React__namespace.default.createElement("div", { className: css$
|
|
1616
|
+
props.withNotify && React__namespace.default.createElement("div", { className: css$1o.withNotify }))),
|
|
1613
1617
|
props.icon && props.iconPosition === 'right' && (React__namespace.default.createElement(uuiComponents.IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
1614
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 })),
|
|
1615
1619
|
props.isDropdown && (React__namespace.default.createElement(uuiComponents.IconContainer, { icon: DropdownIcon, flipY: props.isOpen })),
|
|
1616
1620
|
props.onClear && !props.isDisabled && (React__namespace.default.createElement(uuiComponents.IconContainer, { cx: uuiCore.uuiMarkers.clickable, icon: ClearIcon, onClick: props.onClear }))));
|
|
1617
1621
|
});
|
|
1618
1622
|
|
|
1619
|
-
var css$
|
|
1623
|
+
var css$1n = {"root":"p6XNfK"};
|
|
1620
1624
|
|
|
1621
1625
|
function applyVerticalTabButtonMods() {
|
|
1622
|
-
return [css$
|
|
1626
|
+
return [css$1n.root, 'uui-vertical-tab-button'];
|
|
1623
1627
|
}
|
|
1624
1628
|
const VerticalTabButton = /* @__PURE__ */uuiCore.withMods(TabButton, applyVerticalTabButtonMods);
|
|
1625
1629
|
|
|
1626
|
-
var css$
|
|
1630
|
+
var css$1m = {"root":"H2Qh6a"};
|
|
1627
1631
|
|
|
1628
1632
|
function applyCheckboxMods(mods) {
|
|
1629
1633
|
return [
|
|
1630
|
-
css$
|
|
1634
|
+
css$1m.root,
|
|
1631
1635
|
`uui-size-${mods.size || settings.checkbox.sizes.default}`,
|
|
1632
1636
|
'uui-control-mode-' + (mods.mode || 'form'),
|
|
1633
1637
|
'uui-color-primary',
|
|
@@ -1641,11 +1645,11 @@ const applyUUICheckboxProps = (props) => {
|
|
|
1641
1645
|
};
|
|
1642
1646
|
const Checkbox = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Checkbox, applyCheckboxMods, applyUUICheckboxProps);
|
|
1643
1647
|
|
|
1644
|
-
var css$
|
|
1648
|
+
var css$1l = {"root":"z7NGih"};
|
|
1645
1649
|
|
|
1646
1650
|
function applyRadioInputMods(mods) {
|
|
1647
1651
|
return [
|
|
1648
|
-
css$
|
|
1652
|
+
css$1l.root,
|
|
1649
1653
|
`uui-size-${mods.size || settings.radioInput.sizes.default}`,
|
|
1650
1654
|
'uui-radio-input-container',
|
|
1651
1655
|
'uui-color-primary',
|
|
@@ -1653,11 +1657,11 @@ function applyRadioInputMods(mods) {
|
|
|
1653
1657
|
}
|
|
1654
1658
|
const RadioInput = /* @__PURE__ */uuiCore.withMods(uuiComponents.RadioInput, applyRadioInputMods, (props) => ({ icon: props.icon ? props.icon : settings.radioInput.icons.dotIcon }));
|
|
1655
1659
|
|
|
1656
|
-
var css$
|
|
1660
|
+
var css$1k = {"root":"_7E43op"};
|
|
1657
1661
|
|
|
1658
1662
|
function applySwitchMods(mods) {
|
|
1659
1663
|
return [
|
|
1660
|
-
css$
|
|
1664
|
+
css$1k.root,
|
|
1661
1665
|
`uui-size-${mods.size || settings.switch.sizes.default}`,
|
|
1662
1666
|
'uui-color-primary',
|
|
1663
1667
|
];
|
|
@@ -1677,7 +1681,7 @@ var EditMode;
|
|
|
1677
1681
|
EditMode["INLINE"] = "inline";
|
|
1678
1682
|
})(EditMode || (EditMode = {}));
|
|
1679
1683
|
|
|
1680
|
-
var textInputCss = {"root":"
|
|
1684
|
+
var textInputCss = {"root":"nOncFB"};
|
|
1681
1685
|
|
|
1682
1686
|
const DEFAULT_MODE$3 = EditMode.FORM;
|
|
1683
1687
|
function applyTextInputMods(mods) {
|
|
@@ -1702,9 +1706,9 @@ const SearchInput = /* @__PURE__ */React__namespace.default.forwardRef((props, r
|
|
|
1702
1706
|
} }));
|
|
1703
1707
|
});
|
|
1704
1708
|
|
|
1705
|
-
var css$
|
|
1709
|
+
var css$1j = {"root":"_21MstX"};
|
|
1706
1710
|
|
|
1707
|
-
const ControlGroup = /* @__PURE__ */uuiCore.withMods(uuiComponents.ControlGroup, () => [css$
|
|
1711
|
+
const ControlGroup = /* @__PURE__ */uuiCore.withMods(uuiComponents.ControlGroup, () => [css$1j.root, 'uui-control-group']);
|
|
1708
1712
|
|
|
1709
1713
|
function MultiSwitchComponent(props, ref) {
|
|
1710
1714
|
return (React__namespace.createElement(ControlGroup, { ref: ref, rawProps: {
|
|
@@ -1718,13 +1722,13 @@ function MultiSwitchComponent(props, ref) {
|
|
|
1718
1722
|
}
|
|
1719
1723
|
const MultiSwitch = /* @__PURE__ */React__namespace.forwardRef(MultiSwitchComponent);
|
|
1720
1724
|
|
|
1721
|
-
var css$
|
|
1725
|
+
var css$1i = {"root":"_6VA-y8"};
|
|
1722
1726
|
|
|
1723
1727
|
const DEFAULT_MODE$2 = EditMode.FORM;
|
|
1724
1728
|
function applyNumericInputMods(mods) {
|
|
1725
1729
|
return [
|
|
1726
1730
|
textInputCss.root,
|
|
1727
|
-
css$
|
|
1731
|
+
css$1i.root,
|
|
1728
1732
|
`uui-size-${mods.size || settings.numericInput.sizes.default}`,
|
|
1729
1733
|
'uui-control-mode-' + (mods.mode || DEFAULT_MODE$2),
|
|
1730
1734
|
];
|
|
@@ -1738,12 +1742,12 @@ const NumericInput = /* @__PURE__ */uuiCore.withMods(uuiComponents.NumericInput,
|
|
|
1738
1742
|
};
|
|
1739
1743
|
});
|
|
1740
1744
|
|
|
1741
|
-
var css$
|
|
1745
|
+
var css$1h = {"root":"BixRm8"};
|
|
1742
1746
|
|
|
1743
1747
|
const DEFAULT_MODE$1 = EditMode.FORM;
|
|
1744
1748
|
function applyTextAreaMods(mods) {
|
|
1745
1749
|
return [
|
|
1746
|
-
css$
|
|
1750
|
+
css$1h.root,
|
|
1747
1751
|
'uui-textarea',
|
|
1748
1752
|
'uui-size-' + (mods.size || settings.textArea.sizes.default),
|
|
1749
1753
|
'uui-control-mode-' + (mods.mode || DEFAULT_MODE$1),
|
|
@@ -1779,18 +1783,18 @@ function TREE_SHAKEABLE_INIT$1() {
|
|
|
1779
1783
|
};
|
|
1780
1784
|
}
|
|
1781
1785
|
|
|
1782
|
-
var css$
|
|
1786
|
+
var css$1g = {"root":"euEPz-"};
|
|
1783
1787
|
|
|
1784
1788
|
function applyDropdownContainerMods(mods) {
|
|
1785
1789
|
return [
|
|
1786
|
-
css$
|
|
1790
|
+
css$1g.root,
|
|
1787
1791
|
mods.vPadding && `vPadding-${mods.vPadding}`,
|
|
1788
1792
|
mods.padding && `padding-${mods.padding}`,
|
|
1789
1793
|
];
|
|
1790
1794
|
}
|
|
1791
1795
|
const DropdownContainer = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.DropdownContainer, applyDropdownContainerMods);
|
|
1792
1796
|
|
|
1793
|
-
var css$
|
|
1797
|
+
var css$1f = {"root":"ukUGrR","timepicker-input":"McNTgf","timepickerInput":"McNTgf","ltr-always":"Ezvs80","ltrAlways":"Ezvs80"};
|
|
1794
1798
|
|
|
1795
1799
|
const uuiTimePicker = {
|
|
1796
1800
|
container: 'uui-timepicker-container',
|
|
@@ -1829,8 +1833,8 @@ function TimePickerBody(props) {
|
|
|
1829
1833
|
const minutesToSubtract = value.minute() % minutesStep === 0 ? minutesStep : value.minute() % minutesStep;
|
|
1830
1834
|
onMinutesChange(value.subtract(minutesToSubtract, 'm').minute());
|
|
1831
1835
|
};
|
|
1832
|
-
return (React__namespace.createElement("div", { className: uuiCore.cx(css$
|
|
1833
|
-
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 },
|
|
1834
1838
|
React__namespace.createElement("div", { className: uuiTimePicker.elementContainer },
|
|
1835
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()) }),
|
|
1836
1840
|
React__namespace.createElement(uuiComponents.NumericInput, { cx: uuiTimePicker.input, onValueChange: onHoursChange, value: +(uuiDayjs.dayjs()
|
|
@@ -1973,7 +1977,7 @@ function TimePickerComponent(props, ref) {
|
|
|
1973
1977
|
state.value && state.inputValue && saveTime(state.value);
|
|
1974
1978
|
};
|
|
1975
1979
|
const renderInput = (inputProps) => {
|
|
1976
|
-
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 }));
|
|
1977
1981
|
};
|
|
1978
1982
|
const renderBody = (bodyProps) => {
|
|
1979
1983
|
const { forwardedRef, onValueChange, ...timePickerBodyProps } = props;
|
|
@@ -1984,37 +1988,37 @@ function TimePickerComponent(props, ref) {
|
|
|
1984
1988
|
}
|
|
1985
1989
|
const TimePicker = /* @__PURE__ */React__namespace.default.forwardRef(TimePickerComponent);
|
|
1986
1990
|
|
|
1987
|
-
var css$
|
|
1991
|
+
var css$1e = {"root":"OamnhQ"};
|
|
1988
1992
|
|
|
1989
1993
|
function applyInputAddonMods() {
|
|
1990
1994
|
return [
|
|
1991
|
-
css$
|
|
1995
|
+
css$1e.root,
|
|
1992
1996
|
];
|
|
1993
1997
|
}
|
|
1994
1998
|
const InputAddon = /* @__PURE__ */uuiCore.withMods(uuiComponents.InputAddon, applyInputAddonMods);
|
|
1995
1999
|
|
|
1996
|
-
var css$
|
|
2000
|
+
var css$1d = {"root":"HEIxwq"};
|
|
1997
2001
|
|
|
1998
2002
|
function applySliderMods() {
|
|
1999
|
-
return [css$
|
|
2003
|
+
return [css$1d.root, 'uui-color-neutral'];
|
|
2000
2004
|
}
|
|
2001
2005
|
const Slider = /* @__PURE__ */uuiCore.withMods(uuiComponents.Slider, applySliderMods);
|
|
2002
2006
|
|
|
2003
|
-
var css$
|
|
2007
|
+
var css$1c = {"root":"I1hTc5"};
|
|
2004
2008
|
|
|
2005
2009
|
function applyTooltipMods(mods) {
|
|
2006
2010
|
return [
|
|
2007
|
-
css$
|
|
2011
|
+
css$1c.root,
|
|
2008
2012
|
`uui-color-${mods.color || 'inverted'}`,
|
|
2009
2013
|
];
|
|
2010
2014
|
}
|
|
2011
2015
|
const Tooltip = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Tooltip, applyTooltipMods);
|
|
2012
2016
|
|
|
2013
|
-
var css$
|
|
2017
|
+
var css$1b = {"root":"_6rjI-U","tooltip":"aN-uAS"};
|
|
2014
2018
|
|
|
2015
2019
|
function applyRatingMods(mods) {
|
|
2016
2020
|
return [
|
|
2017
|
-
css$
|
|
2021
|
+
css$1b.root,
|
|
2018
2022
|
`uui-size-${mods.size || settings.rating.sizes.default}`,
|
|
2019
2023
|
];
|
|
2020
2024
|
}
|
|
@@ -2024,17 +2028,17 @@ const Rating = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Rating,
|
|
|
2024
2028
|
Tooltip,
|
|
2025
2029
|
}));
|
|
2026
2030
|
|
|
2027
|
-
var css$
|
|
2031
|
+
var css$1a = {"root":"Vort6b","main-path":"vAq6ae","mainPath":"vAq6ae","content-wrapper":"_9kzXe0","contentWrapper":"_9kzXe0","content":"_98csGI","action-wrapper":"AaTR8a","actionWrapper":"AaTR8a","icon-wrapper":"AbsU2H","iconWrapper":"AbsU2H","icon":"rN0qS2","close-icon":"gzif7n","closeIcon":"gzif7n"};
|
|
2028
2032
|
|
|
2029
|
-
const Alert = /* @__PURE__ */React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", { role: "alert", ref: ref, className: cx__default.default('uui-alert', css$
|
|
2030
|
-
React__namespace.createElement("div", { className: css$
|
|
2031
|
-
React__namespace.createElement("div", { className: css$
|
|
2032
|
-
props.icon && (React__namespace.createElement("div", { className: css$
|
|
2033
|
-
React__namespace.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$
|
|
2034
|
-
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 },
|
|
2035
2039
|
props.children,
|
|
2036
|
-
props.actions && (React__namespace.createElement("div", { className: css$
|
|
2037
|
-
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 })))));
|
|
2038
2042
|
const WarningAlert = /* @__PURE__ */React__namespace.forwardRef((props, ref) => React__namespace.createElement(Alert, { icon: settings.alert.icons.warningIcon, color: "warning", ref: ref, ...props }));
|
|
2039
2043
|
const SuccessAlert = /* @__PURE__ */React__namespace.forwardRef((props, ref) => React__namespace.createElement(Alert, { icon: settings.alert.icons.successIcon, color: "success", ref: ref, ...props }));
|
|
2040
2044
|
const HintAlert = /* @__PURE__ */React__namespace.forwardRef((props, ref) => React__namespace.createElement(Alert, { icon: settings.alert.icons.infoIcon, color: "info", ref: ref, ...props }));
|
|
@@ -2042,7 +2046,7 @@ const ErrorAlert = /* @__PURE__ */React__namespace.forwardRef((props, ref) => Re
|
|
|
2042
2046
|
|
|
2043
2047
|
const Dropdown = /* @__PURE__ */uuiCore.withMods(uuiComponents.Dropdown);
|
|
2044
2048
|
|
|
2045
|
-
var css$
|
|
2049
|
+
var css$19 = {"submenu-root-item-rtl":"ydZ-BE","submenuRootItemRtl":"ydZ-BE","icon-after":"TPTNZ-","iconAfter":"TPTNZ-","submenu-root-item":"GI6DFI","submenuRootItem":"GI6DFI","icon-check":"H53E0w","iconCheck":"H53E0w","splitter-root":"uAMUiM","splitterRoot":"uAMUiM","splitter":"f8aqVO","header-root":"Je-c-H","headerRoot":"Je-c-H","item-root":"_12x1Ga","itemRoot":"_12x1Ga","icon":"hocJgD","link":"VQI7Zx","indent":"IEv-zK","selected-mark":"_9y1vSe","selectedMark":"_9y1vSe"};
|
|
2046
2050
|
|
|
2047
2051
|
exports.IDropdownControlKeys = void 0;
|
|
2048
2052
|
(function (IDropdownControlKeys) {
|
|
@@ -2107,29 +2111,29 @@ const DropdownMenuButton = /* @__PURE__ */React__namespace.default.forwardRef((p
|
|
|
2107
2111
|
const getMenuButtonContent = () => {
|
|
2108
2112
|
const isIconBefore = Boolean(icon && iconPosition !== 'right');
|
|
2109
2113
|
const isIconAfter = Boolean(icon && iconPosition === 'right');
|
|
2110
|
-
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) }));
|
|
2111
2115
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
2112
2116
|
isIconBefore && iconElement,
|
|
2113
|
-
React__namespace.default.createElement(uuiComponents.Text, { cx: props.indent && css$
|
|
2117
|
+
React__namespace.default.createElement(uuiComponents.Text, { cx: props.indent && css$19.indent }, caption),
|
|
2114
2118
|
isIconAfter && (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
2115
2119
|
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
2116
2120
|
iconElement))));
|
|
2117
2121
|
};
|
|
2118
2122
|
const isAnchor = Boolean(link || href);
|
|
2119
|
-
const itemClassNames = uuiCore.cx(props.cx, css$
|
|
2120
|
-
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 },
|
|
2121
2125
|
getMenuButtonContent(),
|
|
2122
2126
|
isSelected && (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
2123
2127
|
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
2124
|
-
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 })))));
|
|
2125
2129
|
});
|
|
2126
2130
|
function DropdownMenuSplitter(props) {
|
|
2127
|
-
return (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$
|
|
2128
|
-
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 })));
|
|
2129
2133
|
}
|
|
2130
2134
|
function DropdownMenuHeader(props) {
|
|
2131
|
-
return (React__namespace.default.createElement("div", { className: uuiCore.cx('uui-dropdown-menu-header', props.cx, css$
|
|
2132
|
-
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)));
|
|
2133
2137
|
}
|
|
2134
2138
|
function DropdownSubMenu(props) {
|
|
2135
2139
|
const subMenuMiddleware = [
|
|
@@ -2144,7 +2148,7 @@ function DropdownSubMenu(props) {
|
|
|
2144
2148
|
}),
|
|
2145
2149
|
];
|
|
2146
2150
|
const isRtl = uuiCore.getDir() === 'rtl';
|
|
2147
|
-
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 })) }));
|
|
2148
2152
|
}
|
|
2149
2153
|
function DropdownMenuSwitchButton(props) {
|
|
2150
2154
|
const context = React.useContext(uuiCore.UuiContext);
|
|
@@ -2160,29 +2164,29 @@ function DropdownMenuSwitchButton(props) {
|
|
|
2160
2164
|
onHandleValueChange(!isSelected);
|
|
2161
2165
|
}
|
|
2162
2166
|
};
|
|
2163
|
-
return (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$
|
|
2164
|
-
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 }),
|
|
2165
2169
|
React__namespace.default.createElement(uuiComponents.Text, null, caption),
|
|
2166
2170
|
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
2167
2171
|
React__namespace.default.createElement(Switch, { value: isSelected, tabIndex: -1, onValueChange: onHandleValueChange })));
|
|
2168
2172
|
}
|
|
2169
2173
|
|
|
2170
|
-
var css$
|
|
2174
|
+
var css$18 = {"root":"dQAJ3D","mode-block":"k1DyC2","modeBlock":"k1DyC2","mode-inline":"J6rO4s","modeInline":"J6rO4s","padding-0":"_-7HOVD","padding0":"_-7HOVD","padding-6":"LqG5bG","padding6":"LqG5bG","padding-12":"_5OryJn","padding12":"_5OryJn","padding-18":"pVCCRZ","padding18":"pVCCRZ"};
|
|
2171
2175
|
|
|
2172
2176
|
function applyAccordionMods(mods) {
|
|
2173
2177
|
return [
|
|
2174
|
-
css$
|
|
2175
|
-
css$
|
|
2176
|
-
mods.padding && css$
|
|
2178
|
+
css$18.root,
|
|
2179
|
+
css$18[`mode-${mods.mode || 'block'}`],
|
|
2180
|
+
mods.padding && css$18['padding-' + mods.padding],
|
|
2177
2181
|
];
|
|
2178
2182
|
}
|
|
2179
2183
|
const Accordion = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Accordion, applyAccordionMods, (mods) => ({
|
|
2180
2184
|
dropdownIcon: mods.dropdownIcon !== null && settings.accordion.icons.dropdownIcon,
|
|
2181
2185
|
}));
|
|
2182
2186
|
|
|
2183
|
-
var css$
|
|
2187
|
+
var css$17 = {"root":"Sgu4nd","align-items":"VPjfoc","alignItems":"VPjfoc","justify-content":"jDHkUV","justifyContent":"jDHkUV","border-top":"_1tgF40","borderTop":"_1tgF40","border-bottom":"AZDsIG","borderBottom":"AZDsIG","top-shadow":"u6JiMe","topShadow":"u6JiMe","padding":"_2aS-MV","margin":"GMeEtS","vPadding":"_6cVjKP","column-gap":"oQCWLx","columnGap":"oQCWLx","row-gap":"AeNjag","rowGap":"AeNjag","spacing":"wsQFNn"};
|
|
2184
2188
|
|
|
2185
|
-
const FlexCell = /* @__PURE__ */uuiCore.withMods(uuiComponents.FlexCell, () => [css$
|
|
2189
|
+
const FlexCell = /* @__PURE__ */uuiCore.withMods(uuiComponents.FlexCell, () => [css$17.flexCell]);
|
|
2186
2190
|
|
|
2187
2191
|
const FlexRow = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
2188
2192
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2191,22 +2195,22 @@ const FlexRow = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
2191
2195
|
}
|
|
2192
2196
|
}
|
|
2193
2197
|
const classNames = uuiCore.cx([
|
|
2194
|
-
css$
|
|
2198
|
+
css$17.root,
|
|
2195
2199
|
'uui-flex-row',
|
|
2196
2200
|
props.onClick && uuiCore.uuiMarkers.clickable,
|
|
2197
2201
|
props.cx,
|
|
2198
2202
|
props.size !== null && 'uui-size-' + (props.size || settings.flexRow.sizes.default),
|
|
2199
|
-
props.alignItems && css$
|
|
2200
|
-
props.justifyContent && css$
|
|
2201
|
-
props.padding && css$
|
|
2202
|
-
props.vPadding && css$
|
|
2203
|
-
props.margin && css$
|
|
2204
|
-
props.topShadow && css$
|
|
2205
|
-
props.borderBottom && css$
|
|
2206
|
-
props.borderTop && css$
|
|
2207
|
-
props.columnGap && css$
|
|
2208
|
-
props.rowGap && css$
|
|
2209
|
-
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,
|
|
2210
2214
|
props.background && `uui-flex-row-bg-${props.background}`,
|
|
2211
2215
|
]);
|
|
2212
2216
|
let alignItemsValue = props.alignItems;
|
|
@@ -2232,22 +2236,22 @@ const FlexRow = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
2232
2236
|
} }, props.children));
|
|
2233
2237
|
});
|
|
2234
2238
|
|
|
2235
|
-
var css$
|
|
2239
|
+
var css$16 = {"root":"gf-eCt","margin-24":"dXAmGD","margin24":"dXAmGD","padding-12":"zDPblx","padding12":"zDPblx","padding-24":"vofNmX","padding24":"vofNmX","shadow":"sJQbIt","uui-surface-main":"Vdv9cG","uuiSurfaceMain":"Vdv9cG"};
|
|
2236
2240
|
|
|
2237
2241
|
const Panel = /* @__PURE__ */uuiCore.withMods(uuiComponents.VPanel, (props) => [
|
|
2238
2242
|
'uui-panel',
|
|
2239
|
-
css$
|
|
2240
|
-
props.shadow && css$
|
|
2241
|
-
props.margin && css$
|
|
2242
|
-
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}`],
|
|
2243
2247
|
]);
|
|
2244
2248
|
|
|
2245
|
-
var css$
|
|
2249
|
+
var css$15 = {"root":"behYS0"};
|
|
2246
2250
|
|
|
2247
2251
|
function applyLabeledInputMods(mods) {
|
|
2248
2252
|
return [
|
|
2249
2253
|
'uui-labeled-input',
|
|
2250
|
-
css$
|
|
2254
|
+
css$15.root,
|
|
2251
2255
|
'uui-size-' + (mods.size || settings.labeledInput.sizes.default),
|
|
2252
2256
|
];
|
|
2253
2257
|
}
|
|
@@ -2259,7 +2263,7 @@ function applyLabeledInputProps(props) {
|
|
|
2259
2263
|
}
|
|
2260
2264
|
const LabeledInput = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.LabeledInput, applyLabeledInputMods, applyLabeledInputProps);
|
|
2261
2265
|
|
|
2262
|
-
var css$
|
|
2266
|
+
var css$14 = {"root":"_4tbLrT"};
|
|
2263
2267
|
|
|
2264
2268
|
function RadioGroup(props) {
|
|
2265
2269
|
const direction = props.direction || 'vertical';
|
|
@@ -2268,26 +2272,22 @@ function RadioGroup(props) {
|
|
|
2268
2272
|
props.onValueChange(newVal);
|
|
2269
2273
|
}
|
|
2270
2274
|
};
|
|
2271
|
-
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) => {
|
|
2272
2276
|
const { id, name, renderName, ...restItemProps } = i;
|
|
2273
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 }));
|
|
2274
2278
|
})));
|
|
2275
2279
|
}
|
|
2276
2280
|
|
|
2277
|
-
var css$
|
|
2281
|
+
var css$13 = {"root":"iKEcaT"};
|
|
2278
2282
|
|
|
2279
2283
|
function applyScrollBarsMods() {
|
|
2280
2284
|
return [
|
|
2281
|
-
css$
|
|
2285
|
+
css$13.root, 'uui-scroll-bars', 'uui-shadow-top', 'uui-shadow-bottom',
|
|
2282
2286
|
];
|
|
2283
2287
|
}
|
|
2284
2288
|
const ScrollBars = /* @__PURE__ */uuiCore.withMods(uuiComponents.ScrollBars, applyScrollBarsMods);
|
|
2285
2289
|
|
|
2286
|
-
var css$
|
|
2287
|
-
|
|
2288
|
-
var css$12 = {"root":"nRHmpk"};
|
|
2289
|
-
|
|
2290
|
-
const Blocker = /* @__PURE__ */uuiCore.withMods(uuiComponents.Blocker, () => [css$12.root], () => ({ renderSpinner: settings.blocker.renderSpinner }));
|
|
2290
|
+
var css$12 = {"scroll-container":"VIa4R2","scrollContainer":"VIa4R2","list-container":"QEge5K","listContainer":"QEge5K"};
|
|
2291
2291
|
|
|
2292
2292
|
const VirtualList = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
2293
2293
|
const { listContainerRef, offsetY, handleScroll, estimatedHeight, scrollContainerRef, } = uuiCore.useVirtualList({
|
|
@@ -2301,7 +2301,7 @@ const VirtualList = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
|
2301
2301
|
const scrollShadows = uuiCore.useScrollShadows({ root: scrollContainerRef.current });
|
|
2302
2302
|
const renderRows = () => props.renderRows?.({
|
|
2303
2303
|
listContainerRef, estimatedHeight, offsetY, scrollShadows,
|
|
2304
|
-
}) || (React__namespace.createElement("div", { className: css$
|
|
2304
|
+
}) || (React__namespace.createElement("div", { className: css$12.listContainer, style: { minHeight: `${estimatedHeight}px` } },
|
|
2305
2305
|
React__namespace.createElement("div", { ref: listContainerRef, role: props.role, style: { marginTop: offsetY } }, props.rows)));
|
|
2306
2306
|
const renderView = ({ style }) => (React__namespace.createElement(VirtualListView, { isLoading: props.isLoading, style: style, rawProps: props.rawProps, renderBlocker: props.renderBlocker }));
|
|
2307
2307
|
const scrollBarsRef = React__namespace.useCallback((scrollbars) => {
|
|
@@ -2309,7 +2309,7 @@ const VirtualList = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
|
2309
2309
|
return;
|
|
2310
2310
|
scrollContainerRef.current = scrollbars.container.firstChild;
|
|
2311
2311
|
}, []);
|
|
2312
|
-
return (React__namespace.createElement(ScrollBars, { cx: uuiCore.cx(css$
|
|
2312
|
+
return (React__namespace.createElement(ScrollBars, { cx: uuiCore.cx(css$12.scrollContainer, props.cx, {
|
|
2313
2313
|
[uuiCore.uuiMarkers.scrolledLeft]: scrollShadows.horizontalLeft,
|
|
2314
2314
|
[uuiCore.uuiMarkers.scrolledRight]: scrollShadows.horizontalRight,
|
|
2315
2315
|
[uuiCore.uuiMarkers.scrolledTop]: scrollShadows.verticalTop,
|
|
@@ -2331,7 +2331,7 @@ const VirtualListView = /* @__PURE__ */React__namespace.forwardRef((props, ref)
|
|
|
2331
2331
|
props.renderBlocker ? props.renderBlocker({ isLoading: props.isLoading }) : React__namespace.createElement(Blocker, { isEnabled: props.isLoading })));
|
|
2332
2332
|
});
|
|
2333
2333
|
|
|
2334
|
-
var css$11 = {"root":"
|
|
2334
|
+
var css$11 = {"root":"hT4QsC"};
|
|
2335
2335
|
|
|
2336
2336
|
function CheckboxGroup(props) {
|
|
2337
2337
|
const currentValue = props.value || [];
|
|
@@ -2353,7 +2353,7 @@ function CheckboxGroup(props) {
|
|
|
2353
2353
|
})));
|
|
2354
2354
|
}
|
|
2355
2355
|
|
|
2356
|
-
var css$10 = {"root":"
|
|
2356
|
+
var css$10 = {"root":"jt9-e8","modal-blocker":"_4g96UD","modalBlocker":"_4g96UD","animateModalBlocker":"-KkOwR","modal":"WoloJs","modal-footer":"tGgdt7","modalFooter":"tGgdt7","border-top":"STSaep","borderTop":"STSaep","modal-header":"BZ7G4j","modalHeader":"BZ7G4j","border-bottom":"nminiJ","borderBottom":"nminiJ"};
|
|
2357
2357
|
|
|
2358
2358
|
const ModalBlocker = /* @__PURE__ */uuiCore.withMods(uuiComponents.ModalBlocker, () => [css$10.modalBlocker]);
|
|
2359
2359
|
const ModalWindow = /* @__PURE__ */uuiCore.withMods(uuiComponents.ModalWindow, () => [css$10.root, css$10.modal], (props) => {
|
|
@@ -2544,7 +2544,7 @@ const TREE_SHAKEABLE_INIT = () => ({
|
|
|
2544
2544
|
});
|
|
2545
2545
|
const i18n = /* @__PURE__ */TREE_SHAKEABLE_INIT();
|
|
2546
2546
|
|
|
2547
|
-
var css$$ = {"root":"
|
|
2547
|
+
var css$$ = {"root":"AnFjUZ","icon-wrapper":"r6Zi6F","iconWrapper":"r6Zi6F","action-wrapper":"yswwBK","actionWrapper":"yswwBK","close-icon":"Geio6J","closeIcon":"Geio6J","main-path":"b4uyxZ","mainPath":"b4uyxZ","content":"rAtmZc","close-wrapper":"_6vrSFf","closeWrapper":"_6vrSFf","clear-notifications":"_8SrL5f","clearNotifications":"_8SrL5f"};
|
|
2548
2548
|
|
|
2549
2549
|
const NotificationCard = /* @__PURE__ */React__namespace.default.forwardRef((props, ref) => {
|
|
2550
2550
|
const notificationCardNode = React__namespace.default.useRef(null);
|
|
@@ -2577,7 +2577,7 @@ function ClearNotification() {
|
|
|
2577
2577
|
React__namespace.default.createElement(LinkButton, { caption: i18n.notificationCard.closeAllNotificationsButton, onClick: () => uuiCtx.uuiNotifications.clearAll() })));
|
|
2578
2578
|
}
|
|
2579
2579
|
|
|
2580
|
-
var css$_ = {"footer":"
|
|
2580
|
+
var css$_ = {"footer":"i3jbHu"};
|
|
2581
2581
|
|
|
2582
2582
|
class ConfirmationModal extends React__namespace.Component {
|
|
2583
2583
|
render() {
|
|
@@ -2619,7 +2619,7 @@ function useReliableForceUpdate() {
|
|
|
2619
2619
|
return red[1];
|
|
2620
2620
|
}
|
|
2621
2621
|
|
|
2622
|
-
var css$Z = {"root":"
|
|
2622
|
+
var css$Z = {"root":"CjyBO9","container":"_4FF1Fs"};
|
|
2623
2623
|
|
|
2624
2624
|
const defaultFormat = 'MMM D, YYYY';
|
|
2625
2625
|
const valueFormat = 'YYYY-MM-DD';
|
|
@@ -2638,7 +2638,7 @@ const defaultRangeValue = {
|
|
|
2638
2638
|
from: null,
|
|
2639
2639
|
to: null,
|
|
2640
2640
|
};
|
|
2641
|
-
const
|
|
2641
|
+
const getDisplayedMonth = (selectedDate, focus) => {
|
|
2642
2642
|
if (selectedDate.from && selectedDate.to && focus) {
|
|
2643
2643
|
return uuiDayjs.dayjs(selectedDate[focus]);
|
|
2644
2644
|
}
|
|
@@ -2747,6 +2747,13 @@ const getPrevYearsList = (currentDate) => {
|
|
|
2747
2747
|
const getNextYearsList = (currentDate) => {
|
|
2748
2748
|
return currentDate.add(16, 'year');
|
|
2749
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
|
+
};
|
|
2750
2757
|
|
|
2751
2758
|
const uuiHeader = {
|
|
2752
2759
|
container: 'uui-datepicker-header-container',
|
|
@@ -2830,14 +2837,14 @@ function DatePickerHeader({ navIconLeft, navIconRight, value: { month, view }, o
|
|
|
2830
2837
|
React__namespace.createElement(Button, { icon: navIconRight || settings.datePicker.icons.body.nextIcon, color: "secondary", fill: "ghost", cx: uuiHeader.navIconRight, onClick: !isDisabled && (() => onRightNavigationArrow()), isDisabled: disableNext }))));
|
|
2831
2838
|
}
|
|
2832
2839
|
|
|
2833
|
-
var css$Y = {"root":"
|
|
2840
|
+
var css$Y = {"root":"AhmaUp"};
|
|
2834
2841
|
|
|
2835
2842
|
function applyDateSelectionMods() {
|
|
2836
2843
|
return [css$Y.root, `uui-size-${settings.datePicker.sizes.body}`];
|
|
2837
2844
|
}
|
|
2838
2845
|
const Calendar = /* @__PURE__ */uuiCore.withMods(uuiComponents.Calendar, applyDateSelectionMods);
|
|
2839
2846
|
|
|
2840
|
-
var css$X = {"root":"
|
|
2847
|
+
var css$X = {"root":"pGZDV6"};
|
|
2841
2848
|
|
|
2842
2849
|
const uuiDatePickerBody = {
|
|
2843
2850
|
wrapper: 'uui-datepicker-body-wrapper',
|
|
@@ -2958,7 +2965,7 @@ function DatePickerComponent(props, ref) {
|
|
|
2958
2965
|
}
|
|
2959
2966
|
const DatePicker = /* @__PURE__ */React__namespace.default.forwardRef(DatePickerComponent);
|
|
2960
2967
|
|
|
2961
|
-
var css$W = {"date-input":"
|
|
2968
|
+
var css$W = {"date-input":"bPkzMM","dateInput":"bPkzMM","root":"PKnP6p","separator":"FSvNvJ"};
|
|
2962
2969
|
|
|
2963
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) => {
|
|
2964
2971
|
const [inputValue, setInputValue] = React.useState(toCustomDateRangeFormat(value, format));
|
|
@@ -2966,10 +2973,15 @@ const RangeDatePickerInput = /* @__PURE__ */React.forwardRef(({ isDisabled, isIn
|
|
|
2966
2973
|
setInputValue(toCustomDateRangeFormat(value, format));
|
|
2967
2974
|
}, [format, value, setInputValue]);
|
|
2968
2975
|
const onInputChange = (newValue, inputType) => {
|
|
2969
|
-
|
|
2976
|
+
const updatedInputValue = {
|
|
2970
2977
|
...inputValue,
|
|
2971
2978
|
[inputType]: newValue,
|
|
2972
|
-
}
|
|
2979
|
+
};
|
|
2980
|
+
setInputValue(updatedInputValue);
|
|
2981
|
+
const selectedDate = toValueDateRangeFormat(updatedInputValue, format);
|
|
2982
|
+
if (isValidAndInFilter(selectedDate, inputType, filter)) {
|
|
2983
|
+
onValueChange(selectedDate);
|
|
2984
|
+
}
|
|
2973
2985
|
};
|
|
2974
2986
|
const handleFocus = (event, inputType) => {
|
|
2975
2987
|
onFocusInput(event, inputType);
|
|
@@ -2981,20 +2993,20 @@ const RangeDatePickerInput = /* @__PURE__ */React.forwardRef(({ isDisabled, isIn
|
|
|
2981
2993
|
to: !preventEmptyToDate,
|
|
2982
2994
|
};
|
|
2983
2995
|
const selectedDate = toValueDateRangeFormat(inputValue, format);
|
|
2984
|
-
// 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
|
|
2985
2997
|
if (selectedDate[inputType] === null && !canBeEmpty[inputType]) {
|
|
2986
2998
|
selectedDate[inputType] = value[inputType];
|
|
2987
2999
|
}
|
|
2988
|
-
|
|
2989
|
-
if (isValidRange(selectedDate) && !isDateDisabled) {
|
|
3000
|
+
if (isValidAndInFilter(selectedDate, inputType, filter)) {
|
|
2990
3001
|
setInputValue(toCustomDateRangeFormat(selectedDate, format));
|
|
2991
3002
|
onValueChange(selectedDate);
|
|
2992
3003
|
}
|
|
2993
3004
|
else {
|
|
3005
|
+
const newInputValue = !canBeEmpty[inputType] ? toCustomDateRangeFormat(value, format)[inputType] : null;
|
|
2994
3006
|
const newValue = !canBeEmpty[inputType] ? value[inputType] : null;
|
|
2995
3007
|
setInputValue({
|
|
2996
3008
|
...inputValue,
|
|
2997
|
-
[inputType]:
|
|
3009
|
+
[inputType]: newInputValue,
|
|
2998
3010
|
});
|
|
2999
3011
|
onValueChange({
|
|
3000
3012
|
...selectedDate,
|
|
@@ -3024,7 +3036,7 @@ const RangeDatePickerInput = /* @__PURE__ */React.forwardRef(({ isDisabled, isIn
|
|
|
3024
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 })));
|
|
3025
3037
|
});
|
|
3026
3038
|
|
|
3027
|
-
var css$V = {"root":"
|
|
3039
|
+
var css$V = {"root":"rrMgXH"};
|
|
3028
3040
|
|
|
3029
3041
|
const uuiPresets = {
|
|
3030
3042
|
container: 'uui-presets-container',
|
|
@@ -3044,7 +3056,7 @@ function CalendarPresets(props) {
|
|
|
3044
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 })))));
|
|
3045
3057
|
}
|
|
3046
3058
|
|
|
3047
|
-
var css$U = {"root":"
|
|
3059
|
+
var css$U = {"root":"NxOWWb","container":"ZYuqFJ","day-selection":"MonZ7Q","daySelection":"MonZ7Q","from-picker":"Sw3Hz-","fromPicker":"Sw3Hz-","to-picker":"uxOJ-1","toPicker":"uxOJ-1","bodes-wrapper":"PGSpMi","bodesWrapper":"PGSpMi","blocker":"fymY1c"};
|
|
3048
3060
|
|
|
3049
3061
|
const uuiRangeDatePickerBody = {
|
|
3050
3062
|
inRange: 'uui-range-datepicker-in-range',
|
|
@@ -3123,10 +3135,10 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3123
3135
|
const { value: _value, filter } = props;
|
|
3124
3136
|
const { selectedDate: _selectedDate, inFocus, } = _value;
|
|
3125
3137
|
const selectedDate = _selectedDate || defaultRangeValue; // also handles null in comparison to default value
|
|
3126
|
-
const [activeMonth, setActiveMonth] = React.useState(inFocus);
|
|
3127
3138
|
const [view, setView] = React.useState('DAY_SELECTION');
|
|
3139
|
+
const [disabledPanel, setDisabledPanel] = React.useState(null);
|
|
3128
3140
|
const [month, setMonth] = React.useState(() => {
|
|
3129
|
-
return
|
|
3141
|
+
return getDisplayedMonth(selectedDate, inFocus);
|
|
3130
3142
|
});
|
|
3131
3143
|
const getRange = (newValue) => {
|
|
3132
3144
|
if (!filter || filter(uuiDayjs.dayjs(newValue))) {
|
|
@@ -3138,7 +3150,7 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3138
3150
|
}
|
|
3139
3151
|
}
|
|
3140
3152
|
};
|
|
3141
|
-
const onBodyValueChange = (v
|
|
3153
|
+
const onBodyValueChange = (v) => {
|
|
3142
3154
|
// selectedDate can be null, other params should always have values
|
|
3143
3155
|
const newRange = v ? getRange(v) : selectedDate;
|
|
3144
3156
|
let newInFocus = null;
|
|
@@ -3147,25 +3159,28 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3147
3159
|
if (inFocus === 'from' && fromChanged) {
|
|
3148
3160
|
newInFocus = 'to';
|
|
3149
3161
|
}
|
|
3150
|
-
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"
|
|
3151
3163
|
newInFocus = 'from';
|
|
3152
3164
|
}
|
|
3153
|
-
setActiveMonth(part);
|
|
3154
3165
|
props.onValueChange({
|
|
3155
3166
|
selectedDate: newRange ? newRange : selectedDate,
|
|
3156
3167
|
inFocus: newInFocus ?? inFocus,
|
|
3157
3168
|
});
|
|
3158
3169
|
};
|
|
3159
3170
|
const renderDay = (renderProps) => {
|
|
3160
|
-
|
|
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
|
+
} }));
|
|
3161
3176
|
};
|
|
3162
3177
|
const from = {
|
|
3163
3178
|
month,
|
|
3164
|
-
view:
|
|
3179
|
+
view: disabledPanel === 'right' ? view : 'DAY_SELECTION',
|
|
3165
3180
|
value: null,
|
|
3166
3181
|
};
|
|
3167
3182
|
const to = {
|
|
3168
|
-
view:
|
|
3183
|
+
view: disabledPanel === 'left' ? view : 'DAY_SELECTION',
|
|
3169
3184
|
month: month.add(1, 'month'),
|
|
3170
3185
|
value: null,
|
|
3171
3186
|
};
|
|
@@ -3175,6 +3190,7 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3175
3190
|
React__namespace.default.createElement(CalendarPresets, { onPresetSet: (presetVal) => {
|
|
3176
3191
|
// enable day if smth other were selected
|
|
3177
3192
|
setView('DAY_SELECTION');
|
|
3193
|
+
setDisabledPanel(null);
|
|
3178
3194
|
setMonth(uuiDayjs.dayjs(presetVal.from));
|
|
3179
3195
|
props.onValueChange({
|
|
3180
3196
|
inFocus: props.value.inFocus,
|
|
@@ -3185,25 +3201,44 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3185
3201
|
});
|
|
3186
3202
|
}, presets: presets })));
|
|
3187
3203
|
};
|
|
3188
|
-
|
|
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" },
|
|
3189
3213
|
React__namespace.default.createElement(FlexRow, { cx: [view === 'DAY_SELECTION' && css$U.daySelection, css$U.container], alignItems: "top" },
|
|
3190
3214
|
React__namespace.default.createElement(FlexCell, { width: "auto" },
|
|
3191
3215
|
React__namespace.default.createElement(FlexRow, null,
|
|
3192
3216
|
React__namespace.default.createElement(FlexRow, { cx: css$U.bodesWrapper, alignItems: "top" },
|
|
3193
|
-
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) => {
|
|
3194
3218
|
setMonth(m);
|
|
3195
|
-
}, onViewChange: (v) =>
|
|
3196
|
-
|
|
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) => {
|
|
3197
3224
|
setMonth(m.subtract(1, 'month'));
|
|
3198
|
-
}, 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' }),
|
|
3199
3229
|
view !== 'DAY_SELECTION' && (React__namespace.default.createElement("div", { style: {
|
|
3200
|
-
left:
|
|
3201
|
-
right:
|
|
3230
|
+
left: disabledPanel === 'right' ? '50%' : undefined,
|
|
3231
|
+
right: disabledPanel === 'left' ? '50%' : undefined,
|
|
3202
3232
|
}, className: css$U.blocker }))),
|
|
3203
3233
|
props.presets && renderPresets(props.presets)),
|
|
3204
3234
|
props.renderFooter && props.renderFooter()))));
|
|
3205
3235
|
}
|
|
3206
|
-
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) => {
|
|
3207
3242
|
const dayValue = day.valueOf();
|
|
3208
3243
|
const fromValue = selectedDate?.from
|
|
3209
3244
|
? uuiDayjs.dayjs(selectedDate.from).valueOf() : null;
|
|
@@ -3216,10 +3251,14 @@ const getDayCX = (day, selectedDate) => {
|
|
|
3216
3251
|
&& fromValue !== toValue;
|
|
3217
3252
|
const isFirst = dayValue === fromValue;
|
|
3218
3253
|
const isLast = dayValue === toValue;
|
|
3219
|
-
return
|
|
3254
|
+
return {
|
|
3255
|
+
inRange,
|
|
3256
|
+
isFirst,
|
|
3257
|
+
isLast,
|
|
3258
|
+
};
|
|
3220
3259
|
};
|
|
3221
3260
|
|
|
3222
|
-
var css$T = {"dropdown-container":"
|
|
3261
|
+
var css$T = {"dropdown-container":"_5wkUT1","dropdownContainer":"_5wkUT1"};
|
|
3223
3262
|
|
|
3224
3263
|
function RangeDatePickerComponent(props, ref) {
|
|
3225
3264
|
const { value: _value, format = defaultFormat, size = settings.rangeDatePicker.sizes.default } = props;
|
|
@@ -3287,7 +3326,7 @@ function RangeDatePickerComponent(props, ref) {
|
|
|
3287
3326
|
}
|
|
3288
3327
|
const RangeDatePicker = /* @__PURE__ */React__namespace.default.forwardRef(RangeDatePickerComponent);
|
|
3289
3328
|
|
|
3290
|
-
var css$S = {"root":"
|
|
3329
|
+
var css$S = {"root":"najlzD","blocker":"dUeeTz","marker":"Z-HdM4","top":"iSgGpi","bottom":"_0Z6PoL","left":"YC4Jtv","right":"PqYfn8","inside":"OqGC9v"};
|
|
3291
3330
|
|
|
3292
3331
|
function DropMarker(props) {
|
|
3293
3332
|
return props.isDndInProgress
|
|
@@ -3304,15 +3343,15 @@ function DropMarker(props) {
|
|
|
3304
3343
|
|
|
3305
3344
|
const RichTextView = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.RichTextView, (mods) => ['uui-typography', `uui-typography-size-${mods.size || settings.richTextView.sizes.default}`]);
|
|
3306
3345
|
|
|
3307
|
-
var css$R = {"search-wrapper":"
|
|
3346
|
+
var css$R = {"search-wrapper":"E9-CfX","searchWrapper":"E9-CfX","no-data":"GC--fv","noData":"GC--fv"};
|
|
3308
3347
|
|
|
3309
|
-
var css$Q = {"picker-row":"
|
|
3348
|
+
var css$Q = {"picker-row":"IENZmX","pickerRow":"IENZmX","align-widgets-top":"_3nqfGp","alignWidgetsTop":"_3nqfGp","row-content":"GQxlaW","rowContent":"GQxlaW","align-widgets-center":"_0w6F-t","alignWidgetsCenter":"_0w6F-t","icon-container":"D-vOhU","iconContainer":"D-vOhU","content-wrapper":"ObaiU-","contentWrapper":"ObaiU-","icon-wrapper":"fexHlt","iconWrapper":"fexHlt","icon-default":"OeWOXU","iconDefault":"OeWOXU","selected-mark":"ijNUQE","selectedMark":"ijNUQE"};
|
|
3310
3349
|
|
|
3311
|
-
var css$P = {"root":"
|
|
3350
|
+
var css$P = {"root":"XLkYIx"};
|
|
3312
3351
|
|
|
3313
3352
|
const AvatarStack = /* @__PURE__ */uuiCore.withMods(uuiComponents.AvatarStack, () => [css$P.root]);
|
|
3314
3353
|
|
|
3315
|
-
var css$O = {"root":"
|
|
3354
|
+
var css$O = {"root":"_8RY-71"};
|
|
3316
3355
|
|
|
3317
3356
|
const DEFAULT_FILL = 'solid';
|
|
3318
3357
|
function applyBadgeMods(mods) {
|
|
@@ -3340,7 +3379,7 @@ const Badge = /* @__PURE__ */React__namespace.default.forwardRef((props, ref) =>
|
|
|
3340
3379
|
props.isDropdown && (React__namespace.default.createElement(uuiComponents.IconContainer, { icon: DropdownIcon, flipY: props.isOpen }))));
|
|
3341
3380
|
});
|
|
3342
3381
|
|
|
3343
|
-
var css$N = {"root":"
|
|
3382
|
+
var css$N = {"root":"IusQf-"};
|
|
3344
3383
|
|
|
3345
3384
|
function applyTagMods(props) {
|
|
3346
3385
|
return [
|
|
@@ -3368,7 +3407,7 @@ const Tag = /* @__PURE__ */React__namespace.default.forwardRef((props, ref) => {
|
|
|
3368
3407
|
props.onClear && !props.isDisabled && (React__namespace.default.createElement(uuiComponents.IconContainer, { cx: uuiCore.uuiMarkers.clickable, icon: ClearIcon, onClick: props.onClear }))));
|
|
3369
3408
|
});
|
|
3370
3409
|
|
|
3371
|
-
var css$M = {"root":"
|
|
3410
|
+
var css$M = {"root":"_0e4mfv","page":"_7q9T0z","spacer":"F4-tp8","mode-ghost":"_2B9cZ7","modeGhost":"_2B9cZ7"};
|
|
3372
3411
|
|
|
3373
3412
|
function Paginator(props) {
|
|
3374
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 },
|
|
@@ -3385,14 +3424,14 @@ function Paginator(props) {
|
|
|
3385
3424
|
return React__namespace.default.createElement(uuiComponents.Paginator, { ...props, render: renderPaginator });
|
|
3386
3425
|
}
|
|
3387
3426
|
|
|
3388
|
-
var css$L = {"root":"
|
|
3427
|
+
var css$L = {"root":"r2vUNB","progress-bar":"GWYAA8","progressBar":"GWYAA8","progressBar-indeterminate":"XJkBZu","progressBarIndeterminate":"XJkBZu","size-12":"t--fFm","size12":"t--fFm","size-18":"qZcH9F","size18":"qZcH9F","size-24":"avi5rx","size24":"avi5rx"};
|
|
3389
3428
|
|
|
3390
3429
|
const IndeterminateBar = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
3391
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}`]) },
|
|
3392
3431
|
React__namespace.createElement("div", { className: cx__default.default(css$L.progressBar) })));
|
|
3393
3432
|
});
|
|
3394
3433
|
|
|
3395
|
-
var css$K = {"root":"
|
|
3434
|
+
var css$K = {"root":"wUNkKD","striped":"Gx0wDA","animate-stripes":"Bkplza","animateStripes":"Bkplza","size-12":"Hx-djV","size12":"Hx-djV","size-18":"-uvxzh","size18":"-uvxzh","size-24":"_3pPC0I","size24":"_3pPC0I"};
|
|
3396
3435
|
|
|
3397
3436
|
const DEFAULT_SIZE = '12';
|
|
3398
3437
|
function applyProgressBarMods(mods) {
|
|
@@ -3407,14 +3446,14 @@ const ProgressBar = /* @__PURE__ */uuiCore.withMods(uuiComponents__namespace.Pro
|
|
|
3407
3446
|
hideLabel: props.hideLabel || props.striped,
|
|
3408
3447
|
}));
|
|
3409
3448
|
|
|
3410
|
-
var css$J = {"root":"
|
|
3449
|
+
var css$J = {"root":"WnB--B"};
|
|
3411
3450
|
|
|
3412
3451
|
const IndicatorBar = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
3413
3452
|
const { progress } = props;
|
|
3414
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) }));
|
|
3415
3454
|
});
|
|
3416
3455
|
|
|
3417
|
-
var css$I = {"root":"
|
|
3456
|
+
var css$I = {"root":"_6lfqXV"};
|
|
3418
3457
|
|
|
3419
3458
|
const StatusIndicator = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
3420
3459
|
return (React__namespace.default.createElement("div", { ref: ref, className: cx__default.default([
|
|
@@ -3429,7 +3468,7 @@ const StatusIndicator = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
3429
3468
|
React__namespace.default.createElement("p", { className: "uui-status_indicator-caption" }, props.caption)));
|
|
3430
3469
|
});
|
|
3431
3470
|
|
|
3432
|
-
var css$H = {"drag-handle":"
|
|
3471
|
+
var css$H = {"drag-handle-wrapper":"jmFD9Q","dragHandleWrapper":"jmFD9Q","with-indent":"CVXzpz","withIndent":"CVXzpz","drag-handle":"_4hzyg8","dragHandle":"_4hzyg8","icon-container":"_1NL-wM","iconContainer":"_1NL-wM"};
|
|
3433
3472
|
|
|
3434
3473
|
function DataRowAddons(props) {
|
|
3435
3474
|
const row = props.rowProps;
|
|
@@ -3440,7 +3479,8 @@ function DataRowAddons(props) {
|
|
|
3440
3479
|
return settings.dataTable.sizes.body.indentWidthMap[props.size || settings.dataTable.sizes.body.row];
|
|
3441
3480
|
};
|
|
3442
3481
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
3443
|
-
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 }))),
|
|
3444
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 })),
|
|
3445
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: {
|
|
3446
3486
|
'aria-label': row.isFolded ? 'Unfold' : 'Fold',
|
|
@@ -3515,7 +3555,7 @@ const getHighlightedSearchMatches = (str, search) => {
|
|
|
3515
3555
|
return getDecoratedText(str, ranges);
|
|
3516
3556
|
};
|
|
3517
3557
|
|
|
3518
|
-
var css$G = {"root":"
|
|
3558
|
+
var css$G = {"root":"e3GVrt","column-gap":"bm68Rc","columnGap":"bm68Rc","title":"mvJpb-","subtitle":"TrDlgx","disabled":"EJFvu6","multiline":"yS-p-3"};
|
|
3519
3559
|
|
|
3520
3560
|
function PickerItem(props) {
|
|
3521
3561
|
const { highlightSearchMatches = true, size, avatarUrl, isLoading, isDisabled, icon, } = props;
|
|
@@ -3538,6 +3578,9 @@ function getAvatarSize(size, isMultiline) {
|
|
|
3538
3578
|
|
|
3539
3579
|
function DataPickerRow(props) {
|
|
3540
3580
|
const rowNode = React__namespace.useRef(null);
|
|
3581
|
+
const handleMouseEnter = React.useCallback(() => {
|
|
3582
|
+
props.onFocus && props.onFocus(props.index);
|
|
3583
|
+
}, [props.onFocus, props.index]);
|
|
3541
3584
|
React__namespace.useEffect(() => {
|
|
3542
3585
|
if (props.onFocus) {
|
|
3543
3586
|
rowNode.current?.addEventListener('mouseenter', handleMouseEnter);
|
|
@@ -3545,10 +3588,7 @@ function DataPickerRow(props) {
|
|
|
3545
3588
|
return () => {
|
|
3546
3589
|
rowNode.current?.removeEventListener('mouseenter', handleMouseEnter);
|
|
3547
3590
|
};
|
|
3548
|
-
}, [props.onFocus]);
|
|
3549
|
-
const handleMouseEnter = () => {
|
|
3550
|
-
props.onFocus && props.onFocus(props.index);
|
|
3551
|
-
};
|
|
3591
|
+
}, [props.onFocus, handleMouseEnter]);
|
|
3552
3592
|
const getSubtitle = ({ path }) => {
|
|
3553
3593
|
if (!props.dataSourceState?.search)
|
|
3554
3594
|
return;
|
|
@@ -3660,6 +3700,7 @@ function DataPickerBody({ highlightSearchMatches = true, ...props }) {
|
|
|
3660
3700
|
? renderEmpty() : (React__namespace.default.createElement(VirtualList, { value: props.value, onValueChange: props.onValueChange, rows: renderedDataRows, rawProps: {
|
|
3661
3701
|
'aria-multiselectable': props.selectionMode === 'multi' ? true : null,
|
|
3662
3702
|
'aria-orientation': 'vertical',
|
|
3703
|
+
tabIndex: -1,
|
|
3663
3704
|
...props.rawProps,
|
|
3664
3705
|
}, rowsCount: props.rowsCount, isLoading: props.isReloading, renderBlocker: settings.pickerInput.renderBlocker })))));
|
|
3665
3706
|
}
|
|
@@ -3688,7 +3729,7 @@ function DataPickerFooterImpl(props) {
|
|
|
3688
3729
|
}
|
|
3689
3730
|
const DataPickerFooter = /* @__PURE__ */React__namespace.default.memo(DataPickerFooterImpl);
|
|
3690
3731
|
|
|
3691
|
-
var css$F = {"header":"
|
|
3732
|
+
var css$F = {"header":"mRkDIc","title":"_51WdNU","close":"_6NpHF7"};
|
|
3692
3733
|
|
|
3693
3734
|
const DataPickerMobileHeaderImpl = (props) => {
|
|
3694
3735
|
const title = props.title && typeof props.title === 'string' ? props.title.charAt(0).toUpperCase() + props.title.slice(1) : '';
|
|
@@ -3698,7 +3739,7 @@ const DataPickerMobileHeaderImpl = (props) => {
|
|
|
3698
3739
|
};
|
|
3699
3740
|
const DataPickerMobileHeader = /* @__PURE__ */React__namespace.default.memo(DataPickerMobileHeaderImpl);
|
|
3700
3741
|
|
|
3701
|
-
var css$E = {"done":"
|
|
3742
|
+
var css$E = {"done":"_9tYeeQ","container":"U5Reh2"};
|
|
3702
3743
|
|
|
3703
3744
|
const PickerBodyMobileView = (props) => {
|
|
3704
3745
|
const isMobileView = uuiCore.isMobile();
|
|
@@ -3710,7 +3751,7 @@ const PickerBodyMobileView = (props) => {
|
|
|
3710
3751
|
isMobileView && (React__namespace.default.createElement(LinkButton, { caption: i18n.pickerInput.doneButton, onClick: () => props.onClose?.(), cx: css$E.done, size: settings.pickerInput.sizes.body.mobileFooterLinkButton }))));
|
|
3711
3752
|
};
|
|
3712
3753
|
|
|
3713
|
-
var css$D = {"sub-header-wrapper":"
|
|
3754
|
+
var css$D = {"sub-header-wrapper":"Ore2Y8","subHeaderWrapper":"Ore2Y8","switch":"dvqMMZ","no-found-modal-container":"rfcl6F","noFoundModalContainer":"rfcl6F","no-found-modal-container-icon":"iW93Vi","noFoundModalContainerIcon":"iW93Vi","no-found-modal-container-text":"MFR6Li","noFoundModalContainerText":"MFR6Li","body":"ht8gVI"};
|
|
3714
3755
|
|
|
3715
3756
|
function PickerModal(props) {
|
|
3716
3757
|
const { view, selection, dataSourceStateLens, dataSourceState, getName, clearSelection, getRows, getListProps, getFooterProps, isSingleSelect, handleDataSourceValueChange, } = uuiComponents.usePickerModal(props);
|
|
@@ -3734,6 +3775,7 @@ function PickerModal(props) {
|
|
|
3734
3775
|
React__namespace.default.createElement(Text, { cx: css$D.noFoundModalContainerText, fontSize: "12", lineHeight: "18", color: "primary" }, i18n.dataPickerBody.noRecordsSubTitle)));
|
|
3735
3776
|
};
|
|
3736
3777
|
const dataRows = getRows();
|
|
3778
|
+
const isSearching = dataSourceState.search && dataSourceState.search.length > 0;
|
|
3737
3779
|
return (React__namespace.default.createElement(ModalBlocker, { ...props },
|
|
3738
3780
|
React__namespace.default.createElement(ModalWindow, { width: 600, height: 700, cx: css$D.body },
|
|
3739
3781
|
React__namespace.default.createElement(ModalHeader, { title: props.caption || i18n.pickerModal.headerTitle, onClose: () => props.abort() }),
|
|
@@ -3746,13 +3788,13 @@ function PickerModal(props) {
|
|
|
3746
3788
|
rows: dataRows,
|
|
3747
3789
|
searchPosition: 'body',
|
|
3748
3790
|
}, e), autoFocus: true, placeholder: i18n.pickerModal.searchPlaceholder, rawProps: { dir: 'auto' } })),
|
|
3749
|
-
!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" })),
|
|
3750
3792
|
props.renderFilter && React__namespace.default.createElement(FlexCell, { grow: 2 }, props.renderFilter(dataSourceStateLens.prop('filter').toProps()))),
|
|
3751
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 }),
|
|
3752
3794
|
React__namespace.default.createElement(ModalFooter, null, props.renderFooter ? props.renderFooter(getFooterProps()) : renderFooter()))));
|
|
3753
3795
|
}
|
|
3754
3796
|
|
|
3755
|
-
var css$C = {"tooltip":"
|
|
3797
|
+
var css$C = {"tooltip":"hiMpzp"};
|
|
3756
3798
|
|
|
3757
3799
|
const PickerTogglerTag = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
3758
3800
|
const tagProps = {
|
|
@@ -3771,7 +3813,7 @@ const PickerTogglerTag = /* @__PURE__ */React__namespace.forwardRef((props, ref)
|
|
|
3771
3813
|
}
|
|
3772
3814
|
});
|
|
3773
3815
|
|
|
3774
|
-
var css$B = {"root":"
|
|
3816
|
+
var css$B = {"root":"_22aNtW"};
|
|
3775
3817
|
|
|
3776
3818
|
const defaultMode = EditMode.FORM;
|
|
3777
3819
|
function applyPickerTogglerMods(mods) {
|
|
@@ -3853,7 +3895,7 @@ function PickerInputComponent(props, ref) {
|
|
|
3853
3895
|
}
|
|
3854
3896
|
const PickerInput = /* @__PURE__ */React__namespace.default.forwardRef(PickerInputComponent);
|
|
3855
3897
|
|
|
3856
|
-
var css$A = {"row":"
|
|
3898
|
+
var css$A = {"row":"MsehXJ"};
|
|
3857
3899
|
|
|
3858
3900
|
function PickerListRow(props) {
|
|
3859
3901
|
let label;
|
|
@@ -3873,7 +3915,7 @@ function PickerListRow(props) {
|
|
|
3873
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));
|
|
3874
3916
|
}
|
|
3875
3917
|
|
|
3876
|
-
var css$z = {"root":"
|
|
3918
|
+
var css$z = {"root":"vt2804"};
|
|
3877
3919
|
|
|
3878
3920
|
function PickerList(props) {
|
|
3879
3921
|
const { context, view, onlySelectedView, getName, getEntityName, appendLastSelected, getSelectedIdsArray, buildRowsList, getMaxDefaultItems, getModalTogglerCaption, } = uuiComponents.usePickerList(props);
|
|
@@ -3908,7 +3950,7 @@ function PickerList(props) {
|
|
|
3908
3950
|
}, selectedRows)));
|
|
3909
3951
|
}
|
|
3910
3952
|
|
|
3911
|
-
var css$y = {"root":"
|
|
3953
|
+
var css$y = {"root":"wuVH3d","wrapper":"Tr7nMb","align-widgets-top":"B1Um3p","alignWidgetsTop":"B1Um3p","align-widgets-center":"pR-RRK","alignWidgetsCenter":"pR-RRK"};
|
|
3912
3954
|
|
|
3913
3955
|
function DataTableCell(initialProps) {
|
|
3914
3956
|
const props = { ...initialProps };
|
|
@@ -3958,7 +4000,7 @@ function DataTableCell(initialProps) {
|
|
|
3958
4000
|
return React__namespace.createElement(uuiComponents.DataTableCell, { ...props });
|
|
3959
4001
|
}
|
|
3960
4002
|
|
|
3961
|
-
var css$x = {"root":"
|
|
4003
|
+
var css$x = {"root":"p6Ecu6"};
|
|
3962
4004
|
|
|
3963
4005
|
// Here we define a single instance of the renderCell function to make DataTableRow#shouldComponentUpdate work.
|
|
3964
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.
|
|
@@ -3974,7 +4016,7 @@ const DataTableRow = /* @__PURE__ */uuiCore.withMods(uuiComponents.DataTableRow,
|
|
|
3974
4016
|
];
|
|
3975
4017
|
}, () => propsMods);
|
|
3976
4018
|
|
|
3977
|
-
var css$w = {"sorting-panel-container":"
|
|
4019
|
+
var css$w = {"sorting-panel-container":"eeMlQW","sortingPanelContainer":"eeMlQW"};
|
|
3978
4020
|
|
|
3979
4021
|
const SortingPanelImpl = ({ sortDirection, onSort }) => {
|
|
3980
4022
|
const sortAsc = React.useCallback(() => onSort(sortDirection === 'asc' ? undefined : 'asc'), [onSort]);
|
|
@@ -3994,7 +4036,7 @@ const ColumnHeaderDropdownImpl = (props) => {
|
|
|
3994
4036
|
};
|
|
3995
4037
|
const ColumnHeaderDropdown = /* @__PURE__ */React__namespace.default.memo(ColumnHeaderDropdownImpl);
|
|
3996
4038
|
|
|
3997
|
-
var css$v = {"root":"
|
|
4039
|
+
var css$v = {"root":"Nvhg1M","caption-wrapper":"DTNVmH","captionWrapper":"DTNVmH","sort-icon":"saIZdw","sortIcon":"saIZdw","dropdown-icon":"iqmRP2","dropdownIcon":"iqmRP2","infoIcon":"uHMSfp","align-right":"ACkHAZ","alignRight":"ACkHAZ","align-center":"EIYI7q","alignCenter":"EIYI7q","caption":"s4KBbb","truncate":"BvV7rt","upper-case":"cnZ2Ax","upperCase":"cnZ2Ax","checkbox":"u9D-SV","icon":"_8otGhs","fold-all-icon":"ocDWDT","foldAllIcon":"ocDWDT","cell-tooltip":"xZXVCH","cellTooltip":"xZXVCH","resizing-marker":"qnUXBW","resizingMarker":"qnUXBW","pinned-right":"pygsm2","pinnedRight":"pygsm2","draggable":"XzrXu0","ghost":"sxiPzi","is-dragged-out":"vt-AV5","isDraggedOut":"vt-AV5","dnd-marker-left":"Vgyr4e","dndMarkerLeft":"Vgyr4e","dnd-marker-right":"_8LYGb-","dndMarkerRight":"_8LYGb-","cell-tooltip-wrapper":"T-Tkqj","cellTooltipWrapper":"T-Tkqj","cell-tooltip-text":"yB-WUL","cellTooltipText":"yB-WUL","tooltip-caption":"_1wsn8G","tooltipCaption":"_1wsn8G","tooltip-info":"qH5lhW","tooltipInfo":"qH5lhW"};
|
|
3998
4040
|
|
|
3999
4041
|
class DataTableHeaderCell extends React__namespace.Component {
|
|
4000
4042
|
constructor() {
|
|
@@ -4088,7 +4130,7 @@ class DataTableHeaderCell extends React__namespace.Component {
|
|
|
4088
4130
|
}
|
|
4089
4131
|
}
|
|
4090
4132
|
|
|
4091
|
-
var css$u = {"root":"
|
|
4133
|
+
var css$u = {"root":"FNXhCI","caption-wrapper":"pHiU3C","captionWrapper":"pHiU3C","align-center":"HICqws","alignCenter":"HICqws","caption":"XmfBl-","truncate":"TK7YLw","upper-case":"_2NwQIp","upperCase":"_2NwQIp","group-cell-tooltip":"_3J-VlR","groupCellTooltip":"_3J-VlR","group-cell-tooltip-wrapper":"e6OW4z","groupCellTooltipWrapper":"e6OW4z","group-cell-tooltip-text":"_6YqnUH","groupCellTooltipText":"_6YqnUH","tooltip-caption":"Sa8-7k","tooltipCaption":"Sa8-7k","tooltip-info":"bcwVqd","tooltipInfo":"bcwVqd"};
|
|
4092
4134
|
|
|
4093
4135
|
class DataTableHeaderGroupCell extends React__namespace.Component {
|
|
4094
4136
|
constructor() {
|
|
@@ -4128,7 +4170,7 @@ class DataTableHeaderGroupCell extends React__namespace.Component {
|
|
|
4128
4170
|
}
|
|
4129
4171
|
}
|
|
4130
4172
|
|
|
4131
|
-
var css$t = {"root":"
|
|
4173
|
+
var css$t = {"root":"RJuRam"};
|
|
4132
4174
|
|
|
4133
4175
|
const DataTableHeaderRow = /* @__PURE__ */uuiCore.withMods(uuiComponents.DataTableHeaderRow, () => [css$t.root, 'uui-dt-vars'], (mods) => ({
|
|
4134
4176
|
renderCell: (props) => (React__namespace.createElement(DataTableHeaderCell, { ...props, size: mods.size, textCase: mods.textCase || 'normal', key: props.column.key, columnsGap: mods.columnsGap })),
|
|
@@ -4136,6 +4178,85 @@ const DataTableHeaderRow = /* @__PURE__ */uuiCore.withMods(uuiComponents.DataTab
|
|
|
4136
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 })),
|
|
4137
4179
|
}));
|
|
4138
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
|
+
|
|
4139
4260
|
const UUI_FILTERS_PANEL_ADD_BUTTON = 'uui-filters-panel-add-button';
|
|
4140
4261
|
const UUI_FILTERS_PANEL_ADD_BUTTON_BODY = 'uui-filters-panel-add-button-body';
|
|
4141
4262
|
const UUI_FILTERS_PANEL_ITEM_BODY = 'uui-filters-panel-item-body';
|
|
@@ -4145,315 +4266,647 @@ const UUI_FILTERS_PANEL_ITEM_TOGGLER_SELECTION = 'uui-filters-panel-item-toggler
|
|
|
4145
4266
|
const UUI_FILTERS_PANEL_ITEM_TOGGLER_POSTFIX = 'uui-filters-panel-item-toggler-postfix';
|
|
4146
4267
|
const UUI_FILTERS_PANEL_BODY_FOOTER = 'uui-filters-panel-item-footer';
|
|
4147
4268
|
|
|
4148
|
-
var css$s = {"
|
|
4269
|
+
var css$s = {"body":"_3HU3Zx","header":"uEhpTF","title":"_8UyDiz","removeButton":"mAMDG4","with-search":"b0Lm1R","withSearch":"b0Lm1R"};
|
|
4149
4270
|
|
|
4150
|
-
|
|
4151
|
-
const
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
!uuiCore.isEventTargetInsideClickable(e) && props.onClick?.();
|
|
4156
|
-
};
|
|
4157
|
-
const onKeyDownHandler = (e) => {
|
|
4158
|
-
if (props.isDisabled)
|
|
4159
|
-
return;
|
|
4160
|
-
if (e.key === 'Enter' && !props.isOpen) {
|
|
4161
|
-
e.preventDefault();
|
|
4162
|
-
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 });
|
|
4163
4276
|
}
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
props.toggleDropdownOpening(false);
|
|
4277
|
+
else {
|
|
4278
|
+
props.onValueChange(value);
|
|
4167
4279
|
}
|
|
4168
4280
|
};
|
|
4169
|
-
const
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
getSelectionText(),
|
|
4178
|
-
props.postfix && (React__namespace.createElement("div", { className: cx__default.default(css$s.postfix, UUI_FILTERS_PANEL_ITEM_TOGGLER_POSTFIX) }, props.postfix))))),
|
|
4179
|
-
!props.isDisabled && React__namespace.createElement(uuiComponents.IconContainer, { icon: settings.filtersPanel.icons.itemDropdownIcon, flipY: props.isOpen, cx: "uui-icon-dropdown" })));
|
|
4180
|
-
});
|
|
4181
|
-
|
|
4182
|
-
const pickerHeight = 300;
|
|
4183
|
-
function FilterPickerBody({ highlightSearchMatches = true, ...restProps }) {
|
|
4184
|
-
const props = { ...restProps, highlightSearchMatches };
|
|
4185
|
-
const [dsState, setDsState] = React.useState({
|
|
4186
|
-
focusedIndex: 0,
|
|
4187
|
-
topIndex: 0,
|
|
4188
|
-
visibleCount: 20,
|
|
4189
|
-
checked: [],
|
|
4190
|
-
});
|
|
4191
|
-
const { showSelected, setShowSelected } = uuiComponents.useShowSelected({ dataSourceState: dsState });
|
|
4192
|
-
const { view, getName, dataSourceState, getListProps, handleDataSourceValueChange, clearSelection, } = uuiComponents.usePickerApi({ ...props, dataSourceState: dsState, setDataSourceState: setDsState, showSelectedOnly: showSelected });
|
|
4193
|
-
const prevValue = uuiCore.usePrevious(props.value);
|
|
4194
|
-
const prevOpened = uuiCore.usePrevious(props.isOpen);
|
|
4195
|
-
React__namespace.useLayoutEffect(() => {
|
|
4196
|
-
if (prevOpened === props.isOpen && props.isOpen
|
|
4197
|
-
&& prevValue !== props.value && props.value !== props.emptyValue
|
|
4198
|
-
&& props.selectionMode === 'single') {
|
|
4199
|
-
props.onClose();
|
|
4200
|
-
}
|
|
4201
|
-
}, [props.value]);
|
|
4202
|
-
const renderFooter = () => {
|
|
4203
|
-
const footerProps = {
|
|
4204
|
-
view,
|
|
4205
|
-
showSelected: {
|
|
4206
|
-
value: showSelected,
|
|
4207
|
-
onValueChange: setShowSelected,
|
|
4208
|
-
},
|
|
4209
|
-
clearSelection,
|
|
4210
|
-
selectionMode: props.selectionMode,
|
|
4211
|
-
selection: props.value,
|
|
4212
|
-
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,
|
|
4213
4289
|
};
|
|
4214
|
-
return props.
|
|
4215
|
-
|
|
4216
|
-
: React__namespace.createElement(DataPickerFooter, { ...footerProps, cx: UUI_FILTERS_PANEL_BODY_FOOTER, size: settings.pickerInput.sizes.body.row });
|
|
4217
|
-
};
|
|
4218
|
-
const renderBody = () => {
|
|
4219
|
-
const rows = view.getVisibleRows();
|
|
4220
|
-
const maxHeight = uuiCore.isMobile() ? document.documentElement.clientHeight : props.maxBodyHeight || pickerHeight;
|
|
4221
|
-
const maxWidth = uuiCore.isMobile() ? undefined : 360;
|
|
4222
|
-
const onKeyDown = (e) => uuiComponents.handleDataSourceKeyboard({
|
|
4223
|
-
value: dataSourceState,
|
|
4224
|
-
onValueChange: handleDataSourceValueChange,
|
|
4225
|
-
listView: view,
|
|
4226
|
-
searchPosition: 'body',
|
|
4227
|
-
rows,
|
|
4228
|
-
}, e);
|
|
4229
|
-
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4230
|
-
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 }),
|
|
4231
|
-
renderFooter()));
|
|
4290
|
+
return props.predicates?.length > 0 && (React__namespace.default.createElement("div", { className: css$s.header },
|
|
4291
|
+
React__namespace.default.createElement(FilterPredicatePanel, { ...panelProps })));
|
|
4232
4292
|
};
|
|
4233
|
-
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 })));
|
|
4234
4296
|
}
|
|
4235
4297
|
|
|
4236
|
-
const
|
|
4237
|
-
function
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
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
|
+
};
|
|
4244
4329
|
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
const
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4330
|
+
var css$r = {"unpin-icon":"eh7U0D","unpinIcon":"eh7U0D","pin-toggler-icon":"Fr-obk","pinTogglerIcon":"Fr-obk"};
|
|
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;
|
|
4253
4362
|
}
|
|
4254
|
-
|
|
4255
|
-
|
|
4363
|
+
case 'right': {
|
|
4364
|
+
return settings.dataTable.icons.columnsConfigurationModal.pinRightIcon;
|
|
4256
4365
|
}
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
if (newValue && value !== newValue) {
|
|
4260
|
-
handleValueChange(newValue);
|
|
4366
|
+
default: {
|
|
4367
|
+
return;
|
|
4261
4368
|
}
|
|
4262
|
-
};
|
|
4263
|
-
function renderFooter() {
|
|
4264
|
-
const footerProps = {
|
|
4265
|
-
value,
|
|
4266
|
-
onValueChange: handleValueChange,
|
|
4267
|
-
};
|
|
4268
|
-
return props.renderFooter ? props.renderFooter(footerProps) : React__namespace.default.createElement(FilterDatePickerBodyFooter, { ...footerProps });
|
|
4269
4369
|
}
|
|
4270
|
-
return (React__namespace.default.createElement(React.Fragment, null,
|
|
4271
|
-
React__namespace.default.createElement(FlexRow, { borderBottom: true },
|
|
4272
|
-
React__namespace.default.createElement(DatePickerBody, { filter: props.filter, value: value, onValueChange: handleBodyChange, renderDay: props.renderDay, isHoliday: props.isHoliday, rawProps: props.rawProps?.body })),
|
|
4273
|
-
renderFooter()));
|
|
4274
4370
|
}
|
|
4275
4371
|
|
|
4276
|
-
|
|
4277
|
-
function FilterRangeDatePickerBodyFooter(props) {
|
|
4278
|
-
const shouldShowClearButton = (!props.preventEmptyToDate || !props.preventEmptyFromDate) && !props.disableClear;
|
|
4279
|
-
return (React__namespace.default.createElement(FlexCell, { alignSelf: "stretch" },
|
|
4280
|
-
React__namespace.default.createElement(FlexRow, { cx: UUI_FILTERS_PANEL_RDTP_FOOTER },
|
|
4281
|
-
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) => {
|
|
4282
|
-
if (props.onFocus) {
|
|
4283
|
-
props.onFocus(event, inputType);
|
|
4284
|
-
}
|
|
4285
|
-
props.setInFocus(inputType);
|
|
4286
|
-
}, onBlurInput: props.onBlur, preventEmptyFromDate: props.preventEmptyFromDate, preventEmptyToDate: props.preventEmptyToDate }),
|
|
4287
|
-
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
4288
|
-
shouldShowClearButton && (React__namespace.default.createElement(LinkButton, { isDisabled: !props.value.from && !props.value.to, caption: i18n.filterToolbar.rangeDatePicker.clearCaption, onClick: props.onClear })))));
|
|
4289
|
-
}
|
|
4372
|
+
var css$q = {"row-wrapper":"vDY-yw","rowWrapper":"vDY-yw","pin-icon-button":"nneSS1","pinIconButton":"nneSS1","not-pinned":"Qi47pL","notPinned":"Qi47pL","checkbox":"Hc7YrM","drag-handle":"YDYRBE","dragHandle":"YDYRBE","dnd-disabled":"ivCGDA","dndDisabled":"ivCGDA"};
|
|
4290
4373
|
|
|
4291
|
-
function
|
|
4292
|
-
const {
|
|
4293
|
-
const
|
|
4294
|
-
const
|
|
4295
|
-
const
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
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 })));
|
|
4300
4391
|
};
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
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":"s04kRJ","main-panel":"iXtvL-","mainPanel":"iXtvL-","group":"bWdZLn","group-title":"gsyjrt","groupTitle":"gsyjrt","group-items":"PT80cI","groupItems":"PT80cI","no-data":"p7nD5M","noData":"p7nD5M","no-data-title":"c9VQ28","noDataTitle":"c9VQ28","no-data-sub-title":"kFsW2e","noDataSubTitle":"kFsW2e","h-divider":"worOEM","hDivider":"worOEM","search-area":"rAnxZ-","searchArea":"rAnxZ-","subgroup-accordion":"WtGrK3","subgroupAccordion":"WtGrK3","subgroup":"GuCRlB","subgroup-title":"-bnuYc","subgroupTitle":"-bnuYc"};
|
|
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;
|
|
4311
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 })));
|
|
4312
4431
|
};
|
|
4313
|
-
const
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
&& inFocus === 'to'
|
|
4319
|
-
&& toChanged;
|
|
4320
|
-
if (closeBody) {
|
|
4321
|
-
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;
|
|
4322
4437
|
}
|
|
4438
|
+
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4439
|
+
title,
|
|
4440
|
+
React__namespace.createElement(SubGroup, { renderItem: props.renderItem, items: items })));
|
|
4323
4441
|
};
|
|
4324
|
-
const
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
return props.renderFooter ? props.renderFooter(footerProps) : React__namespace.default.createElement(FilterRangeDatePickerBodyFooter, { ...footerProps });
|
|
4346
|
-
}
|
|
4347
|
-
return (React__namespace.default.createElement(React.Fragment, null,
|
|
4348
|
-
React__namespace.default.createElement(FlexRow, { borderBottom: true },
|
|
4349
|
-
React__namespace.default.createElement(RangeDatePickerBody, { value: {
|
|
4350
|
-
selectedDate: value,
|
|
4351
|
-
inFocus,
|
|
4352
|
-
}, onValueChange: onBodyValueChange, filter: props.filter, presets: props.presets })),
|
|
4353
|
-
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)))));
|
|
4354
4463
|
}
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
if (
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
props.onValueChange({
|
|
4370
|
-
from: val,
|
|
4371
|
-
to: value?.to ?? null,
|
|
4372
|
-
});
|
|
4373
|
-
break;
|
|
4374
|
-
}
|
|
4375
|
-
case 'to': {
|
|
4376
|
-
props.onValueChange({
|
|
4377
|
-
from: value?.from ?? null,
|
|
4378
|
-
to: val,
|
|
4379
|
-
});
|
|
4380
|
-
break;
|
|
4381
|
-
}
|
|
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));
|
|
4382
4478
|
}
|
|
4383
|
-
|
|
4384
|
-
const renderFooter = () => {
|
|
4385
|
-
const clearSelection = () => {
|
|
4386
|
-
if (isInRangePredicate) {
|
|
4387
|
-
props.onValueChange({
|
|
4388
|
-
from: undefined,
|
|
4389
|
-
to: undefined,
|
|
4390
|
-
});
|
|
4391
|
-
}
|
|
4392
|
-
else {
|
|
4393
|
-
props.onValueChange(undefined);
|
|
4394
|
-
}
|
|
4395
|
-
};
|
|
4396
|
-
const isClearDisabled = typeof props.value !== 'number' && typeof props.value !== 'object';
|
|
4397
|
-
return (React__namespace.default.createElement(FlexRow, { padding: "12" },
|
|
4398
|
-
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
4399
|
-
React__namespace.default.createElement(FlexCell, { width: "auto", alignSelf: "center" },
|
|
4400
|
-
React__namespace.default.createElement(LinkButton, { isDisabled: isClearDisabled, size: settings.filtersPanel.sizes[uuiCore.isMobile() ? 'mobileFooterLinkButton' : 'footerLinkButton'], caption: i18n.pickerInput.clearSelectionButtonSingle, onClick: clearSelection }))));
|
|
4401
|
-
};
|
|
4402
|
-
if (isInRangePredicate) {
|
|
4403
|
-
const value = props.value;
|
|
4404
|
-
return (React__namespace.default.createElement("div", null,
|
|
4405
|
-
React__namespace.default.createElement(FlexRow, { padding: "12", alignItems: "center", columnGap: "12", borderBottom: true, cx: css$r.container },
|
|
4406
|
-
React__namespace.default.createElement(FlexCell, { width: "100%" },
|
|
4407
|
-
React__namespace.default.createElement(NumericInput, { size: settings.filtersPanel.sizes.default, value: value?.from ?? null, onValueChange: rangeValueHandler('from'), placeholder: "Min", formatOptions: { maximumFractionDigits: 2 } })),
|
|
4408
|
-
React__namespace.default.createElement(FlexCell, { width: "100%" },
|
|
4409
|
-
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) }))),
|
|
4410
|
-
renderFooter()));
|
|
4479
|
+
return content;
|
|
4411
4480
|
}
|
|
4412
|
-
return
|
|
4413
|
-
React__namespace.default.createElement(FlexRow, { padding: "12", alignItems: "center", borderBottom: true, cx: css$r.container },
|
|
4414
|
-
React__namespace.default.createElement(FlexCell, { width: 130 },
|
|
4415
|
-
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 } }))),
|
|
4416
|
-
renderFooter()));
|
|
4481
|
+
return null;
|
|
4417
4482
|
}
|
|
4418
4483
|
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
case 'numeric':
|
|
4424
|
-
return React__namespace.default.createElement(FilterNumericBody, { ...props });
|
|
4425
|
-
case 'multiPicker':
|
|
4426
|
-
return React__namespace.default.createElement(FilterPickerBody, { ...props, selectionMode: "multi", valueType: "id" });
|
|
4427
|
-
case 'datePicker':
|
|
4428
|
-
return React__namespace.default.createElement(FilterDatePickerBody, { ...props, format: props.format || 'DD/MM/YYYY' });
|
|
4429
|
-
case 'rangeDatePicker':
|
|
4430
|
-
return React__namespace.default.createElement(FilterRangeDatePickerBody, { ...props, format: props.format || 'DD/MM/YYYY', value: props.value || { from: null, to: null } });
|
|
4431
|
-
case 'custom':
|
|
4432
|
-
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, []];
|
|
4433
4488
|
}
|
|
4434
|
-
|
|
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
|
+
};
|
|
4435
4496
|
|
|
4436
|
-
var css$
|
|
4497
|
+
var css$o = {"listContainer":"Hlodhi","header":"qBCcUk","group":"CEfDTU","stickyHeader":"Nat84u"};
|
|
4437
4498
|
|
|
4438
|
-
function
|
|
4439
|
-
const
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
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":"m8jmwu","sticky-header":"KdwSxg","stickyHeader":"KdwSxg","no-results":"tZobYW","noResults":"tZobYW","icon":"iK7dW4","title":"SoMZ0C"};
|
|
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":"Ki-YV-","title-wrapper":"LfdNdo","titleWrapper":"LfdNdo","title":"_9X-98j","text-wrapper":"CArtGH","textWrapper":"CArtGH","selection":"yVDWkU","postfix":"OVA-0h","selected":"_6791ox"};
|
|
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":"_05bMLH"};
|
|
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) {
|
|
4454
4906
|
const { maxCount = 2 } = props;
|
|
4455
4907
|
const isPickersType = props?.type === 'multiPicker' || props?.type === 'singlePicker';
|
|
4456
4908
|
const isMobileScreen = uuiCore.isMobile();
|
|
4909
|
+
const hideHeaderTitle = isPickersType && isMobileScreen;
|
|
4457
4910
|
const floatingMiddleware = React.useMemo(() => {
|
|
4458
4911
|
const middleware = [
|
|
4459
4912
|
react.offset(() => {
|
|
@@ -4465,65 +4918,38 @@ function FiltersToolbarItemImpl(props) {
|
|
|
4465
4918
|
}
|
|
4466
4919
|
return middleware;
|
|
4467
4920
|
}, [isPickersType]);
|
|
4468
|
-
const getDefaultPredicate = () => {
|
|
4469
|
-
if (!props.predicates) {
|
|
4470
|
-
return null;
|
|
4471
|
-
}
|
|
4472
|
-
return Object.keys(props.value || {})[0] || props.predicates.find((i) => i.isDefault)?.predicate || props.predicates?.[0].predicate;
|
|
4473
|
-
};
|
|
4474
4921
|
const [isOpen, isOpenChange] = React.useState(props.autoFocus);
|
|
4475
|
-
const [predicate, setPredicate] = React.useState(getDefaultPredicate());
|
|
4922
|
+
const [predicate, setPredicate] = React.useState(getDefaultPredicate(props.predicates, props.value));
|
|
4476
4923
|
const predicateName = React__namespace.default.useMemo(() => predicate && props.predicates.find((p) => p.predicate === predicate).name, [predicate]);
|
|
4477
|
-
|
|
4478
|
-
if (props.predicates && Object.keys(props.value || {})[0] && Object.keys(props.value || {})[0] !== predicate) {
|
|
4479
|
-
setPredicate(Object.keys(props.value || {})[0]);
|
|
4480
|
-
}
|
|
4481
|
-
}, [props.value]);
|
|
4482
|
-
const onValueChange = React.useCallback((value) => {
|
|
4924
|
+
const onValueChange = (value) => {
|
|
4483
4925
|
if (props.predicates) {
|
|
4484
|
-
props.onValueChange({ [
|
|
4926
|
+
props.onValueChange({ [predicate]: value });
|
|
4485
4927
|
}
|
|
4486
4928
|
else {
|
|
4487
|
-
props.onValueChange(
|
|
4929
|
+
props.onValueChange(value);
|
|
4488
4930
|
}
|
|
4489
|
-
}, [props.field, props.onValueChange]);
|
|
4490
|
-
const removeOnclickHandler = () => {
|
|
4491
|
-
props.removeFilter(props.field);
|
|
4492
4931
|
};
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
if (props.
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
if (isInRange(val) && !isInRange(predicate)) {
|
|
4500
|
-
// from simple predicate -> to Range
|
|
4501
|
-
predicateValue = { [props.field]: { [val]: { from: null, to: null } } };
|
|
4502
|
-
}
|
|
4503
|
-
else if (!isInRange(val) && isInRange(predicate)) {
|
|
4504
|
-
// from Range -> to simple predicate
|
|
4505
|
-
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);
|
|
4506
4938
|
}
|
|
4507
|
-
props.onValueChange(predicateValue);
|
|
4508
|
-
}
|
|
4509
|
-
else {
|
|
4510
|
-
props.onValueChange({ [props.field]: { [val]: getValue() } });
|
|
4511
4939
|
}
|
|
4512
|
-
|
|
4940
|
+
}, [props.value]);
|
|
4941
|
+
const removeOnclickHandler = () => {
|
|
4942
|
+
props.removeFilter(props.field);
|
|
4513
4943
|
};
|
|
4514
|
-
const renderHeader = (hideTitle) => (React__namespace.default.createElement("div", { className: cx__default.default(css$
|
|
4515
|
-
props.predicates ? (React__namespace.default.createElement(
|
|
4516
|
-
!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 }))));
|
|
4517
4947
|
const renderBody = (dropdownProps) => {
|
|
4518
|
-
|
|
4519
|
-
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) },
|
|
4520
4949
|
renderHeader(hideHeaderTitle),
|
|
4521
|
-
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 },
|
|
4522
4951
|
renderHeader(hideHeaderTitle),
|
|
4523
|
-
React__namespace.default.createElement(FilterItemBody, { ...props, ...dropdownProps, selectedPredicate: predicate, value: getValue(), onValueChange: onValueChange })));
|
|
4524
|
-
};
|
|
4525
|
-
const getValue = () => {
|
|
4526
|
-
return predicate ? props.value?.[predicate] : props.value;
|
|
4952
|
+
React__namespace.default.createElement(FilterItemBody, { ...props, ...dropdownProps, selectedPredicate: predicate, value: getValue(predicate, props.value), onValueChange: onValueChange })));
|
|
4527
4953
|
};
|
|
4528
4954
|
const getPickerItemName = (item, config) => {
|
|
4529
4955
|
if (item.isLoading) {
|
|
@@ -4534,9 +4960,9 @@ function FiltersToolbarItemImpl(props) {
|
|
|
4534
4960
|
}
|
|
4535
4961
|
return config.getName ? config.getName(item.value) : item.value.name;
|
|
4536
4962
|
};
|
|
4537
|
-
const view = useView(props, getValue());
|
|
4963
|
+
const view = useView(props, getValue(predicate, props.value));
|
|
4538
4964
|
const getTogglerValue = () => {
|
|
4539
|
-
const currentValue = getValue();
|
|
4965
|
+
const currentValue = getValue(predicate, props.value);
|
|
4540
4966
|
const defaultFormat = 'MMM DD, YYYY';
|
|
4541
4967
|
switch (props.type) {
|
|
4542
4968
|
case 'multiPicker': {
|
|
@@ -4602,44 +5028,6 @@ function FiltersToolbarItemImpl(props) {
|
|
|
4602
5028
|
}
|
|
4603
5029
|
const FiltersPanelItem = /* @__PURE__ */React__namespace.default.memo(FiltersToolbarItemImpl);
|
|
4604
5030
|
|
|
4605
|
-
const normalizeFilterWithPredicates = (filter) => {
|
|
4606
|
-
if (!filter) {
|
|
4607
|
-
return {};
|
|
4608
|
-
}
|
|
4609
|
-
const result = filter;
|
|
4610
|
-
const keys = Object.keys(filter);
|
|
4611
|
-
for (let n = 0; n < keys.length; n++) {
|
|
4612
|
-
const key = keys[n];
|
|
4613
|
-
const filterValue = filter[key];
|
|
4614
|
-
if (filterValue && typeof filterValue === 'object') {
|
|
4615
|
-
if ('from' in filterValue && 'to' in filterValue) {
|
|
4616
|
-
continue;
|
|
4617
|
-
}
|
|
4618
|
-
if ('in' in filterValue && (!Array.isArray(filterValue.in) || !filterValue.in.length)) {
|
|
4619
|
-
delete filter[key];
|
|
4620
|
-
}
|
|
4621
|
-
if ('nin' in filterValue && (!Array.isArray(filterValue.nin) || !filterValue.nin.length)) {
|
|
4622
|
-
delete filter[key];
|
|
4623
|
-
}
|
|
4624
|
-
if ('inRange' in filterValue) {
|
|
4625
|
-
if (!filterValue.inRange || (!filterValue.inRange.from && !filterValue.inRange.to)) {
|
|
4626
|
-
delete filter[key];
|
|
4627
|
-
}
|
|
4628
|
-
}
|
|
4629
|
-
if ('notInRange' in filterValue) {
|
|
4630
|
-
if (!filterValue.notInRange || (!filterValue.notInRange.from && !filterValue.notInRange.to)) {
|
|
4631
|
-
delete filter[key];
|
|
4632
|
-
}
|
|
4633
|
-
}
|
|
4634
|
-
Object.keys(filterValue).forEach((predicate) => {
|
|
4635
|
-
if (filterValue[predicate] === null || filterValue[predicate] === undefined) {
|
|
4636
|
-
delete filter[key];
|
|
4637
|
-
}
|
|
4638
|
-
});
|
|
4639
|
-
}
|
|
4640
|
-
}
|
|
4641
|
-
return result;
|
|
4642
|
-
};
|
|
4643
5031
|
function FiltersToolbarImpl(props) {
|
|
4644
5032
|
const { filters, tableState, setTableState, size = (settings.filtersPanel.sizes.default) } = props;
|
|
4645
5033
|
const [newFilterId, setNewFilterId] = React.useState(null);
|
|
@@ -4672,8 +5060,8 @@ function FiltersToolbarImpl(props) {
|
|
|
4672
5060
|
filter: newFilter,
|
|
4673
5061
|
});
|
|
4674
5062
|
};
|
|
4675
|
-
const handleFilterChange = (newFilter) => {
|
|
4676
|
-
const filter = normalizeFilterWithPredicates({ ...tableState.filter,
|
|
5063
|
+
const handleFilterChange = (newFilter, field) => {
|
|
5064
|
+
const filter = normalizeFilterWithPredicates({ ...tableState.filter, [field]: newFilter });
|
|
4677
5065
|
setTableState({
|
|
4678
5066
|
...tableState,
|
|
4679
5067
|
filter: filter,
|
|
@@ -4722,7 +5110,7 @@ function FiltersToolbarImpl(props) {
|
|
|
4722
5110
|
}, [newFilterId, sortedActiveFilters]);
|
|
4723
5111
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
4724
5112
|
sortedActiveFilters.map((f) => (React__namespace.default.createElement(uuiComponents.FlexCell, { width: "auto", key: f.field },
|
|
4725
|
-
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 })))),
|
|
4726
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) => {
|
|
4727
5115
|
props.onCheck && props.onCheck(row);
|
|
4728
5116
|
setNewFilterId(row.value.field);
|
|
@@ -4730,7 +5118,7 @@ function FiltersToolbarImpl(props) {
|
|
|
4730
5118
|
}
|
|
4731
5119
|
const FiltersPanel = /* @__PURE__ */React__namespace.default.memo(FiltersToolbarImpl);
|
|
4732
5120
|
|
|
4733
|
-
var css$
|
|
5121
|
+
var css$k = {"delete-button":"A1FWX9","deleteButton":"A1FWX9","tab-button":"v0kxgH","tabButton":"v0kxgH","targetOpen":"ES22Gg"};
|
|
4734
5122
|
|
|
4735
5123
|
function PresetActionsDropdown(props) {
|
|
4736
5124
|
const { uuiNotifications } = uuiCore.useUuiContext();
|
|
@@ -4789,416 +5177,123 @@ function PresetActionsDropdown(props) {
|
|
|
4789
5177
|
React__namespace.default.createElement(DropdownMenuButton, { key: `${props.preset.id}-copyLink`, icon: settings.presetsPanel.icons.copyLinkIcon, caption: "Copy Link", onClick: copyUrlToClipboard }),
|
|
4790
5178
|
!isReadonlyPreset && (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
4791
5179
|
React__namespace.default.createElement(DropdownMenuSplitter, { key: "delete-splitter" }),
|
|
4792
|
-
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 })))));
|
|
4793
5181
|
};
|
|
4794
5182
|
const renderTarget = React.useCallback((dropdownProps) => {
|
|
4795
|
-
return (React__namespace.default.createElement(IconButton, { cx: [css$
|
|
4796
|
-
}, []);
|
|
4797
|
-
return (React__namespace.default.createElement(Dropdown, { renderBody: renderBody, renderTarget: renderTarget, placement: "bottom-end", middleware: [react.offset(22)] }));
|
|
4798
|
-
}
|
|
4799
|
-
|
|
4800
|
-
const UUI_PRESETS_PANEL_ADD_BUTTON = 'uui-presets-panel-add-button';
|
|
4801
|
-
const UUI_PRESETS_PANEL_MORE_BUTTON = 'uui-presets-panel-more-button';
|
|
4802
|
-
const UUI_PRESETS_PANEL_INPUT = 'uui-presets-panel-input';
|
|
4803
|
-
const UUI_PRESETS_PANEL_PRESET = 'uui-presets-panel-preset';
|
|
4804
|
-
|
|
4805
|
-
var css$o = {"preset-input-cell":"TVqZZ-","presetInputCell":"TVqZZ-","preset-input":"_5x0UL2","presetInput":"_5x0UL2"};
|
|
4806
|
-
|
|
4807
|
-
function PresetInput(props) {
|
|
4808
|
-
const [presetCaption, setPresetCaption] = React.useState(props.preset?.name || '');
|
|
4809
|
-
const [readonly, setReadonly] = React.useState(false);
|
|
4810
|
-
const cancelActionHandler = React.useCallback(() => {
|
|
4811
|
-
setPresetCaption('');
|
|
4812
|
-
props.onCancel();
|
|
4813
|
-
}, [props.onCancel]);
|
|
4814
|
-
const acceptActionHandler = React.useCallback(async () => {
|
|
4815
|
-
setReadonly(() => true);
|
|
4816
|
-
if (presetCaption) {
|
|
4817
|
-
await props.onSuccess(presetCaption);
|
|
4818
|
-
}
|
|
4819
|
-
props.onCancel();
|
|
4820
|
-
setReadonly(() => false);
|
|
4821
|
-
}, [presetCaption]);
|
|
4822
|
-
const newPresetOnBlurHandler = React.useCallback(() => {
|
|
4823
|
-
if (presetCaption.length) {
|
|
4824
|
-
return;
|
|
4825
|
-
}
|
|
4826
|
-
props.onCancel();
|
|
4827
|
-
}, [presetCaption.length, props.onCancel]);
|
|
4828
|
-
return (React__namespace.default.createElement(FlexCell, { cx: [css$o.presetInputCell, UUI_PRESETS_PANEL_INPUT], minWidth: 180 },
|
|
4829
|
-
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 })));
|
|
4830
|
-
}
|
|
4831
|
-
|
|
4832
|
-
var css$n = {"preset":"fnEmxW","activePreset":"_9Eo7CG"};
|
|
4833
|
-
|
|
4834
|
-
function Preset(props) {
|
|
4835
|
-
const [isRenamePreset, setIsRenamePreset] = React.useState(false);
|
|
4836
|
-
const choosePresetHandler = React.useCallback(() => props.choosePreset(props.preset), [props]);
|
|
4837
|
-
const cancelRenamePreset = React.useCallback(() => {
|
|
4838
|
-
setIsRenamePreset(() => false);
|
|
4839
|
-
}, []);
|
|
4840
|
-
const setPresetForRename = React.useCallback(() => {
|
|
4841
|
-
if (!isRenamePreset) {
|
|
4842
|
-
setIsRenamePreset(() => true);
|
|
4843
|
-
}
|
|
4844
|
-
}, []);
|
|
4845
|
-
const handlePresetRename = React.useCallback((name) => {
|
|
4846
|
-
const newPreset = {
|
|
4847
|
-
...props.preset,
|
|
4848
|
-
name: name,
|
|
4849
|
-
};
|
|
4850
|
-
return props.updatePreset(newPreset);
|
|
4851
|
-
}, [props.preset]);
|
|
4852
|
-
const isPresetActive = props.activePresetId === props.preset.id;
|
|
4853
|
-
const PresetActionsDropdownComponent = React.useCallback(() => React__namespace.default.createElement(PresetActionsDropdown, { renamePreset: setPresetForRename, ...props }), [props.preset, props.tableState, props.activePresetId]);
|
|
4854
|
-
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 }))));
|
|
4855
|
-
}
|
|
4856
|
-
|
|
4857
|
-
var css$m = {"divider":"LZC2jN","dropdownDeleteIcon":"yvVkYD","presetsWrapper":"eYyq6H","addPresetContainer":"PtfQLd","dropContainer":"K92XXE"};
|
|
4858
|
-
|
|
4859
|
-
function PresetsPanel(props) {
|
|
4860
|
-
const [isAddingPreset, setIsAddingPreset] = React.useState(false);
|
|
4861
|
-
const setAddingPreset = React.useCallback(() => {
|
|
4862
|
-
setIsAddingPreset(true);
|
|
4863
|
-
}, []);
|
|
4864
|
-
const cancelAddingPreset = React.useCallback(() => {
|
|
4865
|
-
setIsAddingPreset(false);
|
|
4866
|
-
}, []);
|
|
4867
|
-
const { presets, ...presetApi } = props;
|
|
4868
|
-
const renderPreset = (preset) => {
|
|
4869
|
-
return React__namespace.default.createElement(Preset, { key: preset.id, preset: preset, addPreset: setAddingPreset, ...presetApi });
|
|
4870
|
-
};
|
|
4871
|
-
const renderAddPresetButton = React.useCallback(() => {
|
|
4872
|
-
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 }))));
|
|
4873
|
-
}, [isAddingPreset]);
|
|
4874
|
-
const onPresetDropdownSelect = (preset) => {
|
|
4875
|
-
props.choosePreset(preset.preset);
|
|
4876
|
-
};
|
|
4877
|
-
const renderMoreButtonDropdown = (item, hiddenItems) => {
|
|
4878
|
-
return (React__namespace.default.createElement(Dropdown, { key: "more", renderTarget: (props) => (React__namespace.default.createElement(FlexRow, null,
|
|
4879
|
-
React__namespace.default.createElement("div", { className: css$m.divider }),
|
|
4880
|
-
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 },
|
|
4881
|
-
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)) })))))) }));
|
|
4882
|
-
};
|
|
4883
|
-
const getPresetPriority = (preset, index) => {
|
|
4884
|
-
return preset.id === props.activePresetId ? 100499 : 1000 - index;
|
|
4885
|
-
};
|
|
4886
|
-
const getPanelItems = () => {
|
|
4887
|
-
return [
|
|
4888
|
-
...uuiCore.orderBy(props.presets, ({ order }) => order)
|
|
4889
|
-
.map((preset, index) => ({
|
|
4890
|
-
id: preset.id.toString(),
|
|
4891
|
-
render: () => renderPreset(preset),
|
|
4892
|
-
priority: getPresetPriority(preset, index),
|
|
4893
|
-
preset: preset,
|
|
4894
|
-
})),
|
|
4895
|
-
{
|
|
4896
|
-
id: 'collapsedContainer', render: renderMoreButtonDropdown, priority: 100501, collapsedContainer: true,
|
|
4897
|
-
},
|
|
4898
|
-
{ id: 'addPreset', render: renderAddPresetButton, priority: 100501 },
|
|
4899
|
-
];
|
|
4900
|
-
};
|
|
4901
|
-
return (React__namespace.default.createElement(FlexCell, { grow: 1, minWidth: 310, rawProps: props.rawProps },
|
|
4902
|
-
React__namespace.default.createElement(FlexRow, { size: null, columnGap: "12", cx: css$m.presetsWrapper },
|
|
4903
|
-
React__namespace.default.createElement(uuiComponents.AdaptivePanel, { items: getPanelItems() }))));
|
|
4904
|
-
}
|
|
4905
|
-
|
|
4906
|
-
const defaultPredicates = {
|
|
4907
|
-
numeric: [
|
|
4908
|
-
{ predicate: 'eq', name: '=', isDefault: true }, { predicate: 'neq', name: '≠' }, { predicate: 'lte', name: '≤' }, { predicate: 'gte', name: '≥' }, { predicate: 'inRange', name: 'In Range' },
|
|
4909
|
-
],
|
|
4910
|
-
multiPicker: [{ predicate: 'in', name: 'is', isDefault: true }, { predicate: 'nin', name: 'is not' }],
|
|
4911
|
-
rangeDatePicker: [{ predicate: 'inRange', name: 'In Range', isDefault: true }, { predicate: 'notInRange', name: 'Not in Range' }],
|
|
4912
|
-
};
|
|
4913
|
-
|
|
4914
|
-
const useColumnsWithFilters = (initialColumns, filters) => {
|
|
4915
|
-
const makeFilterRenderCallback = React.useCallback((key) => function (filterLens, dropdownProps) {
|
|
4916
|
-
const filter = filters?.find((f) => f.columnKey === key);
|
|
4917
|
-
if (!filter)
|
|
4918
|
-
return null;
|
|
4919
|
-
const props = filterLens.prop(filter.field).toProps();
|
|
4920
|
-
return React__namespace.default.createElement(FilterItemBody, { ...props, ...filter, ...dropdownProps });
|
|
4921
|
-
}, [filters]);
|
|
4922
|
-
const columns = React.useMemo(() => {
|
|
4923
|
-
if (filters) {
|
|
4924
|
-
const filterKeys = filters.map((f) => f.columnKey);
|
|
4925
|
-
const newColumns = (initialColumns.map((column) => {
|
|
4926
|
-
if (filterKeys.includes(column.key)) {
|
|
4927
|
-
return {
|
|
4928
|
-
...column,
|
|
4929
|
-
renderFilter: makeFilterRenderCallback(column.key),
|
|
4930
|
-
};
|
|
4931
|
-
}
|
|
4932
|
-
else {
|
|
4933
|
-
return column;
|
|
4934
|
-
}
|
|
4935
|
-
}));
|
|
4936
|
-
return newColumns;
|
|
4937
|
-
}
|
|
4938
|
-
return initialColumns;
|
|
4939
|
-
}, [filters, initialColumns]);
|
|
4940
|
-
return columns;
|
|
4941
|
-
};
|
|
4942
|
-
|
|
4943
|
-
var css$l = {"unpin-icon":"_32M-dr","unpinIcon":"_32M-dr","pin-toggler-icon":"_2PraiN","pinTogglerIcon":"_2PraiN"};
|
|
4944
|
-
|
|
4945
|
-
function PinIconButton(props) {
|
|
4946
|
-
const i18nLocal = i18n.tables.columnsConfigurationModal;
|
|
4947
|
-
const { onTogglePin, pinPosition, canUnpin, } = props;
|
|
4948
|
-
const isPinned = !!pinPosition;
|
|
4949
|
-
const isPinnedAlways = isPinned && !canUnpin;
|
|
4950
|
-
let pinUnpinNode;
|
|
4951
|
-
if (isPinned) {
|
|
4952
|
-
const unpinIcon = getUnpinIcon({ isPinnedAlways, pinPosition });
|
|
4953
|
-
const iconTooltip = isPinnedAlways ? i18nLocal.lockedColumnPinButton : i18nLocal.unPinColumnButton;
|
|
4954
|
-
const unpinClickHandler = isPinnedAlways ? undefined : () => onTogglePin(undefined);
|
|
4955
|
-
pinUnpinNode = (React__namespace.createElement(Tooltip, { content: iconTooltip, placement: "bottom", color: "inverted" },
|
|
4956
|
-
React__namespace.createElement(IconButton, { cx: uuiCore.cx(!isPinnedAlways && css$l.unpinIcon, css$l.pinTogglerIcon), icon: unpinIcon, onClick: unpinClickHandler, isDisabled: isPinnedAlways, color: "primary" })));
|
|
4957
|
-
}
|
|
4958
|
-
else {
|
|
4959
|
-
pinUnpinNode = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4960
|
-
React__namespace.createElement(Tooltip, { content: i18nLocal.pinColumnToTheLeftButton, placement: "bottom", color: "inverted" },
|
|
4961
|
-
React__namespace.createElement(IconButton, { cx: css$l.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon, onClick: () => onTogglePin('left'), isDisabled: isPinnedAlways })),
|
|
4962
|
-
React__namespace.createElement(Tooltip, { content: i18nLocal.pinColumnToTheRightButton, placement: "bottom", color: "inverted" },
|
|
4963
|
-
React__namespace.createElement(IconButton, { cx: css$l.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinRightIcon, onClick: () => onTogglePin('right'), isDisabled: isPinnedAlways }))));
|
|
4964
|
-
}
|
|
4965
|
-
return pinUnpinNode;
|
|
4966
|
-
}
|
|
4967
|
-
function getUnpinIcon(params) {
|
|
4968
|
-
const { isPinnedAlways, pinPosition } = params;
|
|
4969
|
-
if (isPinnedAlways) {
|
|
4970
|
-
return settings.dataTable.icons.columnsConfigurationModal.lockIcon;
|
|
4971
|
-
}
|
|
4972
|
-
switch (pinPosition) {
|
|
4973
|
-
case 'left': {
|
|
4974
|
-
return settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon;
|
|
4975
|
-
}
|
|
4976
|
-
case 'right': {
|
|
4977
|
-
return settings.dataTable.icons.columnsConfigurationModal.pinRightIcon;
|
|
4978
|
-
}
|
|
4979
|
-
default: {
|
|
4980
|
-
return;
|
|
4981
|
-
}
|
|
4982
|
-
}
|
|
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)] }));
|
|
4983
5186
|
}
|
|
4984
5187
|
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
const
|
|
4988
|
-
|
|
4989
|
-
const { toggleVisibility, togglePin, onCanAcceptDrop, onDrop, columnConfig, isDndAllowed, isPinnedAlways, } = column;
|
|
4990
|
-
const { isVisible, fix } = columnConfig;
|
|
4991
|
-
const pinPosition = fix || (isPinnedAlways ? 'left' : undefined);
|
|
4992
|
-
const isPinned = !!pinPosition;
|
|
4993
|
-
const data = { column, columnConfig };
|
|
4994
|
-
const renderContent = (dndActorParams) => {
|
|
4995
|
-
const wrapperClasses = uuiCore.cx(css$k.rowWrapper, !isPinned && css$k.notPinned, dndActorParams.isDragGhost && uuiCore.uuiDndState.dragGhost, 'uui-dt-columns-config-row');
|
|
4996
|
-
const { onTouchStart, onPointerDown, ...restEventHandlers } = dndActorParams.eventHandlers;
|
|
4997
|
-
const { ref, ...dndActorPropsWithoutRef } = dndActorParams;
|
|
4998
|
-
return (React__namespace.createElement(FlexRow, { size: settings.dataTable.sizes.columnsConfigurationModal.columnRow, cx: wrapperClasses, ref: dndActorParams.ref, rawProps: { ...restEventHandlers }, alignItems: "top" },
|
|
4999
|
-
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) }),
|
|
5000
|
-
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 }),
|
|
5001
|
-
React__namespace.createElement(FlexRow, { size: null, cx: css$k.pinIconButton },
|
|
5002
|
-
React__namespace.createElement(PinIconButton, { pinPosition: pinPosition, canUnpin: !isPinnedAlways, onTogglePin: togglePin })),
|
|
5003
|
-
React__namespace.createElement(DropMarker, { ...dndActorPropsWithoutRef })));
|
|
5004
|
-
};
|
|
5005
|
-
return (React__namespace.createElement(uuiCore.DndActor, { key: column.key, srcData: isDndAllowed && data, dstData: data, canAcceptDrop: onCanAcceptDrop, onDrop: onDrop, render: renderContent }));
|
|
5006
|
-
});
|
|
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';
|
|
5007
5192
|
|
|
5008
|
-
var css$j = {"
|
|
5193
|
+
var css$j = {"preset-input-cell":"cyWYD4","presetInputCell":"cyWYD4","preset-input":"d5r5iD","presetInput":"d5r5iD"};
|
|
5009
5194
|
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
const
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
getSearchFields: props.getSearchFields,
|
|
5022
|
-
});
|
|
5023
|
-
const apply = React.useCallback(() => modalProps.success(columnsConfig), [columnsConfig, modalProps]);
|
|
5024
|
-
const close = React.useCallback(() => modalProps.abort(), [modalProps]);
|
|
5025
|
-
const isNoData = React.useMemo(() => Object.values(groupedColumns).every((v) => !v.length), [groupedColumns]);
|
|
5026
|
-
const renderVisible = () => {
|
|
5027
|
-
const amountPinnedLeft = groupedColumns.displayedPinnedLeft.length;
|
|
5028
|
-
const amountPinnedRight = groupedColumns.displayedPinnedRight.length;
|
|
5029
|
-
const amountUnPinned = groupedColumns.displayedUnpinned.length;
|
|
5030
|
-
const totalAmountOfVisibleColumns = amountPinnedLeft + amountUnPinned + amountPinnedRight;
|
|
5031
|
-
if (!totalAmountOfVisibleColumns) {
|
|
5032
|
-
return null;
|
|
5033
|
-
}
|
|
5034
|
-
const hasDividerBelowPinnedLeft = !!(amountPinnedLeft && amountUnPinned);
|
|
5035
|
-
const hasDividerAbovePinnedRight = !!(amountPinnedRight && amountUnPinned);
|
|
5036
|
-
const divider = (React__namespace.createElement(FlexRow, { size: null, cx: css$j.hDivider }));
|
|
5037
|
-
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
5038
|
-
renderGroupTitle(i18n$1.displayedSectionTitle, totalAmountOfVisibleColumns),
|
|
5039
|
-
React__namespace.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.pinnedToTheLeftSubgroupTitle, items: groupedColumns.displayedPinnedLeft }),
|
|
5040
|
-
hasDividerBelowPinnedLeft && divider,
|
|
5041
|
-
React__namespace.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.notPinnedSubgroupTitle, items: groupedColumns.displayedUnpinned }),
|
|
5042
|
-
hasDividerAbovePinnedRight && divider,
|
|
5043
|
-
React__namespace.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.pinnedToTheRightSubgroupTitle, items: groupedColumns.displayedPinnedRight })));
|
|
5044
|
-
};
|
|
5045
|
-
const renderHidden = () => {
|
|
5046
|
-
const items = groupedColumns.hidden;
|
|
5047
|
-
const title = renderGroupTitle(i18n$1.hiddenSectionTitle, items.length);
|
|
5048
|
-
if (!items.length) {
|
|
5049
|
-
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);
|
|
5050
5206
|
}
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
React__namespace.createElement(ModalWindow, { cx: [css$j.root, 'uui-columns-config-modal'], height: "95dvh", maxHeight: "95dvh" },
|
|
5058
|
-
React__namespace.createElement(ModalHeader, { title: i18n$1.configureColumnsTitle, onClose: close }),
|
|
5059
|
-
React__namespace.createElement(FlexRow, { borderBottom: true, cx: css$j.searchArea },
|
|
5060
|
-
React__namespace.createElement(SearchInput, { size: settings.dataTable.sizes.columnsConfigurationModal.searchInput, value: searchValue, onValueChange: setSearchValue, placeholder: i18n$1.searchPlaceholder }),
|
|
5061
|
-
React__namespace.createElement(Dropdown, { closeOnTargetClick: true, renderBody: () => (React__namespace.createElement(DropdownMenuBody, { minWidth: 100 },
|
|
5062
|
-
React__namespace.createElement(DropdownMenuButton, { caption: i18n$1.clearAllButton, onClick: uncheckAll }),
|
|
5063
|
-
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 })) })),
|
|
5064
|
-
React__namespace.createElement(Panel, { background: "surface-main", cx: css$j.mainPanel },
|
|
5065
|
-
React__namespace.createElement(ScrollBars, null,
|
|
5066
|
-
renderVisible(),
|
|
5067
|
-
renderHidden(),
|
|
5068
|
-
isNoData && (React__namespace.createElement(FlexRow, { cx: css$j.noData },
|
|
5069
|
-
React__namespace.createElement(Text, { cx: css$j.noDataTitle }, i18n$1.noResultsFound.title),
|
|
5070
|
-
React__namespace.createElement(Text, { cx: css$j.noDataSubTitle }, i18n$1.noResultsFound.subTitle))))),
|
|
5071
|
-
React__namespace.createElement(ModalFooter, { borderTop: true },
|
|
5072
|
-
React__namespace.createElement(LinkButton, { icon: settings.dataTable.icons.columnsConfigurationModal.resetIcon, caption: i18n$1.resetToDefaultButton, onClick: reset }),
|
|
5073
|
-
React__namespace.createElement(uuiComponents.FlexSpacer, null),
|
|
5074
|
-
React__namespace.createElement(Button, { fill: "none", color: "secondary", caption: i18n$1.cancelButton, onClick: close }),
|
|
5075
|
-
!hasAnySelectedColumns ? (React__namespace.createElement(Tooltip, { content: i18n$1.enableAtLeastOneColumnMessage, placement: "top-end", color: "critical" }, applyButton)) : (applyButton)))));
|
|
5076
|
-
}
|
|
5077
|
-
function SubGroup(props) {
|
|
5078
|
-
const [isExpanded, setIsExpanded] = React.useState(true);
|
|
5079
|
-
const { title, items, renderItem } = props;
|
|
5080
|
-
const isCollapsible = !!title;
|
|
5081
|
-
if (items.length) {
|
|
5082
|
-
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 })))));
|
|
5083
|
-
if (isCollapsible) {
|
|
5084
|
-
const renderTitle = (isOpened) => {
|
|
5085
|
-
const toggleIcon = settings.dataTable.icons.columnsConfigurationModal[isOpened ? 'expandedIcon' : 'collapsedIcon'];
|
|
5086
|
-
return (React__namespace.createElement(FlexRow, { cx: uuiCore.cx(css$j.subgroup) },
|
|
5087
|
-
React__namespace.createElement(uuiComponents.IconContainer, { icon: toggleIcon }),
|
|
5088
|
-
React__namespace.createElement(Text, { size: "none", color: "tertiary", cx: css$j.subgroupTitle }, title)));
|
|
5089
|
-
};
|
|
5090
|
-
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;
|
|
5091
5213
|
}
|
|
5092
|
-
|
|
5093
|
-
}
|
|
5094
|
-
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 })));
|
|
5095
5218
|
}
|
|
5096
5219
|
|
|
5097
|
-
|
|
5098
|
-
const firstNotChildIndex = rows.findIndex((other) => other.depth < row.depth || (row.depth === other.depth && other.isPinned));
|
|
5099
|
-
if (firstNotChildIndex === -1) {
|
|
5100
|
-
return [rows, []];
|
|
5101
|
-
}
|
|
5102
|
-
if (firstNotChildIndex === 0) {
|
|
5103
|
-
return [[], rows];
|
|
5104
|
-
}
|
|
5105
|
-
const children = rows.slice(0, firstNotChildIndex);
|
|
5106
|
-
const rest = rows.slice(firstNotChildIndex, rows.length);
|
|
5107
|
-
return [children, rest];
|
|
5108
|
-
};
|
|
5109
|
-
|
|
5110
|
-
var css$i = {"listContainer":"_9m-7eB","header":"-chN3h","group":"ePmcSK","stickyHeader":"WMdsoM"};
|
|
5111
|
-
|
|
5112
|
-
function DataRowsGroup({ row, childRows, renderRow, top = 1, }) {
|
|
5113
|
-
const rowRef = React.useRef(undefined);
|
|
5114
|
-
const childrenPinnedTop = row.isPinned ? (top + (rowRef.current?.clientHeight ?? 0)) : top;
|
|
5115
|
-
return (React__namespace.default.createElement("div", { className: css$i.group, key: row.rowKey },
|
|
5116
|
-
React__namespace.default.createElement("div", { className: row.isPinned ? css$i.stickyHeader : css$i.header,
|
|
5117
|
-
// Gaps between pinned parents should be removed by -1 from top height.
|
|
5118
|
-
// Otherwise, sometimes top value is rounded top.
|
|
5119
|
-
style: { zIndex: row.depth + 10, top: top - 1 }, ref: rowRef }, renderRow(row)),
|
|
5120
|
-
childRows.length > 0 && (React__namespace.default.createElement("div", null,
|
|
5121
|
-
React__namespace.default.createElement(DataRowsGroups, { rows: childRows, renderRow: renderRow, top: childrenPinnedTop })))));
|
|
5122
|
-
}
|
|
5123
|
-
const renderRows = (rows, renderRow, top) => {
|
|
5124
|
-
if (!rows.length)
|
|
5125
|
-
return [];
|
|
5126
|
-
const [row, ...rest] = rows;
|
|
5127
|
-
if (!rest.length) {
|
|
5128
|
-
return [renderRow(row)];
|
|
5129
|
-
}
|
|
5130
|
-
const [next] = rest;
|
|
5131
|
-
if (next.depth <= row.depth && !row.isPinned) {
|
|
5132
|
-
return [renderRow(row)].concat(renderRows(rest, renderRow, top));
|
|
5133
|
-
}
|
|
5134
|
-
const [children, otherRows] = getChildrenAndRest(row, rest);
|
|
5135
|
-
const group = (React__namespace.default.createElement(DataRowsGroup, { row: row, childRows: children, renderRow: renderRow, top: top, key: row.rowKey }));
|
|
5136
|
-
return [group].concat(renderRows(otherRows, renderRow, top));
|
|
5137
|
-
};
|
|
5138
|
-
function DataRowsGroups({ rows, renderRow, top = 1, }) {
|
|
5139
|
-
const rowsWithGroups = renderRows(rows, renderRow, top);
|
|
5140
|
-
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
5141
|
-
return (React__namespace.default.createElement(React__namespace.default.Fragment, null, rowsWithGroups));
|
|
5142
|
-
}
|
|
5220
|
+
var css$i = {"preset":"QpG0nB","activePreset":"BxpONf"};
|
|
5143
5221
|
|
|
5144
|
-
function
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
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 }))));
|
|
5148
5243
|
}
|
|
5149
5244
|
|
|
5150
|
-
var css$h = {"
|
|
5245
|
+
var css$h = {"divider":"zrK490","dropdownDeleteIcon":"_2GzGqU","presetsWrapper":"_3xf-IB","addPresetContainer":"_9SAKkq","dropContainer":"_2dUx0k"};
|
|
5151
5246
|
|
|
5152
|
-
function
|
|
5153
|
-
const
|
|
5154
|
-
const
|
|
5155
|
-
|
|
5156
|
-
const { columns, config, defaultConfig } = uuiCore.useColumnsConfig(columnsWithFilters, props.value?.columnsConfig);
|
|
5157
|
-
const defaultRenderRow = React__namespace.useCallback((rowProps) => {
|
|
5158
|
-
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);
|
|
5159
5251
|
}, []);
|
|
5160
|
-
const
|
|
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
|
-
|
|
5196
|
-
|
|
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() }))));
|
|
5197
5292
|
}
|
|
5198
5293
|
|
|
5199
|
-
var css$g = {"root":"
|
|
5294
|
+
var css$g = {"root":"_3ihhLX"};
|
|
5200
5295
|
|
|
5201
|
-
var css$f = {"root":"
|
|
5296
|
+
var css$f = {"root":"Ar3HA2","burger-content":"r5snOa","burgerContent":"r5snOa"};
|
|
5202
5297
|
|
|
5203
5298
|
var _path$3;
|
|
5204
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); }
|
|
@@ -5241,7 +5336,7 @@ var SvgNavigationArrowDownOutline = function SvgNavigationArrowDownOutline(props
|
|
|
5241
5336
|
};
|
|
5242
5337
|
var ForwardRef$2 = /*#__PURE__*/React.forwardRef(SvgNavigationArrowDownOutline);
|
|
5243
5338
|
|
|
5244
|
-
var css$e = {"root":"
|
|
5339
|
+
var css$e = {"root":"lYA1Ec","button-primary":"nPVkMi","buttonPrimary":"nPVkMi","button-secondary":"ywgjLb","buttonSecondary":"ywgjLb","hasIcon":"pV3Fvb","dropdown":"GiEfRK"};
|
|
5245
5340
|
|
|
5246
5341
|
const BurgerButton = /* @__PURE__ */uuiCore.withMods(uuiComponents.Button, (props) => [
|
|
5247
5342
|
css$e.root,
|
|
@@ -5252,13 +5347,13 @@ const BurgerButton = /* @__PURE__ */uuiCore.withMods(uuiComponents.Button, (prop
|
|
|
5252
5347
|
props.icon && css$e.hasIcon,
|
|
5253
5348
|
], () => ({ dropdownIcon: ForwardRef$2, dropdownIconPosition: 'left', role: 'menuitem' }));
|
|
5254
5349
|
|
|
5255
|
-
var css$d = {"search-input":"
|
|
5350
|
+
var css$d = {"search-input":"_19oEHN","searchInput":"_19oEHN"};
|
|
5256
5351
|
|
|
5257
5352
|
function BurgerSearch(props) {
|
|
5258
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 }));
|
|
5259
5354
|
}
|
|
5260
5355
|
|
|
5261
|
-
var css$c = {"root":"
|
|
5356
|
+
var css$c = {"root":"Li97R2","group-header":"_2Zmze3","groupHeader":"_2Zmze3","group-name":"oyTaLc","groupName":"oyTaLc","line":"TxdhPe"};
|
|
5262
5357
|
|
|
5263
5358
|
function BurgerGroupHeader(props) {
|
|
5264
5359
|
return (React__namespace.createElement("div", { className: cx__default.default(css$c.root, css$c.groupHeader, 'uui-burger-group-header') },
|
|
@@ -5266,7 +5361,7 @@ function BurgerGroupHeader(props) {
|
|
|
5266
5361
|
React__namespace.createElement("span", { className: css$c.groupName }, props.caption)));
|
|
5267
5362
|
}
|
|
5268
5363
|
|
|
5269
|
-
var css$b = {"root":"
|
|
5364
|
+
var css$b = {"root":"FvD8gJ","type-primary":"DtLXIk","typePrimary":"DtLXIk","type-secondary":"ez3r9G","typeSecondary":"ez3r9G"};
|
|
5270
5365
|
|
|
5271
5366
|
const MainMenuButton = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
5272
5367
|
const { type, ...clickableProps } = props;
|
|
@@ -5288,7 +5383,7 @@ const MainMenuButton = /* @__PURE__ */React__namespace.forwardRef((props, ref) =
|
|
|
5288
5383
|
props.isDropdown && (React__namespace.createElement(uuiComponents.IconContainer, { icon: ForwardRef$P, flipY: props.isOpen }))));
|
|
5289
5384
|
});
|
|
5290
5385
|
|
|
5291
|
-
var css$a = {"dropdown-body":"
|
|
5386
|
+
var css$a = {"dropdown-body":"vx3sPp","dropdownBody":"vx3sPp"};
|
|
5292
5387
|
|
|
5293
5388
|
class MainMenuDropdown extends React__namespace.Component {
|
|
5294
5389
|
render() {
|
|
@@ -5347,12 +5442,12 @@ var SvgNavigationGlobalMenuOutlineOutline = function SvgNavigationGlobalMenuOutl
|
|
|
5347
5442
|
};
|
|
5348
5443
|
var ForwardRef$1 = /*#__PURE__*/React.forwardRef(SvgNavigationGlobalMenuOutlineOutline);
|
|
5349
5444
|
|
|
5350
|
-
var css$9 = {"global-menu-btn":"
|
|
5445
|
+
var css$9 = {"global-menu-btn":"lR67nt","globalMenuBtn":"lR67nt","global-menu-icon":"Aeq5-f","globalMenuIcon":"Aeq5-f"};
|
|
5351
5446
|
|
|
5352
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 },
|
|
5353
5448
|
React__namespace.createElement(uuiComponents.IconContainer, { size: 36, icon: ForwardRef$1, cx: css$9.globalMenuIcon }))));
|
|
5354
5449
|
|
|
5355
|
-
var css$8 = {"container":"
|
|
5450
|
+
var css$8 = {"container":"mmHEdc","open":"DikMWZ","folding-arrow":"bExgUO","foldingArrow":"bExgUO"};
|
|
5356
5451
|
|
|
5357
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 },
|
|
5358
5453
|
React__namespace.createElement(uuiComponents.Avatar, { size: "36", img: props.avatarUrl }),
|
|
@@ -5360,15 +5455,15 @@ const MainMenuAvatar = /* @__PURE__ */React__namespace.forwardRef((props, ref) =
|
|
|
5360
5455
|
props.isDropdown && (React__namespace.createElement("div", null,
|
|
5361
5456
|
React__namespace.createElement(uuiComponents.IconContainer, { size: 18, icon: ForwardRef$P, flipY: props.isOpen, cx: css$8.foldingArrow }))))));
|
|
5362
5457
|
|
|
5363
|
-
var css$7 = {"search-input":"
|
|
5458
|
+
var css$7 = {"search-input":"b-4ALo","searchInput":"b-4ALo"};
|
|
5364
5459
|
|
|
5365
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 })) })));
|
|
5366
5461
|
|
|
5367
|
-
var css$6 = {"container":"
|
|
5462
|
+
var css$6 = {"container":"qJclVt"};
|
|
5368
5463
|
|
|
5369
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 })));
|
|
5370
5465
|
|
|
5371
|
-
var css$5 = {"root":"
|
|
5466
|
+
var css$5 = {"root":"sfrL1o"};
|
|
5372
5467
|
|
|
5373
5468
|
const Anchor = /* @__PURE__ */uuiCore.withMods(uuiComponents.Anchor, () => [css$5.root]);
|
|
5374
5469
|
|
|
@@ -5426,7 +5521,7 @@ var SvgFileCloudUploadFill = function SvgFileCloudUploadFill(props, ref) {
|
|
|
5426
5521
|
};
|
|
5427
5522
|
var ForwardRef = /*#__PURE__*/React.forwardRef(SvgFileCloudUploadFill);
|
|
5428
5523
|
|
|
5429
|
-
var css$4 = {"root":"
|
|
5524
|
+
var css$4 = {"root":"Ce-XXR","drop-start":"zvsjSV","dropStart":"zvsjSV","drop-over":"uDGu1T","dropOver":"uDGu1T","link":"J6Rwzf","drop-area":"MbVYTh","dropArea":"MbVYTh","drop-caption":"_6L3YVA","dropCaption":"_6L3YVA","icon-blue":"JaH7Ly","iconBlue":"JaH7Ly"};
|
|
5430
5525
|
|
|
5431
5526
|
function DropSpot(props) {
|
|
5432
5527
|
const getInfoText = typeof props.infoText === 'string'
|
|
@@ -5444,7 +5539,7 @@ function DropSpot(props) {
|
|
|
5444
5539
|
return React__namespace.createElement(uuiComponents.DropSpot, { render: renderAttachmentArea, onFilesDropped: props.onUploadFiles });
|
|
5445
5540
|
}
|
|
5446
5541
|
|
|
5447
|
-
var css$3 = {"root":"
|
|
5542
|
+
var css$3 = {"root":"Y6Glcc"};
|
|
5448
5543
|
|
|
5449
5544
|
const SvgCircleProgress = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
5450
5545
|
const outsetRadius = props.size / 2 - 1;
|
|
@@ -5455,7 +5550,7 @@ const SvgCircleProgress = /* @__PURE__ */React__namespace.forwardRef((props, ref
|
|
|
5455
5550
|
React__namespace.createElement("circle", { strokeWidth: 1, fill: "transparent", r: outsetRadius, cx: props.size / 2, cy: props.size / 2 })));
|
|
5456
5551
|
});
|
|
5457
5552
|
|
|
5458
|
-
var css$2 = {"root":"
|
|
5553
|
+
var css$2 = {"root":"_6diYoq","file-name":"_18ewqW","fileName":"_18ewqW","default-color":"Ob3idp","defaultColor":"Ob3idp","doc-color":"uDYpvn","docColor":"uDYpvn","xls-color":"jrQz1V","xlsColor":"jrQz1V","pdf-color":"_7FKmMi","pdfColor":"_7FKmMi","movie-color":"nhnTw0","movieColor":"nhnTw0","img-color":"UIHS8m","imgColor":"UIHS8m","mov-color":"pDcfhs","movColor":"pDcfhs","error-block":"DSaw5W","errorBlock":"DSaw5W","icons-block":"gFiLfq","iconsBlock":"gFiLfq"};
|
|
5459
5554
|
|
|
5460
5555
|
const FileCard = /* @__PURE__ */React__namespace.forwardRef((props, ref) => {
|
|
5461
5556
|
const [isLoadingShow, setIsLoadingShow] = React__namespace.useState(true);
|
|
@@ -5574,7 +5669,7 @@ const getErrorPageConfig = () => ({
|
|
|
5574
5669
|
},
|
|
5575
5670
|
});
|
|
5576
5671
|
|
|
5577
|
-
var css$1 = {"container":"
|
|
5672
|
+
var css$1 = {"container":"VmHBCj"};
|
|
5578
5673
|
|
|
5579
5674
|
const ErrorPage = (props) => {
|
|
5580
5675
|
const isMobileScreen = uuiCore.isMobile();
|
|
@@ -5586,7 +5681,7 @@ const ErrorPage = (props) => {
|
|
|
5586
5681
|
props?.supportLink && React__namespace.default.createElement("div", { className: "uui-error-support-link" }, props?.supportLink))));
|
|
5587
5682
|
};
|
|
5588
5683
|
|
|
5589
|
-
var css = {"recovery-spinner":"
|
|
5684
|
+
var css = {"recovery-spinner":"LM4mC9","recoverySpinner":"LM4mC9","recovery-message":"XDhibA","recoveryMessage":"XDhibA","modal-blocker":"FESVwU","modalBlocker":"FESVwU","modalFadeIn":"_0-xGvA"};
|
|
5590
5685
|
|
|
5591
5686
|
function ErrorHandler(props) {
|
|
5592
5687
|
const { uuiNotifications, uuiModals, uuiApi } = uuiCore.useUuiContext();
|
|
@@ -5777,6 +5872,7 @@ exports.WarningAlert = WarningAlert;
|
|
|
5777
5872
|
exports.WarningNotification = WarningNotification;
|
|
5778
5873
|
exports.applyDateSelectionMods = applyDateSelectionMods;
|
|
5779
5874
|
exports.defaultPredicates = defaultPredicates;
|
|
5875
|
+
exports.getDefaultPredicate = getDefaultPredicate;
|
|
5780
5876
|
exports.getErrorPageConfig = getErrorPageConfig;
|
|
5781
5877
|
exports.getHighlightRanges = getHighlightRanges;
|
|
5782
5878
|
exports.getHighlightedSearchMatches = getHighlightedSearchMatches;
|