@epam/uui 6.1.1-beta.0 → 6.1.1

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