@epam/uui 6.1.1-beta.1 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/datePickers/RangeDatePickerBody.d.ts +5 -5
- package/components/datePickers/RangeDatePickerBody.d.ts.map +1 -1
- package/components/datePickers/RangeDatePickerInput.d.ts.map +1 -1
- package/components/datePickers/helpers.d.ts +2 -1
- package/components/datePickers/helpers.d.ts.map +1 -1
- package/components/filters/FilterColumnBody.d.ts +4 -0
- package/components/filters/FilterColumnBody.d.ts.map +1 -0
- package/components/filters/FilterPredicatePanel.d.ts +13 -0
- package/components/filters/FilterPredicatePanel.d.ts.map +1 -0
- package/components/filters/FiltersPanel.d.ts.map +1 -1
- package/components/filters/FiltersPanelItem.d.ts.map +1 -1
- package/components/filters/defaultPredicates.d.ts +2 -1
- package/components/filters/defaultPredicates.d.ts.map +1 -1
- package/components/filters/helpers/predicateHelpers.d.ts +4 -0
- package/components/filters/helpers/predicateHelpers.d.ts.map +1 -0
- package/components/pickers/DataPickerBody.d.ts.map +1 -1
- package/components/pickers/DataPickerRow.d.ts.map +1 -1
- package/components/pickers/PickerModal.d.ts.map +1 -1
- package/components/widgets/DataRowAddons.d.ts.map +1 -1
- package/helpers/useColumnsWithFilters.d.ts.map +1 -1
- package/index.esm.js +1044 -949
- package/index.esm.js.map +1 -1
- package/index.js +1042 -946
- package/index.js.map +1 -1
- package/package.json +5 -5
- package/settings.d.ts +1 -1
- package/settings.d.ts.map +1 -1
- package/stats.html +1 -1
- package/styles.css +1258 -1235
- package/styles.css.map +1 -1
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as uuiComponents from '@epam/uui-components';
|
|
2
|
-
import { Spinner as Spinner$1, Clickable, IconContainer, RadioInput as RadioInput$1, TextInput as TextInput$1, ControlGroup as ControlGroup$1, NumericInput as NumericInput$1, TextArea as TextArea$1, Dropdown as Dropdown$1, InputAddon as InputAddon$1, Slider as Slider$1, Anchor as Anchor$1, FlexSpacer, Text as Text$1, FlexCell as FlexCell$1, VPanel, ScrollBars as ScrollBars$1,
|
|
2
|
+
import { Spinner as Spinner$1, Blocker as Blocker$1, Clickable, IconContainer, RadioInput as RadioInput$1, TextInput as TextInput$1, ControlGroup as ControlGroup$1, NumericInput as NumericInput$1, TextArea as TextArea$1, Dropdown as Dropdown$1, InputAddon as InputAddon$1, Slider as Slider$1, Anchor as Anchor$1, FlexSpacer, Text as Text$1, FlexCell as FlexCell$1, VPanel, ScrollBars as ScrollBars$1, ModalBlocker as ModalBlocker$1, ModalWindow as ModalWindow$1, Snackbar as Snackbar$1, Calendar as Calendar$1, YearSelection, MonthSelection, Day, uuiDaySelection, AvatarStack as AvatarStack$1, Paginator as Paginator$1, DragHandle, Avatar, usePickerModal, handleDataSourceKeyboard, PickerToggler as PickerToggler$1, usePickerInput, usePickerList, DataTableCell as DataTableCell$1, DataTableRow as DataTableRow$1, DataTableCellContainer, DataTableHeaderCell as DataTableHeaderCell$1, DataTableHeaderRow as DataTableHeaderRow$1, useColumnsConfiguration, Accordion as Accordion$1, DataTableSelectionProvider, DataTableFocusProvider, useShowSelected, usePickerApi, AdaptivePanel, Burger as Burger$1, Button as Button$1, DropSpot as DropSpot$1, UploadFileToggler, ErrorCatch } from '@epam/uui-components';
|
|
3
3
|
export { Avatar, DataTableCellContainer, FlexSpacer, IconContainer } from '@epam/uui-components';
|
|
4
|
-
import { withMods, devLogger, uuiElement, cx as cx$1, uuiMarkers, IEditableDebouncer, isFocusReceiverInsideFocusLock, UuiContext, uuiMod, getDir, isEventTargetInsideClickable, directionMode, useVirtualList, useScrollShadows, isMobile, i18n as i18n$1, useUuiContext, usePrevious, mobilePositioning, uuiDataTableHeaderCell, uuiDataTableHeaderGroupCell,
|
|
4
|
+
import { withMods, devLogger, uuiElement, cx as cx$1, uuiMarkers, IEditableDebouncer, isFocusReceiverInsideFocusLock, UuiContext, uuiMod, getDir, isEventTargetInsideClickable, directionMode, useVirtualList, useScrollShadows, isMobile, i18n as i18n$1, useUuiContext, useLayoutEffectSafeForSsr, usePrevious, mobilePositioning, uuiDataTableHeaderCell, uuiDataTableHeaderGroupCell, DndActor, uuiDndState, useColumnsConfig, uuiScrollShadows, useForceUpdate, getSeparatedValue, useArrayDataSource, orderBy, getOrderBetween, Form as Form$1, useForm as useForm$1, formatBytes, useUuiError } from '@epam/uui-core';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import React__default, { forwardRef, useState, useEffect, useContext, useRef, useReducer, useMemo, useImperativeHandle, useCallback, Fragment } from 'react';
|
|
7
7
|
import cx from 'classnames';
|
|
@@ -151,7 +151,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
151
151
|
xmlns: "http://www.w3.org/2000/svg",
|
|
152
152
|
ref: ref
|
|
153
153
|
}, props), /*#__PURE__*/React.createElement("g", {
|
|
154
|
-
clipPath: "url(#
|
|
154
|
+
clipPath: "url(#9l7x0xu2fje5j0bij_a)"
|
|
155
155
|
}, _path$I || (_path$I = /*#__PURE__*/React.createElement("path", {
|
|
156
156
|
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",
|
|
157
157
|
fill: "#F5F6FA"
|
|
@@ -172,7 +172,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
172
172
|
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",
|
|
173
173
|
fill: "#1D1E26"
|
|
174
174
|
})), /*#__PURE__*/React.createElement("mask", {
|
|
175
|
-
id: "
|
|
175
|
+
id: "9l7x0xtlqfqu58qx_b",
|
|
176
176
|
style: {
|
|
177
177
|
maskType: "alpha"
|
|
178
178
|
},
|
|
@@ -185,7 +185,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
185
185
|
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",
|
|
186
186
|
fill: "#9BDEFF"
|
|
187
187
|
}))), _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
188
|
-
mask: "url(#
|
|
188
|
+
mask: "url(#9l7x0xtlqfqu58qx_b)",
|
|
189
189
|
fillRule: "evenodd",
|
|
190
190
|
clipRule: "evenodd"
|
|
191
191
|
}, /*#__PURE__*/React.createElement("path", {
|
|
@@ -271,7 +271,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
271
271
|
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",
|
|
272
272
|
fill: "#fff"
|
|
273
273
|
}))), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
274
|
-
id: "
|
|
274
|
+
id: "9l7x0xu2fje5j0bij_a"
|
|
275
275
|
}, /*#__PURE__*/React.createElement("path", {
|
|
276
276
|
fill: "#fff",
|
|
277
277
|
transform: "translate(.552)",
|
|
@@ -922,14 +922,14 @@ var SvgSearchWithBackground = function SvgSearchWithBackground(props, ref) {
|
|
|
922
922
|
};
|
|
923
923
|
var ForwardRef$4 = /*#__PURE__*/forwardRef(SvgSearchWithBackground);
|
|
924
924
|
|
|
925
|
-
var css$1w = {"root":"
|
|
925
|
+
var css$1w = {"root":"lpoilb","uui-spinner":"sVDjSB","uuiSpinner":"sVDjSB"};
|
|
926
926
|
|
|
927
927
|
function applySpinnerMods() {
|
|
928
928
|
return [css$1w.root, 'uui-spinner'];
|
|
929
929
|
}
|
|
930
930
|
const Spinner = /* @__PURE__ */withMods(Spinner$1, applySpinnerMods);
|
|
931
931
|
|
|
932
|
-
var css$1v = {"root":"
|
|
932
|
+
var css$1v = {"root":"FBLOc0","loading-word":"JkZzdB","loadingWord":"JkZzdB","animated-loading":"lFlRHo","animatedLoading":"lFlRHo","skeleton_loading":"hbp-Uz","skeletonLoading":"hbp-Uz"};
|
|
933
933
|
|
|
934
934
|
const TextPlaceholder = (props) => {
|
|
935
935
|
const pattern = ' ';
|
|
@@ -946,7 +946,7 @@ const TextPlaceholder = (props) => {
|
|
|
946
946
|
]), dangerouslySetInnerHTML: { __html: it } })))));
|
|
947
947
|
};
|
|
948
948
|
|
|
949
|
-
var css$1u = {"root":"
|
|
949
|
+
var css$1u = {"root":"rBUWga","line-height":"nrY8nN","lineHeight":"nrY8nN","font-size":"_4UQjff","fontSize":"_4UQjff"};
|
|
950
950
|
|
|
951
951
|
function applyTextMods(mods) {
|
|
952
952
|
return [
|
|
@@ -973,6 +973,10 @@ const Text = /* @__PURE__ */withMods(uuiComponents.Text, applyTextMods, (props)
|
|
|
973
973
|
};
|
|
974
974
|
});
|
|
975
975
|
|
|
976
|
+
var css$1t = {"root":"Dx6fgP"};
|
|
977
|
+
|
|
978
|
+
const Blocker = /* @__PURE__ */withMods(Blocker$1, () => [css$1t.root], () => ({ renderSpinner: settings.blocker.renderSpinner }));
|
|
979
|
+
|
|
976
980
|
const accordionSettings = {
|
|
977
981
|
icons: {
|
|
978
982
|
dropdownIcon: ForwardRef$P,
|
|
@@ -1457,11 +1461,11 @@ const settings = {
|
|
|
1457
1461
|
textInput: textInputSettings,
|
|
1458
1462
|
};
|
|
1459
1463
|
|
|
1460
|
-
var css$
|
|
1464
|
+
var css$1s = {"root":"LvZsFX"};
|
|
1461
1465
|
|
|
1462
1466
|
function applyButtonMods(mods) {
|
|
1463
1467
|
return [
|
|
1464
|
-
css$
|
|
1468
|
+
css$1s.root,
|
|
1465
1469
|
'uui-button',
|
|
1466
1470
|
`uui-fill-${mods.fill || 'solid'}`,
|
|
1467
1471
|
`uui-color-${mods.color || 'primary'}`,
|
|
@@ -1475,10 +1479,10 @@ const Button = /* @__PURE__ */withMods(uuiComponents.Button, applyButtonMods, ()
|
|
|
1475
1479
|
};
|
|
1476
1480
|
});
|
|
1477
1481
|
|
|
1478
|
-
var css$
|
|
1482
|
+
var css$1r = {"root":"WMMKMw"};
|
|
1479
1483
|
|
|
1480
1484
|
function applyIconButtonMods(props) {
|
|
1481
|
-
return ['uui-icon_button', `uui-color-${props.color || 'neutral'}`, css$
|
|
1485
|
+
return ['uui-icon_button', `uui-color-${props.color || 'neutral'}`, css$1r.root];
|
|
1482
1486
|
}
|
|
1483
1487
|
const IconButton = /* @__PURE__ */withMods(uuiComponents.IconButton, applyIconButtonMods, (props) => {
|
|
1484
1488
|
const isDeprecated = ['info', 'success', 'error', 'warning'].includes(props.color);
|
|
@@ -1512,7 +1516,7 @@ function getIconClass(props) {
|
|
|
1512
1516
|
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'];
|
|
1513
1517
|
}
|
|
1514
1518
|
|
|
1515
|
-
var css$
|
|
1519
|
+
var css$1q = {"root":"s1p-zs"};
|
|
1516
1520
|
|
|
1517
1521
|
const DEFAULT_COLOR = 'primary';
|
|
1518
1522
|
const LinkButton = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
@@ -1527,7 +1531,7 @@ const LinkButton = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
1527
1531
|
}
|
|
1528
1532
|
const rootStyles = [
|
|
1529
1533
|
'uui-link_button',
|
|
1530
|
-
css$
|
|
1534
|
+
css$1q.root,
|
|
1531
1535
|
`uui-size-${props.size || settings.linkButton.sizes.default}`,
|
|
1532
1536
|
...getIconClass(props),
|
|
1533
1537
|
`uui-color-${props.color || DEFAULT_COLOR}`,
|
|
@@ -1542,11 +1546,11 @@ const LinkButton = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
1542
1546
|
props.isDropdown && (React.createElement(IconContainer, { icon: DropdownIcon, flipY: props.isOpen }))));
|
|
1543
1547
|
});
|
|
1544
1548
|
|
|
1545
|
-
var css$
|
|
1549
|
+
var css$1p = {"root":"Vt0Fr-"};
|
|
1546
1550
|
|
|
1547
1551
|
const CountIndicator = /* @__PURE__ */forwardRef((props, ref) => {
|
|
1548
1552
|
return (React__default.createElement("div", { ref: ref, className: cx([
|
|
1549
|
-
css$
|
|
1553
|
+
css$1p.root,
|
|
1550
1554
|
'uui-count_indicator',
|
|
1551
1555
|
`uui-size-${props.size || settings.countIndicator.sizes.default}`,
|
|
1552
1556
|
props.color && `uui-color-${props.color}`,
|
|
@@ -1554,11 +1558,11 @@ const CountIndicator = /* @__PURE__ */forwardRef((props, ref) => {
|
|
|
1554
1558
|
]) }, props.caption));
|
|
1555
1559
|
});
|
|
1556
1560
|
|
|
1557
|
-
var css$
|
|
1561
|
+
var css$1o = {"root":"_0K-UIR","withNotify":"_5LYwFT"};
|
|
1558
1562
|
|
|
1559
1563
|
const TabButton = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
1560
1564
|
const styles = [
|
|
1561
|
-
css$
|
|
1565
|
+
css$1o.root,
|
|
1562
1566
|
'uui-tab-button',
|
|
1563
1567
|
`uui-size-${props.size || settings.tabButton.sizes.default}`,
|
|
1564
1568
|
...getIconClass(props),
|
|
@@ -1575,25 +1579,25 @@ const TabButton = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
|
1575
1579
|
props.icon && props.iconPosition !== 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
1576
1580
|
(props.caption || props.withNotify) && (React__default.createElement("div", { className: cx$1(uuiElement.caption) },
|
|
1577
1581
|
props.caption,
|
|
1578
|
-
props.withNotify && React__default.createElement("div", { className: css$
|
|
1582
|
+
props.withNotify && React__default.createElement("div", { className: css$1o.withNotify }))),
|
|
1579
1583
|
props.icon && props.iconPosition === 'right' && (React__default.createElement(IconContainer, { icon: props.icon, onClick: !props.isDisabled ? props.onIconClick : undefined })),
|
|
1580
1584
|
props.count !== undefined && props.count !== null && (React__default.createElement(CountIndicator, { color: "neutral", size: settings.tabButton.sizes.countIndicatorMap[props.size || settings.tabButton.sizes.default], caption: props.count })),
|
|
1581
1585
|
props.isDropdown && (React__default.createElement(IconContainer, { icon: DropdownIcon, flipY: props.isOpen })),
|
|
1582
1586
|
props.onClear && !props.isDisabled && (React__default.createElement(IconContainer, { cx: uuiMarkers.clickable, icon: ClearIcon, onClick: props.onClear }))));
|
|
1583
1587
|
});
|
|
1584
1588
|
|
|
1585
|
-
var css$
|
|
1589
|
+
var css$1n = {"root":"aJjlD6"};
|
|
1586
1590
|
|
|
1587
1591
|
function applyVerticalTabButtonMods() {
|
|
1588
|
-
return [css$
|
|
1592
|
+
return [css$1n.root, 'uui-vertical-tab-button'];
|
|
1589
1593
|
}
|
|
1590
1594
|
const VerticalTabButton = /* @__PURE__ */withMods(TabButton, applyVerticalTabButtonMods);
|
|
1591
1595
|
|
|
1592
|
-
var css$
|
|
1596
|
+
var css$1m = {"root":"iSN8ad"};
|
|
1593
1597
|
|
|
1594
1598
|
function applyCheckboxMods(mods) {
|
|
1595
1599
|
return [
|
|
1596
|
-
css$
|
|
1600
|
+
css$1m.root,
|
|
1597
1601
|
`uui-size-${mods.size || settings.checkbox.sizes.default}`,
|
|
1598
1602
|
'uui-control-mode-' + (mods.mode || 'form'),
|
|
1599
1603
|
'uui-color-primary',
|
|
@@ -1607,11 +1611,11 @@ const applyUUICheckboxProps = (props) => {
|
|
|
1607
1611
|
};
|
|
1608
1612
|
const Checkbox = /* @__PURE__ */withMods(uuiComponents.Checkbox, applyCheckboxMods, applyUUICheckboxProps);
|
|
1609
1613
|
|
|
1610
|
-
var css$
|
|
1614
|
+
var css$1l = {"root":"ZD-bnJ"};
|
|
1611
1615
|
|
|
1612
1616
|
function applyRadioInputMods(mods) {
|
|
1613
1617
|
return [
|
|
1614
|
-
css$
|
|
1618
|
+
css$1l.root,
|
|
1615
1619
|
`uui-size-${mods.size || settings.radioInput.sizes.default}`,
|
|
1616
1620
|
'uui-radio-input-container',
|
|
1617
1621
|
'uui-color-primary',
|
|
@@ -1619,11 +1623,11 @@ function applyRadioInputMods(mods) {
|
|
|
1619
1623
|
}
|
|
1620
1624
|
const RadioInput = /* @__PURE__ */withMods(RadioInput$1, applyRadioInputMods, (props) => ({ icon: props.icon ? props.icon : settings.radioInput.icons.dotIcon }));
|
|
1621
1625
|
|
|
1622
|
-
var css$
|
|
1626
|
+
var css$1k = {"root":"fwp9WK"};
|
|
1623
1627
|
|
|
1624
1628
|
function applySwitchMods(mods) {
|
|
1625
1629
|
return [
|
|
1626
|
-
css$
|
|
1630
|
+
css$1k.root,
|
|
1627
1631
|
`uui-size-${mods.size || settings.switch.sizes.default}`,
|
|
1628
1632
|
'uui-color-primary',
|
|
1629
1633
|
];
|
|
@@ -1643,7 +1647,7 @@ var EditMode;
|
|
|
1643
1647
|
EditMode["INLINE"] = "inline";
|
|
1644
1648
|
})(EditMode || (EditMode = {}));
|
|
1645
1649
|
|
|
1646
|
-
var textInputCss = {"root":"
|
|
1650
|
+
var textInputCss = {"root":"jiu2Fc"};
|
|
1647
1651
|
|
|
1648
1652
|
const DEFAULT_MODE$3 = EditMode.FORM;
|
|
1649
1653
|
function applyTextInputMods(mods) {
|
|
@@ -1668,9 +1672,9 @@ const SearchInput = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
|
1668
1672
|
} }));
|
|
1669
1673
|
});
|
|
1670
1674
|
|
|
1671
|
-
var css$
|
|
1675
|
+
var css$1j = {"root":"ItDOGS"};
|
|
1672
1676
|
|
|
1673
|
-
const ControlGroup = /* @__PURE__ */withMods(ControlGroup$1, () => [css$
|
|
1677
|
+
const ControlGroup = /* @__PURE__ */withMods(ControlGroup$1, () => [css$1j.root, 'uui-control-group']);
|
|
1674
1678
|
|
|
1675
1679
|
function MultiSwitchComponent(props, ref) {
|
|
1676
1680
|
return (React.createElement(ControlGroup, { ref: ref, rawProps: {
|
|
@@ -1684,13 +1688,13 @@ function MultiSwitchComponent(props, ref) {
|
|
|
1684
1688
|
}
|
|
1685
1689
|
const MultiSwitch = /* @__PURE__ */React.forwardRef(MultiSwitchComponent);
|
|
1686
1690
|
|
|
1687
|
-
var css$
|
|
1691
|
+
var css$1i = {"root":"oKS3F5"};
|
|
1688
1692
|
|
|
1689
1693
|
const DEFAULT_MODE$2 = EditMode.FORM;
|
|
1690
1694
|
function applyNumericInputMods(mods) {
|
|
1691
1695
|
return [
|
|
1692
1696
|
textInputCss.root,
|
|
1693
|
-
css$
|
|
1697
|
+
css$1i.root,
|
|
1694
1698
|
`uui-size-${mods.size || settings.numericInput.sizes.default}`,
|
|
1695
1699
|
'uui-control-mode-' + (mods.mode || DEFAULT_MODE$2),
|
|
1696
1700
|
];
|
|
@@ -1704,12 +1708,12 @@ const NumericInput = /* @__PURE__ */withMods(NumericInput$1, applyNumericInputMo
|
|
|
1704
1708
|
};
|
|
1705
1709
|
});
|
|
1706
1710
|
|
|
1707
|
-
var css$
|
|
1711
|
+
var css$1h = {"root":"MSTlg8"};
|
|
1708
1712
|
|
|
1709
1713
|
const DEFAULT_MODE$1 = EditMode.FORM;
|
|
1710
1714
|
function applyTextAreaMods(mods) {
|
|
1711
1715
|
return [
|
|
1712
|
-
css$
|
|
1716
|
+
css$1h.root,
|
|
1713
1717
|
'uui-textarea',
|
|
1714
1718
|
'uui-size-' + (mods.size || settings.textArea.sizes.default),
|
|
1715
1719
|
'uui-control-mode-' + (mods.mode || DEFAULT_MODE$1),
|
|
@@ -1745,18 +1749,18 @@ function TREE_SHAKEABLE_INIT$1() {
|
|
|
1745
1749
|
};
|
|
1746
1750
|
}
|
|
1747
1751
|
|
|
1748
|
-
var css$
|
|
1752
|
+
var css$1g = {"root":"Fj-MkA"};
|
|
1749
1753
|
|
|
1750
1754
|
function applyDropdownContainerMods(mods) {
|
|
1751
1755
|
return [
|
|
1752
|
-
css$
|
|
1756
|
+
css$1g.root,
|
|
1753
1757
|
mods.vPadding && `vPadding-${mods.vPadding}`,
|
|
1754
1758
|
mods.padding && `padding-${mods.padding}`,
|
|
1755
1759
|
];
|
|
1756
1760
|
}
|
|
1757
1761
|
const DropdownContainer = /* @__PURE__ */withMods(uuiComponents.DropdownContainer, applyDropdownContainerMods);
|
|
1758
1762
|
|
|
1759
|
-
var css$
|
|
1763
|
+
var css$1f = {"root":"YCSBR1","timepicker-input":"FVJor4","timepickerInput":"FVJor4","ltr-always":"_8Ogt91","ltrAlways":"_8Ogt91"};
|
|
1760
1764
|
|
|
1761
1765
|
const uuiTimePicker = {
|
|
1762
1766
|
container: 'uui-timepicker-container',
|
|
@@ -1795,8 +1799,8 @@ function TimePickerBody(props) {
|
|
|
1795
1799
|
const minutesToSubtract = value.minute() % minutesStep === 0 ? minutesStep : value.minute() % minutesStep;
|
|
1796
1800
|
onMinutesChange(value.subtract(minutesToSubtract, 'm').minute());
|
|
1797
1801
|
};
|
|
1798
|
-
return (React.createElement("div", { className: cx$1(css$
|
|
1799
|
-
React.createElement("div", { className: css$
|
|
1802
|
+
return (React.createElement("div", { className: cx$1(css$1f.root, uuiTimePicker.container, props.cx), ref: props.forwardedRef, ...props.rawProps },
|
|
1803
|
+
React.createElement("div", { className: css$1f.ltrAlways },
|
|
1800
1804
|
React.createElement("div", { className: uuiTimePicker.elementContainer },
|
|
1801
1805
|
React.createElement(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()) }),
|
|
1802
1806
|
React.createElement(NumericInput$1, { cx: uuiTimePicker.input, onValueChange: onHoursChange, value: +(uuiDayjs.dayjs()
|
|
@@ -1939,7 +1943,7 @@ function TimePickerComponent(props, ref) {
|
|
|
1939
1943
|
state.value && state.inputValue && saveTime(state.value);
|
|
1940
1944
|
};
|
|
1941
1945
|
const renderInput = (inputProps) => {
|
|
1942
|
-
return (React__default.createElement(TextInput, { ...inputProps, onClick: null, size: props.size, isDisabled: props.isDisabled, isReadonly: props.isReadonly, isInvalid: props.isInvalid, cx: [css$
|
|
1946
|
+
return (React__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 }));
|
|
1943
1947
|
};
|
|
1944
1948
|
const renderBody = (bodyProps) => {
|
|
1945
1949
|
const { forwardedRef, onValueChange, ...timePickerBodyProps } = props;
|
|
@@ -1950,37 +1954,37 @@ function TimePickerComponent(props, ref) {
|
|
|
1950
1954
|
}
|
|
1951
1955
|
const TimePicker = /* @__PURE__ */React__default.forwardRef(TimePickerComponent);
|
|
1952
1956
|
|
|
1953
|
-
var css$
|
|
1957
|
+
var css$1e = {"root":"naMHF1"};
|
|
1954
1958
|
|
|
1955
1959
|
function applyInputAddonMods() {
|
|
1956
1960
|
return [
|
|
1957
|
-
css$
|
|
1961
|
+
css$1e.root,
|
|
1958
1962
|
];
|
|
1959
1963
|
}
|
|
1960
1964
|
const InputAddon = /* @__PURE__ */withMods(InputAddon$1, applyInputAddonMods);
|
|
1961
1965
|
|
|
1962
|
-
var css$
|
|
1966
|
+
var css$1d = {"root":"_0zIzP8"};
|
|
1963
1967
|
|
|
1964
1968
|
function applySliderMods() {
|
|
1965
|
-
return [css$
|
|
1969
|
+
return [css$1d.root, 'uui-color-neutral'];
|
|
1966
1970
|
}
|
|
1967
1971
|
const Slider = /* @__PURE__ */withMods(Slider$1, applySliderMods);
|
|
1968
1972
|
|
|
1969
|
-
var css$
|
|
1973
|
+
var css$1c = {"root":"wVtZ9H"};
|
|
1970
1974
|
|
|
1971
1975
|
function applyTooltipMods(mods) {
|
|
1972
1976
|
return [
|
|
1973
|
-
css$
|
|
1977
|
+
css$1c.root,
|
|
1974
1978
|
`uui-color-${mods.color || 'inverted'}`,
|
|
1975
1979
|
];
|
|
1976
1980
|
}
|
|
1977
1981
|
const Tooltip = /* @__PURE__ */withMods(uuiComponents.Tooltip, applyTooltipMods);
|
|
1978
1982
|
|
|
1979
|
-
var css$
|
|
1983
|
+
var css$1b = {"root":"iWGNyF","tooltip":"IM7BGh"};
|
|
1980
1984
|
|
|
1981
1985
|
function applyRatingMods(mods) {
|
|
1982
1986
|
return [
|
|
1983
|
-
css$
|
|
1987
|
+
css$1b.root,
|
|
1984
1988
|
`uui-size-${mods.size || settings.rating.sizes.default}`,
|
|
1985
1989
|
];
|
|
1986
1990
|
}
|
|
@@ -1990,17 +1994,17 @@ const Rating = /* @__PURE__ */withMods(uuiComponents.Rating, applyRatingMods, (p
|
|
|
1990
1994
|
Tooltip,
|
|
1991
1995
|
}));
|
|
1992
1996
|
|
|
1993
|
-
var css$
|
|
1997
|
+
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"};
|
|
1994
1998
|
|
|
1995
|
-
const Alert = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement("div", { role: "alert", ref: ref, className: cx('uui-alert', css$
|
|
1996
|
-
React.createElement("div", { className: css$
|
|
1997
|
-
React.createElement("div", { className: css$
|
|
1998
|
-
props.icon && (React.createElement("div", { className: css$
|
|
1999
|
-
React.createElement(IconContainer, { icon: props.icon, cx: css$
|
|
2000
|
-
React.createElement("div", { className: css$
|
|
1999
|
+
const Alert = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement("div", { role: "alert", ref: ref, className: cx('uui-alert', css$1a.root, props.color && `uui-color-${props.color}`, props.cx, `uui-size-${props.size || settings.alert.sizes.default}`), ...props.rawProps },
|
|
2000
|
+
React.createElement("div", { className: css$1a.mainPath },
|
|
2001
|
+
React.createElement("div", { className: css$1a.contentWrapper },
|
|
2002
|
+
props.icon && (React.createElement("div", { className: css$1a.iconWrapper },
|
|
2003
|
+
React.createElement(IconContainer, { icon: props.icon, cx: css$1a.icon }))),
|
|
2004
|
+
React.createElement("div", { className: css$1a.content },
|
|
2001
2005
|
props.children,
|
|
2002
|
-
props.actions && (React.createElement("div", { className: css$
|
|
2003
|
-
props.onClose && React.createElement(IconButton, { icon: settings.alert.icons.closeIcon, color: "neutral", onClick: props.onClose, cx: css$
|
|
2006
|
+
props.actions && (React.createElement("div", { className: css$1a.actionWrapper }, props.actions.map((action) => (React.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] }))))))),
|
|
2007
|
+
props.onClose && React.createElement(IconButton, { icon: settings.alert.icons.closeIcon, color: "neutral", onClick: props.onClose, cx: css$1a.closeIcon })))));
|
|
2004
2008
|
const WarningAlert = /* @__PURE__ */React.forwardRef((props, ref) => React.createElement(Alert, { icon: settings.alert.icons.warningIcon, color: "warning", ref: ref, ...props }));
|
|
2005
2009
|
const SuccessAlert = /* @__PURE__ */React.forwardRef((props, ref) => React.createElement(Alert, { icon: settings.alert.icons.successIcon, color: "success", ref: ref, ...props }));
|
|
2006
2010
|
const HintAlert = /* @__PURE__ */React.forwardRef((props, ref) => React.createElement(Alert, { icon: settings.alert.icons.infoIcon, color: "info", ref: ref, ...props }));
|
|
@@ -2008,7 +2012,7 @@ const ErrorAlert = /* @__PURE__ */React.forwardRef((props, ref) => React.createE
|
|
|
2008
2012
|
|
|
2009
2013
|
const Dropdown = /* @__PURE__ */withMods(Dropdown$1);
|
|
2010
2014
|
|
|
2011
|
-
var css$
|
|
2015
|
+
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"};
|
|
2012
2016
|
|
|
2013
2017
|
var IDropdownControlKeys;
|
|
2014
2018
|
(function (IDropdownControlKeys) {
|
|
@@ -2073,29 +2077,29 @@ const DropdownMenuButton = /* @__PURE__ */React__default.forwardRef((props, ref)
|
|
|
2073
2077
|
const getMenuButtonContent = () => {
|
|
2074
2078
|
const isIconBefore = Boolean(icon && iconPosition !== 'right');
|
|
2075
2079
|
const isIconAfter = Boolean(icon && iconPosition === 'right');
|
|
2076
|
-
const iconElement = (React__default.createElement(IconButton, { icon: icon, color: isActive ? 'primary' : 'neutral', onClick: onIconClick, isDisabled: isDisabled, cx: cx$1(css$
|
|
2080
|
+
const iconElement = (React__default.createElement(IconButton, { icon: icon, color: isActive ? 'primary' : 'neutral', onClick: onIconClick, isDisabled: isDisabled, cx: cx$1(css$19.icon, iconPosition === 'right' ? css$19.iconAfter : css$19.iconBefore) }));
|
|
2077
2081
|
return (React__default.createElement(React__default.Fragment, null,
|
|
2078
2082
|
isIconBefore && iconElement,
|
|
2079
|
-
React__default.createElement(Text$1, { cx: props.indent && css$
|
|
2083
|
+
React__default.createElement(Text$1, { cx: props.indent && css$19.indent }, caption),
|
|
2080
2084
|
isIconAfter && (React__default.createElement(React__default.Fragment, null,
|
|
2081
2085
|
React__default.createElement(FlexSpacer, null),
|
|
2082
2086
|
iconElement))));
|
|
2083
2087
|
};
|
|
2084
2088
|
const isAnchor = Boolean(link || href);
|
|
2085
|
-
const itemClassNames = cx$1(props.cx, css$
|
|
2086
|
-
return isAnchor ? (React__default.createElement(Anchor$1, { cx: cx$1(css$
|
|
2089
|
+
const itemClassNames = cx$1(props.cx, css$19.itemRoot, isDisabled && uuiMod.disabled, isActive && uuiMod.active, isOpen && uuiMod.opened, (!isDisabled && onClick) && uuiMarkers.clickable);
|
|
2090
|
+
return isAnchor ? (React__default.createElement(Anchor$1, { cx: cx$1(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__default.createElement("div", { tabIndex: isDisabled ? -1 : 0, role: "menuitem", onKeyDown: isDisabled ? null : handleOpenDropdown, className: itemClassNames, onClick: handleClick, ref: ref },
|
|
2087
2091
|
getMenuButtonContent(),
|
|
2088
2092
|
isSelected && (React__default.createElement(React__default.Fragment, null,
|
|
2089
2093
|
React__default.createElement(FlexSpacer, null),
|
|
2090
|
-
React__default.createElement(IconContainer, { icon: settings.dropdownMenu.icons.acceptIcon, cx: css$
|
|
2094
|
+
React__default.createElement(IconContainer, { icon: settings.dropdownMenu.icons.acceptIcon, cx: css$19.selectedMark })))));
|
|
2091
2095
|
});
|
|
2092
2096
|
function DropdownMenuSplitter(props) {
|
|
2093
|
-
return (React__default.createElement("div", { className: cx$1(props.cx, css$
|
|
2094
|
-
React__default.createElement("hr", { className: css$
|
|
2097
|
+
return (React__default.createElement("div", { className: cx$1(props.cx, css$19.splitterRoot) },
|
|
2098
|
+
React__default.createElement("hr", { className: css$19.splitter })));
|
|
2095
2099
|
}
|
|
2096
2100
|
function DropdownMenuHeader(props) {
|
|
2097
|
-
return (React__default.createElement("div", { className: cx$1('uui-dropdown-menu-header', props.cx, css$
|
|
2098
|
-
React__default.createElement("span", { className: css$
|
|
2101
|
+
return (React__default.createElement("div", { className: cx$1('uui-dropdown-menu-header', props.cx, css$19.headerRoot) },
|
|
2102
|
+
React__default.createElement("span", { className: css$19.header }, props.caption)));
|
|
2099
2103
|
}
|
|
2100
2104
|
function DropdownSubMenu(props) {
|
|
2101
2105
|
const subMenuMiddleware = [
|
|
@@ -2110,7 +2114,7 @@ function DropdownSubMenu(props) {
|
|
|
2110
2114
|
}),
|
|
2111
2115
|
];
|
|
2112
2116
|
const isRtl = getDir() === 'rtl';
|
|
2113
|
-
return (React__default.createElement(Dropdown$1, { openOnHover: props.openOnHover || true, closeOnMouseLeave: "boundary", openDelay: 400, closeDelay: 400, placement: isRtl ? 'left-start' : 'right-start', middleware: subMenuMiddleware, renderBody: (dropdownProps) => !props.isDisabled && (React__default.createElement(DropdownMenuBody, { closeOnKey: IDropdownControlKeys.LEFT_ARROW, ...props, ...dropdownProps })), renderTarget: ({ toggleDropdownOpening, ...targetProps }) => (React__default.createElement(DropdownMenuButton, { cx: cx$1(isRtl ? css$
|
|
2117
|
+
return (React__default.createElement(Dropdown$1, { openOnHover: props.openOnHover || true, closeOnMouseLeave: "boundary", openDelay: 400, closeDelay: 400, placement: isRtl ? 'left-start' : 'right-start', middleware: subMenuMiddleware, renderBody: (dropdownProps) => !props.isDisabled && (React__default.createElement(DropdownMenuBody, { closeOnKey: IDropdownControlKeys.LEFT_ARROW, ...props, ...dropdownProps })), renderTarget: ({ toggleDropdownOpening, ...targetProps }) => (React__default.createElement(DropdownMenuButton, { cx: cx$1(isRtl ? css$19.submenuRootItemRtl : css$19.submenuRootItem), icon: settings.dropdownMenu.icons.dropdownIcon, iconPosition: "right", isDropdown: true, toggleDropdownOpening: toggleDropdownOpening, ...props, ...targetProps })) }));
|
|
2114
2118
|
}
|
|
2115
2119
|
function DropdownMenuSwitchButton(props) {
|
|
2116
2120
|
const context = useContext(UuiContext);
|
|
@@ -2126,29 +2130,29 @@ function DropdownMenuSwitchButton(props) {
|
|
|
2126
2130
|
onHandleValueChange(!isSelected);
|
|
2127
2131
|
}
|
|
2128
2132
|
};
|
|
2129
|
-
return (React__default.createElement("div", { className: cx$1(props.cx, css$
|
|
2130
|
-
icon && React__default.createElement(IconContainer, { icon: icon, cx: css$
|
|
2133
|
+
return (React__default.createElement("div", { className: cx$1(props.cx, css$19.itemRoot, isDisabled && uuiMod.disabled, (!isDisabled || onValueChange) && uuiMarkers.clickable), onClick: () => onHandleValueChange(!isSelected), role: "menuitem", onKeyDown: handleKeySelect, tabIndex: isDisabled ? -1 : 0 },
|
|
2134
|
+
icon && React__default.createElement(IconContainer, { icon: icon, cx: css$19.iconBefore }),
|
|
2131
2135
|
React__default.createElement(Text$1, null, caption),
|
|
2132
2136
|
React__default.createElement(FlexSpacer, null),
|
|
2133
2137
|
React__default.createElement(Switch, { value: isSelected, tabIndex: -1, onValueChange: onHandleValueChange })));
|
|
2134
2138
|
}
|
|
2135
2139
|
|
|
2136
|
-
var css$
|
|
2140
|
+
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"};
|
|
2137
2141
|
|
|
2138
2142
|
function applyAccordionMods(mods) {
|
|
2139
2143
|
return [
|
|
2140
|
-
css$
|
|
2141
|
-
css$
|
|
2142
|
-
mods.padding && css$
|
|
2144
|
+
css$18.root,
|
|
2145
|
+
css$18[`mode-${mods.mode || 'block'}`],
|
|
2146
|
+
mods.padding && css$18['padding-' + mods.padding],
|
|
2143
2147
|
];
|
|
2144
2148
|
}
|
|
2145
2149
|
const Accordion = /* @__PURE__ */withMods(uuiComponents.Accordion, applyAccordionMods, (mods) => ({
|
|
2146
2150
|
dropdownIcon: mods.dropdownIcon !== null && settings.accordion.icons.dropdownIcon,
|
|
2147
2151
|
}));
|
|
2148
2152
|
|
|
2149
|
-
var css$
|
|
2153
|
+
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"};
|
|
2150
2154
|
|
|
2151
|
-
const FlexCell = /* @__PURE__ */withMods(FlexCell$1, () => [css$
|
|
2155
|
+
const FlexCell = /* @__PURE__ */withMods(FlexCell$1, () => [css$17.flexCell]);
|
|
2152
2156
|
|
|
2153
2157
|
const FlexRow = /* @__PURE__ */forwardRef((props, ref) => {
|
|
2154
2158
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2157,22 +2161,22 @@ const FlexRow = /* @__PURE__ */forwardRef((props, ref) => {
|
|
|
2157
2161
|
}
|
|
2158
2162
|
}
|
|
2159
2163
|
const classNames = cx$1([
|
|
2160
|
-
css$
|
|
2164
|
+
css$17.root,
|
|
2161
2165
|
'uui-flex-row',
|
|
2162
2166
|
props.onClick && uuiMarkers.clickable,
|
|
2163
2167
|
props.cx,
|
|
2164
2168
|
props.size !== null && 'uui-size-' + (props.size || settings.flexRow.sizes.default),
|
|
2165
|
-
props.alignItems && css$
|
|
2166
|
-
props.justifyContent && css$
|
|
2167
|
-
props.padding && css$
|
|
2168
|
-
props.vPadding && css$
|
|
2169
|
-
props.margin && css$
|
|
2170
|
-
props.topShadow && css$
|
|
2171
|
-
props.borderBottom && css$
|
|
2172
|
-
props.borderTop && css$
|
|
2173
|
-
props.columnGap && css$
|
|
2174
|
-
props.rowGap && css$
|
|
2175
|
-
props.spacing && css$
|
|
2169
|
+
props.alignItems && css$17.alignItems,
|
|
2170
|
+
props.justifyContent && css$17.justifyContent,
|
|
2171
|
+
props.padding && css$17.padding,
|
|
2172
|
+
props.vPadding && css$17.vPadding,
|
|
2173
|
+
props.margin && css$17.margin,
|
|
2174
|
+
props.topShadow && css$17.topShadow,
|
|
2175
|
+
props.borderBottom && css$17.borderBottom,
|
|
2176
|
+
props.borderTop && css$17.borderTop,
|
|
2177
|
+
props.columnGap && css$17.columnGap,
|
|
2178
|
+
props.rowGap && css$17.rowGap,
|
|
2179
|
+
props.spacing && css$17.spacing,
|
|
2176
2180
|
props.background && `uui-flex-row-bg-${props.background}`,
|
|
2177
2181
|
]);
|
|
2178
2182
|
let alignItemsValue = props.alignItems;
|
|
@@ -2198,22 +2202,22 @@ const FlexRow = /* @__PURE__ */forwardRef((props, ref) => {
|
|
|
2198
2202
|
} }, props.children));
|
|
2199
2203
|
});
|
|
2200
2204
|
|
|
2201
|
-
var css$
|
|
2205
|
+
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"};
|
|
2202
2206
|
|
|
2203
2207
|
const Panel = /* @__PURE__ */withMods(VPanel, (props) => [
|
|
2204
2208
|
'uui-panel',
|
|
2205
|
-
css$
|
|
2206
|
-
props.shadow && css$
|
|
2207
|
-
props.margin && css$
|
|
2208
|
-
props.background && css$
|
|
2209
|
+
css$16.root,
|
|
2210
|
+
props.shadow && css$16.shadow,
|
|
2211
|
+
props.margin && css$16['margin-' + props.margin],
|
|
2212
|
+
props.background && css$16[`uui-${props.background}`],
|
|
2209
2213
|
]);
|
|
2210
2214
|
|
|
2211
|
-
var css$
|
|
2215
|
+
var css$15 = {"root":"enVw7n"};
|
|
2212
2216
|
|
|
2213
2217
|
function applyLabeledInputMods(mods) {
|
|
2214
2218
|
return [
|
|
2215
2219
|
'uui-labeled-input',
|
|
2216
|
-
css$
|
|
2220
|
+
css$15.root,
|
|
2217
2221
|
'uui-size-' + (mods.size || settings.labeledInput.sizes.default),
|
|
2218
2222
|
];
|
|
2219
2223
|
}
|
|
@@ -2225,7 +2229,7 @@ function applyLabeledInputProps(props) {
|
|
|
2225
2229
|
}
|
|
2226
2230
|
const LabeledInput = /* @__PURE__ */withMods(uuiComponents.LabeledInput, applyLabeledInputMods, applyLabeledInputProps);
|
|
2227
2231
|
|
|
2228
|
-
var css$
|
|
2232
|
+
var css$14 = {"root":"LMv-XN"};
|
|
2229
2233
|
|
|
2230
2234
|
function RadioGroup(props) {
|
|
2231
2235
|
const direction = props.direction || 'vertical';
|
|
@@ -2234,26 +2238,22 @@ function RadioGroup(props) {
|
|
|
2234
2238
|
props.onValueChange(newVal);
|
|
2235
2239
|
}
|
|
2236
2240
|
};
|
|
2237
|
-
return (React.createElement("fieldset", { ref: props.forwardedRef, className: cx$1(css$
|
|
2241
|
+
return (React.createElement("fieldset", { ref: props.forwardedRef, className: cx$1(css$14.root, directionMode[direction], props.cx), onFocus: props.onFocus, onBlur: props.onBlur, ...props.rawProps }, props.items.map((i) => {
|
|
2238
2242
|
const { id, name, renderName, ...restItemProps } = i;
|
|
2239
2243
|
return (React.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 }));
|
|
2240
2244
|
})));
|
|
2241
2245
|
}
|
|
2242
2246
|
|
|
2243
|
-
var css$
|
|
2247
|
+
var css$13 = {"root":"Jrgzym"};
|
|
2244
2248
|
|
|
2245
2249
|
function applyScrollBarsMods() {
|
|
2246
2250
|
return [
|
|
2247
|
-
css$
|
|
2251
|
+
css$13.root, 'uui-scroll-bars', 'uui-shadow-top', 'uui-shadow-bottom',
|
|
2248
2252
|
];
|
|
2249
2253
|
}
|
|
2250
2254
|
const ScrollBars = /* @__PURE__ */withMods(ScrollBars$1, applyScrollBarsMods);
|
|
2251
2255
|
|
|
2252
|
-
var css$
|
|
2253
|
-
|
|
2254
|
-
var css$12 = {"root":"nRHmpk"};
|
|
2255
|
-
|
|
2256
|
-
const Blocker = /* @__PURE__ */withMods(Blocker$1, () => [css$12.root], () => ({ renderSpinner: settings.blocker.renderSpinner }));
|
|
2256
|
+
var css$12 = {"scroll-container":"_04b4AF","scrollContainer":"_04b4AF","list-container":"j4QBN-","listContainer":"j4QBN-"};
|
|
2257
2257
|
|
|
2258
2258
|
const VirtualList = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
2259
2259
|
const { listContainerRef, offsetY, handleScroll, estimatedHeight, scrollContainerRef, } = useVirtualList({
|
|
@@ -2267,7 +2267,7 @@ const VirtualList = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
2267
2267
|
const scrollShadows = useScrollShadows({ root: scrollContainerRef.current });
|
|
2268
2268
|
const renderRows = () => props.renderRows?.({
|
|
2269
2269
|
listContainerRef, estimatedHeight, offsetY, scrollShadows,
|
|
2270
|
-
}) || (React.createElement("div", { className: css$
|
|
2270
|
+
}) || (React.createElement("div", { className: css$12.listContainer, style: { minHeight: `${estimatedHeight}px` } },
|
|
2271
2271
|
React.createElement("div", { ref: listContainerRef, role: props.role, style: { marginTop: offsetY } }, props.rows)));
|
|
2272
2272
|
const renderView = ({ style }) => (React.createElement(VirtualListView, { isLoading: props.isLoading, style: style, rawProps: props.rawProps, renderBlocker: props.renderBlocker }));
|
|
2273
2273
|
const scrollBarsRef = React.useCallback((scrollbars) => {
|
|
@@ -2275,7 +2275,7 @@ const VirtualList = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
2275
2275
|
return;
|
|
2276
2276
|
scrollContainerRef.current = scrollbars.container.firstChild;
|
|
2277
2277
|
}, []);
|
|
2278
|
-
return (React.createElement(ScrollBars, { cx: cx$1(css$
|
|
2278
|
+
return (React.createElement(ScrollBars, { cx: cx$1(css$12.scrollContainer, props.cx, {
|
|
2279
2279
|
[uuiMarkers.scrolledLeft]: scrollShadows.horizontalLeft,
|
|
2280
2280
|
[uuiMarkers.scrolledRight]: scrollShadows.horizontalRight,
|
|
2281
2281
|
[uuiMarkers.scrolledTop]: scrollShadows.verticalTop,
|
|
@@ -2297,7 +2297,7 @@ const VirtualListView = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
2297
2297
|
props.renderBlocker ? props.renderBlocker({ isLoading: props.isLoading }) : React.createElement(Blocker, { isEnabled: props.isLoading })));
|
|
2298
2298
|
});
|
|
2299
2299
|
|
|
2300
|
-
var css$11 = {"root":"
|
|
2300
|
+
var css$11 = {"root":"P6vhUh"};
|
|
2301
2301
|
|
|
2302
2302
|
function CheckboxGroup(props) {
|
|
2303
2303
|
const currentValue = props.value || [];
|
|
@@ -2319,7 +2319,7 @@ function CheckboxGroup(props) {
|
|
|
2319
2319
|
})));
|
|
2320
2320
|
}
|
|
2321
2321
|
|
|
2322
|
-
var css$10 = {"root":"
|
|
2322
|
+
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"};
|
|
2323
2323
|
|
|
2324
2324
|
const ModalBlocker = /* @__PURE__ */withMods(ModalBlocker$1, () => [css$10.modalBlocker]);
|
|
2325
2325
|
const ModalWindow = /* @__PURE__ */withMods(ModalWindow$1, () => [css$10.root, css$10.modal], (props) => {
|
|
@@ -2510,7 +2510,7 @@ const TREE_SHAKEABLE_INIT = () => ({
|
|
|
2510
2510
|
});
|
|
2511
2511
|
const i18n = /* @__PURE__ */TREE_SHAKEABLE_INIT();
|
|
2512
2512
|
|
|
2513
|
-
var css$$ = {"root":"
|
|
2513
|
+
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"};
|
|
2514
2514
|
|
|
2515
2515
|
const NotificationCard = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
2516
2516
|
const notificationCardNode = React__default.useRef(null);
|
|
@@ -2543,7 +2543,7 @@ function ClearNotification() {
|
|
|
2543
2543
|
React__default.createElement(LinkButton, { caption: i18n.notificationCard.closeAllNotificationsButton, onClick: () => uuiCtx.uuiNotifications.clearAll() })));
|
|
2544
2544
|
}
|
|
2545
2545
|
|
|
2546
|
-
var css$_ = {"footer":"
|
|
2546
|
+
var css$_ = {"footer":"sMt3Lh"};
|
|
2547
2547
|
|
|
2548
2548
|
class ConfirmationModal extends React.Component {
|
|
2549
2549
|
render() {
|
|
@@ -2585,7 +2585,7 @@ function useReliableForceUpdate() {
|
|
|
2585
2585
|
return red[1];
|
|
2586
2586
|
}
|
|
2587
2587
|
|
|
2588
|
-
var css$Z = {"root":"
|
|
2588
|
+
var css$Z = {"root":"-NVSOT","container":"_0ZqNg3"};
|
|
2589
2589
|
|
|
2590
2590
|
const defaultFormat = 'MMM D, YYYY';
|
|
2591
2591
|
const valueFormat = 'YYYY-MM-DD';
|
|
@@ -2604,7 +2604,7 @@ const defaultRangeValue = {
|
|
|
2604
2604
|
from: null,
|
|
2605
2605
|
to: null,
|
|
2606
2606
|
};
|
|
2607
|
-
const
|
|
2607
|
+
const getDisplayedMonth = (selectedDate, focus) => {
|
|
2608
2608
|
if (selectedDate.from && selectedDate.to && focus) {
|
|
2609
2609
|
return uuiDayjs.dayjs(selectedDate[focus]);
|
|
2610
2610
|
}
|
|
@@ -2713,6 +2713,13 @@ const getPrevYearsList = (currentDate) => {
|
|
|
2713
2713
|
const getNextYearsList = (currentDate) => {
|
|
2714
2714
|
return currentDate.add(16, 'year');
|
|
2715
2715
|
};
|
|
2716
|
+
const isValidAndInFilter = (dateValue, inputType, filter) => {
|
|
2717
|
+
if (!dateValue[inputType])
|
|
2718
|
+
return false;
|
|
2719
|
+
if (!isValidRange(dateValue))
|
|
2720
|
+
return false;
|
|
2721
|
+
return !(filter && filter(uuiDayjs.dayjs(dateValue[inputType])) === false);
|
|
2722
|
+
};
|
|
2716
2723
|
|
|
2717
2724
|
const uuiHeader = {
|
|
2718
2725
|
container: 'uui-datepicker-header-container',
|
|
@@ -2796,14 +2803,14 @@ function DatePickerHeader({ navIconLeft, navIconRight, value: { month, view }, o
|
|
|
2796
2803
|
React.createElement(Button, { icon: navIconRight || settings.datePicker.icons.body.nextIcon, color: "secondary", fill: "ghost", cx: uuiHeader.navIconRight, onClick: !isDisabled && (() => onRightNavigationArrow()), isDisabled: disableNext }))));
|
|
2797
2804
|
}
|
|
2798
2805
|
|
|
2799
|
-
var css$Y = {"root":"
|
|
2806
|
+
var css$Y = {"root":"_4vgg2Z"};
|
|
2800
2807
|
|
|
2801
2808
|
function applyDateSelectionMods() {
|
|
2802
2809
|
return [css$Y.root, `uui-size-${settings.datePicker.sizes.body}`];
|
|
2803
2810
|
}
|
|
2804
2811
|
const Calendar = /* @__PURE__ */withMods(Calendar$1, applyDateSelectionMods);
|
|
2805
2812
|
|
|
2806
|
-
var css$X = {"root":"
|
|
2813
|
+
var css$X = {"root":"bbSvDK"};
|
|
2807
2814
|
|
|
2808
2815
|
const uuiDatePickerBody = {
|
|
2809
2816
|
wrapper: 'uui-datepicker-body-wrapper',
|
|
@@ -2924,7 +2931,7 @@ function DatePickerComponent(props, ref) {
|
|
|
2924
2931
|
}
|
|
2925
2932
|
const DatePicker = /* @__PURE__ */React__default.forwardRef(DatePickerComponent);
|
|
2926
2933
|
|
|
2927
|
-
var css$W = {"date-input":"
|
|
2934
|
+
var css$W = {"date-input":"GsiXsw","dateInput":"GsiXsw","root":"kiSAPW","separator":"GHS-RA"};
|
|
2928
2935
|
|
|
2929
2936
|
const RangeDatePickerInput = /* @__PURE__ */forwardRef(({ isDisabled, isInvalid, isReadonly, size, disableClear, rawProps, value, inFocus, format, onValueChange, onFocusInput, onBlurInput, onClick, getPlaceholder, filter, onKeyDown, preventEmptyFromDate, preventEmptyToDate, id, cx: classes, }, ref) => {
|
|
2930
2937
|
const [inputValue, setInputValue] = useState(toCustomDateRangeFormat(value, format));
|
|
@@ -2932,10 +2939,15 @@ const RangeDatePickerInput = /* @__PURE__ */forwardRef(({ isDisabled, isInvalid,
|
|
|
2932
2939
|
setInputValue(toCustomDateRangeFormat(value, format));
|
|
2933
2940
|
}, [format, value, setInputValue]);
|
|
2934
2941
|
const onInputChange = (newValue, inputType) => {
|
|
2935
|
-
|
|
2942
|
+
const updatedInputValue = {
|
|
2936
2943
|
...inputValue,
|
|
2937
2944
|
[inputType]: newValue,
|
|
2938
|
-
}
|
|
2945
|
+
};
|
|
2946
|
+
setInputValue(updatedInputValue);
|
|
2947
|
+
const selectedDate = toValueDateRangeFormat(updatedInputValue, format);
|
|
2948
|
+
if (isValidAndInFilter(selectedDate, inputType, filter)) {
|
|
2949
|
+
onValueChange(selectedDate);
|
|
2950
|
+
}
|
|
2939
2951
|
};
|
|
2940
2952
|
const handleFocus = (event, inputType) => {
|
|
2941
2953
|
onFocusInput(event, inputType);
|
|
@@ -2947,20 +2959,20 @@ const RangeDatePickerInput = /* @__PURE__ */forwardRef(({ isDisabled, isInvalid,
|
|
|
2947
2959
|
to: !preventEmptyToDate,
|
|
2948
2960
|
};
|
|
2949
2961
|
const selectedDate = toValueDateRangeFormat(inputValue, format);
|
|
2950
|
-
// If new value is null and input can't be empty, set the value to the last selected value
|
|
2962
|
+
// If the new value is null and the input can't be empty, set the value to the last selected value
|
|
2951
2963
|
if (selectedDate[inputType] === null && !canBeEmpty[inputType]) {
|
|
2952
2964
|
selectedDate[inputType] = value[inputType];
|
|
2953
2965
|
}
|
|
2954
|
-
|
|
2955
|
-
if (isValidRange(selectedDate) && !isDateDisabled) {
|
|
2966
|
+
if (isValidAndInFilter(selectedDate, inputType, filter)) {
|
|
2956
2967
|
setInputValue(toCustomDateRangeFormat(selectedDate, format));
|
|
2957
2968
|
onValueChange(selectedDate);
|
|
2958
2969
|
}
|
|
2959
2970
|
else {
|
|
2971
|
+
const newInputValue = !canBeEmpty[inputType] ? toCustomDateRangeFormat(value, format)[inputType] : null;
|
|
2960
2972
|
const newValue = !canBeEmpty[inputType] ? value[inputType] : null;
|
|
2961
2973
|
setInputValue({
|
|
2962
2974
|
...inputValue,
|
|
2963
|
-
[inputType]:
|
|
2975
|
+
[inputType]: newInputValue,
|
|
2964
2976
|
});
|
|
2965
2977
|
onValueChange({
|
|
2966
2978
|
...selectedDate,
|
|
@@ -2990,7 +3002,7 @@ const RangeDatePickerInput = /* @__PURE__ */forwardRef(({ isDisabled, isInvalid,
|
|
|
2990
3002
|
React__default.createElement(TextInput, { cx: cx$1(css$W.dateInput, inFocus === 'to' && 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 })));
|
|
2991
3003
|
});
|
|
2992
3004
|
|
|
2993
|
-
var css$V = {"root":"
|
|
3005
|
+
var css$V = {"root":"aG6aZL"};
|
|
2994
3006
|
|
|
2995
3007
|
const uuiPresets = {
|
|
2996
3008
|
container: 'uui-presets-container',
|
|
@@ -3010,7 +3022,7 @@ function CalendarPresets(props) {
|
|
|
3010
3022
|
getPresets(props.presets).map((item) => (React.createElement(LinkButton, { key: item.key, caption: item.name, onClick: () => props.onPresetSet(item), size: settings.rangeDatePicker.sizes.preset })))));
|
|
3011
3023
|
}
|
|
3012
3024
|
|
|
3013
|
-
var css$U = {"root":"
|
|
3025
|
+
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"};
|
|
3014
3026
|
|
|
3015
3027
|
const uuiRangeDatePickerBody = {
|
|
3016
3028
|
inRange: 'uui-range-datepicker-in-range',
|
|
@@ -3089,10 +3101,10 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3089
3101
|
const { value: _value, filter } = props;
|
|
3090
3102
|
const { selectedDate: _selectedDate, inFocus, } = _value;
|
|
3091
3103
|
const selectedDate = _selectedDate || defaultRangeValue; // also handles null in comparison to default value
|
|
3092
|
-
const [activeMonth, setActiveMonth] = useState(inFocus);
|
|
3093
3104
|
const [view, setView] = useState('DAY_SELECTION');
|
|
3105
|
+
const [disabledPanel, setDisabledPanel] = useState(null);
|
|
3094
3106
|
const [month, setMonth] = useState(() => {
|
|
3095
|
-
return
|
|
3107
|
+
return getDisplayedMonth(selectedDate, inFocus);
|
|
3096
3108
|
});
|
|
3097
3109
|
const getRange = (newValue) => {
|
|
3098
3110
|
if (!filter || filter(uuiDayjs.dayjs(newValue))) {
|
|
@@ -3104,7 +3116,7 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3104
3116
|
}
|
|
3105
3117
|
}
|
|
3106
3118
|
};
|
|
3107
|
-
const onBodyValueChange = (v
|
|
3119
|
+
const onBodyValueChange = (v) => {
|
|
3108
3120
|
// selectedDate can be null, other params should always have values
|
|
3109
3121
|
const newRange = v ? getRange(v) : selectedDate;
|
|
3110
3122
|
let newInFocus = null;
|
|
@@ -3113,25 +3125,28 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3113
3125
|
if (inFocus === 'from' && fromChanged) {
|
|
3114
3126
|
newInFocus = 'to';
|
|
3115
3127
|
}
|
|
3116
|
-
else if (inFocus === 'to' && toChanged) {
|
|
3128
|
+
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"
|
|
3117
3129
|
newInFocus = 'from';
|
|
3118
3130
|
}
|
|
3119
|
-
setActiveMonth(part);
|
|
3120
3131
|
props.onValueChange({
|
|
3121
3132
|
selectedDate: newRange ? newRange : selectedDate,
|
|
3122
3133
|
inFocus: newInFocus ?? inFocus,
|
|
3123
3134
|
});
|
|
3124
3135
|
};
|
|
3125
3136
|
const renderDay = (renderProps) => {
|
|
3126
|
-
|
|
3137
|
+
const { inRange, isFirst, isLast } = getDayState(renderProps.value, selectedDate);
|
|
3138
|
+
return (React__default.createElement(Day, { ...renderProps, cx: getDayCX({ inRange, isFirst, isLast }), rawProps: {
|
|
3139
|
+
...renderProps.rawProps,
|
|
3140
|
+
'aria-selected': (isFirst || isLast || inRange) ? 'true' : undefined,
|
|
3141
|
+
} }));
|
|
3127
3142
|
};
|
|
3128
3143
|
const from = {
|
|
3129
3144
|
month,
|
|
3130
|
-
view:
|
|
3145
|
+
view: disabledPanel === 'right' ? view : 'DAY_SELECTION',
|
|
3131
3146
|
value: null,
|
|
3132
3147
|
};
|
|
3133
3148
|
const to = {
|
|
3134
|
-
view:
|
|
3149
|
+
view: disabledPanel === 'left' ? view : 'DAY_SELECTION',
|
|
3135
3150
|
month: month.add(1, 'month'),
|
|
3136
3151
|
value: null,
|
|
3137
3152
|
};
|
|
@@ -3141,6 +3156,7 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3141
3156
|
React__default.createElement(CalendarPresets, { onPresetSet: (presetVal) => {
|
|
3142
3157
|
// enable day if smth other were selected
|
|
3143
3158
|
setView('DAY_SELECTION');
|
|
3159
|
+
setDisabledPanel(null);
|
|
3144
3160
|
setMonth(uuiDayjs.dayjs(presetVal.from));
|
|
3145
3161
|
props.onValueChange({
|
|
3146
3162
|
inFocus: props.value.inFocus,
|
|
@@ -3151,25 +3167,44 @@ function RangeDatePickerBodyComp(props, ref) {
|
|
|
3151
3167
|
});
|
|
3152
3168
|
}, presets: presets })));
|
|
3153
3169
|
};
|
|
3154
|
-
|
|
3170
|
+
useLayoutEffectSafeForSsr(() => {
|
|
3171
|
+
const monthToSet = getDisplayedMonth(selectedDate, inFocus);
|
|
3172
|
+
// To avoid re-rendering the body if the current month being displayed is equal to or greater than 1
|
|
3173
|
+
const shouldNotIgnoreUpdate = !(uuiDayjs.dayjs(month).isSame(monthToSet, 'month') || uuiDayjs.dayjs(month).add(1, 'month').isSame(monthToSet, 'month'));
|
|
3174
|
+
if (shouldNotIgnoreUpdate) {
|
|
3175
|
+
setMonth(monthToSet);
|
|
3176
|
+
}
|
|
3177
|
+
}, [selectedDate]);
|
|
3178
|
+
return (React__default.createElement("div", { ref: ref, className: cx(css$U.root, uuiDatePickerBodyBase.container, props.cx), ...props.rawProps, "aria-multiselectable": "true" },
|
|
3155
3179
|
React__default.createElement(FlexRow, { cx: [view === 'DAY_SELECTION' && css$U.daySelection, css$U.container], alignItems: "top" },
|
|
3156
3180
|
React__default.createElement(FlexCell, { width: "auto" },
|
|
3157
3181
|
React__default.createElement(FlexRow, null,
|
|
3158
3182
|
React__default.createElement(FlexRow, { cx: css$U.bodesWrapper, alignItems: "top" },
|
|
3159
|
-
React__default.createElement(StatelessDatePickerBody, { key: "date-picker-body-left", cx: cx(css$U.fromPicker), ...from, onValueChange: (v) => onBodyValueChange(v
|
|
3183
|
+
React__default.createElement(StatelessDatePickerBody, { key: "date-picker-body-left", cx: cx(css$U.fromPicker), ...from, onValueChange: (v) => onBodyValueChange(v), onMonthChange: (m) => {
|
|
3160
3184
|
setMonth(m);
|
|
3161
|
-
}, onViewChange: (v) =>
|
|
3162
|
-
|
|
3185
|
+
}, onViewChange: (v) => {
|
|
3186
|
+
setView(v);
|
|
3187
|
+
setDisabledPanel(v !== 'DAY_SELECTION' ? 'right' : null);
|
|
3188
|
+
}, filter: props.filter, isHoliday: props.isHoliday, renderDay: props.renderDay || renderDay, isDisabled: disabledPanel === 'left' }),
|
|
3189
|
+
React__default.createElement(StatelessDatePickerBody, { key: "date-picker-body-right", cx: cx(css$U.toPicker), ...to, onValueChange: (v) => onBodyValueChange(v), onMonthChange: (m) => {
|
|
3163
3190
|
setMonth(m.subtract(1, 'month'));
|
|
3164
|
-
}, onViewChange: (v) =>
|
|
3191
|
+
}, onViewChange: (v) => {
|
|
3192
|
+
setView(v);
|
|
3193
|
+
setDisabledPanel(v !== 'DAY_SELECTION' ? 'left' : null);
|
|
3194
|
+
}, filter: props.filter, renderDay: props.renderDay || renderDay, isHoliday: props.isHoliday, isDisabled: disabledPanel === 'right' }),
|
|
3165
3195
|
view !== 'DAY_SELECTION' && (React__default.createElement("div", { style: {
|
|
3166
|
-
left:
|
|
3167
|
-
right:
|
|
3196
|
+
left: disabledPanel === 'right' ? '50%' : undefined,
|
|
3197
|
+
right: disabledPanel === 'left' ? '50%' : undefined,
|
|
3168
3198
|
}, className: css$U.blocker }))),
|
|
3169
3199
|
props.presets && renderPresets(props.presets)),
|
|
3170
3200
|
props.renderFooter && props.renderFooter()))));
|
|
3171
3201
|
}
|
|
3172
|
-
const getDayCX = (
|
|
3202
|
+
const getDayCX = ({ inRange, isFirst, isLast }) => {
|
|
3203
|
+
return [
|
|
3204
|
+
cx(inRange && uuiRangeDatePickerBody.inRange, isFirst && uuiRangeDatePickerBody.firstDayInRangeWrapper, !inRange && isFirst && uuiRangeDatePickerBody.lastDayInRangeWrapper, isLast && uuiRangeDatePickerBody.lastDayInRangeWrapper, !inRange && isLast && uuiRangeDatePickerBody.firstDayInRangeWrapper, (isFirst || isLast) && uuiDaySelection.selectedDay),
|
|
3205
|
+
];
|
|
3206
|
+
};
|
|
3207
|
+
const getDayState = (day, selectedDate) => {
|
|
3173
3208
|
const dayValue = day.valueOf();
|
|
3174
3209
|
const fromValue = selectedDate?.from
|
|
3175
3210
|
? uuiDayjs.dayjs(selectedDate.from).valueOf() : null;
|
|
@@ -3182,10 +3217,14 @@ const getDayCX = (day, selectedDate) => {
|
|
|
3182
3217
|
&& fromValue !== toValue;
|
|
3183
3218
|
const isFirst = dayValue === fromValue;
|
|
3184
3219
|
const isLast = dayValue === toValue;
|
|
3185
|
-
return
|
|
3220
|
+
return {
|
|
3221
|
+
inRange,
|
|
3222
|
+
isFirst,
|
|
3223
|
+
isLast,
|
|
3224
|
+
};
|
|
3186
3225
|
};
|
|
3187
3226
|
|
|
3188
|
-
var css$T = {"dropdown-container":"
|
|
3227
|
+
var css$T = {"dropdown-container":"uBQN9c","dropdownContainer":"uBQN9c"};
|
|
3189
3228
|
|
|
3190
3229
|
function RangeDatePickerComponent(props, ref) {
|
|
3191
3230
|
const { value: _value, format = defaultFormat, size = settings.rangeDatePicker.sizes.default } = props;
|
|
@@ -3253,7 +3292,7 @@ function RangeDatePickerComponent(props, ref) {
|
|
|
3253
3292
|
}
|
|
3254
3293
|
const RangeDatePicker = /* @__PURE__ */React__default.forwardRef(RangeDatePickerComponent);
|
|
3255
3294
|
|
|
3256
|
-
var css$S = {"root":"
|
|
3295
|
+
var css$S = {"root":"M0Ddpv","blocker":"HYg-ro","marker":"NsUHDF","top":"_6szlT4","bottom":"sjy1OE","left":"T--QNm","right":"ErrPbF","inside":"BReapR"};
|
|
3257
3296
|
|
|
3258
3297
|
function DropMarker(props) {
|
|
3259
3298
|
return props.isDndInProgress
|
|
@@ -3270,15 +3309,15 @@ function DropMarker(props) {
|
|
|
3270
3309
|
|
|
3271
3310
|
const RichTextView = /* @__PURE__ */withMods(uuiComponents.RichTextView, (mods) => ['uui-typography', `uui-typography-size-${mods.size || settings.richTextView.sizes.default}`]);
|
|
3272
3311
|
|
|
3273
|
-
var css$R = {"search-wrapper":"
|
|
3312
|
+
var css$R = {"search-wrapper":"zLkJ7-","searchWrapper":"zLkJ7-","no-data":"_7022y7","noData":"_7022y7"};
|
|
3274
3313
|
|
|
3275
|
-
var css$Q = {"picker-row":"
|
|
3314
|
+
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"};
|
|
3276
3315
|
|
|
3277
|
-
var css$P = {"root":"
|
|
3316
|
+
var css$P = {"root":"pKMwAQ"};
|
|
3278
3317
|
|
|
3279
3318
|
const AvatarStack = /* @__PURE__ */withMods(AvatarStack$1, () => [css$P.root]);
|
|
3280
3319
|
|
|
3281
|
-
var css$O = {"root":"
|
|
3320
|
+
var css$O = {"root":"GTWyHr"};
|
|
3282
3321
|
|
|
3283
3322
|
const DEFAULT_FILL = 'solid';
|
|
3284
3323
|
function applyBadgeMods(mods) {
|
|
@@ -3306,7 +3345,7 @@ const Badge = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
|
3306
3345
|
props.isDropdown && (React__default.createElement(IconContainer, { icon: DropdownIcon, flipY: props.isOpen }))));
|
|
3307
3346
|
});
|
|
3308
3347
|
|
|
3309
|
-
var css$N = {"root":"
|
|
3348
|
+
var css$N = {"root":"fICQyy"};
|
|
3310
3349
|
|
|
3311
3350
|
function applyTagMods(props) {
|
|
3312
3351
|
return [
|
|
@@ -3334,7 +3373,7 @@ const Tag = /* @__PURE__ */React__default.forwardRef((props, ref) => {
|
|
|
3334
3373
|
props.onClear && !props.isDisabled && (React__default.createElement(IconContainer, { cx: uuiMarkers.clickable, icon: ClearIcon, onClick: props.onClear }))));
|
|
3335
3374
|
});
|
|
3336
3375
|
|
|
3337
|
-
var css$M = {"root":"
|
|
3376
|
+
var css$M = {"root":"syAz-F","page":"Z6AZYc","spacer":"_4uT9Qr","mode-ghost":"tYmAfG","modeGhost":"tYmAfG"};
|
|
3338
3377
|
|
|
3339
3378
|
function Paginator(props) {
|
|
3340
3379
|
const renderPaginator = (params) => (React__default.createElement("nav", { role: "navigation", className: cx(css$M.root, 'uui-paginator', `uui-size-${props.size || settings.paginator.sizes.default}`), ...params.rawProps },
|
|
@@ -3351,14 +3390,14 @@ function Paginator(props) {
|
|
|
3351
3390
|
return React__default.createElement(Paginator$1, { ...props, render: renderPaginator });
|
|
3352
3391
|
}
|
|
3353
3392
|
|
|
3354
|
-
var css$L = {"root":"
|
|
3393
|
+
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"};
|
|
3355
3394
|
|
|
3356
3395
|
const IndeterminateBar = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
3357
3396
|
return (React.createElement("div", { ref: ref, className: cx('uui-indeterminate_bar', props.cx, css$L.root, css$L[`size-${props.size || 12}`]) },
|
|
3358
3397
|
React.createElement("div", { className: cx(css$L.progressBar) })));
|
|
3359
3398
|
});
|
|
3360
3399
|
|
|
3361
|
-
var css$K = {"root":"
|
|
3400
|
+
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"};
|
|
3362
3401
|
|
|
3363
3402
|
const DEFAULT_SIZE = '12';
|
|
3364
3403
|
function applyProgressBarMods(mods) {
|
|
@@ -3373,14 +3412,14 @@ const ProgressBar = /* @__PURE__ */withMods(uuiComponents.ProgressBar, applyProg
|
|
|
3373
3412
|
hideLabel: props.hideLabel || props.striped,
|
|
3374
3413
|
}));
|
|
3375
3414
|
|
|
3376
|
-
var css$J = {"root":"
|
|
3415
|
+
var css$J = {"root":"QpCsO4"};
|
|
3377
3416
|
|
|
3378
3417
|
const IndicatorBar = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
3379
3418
|
const { progress } = props;
|
|
3380
3419
|
return progress || progress === 0 ? (React.createElement(ProgressBar, { ref: ref, progress: progress, cx: cx(css$J.root, props.cx), hideLabel: true })) : (React.createElement(IndeterminateBar, { ref: ref, cx: cx(css$J.root, props.cx) }));
|
|
3381
3420
|
});
|
|
3382
3421
|
|
|
3383
|
-
var css$I = {"root":"
|
|
3422
|
+
var css$I = {"root":"k0MxET"};
|
|
3384
3423
|
|
|
3385
3424
|
const StatusIndicator = /* @__PURE__ */forwardRef((props, ref) => {
|
|
3386
3425
|
return (React__default.createElement("div", { ref: ref, className: cx([
|
|
@@ -3395,7 +3434,7 @@ const StatusIndicator = /* @__PURE__ */forwardRef((props, ref) => {
|
|
|
3395
3434
|
React__default.createElement("p", { className: "uui-status_indicator-caption" }, props.caption)));
|
|
3396
3435
|
});
|
|
3397
3436
|
|
|
3398
|
-
var css$H = {"drag-handle":"
|
|
3437
|
+
var css$H = {"drag-handle-wrapper":"cXRZfe","dragHandleWrapper":"cXRZfe","with-indent":"_2nvwIJ","withIndent":"_2nvwIJ","drag-handle":"-qdXtz","dragHandle":"-qdXtz","icon-container":"dcKp0w","iconContainer":"dcKp0w"};
|
|
3399
3438
|
|
|
3400
3439
|
function DataRowAddons(props) {
|
|
3401
3440
|
const row = props.rowProps;
|
|
@@ -3406,7 +3445,8 @@ function DataRowAddons(props) {
|
|
|
3406
3445
|
return settings.dataTable.sizes.body.indentWidthMap[props.size || settings.dataTable.sizes.body.row];
|
|
3407
3446
|
};
|
|
3408
3447
|
return (React__default.createElement(React__default.Fragment, null,
|
|
3409
|
-
row.dnd?.srcData && React__default.createElement(
|
|
3448
|
+
row.dnd?.srcData && (React__default.createElement("div", { key: "dh", className: cx(css$H.dragHandleWrapper, row.indent > 0 && css$H.withIndent), style: { width: row.indent > 0 ? (getIndent() + getWidth()) : 0 }, ...props.eventHandlers },
|
|
3449
|
+
React__default.createElement(DragHandle, { cx: css$H.dragHandle }))),
|
|
3410
3450
|
row?.checkbox?.isVisible && (React__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 })),
|
|
3411
3451
|
row.indent > 0 && (React__default.createElement("div", { key: "fold", className: cx('uui-dr_addons-indent', `uui-size-${props.size || settings.dataTable.sizes.body.row}`), style: { marginInlineStart: getIndent(), width: getWidth() } }, row.isFoldable && (React__default.createElement(IconContainer, { rawProps: {
|
|
3412
3452
|
'aria-label': row.isFolded ? 'Unfold' : 'Fold',
|
|
@@ -3481,7 +3521,7 @@ const getHighlightedSearchMatches = (str, search) => {
|
|
|
3481
3521
|
return getDecoratedText(str, ranges);
|
|
3482
3522
|
};
|
|
3483
3523
|
|
|
3484
|
-
var css$G = {"root":"
|
|
3524
|
+
var css$G = {"root":"_-01Pr-","column-gap":"_0UleJC","columnGap":"_0UleJC","title":"TObxj2","subtitle":"aUw96Y","disabled":"zJpgJ7","multiline":"CMtVMR"};
|
|
3485
3525
|
|
|
3486
3526
|
function PickerItem(props) {
|
|
3487
3527
|
const { highlightSearchMatches = true, size, avatarUrl, isLoading, isDisabled, icon, } = props;
|
|
@@ -3504,6 +3544,9 @@ function getAvatarSize(size, isMultiline) {
|
|
|
3504
3544
|
|
|
3505
3545
|
function DataPickerRow(props) {
|
|
3506
3546
|
const rowNode = React.useRef(null);
|
|
3547
|
+
const handleMouseEnter = useCallback(() => {
|
|
3548
|
+
props.onFocus && props.onFocus(props.index);
|
|
3549
|
+
}, [props.onFocus, props.index]);
|
|
3507
3550
|
React.useEffect(() => {
|
|
3508
3551
|
if (props.onFocus) {
|
|
3509
3552
|
rowNode.current?.addEventListener('mouseenter', handleMouseEnter);
|
|
@@ -3511,10 +3554,7 @@ function DataPickerRow(props) {
|
|
|
3511
3554
|
return () => {
|
|
3512
3555
|
rowNode.current?.removeEventListener('mouseenter', handleMouseEnter);
|
|
3513
3556
|
};
|
|
3514
|
-
}, [props.onFocus]);
|
|
3515
|
-
const handleMouseEnter = () => {
|
|
3516
|
-
props.onFocus && props.onFocus(props.index);
|
|
3517
|
-
};
|
|
3557
|
+
}, [props.onFocus, handleMouseEnter]);
|
|
3518
3558
|
const getSubtitle = ({ path }) => {
|
|
3519
3559
|
if (!props.dataSourceState?.search)
|
|
3520
3560
|
return;
|
|
@@ -3626,6 +3666,7 @@ function DataPickerBody({ highlightSearchMatches = true, ...props }) {
|
|
|
3626
3666
|
? renderEmpty() : (React__default.createElement(VirtualList, { value: props.value, onValueChange: props.onValueChange, rows: renderedDataRows, rawProps: {
|
|
3627
3667
|
'aria-multiselectable': props.selectionMode === 'multi' ? true : null,
|
|
3628
3668
|
'aria-orientation': 'vertical',
|
|
3669
|
+
tabIndex: -1,
|
|
3629
3670
|
...props.rawProps,
|
|
3630
3671
|
}, rowsCount: props.rowsCount, isLoading: props.isReloading, renderBlocker: settings.pickerInput.renderBlocker })))));
|
|
3631
3672
|
}
|
|
@@ -3654,7 +3695,7 @@ function DataPickerFooterImpl(props) {
|
|
|
3654
3695
|
}
|
|
3655
3696
|
const DataPickerFooter = /* @__PURE__ */React__default.memo(DataPickerFooterImpl);
|
|
3656
3697
|
|
|
3657
|
-
var css$F = {"header":"
|
|
3698
|
+
var css$F = {"header":"jPZdqS","title":"al4-Uc","close":"nkM7P1"};
|
|
3658
3699
|
|
|
3659
3700
|
const DataPickerMobileHeaderImpl = (props) => {
|
|
3660
3701
|
const title = props.title && typeof props.title === 'string' ? props.title.charAt(0).toUpperCase() + props.title.slice(1) : '';
|
|
@@ -3664,7 +3705,7 @@ const DataPickerMobileHeaderImpl = (props) => {
|
|
|
3664
3705
|
};
|
|
3665
3706
|
const DataPickerMobileHeader = /* @__PURE__ */React__default.memo(DataPickerMobileHeaderImpl);
|
|
3666
3707
|
|
|
3667
|
-
var css$E = {"done":"
|
|
3708
|
+
var css$E = {"done":"pNgBB-","container":"eTofk2"};
|
|
3668
3709
|
|
|
3669
3710
|
const PickerBodyMobileView = (props) => {
|
|
3670
3711
|
const isMobileView = isMobile();
|
|
@@ -3676,7 +3717,7 @@ const PickerBodyMobileView = (props) => {
|
|
|
3676
3717
|
isMobileView && (React__default.createElement(LinkButton, { caption: i18n.pickerInput.doneButton, onClick: () => props.onClose?.(), cx: css$E.done, size: settings.pickerInput.sizes.body.mobileFooterLinkButton }))));
|
|
3677
3718
|
};
|
|
3678
3719
|
|
|
3679
|
-
var css$D = {"sub-header-wrapper":"
|
|
3720
|
+
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"};
|
|
3680
3721
|
|
|
3681
3722
|
function PickerModal(props) {
|
|
3682
3723
|
const { view, selection, dataSourceStateLens, dataSourceState, getName, clearSelection, getRows, getListProps, getFooterProps, isSingleSelect, handleDataSourceValueChange, } = usePickerModal(props);
|
|
@@ -3700,6 +3741,7 @@ function PickerModal(props) {
|
|
|
3700
3741
|
React__default.createElement(Text, { cx: css$D.noFoundModalContainerText, fontSize: "12", lineHeight: "18", color: "primary" }, i18n.dataPickerBody.noRecordsSubTitle)));
|
|
3701
3742
|
};
|
|
3702
3743
|
const dataRows = getRows();
|
|
3744
|
+
const isSearching = dataSourceState.search && dataSourceState.search.length > 0;
|
|
3703
3745
|
return (React__default.createElement(ModalBlocker, { ...props },
|
|
3704
3746
|
React__default.createElement(ModalWindow, { width: 600, height: 700, cx: css$D.body },
|
|
3705
3747
|
React__default.createElement(ModalHeader, { title: props.caption || i18n.pickerModal.headerTitle, onClose: () => props.abort() }),
|
|
@@ -3712,13 +3754,13 @@ function PickerModal(props) {
|
|
|
3712
3754
|
rows: dataRows,
|
|
3713
3755
|
searchPosition: 'body',
|
|
3714
3756
|
}, e), autoFocus: true, placeholder: i18n.pickerModal.searchPlaceholder, rawProps: { dir: 'auto' } })),
|
|
3715
|
-
!isSingleSelect() && (React__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" })),
|
|
3757
|
+
!isSingleSelect() && (React__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" })),
|
|
3716
3758
|
props.renderFilter && React__default.createElement(FlexCell, { grow: 2 }, props.renderFilter(dataSourceStateLens.prop('filter').toProps()))),
|
|
3717
3759
|
React__default.createElement(DataPickerBody, { ...getListProps(), value: dataSourceState, onValueChange: handleDataSourceValueChange, showSearch: false, getName: getName, rows: dataRows, renderRow: renderRow, renderEmpty: renderNotFound, size: settings.pickerInput.sizes.body.row }),
|
|
3718
3760
|
React__default.createElement(ModalFooter, null, props.renderFooter ? props.renderFooter(getFooterProps()) : renderFooter()))));
|
|
3719
3761
|
}
|
|
3720
3762
|
|
|
3721
|
-
var css$C = {"tooltip":"
|
|
3763
|
+
var css$C = {"tooltip":"eoabab"};
|
|
3722
3764
|
|
|
3723
3765
|
const PickerTogglerTag = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
3724
3766
|
const tagProps = {
|
|
@@ -3737,7 +3779,7 @@ const PickerTogglerTag = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
3737
3779
|
}
|
|
3738
3780
|
});
|
|
3739
3781
|
|
|
3740
|
-
var css$B = {"root":"
|
|
3782
|
+
var css$B = {"root":"Rrzzff"};
|
|
3741
3783
|
|
|
3742
3784
|
const defaultMode = EditMode.FORM;
|
|
3743
3785
|
function applyPickerTogglerMods(mods) {
|
|
@@ -3819,7 +3861,7 @@ function PickerInputComponent(props, ref) {
|
|
|
3819
3861
|
}
|
|
3820
3862
|
const PickerInput = /* @__PURE__ */React__default.forwardRef(PickerInputComponent);
|
|
3821
3863
|
|
|
3822
|
-
var css$A = {"row":"
|
|
3864
|
+
var css$A = {"row":"l0lC-Q"};
|
|
3823
3865
|
|
|
3824
3866
|
function PickerListRow(props) {
|
|
3825
3867
|
let label;
|
|
@@ -3839,7 +3881,7 @@ function PickerListRow(props) {
|
|
|
3839
3881
|
return (React__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));
|
|
3840
3882
|
}
|
|
3841
3883
|
|
|
3842
|
-
var css$z = {"root":"
|
|
3884
|
+
var css$z = {"root":"Fsqj8t"};
|
|
3843
3885
|
|
|
3844
3886
|
function PickerList(props) {
|
|
3845
3887
|
const { context, view, onlySelectedView, getName, getEntityName, appendLastSelected, getSelectedIdsArray, buildRowsList, getMaxDefaultItems, getModalTogglerCaption, } = usePickerList(props);
|
|
@@ -3874,7 +3916,7 @@ function PickerList(props) {
|
|
|
3874
3916
|
}, selectedRows)));
|
|
3875
3917
|
}
|
|
3876
3918
|
|
|
3877
|
-
var css$y = {"root":"
|
|
3919
|
+
var css$y = {"root":"_08YOU7","wrapper":"imbolo","align-widgets-top":"AqAHVp","alignWidgetsTop":"AqAHVp","align-widgets-center":"paIvaX","alignWidgetsCenter":"paIvaX"};
|
|
3878
3920
|
|
|
3879
3921
|
function DataTableCell(initialProps) {
|
|
3880
3922
|
const props = { ...initialProps };
|
|
@@ -3924,7 +3966,7 @@ function DataTableCell(initialProps) {
|
|
|
3924
3966
|
return React.createElement(DataTableCell$1, { ...props });
|
|
3925
3967
|
}
|
|
3926
3968
|
|
|
3927
|
-
var css$x = {"root":"
|
|
3969
|
+
var css$x = {"root":"d2xvZ7"};
|
|
3928
3970
|
|
|
3929
3971
|
// Here we define a single instance of the renderCell function to make DataTableRow#shouldComponentUpdate work.
|
|
3930
3972
|
// 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.
|
|
@@ -3940,7 +3982,7 @@ const DataTableRow = /* @__PURE__ */withMods(DataTableRow$1, ({ borderBottom = t
|
|
|
3940
3982
|
];
|
|
3941
3983
|
}, () => propsMods);
|
|
3942
3984
|
|
|
3943
|
-
var css$w = {"sorting-panel-container":"
|
|
3985
|
+
var css$w = {"sorting-panel-container":"QeYb2b","sortingPanelContainer":"QeYb2b"};
|
|
3944
3986
|
|
|
3945
3987
|
const SortingPanelImpl = ({ sortDirection, onSort }) => {
|
|
3946
3988
|
const sortAsc = useCallback(() => onSort(sortDirection === 'asc' ? undefined : 'asc'), [onSort]);
|
|
@@ -3960,7 +4002,7 @@ const ColumnHeaderDropdownImpl = (props) => {
|
|
|
3960
4002
|
};
|
|
3961
4003
|
const ColumnHeaderDropdown = /* @__PURE__ */React__default.memo(ColumnHeaderDropdownImpl);
|
|
3962
4004
|
|
|
3963
|
-
var css$v = {"root":"
|
|
4005
|
+
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-"};
|
|
3964
4006
|
|
|
3965
4007
|
class DataTableHeaderCell extends React.Component {
|
|
3966
4008
|
constructor() {
|
|
@@ -4054,7 +4096,7 @@ class DataTableHeaderCell extends React.Component {
|
|
|
4054
4096
|
}
|
|
4055
4097
|
}
|
|
4056
4098
|
|
|
4057
|
-
var css$u = {"root":"
|
|
4099
|
+
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"};
|
|
4058
4100
|
|
|
4059
4101
|
class DataTableHeaderGroupCell extends React.Component {
|
|
4060
4102
|
constructor() {
|
|
@@ -4094,7 +4136,7 @@ class DataTableHeaderGroupCell extends React.Component {
|
|
|
4094
4136
|
}
|
|
4095
4137
|
}
|
|
4096
4138
|
|
|
4097
|
-
var css$t = {"root":"
|
|
4139
|
+
var css$t = {"root":"dvZkYS"};
|
|
4098
4140
|
|
|
4099
4141
|
const DataTableHeaderRow = /* @__PURE__ */withMods(DataTableHeaderRow$1, () => [css$t.root, 'uui-dt-vars'], (mods) => ({
|
|
4100
4142
|
renderCell: (props) => (React.createElement(DataTableHeaderCell, { ...props, size: mods.size, textCase: mods.textCase || 'normal', key: props.column.key, columnsGap: mods.columnsGap })),
|
|
@@ -4102,6 +4144,85 @@ const DataTableHeaderRow = /* @__PURE__ */withMods(DataTableHeaderRow$1, () => [
|
|
|
4102
4144
|
renderConfigButton: () => (React.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 })),
|
|
4103
4145
|
}));
|
|
4104
4146
|
|
|
4147
|
+
const normalizeFilterWithPredicates = (filter) => {
|
|
4148
|
+
if (!filter) {
|
|
4149
|
+
return {};
|
|
4150
|
+
}
|
|
4151
|
+
const result = filter;
|
|
4152
|
+
const keys = Object.keys(filter);
|
|
4153
|
+
for (let n = 0; n < keys.length; n++) {
|
|
4154
|
+
const key = keys[n];
|
|
4155
|
+
const filterValue = filter[key];
|
|
4156
|
+
if (filterValue && typeof filterValue === 'object') {
|
|
4157
|
+
if (Object.keys(filterValue).length === 0) {
|
|
4158
|
+
delete filter[key];
|
|
4159
|
+
continue;
|
|
4160
|
+
}
|
|
4161
|
+
if ('from' in filterValue && 'to' in filterValue) {
|
|
4162
|
+
continue;
|
|
4163
|
+
}
|
|
4164
|
+
if ('in' in filterValue && (!Array.isArray(filterValue.in) || !filterValue.in.length)) {
|
|
4165
|
+
delete filter[key];
|
|
4166
|
+
}
|
|
4167
|
+
if ('nin' in filterValue && (!Array.isArray(filterValue.nin) || !filterValue.nin.length)) {
|
|
4168
|
+
delete filter[key];
|
|
4169
|
+
}
|
|
4170
|
+
if ('inRange' in filterValue) {
|
|
4171
|
+
if (!filterValue.inRange || (!filterValue.inRange.from && !filterValue.inRange.to)) {
|
|
4172
|
+
delete filter[key];
|
|
4173
|
+
}
|
|
4174
|
+
}
|
|
4175
|
+
if ('notInRange' in filterValue) {
|
|
4176
|
+
if (!filterValue.notInRange || (!filterValue.notInRange.from && !filterValue.notInRange.to)) {
|
|
4177
|
+
delete filter[key];
|
|
4178
|
+
}
|
|
4179
|
+
}
|
|
4180
|
+
Object.keys(filterValue).forEach((predicate) => {
|
|
4181
|
+
if (filterValue[predicate] === null || filterValue[predicate] === undefined) {
|
|
4182
|
+
delete filter[key];
|
|
4183
|
+
}
|
|
4184
|
+
});
|
|
4185
|
+
}
|
|
4186
|
+
}
|
|
4187
|
+
return result;
|
|
4188
|
+
};
|
|
4189
|
+
const getValue = (predicate, value) => predicate ? value?.[predicate] : value;
|
|
4190
|
+
|
|
4191
|
+
function FilterPredicatePanel(props) {
|
|
4192
|
+
if (!props.predicates)
|
|
4193
|
+
return null;
|
|
4194
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
4195
|
+
useEffect(() => {
|
|
4196
|
+
// This effect needs when the filter dropdown was closed and opened again
|
|
4197
|
+
if (props.predicates && props.value && Object.keys(props.value).length > 0) {
|
|
4198
|
+
const predicateFromValue = Object.keys(props.value)[0];
|
|
4199
|
+
if (predicateFromValue !== props.predicate) {
|
|
4200
|
+
props.setPredicate(predicateFromValue);
|
|
4201
|
+
}
|
|
4202
|
+
}
|
|
4203
|
+
}, [props.value]);
|
|
4204
|
+
const changePredicate = (val) => {
|
|
4205
|
+
const isInRange = (p) => p === 'inRange' || p === 'notInRange';
|
|
4206
|
+
if (props.type === 'numeric') {
|
|
4207
|
+
let predicateValue = { [val]: getValue(props.predicate, props.value) };
|
|
4208
|
+
if (isInRange(val) && !isInRange(props.predicate)) {
|
|
4209
|
+
// from simple predicate -> to Range
|
|
4210
|
+
predicateValue = { [val]: { from: null, to: null } };
|
|
4211
|
+
}
|
|
4212
|
+
else if (!isInRange(val) && isInRange(props.predicate)) {
|
|
4213
|
+
// from Range -> to simple predicate
|
|
4214
|
+
predicateValue = { [val]: null };
|
|
4215
|
+
}
|
|
4216
|
+
props.onValueChange(predicateValue);
|
|
4217
|
+
}
|
|
4218
|
+
else {
|
|
4219
|
+
props.onValueChange({ [val]: getValue(props.predicate, props.value) });
|
|
4220
|
+
}
|
|
4221
|
+
props.setPredicate(val);
|
|
4222
|
+
};
|
|
4223
|
+
return (React__default.createElement(MultiSwitch, { items: props.predicates?.map((i) => ({ id: i.predicate, caption: i.name })), value: props.predicate, onValueChange: changePredicate, size: settings.filtersPanel.sizes.pickerBodyMultiSwitch }));
|
|
4224
|
+
}
|
|
4225
|
+
|
|
4105
4226
|
const UUI_FILTERS_PANEL_ADD_BUTTON = 'uui-filters-panel-add-button';
|
|
4106
4227
|
const UUI_FILTERS_PANEL_ADD_BUTTON_BODY = 'uui-filters-panel-add-button-body';
|
|
4107
4228
|
const UUI_FILTERS_PANEL_ITEM_BODY = 'uui-filters-panel-item-body';
|
|
@@ -4111,315 +4232,647 @@ const UUI_FILTERS_PANEL_ITEM_TOGGLER_SELECTION = 'uui-filters-panel-item-toggler
|
|
|
4111
4232
|
const UUI_FILTERS_PANEL_ITEM_TOGGLER_POSTFIX = 'uui-filters-panel-item-toggler-postfix';
|
|
4112
4233
|
const UUI_FILTERS_PANEL_BODY_FOOTER = 'uui-filters-panel-item-footer';
|
|
4113
4234
|
|
|
4114
|
-
var css$s = {"
|
|
4235
|
+
var css$s = {"body":"LSc8Q3","header":"Nuwfs-","title":"gySx8A","removeButton":"RyTt9M","with-search":"pnhTP-","withSearch":"pnhTP-"};
|
|
4115
4236
|
|
|
4116
|
-
|
|
4117
|
-
const
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
!isEventTargetInsideClickable(e) && props.onClick?.();
|
|
4122
|
-
};
|
|
4123
|
-
const onKeyDownHandler = (e) => {
|
|
4124
|
-
if (props.isDisabled)
|
|
4125
|
-
return;
|
|
4126
|
-
if (e.key === 'Enter' && !props.isOpen) {
|
|
4127
|
-
e.preventDefault();
|
|
4128
|
-
props.toggleDropdownOpening(true);
|
|
4237
|
+
function FilterColumnBody(props) {
|
|
4238
|
+
const [predicate, setPredicate] = useState(getDefaultPredicate(props.predicates, props.value));
|
|
4239
|
+
const onValueChange = (value) => {
|
|
4240
|
+
if (props.predicates) {
|
|
4241
|
+
props.onValueChange({ [predicate]: value });
|
|
4129
4242
|
}
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
props.toggleDropdownOpening(false);
|
|
4243
|
+
else {
|
|
4244
|
+
props.onValueChange(value);
|
|
4133
4245
|
}
|
|
4134
4246
|
};
|
|
4135
|
-
const
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
getSelectionText(),
|
|
4144
|
-
props.postfix && (React.createElement("div", { className: cx(css$s.postfix, UUI_FILTERS_PANEL_ITEM_TOGGLER_POSTFIX) }, props.postfix))))),
|
|
4145
|
-
!props.isDisabled && React.createElement(IconContainer, { icon: settings.filtersPanel.icons.itemDropdownIcon, flipY: props.isOpen, cx: "uui-icon-dropdown" })));
|
|
4146
|
-
});
|
|
4147
|
-
|
|
4148
|
-
const pickerHeight = 300;
|
|
4149
|
-
function FilterPickerBody({ highlightSearchMatches = true, ...restProps }) {
|
|
4150
|
-
const props = { ...restProps, highlightSearchMatches };
|
|
4151
|
-
const [dsState, setDsState] = useState({
|
|
4152
|
-
focusedIndex: 0,
|
|
4153
|
-
topIndex: 0,
|
|
4154
|
-
visibleCount: 20,
|
|
4155
|
-
checked: [],
|
|
4156
|
-
});
|
|
4157
|
-
const { showSelected, setShowSelected } = useShowSelected({ dataSourceState: dsState });
|
|
4158
|
-
const { view, getName, dataSourceState, getListProps, handleDataSourceValueChange, clearSelection, } = usePickerApi({ ...props, dataSourceState: dsState, setDataSourceState: setDsState, showSelectedOnly: showSelected });
|
|
4159
|
-
const prevValue = usePrevious(props.value);
|
|
4160
|
-
const prevOpened = usePrevious(props.isOpen);
|
|
4161
|
-
React.useLayoutEffect(() => {
|
|
4162
|
-
if (prevOpened === props.isOpen && props.isOpen
|
|
4163
|
-
&& prevValue !== props.value && props.value !== props.emptyValue
|
|
4164
|
-
&& props.selectionMode === 'single') {
|
|
4165
|
-
props.onClose();
|
|
4166
|
-
}
|
|
4167
|
-
}, [props.value]);
|
|
4168
|
-
const renderFooter = () => {
|
|
4169
|
-
const footerProps = {
|
|
4170
|
-
view,
|
|
4171
|
-
showSelected: {
|
|
4172
|
-
value: showSelected,
|
|
4173
|
-
onValueChange: setShowSelected,
|
|
4174
|
-
},
|
|
4175
|
-
clearSelection,
|
|
4176
|
-
selectionMode: props.selectionMode,
|
|
4177
|
-
selection: props.value,
|
|
4178
|
-
search: dataSourceState.search,
|
|
4247
|
+
const renderHeader = () => {
|
|
4248
|
+
const panelProps = {
|
|
4249
|
+
predicates: props.predicates,
|
|
4250
|
+
predicate,
|
|
4251
|
+
type: props.type,
|
|
4252
|
+
onValueChange: props.onValueChange,
|
|
4253
|
+
value: props.value,
|
|
4254
|
+
setPredicate,
|
|
4179
4255
|
};
|
|
4180
|
-
return props.
|
|
4181
|
-
|
|
4182
|
-
: React.createElement(DataPickerFooter, { ...footerProps, cx: UUI_FILTERS_PANEL_BODY_FOOTER, size: settings.pickerInput.sizes.body.row });
|
|
4183
|
-
};
|
|
4184
|
-
const renderBody = () => {
|
|
4185
|
-
const rows = view.getVisibleRows();
|
|
4186
|
-
const maxHeight = isMobile() ? document.documentElement.clientHeight : props.maxBodyHeight || pickerHeight;
|
|
4187
|
-
const maxWidth = isMobile() ? undefined : 360;
|
|
4188
|
-
const onKeyDown = (e) => handleDataSourceKeyboard({
|
|
4189
|
-
value: dataSourceState,
|
|
4190
|
-
onValueChange: handleDataSourceValueChange,
|
|
4191
|
-
listView: view,
|
|
4192
|
-
searchPosition: 'body',
|
|
4193
|
-
rows,
|
|
4194
|
-
}, e);
|
|
4195
|
-
return (React.createElement(React.Fragment, null,
|
|
4196
|
-
React.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 }),
|
|
4197
|
-
renderFooter()));
|
|
4256
|
+
return props.predicates?.length > 0 && (React__default.createElement("div", { className: css$s.header },
|
|
4257
|
+
React__default.createElement(FilterPredicatePanel, { ...panelProps })));
|
|
4198
4258
|
};
|
|
4199
|
-
return
|
|
4259
|
+
return (React__default.createElement(DropdownContainer, { style: { minWidth: '360px' }, cx: [css$s.body, UUI_FILTERS_PANEL_ITEM_BODY], ...props },
|
|
4260
|
+
renderHeader(),
|
|
4261
|
+
React__default.createElement(FilterItemBody, { ...props, selectedPredicate: predicate, value: getValue(predicate, props.value), onValueChange: onValueChange })));
|
|
4200
4262
|
}
|
|
4201
4263
|
|
|
4202
|
-
const
|
|
4203
|
-
function
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4264
|
+
const useColumnsWithFilters = (initialColumns, filters) => {
|
|
4265
|
+
const makeFilterRenderCallback = useCallback((key) => function (filterLens, dropdownProps) {
|
|
4266
|
+
const filter = filters?.find((f) => f.columnKey === key);
|
|
4267
|
+
if (!filter)
|
|
4268
|
+
return null;
|
|
4269
|
+
const props = filterLens
|
|
4270
|
+
.onChange((oldFilter, newFilter) => normalizeFilterWithPredicates(newFilter))
|
|
4271
|
+
.prop(filter.field)
|
|
4272
|
+
.toProps();
|
|
4273
|
+
return React__default.createElement(FilterColumnBody, { ...props, ...filter, ...dropdownProps });
|
|
4274
|
+
}, [filters]);
|
|
4275
|
+
const columns = useMemo(() => {
|
|
4276
|
+
if (filters) {
|
|
4277
|
+
const filterKeys = filters.map((f) => f.columnKey);
|
|
4278
|
+
const newColumns = (initialColumns.map((column) => {
|
|
4279
|
+
if (filterKeys.includes(column.key)) {
|
|
4280
|
+
return {
|
|
4281
|
+
...column,
|
|
4282
|
+
renderFilter: makeFilterRenderCallback(column.key),
|
|
4283
|
+
};
|
|
4284
|
+
}
|
|
4285
|
+
else {
|
|
4286
|
+
return column;
|
|
4287
|
+
}
|
|
4288
|
+
}));
|
|
4289
|
+
return newColumns;
|
|
4290
|
+
}
|
|
4291
|
+
return initialColumns;
|
|
4292
|
+
}, [filters, initialColumns]);
|
|
4293
|
+
return columns;
|
|
4294
|
+
};
|
|
4210
4295
|
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
const
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4296
|
+
var css$r = {"unpin-icon":"PgNXu7","unpinIcon":"PgNXu7","pin-toggler-icon":"gEjRnd","pinTogglerIcon":"gEjRnd"};
|
|
4297
|
+
|
|
4298
|
+
function PinIconButton(props) {
|
|
4299
|
+
const i18nLocal = i18n.tables.columnsConfigurationModal;
|
|
4300
|
+
const { onTogglePin, pinPosition, canUnpin, } = props;
|
|
4301
|
+
const isPinned = !!pinPosition;
|
|
4302
|
+
const isPinnedAlways = isPinned && !canUnpin;
|
|
4303
|
+
let pinUnpinNode;
|
|
4304
|
+
if (isPinned) {
|
|
4305
|
+
const unpinIcon = getUnpinIcon({ isPinnedAlways, pinPosition });
|
|
4306
|
+
const iconTooltip = isPinnedAlways ? i18nLocal.lockedColumnPinButton : i18nLocal.unPinColumnButton;
|
|
4307
|
+
const unpinClickHandler = isPinnedAlways ? undefined : () => onTogglePin(undefined);
|
|
4308
|
+
pinUnpinNode = (React.createElement(Tooltip, { content: iconTooltip, placement: "bottom", color: "inverted" },
|
|
4309
|
+
React.createElement(IconButton, { cx: cx$1(!isPinnedAlways && css$r.unpinIcon, css$r.pinTogglerIcon), icon: unpinIcon, onClick: unpinClickHandler, isDisabled: isPinnedAlways, color: "primary" })));
|
|
4310
|
+
}
|
|
4311
|
+
else {
|
|
4312
|
+
pinUnpinNode = (React.createElement(React.Fragment, null,
|
|
4313
|
+
React.createElement(Tooltip, { content: i18nLocal.pinColumnToTheLeftButton, placement: "bottom", color: "inverted" },
|
|
4314
|
+
React.createElement(IconButton, { cx: css$r.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon, onClick: () => onTogglePin('left'), isDisabled: isPinnedAlways })),
|
|
4315
|
+
React.createElement(Tooltip, { content: i18nLocal.pinColumnToTheRightButton, placement: "bottom", color: "inverted" },
|
|
4316
|
+
React.createElement(IconButton, { cx: css$r.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinRightIcon, onClick: () => onTogglePin('right'), isDisabled: isPinnedAlways }))));
|
|
4317
|
+
}
|
|
4318
|
+
return pinUnpinNode;
|
|
4319
|
+
}
|
|
4320
|
+
function getUnpinIcon(params) {
|
|
4321
|
+
const { isPinnedAlways, pinPosition } = params;
|
|
4322
|
+
if (isPinnedAlways) {
|
|
4323
|
+
return settings.dataTable.icons.columnsConfigurationModal.lockIcon;
|
|
4324
|
+
}
|
|
4325
|
+
switch (pinPosition) {
|
|
4326
|
+
case 'left': {
|
|
4327
|
+
return settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon;
|
|
4219
4328
|
}
|
|
4220
|
-
|
|
4221
|
-
|
|
4329
|
+
case 'right': {
|
|
4330
|
+
return settings.dataTable.icons.columnsConfigurationModal.pinRightIcon;
|
|
4222
4331
|
}
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
if (newValue && value !== newValue) {
|
|
4226
|
-
handleValueChange(newValue);
|
|
4332
|
+
default: {
|
|
4333
|
+
return;
|
|
4227
4334
|
}
|
|
4228
|
-
};
|
|
4229
|
-
function renderFooter() {
|
|
4230
|
-
const footerProps = {
|
|
4231
|
-
value,
|
|
4232
|
-
onValueChange: handleValueChange,
|
|
4233
|
-
};
|
|
4234
|
-
return props.renderFooter ? props.renderFooter(footerProps) : React__default.createElement(FilterDatePickerBodyFooter, { ...footerProps });
|
|
4235
4335
|
}
|
|
4236
|
-
return (React__default.createElement(Fragment, null,
|
|
4237
|
-
React__default.createElement(FlexRow, { borderBottom: true },
|
|
4238
|
-
React__default.createElement(DatePickerBody, { filter: props.filter, value: value, onValueChange: handleBodyChange, renderDay: props.renderDay, isHoliday: props.isHoliday, rawProps: props.rawProps?.body })),
|
|
4239
|
-
renderFooter()));
|
|
4240
4336
|
}
|
|
4241
4337
|
|
|
4242
|
-
|
|
4243
|
-
function FilterRangeDatePickerBodyFooter(props) {
|
|
4244
|
-
const shouldShowClearButton = (!props.preventEmptyToDate || !props.preventEmptyFromDate) && !props.disableClear;
|
|
4245
|
-
return (React__default.createElement(FlexCell, { alignSelf: "stretch" },
|
|
4246
|
-
React__default.createElement(FlexRow, { cx: UUI_FILTERS_PANEL_RDTP_FOOTER },
|
|
4247
|
-
React__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) => {
|
|
4248
|
-
if (props.onFocus) {
|
|
4249
|
-
props.onFocus(event, inputType);
|
|
4250
|
-
}
|
|
4251
|
-
props.setInFocus(inputType);
|
|
4252
|
-
}, onBlurInput: props.onBlur, preventEmptyFromDate: props.preventEmptyFromDate, preventEmptyToDate: props.preventEmptyToDate }),
|
|
4253
|
-
React__default.createElement(FlexSpacer, null),
|
|
4254
|
-
shouldShowClearButton && (React__default.createElement(LinkButton, { isDisabled: !props.value.from && !props.value.to, caption: i18n.filterToolbar.rangeDatePicker.clearCaption, onClick: props.onClear })))));
|
|
4255
|
-
}
|
|
4338
|
+
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"};
|
|
4256
4339
|
|
|
4257
|
-
function
|
|
4258
|
-
const {
|
|
4259
|
-
const
|
|
4260
|
-
const
|
|
4261
|
-
const
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4340
|
+
const ColumnRow = /* @__PURE__ */React.memo(function ColumnRow(props) {
|
|
4341
|
+
const { column } = props;
|
|
4342
|
+
const { toggleVisibility, togglePin, onCanAcceptDrop, onDrop, columnConfig, isDndAllowed, isPinnedAlways, } = column;
|
|
4343
|
+
const { isVisible, fix } = columnConfig;
|
|
4344
|
+
const pinPosition = fix || (isPinnedAlways ? 'left' : undefined);
|
|
4345
|
+
const isPinned = !!pinPosition;
|
|
4346
|
+
const data = { column, columnConfig };
|
|
4347
|
+
const renderContent = (dndActorParams) => {
|
|
4348
|
+
const wrapperClasses = cx$1(css$q.rowWrapper, !isPinned && css$q.notPinned, dndActorParams.isDragGhost && uuiDndState.dragGhost, 'uui-dt-columns-config-row');
|
|
4349
|
+
const { onTouchStart, onPointerDown, ...restEventHandlers } = dndActorParams.eventHandlers;
|
|
4350
|
+
const { ref, ...dndActorPropsWithoutRef } = dndActorParams;
|
|
4351
|
+
return (React.createElement(FlexRow, { size: settings.dataTable.sizes.columnsConfigurationModal.columnRow, cx: wrapperClasses, ref: dndActorParams.ref, rawProps: { ...restEventHandlers }, alignItems: "top" },
|
|
4352
|
+
React.createElement(DragHandle, { dragHandleIcon: settings.dataTable.icons.columnsConfigurationModal.dragIndicator, rawProps: { onTouchStart, onPointerDown }, isDisabled: !isDndAllowed, cx: cx$1(css$q.dragHandle, !isDndAllowed && css$q.dndDisabled) }),
|
|
4353
|
+
React.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 }),
|
|
4354
|
+
React.createElement(FlexRow, { size: null, cx: css$q.pinIconButton },
|
|
4355
|
+
React.createElement(PinIconButton, { pinPosition: pinPosition, canUnpin: !isPinnedAlways, onTogglePin: togglePin })),
|
|
4356
|
+
React.createElement(DropMarker, { ...dndActorPropsWithoutRef })));
|
|
4266
4357
|
};
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4358
|
+
return (React.createElement(DndActor, { key: column.key, srcData: isDndAllowed && data, dstData: data, canAcceptDrop: onCanAcceptDrop, onDrop: onDrop, render: renderContent }));
|
|
4359
|
+
});
|
|
4360
|
+
|
|
4361
|
+
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"};
|
|
4362
|
+
|
|
4363
|
+
const renderGroupTitle = (title, amount) => (React.createElement(FlexRow, { cx: css$p.group },
|
|
4364
|
+
React.createElement(Text, { size: "none", cx: css$p.groupTitle }, title),
|
|
4365
|
+
React.createElement(CountIndicator, { caption: amount, color: "neutral", size: settings.dataTable.sizes.columnsConfigurationModal.countIndicator }),
|
|
4366
|
+
React.createElement(FlexSpacer, null)));
|
|
4367
|
+
function ColumnsConfigurationModal(props) {
|
|
4368
|
+
const i18n$1 = i18n.tables.columnsConfigurationModal;
|
|
4369
|
+
const { columns, columnsConfig: initialColumnsConfig, defaultConfig, ...modalProps } = props;
|
|
4370
|
+
const { groupedColumns, searchValue, columnsConfig, reset, checkAll, uncheckAll, setSearchValue, hasAnySelectedColumns, } = useColumnsConfiguration({
|
|
4371
|
+
initialColumnsConfig,
|
|
4372
|
+
columns,
|
|
4373
|
+
defaultConfig,
|
|
4374
|
+
getSearchFields: props.getSearchFields,
|
|
4375
|
+
});
|
|
4376
|
+
const apply = useCallback(() => modalProps.success(columnsConfig), [columnsConfig, modalProps]);
|
|
4377
|
+
const close = useCallback(() => modalProps.abort(), [modalProps]);
|
|
4378
|
+
const isNoData = useMemo(() => Object.values(groupedColumns).every((v) => !v.length), [groupedColumns]);
|
|
4379
|
+
const renderVisible = () => {
|
|
4380
|
+
const amountPinnedLeft = groupedColumns.displayedPinnedLeft.length;
|
|
4381
|
+
const amountPinnedRight = groupedColumns.displayedPinnedRight.length;
|
|
4382
|
+
const amountUnPinned = groupedColumns.displayedUnpinned.length;
|
|
4383
|
+
const totalAmountOfVisibleColumns = amountPinnedLeft + amountUnPinned + amountPinnedRight;
|
|
4384
|
+
if (!totalAmountOfVisibleColumns) {
|
|
4385
|
+
return null;
|
|
4277
4386
|
}
|
|
4387
|
+
const hasDividerBelowPinnedLeft = !!(amountPinnedLeft && amountUnPinned);
|
|
4388
|
+
const hasDividerAbovePinnedRight = !!(amountPinnedRight && amountUnPinned);
|
|
4389
|
+
const divider = (React.createElement(FlexRow, { size: null, cx: css$p.hDivider }));
|
|
4390
|
+
return (React.createElement(React.Fragment, null,
|
|
4391
|
+
renderGroupTitle(i18n$1.displayedSectionTitle, totalAmountOfVisibleColumns),
|
|
4392
|
+
React.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.pinnedToTheLeftSubgroupTitle, items: groupedColumns.displayedPinnedLeft }),
|
|
4393
|
+
hasDividerBelowPinnedLeft && divider,
|
|
4394
|
+
React.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.notPinnedSubgroupTitle, items: groupedColumns.displayedUnpinned }),
|
|
4395
|
+
hasDividerAbovePinnedRight && divider,
|
|
4396
|
+
React.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.pinnedToTheRightSubgroupTitle, items: groupedColumns.displayedPinnedRight })));
|
|
4278
4397
|
};
|
|
4279
|
-
const
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
&& inFocus === 'to'
|
|
4285
|
-
&& toChanged;
|
|
4286
|
-
if (closeBody) {
|
|
4287
|
-
onOpenChange(false);
|
|
4398
|
+
const renderHidden = () => {
|
|
4399
|
+
const items = groupedColumns.hidden;
|
|
4400
|
+
const title = renderGroupTitle(i18n$1.hiddenSectionTitle, items.length);
|
|
4401
|
+
if (!items.length) {
|
|
4402
|
+
return null;
|
|
4288
4403
|
}
|
|
4404
|
+
return (React.createElement(React.Fragment, null,
|
|
4405
|
+
title,
|
|
4406
|
+
React.createElement(SubGroup, { renderItem: props.renderItem, items: items })));
|
|
4289
4407
|
};
|
|
4290
|
-
const
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
return props.renderFooter ? props.renderFooter(footerProps) : React__default.createElement(FilterRangeDatePickerBodyFooter, { ...footerProps });
|
|
4312
|
-
}
|
|
4313
|
-
return (React__default.createElement(Fragment, null,
|
|
4314
|
-
React__default.createElement(FlexRow, { borderBottom: true },
|
|
4315
|
-
React__default.createElement(RangeDatePickerBody, { value: {
|
|
4316
|
-
selectedDate: value,
|
|
4317
|
-
inFocus,
|
|
4318
|
-
}, onValueChange: onBodyValueChange, filter: props.filter, presets: props.presets })),
|
|
4319
|
-
renderFooter()));
|
|
4408
|
+
const applyButton = React.createElement(Button, { caption: i18n$1.applyButton, isDisabled: !hasAnySelectedColumns, color: "primary", onClick: apply });
|
|
4409
|
+
return (React.createElement(ModalBlocker, { ...modalProps },
|
|
4410
|
+
React.createElement(ModalWindow, { cx: [css$p.root, 'uui-columns-config-modal'], height: "95dvh", maxHeight: "95dvh" },
|
|
4411
|
+
React.createElement(ModalHeader, { title: i18n$1.configureColumnsTitle, onClose: close }),
|
|
4412
|
+
React.createElement(FlexRow, { borderBottom: true, cx: css$p.searchArea },
|
|
4413
|
+
React.createElement(SearchInput, { size: settings.dataTable.sizes.columnsConfigurationModal.searchInput, value: searchValue, onValueChange: setSearchValue, placeholder: i18n$1.searchPlaceholder }),
|
|
4414
|
+
React.createElement(Dropdown, { closeOnTargetClick: true, renderBody: () => (React.createElement(DropdownMenuBody, { minWidth: 100 },
|
|
4415
|
+
React.createElement(DropdownMenuButton, { caption: i18n$1.clearAllButton, onClick: uncheckAll }),
|
|
4416
|
+
React.createElement(DropdownMenuButton, { caption: i18n$1.selectAllButton, onClick: checkAll }))), renderTarget: (props) => (React.createElement(Button, { ...props, fill: "none", icon: settings.dataTable.icons.columnsConfigurationModal.menuIcon, size: settings.dataTable.sizes.columnsConfigurationModal.menuButton, color: "secondary", isDropdown: false })) })),
|
|
4417
|
+
React.createElement(Panel, { background: "surface-main", cx: css$p.mainPanel },
|
|
4418
|
+
React.createElement(ScrollBars, null,
|
|
4419
|
+
renderVisible(),
|
|
4420
|
+
renderHidden(),
|
|
4421
|
+
isNoData && (React.createElement(FlexRow, { cx: css$p.noData },
|
|
4422
|
+
React.createElement(Text, { cx: css$p.noDataTitle }, i18n$1.noResultsFound.title),
|
|
4423
|
+
React.createElement(Text, { cx: css$p.noDataSubTitle }, i18n$1.noResultsFound.subTitle))))),
|
|
4424
|
+
React.createElement(ModalFooter, { borderTop: true },
|
|
4425
|
+
React.createElement(LinkButton, { icon: settings.dataTable.icons.columnsConfigurationModal.resetIcon, caption: i18n$1.resetToDefaultButton, onClick: reset }),
|
|
4426
|
+
React.createElement(FlexSpacer, null),
|
|
4427
|
+
React.createElement(Button, { fill: "none", color: "secondary", caption: i18n$1.cancelButton, onClick: close }),
|
|
4428
|
+
!hasAnySelectedColumns ? (React.createElement(Tooltip, { content: i18n$1.enableAtLeastOneColumnMessage, placement: "top-end", color: "critical" }, applyButton)) : (applyButton)))));
|
|
4320
4429
|
}
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
if (
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
props.onValueChange({
|
|
4336
|
-
from: val,
|
|
4337
|
-
to: value?.to ?? null,
|
|
4338
|
-
});
|
|
4339
|
-
break;
|
|
4340
|
-
}
|
|
4341
|
-
case 'to': {
|
|
4342
|
-
props.onValueChange({
|
|
4343
|
-
from: value?.from ?? null,
|
|
4344
|
-
to: val,
|
|
4345
|
-
});
|
|
4346
|
-
break;
|
|
4347
|
-
}
|
|
4430
|
+
function SubGroup(props) {
|
|
4431
|
+
const [isExpanded, setIsExpanded] = useState(true);
|
|
4432
|
+
const { title, items, renderItem } = props;
|
|
4433
|
+
const isCollapsible = !!title;
|
|
4434
|
+
if (items.length) {
|
|
4435
|
+
const content = (React.createElement(FlexRow, { cx: css$p.groupItems, size: settings.dataTable.sizes.columnsConfigurationModal.columnRow }, items.map((c) => (React.createElement(ColumnRow, { column: c, key: c.key, renderItem: renderItem })))));
|
|
4436
|
+
if (isCollapsible) {
|
|
4437
|
+
const renderTitle = (isOpened) => {
|
|
4438
|
+
const toggleIcon = settings.dataTable.icons.columnsConfigurationModal[isOpened ? 'expandedIcon' : 'collapsedIcon'];
|
|
4439
|
+
return (React.createElement(FlexRow, { cx: cx$1(css$p.subgroup) },
|
|
4440
|
+
React.createElement(IconContainer, { icon: toggleIcon }),
|
|
4441
|
+
React.createElement(Text, { size: "none", color: "tertiary", cx: css$p.subgroupTitle }, title)));
|
|
4442
|
+
};
|
|
4443
|
+
return (React.createElement(Accordion$1, { value: isExpanded, onValueChange: setIsExpanded, renderTitle: renderTitle, cx: css$p.subgroupAccordion }, content));
|
|
4348
4444
|
}
|
|
4349
|
-
|
|
4350
|
-
const renderFooter = () => {
|
|
4351
|
-
const clearSelection = () => {
|
|
4352
|
-
if (isInRangePredicate) {
|
|
4353
|
-
props.onValueChange({
|
|
4354
|
-
from: undefined,
|
|
4355
|
-
to: undefined,
|
|
4356
|
-
});
|
|
4357
|
-
}
|
|
4358
|
-
else {
|
|
4359
|
-
props.onValueChange(undefined);
|
|
4360
|
-
}
|
|
4361
|
-
};
|
|
4362
|
-
const isClearDisabled = typeof props.value !== 'number' && typeof props.value !== 'object';
|
|
4363
|
-
return (React__default.createElement(FlexRow, { padding: "12" },
|
|
4364
|
-
React__default.createElement(FlexSpacer, null),
|
|
4365
|
-
React__default.createElement(FlexCell, { width: "auto", alignSelf: "center" },
|
|
4366
|
-
React__default.createElement(LinkButton, { isDisabled: isClearDisabled, size: settings.filtersPanel.sizes[isMobile() ? 'mobileFooterLinkButton' : 'footerLinkButton'], caption: i18n.pickerInput.clearSelectionButtonSingle, onClick: clearSelection }))));
|
|
4367
|
-
};
|
|
4368
|
-
if (isInRangePredicate) {
|
|
4369
|
-
const value = props.value;
|
|
4370
|
-
return (React__default.createElement("div", null,
|
|
4371
|
-
React__default.createElement(FlexRow, { padding: "12", alignItems: "center", columnGap: "12", borderBottom: true, cx: css$r.container },
|
|
4372
|
-
React__default.createElement(FlexCell, { width: "100%" },
|
|
4373
|
-
React__default.createElement(NumericInput, { size: settings.filtersPanel.sizes.default, value: value?.from ?? null, onValueChange: rangeValueHandler('from'), placeholder: "Min", formatOptions: { maximumFractionDigits: 2 } })),
|
|
4374
|
-
React__default.createElement(FlexCell, { width: "100%" },
|
|
4375
|
-
React__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) }))),
|
|
4376
|
-
renderFooter()));
|
|
4445
|
+
return content;
|
|
4377
4446
|
}
|
|
4378
|
-
return
|
|
4379
|
-
React__default.createElement(FlexRow, { padding: "12", alignItems: "center", borderBottom: true, cx: css$r.container },
|
|
4380
|
-
React__default.createElement(FlexCell, { width: 130 },
|
|
4381
|
-
React__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 } }))),
|
|
4382
|
-
renderFooter()));
|
|
4447
|
+
return null;
|
|
4383
4448
|
}
|
|
4384
4449
|
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
case 'numeric':
|
|
4390
|
-
return React__default.createElement(FilterNumericBody, { ...props });
|
|
4391
|
-
case 'multiPicker':
|
|
4392
|
-
return React__default.createElement(FilterPickerBody, { ...props, selectionMode: "multi", valueType: "id" });
|
|
4393
|
-
case 'datePicker':
|
|
4394
|
-
return React__default.createElement(FilterDatePickerBody, { ...props, format: props.format || 'DD/MM/YYYY' });
|
|
4395
|
-
case 'rangeDatePicker':
|
|
4396
|
-
return React__default.createElement(FilterRangeDatePickerBody, { ...props, format: props.format || 'DD/MM/YYYY', value: props.value || { from: null, to: null } });
|
|
4397
|
-
case 'custom':
|
|
4398
|
-
return props.render(props);
|
|
4450
|
+
const getChildrenAndRest = (row, rows) => {
|
|
4451
|
+
const firstNotChildIndex = rows.findIndex((other) => other.depth < row.depth || (row.depth === other.depth && other.isPinned));
|
|
4452
|
+
if (firstNotChildIndex === -1) {
|
|
4453
|
+
return [rows, []];
|
|
4399
4454
|
}
|
|
4400
|
-
|
|
4455
|
+
if (firstNotChildIndex === 0) {
|
|
4456
|
+
return [[], rows];
|
|
4457
|
+
}
|
|
4458
|
+
const children = rows.slice(0, firstNotChildIndex);
|
|
4459
|
+
const rest = rows.slice(firstNotChildIndex, rows.length);
|
|
4460
|
+
return [children, rest];
|
|
4461
|
+
};
|
|
4401
4462
|
|
|
4402
|
-
var css$
|
|
4463
|
+
var css$o = {"listContainer":"IP-lCK","header":"ZVtQ-Y","group":"EYSSZW","stickyHeader":"_2RXqqB"};
|
|
4403
4464
|
|
|
4404
|
-
function
|
|
4405
|
-
const
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4465
|
+
function DataRowsGroup({ row, childRows, renderRow, top = 1, }) {
|
|
4466
|
+
const rowRef = useRef(undefined);
|
|
4467
|
+
const childrenPinnedTop = row.isPinned ? (top + (rowRef.current?.clientHeight ?? 0)) : top;
|
|
4468
|
+
return (React__default.createElement("div", { className: css$o.group, key: row.rowKey },
|
|
4469
|
+
React__default.createElement("div", { className: row.isPinned ? css$o.stickyHeader : css$o.header,
|
|
4470
|
+
// Gaps between pinned parents should be removed by -1 from top height.
|
|
4471
|
+
// Otherwise, sometimes top value is rounded top.
|
|
4472
|
+
style: { zIndex: row.depth + 10, top: top - 1 }, ref: rowRef }, renderRow(row)),
|
|
4473
|
+
childRows.length > 0 && (React__default.createElement("div", null,
|
|
4474
|
+
React__default.createElement(DataRowsGroups, { rows: childRows, renderRow: renderRow, top: childrenPinnedTop })))));
|
|
4475
|
+
}
|
|
4476
|
+
const renderRows = (rows, renderRow, top) => {
|
|
4477
|
+
if (!rows.length)
|
|
4478
|
+
return [];
|
|
4479
|
+
const [row, ...rest] = rows;
|
|
4480
|
+
if (!rest.length) {
|
|
4481
|
+
return [renderRow(row)];
|
|
4482
|
+
}
|
|
4483
|
+
const [next] = rest;
|
|
4484
|
+
if (next.depth <= row.depth && !row.isPinned) {
|
|
4485
|
+
return [renderRow(row)].concat(renderRows(rest, renderRow, top));
|
|
4486
|
+
}
|
|
4487
|
+
const [children, otherRows] = getChildrenAndRest(row, rest);
|
|
4488
|
+
const group = (React__default.createElement(DataRowsGroup, { row: row, childRows: children, renderRow: renderRow, top: top, key: row.rowKey }));
|
|
4489
|
+
return [group].concat(renderRows(otherRows, renderRow, top));
|
|
4490
|
+
};
|
|
4491
|
+
function DataRowsGroups({ rows, renderRow, top = 1, }) {
|
|
4492
|
+
const rowsWithGroups = renderRows(rows, renderRow, top);
|
|
4493
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
4494
|
+
return (React__default.createElement(React__default.Fragment, null, rowsWithGroups));
|
|
4495
|
+
}
|
|
4496
|
+
|
|
4497
|
+
function DataRowsContainer({ estimatedHeight, listContainerRef, offsetY, rows, renderRow, headerRef, }) {
|
|
4498
|
+
return (React__default.createElement("div", { className: cx(css$o.listContainer, 'uui-dt-data_row_container'), style: { minHeight: `${estimatedHeight}px` } },
|
|
4499
|
+
React__default.createElement("div", { ref: listContainerRef, role: "rowgroup", style: { marginTop: offsetY } },
|
|
4500
|
+
React__default.createElement(DataRowsGroups, { rows: rows, renderRow: renderRow, top: headerRef?.current?.clientHeight }))));
|
|
4501
|
+
}
|
|
4502
|
+
|
|
4503
|
+
var css$n = {"root":"Sgq252","sticky-header":"D2QEgn","stickyHeader":"D2QEgn","no-results":"w1vRX8","noResults":"w1vRX8","icon":"kYP-6P","title":"IEbCHB"};
|
|
4504
|
+
|
|
4505
|
+
function DataTable(props) {
|
|
4506
|
+
const { uuiModals } = useUuiContext();
|
|
4507
|
+
const headerRef = React.useRef(undefined);
|
|
4508
|
+
const columnsWithFilters = useColumnsWithFilters(props.columns, props.filters);
|
|
4509
|
+
const { columns, config, defaultConfig } = useColumnsConfig(columnsWithFilters, props.value?.columnsConfig);
|
|
4510
|
+
const defaultRenderRow = React.useCallback((rowProps) => {
|
|
4511
|
+
return (React.createElement(DataTableRow, { size: props.size || settings.dataTable.sizes.body.row, columnsGap: props.columnsGap, borderBottom: props.border, ...rowProps, key: rowProps.rowKey, cx: css$n.cell }));
|
|
4512
|
+
}, []);
|
|
4513
|
+
const renderRow = (row) => (props.renderRow ?? defaultRenderRow)({ ...row, columns });
|
|
4514
|
+
const rows = props.getRows?.() ?? props.rows ?? [];
|
|
4515
|
+
const renderNoResultsBlock = React.useCallback(() => {
|
|
4516
|
+
return (React.createElement("div", { className: css$n.noResults }, props.renderNoResultsBlock ? (props.renderNoResultsBlock?.()) : (React.createElement(React.Fragment, null,
|
|
4517
|
+
React.createElement(IconContainer, { cx: css$n.icon, icon: settings.dataTable.icons.emptyTable }),
|
|
4518
|
+
React.createElement(Text, { cx: css$n.title, fontSize: "24", lineHeight: "30", color: "primary", fontWeight: "600" }, i18n.tables.noResultsBlock.title),
|
|
4519
|
+
React.createElement(Text, { fontSize: "16", lineHeight: "24", color: "primary" }, i18n.tables.noResultsBlock.message)))));
|
|
4520
|
+
}, [props.renderNoResultsBlock]);
|
|
4521
|
+
const onConfigurationButtonClick = React.useCallback(() => {
|
|
4522
|
+
const configProps = { columns: props.columns, columnsConfig: { ...config }, defaultConfig };
|
|
4523
|
+
uuiModals
|
|
4524
|
+
.show((modalProps) => {
|
|
4525
|
+
return (props.renderColumnsConfigurationModal
|
|
4526
|
+
? props.renderColumnsConfigurationModal({ ...configProps, ...modalProps })
|
|
4527
|
+
: (React.createElement(ColumnsConfigurationModal, { ...modalProps, columns: props.columns, columnsConfig: config, defaultConfig: defaultConfig })));
|
|
4528
|
+
})
|
|
4529
|
+
.then((columnsConfig) => props.onValueChange({ ...props.value, columnsConfig }))
|
|
4530
|
+
.catch(() => null);
|
|
4531
|
+
}, [
|
|
4532
|
+
props.columns, config, defaultConfig, props.value, props.onValueChange, props.renderColumnsConfigurationModal,
|
|
4533
|
+
]);
|
|
4534
|
+
const renderRowsContainer = React.useCallback(({ listContainerRef, estimatedHeight, offsetY, scrollShadows }) => (React.createElement(React.Fragment, null,
|
|
4535
|
+
React.createElement("div", { className: cx$1(css$n.stickyHeader, 'uui-dt-sticky_header'), ref: headerRef },
|
|
4536
|
+
React.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 }),
|
|
4537
|
+
React.createElement("div", { className: cx$1(uuiScrollShadows.top, {
|
|
4538
|
+
[uuiScrollShadows.topVisible]: scrollShadows.verticalTop,
|
|
4539
|
+
}) })),
|
|
4540
|
+
props.exactRowsCount !== 0 ? (React.createElement(DataRowsContainer, { headerRef: headerRef, listContainerRef: listContainerRef, estimatedHeight: estimatedHeight, offsetY: offsetY, scrollShadows: scrollShadows, renderRow: renderRow, rows: rows })) : (renderNoResultsBlock?.()))), [
|
|
4541
|
+
props, columns, rows, renderNoResultsBlock, onConfigurationButtonClick,
|
|
4542
|
+
]);
|
|
4543
|
+
return (React.createElement(DataTableSelectionProvider, { onCopy: props.onCopy, rows: rows, columns: columns },
|
|
4544
|
+
React.createElement(DataTableFocusProvider, { dataTableFocusManager: props.dataTableFocusManager },
|
|
4545
|
+
React.createElement(VirtualList, { value: props.value, onValueChange: props.onValueChange, onScroll: props.onScroll, rowsCount: props.rowsCount, renderRows: renderRowsContainer, cx: cx$1(css$n.root, props.cx, 'uui-dt-vars', 'uui-data_table'), isLoading: props.isReloading, rowsSelector: "[role=row]", rawProps: {
|
|
4546
|
+
role: 'table',
|
|
4547
|
+
'aria-colcount': columns.length,
|
|
4548
|
+
'aria-rowcount': props.rowsCount,
|
|
4549
|
+
} }))));
|
|
4550
|
+
}
|
|
4551
|
+
|
|
4552
|
+
var css$m = {"root":"Qcghyd","title-wrapper":"EJWZMK","titleWrapper":"EJWZMK","title":"qUE-ge","text-wrapper":"_0RCvXA","textWrapper":"_0RCvXA","selection":"l7Mkx-","postfix":"_02Rn5U","selected":"VAO5TQ"};
|
|
4553
|
+
|
|
4554
|
+
const FilterPanelItemToggler = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
4555
|
+
const togglerPickerOpened = (e) => {
|
|
4556
|
+
if (props.isDisabled)
|
|
4557
|
+
return;
|
|
4558
|
+
e.preventDefault();
|
|
4559
|
+
!isEventTargetInsideClickable(e) && props.onClick?.();
|
|
4560
|
+
};
|
|
4561
|
+
const onKeyDownHandler = (e) => {
|
|
4562
|
+
if (props.isDisabled)
|
|
4563
|
+
return;
|
|
4564
|
+
if (e.key === 'Enter' && !props.isOpen) {
|
|
4565
|
+
e.preventDefault();
|
|
4566
|
+
props.toggleDropdownOpening(true);
|
|
4567
|
+
}
|
|
4568
|
+
if (e.key === 'Escape' && props.isOpen) {
|
|
4569
|
+
e.preventDefault();
|
|
4570
|
+
props.toggleDropdownOpening(false);
|
|
4571
|
+
}
|
|
4572
|
+
};
|
|
4573
|
+
const getTitle = props.predicateName ? `${props.title} ${props.predicateName}` : `${props.title}${props.selection ? ':' : ''}`;
|
|
4574
|
+
const getSelectionText = () => props.selection.map((i, index) => (React.createElement(React.Fragment, { key: `${i}${index}` },
|
|
4575
|
+
React.createElement("div", { className: cx(css$m.selection, UUI_FILTERS_PANEL_ITEM_TOGGLER_SELECTION) }, i),
|
|
4576
|
+
(props.postfix || index !== props.selection.length - 1) && React.createElement("span", null, ",\u00A0"))));
|
|
4577
|
+
return (React.createElement("div", { style: { maxWidth: `${props.maxWidth ? props.maxWidth + 'px' : 'auto'}` }, role: "button", tabIndex: props.isDisabled ? -1 : 0, onKeyDown: onKeyDownHandler, className: cx(UUI_FILTERS_PANEL_ITEM_TOGGLER, css$m.root, uuiElement.inputBox, uuiMarkers.clickable, props.isOpen && uuiMod.opened, props.selection?.length > 0 && uuiMarkers.hasValue, `uui-size-${props.size || settings.pickerInput.sizes.toggler.default}`, props.cx), onClick: togglerPickerOpened, ref: ref },
|
|
4578
|
+
React.createElement("div", { className: css$m.titleWrapper },
|
|
4579
|
+
React.createElement("div", { className: cx(css$m.title, UUI_FILTERS_PANEL_ITEM_TOGGLER_TITLE) }, getTitle),
|
|
4580
|
+
props.selection && (React.createElement("div", { className: css$m.textWrapper },
|
|
4581
|
+
getSelectionText(),
|
|
4582
|
+
props.postfix && (React.createElement("div", { className: cx(css$m.postfix, UUI_FILTERS_PANEL_ITEM_TOGGLER_POSTFIX) }, props.postfix))))),
|
|
4583
|
+
!props.isDisabled && React.createElement(IconContainer, { icon: settings.filtersPanel.icons.itemDropdownIcon, flipY: props.isOpen, cx: "uui-icon-dropdown" })));
|
|
4584
|
+
});
|
|
4585
|
+
|
|
4586
|
+
const defaultPredicates = {
|
|
4587
|
+
numeric: [
|
|
4588
|
+
{ predicate: 'eq', name: '=', isDefault: true }, { predicate: 'neq', name: '≠' }, { predicate: 'lte', name: '≤' }, { predicate: 'gte', name: '≥' }, { predicate: 'inRange', name: 'In Range' },
|
|
4589
|
+
],
|
|
4590
|
+
multiPicker: [{ predicate: 'in', name: 'is', isDefault: true }, { predicate: 'nin', name: 'is not' }],
|
|
4591
|
+
rangeDatePicker: [{ predicate: 'inRange', name: 'In Range', isDefault: true }, { predicate: 'notInRange', name: 'Not in Range' }],
|
|
4592
|
+
};
|
|
4593
|
+
const getDefaultPredicate = (predicates, value) => {
|
|
4594
|
+
if (!predicates) {
|
|
4595
|
+
return null;
|
|
4596
|
+
}
|
|
4597
|
+
return Object.keys(value || {})[0]
|
|
4598
|
+
|| predicates.find((i) => i.isDefault)?.predicate
|
|
4599
|
+
|| predicates?.[0].predicate;
|
|
4600
|
+
};
|
|
4601
|
+
|
|
4602
|
+
const pickerHeight = 300;
|
|
4603
|
+
function FilterPickerBody({ highlightSearchMatches = true, ...restProps }) {
|
|
4604
|
+
const props = { ...restProps, highlightSearchMatches };
|
|
4605
|
+
const [dsState, setDsState] = useState({
|
|
4606
|
+
focusedIndex: 0,
|
|
4607
|
+
topIndex: 0,
|
|
4608
|
+
visibleCount: 20,
|
|
4609
|
+
checked: [],
|
|
4610
|
+
});
|
|
4611
|
+
const { showSelected, setShowSelected } = useShowSelected({ dataSourceState: dsState });
|
|
4612
|
+
const { view, getName, dataSourceState, getListProps, handleDataSourceValueChange, clearSelection, } = usePickerApi({ ...props, dataSourceState: dsState, setDataSourceState: setDsState, showSelectedOnly: showSelected });
|
|
4613
|
+
const prevValue = usePrevious(props.value);
|
|
4614
|
+
const prevOpened = usePrevious(props.isOpen);
|
|
4615
|
+
React.useLayoutEffect(() => {
|
|
4616
|
+
if (prevOpened === props.isOpen && props.isOpen
|
|
4617
|
+
&& prevValue !== props.value && props.value !== props.emptyValue
|
|
4618
|
+
&& props.selectionMode === 'single') {
|
|
4619
|
+
props.onClose();
|
|
4620
|
+
}
|
|
4621
|
+
}, [props.value]);
|
|
4622
|
+
const renderFooter = () => {
|
|
4623
|
+
const footerProps = {
|
|
4624
|
+
view,
|
|
4625
|
+
showSelected: {
|
|
4626
|
+
value: showSelected,
|
|
4627
|
+
onValueChange: setShowSelected,
|
|
4628
|
+
},
|
|
4629
|
+
clearSelection,
|
|
4630
|
+
selectionMode: props.selectionMode,
|
|
4631
|
+
selection: props.value,
|
|
4632
|
+
search: dataSourceState.search,
|
|
4633
|
+
};
|
|
4634
|
+
return props.renderFooter
|
|
4635
|
+
? props.renderFooter(footerProps)
|
|
4636
|
+
: React.createElement(DataPickerFooter, { ...footerProps, cx: UUI_FILTERS_PANEL_BODY_FOOTER, size: settings.pickerInput.sizes.body.row });
|
|
4637
|
+
};
|
|
4638
|
+
const renderBody = () => {
|
|
4639
|
+
const rows = view.getVisibleRows();
|
|
4640
|
+
const maxHeight = isMobile() ? document.documentElement.clientHeight : props.maxBodyHeight || pickerHeight;
|
|
4641
|
+
const maxWidth = isMobile() ? undefined : 360;
|
|
4642
|
+
const onKeyDown = (e) => handleDataSourceKeyboard({
|
|
4643
|
+
value: dataSourceState,
|
|
4644
|
+
onValueChange: handleDataSourceValueChange,
|
|
4645
|
+
listView: view,
|
|
4646
|
+
searchPosition: 'body',
|
|
4647
|
+
rows,
|
|
4648
|
+
}, e);
|
|
4649
|
+
return (React.createElement(React.Fragment, null,
|
|
4650
|
+
React.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 }),
|
|
4651
|
+
renderFooter()));
|
|
4652
|
+
};
|
|
4653
|
+
return renderBody();
|
|
4654
|
+
}
|
|
4655
|
+
|
|
4656
|
+
const UUI_FILTERS_PANEL_DTP_FOOTER = 'uui-filters-panel-dtp-footer';
|
|
4657
|
+
function FilterDatePickerBodyFooter({ value, onValueChange }) {
|
|
4658
|
+
return (React__default.createElement(FlexCell, { alignSelf: "stretch" },
|
|
4659
|
+
React__default.createElement(FlexRow, { cx: UUI_FILTERS_PANEL_DTP_FOOTER },
|
|
4660
|
+
React__default.createElement(Text, null, value ? uuiDayjs.dayjs(value).format('MMM DD, YYYY') : ''),
|
|
4661
|
+
React__default.createElement(FlexSpacer, null),
|
|
4662
|
+
React__default.createElement(LinkButton, { isDisabled: !value, caption: i18n.filterToolbar.datePicker.clearCaption, onClick: () => onValueChange(undefined) }))));
|
|
4663
|
+
}
|
|
4664
|
+
|
|
4665
|
+
function FilterDatePickerBody(props) {
|
|
4666
|
+
const { value } = props;
|
|
4667
|
+
const context = useUuiContext();
|
|
4668
|
+
const handleValueChange = (newValue) => {
|
|
4669
|
+
props.onValueChange(newValue);
|
|
4670
|
+
if (props.getValueChangeAnalyticsEvent) {
|
|
4671
|
+
const event = props.getValueChangeAnalyticsEvent(newValue, value);
|
|
4672
|
+
context.uuiAnalytics.sendEvent(event);
|
|
4673
|
+
}
|
|
4674
|
+
if (newValue) {
|
|
4675
|
+
props.onClose?.();
|
|
4676
|
+
}
|
|
4677
|
+
};
|
|
4678
|
+
const handleBodyChange = (newValue) => {
|
|
4679
|
+
if (newValue && value !== newValue) {
|
|
4680
|
+
handleValueChange(newValue);
|
|
4681
|
+
}
|
|
4682
|
+
};
|
|
4683
|
+
function renderFooter() {
|
|
4684
|
+
const footerProps = {
|
|
4685
|
+
value,
|
|
4686
|
+
onValueChange: handleValueChange,
|
|
4687
|
+
};
|
|
4688
|
+
return props.renderFooter ? props.renderFooter(footerProps) : React__default.createElement(FilterDatePickerBodyFooter, { ...footerProps });
|
|
4689
|
+
}
|
|
4690
|
+
return (React__default.createElement(Fragment, null,
|
|
4691
|
+
React__default.createElement(FlexRow, { borderBottom: true },
|
|
4692
|
+
React__default.createElement(DatePickerBody, { filter: props.filter, value: value, onValueChange: handleBodyChange, renderDay: props.renderDay, isHoliday: props.isHoliday, rawProps: props.rawProps?.body })),
|
|
4693
|
+
renderFooter()));
|
|
4694
|
+
}
|
|
4695
|
+
|
|
4696
|
+
const UUI_FILTERS_PANEL_RDTP_FOOTER = 'uui-filters-panel-rdtp-footer';
|
|
4697
|
+
function FilterRangeDatePickerBodyFooter(props) {
|
|
4698
|
+
const shouldShowClearButton = (!props.preventEmptyToDate || !props.preventEmptyFromDate) && !props.disableClear;
|
|
4699
|
+
return (React__default.createElement(FlexCell, { alignSelf: "stretch" },
|
|
4700
|
+
React__default.createElement(FlexRow, { cx: UUI_FILTERS_PANEL_RDTP_FOOTER },
|
|
4701
|
+
React__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) => {
|
|
4702
|
+
if (props.onFocus) {
|
|
4703
|
+
props.onFocus(event, inputType);
|
|
4704
|
+
}
|
|
4705
|
+
props.setInFocus(inputType);
|
|
4706
|
+
}, onBlurInput: props.onBlur, preventEmptyFromDate: props.preventEmptyFromDate, preventEmptyToDate: props.preventEmptyToDate }),
|
|
4707
|
+
React__default.createElement(FlexSpacer, null),
|
|
4708
|
+
shouldShowClearButton && (React__default.createElement(LinkButton, { isDisabled: !props.value.from && !props.value.to, caption: i18n.filterToolbar.rangeDatePicker.clearCaption, onClick: props.onClear })))));
|
|
4709
|
+
}
|
|
4710
|
+
|
|
4711
|
+
function FilterRangeDatePickerBody(props) {
|
|
4712
|
+
const { value: _value, format = defaultFormat } = props;
|
|
4713
|
+
const value = _value || defaultRangeValue; // also handles null in comparison to default value
|
|
4714
|
+
const context = useUuiContext();
|
|
4715
|
+
const onOpenChange = (newIsOpen) => {
|
|
4716
|
+
{
|
|
4717
|
+
props.onClose?.();
|
|
4718
|
+
}
|
|
4719
|
+
props.onOpenChange?.(newIsOpen);
|
|
4720
|
+
};
|
|
4721
|
+
const [inFocus, setInFocus] = useState('from');
|
|
4722
|
+
const onValueChange = (newValue) => {
|
|
4723
|
+
const fromChanged = value?.from !== newValue?.from;
|
|
4724
|
+
const toChanged = value?.to !== newValue?.to;
|
|
4725
|
+
if (fromChanged || toChanged) {
|
|
4726
|
+
props.onValueChange(newValue);
|
|
4727
|
+
if (props.getValueChangeAnalyticsEvent) {
|
|
4728
|
+
const event = props.getValueChangeAnalyticsEvent(newValue, value);
|
|
4729
|
+
context.uuiAnalytics.sendEvent(event);
|
|
4730
|
+
}
|
|
4731
|
+
}
|
|
4732
|
+
};
|
|
4733
|
+
const onBodyValueChange = (newValue) => {
|
|
4734
|
+
setInFocus(newValue.inFocus ?? inFocus);
|
|
4735
|
+
onValueChange(newValue.selectedDate);
|
|
4736
|
+
const toChanged = value.to !== newValue.selectedDate.to;
|
|
4737
|
+
const closeBody = newValue.selectedDate.from && newValue.selectedDate.to
|
|
4738
|
+
&& inFocus === 'to'
|
|
4739
|
+
&& toChanged;
|
|
4740
|
+
if (closeBody) {
|
|
4741
|
+
onOpenChange(false);
|
|
4742
|
+
}
|
|
4743
|
+
};
|
|
4744
|
+
const onClear = () => {
|
|
4745
|
+
const newValue = {
|
|
4746
|
+
from: props.preventEmptyFromDate ? value.from : null,
|
|
4747
|
+
to: props.preventEmptyToDate ? value.to : null,
|
|
4748
|
+
};
|
|
4749
|
+
onValueChange(newValue);
|
|
4750
|
+
};
|
|
4751
|
+
function renderFooter() {
|
|
4752
|
+
const footerProps = {
|
|
4753
|
+
value,
|
|
4754
|
+
onValueChange,
|
|
4755
|
+
format: format,
|
|
4756
|
+
disableClear: props.disableClear,
|
|
4757
|
+
preventEmptyFromDate: props.preventEmptyFromDate,
|
|
4758
|
+
preventEmptyToDate: props.preventEmptyToDate,
|
|
4759
|
+
onFocus: props.onFocus,
|
|
4760
|
+
onBlur: props.onBlur,
|
|
4761
|
+
inFocus,
|
|
4762
|
+
setInFocus,
|
|
4763
|
+
onClear,
|
|
4764
|
+
};
|
|
4765
|
+
return props.renderFooter ? props.renderFooter(footerProps) : React__default.createElement(FilterRangeDatePickerBodyFooter, { ...footerProps });
|
|
4766
|
+
}
|
|
4767
|
+
return (React__default.createElement(Fragment, null,
|
|
4768
|
+
React__default.createElement(FlexRow, { borderBottom: true },
|
|
4769
|
+
React__default.createElement(RangeDatePickerBody, { value: {
|
|
4770
|
+
selectedDate: value,
|
|
4771
|
+
inFocus,
|
|
4772
|
+
}, onValueChange: onBodyValueChange, filter: props.filter, presets: props.presets })),
|
|
4773
|
+
renderFooter()));
|
|
4774
|
+
}
|
|
4775
|
+
|
|
4776
|
+
var css$l = {"container":"lIs0PD"};
|
|
4777
|
+
|
|
4778
|
+
function FilterNumericBody(props) {
|
|
4779
|
+
const isInRangePredicate = props?.selectedPredicate === 'inRange' || props?.selectedPredicate === 'notInRange';
|
|
4780
|
+
const isWrongRange = (from, to) => {
|
|
4781
|
+
if (!to && to !== 0)
|
|
4782
|
+
return false;
|
|
4783
|
+
return from > to;
|
|
4784
|
+
};
|
|
4785
|
+
const rangeValueHandler = (type) => (val) => {
|
|
4786
|
+
const value = props.value;
|
|
4787
|
+
switch (type) {
|
|
4788
|
+
case 'from': {
|
|
4789
|
+
props.onValueChange({
|
|
4790
|
+
from: val,
|
|
4791
|
+
to: value?.to ?? null,
|
|
4792
|
+
});
|
|
4793
|
+
break;
|
|
4794
|
+
}
|
|
4795
|
+
case 'to': {
|
|
4796
|
+
props.onValueChange({
|
|
4797
|
+
from: value?.from ?? null,
|
|
4798
|
+
to: val,
|
|
4799
|
+
});
|
|
4800
|
+
break;
|
|
4801
|
+
}
|
|
4802
|
+
}
|
|
4803
|
+
};
|
|
4804
|
+
const renderFooter = () => {
|
|
4805
|
+
const clearSelection = () => {
|
|
4806
|
+
if (isInRangePredicate) {
|
|
4807
|
+
props.onValueChange({
|
|
4808
|
+
from: undefined,
|
|
4809
|
+
to: undefined,
|
|
4810
|
+
});
|
|
4811
|
+
}
|
|
4812
|
+
else {
|
|
4813
|
+
props.onValueChange(undefined);
|
|
4814
|
+
}
|
|
4815
|
+
};
|
|
4816
|
+
const isClearDisabled = typeof props.value !== 'number' && typeof props.value !== 'object';
|
|
4817
|
+
return (React__default.createElement(FlexRow, { padding: "12" },
|
|
4818
|
+
React__default.createElement(FlexSpacer, null),
|
|
4819
|
+
React__default.createElement(FlexCell, { width: "auto", alignSelf: "center" },
|
|
4820
|
+
React__default.createElement(LinkButton, { isDisabled: isClearDisabled, size: settings.filtersPanel.sizes[isMobile() ? 'mobileFooterLinkButton' : 'footerLinkButton'], caption: i18n.pickerInput.clearSelectionButtonSingle, onClick: clearSelection }))));
|
|
4821
|
+
};
|
|
4822
|
+
if (isInRangePredicate) {
|
|
4823
|
+
const value = props.value;
|
|
4824
|
+
return (React__default.createElement("div", null,
|
|
4825
|
+
React__default.createElement(FlexRow, { padding: "12", alignItems: "center", columnGap: "12", borderBottom: true, cx: css$l.container },
|
|
4826
|
+
React__default.createElement(FlexCell, { width: "100%" },
|
|
4827
|
+
React__default.createElement(NumericInput, { size: settings.filtersPanel.sizes.default, value: value?.from ?? null, onValueChange: rangeValueHandler('from'), placeholder: "Min", formatOptions: { maximumFractionDigits: 2 } })),
|
|
4828
|
+
React__default.createElement(FlexCell, { width: "100%" },
|
|
4829
|
+
React__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) }))),
|
|
4830
|
+
renderFooter()));
|
|
4831
|
+
}
|
|
4832
|
+
return (React__default.createElement("div", null,
|
|
4833
|
+
React__default.createElement(FlexRow, { padding: "12", alignItems: "center", borderBottom: true, cx: css$l.container },
|
|
4834
|
+
React__default.createElement(FlexCell, { width: 130 },
|
|
4835
|
+
React__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 } }))),
|
|
4836
|
+
renderFooter()));
|
|
4837
|
+
}
|
|
4838
|
+
|
|
4839
|
+
function FilterItemBody(props) {
|
|
4840
|
+
switch (props.type) {
|
|
4841
|
+
case 'singlePicker':
|
|
4842
|
+
return React__default.createElement(FilterPickerBody, { ...props, selectionMode: "single", valueType: "id" });
|
|
4843
|
+
case 'numeric':
|
|
4844
|
+
return React__default.createElement(FilterNumericBody, { ...props });
|
|
4845
|
+
case 'multiPicker':
|
|
4846
|
+
return React__default.createElement(FilterPickerBody, { ...props, selectionMode: "multi", valueType: "id" });
|
|
4847
|
+
case 'datePicker':
|
|
4848
|
+
return React__default.createElement(FilterDatePickerBody, { ...props, format: props.format || 'DD/MM/YYYY' });
|
|
4849
|
+
case 'rangeDatePicker':
|
|
4850
|
+
return React__default.createElement(FilterRangeDatePickerBody, { ...props, format: props.format || 'DD/MM/YYYY', value: props.value || { from: null, to: null } });
|
|
4851
|
+
case 'custom':
|
|
4852
|
+
return props.render(props);
|
|
4853
|
+
}
|
|
4854
|
+
}
|
|
4855
|
+
|
|
4856
|
+
function useView(props, value) {
|
|
4857
|
+
const forceUpdate = useForceUpdate();
|
|
4858
|
+
let useViewFn;
|
|
4859
|
+
const dataSourceState = {};
|
|
4860
|
+
if (props.type === 'singlePicker' || props.type === 'multiPicker') {
|
|
4861
|
+
useViewFn = props.dataSource.useView.bind(props.dataSource);
|
|
4862
|
+
if (props.type === 'singlePicker') {
|
|
4863
|
+
dataSourceState.selectedId = value;
|
|
4864
|
+
}
|
|
4865
|
+
if (props.type === 'multiPicker') {
|
|
4866
|
+
dataSourceState.checked = value;
|
|
4867
|
+
}
|
|
4868
|
+
}
|
|
4869
|
+
return useViewFn?.(dataSourceState, forceUpdate, { showSelectedOnly: true });
|
|
4870
|
+
}
|
|
4871
|
+
function FiltersToolbarItemImpl(props) {
|
|
4420
4872
|
const { maxCount = 2 } = props;
|
|
4421
4873
|
const isPickersType = props?.type === 'multiPicker' || props?.type === 'singlePicker';
|
|
4422
4874
|
const isMobileScreen = isMobile();
|
|
4875
|
+
const hideHeaderTitle = isPickersType && isMobileScreen;
|
|
4423
4876
|
const floatingMiddleware = useMemo(() => {
|
|
4424
4877
|
const middleware = [
|
|
4425
4878
|
offset(() => {
|
|
@@ -4431,65 +4884,38 @@ function FiltersToolbarItemImpl(props) {
|
|
|
4431
4884
|
}
|
|
4432
4885
|
return middleware;
|
|
4433
4886
|
}, [isPickersType]);
|
|
4434
|
-
const getDefaultPredicate = () => {
|
|
4435
|
-
if (!props.predicates) {
|
|
4436
|
-
return null;
|
|
4437
|
-
}
|
|
4438
|
-
return Object.keys(props.value || {})[0] || props.predicates.find((i) => i.isDefault)?.predicate || props.predicates?.[0].predicate;
|
|
4439
|
-
};
|
|
4440
4887
|
const [isOpen, isOpenChange] = useState(props.autoFocus);
|
|
4441
|
-
const [predicate, setPredicate] = useState(getDefaultPredicate());
|
|
4888
|
+
const [predicate, setPredicate] = useState(getDefaultPredicate(props.predicates, props.value));
|
|
4442
4889
|
const predicateName = React__default.useMemo(() => predicate && props.predicates.find((p) => p.predicate === predicate).name, [predicate]);
|
|
4443
|
-
|
|
4444
|
-
if (props.predicates && Object.keys(props.value || {})[0] && Object.keys(props.value || {})[0] !== predicate) {
|
|
4445
|
-
setPredicate(Object.keys(props.value || {})[0]);
|
|
4446
|
-
}
|
|
4447
|
-
}, [props.value]);
|
|
4448
|
-
const onValueChange = useCallback((value) => {
|
|
4890
|
+
const onValueChange = (value) => {
|
|
4449
4891
|
if (props.predicates) {
|
|
4450
|
-
props.onValueChange({ [
|
|
4892
|
+
props.onValueChange({ [predicate]: value });
|
|
4451
4893
|
}
|
|
4452
4894
|
else {
|
|
4453
|
-
props.onValueChange(
|
|
4895
|
+
props.onValueChange(value);
|
|
4454
4896
|
}
|
|
4455
|
-
}, [props.field, props.onValueChange]);
|
|
4456
|
-
const removeOnclickHandler = () => {
|
|
4457
|
-
props.removeFilter(props.field);
|
|
4458
4897
|
};
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
if (props.
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
if (isInRange(val) && !isInRange(predicate)) {
|
|
4466
|
-
// from simple predicate -> to Range
|
|
4467
|
-
predicateValue = { [props.field]: { [val]: { from: null, to: null } } };
|
|
4468
|
-
}
|
|
4469
|
-
else if (!isInRange(val) && isInRange(predicate)) {
|
|
4470
|
-
// from Range -> to simple predicate
|
|
4471
|
-
predicateValue = { [props.field]: { [val]: null } };
|
|
4898
|
+
useEffect(() => {
|
|
4899
|
+
// This effect needs when the filter dropdown was closed and opened again
|
|
4900
|
+
if (props.predicates && props.value && Object.keys(props.value).length > 0) {
|
|
4901
|
+
const predicateFromValue = Object.keys(props.value)[0];
|
|
4902
|
+
if (predicateFromValue !== predicate) {
|
|
4903
|
+
setPredicate(predicateFromValue);
|
|
4472
4904
|
}
|
|
4473
|
-
props.onValueChange(predicateValue);
|
|
4474
|
-
}
|
|
4475
|
-
else {
|
|
4476
|
-
props.onValueChange({ [props.field]: { [val]: getValue() } });
|
|
4477
4905
|
}
|
|
4478
|
-
|
|
4906
|
+
}, [props.value]);
|
|
4907
|
+
const removeOnclickHandler = () => {
|
|
4908
|
+
props.removeFilter(props.field);
|
|
4479
4909
|
};
|
|
4480
|
-
const renderHeader = (hideTitle) => (React__default.createElement("div", { className: cx(css$
|
|
4481
|
-
props.predicates ? (React__default.createElement(
|
|
4482
|
-
!props?.isAlwaysVisible && (React__default.createElement(LinkButton, { cx: css$
|
|
4910
|
+
const renderHeader = (hideTitle) => (React__default.createElement("div", { className: cx(css$s.header, isPickersType && (props.showSearch ?? css$s.withSearch)) },
|
|
4911
|
+
props.predicates ? (React__default.createElement(FilterPredicatePanel, { predicates: props.predicates, predicate: predicate, type: props.type, onValueChange: props.onValueChange, value: props.value, setPredicate: setPredicate })) : (!hideTitle && (React__default.createElement("div", { className: css$s.title }, props.title))),
|
|
4912
|
+
!props?.isAlwaysVisible && (React__default.createElement(LinkButton, { cx: css$s.removeButton, caption: i18n.filterToolbar.datePicker.removeCaption, onClick: removeOnclickHandler, size: settings.filtersPanel.sizes.pickerBodyLinkButton, icon: settings.filtersPanel.icons.pickerBodyRemoveIcon }))));
|
|
4483
4913
|
const renderBody = (dropdownProps) => {
|
|
4484
|
-
|
|
4485
|
-
return isPickersType ? (React__default.createElement(PickerBodyMobileView, { ...dropdownProps, cx: [css$q.body, UUI_FILTERS_PANEL_ITEM_BODY], title: props.title, width: settings.filtersPanel.sizes.pickerBodyMinWidth, onClose: () => isOpenChange(false) },
|
|
4914
|
+
return isPickersType ? (React__default.createElement(PickerBodyMobileView, { ...dropdownProps, cx: [css$s.body, UUI_FILTERS_PANEL_ITEM_BODY], title: props.title, width: settings.filtersPanel.sizes.pickerBodyMinWidth, onClose: () => isOpenChange(false) },
|
|
4486
4915
|
renderHeader(hideHeaderTitle),
|
|
4487
|
-
React__default.createElement(FilterItemBody, { ...props, ...dropdownProps, selectedPredicate: predicate, value: getValue(), onValueChange: onValueChange }))) : (React__default.createElement(DropdownContainer, { cx: [css$
|
|
4916
|
+
React__default.createElement(FilterItemBody, { ...props, ...dropdownProps, selectedPredicate: predicate, value: getValue(predicate, props.value), onValueChange: onValueChange }))) : (React__default.createElement(DropdownContainer, { cx: [css$s.body, UUI_FILTERS_PANEL_ITEM_BODY], ...dropdownProps },
|
|
4488
4917
|
renderHeader(hideHeaderTitle),
|
|
4489
|
-
React__default.createElement(FilterItemBody, { ...props, ...dropdownProps, selectedPredicate: predicate, value: getValue(), onValueChange: onValueChange })));
|
|
4490
|
-
};
|
|
4491
|
-
const getValue = () => {
|
|
4492
|
-
return predicate ? props.value?.[predicate] : props.value;
|
|
4918
|
+
React__default.createElement(FilterItemBody, { ...props, ...dropdownProps, selectedPredicate: predicate, value: getValue(predicate, props.value), onValueChange: onValueChange })));
|
|
4493
4919
|
};
|
|
4494
4920
|
const getPickerItemName = (item, config) => {
|
|
4495
4921
|
if (item.isLoading) {
|
|
@@ -4500,9 +4926,9 @@ function FiltersToolbarItemImpl(props) {
|
|
|
4500
4926
|
}
|
|
4501
4927
|
return config.getName ? config.getName(item.value) : item.value.name;
|
|
4502
4928
|
};
|
|
4503
|
-
const view = useView(props, getValue());
|
|
4929
|
+
const view = useView(props, getValue(predicate, props.value));
|
|
4504
4930
|
const getTogglerValue = () => {
|
|
4505
|
-
const currentValue = getValue();
|
|
4931
|
+
const currentValue = getValue(predicate, props.value);
|
|
4506
4932
|
const defaultFormat = 'MMM DD, YYYY';
|
|
4507
4933
|
switch (props.type) {
|
|
4508
4934
|
case 'multiPicker': {
|
|
@@ -4568,44 +4994,6 @@ function FiltersToolbarItemImpl(props) {
|
|
|
4568
4994
|
}
|
|
4569
4995
|
const FiltersPanelItem = /* @__PURE__ */React__default.memo(FiltersToolbarItemImpl);
|
|
4570
4996
|
|
|
4571
|
-
const normalizeFilterWithPredicates = (filter) => {
|
|
4572
|
-
if (!filter) {
|
|
4573
|
-
return {};
|
|
4574
|
-
}
|
|
4575
|
-
const result = filter;
|
|
4576
|
-
const keys = Object.keys(filter);
|
|
4577
|
-
for (let n = 0; n < keys.length; n++) {
|
|
4578
|
-
const key = keys[n];
|
|
4579
|
-
const filterValue = filter[key];
|
|
4580
|
-
if (filterValue && typeof filterValue === 'object') {
|
|
4581
|
-
if ('from' in filterValue && 'to' in filterValue) {
|
|
4582
|
-
continue;
|
|
4583
|
-
}
|
|
4584
|
-
if ('in' in filterValue && (!Array.isArray(filterValue.in) || !filterValue.in.length)) {
|
|
4585
|
-
delete filter[key];
|
|
4586
|
-
}
|
|
4587
|
-
if ('nin' in filterValue && (!Array.isArray(filterValue.nin) || !filterValue.nin.length)) {
|
|
4588
|
-
delete filter[key];
|
|
4589
|
-
}
|
|
4590
|
-
if ('inRange' in filterValue) {
|
|
4591
|
-
if (!filterValue.inRange || (!filterValue.inRange.from && !filterValue.inRange.to)) {
|
|
4592
|
-
delete filter[key];
|
|
4593
|
-
}
|
|
4594
|
-
}
|
|
4595
|
-
if ('notInRange' in filterValue) {
|
|
4596
|
-
if (!filterValue.notInRange || (!filterValue.notInRange.from && !filterValue.notInRange.to)) {
|
|
4597
|
-
delete filter[key];
|
|
4598
|
-
}
|
|
4599
|
-
}
|
|
4600
|
-
Object.keys(filterValue).forEach((predicate) => {
|
|
4601
|
-
if (filterValue[predicate] === null || filterValue[predicate] === undefined) {
|
|
4602
|
-
delete filter[key];
|
|
4603
|
-
}
|
|
4604
|
-
});
|
|
4605
|
-
}
|
|
4606
|
-
}
|
|
4607
|
-
return result;
|
|
4608
|
-
};
|
|
4609
4997
|
function FiltersToolbarImpl(props) {
|
|
4610
4998
|
const { filters, tableState, setTableState, size = (settings.filtersPanel.sizes.default) } = props;
|
|
4611
4999
|
const [newFilterId, setNewFilterId] = useState(null);
|
|
@@ -4638,8 +5026,8 @@ function FiltersToolbarImpl(props) {
|
|
|
4638
5026
|
filter: newFilter,
|
|
4639
5027
|
});
|
|
4640
5028
|
};
|
|
4641
|
-
const handleFilterChange = (newFilter) => {
|
|
4642
|
-
const filter = normalizeFilterWithPredicates({ ...tableState.filter,
|
|
5029
|
+
const handleFilterChange = (newFilter, field) => {
|
|
5030
|
+
const filter = normalizeFilterWithPredicates({ ...tableState.filter, [field]: newFilter });
|
|
4643
5031
|
setTableState({
|
|
4644
5032
|
...tableState,
|
|
4645
5033
|
filter: filter,
|
|
@@ -4688,7 +5076,7 @@ function FiltersToolbarImpl(props) {
|
|
|
4688
5076
|
}, [newFilterId, sortedActiveFilters]);
|
|
4689
5077
|
return (React__default.createElement(React__default.Fragment, null,
|
|
4690
5078
|
sortedActiveFilters.map((f) => (React__default.createElement(FlexCell$1, { width: "auto", key: f.field },
|
|
4691
|
-
React__default.createElement(FiltersPanelItem, { ...f, value: tableState.filter?.[f.field], onValueChange: handleFilterChange, key: f.field, autoFocus: newFilterId === f.field, removeFilter: removeFilter, size: size })))),
|
|
5079
|
+
React__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 })))),
|
|
4692
5080
|
!isAllFiltersAlwaysVisible && (React__default.createElement(PickerInput, { dataSource: dataSource, value: selectedFilters, onValueChange: onFiltersChange, selectionMode: "multi", valueType: "entity", renderRow: (props) => (React__default.createElement(DataPickerRow, { ...props, padding: "12", key: props.key, onCheck: (row) => {
|
|
4693
5081
|
props.onCheck && props.onCheck(row);
|
|
4694
5082
|
setNewFilterId(row.value.field);
|
|
@@ -4696,7 +5084,7 @@ function FiltersToolbarImpl(props) {
|
|
|
4696
5084
|
}
|
|
4697
5085
|
const FiltersPanel = /* @__PURE__ */React__default.memo(FiltersToolbarImpl);
|
|
4698
5086
|
|
|
4699
|
-
var css$
|
|
5087
|
+
var css$k = {"delete-button":"G-vsF6","deleteButton":"G-vsF6","tab-button":"ukt8Jm","tabButton":"ukt8Jm","targetOpen":"ON2vdE"};
|
|
4700
5088
|
|
|
4701
5089
|
function PresetActionsDropdown(props) {
|
|
4702
5090
|
const { uuiNotifications } = useUuiContext();
|
|
@@ -4755,416 +5143,123 @@ function PresetActionsDropdown(props) {
|
|
|
4755
5143
|
React__default.createElement(DropdownMenuButton, { key: `${props.preset.id}-copyLink`, icon: settings.presetsPanel.icons.copyLinkIcon, caption: "Copy Link", onClick: copyUrlToClipboard }),
|
|
4756
5144
|
!isReadonlyPreset && (React__default.createElement(React__default.Fragment, null,
|
|
4757
5145
|
React__default.createElement(DropdownMenuSplitter, { key: "delete-splitter" }),
|
|
4758
|
-
React__default.createElement(DropdownMenuButton, { icon: settings.presetsPanel.icons.deleteIcon, caption: "Delete", cx: css$
|
|
5146
|
+
React__default.createElement(DropdownMenuButton, { icon: settings.presetsPanel.icons.deleteIcon, caption: "Delete", cx: css$k.deleteButton, onClick: deleteHandler })))));
|
|
4759
5147
|
};
|
|
4760
5148
|
const renderTarget = useCallback((dropdownProps) => {
|
|
4761
|
-
return (React__default.createElement(IconButton, { cx: [css$
|
|
4762
|
-
}, []);
|
|
4763
|
-
return (React__default.createElement(Dropdown, { renderBody: renderBody, renderTarget: renderTarget, placement: "bottom-end", middleware: [offset(22)] }));
|
|
4764
|
-
}
|
|
4765
|
-
|
|
4766
|
-
const UUI_PRESETS_PANEL_ADD_BUTTON = 'uui-presets-panel-add-button';
|
|
4767
|
-
const UUI_PRESETS_PANEL_MORE_BUTTON = 'uui-presets-panel-more-button';
|
|
4768
|
-
const UUI_PRESETS_PANEL_INPUT = 'uui-presets-panel-input';
|
|
4769
|
-
const UUI_PRESETS_PANEL_PRESET = 'uui-presets-panel-preset';
|
|
4770
|
-
|
|
4771
|
-
var css$o = {"preset-input-cell":"TVqZZ-","presetInputCell":"TVqZZ-","preset-input":"_5x0UL2","presetInput":"_5x0UL2"};
|
|
4772
|
-
|
|
4773
|
-
function PresetInput(props) {
|
|
4774
|
-
const [presetCaption, setPresetCaption] = useState(props.preset?.name || '');
|
|
4775
|
-
const [readonly, setReadonly] = useState(false);
|
|
4776
|
-
const cancelActionHandler = useCallback(() => {
|
|
4777
|
-
setPresetCaption('');
|
|
4778
|
-
props.onCancel();
|
|
4779
|
-
}, [props.onCancel]);
|
|
4780
|
-
const acceptActionHandler = useCallback(async () => {
|
|
4781
|
-
setReadonly(() => true);
|
|
4782
|
-
if (presetCaption) {
|
|
4783
|
-
await props.onSuccess(presetCaption);
|
|
4784
|
-
}
|
|
4785
|
-
props.onCancel();
|
|
4786
|
-
setReadonly(() => false);
|
|
4787
|
-
}, [presetCaption]);
|
|
4788
|
-
const newPresetOnBlurHandler = useCallback(() => {
|
|
4789
|
-
if (presetCaption.length) {
|
|
4790
|
-
return;
|
|
4791
|
-
}
|
|
4792
|
-
props.onCancel();
|
|
4793
|
-
}, [presetCaption.length, props.onCancel]);
|
|
4794
|
-
return (React__default.createElement(FlexCell, { cx: [css$o.presetInputCell, UUI_PRESETS_PANEL_INPUT], minWidth: 180 },
|
|
4795
|
-
React__default.createElement(TextInput, { cx: css$o.presetInput, onValueChange: setPresetCaption, value: presetCaption, onCancel: cancelActionHandler, onAccept: acceptActionHandler, onBlur: newPresetOnBlurHandler, autoFocus: true, maxLength: 50, isReadonly: readonly })));
|
|
4796
|
-
}
|
|
4797
|
-
|
|
4798
|
-
var css$n = {"preset":"fnEmxW","activePreset":"_9Eo7CG"};
|
|
4799
|
-
|
|
4800
|
-
function Preset(props) {
|
|
4801
|
-
const [isRenamePreset, setIsRenamePreset] = useState(false);
|
|
4802
|
-
const choosePresetHandler = useCallback(() => props.choosePreset(props.preset), [props]);
|
|
4803
|
-
const cancelRenamePreset = useCallback(() => {
|
|
4804
|
-
setIsRenamePreset(() => false);
|
|
4805
|
-
}, []);
|
|
4806
|
-
const setPresetForRename = useCallback(() => {
|
|
4807
|
-
if (!isRenamePreset) {
|
|
4808
|
-
setIsRenamePreset(() => true);
|
|
4809
|
-
}
|
|
4810
|
-
}, []);
|
|
4811
|
-
const handlePresetRename = useCallback((name) => {
|
|
4812
|
-
const newPreset = {
|
|
4813
|
-
...props.preset,
|
|
4814
|
-
name: name,
|
|
4815
|
-
};
|
|
4816
|
-
return props.updatePreset(newPreset);
|
|
4817
|
-
}, [props.preset]);
|
|
4818
|
-
const isPresetActive = props.activePresetId === props.preset.id;
|
|
4819
|
-
const PresetActionsDropdownComponent = useCallback(() => React__default.createElement(PresetActionsDropdown, { renamePreset: setPresetForRename, ...props }), [props.preset, props.tableState, props.activePresetId]);
|
|
4820
|
-
return (React__default.createElement(FlexCell, { key: props.preset.id, alignSelf: "center", width: "auto" }, isRenamePreset ? (React__default.createElement(PresetInput, { onCancel: cancelRenamePreset, onSuccess: handlePresetRename, preset: props.preset })) : (React__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 }))));
|
|
4821
|
-
}
|
|
4822
|
-
|
|
4823
|
-
var css$m = {"divider":"LZC2jN","dropdownDeleteIcon":"yvVkYD","presetsWrapper":"eYyq6H","addPresetContainer":"PtfQLd","dropContainer":"K92XXE"};
|
|
4824
|
-
|
|
4825
|
-
function PresetsPanel(props) {
|
|
4826
|
-
const [isAddingPreset, setIsAddingPreset] = useState(false);
|
|
4827
|
-
const setAddingPreset = useCallback(() => {
|
|
4828
|
-
setIsAddingPreset(true);
|
|
4829
|
-
}, []);
|
|
4830
|
-
const cancelAddingPreset = useCallback(() => {
|
|
4831
|
-
setIsAddingPreset(false);
|
|
4832
|
-
}, []);
|
|
4833
|
-
const { presets, ...presetApi } = props;
|
|
4834
|
-
const renderPreset = (preset) => {
|
|
4835
|
-
return React__default.createElement(Preset, { key: preset.id, preset: preset, addPreset: setAddingPreset, ...presetApi });
|
|
4836
|
-
};
|
|
4837
|
-
const renderAddPresetButton = useCallback(() => {
|
|
4838
|
-
return (React__default.createElement("div", { key: "addingPresetBlock", className: css$m.addPresetContainer }, !isAddingPreset ? (React__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__default.createElement(PresetInput, { onCancel: cancelAddingPreset, onSuccess: props.createNewPreset }))));
|
|
4839
|
-
}, [isAddingPreset]);
|
|
4840
|
-
const onPresetDropdownSelect = (preset) => {
|
|
4841
|
-
props.choosePreset(preset.preset);
|
|
4842
|
-
};
|
|
4843
|
-
const renderMoreButtonDropdown = (item, hiddenItems) => {
|
|
4844
|
-
return (React__default.createElement(Dropdown, { key: "more", renderTarget: (props) => (React__default.createElement(FlexRow, null,
|
|
4845
|
-
React__default.createElement("div", { className: css$m.divider }),
|
|
4846
|
-
React__default.createElement(Button, { cx: UUI_PRESETS_PANEL_MORE_BUTTON, fill: "ghost", color: "secondary", caption: `${hiddenItems?.length || ''} more`, ...props }))), renderBody: (propsBody) => (React__default.createElement(DropdownMenuBody, { minWidth: 230, maxHeight: 300, ...propsBody },
|
|
4847
|
-
React__default.createElement(ScrollBars, null, hiddenItems.map((hiddenItem) => (React__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)) })))))) }));
|
|
4848
|
-
};
|
|
4849
|
-
const getPresetPriority = (preset, index) => {
|
|
4850
|
-
return preset.id === props.activePresetId ? 100499 : 1000 - index;
|
|
4851
|
-
};
|
|
4852
|
-
const getPanelItems = () => {
|
|
4853
|
-
return [
|
|
4854
|
-
...orderBy(props.presets, ({ order }) => order)
|
|
4855
|
-
.map((preset, index) => ({
|
|
4856
|
-
id: preset.id.toString(),
|
|
4857
|
-
render: () => renderPreset(preset),
|
|
4858
|
-
priority: getPresetPriority(preset, index),
|
|
4859
|
-
preset: preset,
|
|
4860
|
-
})),
|
|
4861
|
-
{
|
|
4862
|
-
id: 'collapsedContainer', render: renderMoreButtonDropdown, priority: 100501, collapsedContainer: true,
|
|
4863
|
-
},
|
|
4864
|
-
{ id: 'addPreset', render: renderAddPresetButton, priority: 100501 },
|
|
4865
|
-
];
|
|
4866
|
-
};
|
|
4867
|
-
return (React__default.createElement(FlexCell, { grow: 1, minWidth: 310, rawProps: props.rawProps },
|
|
4868
|
-
React__default.createElement(FlexRow, { size: null, columnGap: "12", cx: css$m.presetsWrapper },
|
|
4869
|
-
React__default.createElement(AdaptivePanel, { items: getPanelItems() }))));
|
|
4870
|
-
}
|
|
4871
|
-
|
|
4872
|
-
const defaultPredicates = {
|
|
4873
|
-
numeric: [
|
|
4874
|
-
{ predicate: 'eq', name: '=', isDefault: true }, { predicate: 'neq', name: '≠' }, { predicate: 'lte', name: '≤' }, { predicate: 'gte', name: '≥' }, { predicate: 'inRange', name: 'In Range' },
|
|
4875
|
-
],
|
|
4876
|
-
multiPicker: [{ predicate: 'in', name: 'is', isDefault: true }, { predicate: 'nin', name: 'is not' }],
|
|
4877
|
-
rangeDatePicker: [{ predicate: 'inRange', name: 'In Range', isDefault: true }, { predicate: 'notInRange', name: 'Not in Range' }],
|
|
4878
|
-
};
|
|
4879
|
-
|
|
4880
|
-
const useColumnsWithFilters = (initialColumns, filters) => {
|
|
4881
|
-
const makeFilterRenderCallback = useCallback((key) => function (filterLens, dropdownProps) {
|
|
4882
|
-
const filter = filters?.find((f) => f.columnKey === key);
|
|
4883
|
-
if (!filter)
|
|
4884
|
-
return null;
|
|
4885
|
-
const props = filterLens.prop(filter.field).toProps();
|
|
4886
|
-
return React__default.createElement(FilterItemBody, { ...props, ...filter, ...dropdownProps });
|
|
4887
|
-
}, [filters]);
|
|
4888
|
-
const columns = useMemo(() => {
|
|
4889
|
-
if (filters) {
|
|
4890
|
-
const filterKeys = filters.map((f) => f.columnKey);
|
|
4891
|
-
const newColumns = (initialColumns.map((column) => {
|
|
4892
|
-
if (filterKeys.includes(column.key)) {
|
|
4893
|
-
return {
|
|
4894
|
-
...column,
|
|
4895
|
-
renderFilter: makeFilterRenderCallback(column.key),
|
|
4896
|
-
};
|
|
4897
|
-
}
|
|
4898
|
-
else {
|
|
4899
|
-
return column;
|
|
4900
|
-
}
|
|
4901
|
-
}));
|
|
4902
|
-
return newColumns;
|
|
4903
|
-
}
|
|
4904
|
-
return initialColumns;
|
|
4905
|
-
}, [filters, initialColumns]);
|
|
4906
|
-
return columns;
|
|
4907
|
-
};
|
|
4908
|
-
|
|
4909
|
-
var css$l = {"unpin-icon":"_32M-dr","unpinIcon":"_32M-dr","pin-toggler-icon":"_2PraiN","pinTogglerIcon":"_2PraiN"};
|
|
4910
|
-
|
|
4911
|
-
function PinIconButton(props) {
|
|
4912
|
-
const i18nLocal = i18n.tables.columnsConfigurationModal;
|
|
4913
|
-
const { onTogglePin, pinPosition, canUnpin, } = props;
|
|
4914
|
-
const isPinned = !!pinPosition;
|
|
4915
|
-
const isPinnedAlways = isPinned && !canUnpin;
|
|
4916
|
-
let pinUnpinNode;
|
|
4917
|
-
if (isPinned) {
|
|
4918
|
-
const unpinIcon = getUnpinIcon({ isPinnedAlways, pinPosition });
|
|
4919
|
-
const iconTooltip = isPinnedAlways ? i18nLocal.lockedColumnPinButton : i18nLocal.unPinColumnButton;
|
|
4920
|
-
const unpinClickHandler = isPinnedAlways ? undefined : () => onTogglePin(undefined);
|
|
4921
|
-
pinUnpinNode = (React.createElement(Tooltip, { content: iconTooltip, placement: "bottom", color: "inverted" },
|
|
4922
|
-
React.createElement(IconButton, { cx: cx$1(!isPinnedAlways && css$l.unpinIcon, css$l.pinTogglerIcon), icon: unpinIcon, onClick: unpinClickHandler, isDisabled: isPinnedAlways, color: "primary" })));
|
|
4923
|
-
}
|
|
4924
|
-
else {
|
|
4925
|
-
pinUnpinNode = (React.createElement(React.Fragment, null,
|
|
4926
|
-
React.createElement(Tooltip, { content: i18nLocal.pinColumnToTheLeftButton, placement: "bottom", color: "inverted" },
|
|
4927
|
-
React.createElement(IconButton, { cx: css$l.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon, onClick: () => onTogglePin('left'), isDisabled: isPinnedAlways })),
|
|
4928
|
-
React.createElement(Tooltip, { content: i18nLocal.pinColumnToTheRightButton, placement: "bottom", color: "inverted" },
|
|
4929
|
-
React.createElement(IconButton, { cx: css$l.pinTogglerIcon, icon: settings.dataTable.icons.columnsConfigurationModal.pinRightIcon, onClick: () => onTogglePin('right'), isDisabled: isPinnedAlways }))));
|
|
4930
|
-
}
|
|
4931
|
-
return pinUnpinNode;
|
|
4932
|
-
}
|
|
4933
|
-
function getUnpinIcon(params) {
|
|
4934
|
-
const { isPinnedAlways, pinPosition } = params;
|
|
4935
|
-
if (isPinnedAlways) {
|
|
4936
|
-
return settings.dataTable.icons.columnsConfigurationModal.lockIcon;
|
|
4937
|
-
}
|
|
4938
|
-
switch (pinPosition) {
|
|
4939
|
-
case 'left': {
|
|
4940
|
-
return settings.dataTable.icons.columnsConfigurationModal.pinLeftIcon;
|
|
4941
|
-
}
|
|
4942
|
-
case 'right': {
|
|
4943
|
-
return settings.dataTable.icons.columnsConfigurationModal.pinRightIcon;
|
|
4944
|
-
}
|
|
4945
|
-
default: {
|
|
4946
|
-
return;
|
|
4947
|
-
}
|
|
4948
|
-
}
|
|
5149
|
+
return (React__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 }));
|
|
5150
|
+
}, []);
|
|
5151
|
+
return (React__default.createElement(Dropdown, { renderBody: renderBody, renderTarget: renderTarget, placement: "bottom-end", middleware: [offset(22)] }));
|
|
4949
5152
|
}
|
|
4950
5153
|
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
const
|
|
4954
|
-
|
|
4955
|
-
const { toggleVisibility, togglePin, onCanAcceptDrop, onDrop, columnConfig, isDndAllowed, isPinnedAlways, } = column;
|
|
4956
|
-
const { isVisible, fix } = columnConfig;
|
|
4957
|
-
const pinPosition = fix || (isPinnedAlways ? 'left' : undefined);
|
|
4958
|
-
const isPinned = !!pinPosition;
|
|
4959
|
-
const data = { column, columnConfig };
|
|
4960
|
-
const renderContent = (dndActorParams) => {
|
|
4961
|
-
const wrapperClasses = cx$1(css$k.rowWrapper, !isPinned && css$k.notPinned, dndActorParams.isDragGhost && uuiDndState.dragGhost, 'uui-dt-columns-config-row');
|
|
4962
|
-
const { onTouchStart, onPointerDown, ...restEventHandlers } = dndActorParams.eventHandlers;
|
|
4963
|
-
const { ref, ...dndActorPropsWithoutRef } = dndActorParams;
|
|
4964
|
-
return (React.createElement(FlexRow, { size: settings.dataTable.sizes.columnsConfigurationModal.columnRow, cx: wrapperClasses, ref: dndActorParams.ref, rawProps: { ...restEventHandlers }, alignItems: "top" },
|
|
4965
|
-
React.createElement(DragHandle, { dragHandleIcon: settings.dataTable.icons.columnsConfigurationModal.dragIndicator, rawProps: { onTouchStart, onPointerDown }, isDisabled: !isDndAllowed, cx: cx$1(css$k.dragHandle, !isDndAllowed && css$k.dndDisabled) }),
|
|
4966
|
-
React.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 }),
|
|
4967
|
-
React.createElement(FlexRow, { size: null, cx: css$k.pinIconButton },
|
|
4968
|
-
React.createElement(PinIconButton, { pinPosition: pinPosition, canUnpin: !isPinnedAlways, onTogglePin: togglePin })),
|
|
4969
|
-
React.createElement(DropMarker, { ...dndActorPropsWithoutRef })));
|
|
4970
|
-
};
|
|
4971
|
-
return (React.createElement(DndActor, { key: column.key, srcData: isDndAllowed && data, dstData: data, canAcceptDrop: onCanAcceptDrop, onDrop: onDrop, render: renderContent }));
|
|
4972
|
-
});
|
|
5154
|
+
const UUI_PRESETS_PANEL_ADD_BUTTON = 'uui-presets-panel-add-button';
|
|
5155
|
+
const UUI_PRESETS_PANEL_MORE_BUTTON = 'uui-presets-panel-more-button';
|
|
5156
|
+
const UUI_PRESETS_PANEL_INPUT = 'uui-presets-panel-input';
|
|
5157
|
+
const UUI_PRESETS_PANEL_PRESET = 'uui-presets-panel-preset';
|
|
4973
5158
|
|
|
4974
|
-
var css$j = {"
|
|
5159
|
+
var css$j = {"preset-input-cell":"_-5vEGf","presetInputCell":"_-5vEGf","preset-input":"SMKs80","presetInput":"SMKs80"};
|
|
4975
5160
|
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
const
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
getSearchFields: props.getSearchFields,
|
|
4988
|
-
});
|
|
4989
|
-
const apply = useCallback(() => modalProps.success(columnsConfig), [columnsConfig, modalProps]);
|
|
4990
|
-
const close = useCallback(() => modalProps.abort(), [modalProps]);
|
|
4991
|
-
const isNoData = useMemo(() => Object.values(groupedColumns).every((v) => !v.length), [groupedColumns]);
|
|
4992
|
-
const renderVisible = () => {
|
|
4993
|
-
const amountPinnedLeft = groupedColumns.displayedPinnedLeft.length;
|
|
4994
|
-
const amountPinnedRight = groupedColumns.displayedPinnedRight.length;
|
|
4995
|
-
const amountUnPinned = groupedColumns.displayedUnpinned.length;
|
|
4996
|
-
const totalAmountOfVisibleColumns = amountPinnedLeft + amountUnPinned + amountPinnedRight;
|
|
4997
|
-
if (!totalAmountOfVisibleColumns) {
|
|
4998
|
-
return null;
|
|
4999
|
-
}
|
|
5000
|
-
const hasDividerBelowPinnedLeft = !!(amountPinnedLeft && amountUnPinned);
|
|
5001
|
-
const hasDividerAbovePinnedRight = !!(amountPinnedRight && amountUnPinned);
|
|
5002
|
-
const divider = (React.createElement(FlexRow, { size: null, cx: css$j.hDivider }));
|
|
5003
|
-
return (React.createElement(React.Fragment, null,
|
|
5004
|
-
renderGroupTitle(i18n$1.displayedSectionTitle, totalAmountOfVisibleColumns),
|
|
5005
|
-
React.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.pinnedToTheLeftSubgroupTitle, items: groupedColumns.displayedPinnedLeft }),
|
|
5006
|
-
hasDividerBelowPinnedLeft && divider,
|
|
5007
|
-
React.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.notPinnedSubgroupTitle, items: groupedColumns.displayedUnpinned }),
|
|
5008
|
-
hasDividerAbovePinnedRight && divider,
|
|
5009
|
-
React.createElement(SubGroup, { renderItem: props.renderItem, title: i18n$1.pinnedToTheRightSubgroupTitle, items: groupedColumns.displayedPinnedRight })));
|
|
5010
|
-
};
|
|
5011
|
-
const renderHidden = () => {
|
|
5012
|
-
const items = groupedColumns.hidden;
|
|
5013
|
-
const title = renderGroupTitle(i18n$1.hiddenSectionTitle, items.length);
|
|
5014
|
-
if (!items.length) {
|
|
5015
|
-
return null;
|
|
5161
|
+
function PresetInput(props) {
|
|
5162
|
+
const [presetCaption, setPresetCaption] = useState(props.preset?.name || '');
|
|
5163
|
+
const [readonly, setReadonly] = useState(false);
|
|
5164
|
+
const cancelActionHandler = useCallback(() => {
|
|
5165
|
+
setPresetCaption('');
|
|
5166
|
+
props.onCancel();
|
|
5167
|
+
}, [props.onCancel]);
|
|
5168
|
+
const acceptActionHandler = useCallback(async () => {
|
|
5169
|
+
setReadonly(() => true);
|
|
5170
|
+
if (presetCaption) {
|
|
5171
|
+
await props.onSuccess(presetCaption);
|
|
5016
5172
|
}
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
React.createElement(ModalWindow, { cx: [css$j.root, 'uui-columns-config-modal'], height: "95dvh", maxHeight: "95dvh" },
|
|
5024
|
-
React.createElement(ModalHeader, { title: i18n$1.configureColumnsTitle, onClose: close }),
|
|
5025
|
-
React.createElement(FlexRow, { borderBottom: true, cx: css$j.searchArea },
|
|
5026
|
-
React.createElement(SearchInput, { size: settings.dataTable.sizes.columnsConfigurationModal.searchInput, value: searchValue, onValueChange: setSearchValue, placeholder: i18n$1.searchPlaceholder }),
|
|
5027
|
-
React.createElement(Dropdown, { closeOnTargetClick: true, renderBody: () => (React.createElement(DropdownMenuBody, { minWidth: 100 },
|
|
5028
|
-
React.createElement(DropdownMenuButton, { caption: i18n$1.clearAllButton, onClick: uncheckAll }),
|
|
5029
|
-
React.createElement(DropdownMenuButton, { caption: i18n$1.selectAllButton, onClick: checkAll }))), renderTarget: (props) => (React.createElement(Button, { ...props, fill: "none", icon: settings.dataTable.icons.columnsConfigurationModal.menuIcon, size: settings.dataTable.sizes.columnsConfigurationModal.menuButton, color: "secondary", isDropdown: false })) })),
|
|
5030
|
-
React.createElement(Panel, { background: "surface-main", cx: css$j.mainPanel },
|
|
5031
|
-
React.createElement(ScrollBars, null,
|
|
5032
|
-
renderVisible(),
|
|
5033
|
-
renderHidden(),
|
|
5034
|
-
isNoData && (React.createElement(FlexRow, { cx: css$j.noData },
|
|
5035
|
-
React.createElement(Text, { cx: css$j.noDataTitle }, i18n$1.noResultsFound.title),
|
|
5036
|
-
React.createElement(Text, { cx: css$j.noDataSubTitle }, i18n$1.noResultsFound.subTitle))))),
|
|
5037
|
-
React.createElement(ModalFooter, { borderTop: true },
|
|
5038
|
-
React.createElement(LinkButton, { icon: settings.dataTable.icons.columnsConfigurationModal.resetIcon, caption: i18n$1.resetToDefaultButton, onClick: reset }),
|
|
5039
|
-
React.createElement(FlexSpacer, null),
|
|
5040
|
-
React.createElement(Button, { fill: "none", color: "secondary", caption: i18n$1.cancelButton, onClick: close }),
|
|
5041
|
-
!hasAnySelectedColumns ? (React.createElement(Tooltip, { content: i18n$1.enableAtLeastOneColumnMessage, placement: "top-end", color: "critical" }, applyButton)) : (applyButton)))));
|
|
5042
|
-
}
|
|
5043
|
-
function SubGroup(props) {
|
|
5044
|
-
const [isExpanded, setIsExpanded] = useState(true);
|
|
5045
|
-
const { title, items, renderItem } = props;
|
|
5046
|
-
const isCollapsible = !!title;
|
|
5047
|
-
if (items.length) {
|
|
5048
|
-
const content = (React.createElement(FlexRow, { cx: css$j.groupItems, size: settings.dataTable.sizes.columnsConfigurationModal.columnRow }, items.map((c) => (React.createElement(ColumnRow, { column: c, key: c.key, renderItem: renderItem })))));
|
|
5049
|
-
if (isCollapsible) {
|
|
5050
|
-
const renderTitle = (isOpened) => {
|
|
5051
|
-
const toggleIcon = settings.dataTable.icons.columnsConfigurationModal[isOpened ? 'expandedIcon' : 'collapsedIcon'];
|
|
5052
|
-
return (React.createElement(FlexRow, { cx: cx$1(css$j.subgroup) },
|
|
5053
|
-
React.createElement(IconContainer, { icon: toggleIcon }),
|
|
5054
|
-
React.createElement(Text, { size: "none", color: "tertiary", cx: css$j.subgroupTitle }, title)));
|
|
5055
|
-
};
|
|
5056
|
-
return (React.createElement(Accordion$1, { value: isExpanded, onValueChange: setIsExpanded, renderTitle: renderTitle, cx: css$j.subgroupAccordion }, content));
|
|
5173
|
+
props.onCancel();
|
|
5174
|
+
setReadonly(() => false);
|
|
5175
|
+
}, [presetCaption]);
|
|
5176
|
+
const newPresetOnBlurHandler = useCallback(() => {
|
|
5177
|
+
if (presetCaption.length) {
|
|
5178
|
+
return;
|
|
5057
5179
|
}
|
|
5058
|
-
|
|
5059
|
-
}
|
|
5060
|
-
return
|
|
5180
|
+
props.onCancel();
|
|
5181
|
+
}, [presetCaption.length, props.onCancel]);
|
|
5182
|
+
return (React__default.createElement(FlexCell, { cx: [css$j.presetInputCell, UUI_PRESETS_PANEL_INPUT], minWidth: 180 },
|
|
5183
|
+
React__default.createElement(TextInput, { cx: css$j.presetInput, onValueChange: setPresetCaption, value: presetCaption, onCancel: cancelActionHandler, onAccept: acceptActionHandler, onBlur: newPresetOnBlurHandler, autoFocus: true, maxLength: 50, isReadonly: readonly })));
|
|
5061
5184
|
}
|
|
5062
5185
|
|
|
5063
|
-
|
|
5064
|
-
const firstNotChildIndex = rows.findIndex((other) => other.depth < row.depth || (row.depth === other.depth && other.isPinned));
|
|
5065
|
-
if (firstNotChildIndex === -1) {
|
|
5066
|
-
return [rows, []];
|
|
5067
|
-
}
|
|
5068
|
-
if (firstNotChildIndex === 0) {
|
|
5069
|
-
return [[], rows];
|
|
5070
|
-
}
|
|
5071
|
-
const children = rows.slice(0, firstNotChildIndex);
|
|
5072
|
-
const rest = rows.slice(firstNotChildIndex, rows.length);
|
|
5073
|
-
return [children, rest];
|
|
5074
|
-
};
|
|
5075
|
-
|
|
5076
|
-
var css$i = {"listContainer":"_9m-7eB","header":"-chN3h","group":"ePmcSK","stickyHeader":"WMdsoM"};
|
|
5077
|
-
|
|
5078
|
-
function DataRowsGroup({ row, childRows, renderRow, top = 1, }) {
|
|
5079
|
-
const rowRef = useRef(undefined);
|
|
5080
|
-
const childrenPinnedTop = row.isPinned ? (top + (rowRef.current?.clientHeight ?? 0)) : top;
|
|
5081
|
-
return (React__default.createElement("div", { className: css$i.group, key: row.rowKey },
|
|
5082
|
-
React__default.createElement("div", { className: row.isPinned ? css$i.stickyHeader : css$i.header,
|
|
5083
|
-
// Gaps between pinned parents should be removed by -1 from top height.
|
|
5084
|
-
// Otherwise, sometimes top value is rounded top.
|
|
5085
|
-
style: { zIndex: row.depth + 10, top: top - 1 }, ref: rowRef }, renderRow(row)),
|
|
5086
|
-
childRows.length > 0 && (React__default.createElement("div", null,
|
|
5087
|
-
React__default.createElement(DataRowsGroups, { rows: childRows, renderRow: renderRow, top: childrenPinnedTop })))));
|
|
5088
|
-
}
|
|
5089
|
-
const renderRows = (rows, renderRow, top) => {
|
|
5090
|
-
if (!rows.length)
|
|
5091
|
-
return [];
|
|
5092
|
-
const [row, ...rest] = rows;
|
|
5093
|
-
if (!rest.length) {
|
|
5094
|
-
return [renderRow(row)];
|
|
5095
|
-
}
|
|
5096
|
-
const [next] = rest;
|
|
5097
|
-
if (next.depth <= row.depth && !row.isPinned) {
|
|
5098
|
-
return [renderRow(row)].concat(renderRows(rest, renderRow, top));
|
|
5099
|
-
}
|
|
5100
|
-
const [children, otherRows] = getChildrenAndRest(row, rest);
|
|
5101
|
-
const group = (React__default.createElement(DataRowsGroup, { row: row, childRows: children, renderRow: renderRow, top: top, key: row.rowKey }));
|
|
5102
|
-
return [group].concat(renderRows(otherRows, renderRow, top));
|
|
5103
|
-
};
|
|
5104
|
-
function DataRowsGroups({ rows, renderRow, top = 1, }) {
|
|
5105
|
-
const rowsWithGroups = renderRows(rows, renderRow, top);
|
|
5106
|
-
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
5107
|
-
return (React__default.createElement(React__default.Fragment, null, rowsWithGroups));
|
|
5108
|
-
}
|
|
5186
|
+
var css$i = {"preset":"Bvv6qX","activePreset":"pJ2Nkh"};
|
|
5109
5187
|
|
|
5110
|
-
function
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5188
|
+
function Preset(props) {
|
|
5189
|
+
const [isRenamePreset, setIsRenamePreset] = useState(false);
|
|
5190
|
+
const choosePresetHandler = useCallback(() => props.choosePreset(props.preset), [props]);
|
|
5191
|
+
const cancelRenamePreset = useCallback(() => {
|
|
5192
|
+
setIsRenamePreset(() => false);
|
|
5193
|
+
}, []);
|
|
5194
|
+
const setPresetForRename = useCallback(() => {
|
|
5195
|
+
if (!isRenamePreset) {
|
|
5196
|
+
setIsRenamePreset(() => true);
|
|
5197
|
+
}
|
|
5198
|
+
}, []);
|
|
5199
|
+
const handlePresetRename = useCallback((name) => {
|
|
5200
|
+
const newPreset = {
|
|
5201
|
+
...props.preset,
|
|
5202
|
+
name: name,
|
|
5203
|
+
};
|
|
5204
|
+
return props.updatePreset(newPreset);
|
|
5205
|
+
}, [props.preset]);
|
|
5206
|
+
const isPresetActive = props.activePresetId === props.preset.id;
|
|
5207
|
+
const PresetActionsDropdownComponent = useCallback(() => React__default.createElement(PresetActionsDropdown, { renamePreset: setPresetForRename, ...props }), [props.preset, props.tableState, props.activePresetId]);
|
|
5208
|
+
return (React__default.createElement(FlexCell, { key: props.preset.id, alignSelf: "center", width: "auto" }, isRenamePreset ? (React__default.createElement(PresetInput, { onCancel: cancelRenamePreset, onSuccess: handlePresetRename, preset: props.preset })) : (React__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 }))));
|
|
5114
5209
|
}
|
|
5115
5210
|
|
|
5116
|
-
var css$h = {"
|
|
5211
|
+
var css$h = {"divider":"lnbSjC","dropdownDeleteIcon":"_4aIEmS","presetsWrapper":"mOOabL","addPresetContainer":"_5qCjcl","dropContainer":"_8-raMS"};
|
|
5117
5212
|
|
|
5118
|
-
function
|
|
5119
|
-
const
|
|
5120
|
-
const
|
|
5121
|
-
|
|
5122
|
-
const { columns, config, defaultConfig } = useColumnsConfig(columnsWithFilters, props.value?.columnsConfig);
|
|
5123
|
-
const defaultRenderRow = React.useCallback((rowProps) => {
|
|
5124
|
-
return (React.createElement(DataTableRow, { size: props.size || settings.dataTable.sizes.body.row, columnsGap: props.columnsGap, borderBottom: props.border, ...rowProps, key: rowProps.rowKey, cx: css$h.cell }));
|
|
5213
|
+
function PresetsPanel(props) {
|
|
5214
|
+
const [isAddingPreset, setIsAddingPreset] = useState(false);
|
|
5215
|
+
const setAddingPreset = useCallback(() => {
|
|
5216
|
+
setIsAddingPreset(true);
|
|
5125
5217
|
}, []);
|
|
5126
|
-
const
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
}
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5218
|
+
const cancelAddingPreset = useCallback(() => {
|
|
5219
|
+
setIsAddingPreset(false);
|
|
5220
|
+
}, []);
|
|
5221
|
+
const { presets, ...presetApi } = props;
|
|
5222
|
+
const renderPreset = (preset) => {
|
|
5223
|
+
return React__default.createElement(Preset, { key: preset.id, preset: preset, addPreset: setAddingPreset, ...presetApi });
|
|
5224
|
+
};
|
|
5225
|
+
const renderAddPresetButton = useCallback(() => {
|
|
5226
|
+
return (React__default.createElement("div", { key: "addingPresetBlock", className: css$h.addPresetContainer }, !isAddingPreset ? (React__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__default.createElement(PresetInput, { onCancel: cancelAddingPreset, onSuccess: props.createNewPreset }))));
|
|
5227
|
+
}, [isAddingPreset]);
|
|
5228
|
+
const onPresetDropdownSelect = (preset) => {
|
|
5229
|
+
props.choosePreset(preset.preset);
|
|
5230
|
+
};
|
|
5231
|
+
const renderMoreButtonDropdown = (item, hiddenItems) => {
|
|
5232
|
+
return (React__default.createElement(Dropdown, { key: "more", renderTarget: (props) => (React__default.createElement(FlexRow, null,
|
|
5233
|
+
React__default.createElement("div", { className: css$h.divider }),
|
|
5234
|
+
React__default.createElement(Button, { cx: UUI_PRESETS_PANEL_MORE_BUTTON, fill: "ghost", color: "secondary", caption: `${hiddenItems?.length || ''} more`, ...props }))), renderBody: (propsBody) => (React__default.createElement(DropdownMenuBody, { minWidth: 230, maxHeight: 300, ...propsBody },
|
|
5235
|
+
React__default.createElement(ScrollBars, null, hiddenItems.map((hiddenItem) => (React__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)) })))))) }));
|
|
5236
|
+
};
|
|
5237
|
+
const getPresetPriority = (preset, index) => {
|
|
5238
|
+
return preset.id === props.activePresetId ? 100499 : 1000 - index;
|
|
5239
|
+
};
|
|
5240
|
+
const getPanelItems = () => {
|
|
5241
|
+
return [
|
|
5242
|
+
...orderBy(props.presets, ({ order }) => order)
|
|
5243
|
+
.map((preset, index) => ({
|
|
5244
|
+
id: preset.id.toString(),
|
|
5245
|
+
render: () => renderPreset(preset),
|
|
5246
|
+
priority: getPresetPriority(preset, index),
|
|
5247
|
+
preset: preset,
|
|
5248
|
+
})),
|
|
5249
|
+
{
|
|
5250
|
+
id: 'collapsedContainer', render: renderMoreButtonDropdown, priority: 100501, collapsedContainer: true,
|
|
5251
|
+
},
|
|
5252
|
+
{ id: 'addPreset', render: renderAddPresetButton, priority: 100501 },
|
|
5253
|
+
];
|
|
5254
|
+
};
|
|
5255
|
+
return (React__default.createElement(FlexCell, { grow: 1, minWidth: 310, rawProps: props.rawProps },
|
|
5256
|
+
React__default.createElement(FlexRow, { size: null, columnGap: "12", cx: css$h.presetsWrapper },
|
|
5257
|
+
React__default.createElement(AdaptivePanel, { items: getPanelItems() }))));
|
|
5163
5258
|
}
|
|
5164
5259
|
|
|
5165
|
-
var css$g = {"root":"
|
|
5260
|
+
var css$g = {"root":"j88Ip7"};
|
|
5166
5261
|
|
|
5167
|
-
var css$f = {"root":"
|
|
5262
|
+
var css$f = {"root":"euSR2M","burger-content":"_5IoB7J","burgerContent":"_5IoB7J"};
|
|
5168
5263
|
|
|
5169
5264
|
var _path$3;
|
|
5170
5265
|
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); }
|
|
@@ -5207,7 +5302,7 @@ var SvgNavigationArrowDownOutline = function SvgNavigationArrowDownOutline(props
|
|
|
5207
5302
|
};
|
|
5208
5303
|
var ForwardRef$2 = /*#__PURE__*/forwardRef(SvgNavigationArrowDownOutline);
|
|
5209
5304
|
|
|
5210
|
-
var css$e = {"root":"
|
|
5305
|
+
var css$e = {"root":"w3TTjw","button-primary":"_1g50KI","buttonPrimary":"_1g50KI","button-secondary":"OEj9qi","buttonSecondary":"OEj9qi","hasIcon":"baJGGE","dropdown":"_-0Tage"};
|
|
5211
5306
|
|
|
5212
5307
|
const BurgerButton = /* @__PURE__ */withMods(Button$1, (props) => [
|
|
5213
5308
|
css$e.root,
|
|
@@ -5218,13 +5313,13 @@ const BurgerButton = /* @__PURE__ */withMods(Button$1, (props) => [
|
|
|
5218
5313
|
props.icon && css$e.hasIcon,
|
|
5219
5314
|
], () => ({ dropdownIcon: ForwardRef$2, dropdownIconPosition: 'left', role: 'menuitem' }));
|
|
5220
5315
|
|
|
5221
|
-
var css$d = {"search-input":"
|
|
5316
|
+
var css$d = {"search-input":"UXbmGP","searchInput":"UXbmGP"};
|
|
5222
5317
|
|
|
5223
5318
|
function BurgerSearch(props) {
|
|
5224
5319
|
return (React.createElement(TextInput$1, { cx: cx(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 }));
|
|
5225
5320
|
}
|
|
5226
5321
|
|
|
5227
|
-
var css$c = {"root":"
|
|
5322
|
+
var css$c = {"root":"_4P2Jz6","group-header":"EJCs7M","groupHeader":"EJCs7M","group-name":"_0ycmk9","groupName":"_0ycmk9","line":"ugRQT0"};
|
|
5228
5323
|
|
|
5229
5324
|
function BurgerGroupHeader(props) {
|
|
5230
5325
|
return (React.createElement("div", { className: cx(css$c.root, css$c.groupHeader, 'uui-burger-group-header') },
|
|
@@ -5232,7 +5327,7 @@ function BurgerGroupHeader(props) {
|
|
|
5232
5327
|
React.createElement("span", { className: css$c.groupName }, props.caption)));
|
|
5233
5328
|
}
|
|
5234
5329
|
|
|
5235
|
-
var css$b = {"root":"
|
|
5330
|
+
var css$b = {"root":"ddb9WL","type-primary":"NqVc-u","typePrimary":"NqVc-u","type-secondary":"-R06Pf","typeSecondary":"-R06Pf"};
|
|
5236
5331
|
|
|
5237
5332
|
const MainMenuButton = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
5238
5333
|
const { type, ...clickableProps } = props;
|
|
@@ -5254,7 +5349,7 @@ const MainMenuButton = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
5254
5349
|
props.isDropdown && (React.createElement(IconContainer, { icon: ForwardRef$P, flipY: props.isOpen }))));
|
|
5255
5350
|
});
|
|
5256
5351
|
|
|
5257
|
-
var css$a = {"dropdown-body":"
|
|
5352
|
+
var css$a = {"dropdown-body":"xeukO9","dropdownBody":"xeukO9"};
|
|
5258
5353
|
|
|
5259
5354
|
class MainMenuDropdown extends React.Component {
|
|
5260
5355
|
render() {
|
|
@@ -5313,12 +5408,12 @@ var SvgNavigationGlobalMenuOutlineOutline = function SvgNavigationGlobalMenuOutl
|
|
|
5313
5408
|
};
|
|
5314
5409
|
var ForwardRef$1 = /*#__PURE__*/forwardRef(SvgNavigationGlobalMenuOutlineOutline);
|
|
5315
5410
|
|
|
5316
|
-
var css$9 = {"global-menu-btn":"
|
|
5411
|
+
var css$9 = {"global-menu-btn":"CGxtfU","globalMenuBtn":"CGxtfU","global-menu-icon":"R4hrqd","globalMenuIcon":"R4hrqd"};
|
|
5317
5412
|
|
|
5318
5413
|
const GlobalMenu = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement("button", { ref: ref, id: "global_menu_toggle", className: cx(css$9.globalMenuBtn, props.cx), ...props.rawProps },
|
|
5319
5414
|
React.createElement(IconContainer, { size: 36, icon: ForwardRef$1, cx: css$9.globalMenuIcon }))));
|
|
5320
5415
|
|
|
5321
|
-
var css$8 = {"container":"
|
|
5416
|
+
var css$8 = {"container":"S1zR0N","open":"g3KDdD","folding-arrow":"kjftOu","foldingArrow":"kjftOu"};
|
|
5322
5417
|
|
|
5323
5418
|
const MainMenuAvatar = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement("button", { ref: ref, className: cx(css$8.container, props.isDropdown && css$8.dropdown, props.isOpen && css$8.open, props.onClick && uuiMarkers.clickable, props.cx), onClick: props.onClick, ...props.rawProps },
|
|
5324
5419
|
React.createElement(Avatar, { size: "36", img: props.avatarUrl }),
|
|
@@ -5326,15 +5421,15 @@ const MainMenuAvatar = /* @__PURE__ */React.forwardRef((props, ref) => (React.cr
|
|
|
5326
5421
|
props.isDropdown && (React.createElement("div", null,
|
|
5327
5422
|
React.createElement(IconContainer, { size: 18, icon: ForwardRef$P, flipY: props.isOpen, cx: css$8.foldingArrow }))))));
|
|
5328
5423
|
|
|
5329
|
-
var css$7 = {"search-input":"
|
|
5424
|
+
var css$7 = {"search-input":"NN2BF-","searchInput":"NN2BF-"};
|
|
5330
5425
|
|
|
5331
5426
|
const MainMenuSearch = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement(IEditableDebouncer, { ...props, render: (iEditable) => (React.createElement(TextInput$1, { iconPosition: "left", icon: ForwardRef$M, cancelIcon: props.value?.length > 0 && ForwardRef$Q, ...props, ...iEditable, ref: ref, cx: cx$1(css$7.searchInput, props.cx), ...props.rawProps })) })));
|
|
5332
5427
|
|
|
5333
|
-
var css$6 = {"container":"
|
|
5428
|
+
var css$6 = {"container":"EJcA4l"};
|
|
5334
5429
|
|
|
5335
5430
|
const MainMenuIcon = /* @__PURE__ */React.forwardRef((props, ref) => (React.createElement(IconButton, { ref: ref, icon: props.icon, cx: cx$1(props.cx, css$6.container), ...props })));
|
|
5336
5431
|
|
|
5337
|
-
var css$5 = {"root":"-
|
|
5432
|
+
var css$5 = {"root":"-PyHHH"};
|
|
5338
5433
|
|
|
5339
5434
|
const Anchor = /* @__PURE__ */withMods(Anchor$1, () => [css$5.root]);
|
|
5340
5435
|
|
|
@@ -5392,7 +5487,7 @@ var SvgFileCloudUploadFill = function SvgFileCloudUploadFill(props, ref) {
|
|
|
5392
5487
|
};
|
|
5393
5488
|
var ForwardRef = /*#__PURE__*/forwardRef(SvgFileCloudUploadFill);
|
|
5394
5489
|
|
|
5395
|
-
var css$4 = {"root":"
|
|
5490
|
+
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"};
|
|
5396
5491
|
|
|
5397
5492
|
function DropSpot(props) {
|
|
5398
5493
|
const getInfoText = typeof props.infoText === 'string'
|
|
@@ -5410,7 +5505,7 @@ function DropSpot(props) {
|
|
|
5410
5505
|
return React.createElement(DropSpot$1, { render: renderAttachmentArea, onFilesDropped: props.onUploadFiles });
|
|
5411
5506
|
}
|
|
5412
5507
|
|
|
5413
|
-
var css$3 = {"root":"
|
|
5508
|
+
var css$3 = {"root":"-z-c-3"};
|
|
5414
5509
|
|
|
5415
5510
|
const SvgCircleProgress = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
5416
5511
|
const outsetRadius = props.size / 2 - 1;
|
|
@@ -5421,7 +5516,7 @@ const SvgCircleProgress = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
|
5421
5516
|
React.createElement("circle", { strokeWidth: 1, fill: "transparent", r: outsetRadius, cx: props.size / 2, cy: props.size / 2 })));
|
|
5422
5517
|
});
|
|
5423
5518
|
|
|
5424
|
-
var css$2 = {"root":"
|
|
5519
|
+
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"};
|
|
5425
5520
|
|
|
5426
5521
|
const FileCard = /* @__PURE__ */React.forwardRef((props, ref) => {
|
|
5427
5522
|
const [isLoadingShow, setIsLoadingShow] = React.useState(true);
|
|
@@ -5540,7 +5635,7 @@ const getErrorPageConfig = () => ({
|
|
|
5540
5635
|
},
|
|
5541
5636
|
});
|
|
5542
5637
|
|
|
5543
|
-
var css$1 = {"container":"
|
|
5638
|
+
var css$1 = {"container":"petk3l"};
|
|
5544
5639
|
|
|
5545
5640
|
const ErrorPage = (props) => {
|
|
5546
5641
|
const isMobileScreen = isMobile();
|
|
@@ -5552,7 +5647,7 @@ const ErrorPage = (props) => {
|
|
|
5552
5647
|
props?.supportLink && React__default.createElement("div", { className: "uui-error-support-link" }, props?.supportLink))));
|
|
5553
5648
|
};
|
|
5554
5649
|
|
|
5555
|
-
var css = {"recovery-spinner":"
|
|
5650
|
+
var css = {"recovery-spinner":"h1QYl0","recoverySpinner":"h1QYl0","recovery-message":"UVEnxn","recoveryMessage":"UVEnxn","modal-blocker":"_0E-ysL","modalBlocker":"_0E-ysL","modalFadeIn":"BYQS8K"};
|
|
5556
5651
|
|
|
5557
5652
|
function ErrorHandler(props) {
|
|
5558
5653
|
const { uuiNotifications, uuiModals, uuiApi } = useUuiContext();
|
|
@@ -5603,5 +5698,5 @@ function ErrorHandler(props) {
|
|
|
5603
5698
|
errorType === 'recovery' && renderRecoveryBlocker(errorInfo)));
|
|
5604
5699
|
}
|
|
5605
5700
|
|
|
5606
|
-
export { Accordion, Alert, Anchor, AvatarStack, Badge, Blocker, Burger, BurgerButton, BurgerGroupHeader, BurgerSearch, Button, Calendar, Checkbox, CheckboxGroup, ClearNotification, ColumnHeaderDropdown, ColumnsConfigurationModal, ConfirmationModal, ControlGroup, CountIndicator, DataPickerBody, DataPickerFooter, DataPickerMobileHeader, DataPickerRow, DataRowAddons, DataRowsContainer, DataTable, DataTableCell, DataTableHeaderCell, DataTableHeaderRow, DataTableRow, DatePicker, DatePickerBody, DatePickerComponent, DropMarker, DropSpot, Dropdown, DropdownContainer, DropdownMenuBody, DropdownMenuButton, DropdownMenuHeader, DropdownMenuSplitter, DropdownMenuSwitchButton, DropdownSubMenu, ErrorAlert, ErrorHandler, ErrorNotification, ErrorPage, FileCard, FilterDatePickerBodyFooter, FilterItemBody, FilterPickerBody, FilterRangeDatePickerBodyFooter, FiltersPanel, FlexCell, FlexRow, Form, GlobalMenu, HintAlert, HintNotification, IDropdownControlKeys, IconButton, IndeterminateBar, IndicatorBar, InputAddon, LabeledInput, LinkButton, MainMenu, MainMenuAvatar, MainMenuButton, MainMenuDropdown, MainMenuIcon, MainMenuSearch, ModalBlocker, ModalFooter, ModalHeader, ModalWindow, MultiSwitch, NotificationCard, NumericInput, Paginator, Panel, PickerBodyMobileView, PickerInput, PickerItem, PickerList, PickerListRow, PickerModal, PickerToggler, PickerTogglerTag, PresetsPanel, ProgressBar, RadioGroup, RadioInput, RangeDatePicker, RangeDatePickerBody, RangeDatePickerInput, Rating, RichTextView, ScrollBars, SearchInput, Slider, Snackbar, Spinner, StatusIndicator, SuccessAlert, SuccessNotification, SvgCircleProgress, Switch, TabButton, Tag, Text, TextArea, TextInput, TextPlaceholder, TimePicker, TimePickerBody, TimePickerComponent, Tooltip, VerticalTabButton, VirtualList, WarningAlert, WarningNotification, applyDateSelectionMods, defaultPredicates, getErrorPageConfig, getHighlightRanges, getHighlightedSearchMatches, getRecoveryMessageConfig, i18n, propsMods, rangeDatePickerPresets, renderCell, renderDropMarkers, settings, useColumnsWithFilters, useForm, uuiDatePickerBody, uuiRangeDatePickerBody, uuiTimePicker };
|
|
5701
|
+
export { Accordion, Alert, Anchor, AvatarStack, Badge, Blocker, Burger, BurgerButton, BurgerGroupHeader, BurgerSearch, Button, Calendar, Checkbox, CheckboxGroup, ClearNotification, ColumnHeaderDropdown, ColumnsConfigurationModal, ConfirmationModal, ControlGroup, CountIndicator, DataPickerBody, DataPickerFooter, DataPickerMobileHeader, DataPickerRow, DataRowAddons, DataRowsContainer, DataTable, DataTableCell, DataTableHeaderCell, DataTableHeaderRow, DataTableRow, DatePicker, DatePickerBody, DatePickerComponent, DropMarker, DropSpot, Dropdown, DropdownContainer, DropdownMenuBody, DropdownMenuButton, DropdownMenuHeader, DropdownMenuSplitter, DropdownMenuSwitchButton, DropdownSubMenu, ErrorAlert, ErrorHandler, ErrorNotification, ErrorPage, FileCard, FilterDatePickerBodyFooter, FilterItemBody, FilterPickerBody, FilterRangeDatePickerBodyFooter, FiltersPanel, FlexCell, FlexRow, Form, GlobalMenu, HintAlert, HintNotification, IDropdownControlKeys, IconButton, IndeterminateBar, IndicatorBar, InputAddon, LabeledInput, LinkButton, MainMenu, MainMenuAvatar, MainMenuButton, MainMenuDropdown, MainMenuIcon, MainMenuSearch, ModalBlocker, ModalFooter, ModalHeader, ModalWindow, MultiSwitch, NotificationCard, NumericInput, Paginator, Panel, PickerBodyMobileView, PickerInput, PickerItem, PickerList, PickerListRow, PickerModal, PickerToggler, PickerTogglerTag, PresetsPanel, ProgressBar, RadioGroup, RadioInput, RangeDatePicker, RangeDatePickerBody, RangeDatePickerInput, Rating, RichTextView, ScrollBars, SearchInput, Slider, Snackbar, Spinner, StatusIndicator, SuccessAlert, SuccessNotification, SvgCircleProgress, Switch, TabButton, Tag, Text, TextArea, TextInput, TextPlaceholder, TimePicker, TimePickerBody, TimePickerComponent, Tooltip, VerticalTabButton, VirtualList, WarningAlert, WarningNotification, applyDateSelectionMods, defaultPredicates, getDefaultPredicate, getErrorPageConfig, getHighlightRanges, getHighlightedSearchMatches, getRecoveryMessageConfig, i18n, propsMods, rangeDatePickerPresets, renderCell, renderDropMarkers, settings, useColumnsWithFilters, useForm, uuiDatePickerBody, uuiRangeDatePickerBody, uuiTimePicker };
|
|
5607
5702
|
//# sourceMappingURL=index.esm.js.map
|