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