@epam/uui 5.2.0-rc.3 → 5.2.0
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/assets/styles/typography.scss +10 -17
- package/components/buttons/Button/Button.d.ts +13 -0
- package/components/buttons/Button/Button.d.ts.map +1 -0
- package/components/buttons/Button/index.d.ts +2 -0
- package/components/buttons/Button/index.d.ts.map +1 -0
- package/components/buttons/IconButton.d.ts +1 -1
- package/components/buttons/LinkButton.d.ts.map +1 -1
- package/components/buttons/index.d.ts +1 -1
- package/components/buttons/index.d.ts.map +1 -1
- package/components/datePickers/DatePickerBody.d.ts +2 -1
- package/components/datePickers/DatePickerBody.d.ts.map +1 -1
- package/components/dnd/DropMarker.d.ts.map +1 -1
- package/components/filters/FilterPickerBody.d.ts.map +1 -1
- package/components/inputs/Checkbox.d.ts +4 -4
- package/components/inputs/Checkbox.d.ts.map +1 -1
- package/components/inputs/Switch.d.ts +4 -3
- package/components/inputs/Switch.d.ts.map +1 -1
- package/components/inputs/TextInput.d.ts +3 -1
- package/components/inputs/TextInput.d.ts.map +1 -1
- package/components/layout/Accordion.d.ts +3 -2
- package/components/layout/Accordion.d.ts.map +1 -1
- package/components/layout/FlexItems/FlexCell.d.ts +3 -1
- package/components/layout/FlexItems/FlexCell.d.ts.map +1 -1
- package/components/layout/FlexItems/FlexRow.d.ts +0 -1
- package/components/layout/FlexItems/FlexRow.d.ts.map +1 -1
- package/components/layout/FlexItems/Panel.d.ts +2 -1
- package/components/layout/FlexItems/Panel.d.ts.map +1 -1
- package/components/layout/LabeledInput.d.ts +3 -2
- package/components/layout/LabeledInput.d.ts.map +1 -1
- package/components/layout/VirtualList.d.ts +32 -2
- package/components/layout/VirtualList.d.ts.map +1 -1
- package/components/navigation/MainMenu/Burger/Burger.d.ts.map +1 -1
- package/components/navigation/MainMenu/Burger/BurgerButton.d.ts.map +1 -1
- package/components/navigation/MainMenu/Burger/BurgerGroupHeader.d.ts.map +1 -1
- package/components/navigation/MainMenu/Burger/BurgerSearch.d.ts.map +1 -1
- package/components/navigation/MainMenu/MainMenu.d.ts +3 -2
- package/components/navigation/MainMenu/MainMenu.d.ts.map +1 -1
- package/components/overlays/Alert.d.ts +5 -5
- package/components/overlays/Alert.d.ts.map +1 -1
- package/components/overlays/DropdownContainer.d.ts +3 -3
- package/components/overlays/DropdownContainer.d.ts.map +1 -1
- package/components/overlays/DropdownMenu.d.ts.map +1 -1
- package/components/overlays/Modals.d.ts.map +1 -1
- package/components/overlays/Tooltip.d.ts +1 -1
- package/components/pickers/DataPickerBody.d.ts +1 -2
- package/components/pickers/DataPickerBody.d.ts.map +1 -1
- package/components/pickers/PickerInput.d.ts +1 -2
- package/components/pickers/PickerInput.d.ts.map +1 -1
- package/components/tables/ColumnHeaderDropdown/ColumnHeaderDropdown.d.ts.map +1 -1
- package/components/tables/DataRowsContainer/DataRowsContainer.d.ts +1 -1
- package/components/tables/DataRowsContainer/DataRowsContainer.d.ts.map +1 -1
- package/components/tables/DataTable.d.ts +0 -1
- package/components/tables/DataTable.d.ts.map +1 -1
- package/components/tables/DataTableCell.d.ts +0 -1
- package/components/tables/DataTableCell.d.ts.map +1 -1
- package/components/tables/DataTableHeaderCell.d.ts +0 -1
- package/components/tables/DataTableHeaderCell.d.ts.map +1 -1
- package/components/tables/DataTableHeaderRow.d.ts +0 -1
- package/components/tables/DataTableHeaderRow.d.ts.map +1 -1
- package/components/tables/DataTableRow.d.ts +0 -1
- package/components/tables/DataTableRow.d.ts.map +1 -1
- package/components/tables/columnsConfigurationModal/PinIconButton.d.ts.map +1 -1
- package/components/types.d.ts +13 -4
- package/components/types.d.ts.map +1 -1
- package/components/typography/RichTextView.d.ts +3 -2
- package/components/typography/RichTextView.d.ts.map +1 -1
- package/components/typography/Text.d.ts +2 -4
- package/components/typography/Text.d.ts.map +1 -1
- package/components/widgets/Badge.d.ts.map +1 -1
- package/components/widgets/ProgressBar.d.ts.map +1 -1
- package/components/widgets/index.d.ts +0 -1
- package/components/widgets/index.d.ts.map +1 -1
- package/index.esm.js +1370 -1397
- package/index.esm.js.map +1 -1
- package/index.js +1366 -1394
- package/index.js.map +1 -1
- package/package.json +5 -5
- package/stats.html +1 -1
- package/styles.css +2884 -3424
- package/styles.css.map +1 -1
- package/components/buttons/Button.d.ts +0 -13
- package/components/buttons/Button.d.ts.map +0 -1
- package/components/widgets/Informer.d.ts +0 -8
- package/components/widgets/Informer.d.ts.map +0 -1
package/index.js
CHANGED
|
@@ -8,8 +8,8 @@ var customParseFormat = require('dayjs/plugin/customParseFormat.js');
|
|
|
8
8
|
var updateLocale = require('dayjs/plugin/updateLocale.js');
|
|
9
9
|
var cx = require('classnames');
|
|
10
10
|
var localeData = require('dayjs/plugin/localeData');
|
|
11
|
-
var sortBy = require('lodash.sortby');
|
|
12
11
|
var isoWeek = require('dayjs/plugin/isoWeek.js');
|
|
12
|
+
var sortBy = require('lodash.sortby');
|
|
13
13
|
var FocusLock = require('react-focus-lock');
|
|
14
14
|
|
|
15
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -32,14 +32,15 @@ function _interopNamespace(e) {
|
|
|
32
32
|
return Object.freeze(n);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
var uuiComponents__namespace = /*#__PURE__*/_interopNamespace(uuiComponents);
|
|
35
36
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
36
37
|
var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
|
|
37
38
|
var customParseFormat__default = /*#__PURE__*/_interopDefault(customParseFormat);
|
|
38
39
|
var updateLocale__default = /*#__PURE__*/_interopDefault(updateLocale);
|
|
39
40
|
var cx__default = /*#__PURE__*/_interopDefault(cx);
|
|
40
41
|
var localeData__default = /*#__PURE__*/_interopDefault(localeData);
|
|
41
|
-
var sortBy__default = /*#__PURE__*/_interopDefault(sortBy);
|
|
42
42
|
var isoWeek__default = /*#__PURE__*/_interopDefault(isoWeek);
|
|
43
|
+
var sortBy__default = /*#__PURE__*/_interopDefault(sortBy);
|
|
43
44
|
var FocusLock__default = /*#__PURE__*/_interopDefault(FocusLock);
|
|
44
45
|
|
|
45
46
|
var _path$1d;
|
|
@@ -601,37 +602,36 @@ const systemIcons = {
|
|
|
601
602
|
},
|
|
602
603
|
};
|
|
603
604
|
|
|
604
|
-
var
|
|
605
|
+
var buttonCss = {"root":"QUH6Vs","mode-solid":"PUdmlY","mode-outline":"YI5UJZ","mode-none":"_4QI8cF","mode-ghost":"_-1oYSP","size-18":"tU0kim","size-24":"NspImT","size-30":"CTfB1X","size-36":"OuvVcj","size-42":"nv0V8T","size-48":"N2GXps","modeSolid":"PUdmlY","modeOutline":"YI5UJZ","modeNone":"_4QI8cF","modeGhost":"_-1oYSP","size18":"tU0kim","size24":"NspImT","size30":"CTfB1X","size36":"OuvVcj","size42":"nv0V8T","size48":"N2GXps"};
|
|
605
606
|
|
|
606
607
|
const allButtonColors = [
|
|
607
|
-
'accent', 'primary', 'secondary', '
|
|
608
|
+
'accent', 'primary', 'secondary', 'negative',
|
|
608
609
|
];
|
|
609
610
|
const defaultSize$b = '36';
|
|
610
611
|
function applyButtonMods(mods) {
|
|
611
612
|
return [
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
`
|
|
615
|
-
`
|
|
616
|
-
css$1l[`size-${mods.size || defaultSize$b}`],
|
|
613
|
+
`button-${mods.color || 'primary'}`,
|
|
614
|
+
buttonCss.root,
|
|
615
|
+
buttonCss[`size-${mods.size || defaultSize$b}`],
|
|
616
|
+
buttonCss[`mode-${mods.mode || 'solid'}`],
|
|
617
617
|
];
|
|
618
618
|
}
|
|
619
|
-
const Button = uuiCore.withMods(
|
|
619
|
+
const Button = uuiCore.withMods(uuiComponents__namespace.Button, applyButtonMods, (props) => ({
|
|
620
620
|
dropdownIcon: systemIcons[props.size || defaultSize$b].foldingArrow,
|
|
621
621
|
clearIcon: systemIcons[props.size || defaultSize$b].clear,
|
|
622
622
|
}));
|
|
623
623
|
|
|
624
|
-
var css$
|
|
624
|
+
var css$1i = {"root":"E-pvc-"};
|
|
625
625
|
|
|
626
626
|
const allIconColors = [
|
|
627
|
-
'info', 'success', 'warning', 'error', 'secondary', '
|
|
627
|
+
'info', 'success', 'warning', 'error', 'secondary', 'default',
|
|
628
628
|
];
|
|
629
629
|
function applyIconButtonMods(mods) {
|
|
630
|
-
return [
|
|
630
|
+
return [`icon-button-${mods.color || 'default'}`, css$1i.root];
|
|
631
631
|
}
|
|
632
632
|
const IconButton = uuiCore.withMods(uuiComponents.IconButton, applyIconButtonMods);
|
|
633
633
|
|
|
634
|
-
var css$
|
|
634
|
+
var css$1h = {"root":"qufNQD","size-18":"tJVt0T","size-24":"JVKFcw","size-30":"RLCwxI","size-36":"Jp31ld","size-42":"bPmGkY","size-48":"_5oad3H","size18":"tJVt0T","size24":"JVKFcw","size30":"RLCwxI","size36":"Jp31ld","size42":"bPmGkY","size48":"_5oad3H"};
|
|
635
635
|
|
|
636
636
|
function getIconClass(props) {
|
|
637
637
|
const classList = {
|
|
@@ -654,11 +654,10 @@ const defaultSize$a = '36';
|
|
|
654
654
|
const allLinkButtonColors = ['primary', 'secondary', 'contrast'];
|
|
655
655
|
function applyLinkButtonMods(mods) {
|
|
656
656
|
return [
|
|
657
|
-
|
|
658
|
-
css$
|
|
659
|
-
css$1j['size-' + (mods.size || defaultSize$a)],
|
|
657
|
+
css$1h.root,
|
|
658
|
+
css$1h['size-' + (mods.size || defaultSize$a)],
|
|
660
659
|
...getIconClass(mods),
|
|
661
|
-
`
|
|
660
|
+
`link-button-${mods.color || 'primary'}`,
|
|
662
661
|
];
|
|
663
662
|
}
|
|
664
663
|
const LinkButton = uuiCore.withMods(uuiComponents.Button, applyLinkButtonMods, (props) => ({
|
|
@@ -666,30 +665,30 @@ const LinkButton = uuiCore.withMods(uuiComponents.Button, applyLinkButtonMods, (
|
|
|
666
665
|
clearIcon: systemIcons[props.size || defaultSize$a].clear,
|
|
667
666
|
}));
|
|
668
667
|
|
|
669
|
-
var css$
|
|
668
|
+
var css$1g = {"root":"S-bFnI","withNotify":"T8G5AG","size-36":"vAb6JS","size-48":"bEbX6B","size-60":"TT7e5T","size36":"vAb6JS","size48":"bEbX6B","size60":"TT7e5T"};
|
|
670
669
|
|
|
671
670
|
function applyTabButtonMods(mods) {
|
|
672
671
|
return [
|
|
673
|
-
css$
|
|
674
|
-
'
|
|
675
|
-
css$
|
|
676
|
-
mods.withNotify && css$
|
|
672
|
+
css$1g.root,
|
|
673
|
+
'informer-default',
|
|
674
|
+
css$1g['size-' + (mods.size || '48')],
|
|
675
|
+
mods.withNotify && css$1g.withNotify,
|
|
677
676
|
...getIconClass(mods),
|
|
678
677
|
];
|
|
679
678
|
}
|
|
680
679
|
const TabButton = uuiCore.withMods(uuiComponents.Button, applyTabButtonMods, (props) => (Object.assign(Object.assign({ dropdownIcon: systemIcons['36'].foldingArrow, clearIcon: systemIcons['36'].clear, countPosition: 'right' }, props), { rawProps: Object.assign({ role: 'tab' }, props.rawProps) })));
|
|
681
680
|
|
|
682
|
-
var css$
|
|
681
|
+
var css$1f = {"root":"-z7hER"};
|
|
683
682
|
|
|
684
683
|
function applyVerticalTabButtonMods() {
|
|
685
|
-
return [css$
|
|
684
|
+
return [css$1f.root];
|
|
686
685
|
}
|
|
687
686
|
const VerticalTabButton = uuiCore.withMods(TabButton, applyVerticalTabButtonMods);
|
|
688
687
|
|
|
689
|
-
const
|
|
688
|
+
const allButtonModes = [
|
|
690
689
|
'solid', 'outline', 'ghost', 'none',
|
|
691
690
|
];
|
|
692
|
-
const allFillStyles =
|
|
691
|
+
const allFillStyles = allButtonModes;
|
|
693
692
|
const allSizes = [
|
|
694
693
|
'24', '30', '36', '42', '48',
|
|
695
694
|
];
|
|
@@ -699,8 +698,11 @@ const allRowSizes = [
|
|
|
699
698
|
const allSemanticColors = [
|
|
700
699
|
'info', 'success', 'warning', 'error',
|
|
701
700
|
];
|
|
701
|
+
const allButtonSemanticColors = [
|
|
702
|
+
'accent', 'primary', 'secondary', 'negative',
|
|
703
|
+
];
|
|
702
704
|
const allEpamBadgeSemanticColors = [
|
|
703
|
-
'info', 'success', 'warning', 'error', '
|
|
705
|
+
'info', 'success', 'warning', 'error', 'default',
|
|
704
706
|
];
|
|
705
707
|
const allTextSizes = [
|
|
706
708
|
'18', '24', '30', '36', '48',
|
|
@@ -779,23 +781,20 @@ var SvgPartlySelect18 = function SvgPartlySelect18(props, ref) {
|
|
|
779
781
|
};
|
|
780
782
|
var ForwardRef$L = /*#__PURE__*/React.forwardRef(SvgPartlySelect18);
|
|
781
783
|
|
|
782
|
-
var css$
|
|
784
|
+
var css$1e = {"root":"_0HmuS5","size-18":"aqlLAd","size-12":"M5rgEr","mode-cell":"SDybOn","size18":"aqlLAd","size12":"M5rgEr","modeCell":"SDybOn"};
|
|
783
785
|
|
|
784
786
|
function applyCheckboxMods(mods) {
|
|
785
787
|
return [
|
|
786
|
-
css$
|
|
787
|
-
css$1g['size-' + (mods.size || '18')],
|
|
788
|
-
css$1g['mode-' + (mods.mode || 'form')],
|
|
789
|
-
'uui-color-primary',
|
|
788
|
+
css$1e.root, css$1e['size-' + (mods.size || '18')], css$1e['mode-' + (mods.mode || 'form')],
|
|
790
789
|
];
|
|
791
790
|
}
|
|
792
791
|
const applyUUICheckboxProps = (props) => ({
|
|
793
792
|
icon: props.size === '12' ? ForwardRef$O : ForwardRef$N,
|
|
794
793
|
indeterminateIcon: props.size === '12' ? ForwardRef$M : ForwardRef$L,
|
|
795
794
|
});
|
|
796
|
-
const Checkbox = uuiCore.withMods(
|
|
795
|
+
const Checkbox = uuiCore.withMods(uuiComponents__namespace.Checkbox, applyCheckboxMods, applyUUICheckboxProps);
|
|
797
796
|
|
|
798
|
-
var css$
|
|
797
|
+
var css$1d = {"root":"rV0pO4","size-18":"xmFDP2","size-12":"bCJITc","size18":"xmFDP2","size12":"bCJITc"};
|
|
799
798
|
|
|
800
799
|
var _circle;
|
|
801
800
|
function _extends$K() { _extends$K = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$K.apply(this, arguments); }
|
|
@@ -815,18 +814,18 @@ var SvgRadioPoint = function SvgRadioPoint(props, ref) {
|
|
|
815
814
|
var ForwardRef$K = /*#__PURE__*/React.forwardRef(SvgRadioPoint);
|
|
816
815
|
|
|
817
816
|
function applyRadioInputMods(mods) {
|
|
818
|
-
return [css$
|
|
817
|
+
return [css$1d.root, css$1d['size-' + (mods.size || '18')]];
|
|
819
818
|
}
|
|
820
819
|
const RadioInput = uuiCore.withMods(uuiComponents.RadioInput, applyRadioInputMods, () => ({ icon: ForwardRef$K }));
|
|
821
820
|
|
|
822
|
-
var css$
|
|
821
|
+
var css$1c = {"root":"bFmAME","size-12":"ImyDES","size-18":"_0wNFkz","size-24":"I3TL--","size12":"ImyDES","size18":"_0wNFkz","size24":"I3TL--"};
|
|
823
822
|
|
|
824
823
|
function applySwitchMods(mods) {
|
|
825
824
|
return [
|
|
826
|
-
css$
|
|
825
|
+
'switch-vars', css$1c.root, css$1c['size-' + (mods.size || '18')],
|
|
827
826
|
];
|
|
828
827
|
}
|
|
829
|
-
const Switch = uuiCore.withMods(
|
|
828
|
+
const Switch = uuiCore.withMods(uuiComponents__namespace.Switch, applySwitchMods);
|
|
830
829
|
|
|
831
830
|
/******************************************************************************
|
|
832
831
|
Copyright (c) Microsoft Corporation.
|
|
@@ -872,7 +871,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
872
871
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
873
872
|
};
|
|
874
873
|
|
|
875
|
-
var textInputCss = {"root":"
|
|
874
|
+
var textInputCss = {"root":"ixikS-","mode-form":"hArR5R","mode-inline":"Ullg9r","mode-cell":"O1d9bM","size-24":"_--t0HX","size-30":"czxZvN","size-36":"rCY3sq","size-42":"AyyVsA","size-48":"_2auiOB","modeForm":"hArR5R","modeInline":"Ullg9r","modeCell":"O1d9bM","size24":"_--t0HX","size30":"czxZvN","size36":"rCY3sq","size42":"AyyVsA","size48":"_2auiOB"};
|
|
876
875
|
|
|
877
876
|
const defaultSize$9 = '36';
|
|
878
877
|
const defaultMode$5 = exports.EditMode.FORM;
|
|
@@ -901,22 +900,22 @@ const SearchInput = React__namespace.default.forwardRef((props, ref) => {
|
|
|
901
900
|
: undefined, type: "search", inputMode: "search", ref: ref }, textInputProps, iEditable))) })));
|
|
902
901
|
});
|
|
903
902
|
|
|
904
|
-
var css$
|
|
903
|
+
var css$1b = {"root":"Yz-PH2"};
|
|
905
904
|
|
|
906
|
-
const ControlGroup = uuiCore.withMods(uuiComponents.ControlGroup, () => [css$
|
|
905
|
+
const ControlGroup = uuiCore.withMods(uuiComponents.ControlGroup, () => [css$1b.root]);
|
|
907
906
|
|
|
908
907
|
function MultiSwitchComponent(props, ref) {
|
|
909
|
-
return (React__namespace.createElement(ControlGroup, { ref: ref, rawProps: Object.assign(Object.assign({}, props.rawProps), { role: 'tablist' }) }, props.items.map((item, index) => (React__namespace.createElement(Button, Object.assign({}, props, item, { isDisabled: props.isDisabled, key: index + '-' + item.id, onClick: () => props.onValueChange(item.id),
|
|
908
|
+
return (React__namespace.createElement(ControlGroup, { ref: ref, rawProps: Object.assign(Object.assign({}, props.rawProps), { role: 'tablist' }) }, props.items.map((item, index) => (React__namespace.createElement(Button, Object.assign({}, props, item, { isDisabled: props.isDisabled, key: index + '-' + item.id, onClick: () => props.onValueChange(item.id), mode: props.value === item.id ? 'solid' : 'outline', color: props.color === 'secondary' && props.value === item.id ? 'primary' : props.color || 'primary', size: props.size, rawProps: { 'aria-current': props.value === item.id, role: 'tab' } }))))));
|
|
910
909
|
}
|
|
911
910
|
const MultiSwitch = React__namespace.forwardRef(MultiSwitchComponent);
|
|
912
911
|
|
|
913
|
-
var css$
|
|
912
|
+
var css$1a = {"root":"_0E7PbO","size-24":"ozFBJK","size-30":"qPA5-n","size-36":"-WXHNr","size-42":"wcb74Q","size-48":"_9cYYEe","mode-form":"EhLuew","mode-cell":"Pcyu6T","size24":"ozFBJK","size30":"qPA5-n","size36":"-WXHNr","size42":"wcb74Q","size48":"_9cYYEe","modeForm":"EhLuew","modeCell":"Pcyu6T"};
|
|
914
913
|
|
|
915
914
|
const defaultSize$8 = '36';
|
|
916
915
|
const defaultMode$4 = exports.EditMode.FORM;
|
|
917
916
|
function applyNumericInputMods(mods) {
|
|
918
917
|
return [
|
|
919
|
-
textInputCss.root, css$
|
|
918
|
+
textInputCss.root, css$1a.root, css$1a['size-' + (mods.size || defaultSize$8)], textInputCss['size-' + (mods.size || defaultSize$8)], textInputCss['mode-' + (mods.mode || defaultMode$4)],
|
|
920
919
|
];
|
|
921
920
|
}
|
|
922
921
|
const NumericInput = uuiCore.withMods(uuiComponents.NumericInput, applyNumericInputMods, (props) => {
|
|
@@ -929,13 +928,13 @@ const NumericInput = uuiCore.withMods(uuiComponents.NumericInput, applyNumericIn
|
|
|
929
928
|
});
|
|
930
929
|
});
|
|
931
930
|
|
|
932
|
-
var css$
|
|
931
|
+
var css$19 = {"root":"IKpXwB","mode-form":"_7YArHI","mode-cell":"_1jMdoM","mode-inline":"oDiENK","size-24":"hOvIFQ","size-30":"_9V6xIZ","size-36":"J335WH","size-42":"ynDtSX","size-48":"ari4lJ","modeForm":"_7YArHI","modeCell":"_1jMdoM","modeInline":"oDiENK","size24":"hOvIFQ","size30":"_9V6xIZ","size36":"J335WH","size42":"ynDtSX","size48":"ari4lJ"};
|
|
933
932
|
|
|
934
933
|
const defaultSize$7 = '36';
|
|
935
934
|
const defaultMode$3 = exports.EditMode.FORM;
|
|
936
935
|
function applyTextAreaMods(mods) {
|
|
937
936
|
return [
|
|
938
|
-
css$
|
|
937
|
+
css$19.root, css$19['size-' + (mods.size || defaultSize$7)], css$19['mode-' + (mods.mode || defaultMode$3)],
|
|
939
938
|
];
|
|
940
939
|
}
|
|
941
940
|
const TextArea = uuiCore.withMods(uuiComponents.TextArea, applyTextAreaMods, (props) => ({
|
|
@@ -943,20 +942,18 @@ const TextArea = uuiCore.withMods(uuiComponents.TextArea, applyTextAreaMods, (pr
|
|
|
943
942
|
maxLength: props.mode === exports.EditMode.CELL ? undefined : props.maxLength,
|
|
944
943
|
}));
|
|
945
944
|
|
|
946
|
-
var css$
|
|
945
|
+
var css$18 = {"root":"UCG4d3"};
|
|
947
946
|
|
|
948
947
|
function applyDropdownContainerMods(mods) {
|
|
949
948
|
return [
|
|
950
|
-
css$
|
|
951
|
-
mods.vPadding && `vPadding-${mods.vPadding}`,
|
|
952
|
-
mods.padding && `padding-${mods.padding}`,
|
|
949
|
+
css$18.root, mods.vPadding && `vPadding-${mods.vPadding}`, mods.padding && `padding-${mods.padding}`,
|
|
953
950
|
];
|
|
954
951
|
}
|
|
955
|
-
const DropdownContainer = uuiCore.withMods(
|
|
952
|
+
const DropdownContainer = uuiCore.withMods(uuiComponents__namespace.DropdownContainer, applyDropdownContainerMods);
|
|
956
953
|
|
|
957
|
-
var css$
|
|
954
|
+
var css$17 = {"root":"JkWZQf","icon":"mDPX3T","date-input":"HJW-FZ","dateInput":"HJW-FZ"};
|
|
958
955
|
|
|
959
|
-
const TimePickerBody = uuiCore.withMods(uuiComponents.TimePickerBody, () => [css$
|
|
956
|
+
const TimePickerBody = uuiCore.withMods(uuiComponents.TimePickerBody, () => [css$17.root], () => ({ addIcon: ForwardRef$1b, subtractIcon: ForwardRef$1b }));
|
|
960
957
|
|
|
961
958
|
dayjs__default.default.extend(customParseFormat__default.default);
|
|
962
959
|
const defaultMode$2 = exports.EditMode.FORM;
|
|
@@ -976,7 +973,7 @@ class TimePicker extends uuiComponents.BaseTimePicker {
|
|
|
976
973
|
});
|
|
977
974
|
}
|
|
978
975
|
}
|
|
979
|
-
return (React__namespace.default.createElement(TextInput, Object.assign({}, props, { onClick: null, size: this.props.size || '36', isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, isInvalid: this.props.isInvalid, cx: [css$
|
|
976
|
+
return (React__namespace.default.createElement(TextInput, Object.assign({}, props, { onClick: null, size: this.props.size || '36', isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, isInvalid: this.props.isInvalid, cx: [css$17.dateInput, this.props.inputCx], value: this.state.value, onValueChange: this.handleInputChange, onCancel: this.onClear, onFocus: this.handleFocus, onBlur: this.handleBlur, isDropdown: false, placeholder: this.props.placeholder ? this.props.placeholder : this.getFormat(), mode: this.props.mode || defaultMode$2, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.input })));
|
|
980
977
|
};
|
|
981
978
|
this.renderBody = (props) => {
|
|
982
979
|
var _a;
|
|
@@ -986,16 +983,16 @@ class TimePicker extends uuiComponents.BaseTimePicker {
|
|
|
986
983
|
}
|
|
987
984
|
}
|
|
988
985
|
|
|
989
|
-
var css$
|
|
986
|
+
var css$16 = {"root":"_4u8TGr"};
|
|
990
987
|
|
|
991
988
|
function applyInputAddonMods() {
|
|
992
989
|
return [
|
|
993
|
-
css$
|
|
990
|
+
css$16.root,
|
|
994
991
|
];
|
|
995
992
|
}
|
|
996
993
|
const InputAddon = uuiCore.withMods(uuiComponents.InputAddon, applyInputAddonMods);
|
|
997
994
|
|
|
998
|
-
var css$
|
|
995
|
+
var css$15 = {"container":"eNm-kq"};
|
|
999
996
|
|
|
1000
997
|
var _path$I;
|
|
1001
998
|
function _extends$J() { _extends$J = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$J.apply(this, arguments); }
|
|
@@ -1104,22 +1101,20 @@ function DatePickerHeader(props) {
|
|
|
1104
1101
|
var _a, _b, _c;
|
|
1105
1102
|
return `${((_a = props.value) === null || _a === void 0 ? void 0 : _a.view) !== 'MONTH_SELECTION' ? dayjs__default.default.months()[(_b = props.value) === null || _b === void 0 ? void 0 : _b.displayedDate.month()] : ''} ${(_c = props.value) === null || _c === void 0 ? void 0 : _c.displayedDate.year()}`;
|
|
1106
1103
|
}, [(_a = props.value) === null || _a === void 0 ? void 0 : _a.view, (_b = props.value) === null || _b === void 0 ? void 0 : _b.displayedDate]);
|
|
1107
|
-
return (React__namespace.createElement("div", { className: cx__default.default(css$
|
|
1104
|
+
return (React__namespace.createElement("div", { className: cx__default.default(css$15.container, uuiHeader.container, props.cx) },
|
|
1108
1105
|
React__namespace.createElement("header", { className: uuiHeader.header },
|
|
1109
|
-
React__namespace.createElement(Button, { icon:
|
|
1110
|
-
React__namespace.createElement(Button, { caption: title,
|
|
1111
|
-
React__namespace.createElement(Button, { icon:
|
|
1106
|
+
React__namespace.createElement(Button, { icon: ForwardRef$J, color: "secondary", mode: "ghost", cx: uuiHeader.navIconLeft, onClick: () => onLeftNavigationArrow() }),
|
|
1107
|
+
React__namespace.createElement(Button, { caption: title, mode: "ghost", cx: uuiHeader.navTitle, onClick: () => onCaptionClick(props.value.view) }),
|
|
1108
|
+
React__namespace.createElement(Button, { icon: ForwardRef$I, color: "secondary", mode: "ghost", cx: uuiHeader.navIconRight, onClick: () => onRightNavigationArrow() }))));
|
|
1112
1109
|
}
|
|
1113
1110
|
|
|
1114
|
-
var css$
|
|
1111
|
+
var css$14 = {"root":"xW-c5o"};
|
|
1115
1112
|
|
|
1116
1113
|
function applyDateSelectionMods() {
|
|
1117
|
-
return [css$
|
|
1114
|
+
return [css$14.root];
|
|
1118
1115
|
}
|
|
1119
1116
|
const Calendar = uuiCore.withMods(uuiComponents.Calendar, applyDateSelectionMods);
|
|
1120
1117
|
|
|
1121
|
-
var css$15 = {"root":"OWohPB"};
|
|
1122
|
-
|
|
1123
1118
|
dayjs__default.default.extend(updateLocale__default.default);
|
|
1124
1119
|
const uuiDatePickerBody = {
|
|
1125
1120
|
wrapper: 'uui-datepickerBody-wrapper',
|
|
@@ -1145,8 +1140,8 @@ class DatePickerBody extends uuiComponents.DatePickerBodyBase {
|
|
|
1145
1140
|
return (React__namespace.createElement(Calendar, { value: dayjs__default.default(this.props.value.selectedDate), onValueChange: this.onDayClick, displayedDate: this.props.value.displayedDate, filter: this.props.filter, getDayCX: this.props.getDayCX, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday }));
|
|
1146
1141
|
}
|
|
1147
1142
|
};
|
|
1148
|
-
this.
|
|
1149
|
-
return (React__namespace.createElement("div", { className: uuiCore.cx(
|
|
1143
|
+
this.renderDatePicker = () => {
|
|
1144
|
+
return (React__namespace.createElement("div", { className: uuiCore.cx(uuiDatePickerBody.wrapper, this.props.cx) },
|
|
1150
1145
|
React__namespace.createElement(DatePickerHeader, { value: this.props.value, onValueChange: (newValue) => this.props.setDisplayedDateAndView(newValue.displayedDate, newValue.view) }),
|
|
1151
1146
|
this.getView()));
|
|
1152
1147
|
};
|
|
@@ -1235,16 +1230,16 @@ var SvgNavigationClose24$1 = function SvgNavigationClose24(props, ref) {
|
|
|
1235
1230
|
};
|
|
1236
1231
|
var ForwardRef$D = /*#__PURE__*/React.forwardRef(SvgNavigationClose24$1);
|
|
1237
1232
|
|
|
1238
|
-
var css$
|
|
1233
|
+
var css$13 = {"root":"sOzgSz","icon-wrapper":"X102F6","alert-wrapper":"h6khSz","size-48":"FI-DGe","size-36":"nYkxfx","action-wrapper":"TQqan5","action-icon":"kVehal","action-link":"s-s75J","close-icon":"hWRctH","main-path":"EyeoAy","content":"j52qKb","iconWrapper":"X102F6","alertWrapper":"h6khSz","size48":"FI-DGe","size36":"nYkxfx","actionWrapper":"TQqan5","actionIcon":"kVehal","actionLink":"s-s75J","closeIcon":"hWRctH","mainPath":"EyeoAy"};
|
|
1239
1234
|
|
|
1240
|
-
const Alert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", Object.assign({ role: "alert", ref: ref, className: cx__default.default(
|
|
1241
|
-
React__namespace.createElement("div", { className: css$
|
|
1242
|
-
props.icon && (React__namespace.createElement("div", { className: css$
|
|
1243
|
-
React__namespace.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$
|
|
1244
|
-
React__namespace.createElement("div", { className: css$
|
|
1235
|
+
const Alert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", Object.assign({ role: "alert", ref: ref, className: cx__default.default(css$13.alertWrapper, `alert-${props.color || 'default'}`, css$13.root, props.cx, (props.size === '36' ? css$13.size36 : css$13.size48)) }, props.rawProps),
|
|
1236
|
+
React__namespace.createElement("div", { className: css$13.mainPath },
|
|
1237
|
+
props.icon && (React__namespace.createElement("div", { className: css$13.iconWrapper },
|
|
1238
|
+
React__namespace.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$13.actionIcon }))),
|
|
1239
|
+
React__namespace.createElement("div", { className: css$13.content },
|
|
1245
1240
|
props.children,
|
|
1246
|
-
props.actions && (React__namespace.createElement("div", { className: css$
|
|
1247
|
-
props.onClose && React__namespace.createElement(IconButton, { icon: ForwardRef$D, color: "
|
|
1241
|
+
props.actions && (React__namespace.createElement("div", { className: css$13.actionWrapper }, props.actions.map((action) => (React__namespace.createElement(LinkButton, { caption: action.name, onClick: action.action, key: action.name, cx: css$13.actionLink, size: (props === null || props === void 0 ? void 0 : props.size) === '36' ? '24' : '30' })))))),
|
|
1242
|
+
props.onClose && React__namespace.createElement(IconButton, { icon: ForwardRef$D, color: "default", onClick: props.onClose, cx: css$13.closeIcon })))));
|
|
1248
1243
|
const WarningAlert = React__namespace.forwardRef((props, ref) => React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$G, color: "warning", ref: ref }, props)));
|
|
1249
1244
|
const SuccessAlert = React__namespace.forwardRef((props, ref) => React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$H, color: "success", ref: ref }, props)));
|
|
1250
1245
|
const HintAlert = React__namespace.forwardRef((props, ref) => React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$E, color: "info", ref: ref }, props)));
|
|
@@ -1254,7 +1249,7 @@ function Dropdown(props) {
|
|
|
1254
1249
|
return React__namespace.createElement(uuiComponents.Dropdown, Object.assign({}, props));
|
|
1255
1250
|
}
|
|
1256
1251
|
|
|
1257
|
-
var css$
|
|
1252
|
+
var css$12 = {"bodyRoot":"_43tXIH","submenuRootItem":"jRlg-h","iconAfter":"_8qoh1F","iconCheck":"-TaOJK","splitterRoot":"gPkmhZ","splitter":"V82HHx","headerRoot":"nCbPRk","itemRoot":"OQ443p","icon":"ueBEP9","link":"N8GpcA","indent":"ws8fqt"};
|
|
1258
1253
|
|
|
1259
1254
|
const icons = systemIcons['36'];
|
|
1260
1255
|
exports.IDropdownControlKeys = void 0;
|
|
@@ -1289,9 +1284,9 @@ function DropdownMenuContainer(props) {
|
|
|
1289
1284
|
props.onClose();
|
|
1290
1285
|
}
|
|
1291
1286
|
};
|
|
1292
|
-
return (React__namespace.default.createElement(DropdownContainer, Object.assign({}, props, { rawProps: Object.assign(Object.assign({}, props.rawProps), { role: 'menu' }), ref: menuRef, lockProps: { onKeyDown: handleArrowKeys }
|
|
1287
|
+
return (React__namespace.default.createElement(DropdownContainer, Object.assign({}, props, { rawProps: Object.assign(Object.assign({}, props.rawProps), { role: 'menu' }), ref: menuRef, lockProps: { onKeyDown: handleArrowKeys } })));
|
|
1293
1288
|
}
|
|
1294
|
-
const DropdownMenuBody = uuiCore.withMods(DropdownMenuContainer, () => [css$
|
|
1289
|
+
const DropdownMenuBody = uuiCore.withMods(DropdownMenuContainer, () => [css$12.bodyRoot], (props) => {
|
|
1295
1290
|
const dropdownRawProps = props.minWidth ? Object.assign(Object.assign({}, props.rawProps), { style: { minWidth: `${props.minWidth}px` } }) : null;
|
|
1296
1291
|
return (Object.assign(Object.assign({ closeOnKey: exports.IDropdownControlKeys.ESCAPE }, props), { rawProps: dropdownRawProps || props.rawProps }));
|
|
1297
1292
|
});
|
|
@@ -1315,32 +1310,32 @@ const DropdownMenuButton = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1315
1310
|
const getMenuButtonContent = () => {
|
|
1316
1311
|
const isIconBefore = Boolean(icon && iconPosition !== 'right');
|
|
1317
1312
|
const isIconAfter = Boolean(icon && iconPosition === 'right');
|
|
1318
|
-
const iconElement = (React__namespace.default.createElement(IconButton, { icon: icon, color: isActive ? 'info' : '
|
|
1313
|
+
const iconElement = (React__namespace.default.createElement(IconButton, { icon: icon, color: isActive ? 'info' : 'default', onClick: onIconClick, isDisabled: isDisabled, cx: uuiCore.cx(css$12.icon, iconPosition === 'right' ? css$12.iconAfter : css$12.iconBefore) }));
|
|
1319
1314
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
1320
1315
|
isIconBefore && iconElement,
|
|
1321
|
-
React__namespace.default.createElement(uuiComponents.Text, { cx: props.indent && css$
|
|
1316
|
+
React__namespace.default.createElement(uuiComponents.Text, { cx: props.indent && css$12.indent }, caption),
|
|
1322
1317
|
isIconAfter && (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
1323
1318
|
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
1324
1319
|
iconElement))));
|
|
1325
1320
|
};
|
|
1326
1321
|
const isAnchor = Boolean(link || href);
|
|
1327
|
-
const itemClassNames = uuiCore.cx(
|
|
1328
|
-
return isAnchor ? (React__namespace.default.createElement(uuiComponents.Anchor, { cx: uuiCore.cx(css$
|
|
1322
|
+
const itemClassNames = uuiCore.cx(props.cx, css$12.itemRoot, isDisabled && uuiCore.uuiMod.disabled, isActive && uuiCore.uuiMod.active, isOpen && uuiCore.uuiMod.opened);
|
|
1323
|
+
return isAnchor ? (React__namespace.default.createElement(uuiComponents.Anchor, { cx: uuiCore.cx(css$12.link, itemClassNames), link: link, href: href, rawProps: { role: 'menuitem', tabIndex: isDisabled ? -1 : 0 }, onClick: handleClick, isDisabled: isDisabled, forwardedRef: ref, target: target }, getMenuButtonContent())) : (React__namespace.default.createElement(uuiComponents.FlexRow, { rawProps: {
|
|
1329
1324
|
tabIndex: isDisabled ? -1 : 0,
|
|
1330
1325
|
role: 'menuitem',
|
|
1331
1326
|
onKeyDown: isDisabled ? null : handleOpenDropdown,
|
|
1332
1327
|
}, cx: itemClassNames, onClick: handleClick, ref: ref },
|
|
1333
1328
|
getMenuButtonContent(),
|
|
1334
|
-
isSelected && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icons.accept, cx:
|
|
1329
|
+
isSelected && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icons.accept, cx: css$12.selectedCheckmark })));
|
|
1335
1330
|
});
|
|
1336
1331
|
DropdownMenuButton.displayName = 'DropdownMenuButton';
|
|
1337
1332
|
function DropdownMenuSplitter(props) {
|
|
1338
|
-
return (React__namespace.default.createElement("div", { className: uuiCore.cx(
|
|
1339
|
-
React__namespace.default.createElement("hr", { className: css$
|
|
1333
|
+
return (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$12.splitterRoot) },
|
|
1334
|
+
React__namespace.default.createElement("hr", { className: css$12.splitter })));
|
|
1340
1335
|
}
|
|
1341
1336
|
function DropdownMenuHeader(props) {
|
|
1342
|
-
return (React__namespace.default.createElement("div", { className: uuiCore.cx(
|
|
1343
|
-
React__namespace.default.createElement("span", { className: css$
|
|
1337
|
+
return (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$12.headerRoot) },
|
|
1338
|
+
React__namespace.default.createElement("span", { className: css$12.header }, props.caption)));
|
|
1344
1339
|
}
|
|
1345
1340
|
function DropdownSubMenu(props) {
|
|
1346
1341
|
const subMenuModifiers = [
|
|
@@ -1360,7 +1355,7 @@ function DropdownSubMenu(props) {
|
|
|
1360
1355
|
];
|
|
1361
1356
|
return (React__namespace.default.createElement(uuiComponents.Dropdown, { openOnHover: props.openOnHover || true, closeOnMouseLeave: "boundary", openDelay: 400, closeDelay: 400, placement: "right-start", modifiers: subMenuModifiers, renderBody: (dropdownProps) => React__namespace.default.createElement(DropdownMenuBody, Object.assign({ closeOnKey: exports.IDropdownControlKeys.LEFT_ARROW }, props, dropdownProps)), renderTarget: (_a) => {
|
|
1362
1357
|
var { toggleDropdownOpening } = _a, targetProps = __rest(_a, ["toggleDropdownOpening"]);
|
|
1363
|
-
return (React__namespace.default.createElement(DropdownMenuButton, Object.assign({ cx: uuiCore.cx(css$
|
|
1358
|
+
return (React__namespace.default.createElement(DropdownMenuButton, Object.assign({ cx: uuiCore.cx(css$12.submenuRootItem), icon: icons.foldingArrow, iconPosition: "right", isDropdown: true, toggleDropdownOpening: toggleDropdownOpening }, props, targetProps)));
|
|
1364
1359
|
} }));
|
|
1365
1360
|
}
|
|
1366
1361
|
function DropdownMenuSwitchButton(props) {
|
|
@@ -1377,41 +1372,116 @@ function DropdownMenuSwitchButton(props) {
|
|
|
1377
1372
|
onHandleValueChange(!isSelected);
|
|
1378
1373
|
}
|
|
1379
1374
|
};
|
|
1380
|
-
return (React__namespace.default.createElement(uuiComponents.FlexRow, { cx: uuiCore.cx(props.cx, css$
|
|
1381
|
-
icon && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icon, cx: css$
|
|
1375
|
+
return (React__namespace.default.createElement(uuiComponents.FlexRow, { cx: uuiCore.cx(props.cx, css$12.itemRoot, isDisabled && uuiCore.uuiMod.disabled), onClick: () => onHandleValueChange(!isSelected), rawProps: { role: 'menuitem', onKeyDown: handleKeySelect, tabIndex: isDisabled ? -1 : 0 } },
|
|
1376
|
+
icon && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icon, cx: css$12.iconBefore }),
|
|
1382
1377
|
React__namespace.default.createElement(uuiComponents.Text, null, caption),
|
|
1383
1378
|
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
1384
1379
|
React__namespace.default.createElement(Switch, { value: isSelected, tabIndex: -1, onValueChange: onHandleValueChange })));
|
|
1385
1380
|
}
|
|
1386
1381
|
|
|
1387
|
-
var css$
|
|
1382
|
+
var css$11 = {"root":"bHjsEp","border-bottom":"gUS4Zj","top-shadow":"MYc4ym","size-24":"qSXkpG","size-30":"Y1jeoa","size-36":"dP27oB","size-42":"W5NArO","size-48":"Mzkfz7","padding-6":"jfemFq","padding-12":"WtF6gw","padding-18":"hid8OR","padding-24":"IS8t9c","margin-24":"_-2QABv","margin-12":"SOJ62w","vPadding-12":"wP5RmM","vPadding-18":"_18BJuD","vPadding-24":"q1Emhz","vPadding-36":"l4ObgA","vPadding-48":"M1A--O","spacing-6":"CweRqB","spacing-12":"JzzIpm","spacing-18":"CJT8fy","borderBottom":"gUS4Zj","topShadow":"MYc4ym","size24":"qSXkpG","size30":"Y1jeoa","size36":"dP27oB","size42":"W5NArO","size48":"Mzkfz7","padding6":"jfemFq","padding12":"WtF6gw","padding18":"hid8OR","padding24":"IS8t9c","margin24":"_-2QABv","margin12":"SOJ62w","vPadding12":"wP5RmM","vPadding18":"_18BJuD","vPadding24":"q1Emhz","vPadding36":"l4ObgA","vPadding48":"M1A--O","spacing6":"CweRqB","spacing12":"JzzIpm","spacing18":"CJT8fy"};
|
|
1388
1383
|
|
|
1389
|
-
const FlexCell = uuiCore.withMods(uuiComponents.FlexCell, () => [css$
|
|
1384
|
+
const FlexCell = uuiCore.withMods(uuiComponents.FlexCell, () => [css$11.flexCell]);
|
|
1390
1385
|
|
|
1391
1386
|
const FlexRow = uuiCore.withMods(uuiComponents.FlexRow, (props) => {
|
|
1392
1387
|
return [
|
|
1393
|
-
css$
|
|
1394
|
-
props.size !== null && css$12['size-' + (props.size || '36')],
|
|
1395
|
-
props.padding && css$12['padding-' + props.padding],
|
|
1396
|
-
props.vPadding && css$12['vPadding-' + props.vPadding],
|
|
1397
|
-
props.margin && css$12['margin-' + props.margin],
|
|
1398
|
-
props.topShadow && css$12.topShadow,
|
|
1399
|
-
props.borderBottom && css$12.borderBottom,
|
|
1400
|
-
props.spacing && css$12['spacing-' + props.spacing],
|
|
1401
|
-
props.background && `uui-color-${props.background}`,
|
|
1388
|
+
css$11.root, props.size !== null && css$11['size-' + (props.size || '36')], props.padding && css$11['padding-' + props.padding], props.vPadding && css$11['vPadding-' + props.vPadding], props.margin && css$11['margin-' + props.margin], props.topShadow && css$11.topShadow, props.borderBottom && css$11.borderBottom, props.spacing && css$11['spacing-' + props.spacing],
|
|
1402
1389
|
];
|
|
1403
1390
|
});
|
|
1404
1391
|
|
|
1405
|
-
var css$
|
|
1392
|
+
var css$10 = {"root":"XXR3Ds","margin-24":"lSUPTG","padding-12":"hrk4-Y","padding-24":"TVeoib","shadow":"EHDQ8M","margin24":"lSUPTG","padding12":"hrk4-Y","padding24":"TVeoib"};
|
|
1406
1393
|
|
|
1407
1394
|
const Panel = uuiCore.withMods(uuiComponents.VPanel, (props) => [
|
|
1408
|
-
'uui-panel',
|
|
1409
|
-
css$11.root,
|
|
1410
|
-
props.shadow && css$11.shadow,
|
|
1411
|
-
props.margin && css$11['margin-' + props.margin],
|
|
1412
|
-
props.background && `uui-color-${props.background}`,
|
|
1395
|
+
'uui-panel', css$10.root, props.shadow && css$10.shadow, props.margin && css$10['margin-' + props.margin],
|
|
1413
1396
|
]);
|
|
1414
1397
|
|
|
1398
|
+
var css$$ = {"root":"D2QmF6"};
|
|
1399
|
+
|
|
1400
|
+
var css$_ = {"line-height-12":"Ls4HSs","line-height-18":"IBzWgI","line-height-24":"E2psIP","line-height-30":"_69eN-B","font-size-10":"_3Ox-cx","font-size-12":"ITyelp","font-size-14":"A7poa3","font-size-16":"kbczvD","font-size-18":"lz-0g5","font-size-24":"Uj-Yc6","v-padding-2":"yGrGJG","v-padding-3":"au3aEU","v-padding-5":"otrYJH","v-padding-6":"F9Lafv","v-padding-8":"REDQUM","v-padding-9":"hnnLS1","v-padding-11":"EIoA7G","v-padding-12":"uuRb9A","v-padding-14":"HnDGtX","v-padding-15":"L72KdE","v-padding-17":"kTiUaB","v-padding-18":"ge3TKQ","v-padding-23":"APGFcJ","v-padding-24":"_1sG0ba","lineHeight12":"Ls4HSs","lineHeight18":"IBzWgI","lineHeight24":"E2psIP","lineHeight30":"_69eN-B","fontSize10":"_3Ox-cx","fontSize12":"ITyelp","fontSize14":"A7poa3","fontSize16":"kbczvD","fontSize18":"lz-0g5","fontSize24":"Uj-Yc6","vPadding2":"yGrGJG","vPadding3":"au3aEU","vPadding5":"otrYJH","vPadding6":"F9Lafv","vPadding8":"REDQUM","vPadding9":"hnnLS1","vPadding11":"EIoA7G","vPadding12":"uuRb9A","vPadding14":"HnDGtX","vPadding15":"L72KdE","vPadding17":"kTiUaB","vPadding18":"ge3TKQ","vPadding23":"APGFcJ","vPadding24":"_1sG0ba"};
|
|
1401
|
+
|
|
1402
|
+
const defaultTextSettings = {
|
|
1403
|
+
18: { lineHeight: 12, fontSize: 10 },
|
|
1404
|
+
24: { lineHeight: 18, fontSize: 12 },
|
|
1405
|
+
30: { lineHeight: 18, fontSize: 14 },
|
|
1406
|
+
36: { lineHeight: 18, fontSize: 14 },
|
|
1407
|
+
42: { lineHeight: 24, fontSize: 16 },
|
|
1408
|
+
48: { lineHeight: 24, fontSize: 16 },
|
|
1409
|
+
60: { lineHeight: 30, fontSize: 24 },
|
|
1410
|
+
};
|
|
1411
|
+
function getTextClasses(props, border) {
|
|
1412
|
+
if (props.size === 'none') {
|
|
1413
|
+
return [css$_['line-height-' + props.lineHeight], css$_['font-size-' + props.fontSize]];
|
|
1414
|
+
}
|
|
1415
|
+
const setting = {
|
|
1416
|
+
size: props.size,
|
|
1417
|
+
lineHeight: props.lineHeight || defaultTextSettings[props.size].lineHeight,
|
|
1418
|
+
fontSize: props.fontSize || defaultTextSettings[props.size].fontSize,
|
|
1419
|
+
};
|
|
1420
|
+
const vPadding = (+setting.size - +setting.lineHeight - (border ? 2 : 0)) / 2;
|
|
1421
|
+
return [
|
|
1422
|
+
css$_['line-height-' + setting.lineHeight], css$_['font-size-' + setting.fontSize], css$_['v-padding-' + vPadding],
|
|
1423
|
+
];
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
function applyTextMods(mods) {
|
|
1427
|
+
const textClasses = getTextClasses({
|
|
1428
|
+
size: mods.size || '36',
|
|
1429
|
+
lineHeight: mods.lineHeight,
|
|
1430
|
+
fontSize: mods.fontSize,
|
|
1431
|
+
}, false);
|
|
1432
|
+
return [
|
|
1433
|
+
`uui-font-${mods.font || 'regular'}`,
|
|
1434
|
+
`uui-text-${mods.color || 'primary'}`,
|
|
1435
|
+
css$$.root,
|
|
1436
|
+
].concat(textClasses);
|
|
1437
|
+
}
|
|
1438
|
+
const Text = uuiCore.withMods(uuiComponents.Text, applyTextMods);
|
|
1439
|
+
|
|
1440
|
+
var css$Z = {"container":"_5gNYlx","loading-word":"_1wEsVw","animated-loading":"P-Cskh","skeleton_loading":"MS-uNo","loadingWord":"_1wEsVw","animatedLoading":"P-Cskh","skeletonLoading":"MS-uNo"};
|
|
1441
|
+
|
|
1442
|
+
const TextPlaceholder = (props) => {
|
|
1443
|
+
const pattern = ' ';
|
|
1444
|
+
const text = React__namespace.useMemo(() => {
|
|
1445
|
+
const words = [];
|
|
1446
|
+
for (let i = 0; i < (props.wordsCount || 1); i++) {
|
|
1447
|
+
const lengthWord = Math.floor(Math.random() * 10 + 8);
|
|
1448
|
+
words.push(pattern.repeat(lengthWord));
|
|
1449
|
+
}
|
|
1450
|
+
return words;
|
|
1451
|
+
}, [props.wordsCount]);
|
|
1452
|
+
return (React__namespace.createElement("div", Object.assign({ "aria-busy": true, className: css$Z.container }, props.rawProps), text.map((it, index) => (React__namespace.createElement("span", { key: index, className: cx__default.default([
|
|
1453
|
+
props.cx, css$Z.loadingWord, !props.isNotAnimated && css$Z.animatedLoading,
|
|
1454
|
+
]), dangerouslySetInnerHTML: { __html: it } })))));
|
|
1455
|
+
};
|
|
1456
|
+
|
|
1457
|
+
var style = {"typography-16":"VsECio","typography-14":"_2eIIED","typography-12":"Rp8Q1e","typography-uui":"wQ5LA6","typography16":"VsECio","typography14":"_2eIIED","typography12":"Rp8Q1e","typographyUui":"wQ5LA6"};
|
|
1458
|
+
|
|
1459
|
+
const RichTextView = uuiCore.withMods(uuiComponents__namespace.RichTextView, (mods) => [style.typographyUui, style['typography-' + (mods.size || '14')]]);
|
|
1460
|
+
|
|
1461
|
+
var css$Y = {"modal-blocker":"YU0A8K","animateModalBlocker":"_4yQzYl","modal":"YTQxCZ","modal-footer":"V-m7u0","border-top":"CLfKji","modal-header":"RtBELJ","modalBlocker":"YU0A8K","modalFooter":"V-m7u0","borderTop":"CLfKji","modalHeader":"RtBELJ"};
|
|
1462
|
+
|
|
1463
|
+
const ModalBlocker = uuiCore.withMods(uuiComponents.ModalBlocker, () => [css$Y.modalBlocker]);
|
|
1464
|
+
const ModalWindow = uuiCore.withMods(uuiComponents.ModalWindow, () => [css$Y.modal], (props) => ({
|
|
1465
|
+
style: Object.assign(Object.assign({}, props.style), { width: `${props.width || 420}px`, height: props.height ? `${props.height}px` : 'auto' }),
|
|
1466
|
+
}));
|
|
1467
|
+
class ModalHeader extends React__namespace.Component {
|
|
1468
|
+
render() {
|
|
1469
|
+
return (React__namespace.createElement(FlexRow, { padding: this.props.padding || '24', vPadding: "12", borderBottom: this.props.borderBottom, cx: [css$Y.modalHeader, this.props.cx], spacing: "12", rawProps: this.props.rawProps },
|
|
1470
|
+
this.props.title && (React__namespace.createElement(Text, { size: "48", fontSize: "18", font: "semibold" }, this.props.title)),
|
|
1471
|
+
this.props.children,
|
|
1472
|
+
this.props.onClose && React__namespace.createElement(uuiComponents.FlexSpacer, null),
|
|
1473
|
+
this.props.onClose && (React__namespace.createElement(FlexCell, { shrink: 0, width: "auto" },
|
|
1474
|
+
React__namespace.createElement(IconButton, { rawProps: { 'aria-label': 'Close modal' }, icon: ForwardRef$D, onClick: this.props.onClose })))));
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
class ModalFooter extends React__namespace.Component {
|
|
1478
|
+
render() {
|
|
1479
|
+
return (React__namespace.createElement(FlexRow, { spacing: this.props.spacing || '12', cx: [
|
|
1480
|
+
css$Y.modalFooter, this.props.borderTop && css$Y.borderTop, this.props.cx,
|
|
1481
|
+
], padding: this.props.padding || '24', vPadding: this.props.vPadding || '24', rawProps: this.props.rawProps }, this.props.children));
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1415
1485
|
const i18n = Object.assign(Object.assign({}, uuiCore.i18n), { dataPickerBody: {
|
|
1416
1486
|
searchPlaceholder: 'Search',
|
|
1417
1487
|
noRecordsMessage: 'No records found',
|
|
@@ -1501,43 +1571,94 @@ const i18n = Object.assign(Object.assign({}, uuiCore.i18n), { dataPickerBody: {
|
|
|
1501
1571
|
fileSizeProgress: ' of ',
|
|
1502
1572
|
} });
|
|
1503
1573
|
|
|
1504
|
-
var
|
|
1574
|
+
var _path$B;
|
|
1575
|
+
function _extends$C() { _extends$C = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$C.apply(this, arguments); }
|
|
1576
|
+
var SvgCross = function SvgCross(props, ref) {
|
|
1577
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$C({
|
|
1578
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1579
|
+
width: 24,
|
|
1580
|
+
height: 24,
|
|
1581
|
+
viewBox: "0 0 24 24",
|
|
1582
|
+
ref: ref
|
|
1583
|
+
}, props), _path$B || (_path$B = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1584
|
+
fillRule: "evenodd",
|
|
1585
|
+
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
1586
|
+
})));
|
|
1587
|
+
};
|
|
1588
|
+
var ForwardRef$C = /*#__PURE__*/React.forwardRef(SvgCross);
|
|
1505
1589
|
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1590
|
+
var css$X = {"root":"ckp29D","icon-wrapper":"eZpjQi","action-wrapper":"_1tB2Lc","action-link":"_8HPQbt","close-icon":"v8tBmL","main-path":"gjuq3-","content":"I3GXxj","clear-button":"quKLh7","close-wrapper":"V441Cr","iconWrapper":"eZpjQi","actionWrapper":"_1tB2Lc","actionLink":"_8HPQbt","closeIcon":"v8tBmL","mainPath":"gjuq3-","clearButton":"quKLh7","closeWrapper":"V441Cr"};
|
|
1591
|
+
|
|
1592
|
+
const NotificationCard = React__namespace.default.forwardRef((props, ref) => {
|
|
1593
|
+
const notificationCardNode = React__namespace.default.useRef(null);
|
|
1594
|
+
React__namespace.default.useImperativeHandle(ref, () => notificationCardNode.current, [notificationCardNode.current]);
|
|
1595
|
+
React__namespace.default.useLayoutEffect(() => {
|
|
1596
|
+
var _a, _b;
|
|
1597
|
+
(_a = notificationCardNode.current) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', props.clearTimer);
|
|
1598
|
+
(_b = notificationCardNode.current) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', props.refreshTimer);
|
|
1599
|
+
return () => {
|
|
1600
|
+
var _a, _b;
|
|
1601
|
+
(_a = notificationCardNode.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', props.clearTimer);
|
|
1602
|
+
(_b = notificationCardNode.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', props.refreshTimer);
|
|
1603
|
+
};
|
|
1604
|
+
}, []);
|
|
1605
|
+
return (React__namespace.default.createElement("div", Object.assign({ role: "alert", className: cx__default.default(props.color && `notification-card-${props.color}`, css$X.root, props.cx), ref: notificationCardNode }, props.rawProps),
|
|
1606
|
+
React__namespace.default.createElement("div", { className: css$X.mainPath },
|
|
1607
|
+
props.icon && (React__namespace.default.createElement("div", { className: css$X.iconWrapper },
|
|
1608
|
+
React__namespace.default.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$X.actionIcon }))),
|
|
1609
|
+
React__namespace.default.createElement("div", { className: css$X.content },
|
|
1610
|
+
props.children,
|
|
1611
|
+
props.actions && (React__namespace.default.createElement("div", { className: css$X.actionWrapper }, props.actions.map((action) => (React__namespace.default.createElement(LinkButton, { caption: action.name, onClick: action.action, key: action.name, cx: css$X.actionLink, size: "36", rawProps: action.rawProps })))))),
|
|
1612
|
+
props.onClose && (React__namespace.default.createElement("div", { className: css$X.closeWrapper },
|
|
1613
|
+
React__namespace.default.createElement(IconButton, { icon: ForwardRef$C, color: "default", onClick: props.onClose, cx: css$X.closeIcon }))))));
|
|
1614
|
+
});
|
|
1615
|
+
const WarningNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$G, color: "warning" }, props, { ref: ref, cx: props.cx }))));
|
|
1616
|
+
const SuccessNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$H, color: "success" }, props, { ref: ref, cx: props.cx }))));
|
|
1617
|
+
const HintNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$E, color: "info" }, props, { ref: ref, cx: props.cx }))));
|
|
1618
|
+
const ErrorNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$F, color: "error" }, props, { ref: ref, cx: props.cx }))));
|
|
1619
|
+
class ClearNotification extends React__namespace.default.Component {
|
|
1620
|
+
render() {
|
|
1621
|
+
return (React__namespace.default.createElement("div", { className: cx__default.default(css$X.notificationWrapper, css$X.clearButton) },
|
|
1622
|
+
React__namespace.default.createElement(LinkButton, { caption: i18n.notificationCard.closeAllNotificationsButton, onClick: () => this.context.uuiNotifications.clearAll() })));
|
|
1623
|
+
}
|
|
1512
1624
|
}
|
|
1513
|
-
|
|
1514
|
-
dropdownIcon: mods.dropdownIcon !== null && systemIcons[mods.mode === 'block' ? '60' : '30'].foldingArrow,
|
|
1515
|
-
}));
|
|
1625
|
+
ClearNotification.contextType = uuiCore.UuiContext;
|
|
1516
1626
|
|
|
1517
|
-
var css
|
|
1627
|
+
var css$W = {"root":"hWqffz"};
|
|
1518
1628
|
|
|
1519
1629
|
function applyTooltipMods(mods) {
|
|
1520
1630
|
return [
|
|
1521
|
-
|
|
1522
|
-
|
|
1631
|
+
`tooltip-${mods.color || 'contrast'}`,
|
|
1632
|
+
css$W.root,
|
|
1523
1633
|
];
|
|
1524
1634
|
}
|
|
1525
1635
|
const Tooltip = uuiCore.withMods(uuiComponents.Tooltip, applyTooltipMods);
|
|
1526
1636
|
|
|
1527
|
-
var css$
|
|
1637
|
+
var css$V = {"root":"kN8duC","mode-block":"ii3Zmb","mode-inline":"Pry9Wz","padding-0":"zsQkts","padding-6":"H0Eq6t","padding-12":"Ucn5sB","padding-18":"GUc0kD","modeBlock":"ii3Zmb","modeInline":"Pry9Wz","padding0":"zsQkts","padding6":"H0Eq6t","padding12":"Ucn5sB","padding18":"GUc0kD"};
|
|
1638
|
+
|
|
1639
|
+
function applyAccordionMods(mods) {
|
|
1640
|
+
return [
|
|
1641
|
+
css$V.root, css$V['mode-' + (mods.mode || 'block')], mods.padding && css$V['padding-' + mods.padding],
|
|
1642
|
+
];
|
|
1643
|
+
}
|
|
1644
|
+
const Accordion = uuiCore.withMods(uuiComponents__namespace.Accordion, applyAccordionMods, (mods) => ({
|
|
1645
|
+
dropdownIcon: mods.dropdownIcon !== null && systemIcons[mods.mode === 'block' ? '60' : '30'].foldingArrow,
|
|
1646
|
+
}));
|
|
1647
|
+
|
|
1648
|
+
var css$U = {"root":"EvsI1T","size-24":"mTFpYA","size-30":"OOkBPB","size-36":"i2m-gP","size-42":"xc3p6c","size-48":"-svmZ0","size24":"mTFpYA","size30":"OOkBPB","size36":"i2m-gP","size42":"xc3p6c","size48":"-svmZ0"};
|
|
1528
1649
|
|
|
1529
1650
|
const defaultSize$6 = '36';
|
|
1530
1651
|
function applyLabeledInputMods(mods) {
|
|
1531
|
-
return [css$
|
|
1652
|
+
return [css$U.root, css$U['size-' + (mods.size || defaultSize$6)]];
|
|
1532
1653
|
}
|
|
1533
|
-
const LabeledInput = uuiCore.withMods(
|
|
1654
|
+
const LabeledInput = uuiCore.withMods(uuiComponents__namespace.LabeledInput, applyLabeledInputMods, (props) => ({
|
|
1534
1655
|
Tooltip,
|
|
1535
1656
|
infoIcon: systemIcons[props.size || defaultSize$6].help,
|
|
1536
1657
|
}));
|
|
1537
1658
|
|
|
1538
|
-
var css$
|
|
1659
|
+
var css$T = {"root":"Ps6j7B"};
|
|
1539
1660
|
|
|
1540
|
-
const RadioGroup = uuiCore.withMods(uuiComponents.RadioGroup, () => [css$
|
|
1661
|
+
const RadioGroup = uuiCore.withMods(uuiComponents.RadioGroup, () => [css$T.root], () => ({ RadioInput }));
|
|
1541
1662
|
|
|
1542
1663
|
function applyScrollBarsMods() {
|
|
1543
1664
|
return [
|
|
@@ -1546,142 +1667,433 @@ function applyScrollBarsMods() {
|
|
|
1546
1667
|
}
|
|
1547
1668
|
const ScrollBars = uuiCore.withMods(uuiComponents.ScrollBars, applyScrollBarsMods);
|
|
1548
1669
|
|
|
1549
|
-
|
|
1670
|
+
var css$S = {"scroll-container":"i3G0CT","list-container":"sp7iYE","scrollContainer":"i3G0CT","listContainer":"sp7iYE"};
|
|
1550
1671
|
|
|
1551
|
-
var css$
|
|
1672
|
+
var css$R = {"root":"AWyU2E"};
|
|
1552
1673
|
|
|
1553
|
-
var css$
|
|
1674
|
+
var css$Q = {"root":"HK4Zh9","uui-spinner":"Yrxrun","uuiSpinner":"Yrxrun"};
|
|
1554
1675
|
|
|
1555
1676
|
function applySpinnerMods() {
|
|
1556
|
-
return [css$
|
|
1677
|
+
return [css$Q.root];
|
|
1557
1678
|
}
|
|
1558
1679
|
const Spinner = uuiCore.withMods(uuiComponents.Spinner, applySpinnerMods);
|
|
1559
1680
|
|
|
1560
|
-
const Blocker = uuiCore.withMods(uuiComponents.Blocker, () => [css$
|
|
1681
|
+
const Blocker = uuiCore.withMods(uuiComponents.Blocker, () => [css$R.root], (cmpProps) => ({ renderSpinner: cmpProps.renderSpinner || (() => React__namespace.default.createElement(Spinner, null)) }));
|
|
1561
1682
|
|
|
1562
|
-
|
|
1683
|
+
const VirtualList = React__namespace.forwardRef((props, ref) => {
|
|
1684
|
+
const { listContainerRef, offsetY, handleScroll, estimatedHeight, scrollContainerRef, } = uuiCore.useVirtualList({
|
|
1685
|
+
value: props.value,
|
|
1686
|
+
onValueChange: props.onValueChange,
|
|
1687
|
+
onScroll: props.onScroll,
|
|
1688
|
+
rowsCount: props.rowsCount,
|
|
1689
|
+
rowsSelector: props.rowsSelector,
|
|
1690
|
+
});
|
|
1691
|
+
React__namespace.useImperativeHandle(ref, () => scrollContainerRef.current, [scrollContainerRef.current]);
|
|
1692
|
+
const scrollShadows = uuiCore.useScrollShadows({ root: scrollContainerRef.current });
|
|
1693
|
+
const renderRows = () => {
|
|
1694
|
+
var _a;
|
|
1695
|
+
return ((_a = props.renderRows) === null || _a === void 0 ? void 0 : _a.call(props, {
|
|
1696
|
+
listContainerRef, estimatedHeight, offsetY, scrollShadows,
|
|
1697
|
+
})) || (React__namespace.createElement("div", { className: css$S.listContainer, style: { minHeight: `${estimatedHeight}px` } },
|
|
1698
|
+
React__namespace.createElement("div", { ref: listContainerRef, role: props.role, style: { marginTop: offsetY } }, props.rows)));
|
|
1699
|
+
};
|
|
1700
|
+
const scrollBarsRef = React__namespace.useCallback((scrollbars) => {
|
|
1701
|
+
var _a;
|
|
1702
|
+
if (!((_a = scrollbars === null || scrollbars === void 0 ? void 0 : scrollbars.container) === null || _a === void 0 ? void 0 : _a.firstChild))
|
|
1703
|
+
return;
|
|
1704
|
+
scrollContainerRef.current = scrollbars.container.firstChild;
|
|
1705
|
+
}, []);
|
|
1706
|
+
return (React__namespace.createElement(ScrollBars, { cx: uuiCore.cx(css$S.scrollContainer, props.cx, {
|
|
1707
|
+
[uuiCore.uuiMarkers.scrolledLeft]: scrollShadows.horizontalLeft,
|
|
1708
|
+
[uuiCore.uuiMarkers.scrolledRight]: scrollShadows.horizontalRight,
|
|
1709
|
+
[uuiCore.uuiMarkers.scrolledTop]: scrollShadows.verticalTop,
|
|
1710
|
+
[uuiCore.uuiMarkers.scrolledBottom]: scrollShadows.verticalBottom,
|
|
1711
|
+
}), onScroll: handleScroll, renderView: ({ style }) => React__namespace.createElement(VirtualListView, { isLoading: props.isLoading, style: style }), ref: scrollBarsRef }, renderRows()));
|
|
1712
|
+
});
|
|
1713
|
+
const VirtualListView = React__namespace.forwardRef((props, ref) => {
|
|
1714
|
+
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1715
|
+
React__namespace.createElement("div", Object.assign({}, props.rawProps, { style: Object.assign(Object.assign({}, props.style), { position: 'relative', flex: '1 1 auto', display: 'flex', flexDirection: 'column', overflow: props.isLoading ? 'hidden' : 'scroll', marginRight: props.isLoading ? 0 : props.style.marginRight, marginBottom: props.isLoading ? 0 : props.style.marginBottom }), ref: ref }), props.children),
|
|
1716
|
+
React__namespace.createElement(Blocker, { isEnabled: props.isLoading })));
|
|
1717
|
+
});
|
|
1718
|
+
VirtualList.displayName = 'VirtualList';
|
|
1563
1719
|
|
|
1564
|
-
|
|
1720
|
+
var css$P = {"root":"qnHTKq"};
|
|
1565
1721
|
|
|
1566
|
-
|
|
1722
|
+
const CheckboxGroup = uuiCore.withMods(uuiComponents.CheckboxGroup, () => [css$P.root], () => ({ CheckboxInput: Checkbox }));
|
|
1567
1723
|
|
|
1568
|
-
class
|
|
1724
|
+
class ConfirmationModal extends React__namespace.Component {
|
|
1725
|
+
render() {
|
|
1726
|
+
let bodyContent;
|
|
1727
|
+
if (this.props.bodyContent) {
|
|
1728
|
+
bodyContent = React__namespace.createElement(Panel, { margin: "24" }, this.props.bodyContent);
|
|
1729
|
+
}
|
|
1730
|
+
return (React__namespace.createElement(ModalBlocker, Object.assign({}, this.props),
|
|
1731
|
+
React__namespace.createElement(ModalWindow, { width: 420 },
|
|
1732
|
+
React__namespace.createElement(ModalHeader, { borderBottom: true, title: this.props.caption, onClose: () => this.props.abort() }),
|
|
1733
|
+
React__namespace.createElement(ScrollBars, null, bodyContent),
|
|
1734
|
+
React__namespace.createElement(ModalFooter, null,
|
|
1735
|
+
React__namespace.createElement(uuiComponents.FlexSpacer, null),
|
|
1736
|
+
this.props.hideCancelButton || (React__namespace.createElement(Button, { caption: i18n.form.modals.discardButton, onClick: () => this.props.success(false), mode: "outline", color: "secondary" })),
|
|
1737
|
+
React__namespace.createElement(Button, { caption: i18n.form.modals.saveButton, onClick: () => this.props.success(true), color: "accent" })))));
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
const defaultMode$1 = exports.EditMode.FORM;
|
|
1742
|
+
class DatePicker extends uuiComponents.BaseDatePicker {
|
|
1569
1743
|
constructor() {
|
|
1570
1744
|
super(...arguments);
|
|
1571
|
-
this.
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1745
|
+
this.renderInput = (props) => {
|
|
1746
|
+
var _a;
|
|
1747
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1748
|
+
if (this.props.size === '48') {
|
|
1749
|
+
uuiCore.devLogger.warnAboutDeprecatedPropValue({
|
|
1750
|
+
component: 'DatePicker',
|
|
1751
|
+
propName: 'size',
|
|
1752
|
+
propValue: this.props.size,
|
|
1753
|
+
propValueUseInstead: '42',
|
|
1754
|
+
condition: () => ['48'].indexOf(this.props.size) !== -1,
|
|
1755
|
+
});
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
return (React__namespace.default.createElement(TextInput, Object.assign({}, props, { onClick: null, isDropdown: false, cx: uuiCore.cx(this.props.inputCx, this.state.isOpen && uuiCore.uuiMod.focus), icon: this.props.mode !== exports.EditMode.CELL && systemIcons[this.props.size || '36'].calendar, iconPosition: this.props.iconPosition || 'left', placeholder: this.props.placeholder ? this.props.placeholder : this.getFormat(), size: this.props.size || '36', value: this.state.inputValue, onValueChange: this.handleInputChange, onCancel: this.props.disableClear || !this.state.inputValue ? undefined : this.handleCancel, isInvalid: this.props.isInvalid, isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, tabIndex: this.props.isReadonly || this.props.isDisabled ? -1 : 0, onFocus: this.handleFocus, onBlur: this.handleBlur, mode: this.props.mode || defaultMode$1, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.input })));
|
|
1578
1759
|
};
|
|
1579
1760
|
}
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
React__namespace.default.createElement(Text, { size: this.props.searchSize || '36' }, i18n.dataPickerBody.noRecordsMessage)));
|
|
1586
|
-
}
|
|
1587
|
-
render() {
|
|
1588
|
-
const searchSize = uuiCore.isMobile() ? '48' : this.props.searchSize || '36';
|
|
1589
|
-
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
1590
|
-
this.showSearch() && (React__namespace.default.createElement("div", { key: "search", className: css$V.searchWrapper },
|
|
1591
|
-
React__namespace.default.createElement(uuiComponents.FlexCell, { grow: 1 },
|
|
1592
|
-
React__namespace.default.createElement(SearchInput, Object.assign({ ref: this.searchRef, placeholder: i18n.dataPickerBody.searchPlaceholder }, this.searchLens.toProps(), { onKeyDown: this.searchKeyDown, size: searchSize, debounceDelay: this.props.searchDebounceDelay }))))),
|
|
1593
|
-
React__namespace.default.createElement(FlexRow, { key: "body", cx: uuiCore.cx(css$V.body, css$V[this.props.editMode], css$V[this.props.selectionMode]), rawProps: { style: { maxHeight: this.props.maxHeight } } }, this.props.rowsCount > 0 ? (React__namespace.default.createElement(VirtualList, Object.assign({}, this.lens.toProps(), { renderRows: this.renderRowsContainer, rawProps: this.props.rawProps, rowsCount: this.props.rowsCount, disableScroll: this.props.isReloading }))) : (this.renderNotFound()))));
|
|
1761
|
+
renderBody(props) {
|
|
1762
|
+
var _a, _b, _c;
|
|
1763
|
+
return (React__namespace.default.createElement(DropdownContainer, Object.assign({}, props, { focusLock: false }),
|
|
1764
|
+
React__namespace.default.createElement(DatePickerBody, { cx: uuiCore.cx(this.props.bodyCx), filter: this.props.filter, value: this.getValue(), setSelectedDate: this.setSelectedDate, setDisplayedDateAndView: this.setDisplayedDateAndView, changeIsOpen: this.onToggle, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.body }), (_c = (_b = this.props).renderFooter) === null || _c === void 0 ? void 0 :
|
|
1765
|
+
_c.call(_b)));
|
|
1594
1766
|
}
|
|
1595
1767
|
}
|
|
1596
1768
|
|
|
1597
|
-
|
|
1598
|
-
24: '12',
|
|
1599
|
-
36: '18',
|
|
1600
|
-
42: '24',
|
|
1601
|
-
48: '24',
|
|
1602
|
-
};
|
|
1603
|
-
function DataPickerFooterImpl(props) {
|
|
1604
|
-
const { clearSelection, view, showSelected, selectionMode, } = props;
|
|
1605
|
-
const size = uuiCore.isMobile() ? '48' : props.size || '36';
|
|
1606
|
-
const switchSize = switchSizes[size];
|
|
1607
|
-
const hasSelection = view.getSelectedRowsCount() > 0;
|
|
1608
|
-
const isSinglePicker = selectionMode === 'single';
|
|
1609
|
-
const clearAllText = i18n.pickerInput.clearSelectionButton;
|
|
1610
|
-
const clearSingleText = i18n.pickerInput.clearSelectionButtonSingle;
|
|
1611
|
-
const selectAllText = i18n.pickerInput.selectAllButton;
|
|
1612
|
-
// show always for multi picker and for single only in case if search not disabled.
|
|
1613
|
-
const shouldShowFooter = isSinglePicker ? !props.disableClear : true;
|
|
1614
|
-
return shouldShowFooter && (React__namespace.default.createElement(FlexRow, { padding: "12" },
|
|
1615
|
-
!isSinglePicker && (React__namespace.default.createElement(Switch, { size: switchSize, value: showSelected.value, isDisabled: !hasSelection, onValueChange: showSelected.onValueChange, label: i18n.pickerInput.showOnlySelectedLabel })),
|
|
1616
|
-
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
1617
|
-
React__namespace.default.createElement(FlexCell, { width: "auto", alignSelf: "center" },
|
|
1618
|
-
view.selectAll && (React__namespace.default.createElement(LinkButton, { size: size, caption: hasSelection ? clearAllText : selectAllText, onClick: hasSelection ? clearSelection : () => view.selectAll.onValueChange(true), rawProps: {
|
|
1619
|
-
'aria-label': hasSelection ? clearAllText : selectAllText,
|
|
1620
|
-
} })),
|
|
1621
|
-
!view.selectAll && (React__namespace.default.createElement(LinkButton, { isDisabled: !hasSelection, size: size, caption: isSinglePicker ? clearSingleText : clearAllText, onClick: clearSelection, rawProps: {
|
|
1622
|
-
'aria-label': isSinglePicker ? clearSingleText : clearAllText,
|
|
1623
|
-
} })))));
|
|
1624
|
-
}
|
|
1625
|
-
const DataPickerFooter = React__namespace.default.memo(DataPickerFooterImpl);
|
|
1769
|
+
var css$O = {"root":"_1haMVw"};
|
|
1626
1770
|
|
|
1627
|
-
|
|
1771
|
+
function applyCalendarPresetsMods() {
|
|
1772
|
+
return [css$O.root];
|
|
1773
|
+
}
|
|
1774
|
+
const CalendarPresets = uuiCore.withMods(uuiComponents.CalendarPresets, applyCalendarPresetsMods, () => ({}));
|
|
1628
1775
|
|
|
1629
|
-
var
|
|
1630
|
-
function _extends$C() { _extends$C = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$C.apply(this, arguments); }
|
|
1631
|
-
var SvgNavigationClose24 = function SvgNavigationClose24(props, ref) {
|
|
1632
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$C({
|
|
1633
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1634
|
-
width: 24,
|
|
1635
|
-
height: 24,
|
|
1636
|
-
viewBox: "0 0 24 24",
|
|
1637
|
-
ref: ref
|
|
1638
|
-
}, props), _path$B || (_path$B = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1639
|
-
fillRule: "evenodd",
|
|
1640
|
-
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z",
|
|
1641
|
-
clipRule: "evenodd"
|
|
1642
|
-
})));
|
|
1643
|
-
};
|
|
1644
|
-
var ForwardRef$C = /*#__PURE__*/React.forwardRef(SvgNavigationClose24);
|
|
1776
|
+
var css$N = {"root":"j7HXR-","container":"TPl1cy","day-selection":"Vh-gRy","from-picker":"Ll3nA4","to-picker":"aOegQy","bodes-wrapper":"_3c8shq","blocker":"_3Dfod-","daySelection":"Vh-gRy","fromPicker":"Ll3nA4","toPicker":"aOegQy","bodesWrapper":"_3c8shq"};
|
|
1645
1777
|
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1778
|
+
dayjs__default.default.extend(isoWeek__default.default);
|
|
1779
|
+
function weekCount(displayedDate) {
|
|
1780
|
+
let days = [];
|
|
1781
|
+
const dayOfLastWeekInPrevMonth = displayedDate.subtract(1, 'month').endOf('month').day();
|
|
1782
|
+
days = days.concat(new Array(dayOfLastWeekInPrevMonth).fill(undefined));
|
|
1783
|
+
// get days of current month
|
|
1784
|
+
days = days.concat(new Array(displayedDate.endOf('month').date()).fill(undefined));
|
|
1785
|
+
return uuiCore.arrayToMatrix(days, 7).length;
|
|
1786
|
+
}
|
|
1787
|
+
const uuiRangeDatePickerBody = {
|
|
1788
|
+
inRange: 'uui-range-datepicker-in-range',
|
|
1789
|
+
firstDayInRangeWrapper: 'uui-range-datepicker-first-day-in-range-wrapper',
|
|
1790
|
+
lastDayInRangeWrapper: 'uui-range-datepicker-last-day-in-range-wrapper',
|
|
1791
|
+
separator: 'uui-range-datepicker-separator',
|
|
1651
1792
|
};
|
|
1652
|
-
const
|
|
1793
|
+
const rangeDatePickerPresets = {
|
|
1794
|
+
today: {
|
|
1795
|
+
name: 'Today',
|
|
1796
|
+
getRange: () => ({ from: dayjs__default.default().toString(), to: undefined, order: 1 }),
|
|
1797
|
+
},
|
|
1798
|
+
thisWeek: {
|
|
1799
|
+
name: 'This Week',
|
|
1800
|
+
getRange: () => ({ from: dayjs__default.default().startOf('isoWeek').toString(), to: dayjs__default.default().endOf('isoWeek').toString(), order: 2 }),
|
|
1801
|
+
},
|
|
1802
|
+
lastWeek: {
|
|
1803
|
+
name: 'Last Week',
|
|
1804
|
+
getRange: () => ({ from: dayjs__default.default().startOf('isoWeek').subtract(1, 'week').toString(), to: dayjs__default.default().endOf('isoWeek').subtract(1, 'week').toString(), order: 3 }),
|
|
1805
|
+
},
|
|
1806
|
+
thisMonth: {
|
|
1807
|
+
name: 'This Month',
|
|
1808
|
+
getRange: () => ({ from: dayjs__default.default().startOf('month').toString(), to: dayjs__default.default().endOf('month').toString(), order: 4 }),
|
|
1809
|
+
},
|
|
1810
|
+
lastMonth: {
|
|
1811
|
+
name: 'Last Month',
|
|
1812
|
+
getRange: () => ({ from: dayjs__default.default().startOf('month').subtract(1, 'month').toString(), to: dayjs__default.default().subtract(1, 'month').endOf('month').toString(), order: 5 }),
|
|
1813
|
+
},
|
|
1814
|
+
last3Month: {
|
|
1815
|
+
name: 'Last 3 Months',
|
|
1816
|
+
getRange: () => ({ from: dayjs__default.default().startOf('month').subtract(3, 'month').toString(), to: dayjs__default.default().subtract(1, 'month').endOf('month').toString(), order: 5 }),
|
|
1817
|
+
},
|
|
1818
|
+
thisYear: {
|
|
1819
|
+
name: 'This Year',
|
|
1820
|
+
getRange: () => ({ from: dayjs__default.default().startOf('year').toString(), to: dayjs__default.default().endOf('year').toString(), order: 7 }),
|
|
1821
|
+
},
|
|
1822
|
+
lastYear: {
|
|
1823
|
+
name: 'Last Year',
|
|
1824
|
+
getRange: () => ({ from: dayjs__default.default().startOf('year').subtract(1, 'year').toString(), to: dayjs__default.default().subtract(1, 'year').endOf('year').toString(), order: 8 }),
|
|
1825
|
+
},
|
|
1826
|
+
};
|
|
1827
|
+
class RangeDatePickerBody extends React__namespace.Component {
|
|
1828
|
+
constructor() {
|
|
1829
|
+
super(...arguments);
|
|
1830
|
+
this.state = {
|
|
1831
|
+
activePart: null,
|
|
1832
|
+
};
|
|
1833
|
+
this.getDayCX = (day) => {
|
|
1834
|
+
var _a, _b;
|
|
1835
|
+
const dayValue = day.valueOf();
|
|
1836
|
+
const fromValue = ((_a = this.props.value) === null || _a === void 0 ? void 0 : _a.selectedDate.from) ? dayjs__default.default(this.props.value.selectedDate.from).valueOf() : null;
|
|
1837
|
+
const toValue = ((_b = this.props.value) === null || _b === void 0 ? void 0 : _b.selectedDate.to) ? dayjs__default.default(this.props.value.selectedDate.to).valueOf() : null;
|
|
1838
|
+
const inRange = dayValue >= fromValue && dayValue <= toValue && fromValue !== toValue && fromValue && toValue;
|
|
1839
|
+
const isFirst = dayValue === fromValue;
|
|
1840
|
+
const isLast = dayValue === toValue;
|
|
1841
|
+
return [
|
|
1842
|
+
inRange && uuiRangeDatePickerBody.inRange,
|
|
1843
|
+
isFirst && uuiRangeDatePickerBody.firstDayInRangeWrapper,
|
|
1844
|
+
!inRange && isFirst && uuiRangeDatePickerBody.lastDayInRangeWrapper,
|
|
1845
|
+
isLast && uuiRangeDatePickerBody.lastDayInRangeWrapper,
|
|
1846
|
+
!inRange && isLast && uuiRangeDatePickerBody.firstDayInRangeWrapper,
|
|
1847
|
+
(dayValue === fromValue || dayValue === toValue) && uuiComponents.uuiDaySelection.selectedDay,
|
|
1848
|
+
];
|
|
1849
|
+
};
|
|
1850
|
+
this.getFromValue = () => {
|
|
1851
|
+
var _a;
|
|
1852
|
+
return Object.assign(Object.assign({}, this.props.value), { view: this.state.activePart === 'from' ? this.props.value.view : 'DAY_SELECTION', selectedDate: (_a = this.props.value) === null || _a === void 0 ? void 0 : _a.selectedDate.from });
|
|
1853
|
+
};
|
|
1854
|
+
this.getToValue = () => {
|
|
1855
|
+
if (!this.props.value)
|
|
1856
|
+
return;
|
|
1857
|
+
return Object.assign(Object.assign({}, this.props.value), { view: this.state.activePart === 'to' ? this.props.value.view : 'DAY_SELECTION', displayedDate: this.props.value.displayedDate.add(1, 'month'), selectedDate: this.props.value.selectedDate.to });
|
|
1858
|
+
};
|
|
1859
|
+
this.renderPresets = () => {
|
|
1860
|
+
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1861
|
+
React__namespace.createElement("div", { className: uuiRangeDatePickerBody.separator }),
|
|
1862
|
+
React__namespace.createElement(CalendarPresets, { forwardedRef: this.props.forwardedRef, onPresetSet: (presetVal) => {
|
|
1863
|
+
this.props.onValueChange({
|
|
1864
|
+
view: 'DAY_SELECTION',
|
|
1865
|
+
selectedDate: { from: dayjs__default.default(presetVal.from).format(uuiComponents.valueFormat), to: dayjs__default.default(presetVal.to).format(uuiComponents.valueFormat) },
|
|
1866
|
+
displayedDate: dayjs__default.default(presetVal.from),
|
|
1867
|
+
});
|
|
1868
|
+
this.props.changeIsOpen(false);
|
|
1869
|
+
}, presets: this.props.presets })));
|
|
1870
|
+
};
|
|
1871
|
+
this.renderDatePicker = () => {
|
|
1872
|
+
var _a, _b;
|
|
1873
|
+
return (React__namespace.createElement(FlexRow, { cx: [((_a = this.props.value) === null || _a === void 0 ? void 0 : _a.view) === 'DAY_SELECTION' && css$N.daySelection, css$N.container], alignItems: "top" },
|
|
1874
|
+
React__namespace.createElement(FlexCell, { width: "auto" },
|
|
1875
|
+
React__namespace.createElement(FlexRow, null,
|
|
1876
|
+
React__namespace.createElement(FlexRow, { cx: css$N.bodesWrapper, alignItems: "top" },
|
|
1877
|
+
React__namespace.createElement(DatePickerBody, { cx: uuiCore.cx(css$N.fromPicker), setSelectedDate: (nv) => this.setSelectedDate(nv), value: this.getFromValue(), setDisplayedDateAndView: (displayedDate, view) => this.setDisplayedDateAndView(displayedDate, view, 'from'), getDayCX: this.getDayCX, filter: this.props.filter, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday }),
|
|
1878
|
+
React__namespace.createElement(DatePickerBody, { cx: uuiCore.cx(css$N.toPicker), setSelectedDate: (nv) => this.setSelectedDate(nv), value: this.getToValue(), setDisplayedDateAndView: (displayedDate, view) => this.setDisplayedDateAndView(displayedDate, view, 'to'), getDayCX: this.getDayCX, filter: this.props.filter, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday }),
|
|
1879
|
+
((_b = this.props.value) === null || _b === void 0 ? void 0 : _b.view) !== 'DAY_SELECTION' && (React__namespace.createElement("div", { style: {
|
|
1880
|
+
left: this.state.activePart === 'from' && '50%',
|
|
1881
|
+
right: this.state.activePart === 'to' && '50%',
|
|
1882
|
+
}, className: css$N.blocker }))),
|
|
1883
|
+
this.props.presets && this.renderPresets()),
|
|
1884
|
+
this.props.renderFooter && this.props.renderFooter())));
|
|
1885
|
+
};
|
|
1886
|
+
}
|
|
1887
|
+
getRange(selectedDate) {
|
|
1888
|
+
const newRange = { from: null, to: null };
|
|
1889
|
+
const currentRange = this.props.value.selectedDate;
|
|
1890
|
+
if (!this.props.filter || this.props.filter(dayjs__default.default(selectedDate))) {
|
|
1891
|
+
if (this.props.focusPart === 'from') {
|
|
1892
|
+
if (dayjs__default.default(selectedDate).valueOf() <= dayjs__default.default(currentRange.to).valueOf()) {
|
|
1893
|
+
newRange.from = selectedDate;
|
|
1894
|
+
newRange.to = currentRange.to;
|
|
1895
|
+
}
|
|
1896
|
+
else {
|
|
1897
|
+
newRange.from = selectedDate;
|
|
1898
|
+
newRange.to = null;
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
if (this.props.focusPart === 'to') {
|
|
1902
|
+
if (!currentRange.from) {
|
|
1903
|
+
newRange.to = selectedDate;
|
|
1904
|
+
}
|
|
1905
|
+
else if (dayjs__default.default(selectedDate).valueOf() >= dayjs__default.default(currentRange.from).valueOf()) {
|
|
1906
|
+
newRange.from = currentRange.from;
|
|
1907
|
+
newRange.to = selectedDate;
|
|
1908
|
+
}
|
|
1909
|
+
else {
|
|
1910
|
+
newRange.from = selectedDate;
|
|
1911
|
+
newRange.to = null;
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
return newRange;
|
|
1916
|
+
}
|
|
1917
|
+
setSelectedDate(selectedDate) {
|
|
1918
|
+
const range = this.getRange(selectedDate);
|
|
1919
|
+
this.props.onValueChange(Object.assign(Object.assign({}, this.props.value), { selectedDate: range }));
|
|
1920
|
+
if (range.from && range.to && this.props.focusPart === 'to') {
|
|
1921
|
+
this.props.changeIsOpen(false);
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
setDisplayedDateAndView(displayedDate, view, part) {
|
|
1925
|
+
this.setState({ activePart: part });
|
|
1926
|
+
this.props.onValueChange({
|
|
1927
|
+
selectedDate: this.props.value.selectedDate,
|
|
1928
|
+
displayedDate: part === 'from' ? displayedDate : displayedDate.subtract(1, 'month'),
|
|
1929
|
+
view: view,
|
|
1930
|
+
});
|
|
1931
|
+
}
|
|
1932
|
+
render() {
|
|
1933
|
+
return (React__namespace.createElement("div", Object.assign({ className: uuiCore.cx(css$N.root, uuiComponents.uuiDatePickerBodyBase.container, this.props.cx) }, this.props.rawProps), this.renderDatePicker()));
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
var css$M = {"dropdown-container":"x29HGv","container":"kgxL2j","button-group":"_2d9yok","date-input":"MKQEAM","size-24":"TUXmbv","size-30":"_2J4SvE","size-36":"Ht-9e5","size-42":"xrGhbF","size-48":"gwdkyo","date-input-group":"Lrfa50","separator":"iUtFnB","mode-form":"_2fnsML","mode-cell":"HIrZd5","dropdownContainer":"x29HGv","buttonGroup":"_2d9yok","dateInput":"MKQEAM","size24":"TUXmbv","size30":"_2J4SvE","size36":"Ht-9e5","size42":"xrGhbF","size48":"gwdkyo","dateInputGroup":"Lrfa50","modeForm":"_2fnsML","modeCell":"HIrZd5"};
|
|
1938
|
+
|
|
1939
|
+
const defaultValue = { from: null, to: null };
|
|
1940
|
+
class RangeDatePicker extends uuiComponents.BaseRangeDatePicker {
|
|
1941
|
+
constructor() {
|
|
1942
|
+
super(...arguments);
|
|
1943
|
+
this.renderInput = (props) => {
|
|
1944
|
+
var _a, _b;
|
|
1945
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1946
|
+
if (this.props.size === '48') {
|
|
1947
|
+
uuiCore.devLogger.warnAboutDeprecatedPropValue({
|
|
1948
|
+
component: 'RangeDatePicker',
|
|
1949
|
+
propName: 'size',
|
|
1950
|
+
propValue: this.props.size,
|
|
1951
|
+
propValueUseInstead: '42',
|
|
1952
|
+
condition: () => ['48'].indexOf(this.props.size) !== -1,
|
|
1953
|
+
});
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
return (React__namespace.createElement("div", { className: cx__default.default(this.props.inputCx, css$M.dateInputGroup, this.props.isDisabled && uuiCore.uuiMod.disabled, this.props.isReadonly && uuiCore.uuiMod.readonly, this.props.isInvalid && uuiCore.uuiMod.invalid, this.state.inFocus && uuiCore.uuiMod.focus), onClick: !this.props.isDisabled && props.onClick, onBlur: this.handleWrapperBlur, ref: props.ref },
|
|
1957
|
+
React__namespace.createElement(TextInput, { icon: systemIcons[this.props.size || '36'].calendar, cx: cx__default.default(css$M.dateInput, css$M['size-' + (this.props.size || 36)], this.state.inFocus === 'from' && uuiCore.uuiMod.focus), size: this.props.size || '36', placeholder: this.props.getPlaceholder ? this.props.getPlaceholder('from') : i18n.rangeDatePicker.pickerPlaceholderFrom, value: this.state.inputValue.from, onValueChange: this.getChangeHandler('from'), isInvalid: this.props.isInvalid, isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, onFocus: (event) => this.handleFocus(event, 'from'), onBlur: (event) => this.handleBlur(event, 'from'), isDropdown: false, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.from }),
|
|
1958
|
+
React__namespace.createElement("div", { className: css$M.separator }),
|
|
1959
|
+
React__namespace.createElement(TextInput, { cx: cx__default.default(css$M.dateInput, css$M['size-' + (this.props.size || 36)], this.state.inFocus === 'to' && uuiCore.uuiMod.focus), placeholder: this.props.getPlaceholder ? this.props.getPlaceholder('to') : i18n.rangeDatePicker.pickerPlaceholderTo, size: this.props.size || '36', value: this.state.inputValue.to, onCancel: this.props.disableClear ? null : this.state.inputValue.from && this.state.inputValue.to && this.handleCancel, onValueChange: this.getChangeHandler('to'), isInvalid: this.props.isInvalid, isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, onFocus: (e) => this.handleFocus(e, 'to'), onBlur: (e) => this.handleBlur(e, 'to'), isDropdown: false, rawProps: (_b = this.props.rawProps) === null || _b === void 0 ? void 0 : _b.to })));
|
|
1960
|
+
};
|
|
1961
|
+
}
|
|
1962
|
+
renderBody(props) {
|
|
1963
|
+
var _a;
|
|
1964
|
+
return (React__namespace.createElement(DropdownContainer, Object.assign({}, props, { cx: cx__default.default(css$M.dropdownContainer), focusLock: false }),
|
|
1965
|
+
React__namespace.createElement(FlexRow, null,
|
|
1966
|
+
React__namespace.createElement(RangeDatePickerBody, { cx: cx__default.default(this.props.bodyCx), value: this.getValue(), onValueChange: this.onRangeChange, filter: this.props.filter, changeIsOpen: this.toggleOpening, presets: this.props.presets, focusPart: this.state.inFocus, renderDay: this.props.renderDay, renderFooter: this.props.renderFooter && (() => this.props.renderFooter(this.props.value || defaultValue)), isHoliday: this.props.isHoliday, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.body }))));
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
var css$L = {"blocker":"M6FfCs","marker":"be8R-0","top":"SuOJrb","bottom":"zgQz-C","left":"Nj7BUc","right":"W7EplK","inside":"tt5qdK"};
|
|
1971
|
+
|
|
1972
|
+
function DropMarker(props) {
|
|
1973
|
+
return props.isDndInProgress
|
|
1974
|
+
? (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1975
|
+
props.enableBlocker && React__namespace.createElement("div", { className: css$L.blocker }),
|
|
1976
|
+
React__namespace.createElement("div", { className: cx__default.default([
|
|
1977
|
+
css$L.marker,
|
|
1978
|
+
css$L[props.position],
|
|
1979
|
+
props === null || props === void 0 ? void 0 : props.cx,
|
|
1980
|
+
]) })))
|
|
1981
|
+
: null;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
var css$K = {"body":"ZDIze9","modal":"_41-9cx","search-wrapper":"vs-1wQ","checkbox":"_5cYKlo","no-found-size-24":"_4MBmZA","no-found-size-30":"_686oeG","no-found-size-36":"VqtnaS","no-found-size-42":"W5ASPu","searchWrapper":"vs-1wQ","noFoundSize24":"_4MBmZA","noFoundSize30":"_686oeG","noFoundSize36":"VqtnaS","noFoundSize42":"W5ASPu"};
|
|
1985
|
+
|
|
1986
|
+
class DataPickerBody extends uuiComponents.PickerBodyBase {
|
|
1987
|
+
constructor() {
|
|
1988
|
+
super(...arguments);
|
|
1989
|
+
this.lens = uuiCore.Lens.onEditableComponent(this);
|
|
1990
|
+
this.searchLens = this.lens.prop('search');
|
|
1991
|
+
}
|
|
1992
|
+
renderNotFound() {
|
|
1993
|
+
if (this.props.renderNotFound) {
|
|
1994
|
+
return this.props.renderNotFound();
|
|
1995
|
+
}
|
|
1996
|
+
return (React__namespace.default.createElement(uuiComponents.FlexCell, { cx: css$K[`no-found-size-${this.props.searchSize || 36}`], grow: 1, textAlign: "center" },
|
|
1997
|
+
React__namespace.default.createElement(Text, { size: this.props.searchSize || '36' }, i18n.dataPickerBody.noRecordsMessage)));
|
|
1998
|
+
}
|
|
1999
|
+
render() {
|
|
2000
|
+
const searchSize = uuiCore.isMobile() ? '48' : this.props.searchSize || '36';
|
|
2001
|
+
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
2002
|
+
this.showSearch() && (React__namespace.default.createElement("div", { key: "search", className: css$K.searchWrapper },
|
|
2003
|
+
React__namespace.default.createElement(uuiComponents.FlexCell, { grow: 1 },
|
|
2004
|
+
React__namespace.default.createElement(SearchInput, Object.assign({ ref: this.searchRef, placeholder: i18n.dataPickerBody.searchPlaceholder }, this.searchLens.toProps(), { onKeyDown: this.searchKeyDown, size: searchSize }))))),
|
|
2005
|
+
React__namespace.default.createElement(FlexRow, { key: "body", cx: uuiCore.cx(css$K.body, css$K[this.props.editMode], css$K[this.props.selectionMode]), rawProps: { style: { maxHeight: this.props.maxHeight } } }, this.props.rowsCount > 0 ? (React__namespace.default.createElement(VirtualList, Object.assign({}, this.lens.toProps(), { rows: this.props.rows, rawProps: this.props.rawProps, rowsCount: this.props.rowsCount, isLoading: this.props.isReloading }))) : (this.renderNotFound()))));
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
const switchSizes = {
|
|
2010
|
+
24: '12',
|
|
2011
|
+
36: '18',
|
|
2012
|
+
42: '24',
|
|
2013
|
+
48: '24',
|
|
2014
|
+
};
|
|
2015
|
+
function DataPickerFooterImpl(props) {
|
|
2016
|
+
const { clearSelection, view, showSelected, selectionMode, } = props;
|
|
2017
|
+
const size = uuiCore.isMobile() ? '48' : props.size || '36';
|
|
2018
|
+
const switchSize = switchSizes[size];
|
|
2019
|
+
const hasSelection = view.getSelectedRowsCount() > 0;
|
|
2020
|
+
const isSinglePicker = selectionMode === 'single';
|
|
2021
|
+
const clearAllText = i18n.pickerInput.clearSelectionButton;
|
|
2022
|
+
const clearSingleText = i18n.pickerInput.clearSelectionButtonSingle;
|
|
2023
|
+
const selectAllText = i18n.pickerInput.selectAllButton;
|
|
2024
|
+
// show always for multi picker and for single only in case if search not disabled.
|
|
2025
|
+
const shouldShowFooter = isSinglePicker ? !props.disableClear : true;
|
|
2026
|
+
return shouldShowFooter && (React__namespace.default.createElement(FlexRow, { padding: "12" },
|
|
2027
|
+
!isSinglePicker && (React__namespace.default.createElement(Switch, { size: switchSize, value: showSelected.value, isDisabled: !hasSelection, onValueChange: showSelected.onValueChange, label: i18n.pickerInput.showOnlySelectedLabel })),
|
|
2028
|
+
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
2029
|
+
React__namespace.default.createElement(FlexCell, { width: "auto", alignSelf: "center" },
|
|
2030
|
+
view.selectAll && (React__namespace.default.createElement(LinkButton, { size: size, caption: hasSelection ? clearAllText : selectAllText, onClick: hasSelection ? clearSelection : () => view.selectAll.onValueChange(true), rawProps: {
|
|
2031
|
+
'aria-label': hasSelection ? clearAllText : selectAllText,
|
|
2032
|
+
} })),
|
|
2033
|
+
!view.selectAll && (React__namespace.default.createElement(LinkButton, { isDisabled: !hasSelection, size: size, caption: isSinglePicker ? clearSingleText : clearAllText, onClick: clearSelection, rawProps: {
|
|
2034
|
+
'aria-label': isSinglePicker ? clearSingleText : clearAllText,
|
|
2035
|
+
} })))));
|
|
2036
|
+
}
|
|
2037
|
+
const DataPickerFooter = React__namespace.default.memo(DataPickerFooterImpl);
|
|
2038
|
+
|
|
2039
|
+
var css$J = {"header":"hKec5G","close":"h1cM0x"};
|
|
1653
2040
|
|
|
1654
2041
|
var _path$A;
|
|
1655
2042
|
function _extends$B() { _extends$B = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$B.apply(this, arguments); }
|
|
1656
|
-
var
|
|
2043
|
+
var SvgNavigationClose24 = function SvgNavigationClose24(props, ref) {
|
|
1657
2044
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$B({
|
|
2045
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2046
|
+
width: 24,
|
|
2047
|
+
height: 24,
|
|
2048
|
+
viewBox: "0 0 24 24",
|
|
2049
|
+
ref: ref
|
|
2050
|
+
}, props), _path$A || (_path$A = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2051
|
+
fillRule: "evenodd",
|
|
2052
|
+
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z",
|
|
2053
|
+
clipRule: "evenodd"
|
|
2054
|
+
})));
|
|
2055
|
+
};
|
|
2056
|
+
var ForwardRef$B = /*#__PURE__*/React.forwardRef(SvgNavigationClose24);
|
|
2057
|
+
|
|
2058
|
+
const DataPickerHeaderImpl = (props) => {
|
|
2059
|
+
const title = props.title && typeof props.title === 'string' ? props.title.charAt(0).toUpperCase() + props.title.slice(1) : '';
|
|
2060
|
+
return (React__namespace.default.createElement(FlexRow, { alignItems: "center", borderBottom: true, cx: css$J.header },
|
|
2061
|
+
React__namespace.default.createElement(Text, { size: "48", font: "semibold" }, title),
|
|
2062
|
+
React__namespace.default.createElement(IconButton, { icon: ForwardRef$B, onClick: () => { var _a; return (_a = props.close) === null || _a === void 0 ? void 0 : _a.call(props); }, cx: css$J.close })));
|
|
2063
|
+
};
|
|
2064
|
+
const DataPickerHeader = React__namespace.default.memo(DataPickerHeaderImpl);
|
|
2065
|
+
|
|
2066
|
+
var _path$z;
|
|
2067
|
+
function _extends$A() { _extends$A = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$A.apply(this, arguments); }
|
|
2068
|
+
var SvgNavigationChevronDown18 = function SvgNavigationChevronDown18(props, ref) {
|
|
2069
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$A({
|
|
1658
2070
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1659
2071
|
width: 18,
|
|
1660
2072
|
height: 18,
|
|
1661
2073
|
viewBox: "0 0 18 18",
|
|
1662
2074
|
ref: ref
|
|
1663
|
-
}, props), _path$
|
|
2075
|
+
}, props), _path$z || (_path$z = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1664
2076
|
fillRule: "evenodd",
|
|
1665
2077
|
d: "M12.443 6.442 9 9.877 5.558 6.442 4.5 7.5 9 12l4.5-4.5-1.057-1.058z",
|
|
1666
2078
|
clipRule: "evenodd"
|
|
1667
2079
|
})));
|
|
1668
2080
|
};
|
|
1669
|
-
var ForwardRef$
|
|
2081
|
+
var ForwardRef$A = /*#__PURE__*/React.forwardRef(SvgNavigationChevronDown18);
|
|
1670
2082
|
|
|
1671
|
-
var css$
|
|
2083
|
+
var css$I = {"cell":"PXAm5H","wrapper":"kS4Vih","align-widgets-top":"TKoxfj","size-24":"nLgTZq","folding-arrow":"MEjYv7","size-30":"XateIZ","size-36":"xO-d6h","size-42":"sfj2w0","size-48":"_0pJrQm","size-60":"Yem30k","align-widgets-center":"if-Fzz","padding-12":"IeCjNZ","padding-24":"KPnJmK","padding-left-12":"-lSqse","padding-left-24":"XqY0n0","padding-right-24":"ST4eqp","drag-handle":"xsq2v8","checkbox":"_0zFQlc","indent":"THiMBT","folding-arrow-12":"atg3BL","folding-arrow-18":"_3YC0fW","icon-container":"_3-9DPP","loading-cell":"MrrjcS","alignWidgetsTop":"TKoxfj","size24":"nLgTZq","foldingArrow":"MEjYv7","size30":"XateIZ","size36":"xO-d6h","size42":"sfj2w0","size48":"_0pJrQm","size60":"Yem30k","alignWidgetsCenter":"if-Fzz","padding12":"IeCjNZ","padding24":"KPnJmK","paddingLeft12":"-lSqse","paddingLeft24":"XqY0n0","paddingRight24":"ST4eqp","dragHandle":"xsq2v8","foldingArrow12":"atg3BL","foldingArrow18":"_3YC0fW","iconContainer":"_3-9DPP","loadingCell":"MrrjcS"};
|
|
1672
2084
|
|
|
1673
2085
|
function DataTableRowAddons(props) {
|
|
1674
2086
|
var _a, _b;
|
|
1675
2087
|
const row = props.rowProps;
|
|
1676
2088
|
const additionalItemSize = +props.size < 30 ? '12' : '18';
|
|
1677
2089
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1678
|
-
((_a = row.dnd) === null || _a === void 0 ? void 0 : _a.srcData) && React__namespace.createElement(uuiComponents.DragHandle, { key: "dh", cx: css$
|
|
1679
|
-
((_b = row === null || row === void 0 ? void 0 : row.checkbox) === null || _b === void 0 ? void 0 : _b.isVisible) && (React__namespace.createElement(Checkbox, { key: "cb", cx: css$
|
|
1680
|
-
row.indent > 0 && (React__namespace.createElement("div", { key: "fold", className: css$
|
|
2090
|
+
((_a = row.dnd) === null || _a === void 0 ? void 0 : _a.srcData) && React__namespace.createElement(uuiComponents.DragHandle, { key: "dh", cx: css$I.dragHandle }),
|
|
2091
|
+
((_b = row === null || row === void 0 ? void 0 : row.checkbox) === null || _b === void 0 ? void 0 : _b.isVisible) && (React__namespace.createElement(Checkbox, { key: "cb", cx: css$I.checkbox, tabIndex: props.tabIndex, size: additionalItemSize, value: row.isChecked, indeterminate: !row.isChecked && row.isChildrenChecked, onValueChange: () => { var _a; return (_a = row.onCheck) === null || _a === void 0 ? void 0 : _a.call(row, row); }, isDisabled: row.checkbox.isDisabled, isInvalid: row.checkbox.isInvalid })),
|
|
2092
|
+
row.indent > 0 && (React__namespace.createElement("div", { key: "fold", className: css$I.indent, style: { marginLeft: (row.indent - 1) * 24 } }, row.isFoldable && (React__namespace.createElement(uuiComponents.IconContainer, { rawProps: {
|
|
1681
2093
|
'aria-label': row.isFolded ? 'Unfold' : 'Fold',
|
|
1682
2094
|
role: 'button',
|
|
1683
|
-
}, key: "icon", icon: ForwardRef$
|
|
1684
|
-
css$
|
|
2095
|
+
}, key: "icon", icon: ForwardRef$A, cx: [
|
|
2096
|
+
css$I.foldingArrow, css$I[`folding-arrow-${additionalItemSize}`], uuiCore.uuiMarkers.clickable, css$I.iconContainer,
|
|
1685
2097
|
], rotate: row.isFolded ? '90ccw' : '0', onClick: () => row.onFold(row) }))))));
|
|
1686
2098
|
}
|
|
1687
2099
|
function DataTableCell(props) {
|
|
@@ -1692,77 +2104,76 @@ function DataTableCell(props) {
|
|
|
1692
2104
|
props.renderPlaceholder = props.renderPlaceholder
|
|
1693
2105
|
|| (() => (
|
|
1694
2106
|
// remove `css.loadingCell` after` removing `margin: 0 3px 3px 0` from `TextPlaceholder` `loadingWord` class styles.
|
|
1695
|
-
React__namespace.createElement(Text, { key: "t", size: props.size !== '60' ? props.size : '48', cx: css$
|
|
2107
|
+
React__namespace.createElement(Text, { key: "t", size: props.size !== '60' ? props.size : '48', cx: css$I.loadingCell },
|
|
1696
2108
|
React__namespace.createElement(TextPlaceholder, null))));
|
|
1697
2109
|
props.renderUnknown = props.renderUnknown
|
|
1698
2110
|
|| (() => (React__namespace.createElement(Text, { key: "t", size: props.size !== '60' ? props.size : '48' }, "Unknown")));
|
|
1699
2111
|
props.renderTooltip = (tooltipProps) => React__namespace.createElement(Tooltip, Object.assign({ color: "critical" }, tooltipProps));
|
|
1700
2112
|
const isEditable = !!props.onValueChange;
|
|
1701
2113
|
props.cx = [
|
|
1702
|
-
'uui-dt-vars',
|
|
1703
2114
|
'data-table-cell',
|
|
1704
2115
|
props.cx,
|
|
1705
|
-
css$
|
|
1706
|
-
css$
|
|
1707
|
-
css$
|
|
1708
|
-
props.isFirstColumn && css$
|
|
1709
|
-
props.isLastColumn && css$
|
|
1710
|
-
css$
|
|
2116
|
+
css$I.cell,
|
|
2117
|
+
css$I['size-' + (props.size || '36')],
|
|
2118
|
+
css$I[`padding-${props.padding || (isEditable && !props.rowProps.isLoading && '0') || '12'}`],
|
|
2119
|
+
props.isFirstColumn && css$I[`padding-left-${props.padding || (isEditable && !props.rowProps.isLoading && '12') || '24'}`],
|
|
2120
|
+
props.isLastColumn && css$I['padding-right-24'],
|
|
2121
|
+
css$I[`align-widgets-${props.alignActions || 'top'}`],
|
|
1711
2122
|
(props.border || isEditable) && 'uui-dt-vertical-cell-border',
|
|
1712
2123
|
];
|
|
1713
2124
|
return React__namespace.createElement(uuiComponents.DataTableCell, Object.assign({}, props));
|
|
1714
2125
|
}
|
|
1715
2126
|
|
|
1716
|
-
var _path$
|
|
1717
|
-
function _extends$
|
|
2127
|
+
var _path$y;
|
|
2128
|
+
function _extends$z() { _extends$z = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$z.apply(this, arguments); }
|
|
1718
2129
|
var SvgNotificationDone24 = function SvgNotificationDone24(props, ref) {
|
|
1719
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2130
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
|
|
1720
2131
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1721
2132
|
width: 24,
|
|
1722
2133
|
height: 24,
|
|
1723
2134
|
viewBox: "0 0 24 24",
|
|
1724
2135
|
ref: ref
|
|
1725
|
-
}, props), _path$
|
|
2136
|
+
}, props), _path$y || (_path$y = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1726
2137
|
fillRule: "evenodd",
|
|
1727
2138
|
d: "m9.727 16.075-4.295-4.388L4 13.149 9.727 19 22 6.463 20.568 5 9.728 16.075z",
|
|
1728
2139
|
clipRule: "evenodd"
|
|
1729
2140
|
})));
|
|
1730
2141
|
};
|
|
1731
|
-
var ForwardRef$
|
|
2142
|
+
var ForwardRef$z = /*#__PURE__*/React.forwardRef(SvgNotificationDone24);
|
|
1732
2143
|
|
|
1733
|
-
var _path$
|
|
1734
|
-
function _extends$
|
|
2144
|
+
var _path$x;
|
|
2145
|
+
function _extends$y() { _extends$y = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
|
|
1735
2146
|
var SvgNotificationDone18 = function SvgNotificationDone18(props, ref) {
|
|
1736
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2147
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
|
|
1737
2148
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1738
2149
|
width: 18,
|
|
1739
2150
|
height: 18,
|
|
1740
2151
|
viewBox: "0 0 18 18",
|
|
1741
2152
|
ref: ref
|
|
1742
|
-
}, props), _path$
|
|
2153
|
+
}, props), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1743
2154
|
fillRule: "evenodd",
|
|
1744
2155
|
d: "M7.136 11.91 4.034 8.776 3 9.821 7.136 14 16 5.045 14.966 4l-7.83 7.91z",
|
|
1745
2156
|
clipRule: "evenodd"
|
|
1746
2157
|
})));
|
|
1747
2158
|
};
|
|
1748
|
-
var ForwardRef$
|
|
2159
|
+
var ForwardRef$y = /*#__PURE__*/React.forwardRef(SvgNotificationDone18);
|
|
1749
2160
|
|
|
1750
|
-
var _path$
|
|
1751
|
-
function _extends$
|
|
2161
|
+
var _path$w;
|
|
2162
|
+
function _extends$x() { _extends$x = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
|
|
1752
2163
|
var SvgNotificationDone12 = function SvgNotificationDone12(props, ref) {
|
|
1753
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2164
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
|
|
1754
2165
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1755
2166
|
width: 12,
|
|
1756
2167
|
height: 12,
|
|
1757
2168
|
viewBox: "0 0 12 12",
|
|
1758
2169
|
ref: ref
|
|
1759
|
-
}, props), _path$
|
|
2170
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1760
2171
|
d: "M11 3.6 9.462 2 4.846 6.8 2.538 4.4 1 6l3.846 4L11 3.6z"
|
|
1761
2172
|
})));
|
|
1762
2173
|
};
|
|
1763
|
-
var ForwardRef$
|
|
2174
|
+
var ForwardRef$x = /*#__PURE__*/React.forwardRef(SvgNotificationDone12);
|
|
1764
2175
|
|
|
1765
|
-
var css$
|
|
2176
|
+
var css$H = {"render-item":"ezmkI-","icon-wrapper":"K-s0XO","picker-row":"MxVgmn","icon-default":"WtTKWi","icon-primary":"sa-YYF","renderItem":"ezmkI-","iconWrapper":"K-s0XO","pickerRow":"MxVgmn","iconDefault":"WtTKWi","iconPrimary":"sa-YYF"};
|
|
1766
2177
|
|
|
1767
2178
|
class DataPickerRow extends React__namespace.Component {
|
|
1768
2179
|
constructor() {
|
|
@@ -1770,26 +2181,26 @@ class DataPickerRow extends React__namespace.Component {
|
|
|
1770
2181
|
this.getIcon = (size) => {
|
|
1771
2182
|
switch (size) {
|
|
1772
2183
|
case '24':
|
|
1773
|
-
return ForwardRef$
|
|
2184
|
+
return ForwardRef$x;
|
|
1774
2185
|
case '30':
|
|
1775
|
-
return ForwardRef$
|
|
2186
|
+
return ForwardRef$y;
|
|
1776
2187
|
case '36':
|
|
1777
|
-
return ForwardRef$
|
|
2188
|
+
return ForwardRef$y;
|
|
1778
2189
|
case '42':
|
|
1779
|
-
return ForwardRef$A;
|
|
1780
|
-
default:
|
|
1781
2190
|
return ForwardRef$z;
|
|
2191
|
+
default:
|
|
2192
|
+
return ForwardRef$y;
|
|
1782
2193
|
}
|
|
1783
2194
|
};
|
|
1784
2195
|
this.column = {
|
|
1785
2196
|
key: 'name',
|
|
1786
2197
|
grow: 1,
|
|
1787
2198
|
width: 0,
|
|
1788
|
-
render: (item, rowProps) => (React__namespace.createElement("div", { key: rowProps.id, className: css$
|
|
2199
|
+
render: (item, rowProps) => (React__namespace.createElement("div", { key: rowProps.id, className: css$H.renderItem },
|
|
1789
2200
|
this.props.renderItem(item, rowProps),
|
|
1790
2201
|
React__namespace.createElement(uuiComponents.FlexSpacer, null),
|
|
1791
|
-
(rowProps.isChildrenSelected || rowProps.isSelected) && (React__namespace.createElement("div", { className: css$
|
|
1792
|
-
React__namespace.createElement(uuiComponents.IconContainer, { icon: this.getIcon(this.props.size), cx: rowProps.isChildrenSelected ? css$
|
|
2202
|
+
(rowProps.isChildrenSelected || rowProps.isSelected) && (React__namespace.createElement("div", { className: css$H.iconWrapper },
|
|
2203
|
+
React__namespace.createElement(uuiComponents.IconContainer, { icon: this.getIcon(this.props.size), cx: rowProps.isChildrenSelected ? css$H.iconDefault : css$H.iconPrimary, rawProps: { 'aria-label': rowProps.isChildrenSelected
|
|
1793
2204
|
? 'Child is selected'
|
|
1794
2205
|
: 'Selected' } }))))),
|
|
1795
2206
|
};
|
|
@@ -1798,31 +2209,31 @@ class DataPickerRow extends React__namespace.Component {
|
|
|
1798
2209
|
};
|
|
1799
2210
|
}
|
|
1800
2211
|
render() {
|
|
1801
|
-
return React__namespace.createElement(uuiComponents.DataPickerRow, Object.assign({}, this.props, { cx: [css$
|
|
2212
|
+
return React__namespace.createElement(uuiComponents.DataPickerRow, Object.assign({}, this.props, { cx: [css$H.pickerRow, this.props.cx], renderContent: this.renderContent }));
|
|
1802
2213
|
}
|
|
1803
2214
|
}
|
|
1804
2215
|
|
|
1805
|
-
var css$
|
|
2216
|
+
var css$G = {"done":"gS9Pj-","container":"-WWDWD"};
|
|
1806
2217
|
|
|
1807
2218
|
const MobileDropdownWrapper = (props) => {
|
|
1808
2219
|
const isMobileView = uuiCore.isMobile();
|
|
1809
|
-
return (React__namespace.default.createElement(DropdownContainer, Object.assign({}, props, { cx: [css$
|
|
2220
|
+
return (React__namespace.default.createElement(DropdownContainer, Object.assign({}, props, { cx: [css$G.container, props.cx], rawProps: props.rawProps, onKeyDown: props.onKeyDown, focusLock: props.focusLock, width: props.width }),
|
|
1810
2221
|
isMobileView && React__namespace.default.createElement(DataPickerHeader, { title: props.title, close: props.onClose }),
|
|
1811
2222
|
props.children,
|
|
1812
|
-
isMobileView && React__namespace.default.createElement(LinkButton, { caption: i18n.pickerInput.doneButton, onClick: () => { var _a; return (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props); }, cx: css$
|
|
2223
|
+
isMobileView && React__namespace.default.createElement(LinkButton, { caption: i18n.pickerInput.doneButton, onClick: () => { var _a; return (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props); }, cx: css$G.done, size: "48" })));
|
|
1813
2224
|
};
|
|
1814
2225
|
|
|
1815
|
-
var _path$
|
|
1816
|
-
function _extends$
|
|
2226
|
+
var _path$v, _path2$1;
|
|
2227
|
+
function _extends$w() { _extends$w = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
|
|
1817
2228
|
var SvgSearchWithBackground = function SvgSearchWithBackground(props, ref) {
|
|
1818
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2229
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
1819
2230
|
width: 66,
|
|
1820
2231
|
height: 67,
|
|
1821
2232
|
viewBox: "0 0 66 67",
|
|
1822
2233
|
fill: "none",
|
|
1823
2234
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1824
2235
|
ref: ref
|
|
1825
|
-
}, props), _path$
|
|
2236
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1826
2237
|
d: "M0 33.5C0 15.275 14.775.5 33 .5s33 14.775 33 33-14.775 33-33 33-33-14.775-33-33Z",
|
|
1827
2238
|
fill: "#EBEDF5"
|
|
1828
2239
|
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -1832,9 +2243,9 @@ var SvgSearchWithBackground = function SvgSearchWithBackground(props, ref) {
|
|
|
1832
2243
|
fill: "#6C6F80"
|
|
1833
2244
|
})));
|
|
1834
2245
|
};
|
|
1835
|
-
var ForwardRef$
|
|
2246
|
+
var ForwardRef$w = /*#__PURE__*/React.forwardRef(SvgSearchWithBackground);
|
|
1836
2247
|
|
|
1837
|
-
var css$
|
|
2248
|
+
var css$F = {"sub-header-wrapper":"vPrMWG","switch":"_4DdjeC","no-found-modal-container":"k3XdDO","no-found-modal-container-icon":"_4zwOwq","no-found-modal-container-text":"EbkGp5","subHeaderWrapper":"vPrMWG","$switch$":"_4DdjeC","noFoundModalContainer":"k3XdDO","noFoundModalContainerIcon":"_4zwOwq","noFoundModalContainerText":"EbkGp5"};
|
|
1838
2249
|
|
|
1839
2250
|
function PickerModal(props) {
|
|
1840
2251
|
const { view, selection, dataSourceStateLens, showSelectedLens, dataSourceState, getDataSourceState, getName, clearSelection, getRows, getListProps, getFooterProps, isSingleSelect, handleDataSourceValueChange, } = uuiComponents.usePickerModal(props);
|
|
@@ -1846,40 +2257,40 @@ function PickerModal(props) {
|
|
|
1846
2257
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
1847
2258
|
view.selectAll && (React__namespace.default.createElement(LinkButton, { caption: hasSelection ? i18n.pickerModal.clearAllButton : i18n.pickerModal.selectAllButton, onClick: hasSelection ? () => clearSelection() : () => view.selectAll.onValueChange(true) })),
|
|
1848
2259
|
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
1849
|
-
React__namespace.default.createElement(Button, {
|
|
2260
|
+
React__namespace.default.createElement(Button, { mode: "outline", color: "secondary", caption: i18n.pickerModal.cancelButton, onClick: () => props.abort() }),
|
|
1850
2261
|
React__namespace.default.createElement(Button, { color: "accent", caption: i18n.pickerModal.selectButton, onClick: () => props.success(selection) })));
|
|
1851
2262
|
};
|
|
1852
2263
|
const renderNotFound = () => {
|
|
1853
|
-
return props.renderNotFound ? (props.renderNotFound({ search: dataSourceState.search, onClose: () => props.success(null) })) : (React__namespace.default.createElement("div", { className: css$
|
|
1854
|
-
React__namespace.default.createElement(uuiComponents.IconContainer, { cx: css$
|
|
1855
|
-
React__namespace.default.createElement(Text, { cx: css$
|
|
1856
|
-
React__namespace.default.createElement(Text, { cx: css$
|
|
2264
|
+
return props.renderNotFound ? (props.renderNotFound({ search: dataSourceState.search, onClose: () => props.success(null) })) : (React__namespace.default.createElement("div", { className: css$F.noFoundModalContainer },
|
|
2265
|
+
React__namespace.default.createElement(uuiComponents.IconContainer, { cx: css$F.noFoundModalContainerIcon, icon: ForwardRef$w }),
|
|
2266
|
+
React__namespace.default.createElement(Text, { cx: css$F.noFoundModalContainerText, font: "semibold", fontSize: "16", lineHeight: "24", color: "primary", size: "36" }, i18n.dataPickerBody.noRecordsMessage),
|
|
2267
|
+
React__namespace.default.createElement(Text, { cx: css$F.noFoundModalContainerText, fontSize: "12", lineHeight: "18", font: "regular", color: "primary", size: "36" }, i18n.dataPickerBody.noRecordsSubTitle)));
|
|
1857
2268
|
};
|
|
1858
2269
|
const dataRows = getRows();
|
|
1859
2270
|
const rows = dataRows.map((row) => renderRow(row));
|
|
1860
2271
|
return (React__namespace.default.createElement(ModalBlocker, Object.assign({}, props),
|
|
1861
2272
|
React__namespace.default.createElement(ModalWindow, { width: 600, height: 700 },
|
|
1862
2273
|
React__namespace.default.createElement(ModalHeader, { title: props.caption || i18n.pickerModal.headerTitle, onClose: () => props.abort() }),
|
|
1863
|
-
React__namespace.default.createElement(FlexCell, { cx: css$
|
|
2274
|
+
React__namespace.default.createElement(FlexCell, { cx: css$F.subHeaderWrapper },
|
|
1864
2275
|
React__namespace.default.createElement(FlexRow, { vPadding: "24" },
|
|
1865
2276
|
React__namespace.default.createElement(SearchInput, Object.assign({}, dataSourceStateLens.prop('search').toProps(), { onKeyDown: (e) => uuiComponents.handleDataSourceKeyboard({
|
|
1866
2277
|
value: getDataSourceState(),
|
|
1867
2278
|
onValueChange: handleDataSourceValueChange,
|
|
1868
2279
|
listView: view,
|
|
1869
2280
|
rows: dataRows,
|
|
1870
|
-
|
|
2281
|
+
editMode: 'modal',
|
|
1871
2282
|
}, e), autoFocus: true, placeholder: i18n.pickerModal.searchPlaceholder }))),
|
|
1872
|
-
!isSingleSelect() && (React__namespace.default.createElement(Switch, Object.assign({ cx: css$
|
|
2283
|
+
!isSingleSelect() && (React__namespace.default.createElement(Switch, Object.assign({ cx: css$F.switch, size: "18" }, showSelectedLens.toProps(), { isDisabled: view.getSelectedRowsCount() < 1, label: "Show only selected" }))),
|
|
1873
2284
|
props.renderFilter && React__namespace.default.createElement(FlexCell, { grow: 2 }, props.renderFilter(dataSourceStateLens.prop('filter').toProps()))),
|
|
1874
2285
|
React__namespace.default.createElement(DataPickerBody, Object.assign({}, getListProps(), { value: getDataSourceState(), onValueChange: handleDataSourceValueChange, search: dataSourceStateLens.prop('search').toProps(), showSearch: false, rows: rows, renderNotFound: renderNotFound, editMode: "modal" })),
|
|
1875
2286
|
React__namespace.default.createElement(ModalFooter, { padding: "24", vPadding: "24" }, props.renderFooter ? props.renderFooter(getFooterProps()) : renderFooter()))));
|
|
1876
2287
|
}
|
|
1877
2288
|
|
|
1878
|
-
var css$
|
|
2289
|
+
var css$E = {"root":"wpTgsJ"};
|
|
1879
2290
|
|
|
1880
|
-
const AvatarStack = uuiCore.withMods(uuiComponents.AvatarStack, () => [css$
|
|
2291
|
+
const AvatarStack = uuiCore.withMods(uuiComponents.AvatarStack, () => [css$E.root]);
|
|
1881
2292
|
|
|
1882
|
-
var css$
|
|
2293
|
+
var css$D = {"root":"g2GaTF","size-18":"lFB9qZ","fill-transparent":"l8aT0K","size-24":"LvDUJc","size-30":"eUWIJU","size-36":"IZKJg7","size-42":"E3BKCK","size-48":"go0UJ6","fill-solid":"_9MM4-l","fill-semitransparent":"WXI04I","size18":"lFB9qZ","fillTransparent":"l8aT0K","size24":"LvDUJc","size30":"eUWIJU","size36":"IZKJg7","size42":"E3BKCK","size48":"go0UJ6","fillSolid":"_9MM4-l","fillSemitransparent":"WXI04I"};
|
|
1883
2294
|
|
|
1884
2295
|
const defaultSize$5 = '36';
|
|
1885
2296
|
const mapSize$1 = {
|
|
@@ -1892,11 +2303,7 @@ const mapSize$1 = {
|
|
|
1892
2303
|
};
|
|
1893
2304
|
function applyBadgeMods(mods) {
|
|
1894
2305
|
return [
|
|
1895
|
-
'
|
|
1896
|
-
css$O.root,
|
|
1897
|
-
css$O['size-' + (mods.size || defaultSize$5)],
|
|
1898
|
-
`fill-${mods.fill || 'solid'}`,
|
|
1899
|
-
mods.color && `uui-color-${mods.color}`,
|
|
2306
|
+
css$D.root, buttonCss.root, css$D['size-' + (mods.size || defaultSize$5)], css$D['fill-' + (mods.fill || 'solid')], mods.color && `badge-${mods.color}`,
|
|
1900
2307
|
];
|
|
1901
2308
|
}
|
|
1902
2309
|
const Badge = uuiCore.withMods(uuiComponents.Button, applyBadgeMods, (props) => ({
|
|
@@ -1905,7 +2312,7 @@ const Badge = uuiCore.withMods(uuiComponents.Button, applyBadgeMods, (props) =>
|
|
|
1905
2312
|
countPosition: 'left',
|
|
1906
2313
|
}));
|
|
1907
2314
|
|
|
1908
|
-
var css$
|
|
2315
|
+
var css$C = {"root":"_1-I1ie","size-18":"_5CmAdj","size-24":"nWfM8C","size-30":"ChHfDN","size-36":"b3axBo","size-42":"_4K3Gli","size-48":"xWS4i7","size18":"_5CmAdj","size24":"nWfM8C","size30":"ChHfDN","size36":"b3axBo","size42":"_4K3Gli","size48":"xWS4i7"};
|
|
1909
2316
|
|
|
1910
2317
|
const defaultSize$4 = '36';
|
|
1911
2318
|
const mapSize = {
|
|
@@ -1917,120 +2324,107 @@ const mapSize = {
|
|
|
1917
2324
|
18: '18',
|
|
1918
2325
|
};
|
|
1919
2326
|
function applyTagMods(mods) {
|
|
1920
|
-
return [css$
|
|
2327
|
+
return [css$C['size-' + (mods.size || defaultSize$4)], css$C.root];
|
|
1921
2328
|
}
|
|
1922
2329
|
const Tag = uuiCore.withMods(uuiComponents.Button, applyTagMods, (props) => ({
|
|
1923
2330
|
dropdownIcon: systemIcons[mapSize[props.size] || defaultSize$4].foldingArrow,
|
|
1924
2331
|
clearIcon: systemIcons[mapSize[props.size] || defaultSize$4].clear,
|
|
1925
2332
|
}));
|
|
1926
2333
|
|
|
1927
|
-
var css$
|
|
2334
|
+
var css$B = {"root":"zHpSJK","spacer":"eFz-P4","mode-ghost":"_3dh7wo","size-24":"Rqjuvc","size-30":"As-OAc","navigation-size-24":"Rw9pt-","navigation-size-30":"-agfoU","modeGhost":"_3dh7wo","size24":"Rqjuvc","size30":"As-OAc","navigationSize24":"Rw9pt-","navigationSize30":"-agfoU"};
|
|
1928
2335
|
|
|
1929
|
-
var _path$
|
|
1930
|
-
function _extends$
|
|
2336
|
+
var _path$u;
|
|
2337
|
+
function _extends$v() { _extends$v = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
|
|
1931
2338
|
var SvgNavigationChevronLeft12 = function SvgNavigationChevronLeft12(props, ref) {
|
|
1932
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2339
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
|
|
1933
2340
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1934
2341
|
width: 12,
|
|
1935
2342
|
height: 12,
|
|
1936
2343
|
viewBox: "0 0 12 12",
|
|
1937
2344
|
ref: ref
|
|
1938
|
-
}, props), _path$
|
|
2345
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1939
2346
|
fillRule: "evenodd",
|
|
1940
2347
|
d: "M7.705 3.705 7 3 4 6l3 3 .705-.705L5.415 6l2.29-2.295z",
|
|
1941
2348
|
clipRule: "evenodd"
|
|
1942
2349
|
})));
|
|
1943
2350
|
};
|
|
1944
|
-
var ForwardRef$
|
|
2351
|
+
var ForwardRef$v = /*#__PURE__*/React.forwardRef(SvgNavigationChevronLeft12);
|
|
1945
2352
|
|
|
1946
|
-
var _path$
|
|
1947
|
-
function _extends$
|
|
2353
|
+
var _path$t;
|
|
2354
|
+
function _extends$u() { _extends$u = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
|
|
1948
2355
|
var SvgNavigationChevronRight12 = function SvgNavigationChevronRight12(props, ref) {
|
|
1949
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2356
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
1950
2357
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1951
2358
|
width: 12,
|
|
1952
2359
|
height: 12,
|
|
1953
2360
|
viewBox: "0 0 12 12",
|
|
1954
2361
|
ref: ref
|
|
1955
|
-
}, props), _path$
|
|
2362
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1956
2363
|
fillRule: "evenodd",
|
|
1957
2364
|
d: "m5 3-.705.705L6.585 6l-2.29 2.295L5 9l3-3-3-3z",
|
|
1958
2365
|
clipRule: "evenodd"
|
|
1959
2366
|
})));
|
|
1960
2367
|
};
|
|
1961
|
-
var ForwardRef$
|
|
2368
|
+
var ForwardRef$u = /*#__PURE__*/React.forwardRef(SvgNavigationChevronRight12);
|
|
1962
2369
|
|
|
1963
2370
|
function Paginator(props) {
|
|
1964
2371
|
const renderPaginator = (params) => {
|
|
1965
2372
|
var _a, _b;
|
|
1966
|
-
return (React__namespace.default.createElement("nav", Object.assign({ role: "navigation", className:
|
|
1967
|
-
React__namespace.default.createElement(Button, { cx: css$
|
|
2373
|
+
return (React__namespace.default.createElement("nav", Object.assign({ role: "navigation", className: css$B.root }, params.rawProps),
|
|
2374
|
+
React__namespace.default.createElement(Button, { cx: css$B[`navigation-size-${(_a = params.size) !== null && _a !== void 0 ? _a : '30'}`], size: params.size, icon: params.size === '30' ? ForwardRef$J : ForwardRef$v, onClick: params.goToPrev, isDisabled: params.isFirst, mode: "outline", color: "secondary" }),
|
|
1968
2375
|
params.pages.map((page, index) => {
|
|
1969
2376
|
var _a, _b;
|
|
1970
2377
|
if (page.type === 'spacer') {
|
|
1971
|
-
return (React__namespace.default.createElement(Button, { cx: cx__default.default(css$
|
|
2378
|
+
return (React__namespace.default.createElement(Button, { cx: cx__default.default(css$B[`size-${(_a = params.size) !== null && _a !== void 0 ? _a : '30'}`], css$B.spacer), size: params.size, key: `${index}_spacer`, caption: "...", mode: "ghost", color: "secondary", tabIndex: -1 }));
|
|
1972
2379
|
}
|
|
1973
2380
|
else {
|
|
1974
|
-
return (React__namespace.default.createElement(Button, { cx: cx__default.default(css$
|
|
2381
|
+
return (React__namespace.default.createElement(Button, { cx: cx__default.default(css$B[`size-${(_b = params.size) !== null && _b !== void 0 ? _b : '30'}`], css$B[`mode-${!page.isActive && 'ghost'}`]), size: params.size, key: page.pageNumber, caption: page.pageNumber, onClick: () => { var _a; return (_a = page.onClick) === null || _a === void 0 ? void 0 : _a.call(page); }, rawProps: { 'aria-current': page.isActive }, mode: (page.isActive && 'outline') || 'ghost', color: "primary" }));
|
|
1975
2382
|
}
|
|
1976
2383
|
}),
|
|
1977
|
-
React__namespace.default.createElement(Button, { cx: css$
|
|
2384
|
+
React__namespace.default.createElement(Button, { cx: css$B[`navigation-size-${(_b = params.size) !== null && _b !== void 0 ? _b : '30'}`], size: params.size, icon: params.size === '30' ? ForwardRef$I : ForwardRef$u, onClick: params.goToNext, isDisabled: params.isLast, mode: "outline", color: "secondary" })));
|
|
1978
2385
|
};
|
|
1979
2386
|
return React__namespace.default.createElement(uuiComponents.Paginator, Object.assign({}, props, { render: renderPaginator }));
|
|
1980
2387
|
}
|
|
1981
2388
|
|
|
1982
|
-
var css$
|
|
2389
|
+
var css$A = {"root":"J1Q-ET","bar":"Hrr-CY","progressBar-indeterminate":"I6Mhye","size-12":"_0LaF1B","size-18":"wXkA4a","size-24":"gMexWL","progressBarIndeterminate":"I6Mhye","size12":"_0LaF1B","size18":"wXkA4a","size24":"gMexWL"};
|
|
1983
2390
|
|
|
1984
2391
|
const IndeterminateBar = React__namespace.forwardRef((props, ref) => {
|
|
1985
|
-
return (React__namespace.createElement("div", { ref: ref, className: cx__default.default(
|
|
1986
|
-
React__namespace.createElement("div", { className: cx__default.default(css$
|
|
2392
|
+
return (React__namespace.createElement("div", { ref: ref, className: cx__default.default(props.cx, css$A.root, css$A[`size-${props.size || 12}`]) },
|
|
2393
|
+
React__namespace.createElement("div", { className: cx__default.default(css$A.bar) })));
|
|
1987
2394
|
});
|
|
1988
2395
|
|
|
1989
|
-
var css$
|
|
2396
|
+
var css$z = {"root":"Ygyvyo","striped":"cYG-rF","animate-stripes":"Rb6nNv","size-12":"K9B4DN","size-18":"_4jfOKa","size-24":"PbHM1I","animateStripes":"Rb6nNv","size12":"K9B4DN","size18":"_4jfOKa","size24":"PbHM1I"};
|
|
1990
2397
|
|
|
1991
2398
|
const defaultSize$3 = '12';
|
|
1992
2399
|
function applyProgressBarMods(mods) {
|
|
1993
2400
|
const size = mods.size || defaultSize$3;
|
|
1994
2401
|
return [
|
|
1995
|
-
css$
|
|
1996
|
-
css$K[`size-${size}`],
|
|
1997
|
-
mods.striped && css$K.striped,
|
|
2402
|
+
css$z.root, css$z[`size-${size}`], mods.striped && css$z.striped,
|
|
1998
2403
|
];
|
|
1999
2404
|
}
|
|
2000
2405
|
const ProgressBar = uuiCore.withMods(uuiComponents.ProgressBar, applyProgressBarMods, (props) => ({
|
|
2001
2406
|
hideLabel: props.hideLabel || props.striped,
|
|
2002
2407
|
}));
|
|
2003
2408
|
|
|
2004
|
-
var css$
|
|
2409
|
+
var css$y = {"root":"V5ZqTD"};
|
|
2005
2410
|
|
|
2006
2411
|
const IndicatorBar = React__namespace.forwardRef((props, ref) => {
|
|
2007
2412
|
const { progress } = props;
|
|
2008
|
-
return progress || progress === 0 ? (React__namespace.createElement(ProgressBar, { ref: ref, progress: progress, cx: cx__default.default(css$
|
|
2009
|
-
});
|
|
2010
|
-
|
|
2011
|
-
var css$I = {"root":"dxRv9o"};
|
|
2012
|
-
|
|
2013
|
-
const Informer = React.forwardRef((props, ref) => {
|
|
2014
|
-
return (React__namespace.default.createElement("div", { ref: ref, className: cx__default.default([
|
|
2015
|
-
css$I.root,
|
|
2016
|
-
'uui-informer',
|
|
2017
|
-
`size-${props.size || 24}`,
|
|
2018
|
-
props.color && `uui-color-${props.color}`,
|
|
2019
|
-
]) }, props.caption));
|
|
2413
|
+
return progress || progress === 0 ? (React__namespace.createElement(ProgressBar, { ref: ref, progress: progress, cx: cx__default.default(css$y.root, props.cx), hideLabel: true })) : (React__namespace.createElement(IndeterminateBar, { ref: ref, cx: cx__default.default(css$y.root, props.cx) }));
|
|
2020
2414
|
});
|
|
2021
2415
|
|
|
2022
2416
|
const MAX_ITEMS = 100;
|
|
2023
2417
|
const getMaxItems = (maxItems) => maxItems || maxItems === 0 ? maxItems : MAX_ITEMS;
|
|
2024
2418
|
|
|
2025
|
-
var css$
|
|
2419
|
+
var css$x = {"root":"uqtucK","mode-form":"QOg9-Y","mode-cell":"SjEFLM","mode-inline":"_0KChDd","size-24":"_25Nrzd","size-30":"M4SrW4","size-36":"iuAUP9","size-42":"p1RY4u","size-48":"iu4XEk","modeForm":"QOg9-Y","modeCell":"SjEFLM","modeInline":"_0KChDd","size24":"_25Nrzd","size30":"M4SrW4","size36":"iuAUP9","size42":"p1RY4u","size48":"iu4XEk"};
|
|
2026
2420
|
|
|
2027
2421
|
const defaultSize$2 = '36';
|
|
2028
|
-
const defaultMode
|
|
2422
|
+
const defaultMode = exports.EditMode.FORM;
|
|
2029
2423
|
function applyPickerTogglerMods(mods) {
|
|
2030
2424
|
return [
|
|
2031
|
-
css$
|
|
2032
|
-
css$
|
|
2033
|
-
css$
|
|
2425
|
+
css$x.root,
|
|
2426
|
+
css$x['size-' + (mods.size || defaultSize$2)],
|
|
2427
|
+
css$x['mode-' + (mods.mode || defaultMode)],
|
|
2034
2428
|
];
|
|
2035
2429
|
}
|
|
2036
2430
|
function PickerTogglerComponent(props, ref) {
|
|
@@ -2072,9 +2466,9 @@ function PickerTogglerComponent(props, ref) {
|
|
|
2072
2466
|
}
|
|
2073
2467
|
const PickerToggler = React__namespace.forwardRef(PickerTogglerComponent);
|
|
2074
2468
|
|
|
2075
|
-
var css$
|
|
2469
|
+
var css$w = {"root":"ntJifg","multiline":"RiB5iM","vertical-padding-24":"tUIlxW","vertical-padding-30":"pjL6j9","vertical-padding-36":"qRurBY","vertical-padding-42":"S6l7Sf","vertical-padding-48":"nvlfUX","text":"-MCAeb","verticalPadding24":"tUIlxW","verticalPadding30":"pjL6j9","verticalPadding36":"qRurBY","verticalPadding42":"S6l7Sf","verticalPadding48":"nvlfUX"};
|
|
2076
2470
|
|
|
2077
|
-
var css$
|
|
2471
|
+
var css$v = {"highlighted-text":"OpGzSp","highlightedText":"OpGzSp"};
|
|
2078
2472
|
|
|
2079
2473
|
const mergeHighlightRanges = (ranges) => {
|
|
2080
2474
|
const mergedRanges = [];
|
|
@@ -2128,7 +2522,7 @@ const getHighlightRanges = (str, search) => {
|
|
|
2128
2522
|
};
|
|
2129
2523
|
const getDecoratedText = (str, ranges) => ranges.map((range, index) => {
|
|
2130
2524
|
const rangeStr = str.substring(range.from, range.to);
|
|
2131
|
-
return (React__namespace.default.createElement("span", Object.assign({ key: `${rangeStr}-${index}` }, (range.isHighlighted ? { className: css$
|
|
2525
|
+
return (React__namespace.default.createElement("span", Object.assign({ key: `${rangeStr}-${index}` }, (range.isHighlighted ? { className: css$v.highlightedText } : {})), rangeStr));
|
|
2132
2526
|
});
|
|
2133
2527
|
const getHighlightedSearchMatches = (str, search) => {
|
|
2134
2528
|
if (!search || !str) {
|
|
@@ -2157,20 +2551,20 @@ class PickerItem extends React__namespace.Component {
|
|
|
2157
2551
|
const { search } = (_a = this.props.dataSourceState) !== null && _a !== void 0 ? _a : {};
|
|
2158
2552
|
const title = highlightSearchMatches ? getHighlightedSearchMatches(this.props.title, search) : this.props.title;
|
|
2159
2553
|
const subtitle = highlightSearchMatches ? getHighlightedSearchMatches(this.props.subtitle, search) : this.props.subtitle;
|
|
2160
|
-
return (React__namespace.createElement(FlexCell, { width: "auto", cx: [css$
|
|
2161
|
-
React__namespace.createElement(FlexRow, { size: itemSize, cx: isMultiline && [css$
|
|
2554
|
+
return (React__namespace.createElement(FlexCell, { width: "auto", cx: [css$w.root, cx] },
|
|
2555
|
+
React__namespace.createElement(FlexRow, { size: itemSize, cx: isMultiline && [css$w.multiline, css$w[`vertical-padding-${itemSize}`]], spacing: "12" },
|
|
2162
2556
|
avatarUrl && React__namespace.createElement(uuiComponents.Avatar, { isLoading: isLoading, img: avatarUrl, size: this.getAvatarSize(itemSize, isMultiline).toString() }),
|
|
2163
2557
|
icon && React__namespace.createElement(uuiComponents.IconContainer, { icon: icon }),
|
|
2164
2558
|
React__namespace.createElement(FlexCell, { width: "auto" },
|
|
2165
|
-
title && (React__namespace.createElement(Text, { size: itemSize, cx: css$
|
|
2166
|
-
subtitle && (React__namespace.createElement(Text, { size: itemSize, color: isDisabled ? 'disabled' : 'secondary', cx: css$
|
|
2559
|
+
title && (React__namespace.createElement(Text, { size: itemSize, cx: css$w.text, color: isDisabled ? 'disabled' : 'primary' }, isLoading ? React__namespace.createElement(TextPlaceholder, { wordsCount: 2 }) : title)),
|
|
2560
|
+
subtitle && (React__namespace.createElement(Text, { size: itemSize, color: isDisabled ? 'disabled' : 'secondary', cx: css$w.text }, isLoading ? React__namespace.createElement(TextPlaceholder, { wordsCount: 2 }) : subtitle))))));
|
|
2167
2561
|
}
|
|
2168
2562
|
}
|
|
2169
2563
|
PickerItem.defaultProps = {
|
|
2170
2564
|
highlightSearchMatches: true,
|
|
2171
2565
|
};
|
|
2172
2566
|
|
|
2173
|
-
var css$
|
|
2567
|
+
var css$u = {"panel":"GYrFnT","footer-wrapper":"ysvauv","footer-size-24":"MgTtwf","footer-size-30":"vojWzE","footer-size-36":"d0-Iev","footer-size-42":"lUZOb6","footer-size-48":"QSArVr","footerWrapper":"ysvauv","footerSize24":"MgTtwf","footerSize30":"vojWzE","footerSize36":"d0-Iev","footerSize42":"lUZOb6","footerSize48":"QSArVr"};
|
|
2174
2568
|
|
|
2175
2569
|
const pickerHeight$1 = 300;
|
|
2176
2570
|
const pickerWidth = 360;
|
|
@@ -2194,7 +2588,7 @@ function PickerInput(_a) {
|
|
|
2194
2588
|
};
|
|
2195
2589
|
const renderTarget = (targetProps) => {
|
|
2196
2590
|
const renderTargetFn = props.renderToggler || ((props) => React__namespace.default.createElement(PickerToggler, Object.assign({}, props)));
|
|
2197
|
-
return (React__namespace.default.createElement(uuiCore.IEditableDebouncer, { value: targetProps.value, onValueChange: handleTogglerSearchChange,
|
|
2591
|
+
return (React__namespace.default.createElement(uuiCore.IEditableDebouncer, { value: targetProps.value, onValueChange: handleTogglerSearchChange, render: (editableProps) => renderTargetFn(Object.assign(Object.assign(Object.assign({}, getTogglerMods()), targetProps), editableProps)) }));
|
|
2198
2592
|
};
|
|
2199
2593
|
const renderFooter = () => {
|
|
2200
2594
|
const footerProps = getFooterProps();
|
|
@@ -2216,7 +2610,7 @@ function PickerInput(_a) {
|
|
|
2216
2610
|
const renderedDataRows = rows.map((row) => renderRow(row, dataSourceState));
|
|
2217
2611
|
const bodyHeight = uuiCore.isMobile() ? document.documentElement.clientHeight : props.dropdownHeight || pickerHeight$1;
|
|
2218
2612
|
const minBodyWidth = props.minBodyWidth || pickerWidth;
|
|
2219
|
-
return (React__namespace.default.createElement(MobileDropdownWrapper, { title: props.entityName, onClose: () => toggleBodyOpening(false), cx: [css$
|
|
2613
|
+
return (React__namespace.default.createElement(MobileDropdownWrapper, { title: props.entityName, onClose: () => toggleBodyOpening(false), cx: [css$u.panel, props.bodyCx], onKeyDown: bodyProps.onKeyDown, width: bodyProps.togglerWidth > minBodyWidth ? bodyProps.togglerWidth : minBodyWidth, focusLock: getSearchPosition() === 'body' },
|
|
2220
2614
|
React__namespace.default.createElement(DataPickerBody, Object.assign({}, bodyProps, { rows: renderedDataRows, maxHeight: bodyHeight, searchSize: props.size, editMode: "dropdown", selectionMode: props.selectionMode, renderNotFound: props.renderNotFound
|
|
2221
2615
|
? () => props.renderNotFound({
|
|
2222
2616
|
search: dataSourceState.search,
|
|
@@ -2232,7 +2626,7 @@ function PickerInput(_a) {
|
|
|
2232
2626
|
}, renderBody: (bodyProps) => renderBody(Object.assign(Object.assign(Object.assign({}, bodyProps), getPickerBodyProps(rows)), getListProps()), rows), value: shouldShowBody(), onValueChange: !props.isDisabled && toggleBodyOpening, placement: props.dropdownPlacement, modifiers: popperModifiers, closeBodyOnTogglerHidden: !uuiCore.isMobile(), portalTarget: props.portalTarget }));
|
|
2233
2627
|
}
|
|
2234
2628
|
|
|
2235
|
-
var css$
|
|
2629
|
+
var css$t = {"row":"lWrCZP"};
|
|
2236
2630
|
|
|
2237
2631
|
function PickerListItem(props) {
|
|
2238
2632
|
var _a;
|
|
@@ -2250,7 +2644,7 @@ function PickerListItem(props) {
|
|
|
2250
2644
|
else {
|
|
2251
2645
|
component = (React__namespace.default.createElement(RadioInput, { label: label, value: props.isSelected, isDisabled: props.isLoading || !props.isSelectable || props.isDisabled, onValueChange: () => props.onSelect(props) }));
|
|
2252
2646
|
}
|
|
2253
|
-
return (React__namespace.default.createElement("div", Object.assign({ role: "option", "aria-selected": props.isSelectable ? props.isSelected : undefined, "aria-busy": props.isLoading, "aria-posinset": props.index + 1 }, (((_a = props.checkbox) === null || _a === void 0 ? void 0 : _a.isVisible) && { 'aria-checked': props.isChecked }), { className: css$
|
|
2647
|
+
return (React__namespace.default.createElement("div", Object.assign({ role: "option", "aria-selected": props.isSelectable ? props.isSelected : undefined, "aria-busy": props.isLoading, "aria-posinset": props.index + 1 }, (((_a = props.checkbox) === null || _a === void 0 ? void 0 : _a.isVisible) && { 'aria-checked': props.isChecked }), { className: css$t.row }), component));
|
|
2254
2648
|
}
|
|
2255
2649
|
|
|
2256
2650
|
function PickerList(props) {
|
|
@@ -2286,7 +2680,200 @@ function PickerList(props) {
|
|
|
2286
2680
|
}, selectedRows)));
|
|
2287
2681
|
}
|
|
2288
2682
|
|
|
2289
|
-
var css$
|
|
2683
|
+
var css$s = {"root":"_0C-xp7","size-24":"b11hTJ","size-30":"I8-X8S","size-36":"nLNyxH","size-48":"T9QSQR","size-60":"_83pqYA","size24":"b11hTJ","size30":"I8-X8S","size36":"nLNyxH","size48":"T9QSQR","size60":"_83pqYA"};
|
|
2684
|
+
|
|
2685
|
+
// Here we define a single instance of the renderCell function to make DataTableRow#shouldComponentUpdate work.
|
|
2686
|
+
// 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.
|
|
2687
|
+
const renderCell = (props) => {
|
|
2688
|
+
const mods = props.rowProps;
|
|
2689
|
+
return React__namespace.createElement(DataTableCell, Object.assign({ size: mods.size }, props));
|
|
2690
|
+
};
|
|
2691
|
+
const renderDropMarkers = (props) => React__namespace.createElement(DropMarker, Object.assign({}, props, { enableBlocker: true }));
|
|
2692
|
+
const propsMods = { renderCell, renderDropMarkers };
|
|
2693
|
+
const DataTableRow = uuiCore.withMods(uuiComponents.DataTableRow, ({ borderBottom = true, size }) => {
|
|
2694
|
+
return [
|
|
2695
|
+
css$s.root, borderBottom && 'uui-dt-row-border', css$s['size-' + (size || '36')],
|
|
2696
|
+
];
|
|
2697
|
+
}, () => propsMods);
|
|
2698
|
+
|
|
2699
|
+
var css$r = {"sorting-panel-container":"CcNsVx","sort-active":"i9CzT5","sortingPanelContainer":"CcNsVx","sortActive":"i9CzT5"};
|
|
2700
|
+
|
|
2701
|
+
var _path$s;
|
|
2702
|
+
function _extends$t() { _extends$t = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
|
|
2703
|
+
var SvgTableSortAsc18 = function SvgTableSortAsc18(props, ref) {
|
|
2704
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
2705
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2706
|
+
width: 18,
|
|
2707
|
+
height: 18,
|
|
2708
|
+
viewBox: "0 0 18 18",
|
|
2709
|
+
ref: ref
|
|
2710
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2711
|
+
fillRule: "evenodd",
|
|
2712
|
+
d: "M10 6v10H8V6H5l4-4 4 4h-3z",
|
|
2713
|
+
clipRule: "evenodd"
|
|
2714
|
+
})));
|
|
2715
|
+
};
|
|
2716
|
+
var ForwardRef$t = /*#__PURE__*/React.forwardRef(SvgTableSortAsc18);
|
|
2717
|
+
|
|
2718
|
+
var _path$r;
|
|
2719
|
+
function _extends$s() { _extends$s = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
|
|
2720
|
+
var SvgTableSortDesc18 = function SvgTableSortDesc18(props, ref) {
|
|
2721
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
2722
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2723
|
+
width: 18,
|
|
2724
|
+
height: 18,
|
|
2725
|
+
viewBox: "0 0 18 18",
|
|
2726
|
+
ref: ref
|
|
2727
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2728
|
+
fillRule: "evenodd",
|
|
2729
|
+
d: "M10 12V2H8v10H5l4 4 4-4h-3z",
|
|
2730
|
+
clipRule: "evenodd"
|
|
2731
|
+
})));
|
|
2732
|
+
};
|
|
2733
|
+
var ForwardRef$s = /*#__PURE__*/React.forwardRef(SvgTableSortDesc18);
|
|
2734
|
+
|
|
2735
|
+
const SortingPanelImpl = ({ sortDirection, onSort }) => {
|
|
2736
|
+
const sortAsc = React.useCallback(() => onSort(sortDirection === 'asc' ? undefined : 'asc'), [onSort]);
|
|
2737
|
+
const sortDesc = React.useCallback(() => onSort(sortDirection === 'desc' ? undefined : 'desc'), [onSort]);
|
|
2738
|
+
return (React__namespace.default.createElement(FlexCell, { cx: css$r.sortingPanelContainer },
|
|
2739
|
+
React__namespace.default.createElement(DropdownMenuButton, { isActive: sortDirection === 'asc', caption: i18n.pickerFilterHeader.sortAscending, icon: ForwardRef$t, onClick: sortAsc }),
|
|
2740
|
+
React__namespace.default.createElement(DropdownMenuButton, { isActive: sortDirection === 'desc', caption: i18n.pickerFilterHeader.sortDescending, icon: ForwardRef$s, onClick: sortDesc })));
|
|
2741
|
+
};
|
|
2742
|
+
const SortingPanel = React__namespace.default.memo(SortingPanelImpl);
|
|
2743
|
+
|
|
2744
|
+
const ColumnHeaderDropdownImpl = (props) => {
|
|
2745
|
+
const popperModifiers = React.useMemo(() => [
|
|
2746
|
+
{
|
|
2747
|
+
name: 'offset',
|
|
2748
|
+
options: { offset: [0, 1] },
|
|
2749
|
+
}, uuiCore.mobilePopperModifier,
|
|
2750
|
+
], []);
|
|
2751
|
+
const closeDropdown = React.useCallback(() => props.onOpenChange(false), [props.onOpenChange]);
|
|
2752
|
+
return (React__namespace.default.createElement(uuiComponents.Dropdown, { renderTarget: props.renderTarget, renderBody: (dropdownProps) => (React__namespace.default.createElement(MobileDropdownWrapper, { width: 360, title: props.title, onClose: closeDropdown },
|
|
2753
|
+
props.isSortable && React__namespace.default.createElement(SortingPanel, { sortDirection: props.sortDirection, onSort: props.onSort }),
|
|
2754
|
+
props.renderFilter(dropdownProps))), modifiers: popperModifiers, value: props.isOpen, onValueChange: props.onOpenChange }));
|
|
2755
|
+
};
|
|
2756
|
+
const ColumnHeaderDropdown = React__namespace.default.memo(ColumnHeaderDropdownImpl);
|
|
2757
|
+
|
|
2758
|
+
var css$q = {"cell":"tLAaeS","sort-icon":"fmuW6X","dropdown-icon":"_2XBE01","infoIcon":"g-SEdD","resizable":"fvxO4N","size-24":"vpt9Co","size-30":"t5WPTX","size-36":"Ha-8JD","size-42":"nI5chi","size-48":"k-8FVR","padding-left-24":"_2IORP8","padding-right-24":"eR2pIk","caption":"hXSvxS","checkbox":"WIQOhV","icon":"z-bjKK","icon-cell":"EjVWiZ","align-right":"jUnOzp","align-center":"YB-A2i","tooltip-wrapper":"hqa-dZ","cell-tooltip":"IE01Fr","upper-case":"lVsgvo","font-size-14":"cGKeij","resize-mark":"Zh231g","draggable":"klkXBa","ghost":"I0IT-7","is-dragged-out":"-x9U0X","dnd-marker-left":"Uwa2ke","dnd-marker-right":"L-Z1CZ","cell-tooltip-wrapper":"i721RA","cell-tooltip-text":"WRfPs-","sortIcon":"fmuW6X","dropdownIcon":"_2XBE01","size24":"vpt9Co","size30":"t5WPTX","size36":"Ha-8JD","size42":"nI5chi","size48":"k-8FVR","paddingLeft24":"_2IORP8","paddingRight24":"eR2pIk","iconCell":"EjVWiZ","alignRight":"jUnOzp","alignCenter":"YB-A2i","tooltipWrapper":"hqa-dZ","cellTooltip":"IE01Fr","upperCase":"lVsgvo","fontSize14":"cGKeij","resizeMark":"Zh231g","isDraggedOut":"-x9U0X","dndMarkerLeft":"Uwa2ke","dndMarkerRight":"L-Z1CZ","cellTooltipWrapper":"i721RA","cellTooltipText":"WRfPs-"};
|
|
2759
|
+
|
|
2760
|
+
var _path$q;
|
|
2761
|
+
function _extends$r() { _extends$r = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
|
|
2762
|
+
var SvgTableSwap18 = function SvgTableSwap18(props, ref) {
|
|
2763
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
2764
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2765
|
+
width: 18,
|
|
2766
|
+
height: 18,
|
|
2767
|
+
viewBox: "0 0 18 18",
|
|
2768
|
+
ref: ref
|
|
2769
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2770
|
+
fillRule: "evenodd",
|
|
2771
|
+
d: "M6 1 2 5h3v7h2V5h3L6 1zm7 12V6h-2v7H8l4 4 4-4h-3z",
|
|
2772
|
+
clipRule: "evenodd"
|
|
2773
|
+
})));
|
|
2774
|
+
};
|
|
2775
|
+
var ForwardRef$r = /*#__PURE__*/React.forwardRef(SvgTableSwap18);
|
|
2776
|
+
|
|
2777
|
+
var _path$p;
|
|
2778
|
+
function _extends$q() { _extends$q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
|
|
2779
|
+
var SvgContentFiltration18 = function SvgContentFiltration18(props, ref) {
|
|
2780
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
2781
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2782
|
+
width: 18,
|
|
2783
|
+
height: 18,
|
|
2784
|
+
viewBox: "0 0 18 18",
|
|
2785
|
+
ref: ref
|
|
2786
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2787
|
+
fillRule: "evenodd",
|
|
2788
|
+
d: "m8 14 2 2v-5H8v3zM2 3v2h14V3H2zm6 8h2l6-6H2l6 6z",
|
|
2789
|
+
clipRule: "evenodd"
|
|
2790
|
+
})));
|
|
2791
|
+
};
|
|
2792
|
+
var ForwardRef$q = /*#__PURE__*/React.forwardRef(SvgContentFiltration18);
|
|
2793
|
+
|
|
2794
|
+
var _path$o;
|
|
2795
|
+
function _extends$p() { _extends$p = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
|
|
2796
|
+
var SvgNavigationChevronUp18 = function SvgNavigationChevronUp18(props, ref) {
|
|
2797
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
2798
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2799
|
+
width: 18,
|
|
2800
|
+
height: 18,
|
|
2801
|
+
viewBox: "0 0 18 18",
|
|
2802
|
+
ref: ref
|
|
2803
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2804
|
+
fillRule: "evenodd",
|
|
2805
|
+
d: "m9 6-4.5 4.5 1.058 1.057L9 8.123l3.443 3.434L13.5 10.5 9 6z",
|
|
2806
|
+
clipRule: "evenodd"
|
|
2807
|
+
})));
|
|
2808
|
+
};
|
|
2809
|
+
var ForwardRef$p = /*#__PURE__*/React.forwardRef(SvgNavigationChevronUp18);
|
|
2810
|
+
|
|
2811
|
+
class DataTableHeaderCell extends React__namespace.Component {
|
|
2812
|
+
constructor() {
|
|
2813
|
+
super(...arguments);
|
|
2814
|
+
this.state = {
|
|
2815
|
+
isDropdownOpen: null,
|
|
2816
|
+
};
|
|
2817
|
+
this.getTextStyle = () => {
|
|
2818
|
+
if (this.props.textCase === 'upper')
|
|
2819
|
+
return css$q.upperCase;
|
|
2820
|
+
return css$q['font-size-14'];
|
|
2821
|
+
};
|
|
2822
|
+
this.getTooltipContent = () => (React__namespace.createElement("div", { className: css$q.cellTooltipWrapper },
|
|
2823
|
+
React__namespace.createElement(Text, { fontSize: "14", color: "contrast", font: "semibold", cx: css$q.cellTooltipText }, this.props.column.caption),
|
|
2824
|
+
this.props.column.info && React__namespace.createElement(Text, { fontSize: "12", color: "contrast", cx: css$q.cellTooltipText }, this.props.column.info)));
|
|
2825
|
+
this.getColumnCaption = () => {
|
|
2826
|
+
return (React__namespace.createElement("div", { className: css$q.tooltipWrapper },
|
|
2827
|
+
React__namespace.createElement("div", { className: uuiCore.cx(css$q.iconCell, css$q['align-' + this.props.column.textAlign], uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCaptionWrapper) },
|
|
2828
|
+
React__namespace.createElement(Tooltip, { placement: "top", color: "contrast", renderContent: this.getTooltipContent, cx: css$q.cellTooltip, openDelay: 600 },
|
|
2829
|
+
React__namespace.createElement(Text, { key: "text", lineHeight: "30", fontSize: "14", size: "30", cx: uuiCore.cx(css$q.caption, this.getTextStyle(), uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCaption) }, this.props.column.caption)),
|
|
2830
|
+
this.props.column.isSortable && (!this.props.column.renderFilter || this.props.sortDirection) && (React__namespace.createElement(IconButton, { key: "sort", cx: uuiCore.cx(css$q.icon, css$q.sortIcon, this.props.sortDirection && css$q.sortIconActive, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderSortIcon), color: this.props.sortDirection ? 'default' : 'secondary', icon: this.props.sortDirection === 'desc' ? ForwardRef$s : this.props.sortDirection === 'asc' ? ForwardRef$t : ForwardRef$r })),
|
|
2831
|
+
this.props.isFilterActive && (React__namespace.createElement(IconButton, { key: "filter", cx: uuiCore.cx(css$q.icon, !this.props.sortDirection && css$q.filterIcon, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderFilterIcon), color: "default", icon: ForwardRef$q })),
|
|
2832
|
+
this.props.column.renderFilter && (React__namespace.createElement(IconButton, { key: "dropdown", cx: uuiCore.cx(css$q.icon, css$q.dropdownIcon, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderDropdownIcon), color: "secondary", icon: this.state.isDropdownOpen ? ForwardRef$p : ForwardRef$A })))));
|
|
2833
|
+
};
|
|
2834
|
+
this.renderHeaderCheckbox = () => this.props.selectAll
|
|
2835
|
+
&& this.props.isFirstColumn && (React__namespace.createElement(Checkbox, Object.assign({ size: +this.props.size < 36 ? '12' : '18' }, this.props.selectAll, { cx: uuiCore.cx(css$q.checkbox, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCheckbox) })));
|
|
2836
|
+
this.renderResizeMark = (props) => React__namespace.createElement("div", { onMouseDown: props.onResizeStart, className: uuiCore.cx(css$q.resizeMark, uuiCore.uuiMarkers.draggable) });
|
|
2837
|
+
this.renderCellContent = (props, dropdownProps) => (React__namespace.createElement(FlexCell, Object.assign({}, this.props.column, { minWidth: this.props.column.width, ref: (ref) => {
|
|
2838
|
+
var _a;
|
|
2839
|
+
props.ref(ref);
|
|
2840
|
+
(_a = dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.ref) === null || _a === void 0 ? void 0 : _a.call(dropdownProps, ref);
|
|
2841
|
+
}, cx: uuiCore.cx(uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCell, (this.props.column.isSortable || this.props.isDropdown) && uuiCore.uuiMarkers.clickable, css$q.cell, css$q['size-' + (this.props.size || '36')], this.props.isFirstColumn && css$q['padding-left-24'], this.props.isLastColumn && css$q['padding-right-24'], this.props.column.cx, this.props.allowColumnsResizing && css$q.resizable, props.isDraggable && css$q.draggable, props.isDragGhost && css$q.ghost, props.isDraggedOut && css$q.isDraggedOut, props.isDndInProgress && css$q['dnd-marker-' + props.position]), onClick: !this.props.column.renderFilter ? props.toggleSort : dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.onClick, rawProps: Object.assign({ role: 'columnheader', 'aria-sort': this.props.sortDirection === 'asc' ? 'ascending' : this.props.sortDirection ? 'descending' : 'none' }, props.eventHandlers) }),
|
|
2842
|
+
this.renderHeaderCheckbox(),
|
|
2843
|
+
this.getColumnCaption(),
|
|
2844
|
+
this.props.allowColumnsResizing && this.renderResizeMark(props)));
|
|
2845
|
+
this.renderCellWithFilter = (props) => (React__namespace.createElement(ColumnHeaderDropdown, { isOpen: this.state.isDropdownOpen, isSortable: this.props.column.isSortable, renderTarget: (dropdownProps) => this.renderCellContent(props, dropdownProps), renderFilter: this.props.renderFilter, onSort: this.props.onSort, sortDirection: this.props.sortDirection, onOpenChange: (isDropdownOpen) => this.setState({ isDropdownOpen }), title: this.props.column.caption }));
|
|
2846
|
+
}
|
|
2847
|
+
render() {
|
|
2848
|
+
return React__namespace.createElement(uuiComponents.DataTableHeaderCell, Object.assign({}, this.props, { renderCellContent: this.props.column.renderFilter ? this.renderCellWithFilter : this.renderCellContent }));
|
|
2849
|
+
}
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2852
|
+
var css$p = {"header-cell":"csxPiM","config-icon":"B23ddJ","headerCell":"csxPiM","configIcon":"B23ddJ"};
|
|
2853
|
+
|
|
2854
|
+
var _path$n;
|
|
2855
|
+
function _extends$o() { _extends$o = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
|
|
2856
|
+
var SvgActionSettings18 = function SvgActionSettings18(props, ref) {
|
|
2857
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
2858
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2859
|
+
width: 18,
|
|
2860
|
+
height: 18,
|
|
2861
|
+
viewBox: "0 0 18 18",
|
|
2862
|
+
ref: ref
|
|
2863
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2864
|
+
fillRule: "evenodd",
|
|
2865
|
+
d: "M3 9.093a6.083 6.083 0 0 1 0-.186L1.55 7.271a1 1 0 0 1-.118-1.163l1.28-2.216a1 1 0 0 1 1.066-.48l2.14.439a3.81 3.81 0 0 1 .163-.094l.691-2.073A1 1 0 0 1 7.721 1h2.558a1 1 0 0 1 .949.684l.69 2.073c.056.03.11.061.163.094l2.141-.439a1 1 0 0 1 1.067.48l1.279 2.216a1 1 0 0 1-.118 1.163L15 8.907a5.72 5.72 0 0 1 0 .186l1.45 1.636a1 1 0 0 1 .118 1.163l-1.28 2.216a1 1 0 0 1-1.066.48l-2.14-.438a6.215 6.215 0 0 1-.163.093l-.691 2.073a1 1 0 0 1-.949.684H7.721a1 1 0 0 1-.949-.684l-.69-2.073a6.105 6.105 0 0 1-.163-.094l-2.141.439a1 1 0 0 1-1.067-.48l-1.279-2.216a1 1 0 0 1 .118-1.163L3 9.093zM9 12a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",
|
|
2866
|
+
clipRule: "evenodd"
|
|
2867
|
+
})));
|
|
2868
|
+
};
|
|
2869
|
+
var ForwardRef$o = /*#__PURE__*/React.forwardRef(SvgActionSettings18);
|
|
2870
|
+
|
|
2871
|
+
const DataTableHeaderRow = uuiCore.withMods(uuiComponents.DataTableHeaderRow, () => [css$p.root], (mods) => ({
|
|
2872
|
+
renderCell: (props) => React__namespace.createElement(DataTableHeaderCell, Object.assign({}, props, { size: mods.size, textCase: mods.textCase || 'normal', key: props.column.key })),
|
|
2873
|
+
renderConfigButton: () => React__namespace.createElement(IconButton, { key: "configuration", onClick: mods.onConfigButtonClick, cx: css$p.configIcon, color: "default", icon: ForwardRef$o }),
|
|
2874
|
+
}));
|
|
2875
|
+
|
|
2876
|
+
var css$o = {"root":"I6CA0x","title-wrapper":"vf-OAE","title":"zDg-E-","text-wrapper":"_4iPQBD","selection":"RN11B2","postfix":"XTLeTq","selected":"_1-TViP","titleWrapper":"vf-OAE","textWrapper":"_4iPQBD"};
|
|
2290
2877
|
|
|
2291
2878
|
const defaultSize = '36';
|
|
2292
2879
|
const FilterPanelItemToggler = React__namespace.forwardRef((props, ref) => {
|
|
@@ -2311,19 +2898,19 @@ const FilterPanelItemToggler = React__namespace.forwardRef((props, ref) => {
|
|
|
2311
2898
|
};
|
|
2312
2899
|
const getTitle = props.predicateName ? `${props.title} ${props.predicateName}` : `${props.title}${props.selection ? ':' : ''}`;
|
|
2313
2900
|
const getSelectionText = () => props.selection.map((i, index) => (React__namespace.createElement(React__namespace.Fragment, { key: `${i}${index}` },
|
|
2314
|
-
React__namespace.createElement(Text, { color: "brand", size: props.size, cx: css$
|
|
2901
|
+
React__namespace.createElement(Text, { color: "brand", size: props.size, cx: css$o.selection }, i),
|
|
2315
2902
|
(props.postfix || index !== props.selection.length - 1) && React__namespace.createElement("span", null, ",\u00A0"))));
|
|
2316
2903
|
return (React__namespace.createElement(uuiComponents.FlexRow, Object.assign({}, props, { rawProps: {
|
|
2317
2904
|
style: { maxWidth: `${props.maxWidth ? props.maxWidth + 'px' : 'auto'}` },
|
|
2318
2905
|
role: 'button',
|
|
2319
2906
|
tabIndex: props.isDisabled ? -1 : 0,
|
|
2320
2907
|
onKeyDown: onKeyDownHandler,
|
|
2321
|
-
}, cx: cx__default.default(css$
|
|
2322
|
-
React__namespace.createElement(uuiComponents.FlexRow, { cx: css$
|
|
2323
|
-
React__namespace.createElement(Text, { size: props.size, cx: css$
|
|
2324
|
-
props.selection && (React__namespace.createElement("div", { className: css$
|
|
2908
|
+
}, cx: cx__default.default(css$o.root, uuiCore.uuiElement.inputBox, uuiCore.uuiMarkers.clickable, props.isOpen && uuiCore.uuiMod.opened, ['size-' + (props.size || defaultSize)], props.cx), onClick: togglerPickerOpened, ref: ref }),
|
|
2909
|
+
React__namespace.createElement(uuiComponents.FlexRow, { cx: css$o.titleWrapper },
|
|
2910
|
+
React__namespace.createElement(Text, { size: props.size, cx: css$o.title }, getTitle),
|
|
2911
|
+
props.selection && (React__namespace.createElement("div", { className: css$o.textWrapper },
|
|
2325
2912
|
getSelectionText(),
|
|
2326
|
-
props.postfix && (React__namespace.createElement(Text, { color: "brand", size: props.size, cx: css$
|
|
2913
|
+
props.postfix && (React__namespace.createElement(Text, { color: "brand", size: props.size, cx: css$o.postfix }, props.postfix))))),
|
|
2327
2914
|
!props.isDisabled && React__namespace.createElement(uuiComponents.IconContainer, { icon: systemIcons[props.size || defaultSize].foldingArrow, flipY: props.isOpen, cx: "uui-icon-dropdown" })));
|
|
2328
2915
|
});
|
|
2329
2916
|
|
|
@@ -2390,7 +2977,7 @@ class FilterDatePickerBody extends uuiComponents.BaseDatePicker {
|
|
|
2390
2977
|
}
|
|
2391
2978
|
}
|
|
2392
2979
|
|
|
2393
|
-
var css$
|
|
2980
|
+
var css$n = {"date-input":"oXyvT9","size-24":"aYiI4h","size-30":"nUhMQv","size-36":"_8nzaPk","size-42":"Gn6Pm1","size-48":"zNamhc","date-input-group":"_6tNooK","separator":"MJxVBQ","mode-form":"qJ464i","mode-cell":"k4jEGI","dateInput":"oXyvT9","size24":"aYiI4h","size30":"nUhMQv","size36":"_8nzaPk","size42":"Gn6Pm1","size48":"zNamhc","dateInputGroup":"_6tNooK","modeForm":"qJ464i","modeCell":"k4jEGI"};
|
|
2394
2981
|
|
|
2395
2982
|
class FilterRangeDatePickerBody extends uuiComponents.BaseRangeDatePicker {
|
|
2396
2983
|
constructor() {
|
|
@@ -2410,10 +2997,10 @@ class FilterRangeDatePickerBody extends uuiComponents.BaseRangeDatePicker {
|
|
|
2410
2997
|
React__namespace.createElement(RangeDatePickerBody, { value: this.getValue(), onValueChange: this.onRangeChange, filter: this.props.filter, focusPart: this.state.inFocus, changeIsOpen: this.changeIsOpen, presets: this.props.presets })),
|
|
2411
2998
|
React__namespace.createElement(FlexCell, { alignSelf: "stretch" },
|
|
2412
2999
|
React__namespace.createElement(FlexRow, { padding: "24", vPadding: "12" },
|
|
2413
|
-
React__namespace.createElement("div", { className: cx__default.default(css$
|
|
2414
|
-
React__namespace.createElement(TextInput, { icon: systemIcons['30'].calendar, cx: cx__default.default(css$
|
|
2415
|
-
React__namespace.createElement("div", { className: css$
|
|
2416
|
-
React__namespace.createElement(TextInput, { cx: cx__default.default(css$
|
|
3000
|
+
React__namespace.createElement("div", { className: cx__default.default(css$n.dateInputGroup, this.state.inFocus && uuiCore.uuiMod.focus) },
|
|
3001
|
+
React__namespace.createElement(TextInput, { icon: systemIcons['30'].calendar, cx: cx__default.default(css$n.dateInput, css$n['size-30'], this.state.inFocus === 'from' && uuiCore.uuiMod.focus), size: "30", placeholder: i18n.rangeDatePicker.pickerPlaceholderFrom, value: this.state.inputValue.from, onValueChange: this.getChangeHandler('from'), onFocus: (event) => this.handleFocus(event, 'from'), onBlur: (event) => this.handleBlur(event, 'from') }),
|
|
3002
|
+
React__namespace.createElement("div", { className: css$n.separator }),
|
|
3003
|
+
React__namespace.createElement(TextInput, { cx: cx__default.default(css$n.dateInput, css$n['size-30'], this.state.inFocus === 'to' && uuiCore.uuiMod.focus), placeholder: i18n.rangeDatePicker.pickerPlaceholderTo, size: "30", value: this.state.inputValue.to, onCancel: this.state.inputValue.from && this.state.inputValue.to && this.handleCancel, onValueChange: this.getChangeHandler('to'), onFocus: (event) => this.handleFocus(event, 'to'), onBlur: (event) => this.handleBlur(event, 'to') })),
|
|
2417
3004
|
React__namespace.createElement(uuiComponents.FlexSpacer, null),
|
|
2418
3005
|
React__namespace.createElement(LinkButton, { isDisabled: !this.state.inputValue.from && !this.state.inputValue.to, caption: i18n.pickerModal.clearAllButton, onClick: this.handleCancel })))));
|
|
2419
3006
|
}
|
|
@@ -2422,7 +3009,7 @@ class FilterRangeDatePickerBody extends uuiComponents.BaseRangeDatePicker {
|
|
|
2422
3009
|
}
|
|
2423
3010
|
}
|
|
2424
3011
|
|
|
2425
|
-
var css$
|
|
3012
|
+
var css$m = {"container":"rxn8Af"};
|
|
2426
3013
|
|
|
2427
3014
|
function FilterNumericBody(props) {
|
|
2428
3015
|
var _a, _b;
|
|
@@ -2466,7 +3053,7 @@ function FilterNumericBody(props) {
|
|
|
2466
3053
|
if (isInRangePredicate) {
|
|
2467
3054
|
const value = props.value;
|
|
2468
3055
|
return (React__namespace.default.createElement("div", null,
|
|
2469
|
-
React__namespace.default.createElement(FlexRow, { padding: "12", alignItems: "center", spacing: "12", borderBottom: true, cx: css$
|
|
3056
|
+
React__namespace.default.createElement(FlexRow, { padding: "12", alignItems: "center", spacing: "12", borderBottom: true, cx: css$m.container },
|
|
2470
3057
|
React__namespace.default.createElement(FlexCell, { width: "100%" },
|
|
2471
3058
|
React__namespace.default.createElement(NumericInput, { value: (_a = value === null || value === void 0 ? void 0 : value.from) !== null && _a !== void 0 ? _a : null, onValueChange: rangeValueHandler('from'), size: "36", placeholder: "Min", formatOptions: { maximumFractionDigits: 2 } })),
|
|
2472
3059
|
React__namespace.default.createElement(FlexCell, { width: "100%" },
|
|
@@ -2474,7 +3061,7 @@ function FilterNumericBody(props) {
|
|
|
2474
3061
|
renderFooter()));
|
|
2475
3062
|
}
|
|
2476
3063
|
return (React__namespace.default.createElement("div", null,
|
|
2477
|
-
React__namespace.default.createElement(FlexRow, { padding: "12", alignItems: "center", borderBottom: true, cx: css$
|
|
3064
|
+
React__namespace.default.createElement(FlexRow, { padding: "12", alignItems: "center", borderBottom: true, cx: css$m.container },
|
|
2478
3065
|
React__namespace.default.createElement(FlexCell, { width: 130 },
|
|
2479
3066
|
React__namespace.default.createElement(NumericInput, { value: typeof props.value === 'number' ? props.value : null, onValueChange: props.onValueChange, size: "36", placeholder: "Enter a number", formatOptions: { maximumFractionDigits: 2 } }))),
|
|
2480
3067
|
renderFooter()));
|
|
@@ -2497,23 +3084,23 @@ function FilterItemBody(props) {
|
|
|
2497
3084
|
}
|
|
2498
3085
|
}
|
|
2499
3086
|
|
|
2500
|
-
var _path$
|
|
2501
|
-
function _extends$
|
|
3087
|
+
var _path$m;
|
|
3088
|
+
function _extends$n() { _extends$n = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
|
|
2502
3089
|
var SvgActionDeleteforever12 = function SvgActionDeleteforever12(props, ref) {
|
|
2503
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
3090
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
2504
3091
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2505
3092
|
width: 12,
|
|
2506
3093
|
height: 12,
|
|
2507
3094
|
viewBox: "0 0 18 18",
|
|
2508
3095
|
ref: ref
|
|
2509
|
-
}, props), _path$
|
|
3096
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2510
3097
|
fillRule: "evenodd",
|
|
2511
3098
|
d: "M14 6v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6h10zm-3-4 1 1h3v2H3V3h3l1-1h4zm-.24 12.1L9 12.36 7.24 14.1l-1.16-1.16 1.74-1.76-1.78-1.8 1.2-1.18L9 10l1.76-1.8 1.18 1.18-1.76 1.8 1.76 1.76-1.18 1.16z"
|
|
2512
3099
|
})));
|
|
2513
3100
|
};
|
|
2514
|
-
var ForwardRef$
|
|
3101
|
+
var ForwardRef$n = /*#__PURE__*/React.forwardRef(SvgActionDeleteforever12);
|
|
2515
3102
|
|
|
2516
|
-
var css$
|
|
3103
|
+
var css$l = {"header":"caG878","removeButton":"iWt2LZ","with-search":"UhGI54","withSearch":"UhGI54"};
|
|
2517
3104
|
|
|
2518
3105
|
function FiltersToolbarItemImpl(props) {
|
|
2519
3106
|
const { maxCount = 2 } = props;
|
|
@@ -2589,13 +3176,13 @@ function FiltersToolbarItemImpl(props) {
|
|
|
2589
3176
|
};
|
|
2590
3177
|
const renderHeader = (hideTitle) => {
|
|
2591
3178
|
var _a;
|
|
2592
|
-
return (React__namespace.default.createElement("div", { className: cx__default.default(css$
|
|
3179
|
+
return (React__namespace.default.createElement("div", { className: cx__default.default(css$l.header, isPickersType && ((_a = props.showSearch) !== null && _a !== void 0 ? _a : css$l.withSearch)) },
|
|
2593
3180
|
props.predicates ? (React__namespace.default.createElement(MultiSwitch, { items: props.predicates.map((i) => ({ id: i.predicate, caption: i.name })), value: predicate, onValueChange: changePredicate, size: "24" })) : (!hideTitle && (React__namespace.default.createElement(Text, { color: "secondary", size: "24", fontSize: "14" }, props.title))),
|
|
2594
|
-
!(props === null || props === void 0 ? void 0 : props.isAlwaysVisible) && (React__namespace.default.createElement(LinkButton, { cx: css$
|
|
3181
|
+
!(props === null || props === void 0 ? void 0 : props.isAlwaysVisible) && (React__namespace.default.createElement(LinkButton, { cx: css$l.removeButton, caption: i18n.filterToolbar.datePicker.removeCaption, onClick: removeOnclickHandler, size: "24", icon: ForwardRef$n }))));
|
|
2595
3182
|
};
|
|
2596
3183
|
const renderBody = (dropdownProps) => {
|
|
2597
3184
|
const hideHeaderTitle = isPickersType && isMobileScreen;
|
|
2598
|
-
return isPickersType ? (React__namespace.default.createElement(MobileDropdownWrapper, Object.assign({}, dropdownProps, {
|
|
3185
|
+
return isPickersType ? (React__namespace.default.createElement(MobileDropdownWrapper, Object.assign({}, dropdownProps, { title: props.title, width: 360, onClose: () => isOpenChange(false) }),
|
|
2599
3186
|
renderHeader(hideHeaderTitle),
|
|
2600
3187
|
React__namespace.default.createElement(FilterItemBody, Object.assign({}, props, dropdownProps, { selectedPredicate: predicate, value: getValue(), onValueChange: onValueChange })))) : (React__namespace.default.createElement(DropdownContainer, Object.assign({}, dropdownProps),
|
|
2601
3188
|
renderHeader(hideHeaderTitle),
|
|
@@ -2678,20 +3265,20 @@ function FiltersToolbarItemImpl(props) {
|
|
|
2678
3265
|
}
|
|
2679
3266
|
const FiltersPanelItem = React__namespace.default.memo(FiltersToolbarItemImpl);
|
|
2680
3267
|
|
|
2681
|
-
var _path$
|
|
2682
|
-
function _extends$
|
|
3268
|
+
var _path$l;
|
|
3269
|
+
function _extends$m() { _extends$m = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
|
|
2683
3270
|
var SvgActionAdd18 = function SvgActionAdd18(props, ref) {
|
|
2684
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
3271
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
2685
3272
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2686
3273
|
width: 18,
|
|
2687
3274
|
height: 18,
|
|
2688
3275
|
viewBox: "0 0 18 18",
|
|
2689
3276
|
ref: ref
|
|
2690
|
-
}, props), _path$
|
|
3277
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2691
3278
|
d: "M10 2H8v6H2v2h6v6h2v-6h6V8h-6V2z"
|
|
2692
3279
|
})));
|
|
2693
3280
|
};
|
|
2694
|
-
var ForwardRef$
|
|
3281
|
+
var ForwardRef$m = /*#__PURE__*/React.forwardRef(SvgActionAdd18);
|
|
2695
3282
|
|
|
2696
3283
|
const normalizeFilterWithPredicates = (filter) => {
|
|
2697
3284
|
if (!filter) {
|
|
@@ -2726,853 +3313,145 @@ const normalizeFilterWithPredicates = (filter) => {
|
|
|
2726
3313
|
if (filterValue[predicate] === null || filterValue[predicate] === undefined) {
|
|
2727
3314
|
delete filter[key];
|
|
2728
3315
|
}
|
|
2729
|
-
});
|
|
2730
|
-
}
|
|
2731
|
-
}
|
|
2732
|
-
return result;
|
|
2733
|
-
};
|
|
2734
|
-
function FiltersToolbarImpl(props) {
|
|
2735
|
-
const { filters, tableState, setTableState } = props;
|
|
2736
|
-
const [newFilterId, setNewFilterId] = React.useState(null);
|
|
2737
|
-
const dataSource = uuiCore.useArrayDataSource({
|
|
2738
|
-
items: filters,
|
|
2739
|
-
getId: (item) => item.field,
|
|
2740
|
-
}, []);
|
|
2741
|
-
const onFiltersChange = (updatedFilters) => {
|
|
2742
|
-
var _a;
|
|
2743
|
-
const newConfig = {};
|
|
2744
|
-
const newFilter = {};
|
|
2745
|
-
const sortedOrders = tableState.filtersConfig && sortBy__default.default(tableState.filtersConfig, (f) => f === null || f === void 0 ? void 0 : f.order);
|
|
2746
|
-
let lastItemOrder = (sortedOrders === null || sortedOrders === void 0 ? void 0 : sortedOrders.length) ? (_a = sortedOrders[sortedOrders.length - 1]) === null || _a === void 0 ? void 0 : _a.order : null;
|
|
2747
|
-
updatedFilters.forEach((filter) => {
|
|
2748
|
-
var _a, _b;
|
|
2749
|
-
let order = (_b = (_a = tableState === null || tableState === void 0 ? void 0 : tableState.filtersConfig) === null || _a === void 0 ? void 0 : _a[filter === null || filter === void 0 ? void 0 : filter.field]) === null || _b === void 0 ? void 0 : _b.order;
|
|
2750
|
-
if (!order) {
|
|
2751
|
-
order = uuiCore.getOrderBetween(lastItemOrder, null);
|
|
2752
|
-
lastItemOrder = order;
|
|
2753
|
-
}
|
|
2754
|
-
newConfig[filter.field] = { isVisible: true, order: order };
|
|
2755
|
-
// Remove unselected filters from filter object
|
|
2756
|
-
if (tableState.filter) {
|
|
2757
|
-
newFilter[filter.field] = tableState.filter[filter.field];
|
|
2758
|
-
}
|
|
2759
|
-
});
|
|
2760
|
-
setTableState(Object.assign(Object.assign({}, tableState), { filtersConfig: newConfig, filter: newFilter }));
|
|
2761
|
-
};
|
|
2762
|
-
const handleFilterChange = (newFilter) => {
|
|
2763
|
-
const filter = normalizeFilterWithPredicates(Object.assign(Object.assign({}, tableState.filter), newFilter));
|
|
2764
|
-
setTableState(Object.assign(Object.assign({}, tableState), { filter: filter }));
|
|
2765
|
-
};
|
|
2766
|
-
const removeFilter = (field) => {
|
|
2767
|
-
const filterConfig = Object.assign({}, tableState.filtersConfig);
|
|
2768
|
-
delete filterConfig[field];
|
|
2769
|
-
const filter = Object.assign({}, tableState.filter);
|
|
2770
|
-
delete filter[field];
|
|
2771
|
-
const newTableState = Object.assign(Object.assign({}, tableState), { filtersConfig: filterConfig, filter: filter });
|
|
2772
|
-
setTableState(Object.assign({}, newTableState));
|
|
2773
|
-
};
|
|
2774
|
-
const selectedFilters = React.useMemo(() => {
|
|
2775
|
-
const filtersConfig = tableState.filtersConfig || {};
|
|
2776
|
-
return filters.filter((filter) => {
|
|
2777
|
-
return filter.isAlwaysVisible || (filtersConfig[filter === null || filter === void 0 ? void 0 : filter.field] ? filtersConfig[filter === null || filter === void 0 ? void 0 : filter.field].isVisible : false);
|
|
2778
|
-
});
|
|
2779
|
-
}, [tableState.filtersConfig, filters]);
|
|
2780
|
-
const sortedActiveFilters = React.useMemo(() => {
|
|
2781
|
-
return sortBy__default.default(selectedFilters, (f) => { var _a, _b; return (_b = (_a = tableState.filtersConfig) === null || _a === void 0 ? void 0 : _a[f.field]) === null || _b === void 0 ? void 0 : _b.order; });
|
|
2782
|
-
}, [filters, tableState.filtersConfig]);
|
|
2783
|
-
const renderAddFilterToggler = React.useCallback((togglerProps) => {
|
|
2784
|
-
var _a;
|
|
2785
|
-
return (React__namespace.default.createElement(Button, { size: (_a = props.size) !== null && _a !== void 0 ? _a : '36', onClick: togglerProps.onClick, ref: togglerProps.ref, caption: i18n.filterToolbar.addCaption, icon: ForwardRef$t, iconPosition: "left", fill: "ghost", color: "primary" }));
|
|
2786
|
-
}, []);
|
|
2787
|
-
const getRowOptions = React.useCallback((item) => ({
|
|
2788
|
-
isDisabled: item.isAlwaysVisible,
|
|
2789
|
-
checkbox: {
|
|
2790
|
-
isVisible: true,
|
|
2791
|
-
isDisabled: item.isAlwaysVisible,
|
|
2792
|
-
},
|
|
2793
|
-
}), []);
|
|
2794
|
-
const isAllFiltersAlwaysVisible = props.filters.every((i) => i.isAlwaysVisible);
|
|
2795
|
-
React.useEffect(() => {
|
|
2796
|
-
// Reset new filter id, after first render with autofocus
|
|
2797
|
-
setNewFilterId(null);
|
|
2798
|
-
}, [newFilterId]);
|
|
2799
|
-
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
2800
|
-
sortedActiveFilters.map((f) => {
|
|
2801
|
-
var _a;
|
|
2802
|
-
return (React__namespace.default.createElement(uuiComponents.FlexCell, { width: "auto", key: f.field },
|
|
2803
|
-
React__namespace.default.createElement(FiltersPanelItem, Object.assign({}, f, { value: (_a = tableState.filter) === null || _a === void 0 ? void 0 : _a[f.field], onValueChange: handleFilterChange, key: f.field, autoFocus: newFilterId === f.field, removeFilter: removeFilter, size: props.size }))));
|
|
2804
|
-
}),
|
|
2805
|
-
!isAllFiltersAlwaysVisible && (React__namespace.default.createElement(PickerInput, { dataSource: dataSource, value: selectedFilters, onValueChange: onFiltersChange, selectionMode: "multi", valueType: "entity", key: newFilterId, renderRow: (props) => (React__namespace.default.createElement(DataPickerRow, Object.assign({}, props, { padding: "12", key: props.key, onCheck: (row) => {
|
|
2806
|
-
props.onCheck && props.onCheck(row);
|
|
2807
|
-
!row.isChecked && setNewFilterId(row.value.field);
|
|
2808
|
-
}, renderItem: (item, rowProps) => React__namespace.default.createElement(PickerItem, Object.assign({}, rowProps, { title: item.title })) }))), getName: (i) => i.title, renderToggler: renderAddFilterToggler, emptyValue: [], getRowOptions: getRowOptions, fixedBodyPosition: true, size: props.size }))));
|
|
2809
|
-
}
|
|
2810
|
-
const FiltersPanel = React__namespace.default.memo(FiltersToolbarImpl);
|
|
2811
|
-
|
|
2812
|
-
var css$y = {"divider":"B95GQr","dropdownDeleteIcon":"_2pUECw","presetsWrapper":"_6o3yWT","addPresetContainer":"jReawz","dropContainer":"duOJxw"};
|
|
2813
|
-
|
|
2814
|
-
var css$x = {"preset-dropdown-panel":"SjXSIv","delete-row":"Wroi25","delete-button":"_1xaMO8","targetOpen":"WCMpar","presetDropdownPanel":"SjXSIv","deleteRow":"Wroi25","deleteButton":"_1xaMO8"};
|
|
2815
|
-
|
|
2816
|
-
var _path$r;
|
|
2817
|
-
function _extends$s() { _extends$s = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
|
|
2818
|
-
var SvgNavigationMoreVert18 = function SvgNavigationMoreVert18(props, ref) {
|
|
2819
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
2820
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2821
|
-
width: 18,
|
|
2822
|
-
height: 18,
|
|
2823
|
-
viewBox: "0 0 18 18",
|
|
2824
|
-
ref: ref
|
|
2825
|
-
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2826
|
-
fillRule: "evenodd",
|
|
2827
|
-
d: "M9 6c.825 0 1.5-.675 1.5-1.5S9.825 3 9 3s-1.5.675-1.5 1.5S8.175 6 9 6zm0 1.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5 1.5-.675 1.5-1.5S9.825 7.5 9 7.5zM9 12c-.825 0-1.5.675-1.5 1.5S8.175 15 9 15s1.5-.675 1.5-1.5S9.825 12 9 12z",
|
|
2828
|
-
clipRule: "evenodd"
|
|
2829
|
-
})));
|
|
2830
|
-
};
|
|
2831
|
-
var ForwardRef$s = /*#__PURE__*/React.forwardRef(SvgNavigationMoreVert18);
|
|
2832
|
-
|
|
2833
|
-
var _path$q;
|
|
2834
|
-
function _extends$r() { _extends$r = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
|
|
2835
|
-
var SvgActionUpdate18 = function SvgActionUpdate18(props, ref) {
|
|
2836
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
2837
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2838
|
-
width: 18,
|
|
2839
|
-
height: 18,
|
|
2840
|
-
viewBox: "0 0 18 18",
|
|
2841
|
-
ref: ref
|
|
2842
|
-
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2843
|
-
fillRule: "evenodd",
|
|
2844
|
-
d: "M8.007 2A7.004 7.004 0 0 0 1 9a7.004 7.004 0 0 0 11.732 5.16l-1.497-1.347A4.999 4.999 0 0 1 3 9c0-2.763 2.237-5 5-5 2.762 0 5 2.237 5 5h2c0-3.864-3.129-7-6.993-7zM11 9l3 3 3-3h-6z",
|
|
2845
|
-
clipRule: "evenodd"
|
|
2846
|
-
})));
|
|
2847
|
-
};
|
|
2848
|
-
var ForwardRef$r = /*#__PURE__*/React.forwardRef(SvgActionUpdate18);
|
|
2849
|
-
|
|
2850
|
-
var _path$p;
|
|
2851
|
-
function _extends$q() { _extends$q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
|
|
2852
|
-
var SvgSaveOutline18 = function SvgSaveOutline18(props, ref) {
|
|
2853
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
2854
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2855
|
-
width: 18,
|
|
2856
|
-
height: 18,
|
|
2857
|
-
viewBox: "0 0 18 18",
|
|
2858
|
-
ref: ref
|
|
2859
|
-
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2860
|
-
d: "M12.75 2.25h-9a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5v-9l-3-3zm1.5 12H3.75V3.75h8.377l2.123 2.122v8.378zM9 9a2.247 2.247 0 0 0-2.25 2.25A2.247 2.247 0 0 0 9 13.5a2.247 2.247 0 0 0 2.25-2.25A2.247 2.247 0 0 0 9 9zM4.5 4.5h6.75v3H4.5v-3z"
|
|
2861
|
-
})));
|
|
2862
|
-
};
|
|
2863
|
-
var ForwardRef$q = /*#__PURE__*/React.forwardRef(SvgSaveOutline18);
|
|
2864
|
-
|
|
2865
|
-
var _path$o;
|
|
2866
|
-
function _extends$p() { _extends$p = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
|
|
2867
|
-
var SvgContentEditUndo18 = function SvgContentEditUndo18(props, ref) {
|
|
2868
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
2869
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2870
|
-
width: 18,
|
|
2871
|
-
height: 18,
|
|
2872
|
-
viewBox: "0 0 18 18",
|
|
2873
|
-
ref: ref
|
|
2874
|
-
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2875
|
-
fillRule: "evenodd",
|
|
2876
|
-
d: "M9.375 6A7.848 7.848 0 0 0 4.2 7.95l-2.7-2.7V12h6.75L5.535 9.285a5.965 5.965 0 0 1 3.84-1.41 6.009 6.009 0 0 1 5.7 4.125l1.777-.585C15.81 8.273 12.862 6 9.375 6z",
|
|
2877
|
-
clipRule: "evenodd"
|
|
2878
|
-
})));
|
|
2879
|
-
};
|
|
2880
|
-
var ForwardRef$p = /*#__PURE__*/React.forwardRef(SvgContentEditUndo18);
|
|
2881
|
-
|
|
2882
|
-
var _path$n;
|
|
2883
|
-
function _extends$o() { _extends$o = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
|
|
2884
|
-
var SvgActionCopyContent18 = function SvgActionCopyContent18(props, ref) {
|
|
2885
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
2886
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2887
|
-
width: 18,
|
|
2888
|
-
height: 18,
|
|
2889
|
-
viewBox: "0 0 18 18",
|
|
2890
|
-
ref: ref
|
|
2891
|
-
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2892
|
-
fillRule: "evenodd",
|
|
2893
|
-
d: "M3 1h8v2H3v8H1V3a2 2 0 0 1 2-2zm2 6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7zm10 8H7V7h8v8z",
|
|
2894
|
-
clipRule: "evenodd"
|
|
2895
|
-
})));
|
|
2896
|
-
};
|
|
2897
|
-
var ForwardRef$o = /*#__PURE__*/React.forwardRef(SvgActionCopyContent18);
|
|
2898
|
-
|
|
2899
|
-
var _path$m;
|
|
2900
|
-
function _extends$n() { _extends$n = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
|
|
2901
|
-
var SvgContentEdit18 = function SvgContentEdit18(props, ref) {
|
|
2902
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
2903
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2904
|
-
width: 18,
|
|
2905
|
-
height: 18,
|
|
2906
|
-
viewBox: "0 0 18 18",
|
|
2907
|
-
ref: ref
|
|
2908
|
-
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2909
|
-
fillRule: "evenodd",
|
|
2910
|
-
d: "M2.25 12.94v2.812h2.813l8.294-8.295-2.812-2.813L2.25 12.94zm13.283-7.658a.747.747 0 0 0 0-1.058L13.777 2.47a.747.747 0 0 0-1.058 0l-1.373 1.373 2.813 2.812 1.373-1.372z",
|
|
2911
|
-
clipRule: "evenodd"
|
|
2912
|
-
})));
|
|
2913
|
-
};
|
|
2914
|
-
var ForwardRef$n = /*#__PURE__*/React.forwardRef(SvgContentEdit18);
|
|
2915
|
-
|
|
2916
|
-
var _path$l;
|
|
2917
|
-
function _extends$m() { _extends$m = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
|
|
2918
|
-
var SvgContentLink18 = function SvgContentLink18(props, ref) {
|
|
2919
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
2920
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2921
|
-
width: 18,
|
|
2922
|
-
height: 18,
|
|
2923
|
-
viewBox: "0 0 18 18",
|
|
2924
|
-
ref: ref
|
|
2925
|
-
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2926
|
-
fillRule: "evenodd",
|
|
2927
|
-
d: "M7.943 10.057a.73.73 0 0 1 0 1.066.756.756 0 0 1-1.065 0 3.753 3.753 0 0 1 0-5.303l2.655-2.655a3.753 3.753 0 0 1 5.302 0 3.753 3.753 0 0 1 0 5.302l-1.118 1.118a5.18 5.18 0 0 0-.3-1.815l.353-.36a2.236 2.236 0 0 0 0-3.18 2.236 2.236 0 0 0-3.18 0L7.943 6.877a2.236 2.236 0 0 0 0 3.18zm2.114-3.18a.756.756 0 0 1 1.066 0 3.753 3.753 0 0 1 0 5.303l-2.655 2.655a3.753 3.753 0 0 1-5.303 0 3.753 3.753 0 0 1 0-5.303l1.118-1.117a5.25 5.25 0 0 0 .3 1.823l-.353.352a2.236 2.236 0 0 0 0 3.18 2.236 2.236 0 0 0 3.18 0l2.647-2.647a2.236 2.236 0 0 0 0-3.18.73.73 0 0 1 0-1.066z",
|
|
2928
|
-
clipRule: "evenodd"
|
|
2929
|
-
})));
|
|
2930
|
-
};
|
|
2931
|
-
var ForwardRef$m = /*#__PURE__*/React.forwardRef(SvgContentLink18);
|
|
2932
|
-
|
|
2933
|
-
var _path$k;
|
|
2934
|
-
function _extends$l() { _extends$l = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
|
|
2935
|
-
var SvgActionDeleteforever18 = function SvgActionDeleteforever18(props, ref) {
|
|
2936
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
2937
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2938
|
-
width: 18,
|
|
2939
|
-
height: 18,
|
|
2940
|
-
viewBox: "0 0 18 18",
|
|
2941
|
-
ref: ref
|
|
2942
|
-
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2943
|
-
fillRule: "evenodd",
|
|
2944
|
-
d: "M7 2h4l1 1h3v2H3V3h3l1-1zM4 6h10v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6zm6.76 8.1L9 12.36 7.24 14.1l-1.16-1.16 1.74-1.76-1.78-1.8 1.2-1.18L9 10l1.76-1.8 1.18 1.18-1.76 1.8 1.76 1.76-1.18 1.16z",
|
|
2945
|
-
clipRule: "evenodd"
|
|
2946
|
-
})));
|
|
2947
|
-
};
|
|
2948
|
-
var ForwardRef$l = /*#__PURE__*/React.forwardRef(SvgActionDeleteforever18);
|
|
2949
|
-
|
|
2950
|
-
function PresetActionsDropdown(props) {
|
|
2951
|
-
const { uuiNotifications } = uuiCore.useUuiContext();
|
|
2952
|
-
const copyUrlToClipboard = React.useCallback(() => __awaiter(this, void 0, void 0, function* () {
|
|
2953
|
-
yield navigator.clipboard.writeText(props.getPresetLink(props.preset));
|
|
2954
|
-
successNotificationHandler('Link copied!');
|
|
2955
|
-
}), []);
|
|
2956
|
-
const saveInCurrent = React.useCallback((preset) => __awaiter(this, void 0, void 0, function* () {
|
|
2957
|
-
const newPreset = Object.assign(Object.assign({}, preset), { filter: props.tableState.filter, sorting: props.tableState.sorting, columnsConfig: props.tableState.columnsConfig, filtersConfig: props.tableState.filtersConfig, viewState: props.tableState.viewState });
|
|
2958
|
-
yield props.updatePreset(newPreset);
|
|
2959
|
-
successNotificationHandler('Changes saved!');
|
|
2960
|
-
}), [
|
|
2961
|
-
props.tableState.filter, props.tableState.columnsConfig, props.tableState.filtersConfig,
|
|
2962
|
-
]);
|
|
2963
|
-
const successNotificationHandler = React.useCallback((text) => {
|
|
2964
|
-
uuiNotifications
|
|
2965
|
-
.show((props) => (React__namespace.default.createElement(SuccessNotification, Object.assign({}, props),
|
|
2966
|
-
React__namespace.default.createElement(Text, { size: "36", font: "regular", fontSize: "14" }, text))), { duration: 3 })
|
|
2967
|
-
.catch(() => null);
|
|
2968
|
-
}, []);
|
|
2969
|
-
const saveInCurrentHandler = React.useCallback(() => {
|
|
2970
|
-
saveInCurrent(props.preset);
|
|
2971
|
-
}, [props.preset]);
|
|
2972
|
-
const discardAllChangesHandler = React.useCallback(() => {
|
|
2973
|
-
props.choosePreset(props.preset);
|
|
2974
|
-
}, [props.preset]);
|
|
2975
|
-
const duplicateHandler = React.useCallback(() => {
|
|
2976
|
-
props.duplicatePreset(props.preset);
|
|
2977
|
-
}, [props.preset]);
|
|
2978
|
-
const deleteHandler = React.useCallback(() => __awaiter(this, void 0, void 0, function* () {
|
|
2979
|
-
yield props.deletePreset(props.preset);
|
|
2980
|
-
}), [
|
|
2981
|
-
props.activePresetId, props.deletePreset, props.preset,
|
|
2982
|
-
]);
|
|
2983
|
-
const renderBody = () => {
|
|
2984
|
-
const isReadonlyPreset = props.preset.isReadonly;
|
|
2985
|
-
return (React__namespace.default.createElement(Panel, { background: "surface", shadow: true, cx: css$x.presetDropdownPanel },
|
|
2986
|
-
props.activePresetId === props.preset.id && props.hasPresetChanged(props.preset) && (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
2987
|
-
!isReadonlyPreset && (React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-save-in-current` },
|
|
2988
|
-
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$r, caption: "Save in current", onClick: saveInCurrentHandler }))),
|
|
2989
|
-
React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-save-as-new` },
|
|
2990
|
-
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$q, caption: "Save as new", onClick: props.addPreset })),
|
|
2991
|
-
React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-discard`, borderBottom: true },
|
|
2992
|
-
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$p, caption: "Discard all changes", onClick: discardAllChangesHandler })))),
|
|
2993
|
-
props.preset.id === props.activePresetId && !isReadonlyPreset && (React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-rename` },
|
|
2994
|
-
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$n, caption: "Rename", onClick: props.renamePreset }))),
|
|
2995
|
-
React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-duplicate` },
|
|
2996
|
-
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$o, caption: "Duplicate", onClick: duplicateHandler })),
|
|
2997
|
-
React__namespace.default.createElement(FlexRow, { borderBottom: true, key: `${props.preset.id}-copyLink` },
|
|
2998
|
-
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$m, caption: "Copy Link", onClick: copyUrlToClipboard })),
|
|
2999
|
-
!isReadonlyPreset && (React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-delete`, cx: css$x.deleteRow },
|
|
3000
|
-
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$l, caption: "Delete", cx: css$x.deleteButton, onClick: deleteHandler })))));
|
|
3001
|
-
};
|
|
3002
|
-
const renderTarget = React.useCallback((dropdownProps) => {
|
|
3003
|
-
return (React__namespace.default.createElement(IconButton, Object.assign({ cx: dropdownProps.isOpen && css$x.targetOpen, color: props.preset.id === props.activePresetId ? 'info' : 'neutral' }, dropdownProps, { icon: ForwardRef$s })));
|
|
3004
|
-
}, []);
|
|
3005
|
-
return (React__namespace.default.createElement(Dropdown, { renderBody: renderBody, renderTarget: renderTarget, placement: "bottom-end", modifiers: [{ name: 'offset', options: { offset: [0, 22] } }] }));
|
|
3006
|
-
}
|
|
3007
|
-
|
|
3008
|
-
var css$w = {"preset-input-cell":"DAkrrp","preset-input":"-pvSxv","presetInputCell":"DAkrrp","presetInput":"-pvSxv"};
|
|
3009
|
-
|
|
3010
|
-
function PresetInput(props) {
|
|
3011
|
-
var _a;
|
|
3012
|
-
const [presetCaption, setPresetCaption] = React.useState(((_a = props.preset) === null || _a === void 0 ? void 0 : _a.name) || '');
|
|
3013
|
-
const cancelActionHandler = React.useCallback(() => {
|
|
3014
|
-
setPresetCaption('');
|
|
3015
|
-
props.onCancel();
|
|
3016
|
-
}, [props.onCancel]);
|
|
3017
|
-
const acceptActionHandler = React.useCallback(() => __awaiter(this, void 0, void 0, function* () {
|
|
3018
|
-
if (presetCaption) {
|
|
3019
|
-
yield props.onSuccess(presetCaption);
|
|
3020
|
-
}
|
|
3021
|
-
props.onCancel();
|
|
3022
|
-
}), [presetCaption]);
|
|
3023
|
-
const newPresetOnBlurHandler = React.useCallback(() => {
|
|
3024
|
-
if (presetCaption.length) {
|
|
3025
|
-
return;
|
|
3026
|
-
}
|
|
3027
|
-
props.onCancel();
|
|
3028
|
-
}, [presetCaption.length, props.onCancel]);
|
|
3029
|
-
return (React__namespace.default.createElement(FlexCell, { cx: css$w.presetInputCell, minWidth: 180 },
|
|
3030
|
-
React__namespace.default.createElement(TextInput, { cx: css$w.presetInput, onValueChange: setPresetCaption, value: presetCaption, onCancel: cancelActionHandler, onAccept: acceptActionHandler, onBlur: newPresetOnBlurHandler, autoFocus: true, maxLength: 50 })));
|
|
3031
|
-
}
|
|
3032
|
-
|
|
3033
|
-
var css$v = {"preset":"GjqrSR","activePreset":"ZPPWsj"};
|
|
3034
|
-
|
|
3035
|
-
function Preset(props) {
|
|
3036
|
-
const [isRenamePreset, setIsRenamePreset] = React.useState(false);
|
|
3037
|
-
const choosePresetHandler = React.useCallback(() => props.choosePreset(props.preset), [props]);
|
|
3038
|
-
const cancelRenamePreset = React.useCallback(() => {
|
|
3039
|
-
setIsRenamePreset(() => false);
|
|
3040
|
-
}, []);
|
|
3041
|
-
const setPresetForRename = React.useCallback(() => {
|
|
3042
|
-
if (!isRenamePreset) {
|
|
3043
|
-
setIsRenamePreset(() => true);
|
|
3044
|
-
}
|
|
3045
|
-
}, []);
|
|
3046
|
-
const handlePresetRename = React.useCallback((name) => {
|
|
3047
|
-
const newPreset = Object.assign(Object.assign({}, props.preset), { name: name });
|
|
3048
|
-
return props.updatePreset(newPreset);
|
|
3049
|
-
}, [props.preset]);
|
|
3050
|
-
const isPresetActive = props.activePresetId === props.preset.id;
|
|
3051
|
-
return (React__namespace.default.createElement(FlexCell, { key: props.preset.id, alignSelf: "center", width: "auto" }, isRenamePreset ? (React__namespace.default.createElement(PresetInput, { onCancel: cancelRenamePreset, onSuccess: handlePresetRename, preset: props.preset })) : (React__namespace.default.createElement(TabButton, { caption: props.preset.name, onClick: !isPresetActive && choosePresetHandler, cx: [css$v.preset, isPresetActive && css$v.activePreset], size: "60", withNotify: isPresetActive && props.hasPresetChanged(props.preset), icon: () => React__namespace.default.createElement(PresetActionsDropdown, Object.assign({ renamePreset: setPresetForRename }, props)), iconPosition: "right", isLinkActive: isPresetActive }))));
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
|
-
var _path$j;
|
|
3055
|
-
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
3056
|
-
var SvgContentPlusBold18 = function SvgContentPlusBold18(props, ref) {
|
|
3057
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
3058
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3059
|
-
width: 18,
|
|
3060
|
-
height: 18,
|
|
3061
|
-
viewBox: "0 0 18 18",
|
|
3062
|
-
ref: ref
|
|
3063
|
-
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3064
|
-
d: "M10.5 3h-3v4.5H3v3h4.5V15h3v-4.5H15v-3h-4.5V3z"
|
|
3065
|
-
})));
|
|
3066
|
-
};
|
|
3067
|
-
var ForwardRef$k = /*#__PURE__*/React.forwardRef(SvgContentPlusBold18);
|
|
3068
|
-
|
|
3069
|
-
function PresetsPanel(props) {
|
|
3070
|
-
const [isAddingPreset, setIsAddingPreset] = React.useState(false);
|
|
3071
|
-
const setAddingPreset = React.useCallback(() => {
|
|
3072
|
-
setIsAddingPreset(true);
|
|
3073
|
-
}, []);
|
|
3074
|
-
const cancelAddingPreset = React.useCallback(() => {
|
|
3075
|
-
setIsAddingPreset(false);
|
|
3076
|
-
}, []);
|
|
3077
|
-
const presetApi = __rest(props, ["presets"]);
|
|
3078
|
-
const renderPreset = (preset) => {
|
|
3079
|
-
return React__namespace.default.createElement(Preset, Object.assign({ key: preset.id, preset: preset, addPreset: setAddingPreset }, presetApi));
|
|
3080
|
-
};
|
|
3081
|
-
const renderAddPresetButton = React.useCallback(() => {
|
|
3082
|
-
return (React__namespace.default.createElement("div", { key: "addingPresetBlock", className: css$y.addPresetContainer }, !isAddingPreset ? (React__namespace.default.createElement(Button, { size: "36", onClick: setAddingPreset, caption: i18n.presetPanel.addCaption, icon: ForwardRef$k, iconPosition: "left", fill: "ghost", color: "primary" })) : (React__namespace.default.createElement(PresetInput, { onCancel: cancelAddingPreset, onSuccess: props.createNewPreset }))));
|
|
3083
|
-
}, [isAddingPreset]);
|
|
3084
|
-
const onPresetDropdownSelect = (preset) => {
|
|
3085
|
-
props.choosePreset(preset.preset);
|
|
3086
|
-
};
|
|
3087
|
-
const renderMoreButtonDropdown = (item, hiddenItems) => {
|
|
3088
|
-
return (React__namespace.default.createElement(Dropdown, { key: "more", renderTarget: (props) => (React__namespace.default.createElement(FlexRow, null,
|
|
3089
|
-
React__namespace.default.createElement("div", { className: css$y.divider }),
|
|
3090
|
-
React__namespace.default.createElement(Button, Object.assign({ fill: "ghost", color: "secondary", caption: `${(hiddenItems === null || hiddenItems === void 0 ? void 0 : hiddenItems.length) || ''} more` }, props)))), renderBody: (propsBody) => (React__namespace.default.createElement(DropdownContainer, Object.assign({ cx: uuiCore.cx(css$y.dropContainer), width: 230 }, propsBody),
|
|
3091
|
-
React__namespace.default.createElement(uuiComponents.ScrollBars, null, hiddenItems.map((hiddenItem) => (React__namespace.default.createElement(DropdownMenuButton, { key: hiddenItem.preset.id, onClick: () => onPresetDropdownSelect(hiddenItem), caption: hiddenItem.preset.name, icon: !hiddenItem.preset.isReadonly && ForwardRef$l, iconPosition: "right", cx: css$y.dropdownDeleteIcon, onIconClick: !hiddenItem.preset.isReadonly && (() => props.deletePreset(hiddenItem.preset)) })))))) }));
|
|
3092
|
-
};
|
|
3093
|
-
const getPresetPriority = (preset, index) => {
|
|
3094
|
-
return preset.id === props.activePresetId ? 100499 : 1000 - index;
|
|
3095
|
-
};
|
|
3096
|
-
const getPanelItems = () => {
|
|
3097
|
-
return [
|
|
3098
|
-
...sortBy__default.default(props.presets, (i) => i.order).map((preset, index) => ({
|
|
3099
|
-
id: preset.id.toString(),
|
|
3100
|
-
render: () => renderPreset(preset),
|
|
3101
|
-
priority: getPresetPriority(preset, index),
|
|
3102
|
-
preset: preset,
|
|
3103
|
-
})), {
|
|
3104
|
-
id: 'collapsedContainer', render: renderMoreButtonDropdown, priority: 100501, collapsedContainer: true,
|
|
3105
|
-
}, { id: 'addPreset', render: renderAddPresetButton, priority: 100501 },
|
|
3106
|
-
];
|
|
3107
|
-
};
|
|
3108
|
-
return (React__namespace.default.createElement(FlexCell, { grow: 1, minWidth: 310, rawProps: props.rawProps },
|
|
3109
|
-
React__namespace.default.createElement(FlexRow, { size: null, spacing: "12", cx: css$y.presetsWrapper },
|
|
3110
|
-
React__namespace.default.createElement(uuiComponents.AdaptivePanel, { items: getPanelItems() }))));
|
|
3111
|
-
}
|
|
3112
|
-
|
|
3113
|
-
const defaultPredicates = {
|
|
3114
|
-
numeric: [
|
|
3115
|
-
{ predicate: 'eq', name: '=', isDefault: true }, { predicate: 'neq', name: '≠' }, { predicate: 'lte', name: '≤' }, { predicate: 'gte', name: '≥' }, { predicate: 'inRange', name: 'In Range' },
|
|
3116
|
-
],
|
|
3117
|
-
multiPicker: [{ predicate: 'in', name: 'is', isDefault: true }, { predicate: 'nin', name: 'is not' }],
|
|
3118
|
-
rangeDatePicker: [{ predicate: 'inRange', name: 'In Range', isDefault: true }, { predicate: 'notInRange', name: 'Not in Range' }],
|
|
3119
|
-
};
|
|
3120
|
-
|
|
3121
|
-
const useColumnsWithFilters = (initialColumns, filters) => {
|
|
3122
|
-
const makeFilterRenderCallback = React.useCallback((key) => function (filterLens, dropdownProps) {
|
|
3123
|
-
const filter = filters.find((f) => f.columnKey === key);
|
|
3124
|
-
if (!filter)
|
|
3125
|
-
return null;
|
|
3126
|
-
const props = filterLens.prop(filter.field).toProps();
|
|
3127
|
-
return React__namespace.default.createElement(FilterItemBody, Object.assign({}, props, filter, dropdownProps));
|
|
3128
|
-
}, [filters]);
|
|
3129
|
-
const columns = React.useMemo(() => {
|
|
3130
|
-
if (filters) {
|
|
3131
|
-
const filterKeys = filters.map((f) => f.columnKey);
|
|
3132
|
-
const newColumns = (initialColumns.map((column) => {
|
|
3133
|
-
if (filterKeys.includes(column.key)) {
|
|
3134
|
-
return Object.assign(Object.assign({}, column), { renderFilter: makeFilterRenderCallback(column.key) });
|
|
3135
|
-
}
|
|
3136
|
-
else {
|
|
3137
|
-
return column;
|
|
3138
|
-
}
|
|
3139
|
-
}));
|
|
3140
|
-
return newColumns;
|
|
3141
|
-
}
|
|
3142
|
-
return initialColumns;
|
|
3143
|
-
}, [filters, initialColumns]);
|
|
3144
|
-
return columns;
|
|
3145
|
-
};
|
|
3146
|
-
|
|
3147
|
-
var css$u = {"line-height-12":"gnqeJP","line-height-18":"_0HeJOH","line-height-24":"z17ViQ","line-height-30":"PPpLg-","font-size-10":"JgKxV2","font-size-12":"rvvp2r","font-size-14":"br99be","font-size-16":"AAZdm3","font-size-18":"piDdw-","font-size-24":"ElLMBx","v-padding-2":"_7SkLfV","v-padding-3":"b7eiDk","v-padding-5":"dFlWDe","v-padding-6":"_5BDNpB","v-padding-8":"wo-A43","v-padding-9":"Ls2EKS","v-padding-11":"H8vl9-","v-padding-12":"xC1pJD","v-padding-14":"ss3TWa","v-padding-15":"Ya76--","v-padding-17":"GfKFnD","v-padding-18":"jnpobl","v-padding-23":"MTOI1d","v-padding-24":"OKY02H","lineHeight12":"gnqeJP","lineHeight18":"_0HeJOH","lineHeight24":"z17ViQ","lineHeight30":"PPpLg-","fontSize10":"JgKxV2","fontSize12":"rvvp2r","fontSize14":"br99be","fontSize16":"AAZdm3","fontSize18":"piDdw-","fontSize24":"ElLMBx","vPadding2":"_7SkLfV","vPadding3":"b7eiDk","vPadding5":"dFlWDe","vPadding6":"_5BDNpB","vPadding8":"wo-A43","vPadding9":"Ls2EKS","vPadding11":"H8vl9-","vPadding12":"xC1pJD","vPadding14":"ss3TWa","vPadding15":"Ya76--","vPadding17":"GfKFnD","vPadding18":"jnpobl","vPadding23":"MTOI1d","vPadding24":"OKY02H"};
|
|
3148
|
-
|
|
3149
|
-
const defaultTextSettings = {
|
|
3150
|
-
18: { lineHeight: 12, fontSize: 10 },
|
|
3151
|
-
24: { lineHeight: 18, fontSize: 12 },
|
|
3152
|
-
30: { lineHeight: 18, fontSize: 14 },
|
|
3153
|
-
36: { lineHeight: 18, fontSize: 14 },
|
|
3154
|
-
42: { lineHeight: 24, fontSize: 16 },
|
|
3155
|
-
48: { lineHeight: 24, fontSize: 16 },
|
|
3156
|
-
60: { lineHeight: 30, fontSize: 24 },
|
|
3157
|
-
};
|
|
3158
|
-
function getTextClasses(props, border) {
|
|
3159
|
-
if (props.size === 'none') {
|
|
3160
|
-
return [css$u['line-height-' + props.lineHeight], css$u['font-size-' + props.fontSize]];
|
|
3161
|
-
}
|
|
3162
|
-
const setting = {
|
|
3163
|
-
size: props.size,
|
|
3164
|
-
lineHeight: props.lineHeight || defaultTextSettings[props.size].lineHeight,
|
|
3165
|
-
fontSize: props.fontSize || defaultTextSettings[props.size].fontSize,
|
|
3166
|
-
};
|
|
3167
|
-
const vPadding = (+setting.size - +setting.lineHeight - (border ? 2 : 0)) / 2;
|
|
3168
|
-
return [
|
|
3169
|
-
css$u['line-height-' + setting.lineHeight], css$u['font-size-' + setting.fontSize], css$u['v-padding-' + vPadding],
|
|
3170
|
-
];
|
|
3171
|
-
}
|
|
3172
|
-
|
|
3173
|
-
var css$t = {"root":"KPE1S0"};
|
|
3174
|
-
|
|
3175
|
-
const allTextColors = ['info', 'warning', 'error', 'success', 'brand', 'primary', 'secondary', 'disabled', 'contrast', 'white'];
|
|
3176
|
-
function applyTextMods(mods) {
|
|
3177
|
-
const textClasses = getTextClasses({
|
|
3178
|
-
size: mods.size || '36',
|
|
3179
|
-
lineHeight: mods.lineHeight,
|
|
3180
|
-
fontSize: mods.fontSize,
|
|
3181
|
-
}, false);
|
|
3182
|
-
return [
|
|
3183
|
-
css$t.root,
|
|
3184
|
-
'uui-text',
|
|
3185
|
-
`uui-font-${mods.font || 'regular'}`,
|
|
3186
|
-
`uui-color-${mods.color || 'primary'}`,
|
|
3187
|
-
].concat(textClasses);
|
|
3188
|
-
}
|
|
3189
|
-
const Text = uuiCore.withMods(uuiComponents.Text, applyTextMods);
|
|
3190
|
-
|
|
3191
|
-
var css$s = {"root":"_7AQCfe","loading-word":"YIb4i7","animated-loading":"CkgQRN","skeleton_loading":"_4yi-7n","loadingWord":"YIb4i7","animatedLoading":"CkgQRN","skeletonLoading":"_4yi-7n"};
|
|
3192
|
-
|
|
3193
|
-
const TextPlaceholder = (props) => {
|
|
3194
|
-
const pattern = ' ';
|
|
3195
|
-
const text = React__namespace.useMemo(() => {
|
|
3196
|
-
const words = [];
|
|
3197
|
-
for (let i = 0; i < (props.wordsCount || 1); i++) {
|
|
3198
|
-
const lengthWord = Math.floor(Math.random() * 10 + 8);
|
|
3199
|
-
words.push(pattern.repeat(lengthWord));
|
|
3200
|
-
}
|
|
3201
|
-
return words;
|
|
3202
|
-
}, [props.wordsCount]);
|
|
3203
|
-
return (React__namespace.createElement("div", Object.assign({ "aria-busy": true, className: css$s.root }, props.rawProps), text.map((it, index) => (React__namespace.createElement("span", { key: index, className: cx__default.default([
|
|
3204
|
-
props.cx, css$s.loadingWord, !props.isNotAnimated && css$s.animatedLoading,
|
|
3205
|
-
]), dangerouslySetInnerHTML: { __html: it } })))));
|
|
3206
|
-
};
|
|
3207
|
-
|
|
3208
|
-
var style = {"typography-16":"baqGMN","typography-14":"kYwine","typography-12":"LK33w5","typography-uui":"thGQKK","typography16":"baqGMN","typography14":"kYwine","typography12":"LK33w5","typographyUui":"thGQKK"};
|
|
3209
|
-
|
|
3210
|
-
const RichTextView = uuiCore.withMods(uuiComponents.RichTextView, (mods) => [style.typographyUui, style['typography-' + (mods.size || '14')]]);
|
|
3211
|
-
|
|
3212
|
-
var css$r = {"root":"e34c9h","modal-blocker":"PU3pdT","animateModalBlocker":"FKW2w-","modal":"ooxJvl","modal-footer":"j5BDA4","border-top":"O-IL2R","modal-header":"_88B-pu","modalBlocker":"PU3pdT","modalFooter":"j5BDA4","borderTop":"O-IL2R","modalHeader":"_88B-pu"};
|
|
3213
|
-
|
|
3214
|
-
const ModalBlocker = uuiCore.withMods(uuiComponents.ModalBlocker, () => [css$r.modalBlocker]);
|
|
3215
|
-
const ModalWindow = uuiCore.withMods(uuiComponents.ModalWindow, () => [css$r.root, css$r.modal], (props) => ({
|
|
3216
|
-
style: Object.assign(Object.assign({}, props.style), { width: `${props.width || 420}px`, height: props.height ? `${props.height}px` : 'auto' }),
|
|
3217
|
-
}));
|
|
3218
|
-
class ModalHeader extends React__namespace.Component {
|
|
3219
|
-
render() {
|
|
3220
|
-
return (React__namespace.createElement(FlexRow, { padding: this.props.padding || '24', vPadding: "12", borderBottom: this.props.borderBottom, cx: [css$r.root, css$r.modalHeader, this.props.cx], spacing: "12", rawProps: this.props.rawProps },
|
|
3221
|
-
this.props.title && (React__namespace.createElement(Text, { size: "48", fontSize: "18", font: "semibold" }, this.props.title)),
|
|
3222
|
-
this.props.children,
|
|
3223
|
-
this.props.onClose && React__namespace.createElement(uuiComponents.FlexSpacer, null),
|
|
3224
|
-
this.props.onClose && (React__namespace.createElement(FlexCell, { shrink: 0, width: "auto" },
|
|
3225
|
-
React__namespace.createElement(IconButton, { rawProps: { 'aria-label': 'Close modal' }, icon: ForwardRef$D, onClick: this.props.onClose })))));
|
|
3226
|
-
}
|
|
3227
|
-
}
|
|
3228
|
-
class ModalFooter extends React__namespace.Component {
|
|
3229
|
-
render() {
|
|
3230
|
-
return (React__namespace.createElement(FlexRow, { spacing: this.props.spacing || '12', cx: [
|
|
3231
|
-
css$r.root,
|
|
3232
|
-
css$r.modalFooter,
|
|
3233
|
-
this.props.borderTop && css$r.borderTop,
|
|
3234
|
-
this.props.cx,
|
|
3235
|
-
], padding: this.props.padding || '24', vPadding: this.props.vPadding || '24', rawProps: this.props.rawProps }, this.props.children));
|
|
3236
|
-
}
|
|
3237
|
-
}
|
|
3238
|
-
|
|
3239
|
-
var _path$i;
|
|
3240
|
-
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
3241
|
-
var SvgCross = function SvgCross(props, ref) {
|
|
3242
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
3243
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3244
|
-
width: 24,
|
|
3245
|
-
height: 24,
|
|
3246
|
-
viewBox: "0 0 24 24",
|
|
3247
|
-
ref: ref
|
|
3248
|
-
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3249
|
-
fillRule: "evenodd",
|
|
3250
|
-
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
3251
|
-
})));
|
|
3252
|
-
};
|
|
3253
|
-
var ForwardRef$j = /*#__PURE__*/React.forwardRef(SvgCross);
|
|
3254
|
-
|
|
3255
|
-
var css$q = {"root":"_2wFC-r","icon-wrapper":"FTaOnv","action-wrapper":"KE9vxb","action-link":"I0ZjlW","close-icon":"jlecMO","main-path":"ZhsbwQ","content":"O5KPzs","clear-button":"jcBccY","close-wrapper":"cIIH5i","iconWrapper":"FTaOnv","actionWrapper":"KE9vxb","actionLink":"I0ZjlW","closeIcon":"jlecMO","mainPath":"ZhsbwQ","clearButton":"jcBccY","closeWrapper":"cIIH5i"};
|
|
3256
|
-
|
|
3257
|
-
const NotificationCard = React__namespace.default.forwardRef((props, ref) => {
|
|
3258
|
-
const notificationCardNode = React__namespace.default.useRef(null);
|
|
3259
|
-
React__namespace.default.useImperativeHandle(ref, () => notificationCardNode.current, [notificationCardNode.current]);
|
|
3260
|
-
React__namespace.default.useLayoutEffect(() => {
|
|
3261
|
-
var _a, _b;
|
|
3262
|
-
(_a = notificationCardNode.current) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', props.clearTimer);
|
|
3263
|
-
(_b = notificationCardNode.current) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', props.refreshTimer);
|
|
3264
|
-
return () => {
|
|
3265
|
-
var _a, _b;
|
|
3266
|
-
(_a = notificationCardNode.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', props.clearTimer);
|
|
3267
|
-
(_b = notificationCardNode.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', props.refreshTimer);
|
|
3268
|
-
};
|
|
3269
|
-
}, []);
|
|
3270
|
-
return (React__namespace.default.createElement("div", Object.assign({ role: "alert", className: cx__default.default('uui-notification_card', props.color && `uui-color-${props.color}`, css$q.root, props.cx), ref: notificationCardNode }, props.rawProps),
|
|
3271
|
-
React__namespace.default.createElement("div", { className: css$q.mainPath },
|
|
3272
|
-
props.icon && (React__namespace.default.createElement("div", { className: css$q.iconWrapper },
|
|
3273
|
-
React__namespace.default.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$q.actionIcon }))),
|
|
3274
|
-
React__namespace.default.createElement("div", { className: css$q.content },
|
|
3275
|
-
props.children,
|
|
3276
|
-
props.actions && (React__namespace.default.createElement("div", { className: css$q.actionWrapper }, props.actions.map((action) => (React__namespace.default.createElement(LinkButton, { caption: action.name, onClick: action.action, key: action.name, cx: css$q.actionLink, size: "36", rawProps: action.rawProps })))))),
|
|
3277
|
-
props.onClose && (React__namespace.default.createElement("div", { className: css$q.closeWrapper },
|
|
3278
|
-
React__namespace.default.createElement(IconButton, { icon: ForwardRef$j, color: "neutral", onClick: props.onClose, cx: css$q.closeIcon }))))));
|
|
3279
|
-
});
|
|
3280
|
-
const WarningNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$G, color: "warning" }, props, { ref: ref, cx: props.cx }))));
|
|
3281
|
-
const SuccessNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$H, color: "success" }, props, { ref: ref, cx: props.cx }))));
|
|
3282
|
-
const HintNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$E, color: "info" }, props, { ref: ref, cx: props.cx }))));
|
|
3283
|
-
const ErrorNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$F, color: "error" }, props, { ref: ref, cx: props.cx }))));
|
|
3284
|
-
class ClearNotification extends React__namespace.default.Component {
|
|
3285
|
-
render() {
|
|
3286
|
-
return (React__namespace.default.createElement("div", { className: cx__default.default(css$q.notificationWrapper, css$q.clearButton) },
|
|
3287
|
-
React__namespace.default.createElement(LinkButton, { caption: i18n.notificationCard.closeAllNotificationsButton, onClick: () => this.context.uuiNotifications.clearAll() })));
|
|
3288
|
-
}
|
|
3289
|
-
}
|
|
3290
|
-
ClearNotification.contextType = uuiCore.UuiContext;
|
|
3291
|
-
|
|
3292
|
-
class ConfirmationModal extends React__namespace.Component {
|
|
3293
|
-
render() {
|
|
3294
|
-
let bodyContent;
|
|
3295
|
-
if (this.props.bodyContent) {
|
|
3296
|
-
bodyContent = React__namespace.createElement(Panel, { background: "surface", margin: "24" }, this.props.bodyContent);
|
|
3297
|
-
}
|
|
3298
|
-
return (React__namespace.createElement(ModalBlocker, Object.assign({}, this.props),
|
|
3299
|
-
React__namespace.createElement(ModalWindow, { width: 420 },
|
|
3300
|
-
React__namespace.createElement(ModalHeader, { borderBottom: true, title: this.props.caption, onClose: () => this.props.abort() }),
|
|
3301
|
-
React__namespace.createElement(ScrollBars, null, bodyContent),
|
|
3302
|
-
React__namespace.createElement(ModalFooter, null,
|
|
3303
|
-
React__namespace.createElement(uuiComponents.FlexSpacer, null),
|
|
3304
|
-
this.props.hideCancelButton || (React__namespace.createElement(Button, { caption: i18n.form.modals.discardButton, onClick: () => this.props.success(false), fill: "outline", color: "secondary" })),
|
|
3305
|
-
React__namespace.createElement(Button, { caption: i18n.form.modals.saveButton, onClick: () => this.props.success(true), color: "accent" })))));
|
|
3306
|
-
}
|
|
3307
|
-
}
|
|
3308
|
-
|
|
3309
|
-
const defaultMode = exports.EditMode.FORM;
|
|
3310
|
-
class DatePicker extends uuiComponents.BaseDatePicker {
|
|
3311
|
-
constructor() {
|
|
3312
|
-
super(...arguments);
|
|
3313
|
-
this.renderInput = (props) => {
|
|
3314
|
-
var _a;
|
|
3315
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3316
|
-
if (this.props.size === '48') {
|
|
3317
|
-
uuiCore.devLogger.warnAboutDeprecatedPropValue({
|
|
3318
|
-
component: 'DatePicker',
|
|
3319
|
-
propName: 'size',
|
|
3320
|
-
propValue: this.props.size,
|
|
3321
|
-
propValueUseInstead: '42',
|
|
3322
|
-
condition: () => ['48'].indexOf(this.props.size) !== -1,
|
|
3323
|
-
});
|
|
3324
|
-
}
|
|
3325
|
-
}
|
|
3326
|
-
return (React__namespace.default.createElement(TextInput, Object.assign({}, props, { onClick: null, isDropdown: false, cx: uuiCore.cx(this.props.inputCx, this.state.isOpen && uuiCore.uuiMod.focus), icon: this.props.mode !== exports.EditMode.CELL && systemIcons[this.props.size || '36'].calendar, iconPosition: this.props.iconPosition || 'left', placeholder: this.props.placeholder ? this.props.placeholder : this.getFormat(), size: this.props.size || '36', value: this.state.inputValue, onValueChange: this.handleInputChange, onCancel: this.props.disableClear || !this.state.inputValue ? undefined : this.handleCancel, isInvalid: this.props.isInvalid, isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, tabIndex: this.props.isReadonly || this.props.isDisabled ? -1 : 0, onFocus: this.handleFocus, onBlur: this.handleBlur, mode: this.props.mode || defaultMode, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.input })));
|
|
3327
|
-
};
|
|
3328
|
-
}
|
|
3329
|
-
renderBody(props) {
|
|
3330
|
-
var _a, _b, _c;
|
|
3331
|
-
return (React__namespace.default.createElement(DropdownContainer, Object.assign({}, props, { focusLock: false }),
|
|
3332
|
-
React__namespace.default.createElement(DatePickerBody, { cx: uuiCore.cx(this.props.bodyCx), filter: this.props.filter, value: this.getValue(), setSelectedDate: this.setSelectedDate, setDisplayedDateAndView: this.setDisplayedDateAndView, changeIsOpen: this.onToggle, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.body }), (_c = (_b = this.props).renderFooter) === null || _c === void 0 ? void 0 :
|
|
3333
|
-
_c.call(_b)));
|
|
3334
|
-
}
|
|
3335
|
-
}
|
|
3336
|
-
|
|
3337
|
-
var css$p = {"root":"_8x08oa"};
|
|
3338
|
-
|
|
3339
|
-
function applyCalendarPresetsMods() {
|
|
3340
|
-
return [css$p.root];
|
|
3341
|
-
}
|
|
3342
|
-
const CalendarPresets = uuiCore.withMods(uuiComponents.CalendarPresets, applyCalendarPresetsMods, () => ({}));
|
|
3343
|
-
|
|
3344
|
-
var css$o = {"root":"_7aHaaq","container":"_1tEewG","day-selection":"s4B1Su","from-picker":"_3Acw2X","to-picker":"ZxJ3Lm","bodes-wrapper":"jKftgh","blocker":"jQiH5d","daySelection":"s4B1Su","fromPicker":"_3Acw2X","toPicker":"ZxJ3Lm","bodesWrapper":"jKftgh"};
|
|
3345
|
-
|
|
3346
|
-
dayjs__default.default.extend(isoWeek__default.default);
|
|
3347
|
-
function weekCount(displayedDate) {
|
|
3348
|
-
let days = [];
|
|
3349
|
-
const dayOfLastWeekInPrevMonth = displayedDate.subtract(1, 'month').endOf('month').day();
|
|
3350
|
-
days = days.concat(new Array(dayOfLastWeekInPrevMonth).fill(undefined));
|
|
3351
|
-
// get days of current month
|
|
3352
|
-
days = days.concat(new Array(displayedDate.endOf('month').date()).fill(undefined));
|
|
3353
|
-
return uuiCore.arrayToMatrix(days, 7).length;
|
|
3354
|
-
}
|
|
3355
|
-
const uuiRangeDatePickerBody = {
|
|
3356
|
-
inRange: 'uui-range-datepicker-in-range',
|
|
3357
|
-
firstDayInRangeWrapper: 'uui-range-datepicker-first-day-in-range-wrapper',
|
|
3358
|
-
lastDayInRangeWrapper: 'uui-range-datepicker-last-day-in-range-wrapper',
|
|
3359
|
-
separator: 'uui-range-datepicker-separator',
|
|
3360
|
-
};
|
|
3361
|
-
const rangeDatePickerPresets = {
|
|
3362
|
-
today: {
|
|
3363
|
-
name: 'Today',
|
|
3364
|
-
getRange: () => ({ from: dayjs__default.default().toString(), to: undefined, order: 1 }),
|
|
3365
|
-
},
|
|
3366
|
-
thisWeek: {
|
|
3367
|
-
name: 'This Week',
|
|
3368
|
-
getRange: () => ({ from: dayjs__default.default().startOf('isoWeek').toString(), to: dayjs__default.default().endOf('isoWeek').toString(), order: 2 }),
|
|
3369
|
-
},
|
|
3370
|
-
lastWeek: {
|
|
3371
|
-
name: 'Last Week',
|
|
3372
|
-
getRange: () => ({ from: dayjs__default.default().startOf('isoWeek').subtract(1, 'week').toString(), to: dayjs__default.default().endOf('isoWeek').subtract(1, 'week').toString(), order: 3 }),
|
|
3373
|
-
},
|
|
3374
|
-
thisMonth: {
|
|
3375
|
-
name: 'This Month',
|
|
3376
|
-
getRange: () => ({ from: dayjs__default.default().startOf('month').toString(), to: dayjs__default.default().endOf('month').toString(), order: 4 }),
|
|
3377
|
-
},
|
|
3378
|
-
lastMonth: {
|
|
3379
|
-
name: 'Last Month',
|
|
3380
|
-
getRange: () => ({ from: dayjs__default.default().startOf('month').subtract(1, 'month').toString(), to: dayjs__default.default().subtract(1, 'month').endOf('month').toString(), order: 5 }),
|
|
3381
|
-
},
|
|
3382
|
-
last3Month: {
|
|
3383
|
-
name: 'Last 3 Months',
|
|
3384
|
-
getRange: () => ({ from: dayjs__default.default().startOf('month').subtract(3, 'month').toString(), to: dayjs__default.default().subtract(1, 'month').endOf('month').toString(), order: 5 }),
|
|
3385
|
-
},
|
|
3386
|
-
thisYear: {
|
|
3387
|
-
name: 'This Year',
|
|
3388
|
-
getRange: () => ({ from: dayjs__default.default().startOf('year').toString(), to: dayjs__default.default().endOf('year').toString(), order: 7 }),
|
|
3389
|
-
},
|
|
3390
|
-
lastYear: {
|
|
3391
|
-
name: 'Last Year',
|
|
3392
|
-
getRange: () => ({ from: dayjs__default.default().startOf('year').subtract(1, 'year').toString(), to: dayjs__default.default().subtract(1, 'year').endOf('year').toString(), order: 8 }),
|
|
3393
|
-
},
|
|
3394
|
-
};
|
|
3395
|
-
class RangeDatePickerBody extends React__namespace.Component {
|
|
3396
|
-
constructor() {
|
|
3397
|
-
super(...arguments);
|
|
3398
|
-
this.state = {
|
|
3399
|
-
activePart: null,
|
|
3400
|
-
};
|
|
3401
|
-
this.getDayCX = (day) => {
|
|
3402
|
-
var _a, _b;
|
|
3403
|
-
const dayValue = day.valueOf();
|
|
3404
|
-
const fromValue = ((_a = this.props.value) === null || _a === void 0 ? void 0 : _a.selectedDate.from) ? dayjs__default.default(this.props.value.selectedDate.from).valueOf() : null;
|
|
3405
|
-
const toValue = ((_b = this.props.value) === null || _b === void 0 ? void 0 : _b.selectedDate.to) ? dayjs__default.default(this.props.value.selectedDate.to).valueOf() : null;
|
|
3406
|
-
const inRange = dayValue >= fromValue && dayValue <= toValue && fromValue !== toValue && fromValue && toValue;
|
|
3407
|
-
const isFirst = dayValue === fromValue;
|
|
3408
|
-
const isLast = dayValue === toValue;
|
|
3409
|
-
return [
|
|
3410
|
-
inRange && uuiRangeDatePickerBody.inRange,
|
|
3411
|
-
isFirst && uuiRangeDatePickerBody.firstDayInRangeWrapper,
|
|
3412
|
-
!inRange && isFirst && uuiRangeDatePickerBody.lastDayInRangeWrapper,
|
|
3413
|
-
isLast && uuiRangeDatePickerBody.lastDayInRangeWrapper,
|
|
3414
|
-
!inRange && isLast && uuiRangeDatePickerBody.firstDayInRangeWrapper,
|
|
3415
|
-
(dayValue === fromValue || dayValue === toValue) && uuiComponents.uuiDaySelection.selectedDay,
|
|
3416
|
-
];
|
|
3417
|
-
};
|
|
3418
|
-
this.getFromValue = () => {
|
|
3419
|
-
var _a;
|
|
3420
|
-
return Object.assign(Object.assign({}, this.props.value), { view: this.state.activePart === 'from' ? this.props.value.view : 'DAY_SELECTION', selectedDate: (_a = this.props.value) === null || _a === void 0 ? void 0 : _a.selectedDate.from });
|
|
3421
|
-
};
|
|
3422
|
-
this.getToValue = () => {
|
|
3423
|
-
if (!this.props.value)
|
|
3424
|
-
return;
|
|
3425
|
-
return Object.assign(Object.assign({}, this.props.value), { view: this.state.activePart === 'to' ? this.props.value.view : 'DAY_SELECTION', displayedDate: this.props.value.displayedDate.add(1, 'month'), selectedDate: this.props.value.selectedDate.to });
|
|
3426
|
-
};
|
|
3427
|
-
this.renderPresets = () => {
|
|
3428
|
-
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
3429
|
-
React__namespace.createElement("div", { className: uuiRangeDatePickerBody.separator }),
|
|
3430
|
-
React__namespace.createElement(CalendarPresets, { forwardedRef: this.props.forwardedRef, onPresetSet: (presetVal) => {
|
|
3431
|
-
this.props.onValueChange({
|
|
3432
|
-
view: 'DAY_SELECTION',
|
|
3433
|
-
selectedDate: { from: dayjs__default.default(presetVal.from).format(uuiComponents.valueFormat), to: dayjs__default.default(presetVal.to).format(uuiComponents.valueFormat) },
|
|
3434
|
-
displayedDate: dayjs__default.default(presetVal.from),
|
|
3435
|
-
});
|
|
3436
|
-
this.props.changeIsOpen(false);
|
|
3437
|
-
}, presets: this.props.presets })));
|
|
3438
|
-
};
|
|
3439
|
-
this.renderDatePicker = () => {
|
|
3440
|
-
var _a, _b;
|
|
3441
|
-
return (React__namespace.createElement(FlexRow, { cx: [((_a = this.props.value) === null || _a === void 0 ? void 0 : _a.view) === 'DAY_SELECTION' && css$o.daySelection, css$o.container], alignItems: "top" },
|
|
3442
|
-
React__namespace.createElement(FlexCell, { width: "auto" },
|
|
3443
|
-
React__namespace.createElement(FlexRow, null,
|
|
3444
|
-
React__namespace.createElement(FlexRow, { cx: css$o.bodesWrapper, alignItems: "top" },
|
|
3445
|
-
React__namespace.createElement(DatePickerBody, { cx: uuiCore.cx(css$o.fromPicker), setSelectedDate: (nv) => this.setSelectedDate(nv), value: this.getFromValue(), setDisplayedDateAndView: (displayedDate, view) => this.setDisplayedDateAndView(displayedDate, view, 'from'), getDayCX: this.getDayCX, filter: this.props.filter, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday }),
|
|
3446
|
-
React__namespace.createElement(DatePickerBody, { cx: uuiCore.cx(css$o.toPicker), setSelectedDate: (nv) => this.setSelectedDate(nv), value: this.getToValue(), setDisplayedDateAndView: (displayedDate, view) => this.setDisplayedDateAndView(displayedDate, view, 'to'), getDayCX: this.getDayCX, filter: this.props.filter, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday }),
|
|
3447
|
-
((_b = this.props.value) === null || _b === void 0 ? void 0 : _b.view) !== 'DAY_SELECTION' && (React__namespace.createElement("div", { style: {
|
|
3448
|
-
left: this.state.activePart === 'from' && '50%',
|
|
3449
|
-
right: this.state.activePart === 'to' && '50%',
|
|
3450
|
-
}, className: css$o.blocker }))),
|
|
3451
|
-
this.props.presets && this.renderPresets()),
|
|
3452
|
-
this.props.renderFooter && this.props.renderFooter())));
|
|
3453
|
-
};
|
|
3454
|
-
}
|
|
3455
|
-
getRange(selectedDate) {
|
|
3456
|
-
const newRange = { from: null, to: null };
|
|
3457
|
-
const currentRange = this.props.value.selectedDate;
|
|
3458
|
-
if (!this.props.filter || this.props.filter(dayjs__default.default(selectedDate))) {
|
|
3459
|
-
if (this.props.focusPart === 'from') {
|
|
3460
|
-
if (dayjs__default.default(selectedDate).valueOf() <= dayjs__default.default(currentRange.to).valueOf()) {
|
|
3461
|
-
newRange.from = selectedDate;
|
|
3462
|
-
newRange.to = currentRange.to;
|
|
3463
|
-
}
|
|
3464
|
-
else {
|
|
3465
|
-
newRange.from = selectedDate;
|
|
3466
|
-
newRange.to = null;
|
|
3467
|
-
}
|
|
3468
|
-
}
|
|
3469
|
-
if (this.props.focusPart === 'to') {
|
|
3470
|
-
if (!currentRange.from) {
|
|
3471
|
-
newRange.to = selectedDate;
|
|
3472
|
-
}
|
|
3473
|
-
else if (dayjs__default.default(selectedDate).valueOf() >= dayjs__default.default(currentRange.from).valueOf()) {
|
|
3474
|
-
newRange.from = currentRange.from;
|
|
3475
|
-
newRange.to = selectedDate;
|
|
3476
|
-
}
|
|
3477
|
-
else {
|
|
3478
|
-
newRange.from = selectedDate;
|
|
3479
|
-
newRange.to = null;
|
|
3480
|
-
}
|
|
3481
|
-
}
|
|
3482
|
-
}
|
|
3483
|
-
return newRange;
|
|
3484
|
-
}
|
|
3485
|
-
setSelectedDate(selectedDate) {
|
|
3486
|
-
const range = this.getRange(selectedDate);
|
|
3487
|
-
this.props.onValueChange(Object.assign(Object.assign({}, this.props.value), { selectedDate: range }));
|
|
3488
|
-
if (range.from && range.to && this.props.focusPart === 'to') {
|
|
3489
|
-
this.props.changeIsOpen(false);
|
|
3316
|
+
});
|
|
3490
3317
|
}
|
|
3491
3318
|
}
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
}
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
class RangeDatePicker extends uuiComponents.BaseRangeDatePicker {
|
|
3509
|
-
constructor() {
|
|
3510
|
-
super(...arguments);
|
|
3511
|
-
this.renderInput = (props) => {
|
|
3319
|
+
return result;
|
|
3320
|
+
};
|
|
3321
|
+
function FiltersToolbarImpl(props) {
|
|
3322
|
+
const { filters, tableState, setTableState } = props;
|
|
3323
|
+
const [newFilterId, setNewFilterId] = React.useState(null);
|
|
3324
|
+
const dataSource = uuiCore.useArrayDataSource({
|
|
3325
|
+
items: filters,
|
|
3326
|
+
getId: (item) => item.field,
|
|
3327
|
+
}, []);
|
|
3328
|
+
const onFiltersChange = (updatedFilters) => {
|
|
3329
|
+
var _a;
|
|
3330
|
+
const newConfig = {};
|
|
3331
|
+
const newFilter = {};
|
|
3332
|
+
const sortedOrders = tableState.filtersConfig && sortBy__default.default(tableState.filtersConfig, (f) => f === null || f === void 0 ? void 0 : f.order);
|
|
3333
|
+
let lastItemOrder = (sortedOrders === null || sortedOrders === void 0 ? void 0 : sortedOrders.length) ? (_a = sortedOrders[sortedOrders.length - 1]) === null || _a === void 0 ? void 0 : _a.order : null;
|
|
3334
|
+
updatedFilters.forEach((filter) => {
|
|
3512
3335
|
var _a, _b;
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
propName: 'size',
|
|
3518
|
-
propValue: this.props.size,
|
|
3519
|
-
propValueUseInstead: '42',
|
|
3520
|
-
condition: () => ['48'].indexOf(this.props.size) !== -1,
|
|
3521
|
-
});
|
|
3522
|
-
}
|
|
3336
|
+
let order = (_b = (_a = tableState === null || tableState === void 0 ? void 0 : tableState.filtersConfig) === null || _a === void 0 ? void 0 : _a[filter === null || filter === void 0 ? void 0 : filter.field]) === null || _b === void 0 ? void 0 : _b.order;
|
|
3337
|
+
if (!order) {
|
|
3338
|
+
order = uuiCore.getOrderBetween(lastItemOrder, null);
|
|
3339
|
+
lastItemOrder = order;
|
|
3523
3340
|
}
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3341
|
+
newConfig[filter.field] = { isVisible: true, order: order };
|
|
3342
|
+
// Remove unselected filters from filter object
|
|
3343
|
+
if (tableState.filter) {
|
|
3344
|
+
newFilter[filter.field] = tableState.filter[filter.field];
|
|
3345
|
+
}
|
|
3346
|
+
});
|
|
3347
|
+
setTableState(Object.assign(Object.assign({}, tableState), { filtersConfig: newConfig, filter: newFilter }));
|
|
3348
|
+
};
|
|
3349
|
+
const handleFilterChange = (newFilter) => {
|
|
3350
|
+
const filter = normalizeFilterWithPredicates(Object.assign(Object.assign({}, tableState.filter), newFilter));
|
|
3351
|
+
setTableState(Object.assign(Object.assign({}, tableState), { filter: filter }));
|
|
3352
|
+
};
|
|
3353
|
+
const removeFilter = (field) => {
|
|
3354
|
+
const filterConfig = Object.assign({}, tableState.filtersConfig);
|
|
3355
|
+
delete filterConfig[field];
|
|
3356
|
+
const filter = Object.assign({}, tableState.filter);
|
|
3357
|
+
delete filter[field];
|
|
3358
|
+
const newTableState = Object.assign(Object.assign({}, tableState), { filtersConfig: filterConfig, filter: filter });
|
|
3359
|
+
setTableState(Object.assign({}, newTableState));
|
|
3360
|
+
};
|
|
3361
|
+
const selectedFilters = React.useMemo(() => {
|
|
3362
|
+
const filtersConfig = tableState.filtersConfig || {};
|
|
3363
|
+
return filters.filter((filter) => {
|
|
3364
|
+
return filter.isAlwaysVisible || (filtersConfig[filter === null || filter === void 0 ? void 0 : filter.field] ? filtersConfig[filter === null || filter === void 0 ? void 0 : filter.field].isVisible : false);
|
|
3365
|
+
});
|
|
3366
|
+
}, [tableState.filtersConfig, filters]);
|
|
3367
|
+
const sortedActiveFilters = React.useMemo(() => {
|
|
3368
|
+
return sortBy__default.default(selectedFilters, (f) => { var _a, _b; return (_b = (_a = tableState.filtersConfig) === null || _a === void 0 ? void 0 : _a[f.field]) === null || _b === void 0 ? void 0 : _b.order; });
|
|
3369
|
+
}, [filters, tableState.filtersConfig]);
|
|
3370
|
+
const renderAddFilterToggler = React.useCallback((togglerProps) => {
|
|
3531
3371
|
var _a;
|
|
3532
|
-
return (React__namespace.createElement(
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3372
|
+
return (React__namespace.default.createElement(Button, { size: (_a = props.size) !== null && _a !== void 0 ? _a : '36', onClick: togglerProps.onClick, ref: togglerProps.ref, caption: i18n.filterToolbar.addCaption, icon: ForwardRef$m, iconPosition: "left", mode: "ghost", color: "primary" }));
|
|
3373
|
+
}, []);
|
|
3374
|
+
const getRowOptions = React.useCallback((item) => ({
|
|
3375
|
+
isDisabled: item.isAlwaysVisible,
|
|
3376
|
+
checkbox: {
|
|
3377
|
+
isVisible: true,
|
|
3378
|
+
isDisabled: item.isAlwaysVisible,
|
|
3379
|
+
},
|
|
3380
|
+
}), []);
|
|
3381
|
+
const isAllFiltersAlwaysVisible = props.filters.every((i) => i.isAlwaysVisible);
|
|
3382
|
+
React.useEffect(() => {
|
|
3383
|
+
// Reset new filter id, after first render with autofocus
|
|
3384
|
+
setNewFilterId(null);
|
|
3385
|
+
}, [newFilterId]);
|
|
3386
|
+
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
3387
|
+
sortedActiveFilters.map((f) => {
|
|
3388
|
+
var _a;
|
|
3389
|
+
return (React__namespace.default.createElement(uuiComponents.FlexCell, { width: "auto", key: f.field },
|
|
3390
|
+
React__namespace.default.createElement(FiltersPanelItem, Object.assign({}, f, { value: (_a = tableState.filter) === null || _a === void 0 ? void 0 : _a[f.field], onValueChange: handleFilterChange, key: f.field, autoFocus: newFilterId === f.field, removeFilter: removeFilter, size: props.size }))));
|
|
3391
|
+
}),
|
|
3392
|
+
!isAllFiltersAlwaysVisible && (React__namespace.default.createElement(PickerInput, { dataSource: dataSource, value: selectedFilters, onValueChange: onFiltersChange, selectionMode: "multi", valueType: "entity", key: newFilterId, renderRow: (props) => (React__namespace.default.createElement(DataPickerRow, Object.assign({}, props, { padding: "12", key: props.key, onCheck: (row) => {
|
|
3393
|
+
props.onCheck && props.onCheck(row);
|
|
3394
|
+
!row.isChecked && setNewFilterId(row.value.field);
|
|
3395
|
+
}, renderItem: (item, rowProps) => React__namespace.default.createElement(PickerItem, Object.assign({}, rowProps, { title: item.title })) }))), getName: (i) => i.title, renderToggler: renderAddFilterToggler, emptyValue: [], getRowOptions: getRowOptions, fixedBodyPosition: true, size: props.size }))));
|
|
3536
3396
|
}
|
|
3397
|
+
const FiltersPanel = React__namespace.default.memo(FiltersToolbarImpl);
|
|
3537
3398
|
|
|
3538
|
-
var css$
|
|
3539
|
-
|
|
3540
|
-
function DropMarker(props) {
|
|
3541
|
-
return props.isDndInProgress
|
|
3542
|
-
? (React__namespace.createElement(React__namespace.Fragment, null,
|
|
3543
|
-
props.enableBlocker && React__namespace.createElement("div", { className: css$m.blocker }),
|
|
3544
|
-
React__namespace.createElement("div", { className: cx__default.default([
|
|
3545
|
-
css$m.root,
|
|
3546
|
-
css$m.marker,
|
|
3547
|
-
css$m[props.position],
|
|
3548
|
-
props === null || props === void 0 ? void 0 : props.cx,
|
|
3549
|
-
]) })))
|
|
3550
|
-
: null;
|
|
3551
|
-
}
|
|
3399
|
+
var css$k = {"divider":"ViO5Ui","dropdownDeleteIcon":"VLo8Eq","presetsWrapper":"NnBDHP","addPresetContainer":"fEi85a","dropContainer":"m3Yye8"};
|
|
3552
3400
|
|
|
3553
|
-
var css$
|
|
3401
|
+
var css$j = {"preset-dropdown-panel":"cd8A-U","delete-row":"C1ak5F","delete-button":"_30E8-h","targetOpen":"FxZ22v","presetDropdownPanel":"cd8A-U","deleteRow":"C1ak5F","deleteButton":"_30E8-h"};
|
|
3554
3402
|
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3403
|
+
var _path$k;
|
|
3404
|
+
function _extends$l() { _extends$l = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
|
|
3405
|
+
var SvgNavigationMoreVert18 = function SvgNavigationMoreVert18(props, ref) {
|
|
3406
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
3407
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3408
|
+
width: 18,
|
|
3409
|
+
height: 18,
|
|
3410
|
+
viewBox: "0 0 18 18",
|
|
3411
|
+
ref: ref
|
|
3412
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3413
|
+
fillRule: "evenodd",
|
|
3414
|
+
d: "M9 6c.825 0 1.5-.675 1.5-1.5S9.825 3 9 3s-1.5.675-1.5 1.5S8.175 6 9 6zm0 1.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5 1.5-.675 1.5-1.5S9.825 7.5 9 7.5zM9 12c-.825 0-1.5.675-1.5 1.5S8.175 15 9 15s1.5-.675 1.5-1.5S9.825 12 9 12z",
|
|
3415
|
+
clipRule: "evenodd"
|
|
3416
|
+
})));
|
|
3560
3417
|
};
|
|
3561
|
-
|
|
3562
|
-
const propsMods = { renderCell, renderDropMarkers };
|
|
3563
|
-
const DataTableRow = uuiCore.withMods(uuiComponents.DataTableRow, ({ borderBottom = true, size }) => {
|
|
3564
|
-
return [
|
|
3565
|
-
css$l.root, 'uui-dt-vars', borderBottom && 'uui-dt-row-border', css$l['size-' + (size || '36')],
|
|
3566
|
-
];
|
|
3567
|
-
}, () => propsMods);
|
|
3418
|
+
var ForwardRef$l = /*#__PURE__*/React.forwardRef(SvgNavigationMoreVert18);
|
|
3568
3419
|
|
|
3569
|
-
var
|
|
3420
|
+
var _path$j;
|
|
3421
|
+
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
3422
|
+
var SvgActionUpdate18 = function SvgActionUpdate18(props, ref) {
|
|
3423
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
3424
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3425
|
+
width: 18,
|
|
3426
|
+
height: 18,
|
|
3427
|
+
viewBox: "0 0 18 18",
|
|
3428
|
+
ref: ref
|
|
3429
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3430
|
+
fillRule: "evenodd",
|
|
3431
|
+
d: "M8.007 2A7.004 7.004 0 0 0 1 9a7.004 7.004 0 0 0 11.732 5.16l-1.497-1.347A4.999 4.999 0 0 1 3 9c0-2.763 2.237-5 5-5 2.762 0 5 2.237 5 5h2c0-3.864-3.129-7-6.993-7zM11 9l3 3 3-3h-6z",
|
|
3432
|
+
clipRule: "evenodd"
|
|
3433
|
+
})));
|
|
3434
|
+
};
|
|
3435
|
+
var ForwardRef$k = /*#__PURE__*/React.forwardRef(SvgActionUpdate18);
|
|
3570
3436
|
|
|
3571
|
-
var
|
|
3437
|
+
var _path$i;
|
|
3438
|
+
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
3439
|
+
var SvgSaveOutline18 = function SvgSaveOutline18(props, ref) {
|
|
3440
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
3441
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3442
|
+
width: 18,
|
|
3443
|
+
height: 18,
|
|
3444
|
+
viewBox: "0 0 18 18",
|
|
3445
|
+
ref: ref
|
|
3446
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3447
|
+
d: "M12.75 2.25h-9a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5v-9l-3-3zm1.5 12H3.75V3.75h8.377l2.123 2.122v8.378zM9 9a2.247 2.247 0 0 0-2.25 2.25A2.247 2.247 0 0 0 9 13.5a2.247 2.247 0 0 0 2.25-2.25A2.247 2.247 0 0 0 9 9zM4.5 4.5h6.75v3H4.5v-3z"
|
|
3448
|
+
})));
|
|
3449
|
+
};
|
|
3450
|
+
var ForwardRef$j = /*#__PURE__*/React.forwardRef(SvgSaveOutline18);
|
|
3572
3451
|
|
|
3573
3452
|
var _path$h;
|
|
3574
3453
|
function _extends$i() { _extends$i = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
|
|
3575
|
-
var
|
|
3454
|
+
var SvgContentEditUndo18 = function SvgContentEditUndo18(props, ref) {
|
|
3576
3455
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
3577
3456
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3578
3457
|
width: 18,
|
|
@@ -3581,15 +3460,15 @@ var SvgTableSortAsc18 = function SvgTableSortAsc18(props, ref) {
|
|
|
3581
3460
|
ref: ref
|
|
3582
3461
|
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3583
3462
|
fillRule: "evenodd",
|
|
3584
|
-
d: "
|
|
3463
|
+
d: "M9.375 6A7.848 7.848 0 0 0 4.2 7.95l-2.7-2.7V12h6.75L5.535 9.285a5.965 5.965 0 0 1 3.84-1.41 6.009 6.009 0 0 1 5.7 4.125l1.777-.585C15.81 8.273 12.862 6 9.375 6z",
|
|
3585
3464
|
clipRule: "evenodd"
|
|
3586
3465
|
})));
|
|
3587
3466
|
};
|
|
3588
|
-
var ForwardRef$i = /*#__PURE__*/React.forwardRef(
|
|
3467
|
+
var ForwardRef$i = /*#__PURE__*/React.forwardRef(SvgContentEditUndo18);
|
|
3589
3468
|
|
|
3590
3469
|
var _path$g;
|
|
3591
3470
|
function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
|
|
3592
|
-
var
|
|
3471
|
+
var SvgActionCopyContent18 = function SvgActionCopyContent18(props, ref) {
|
|
3593
3472
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
3594
3473
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3595
3474
|
width: 18,
|
|
@@ -3598,44 +3477,15 @@ var SvgTableSortDesc18 = function SvgTableSortDesc18(props, ref) {
|
|
|
3598
3477
|
ref: ref
|
|
3599
3478
|
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3600
3479
|
fillRule: "evenodd",
|
|
3601
|
-
d: "
|
|
3480
|
+
d: "M3 1h8v2H3v8H1V3a2 2 0 0 1 2-2zm2 6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7zm10 8H7V7h8v8z",
|
|
3602
3481
|
clipRule: "evenodd"
|
|
3603
3482
|
})));
|
|
3604
3483
|
};
|
|
3605
|
-
var ForwardRef$h = /*#__PURE__*/React.forwardRef(
|
|
3606
|
-
|
|
3607
|
-
const SortingPanelImpl = ({ sortDirection, onSort }) => {
|
|
3608
|
-
const sortAsc = React.useCallback(() => onSort(sortDirection === 'asc' ? undefined : 'asc'), [onSort]);
|
|
3609
|
-
const sortDesc = React.useCallback(() => onSort(sortDirection === 'desc' ? undefined : 'desc'), [onSort]);
|
|
3610
|
-
return (React__namespace.default.createElement(FlexCell, { cx: css$j.sortingPanelContainer },
|
|
3611
|
-
React__namespace.default.createElement(DropdownMenuButton, { isActive: sortDirection === 'asc', caption: i18n.pickerFilterHeader.sortAscending, icon: ForwardRef$i, onClick: sortAsc }),
|
|
3612
|
-
React__namespace.default.createElement(DropdownMenuButton, { isActive: sortDirection === 'desc', caption: i18n.pickerFilterHeader.sortDescending, icon: ForwardRef$h, onClick: sortDesc })));
|
|
3613
|
-
};
|
|
3614
|
-
const SortingPanel = React__namespace.default.memo(SortingPanelImpl);
|
|
3615
|
-
|
|
3616
|
-
const ColumnHeaderDropdownImpl = (props) => {
|
|
3617
|
-
const popperModifiers = React.useMemo(() => [
|
|
3618
|
-
{
|
|
3619
|
-
name: 'offset',
|
|
3620
|
-
options: { offset: [0, 1] },
|
|
3621
|
-
}, uuiCore.mobilePopperModifier,
|
|
3622
|
-
], []);
|
|
3623
|
-
const style = React.useMemo(() => ({
|
|
3624
|
-
width: uuiCore.isMobile() ? document.documentElement.clientWidth : undefined,
|
|
3625
|
-
}), []);
|
|
3626
|
-
const closeDropdown = React.useCallback(() => props.onOpenChange(false), [props.onOpenChange]);
|
|
3627
|
-
return (React__namespace.default.createElement(uuiComponents.Dropdown, { renderTarget: props.renderTarget, renderBody: (dropdownProps) => (React__namespace.default.createElement(Panel, { background: "surface", style: style, shadow: true, cx: css$k.panel },
|
|
3628
|
-
React__namespace.default.createElement(MobileDropdownWrapper, { title: props.title, onClose: closeDropdown },
|
|
3629
|
-
props.isSortable && React__namespace.default.createElement(SortingPanel, { sortDirection: props.sortDirection, onSort: props.onSort }),
|
|
3630
|
-
props.renderFilter(dropdownProps)))), modifiers: popperModifiers, value: props.isOpen, onValueChange: props.onOpenChange }));
|
|
3631
|
-
};
|
|
3632
|
-
const ColumnHeaderDropdown = React__namespace.default.memo(ColumnHeaderDropdownImpl);
|
|
3633
|
-
|
|
3634
|
-
var css$i = {"cell":"sJGH-C","sort-icon":"IujieB","dropdown-icon":"Gdb2Ci","infoIcon":"_3dxJZF","resizable":"Yyktb3","size-24":"fbKv6z","size-30":"zSSLS6","size-36":"qxVrMF","size-42":"fg39WD","size-48":"nwGPW0","padding-left-24":"_1ysUy-","padding-right-24":"X8x-O3","caption":"OXgK3-","checkbox":"_2yRY17","icon":"MKD8Qj","icon-cell":"_8vQMUZ","align-right":"Q4Yf-h","align-center":"BaKrBD","tooltip-wrapper":"YjcaTy","cell-tooltip":"_6kLiLR","upper-case":"Wr7wSp","font-size-14":"_2-qUIj","resize-mark":"EZjb6D","draggable":"laEVXa","ghost":"fzPGE-","is-dragged-out":"SE5Cr4","dnd-marker-left":"pmeURy","dnd-marker-right":"WqHnF1","cell-tooltip-wrapper":"Nv9lns","cell-tooltip-text":"m-JwZw","sortIcon":"IujieB","dropdownIcon":"Gdb2Ci","size24":"fbKv6z","size30":"zSSLS6","size36":"qxVrMF","size42":"fg39WD","size48":"nwGPW0","paddingLeft24":"_1ysUy-","paddingRight24":"X8x-O3","iconCell":"_8vQMUZ","alignRight":"Q4Yf-h","alignCenter":"BaKrBD","tooltipWrapper":"YjcaTy","cellTooltip":"_6kLiLR","upperCase":"Wr7wSp","fontSize14":"_2-qUIj","resizeMark":"EZjb6D","isDraggedOut":"SE5Cr4","dndMarkerLeft":"pmeURy","dndMarkerRight":"WqHnF1","cellTooltipWrapper":"Nv9lns","cellTooltipText":"m-JwZw"};
|
|
3484
|
+
var ForwardRef$h = /*#__PURE__*/React.forwardRef(SvgActionCopyContent18);
|
|
3635
3485
|
|
|
3636
3486
|
var _path$f;
|
|
3637
3487
|
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
3638
|
-
var
|
|
3488
|
+
var SvgContentEdit18 = function SvgContentEdit18(props, ref) {
|
|
3639
3489
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
3640
3490
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3641
3491
|
width: 18,
|
|
@@ -3644,15 +3494,15 @@ var SvgTableSwap18 = function SvgTableSwap18(props, ref) {
|
|
|
3644
3494
|
ref: ref
|
|
3645
3495
|
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3646
3496
|
fillRule: "evenodd",
|
|
3647
|
-
d: "
|
|
3497
|
+
d: "M2.25 12.94v2.812h2.813l8.294-8.295-2.812-2.813L2.25 12.94zm13.283-7.658a.747.747 0 0 0 0-1.058L13.777 2.47a.747.747 0 0 0-1.058 0l-1.373 1.373 2.813 2.812 1.373-1.372z",
|
|
3648
3498
|
clipRule: "evenodd"
|
|
3649
3499
|
})));
|
|
3650
3500
|
};
|
|
3651
|
-
var ForwardRef$g = /*#__PURE__*/React.forwardRef(
|
|
3501
|
+
var ForwardRef$g = /*#__PURE__*/React.forwardRef(SvgContentEdit18);
|
|
3652
3502
|
|
|
3653
3503
|
var _path$e;
|
|
3654
3504
|
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
3655
|
-
var
|
|
3505
|
+
var SvgContentLink18 = function SvgContentLink18(props, ref) {
|
|
3656
3506
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
3657
3507
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3658
3508
|
width: 18,
|
|
@@ -3661,15 +3511,15 @@ var SvgContentFiltration18 = function SvgContentFiltration18(props, ref) {
|
|
|
3661
3511
|
ref: ref
|
|
3662
3512
|
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3663
3513
|
fillRule: "evenodd",
|
|
3664
|
-
d: "
|
|
3514
|
+
d: "M7.943 10.057a.73.73 0 0 1 0 1.066.756.756 0 0 1-1.065 0 3.753 3.753 0 0 1 0-5.303l2.655-2.655a3.753 3.753 0 0 1 5.302 0 3.753 3.753 0 0 1 0 5.302l-1.118 1.118a5.18 5.18 0 0 0-.3-1.815l.353-.36a2.236 2.236 0 0 0 0-3.18 2.236 2.236 0 0 0-3.18 0L7.943 6.877a2.236 2.236 0 0 0 0 3.18zm2.114-3.18a.756.756 0 0 1 1.066 0 3.753 3.753 0 0 1 0 5.303l-2.655 2.655a3.753 3.753 0 0 1-5.303 0 3.753 3.753 0 0 1 0-5.303l1.118-1.117a5.25 5.25 0 0 0 .3 1.823l-.353.352a2.236 2.236 0 0 0 0 3.18 2.236 2.236 0 0 0 3.18 0l2.647-2.647a2.236 2.236 0 0 0 0-3.18.73.73 0 0 1 0-1.066z",
|
|
3665
3515
|
clipRule: "evenodd"
|
|
3666
3516
|
})));
|
|
3667
3517
|
};
|
|
3668
|
-
var ForwardRef$f = /*#__PURE__*/React.forwardRef(
|
|
3518
|
+
var ForwardRef$f = /*#__PURE__*/React.forwardRef(SvgContentLink18);
|
|
3669
3519
|
|
|
3670
3520
|
var _path$d;
|
|
3671
3521
|
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
3672
|
-
var
|
|
3522
|
+
var SvgActionDeleteforever18 = function SvgActionDeleteforever18(props, ref) {
|
|
3673
3523
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
3674
3524
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3675
3525
|
width: 18,
|
|
@@ -3678,58 +3528,119 @@ var SvgNavigationChevronUp18 = function SvgNavigationChevronUp18(props, ref) {
|
|
|
3678
3528
|
ref: ref
|
|
3679
3529
|
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3680
3530
|
fillRule: "evenodd",
|
|
3681
|
-
d: "
|
|
3531
|
+
d: "M7 2h4l1 1h3v2H3V3h3l1-1zM4 6h10v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6zm6.76 8.1L9 12.36 7.24 14.1l-1.16-1.16 1.74-1.76-1.78-1.8 1.2-1.18L9 10l1.76-1.8 1.18 1.18-1.76 1.8 1.76 1.76-1.18 1.16z",
|
|
3682
3532
|
clipRule: "evenodd"
|
|
3683
3533
|
})));
|
|
3684
3534
|
};
|
|
3685
|
-
var ForwardRef$e = /*#__PURE__*/React.forwardRef(
|
|
3535
|
+
var ForwardRef$e = /*#__PURE__*/React.forwardRef(SvgActionDeleteforever18);
|
|
3536
|
+
|
|
3537
|
+
function PresetActionsDropdown(props) {
|
|
3538
|
+
const { uuiNotifications } = uuiCore.useUuiContext();
|
|
3539
|
+
const copyUrlToClipboard = React.useCallback(() => __awaiter(this, void 0, void 0, function* () {
|
|
3540
|
+
yield navigator.clipboard.writeText(props.getPresetLink(props.preset));
|
|
3541
|
+
successNotificationHandler('Link copied!');
|
|
3542
|
+
}), []);
|
|
3543
|
+
const saveInCurrent = React.useCallback((preset) => __awaiter(this, void 0, void 0, function* () {
|
|
3544
|
+
const newPreset = Object.assign(Object.assign({}, preset), { filter: props.tableState.filter, sorting: props.tableState.sorting, columnsConfig: props.tableState.columnsConfig, filtersConfig: props.tableState.filtersConfig, viewState: props.tableState.viewState });
|
|
3545
|
+
yield props.updatePreset(newPreset);
|
|
3546
|
+
successNotificationHandler('Changes saved!');
|
|
3547
|
+
}), [
|
|
3548
|
+
props.tableState.filter, props.tableState.columnsConfig, props.tableState.filtersConfig,
|
|
3549
|
+
]);
|
|
3550
|
+
const successNotificationHandler = React.useCallback((text) => {
|
|
3551
|
+
uuiNotifications
|
|
3552
|
+
.show((props) => (React__namespace.default.createElement(SuccessNotification, Object.assign({}, props),
|
|
3553
|
+
React__namespace.default.createElement(Text, { size: "36", font: "regular", fontSize: "14" }, text))), { duration: 3 })
|
|
3554
|
+
.catch(() => null);
|
|
3555
|
+
}, []);
|
|
3556
|
+
const saveInCurrentHandler = React.useCallback(() => {
|
|
3557
|
+
saveInCurrent(props.preset);
|
|
3558
|
+
}, [props.preset]);
|
|
3559
|
+
const discardAllChangesHandler = React.useCallback(() => {
|
|
3560
|
+
props.choosePreset(props.preset);
|
|
3561
|
+
}, [props.preset]);
|
|
3562
|
+
const duplicateHandler = React.useCallback(() => {
|
|
3563
|
+
props.duplicatePreset(props.preset);
|
|
3564
|
+
}, [props.preset]);
|
|
3565
|
+
const deleteHandler = React.useCallback(() => __awaiter(this, void 0, void 0, function* () {
|
|
3566
|
+
yield props.deletePreset(props.preset);
|
|
3567
|
+
}), [
|
|
3568
|
+
props.activePresetId, props.deletePreset, props.preset,
|
|
3569
|
+
]);
|
|
3570
|
+
const renderBody = () => {
|
|
3571
|
+
const isReadonlyPreset = props.preset.isReadonly;
|
|
3572
|
+
return (React__namespace.default.createElement(Panel, { shadow: true, cx: css$j.presetDropdownPanel },
|
|
3573
|
+
props.activePresetId === props.preset.id && props.hasPresetChanged(props.preset) && (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
3574
|
+
!isReadonlyPreset && (React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-save-in-current` },
|
|
3575
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$k, caption: "Save in current", onClick: saveInCurrentHandler }))),
|
|
3576
|
+
React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-save-as-new` },
|
|
3577
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$j, caption: "Save as new", onClick: props.addPreset })),
|
|
3578
|
+
React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-discard`, borderBottom: true },
|
|
3579
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$i, caption: "Discard all changes", onClick: discardAllChangesHandler })))),
|
|
3580
|
+
props.preset.id === props.activePresetId && !isReadonlyPreset && (React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-rename` },
|
|
3581
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$g, caption: "Rename", onClick: props.renamePreset }))),
|
|
3582
|
+
React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-duplicate` },
|
|
3583
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$h, caption: "Duplicate", onClick: duplicateHandler })),
|
|
3584
|
+
React__namespace.default.createElement(FlexRow, { borderBottom: true, key: `${props.preset.id}-copyLink` },
|
|
3585
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$f, caption: "Copy Link", onClick: copyUrlToClipboard })),
|
|
3586
|
+
!isReadonlyPreset && (React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-delete`, cx: css$j.deleteRow },
|
|
3587
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$e, caption: "Delete", cx: css$j.deleteButton, onClick: deleteHandler })))));
|
|
3588
|
+
};
|
|
3589
|
+
const renderTarget = React.useCallback((dropdownProps) => {
|
|
3590
|
+
return (React__namespace.default.createElement(IconButton, Object.assign({ cx: dropdownProps.isOpen && css$j.targetOpen, color: props.preset.id === props.activePresetId ? 'info' : 'default' }, dropdownProps, { icon: ForwardRef$l })));
|
|
3591
|
+
}, []);
|
|
3592
|
+
return (React__namespace.default.createElement(Dropdown, { renderBody: renderBody, renderTarget: renderTarget, placement: "bottom-end", modifiers: [{ name: 'offset', options: { offset: [0, 22] } }] }));
|
|
3593
|
+
}
|
|
3686
3594
|
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
};
|
|
3710
|
-
this.renderHeaderCheckbox = () => this.props.selectAll
|
|
3711
|
-
&& this.props.isFirstColumn && (React__namespace.createElement(Checkbox, Object.assign({ size: +this.props.size < 36 ? '12' : '18' }, this.props.selectAll, { cx: uuiCore.cx(css$i.checkbox, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCheckbox) })));
|
|
3712
|
-
this.renderResizeMark = (props) => React__namespace.createElement("div", { onMouseDown: props.onResizeStart, className: uuiCore.cx(css$i.resizeMark, uuiCore.uuiMarkers.draggable) });
|
|
3713
|
-
this.renderCellContent = (props, dropdownProps) => (React__namespace.createElement(FlexCell, Object.assign({}, this.props.column, { minWidth: this.props.column.width, ref: (ref) => {
|
|
3714
|
-
var _a;
|
|
3715
|
-
props.ref(ref);
|
|
3716
|
-
(_a = dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.ref) === null || _a === void 0 ? void 0 : _a.call(dropdownProps, ref);
|
|
3717
|
-
}, cx: uuiCore.cx(uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCell, (this.props.column.isSortable || this.props.isDropdown) && uuiCore.uuiMarkers.clickable, css$i.cell, css$i['size-' + (this.props.size || '36')], this.props.isFirstColumn && css$i['padding-left-24'], this.props.isLastColumn && css$i['padding-right-24'], this.props.column.cx, this.props.allowColumnsResizing && css$i.resizable, props.isDraggable && css$i.draggable, props.isDragGhost && css$i.ghost, props.isDraggedOut && css$i.isDraggedOut, props.isDndInProgress && css$i['dnd-marker-' + props.position]), onClick: !this.props.column.renderFilter ? props.toggleSort : dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.onClick, rawProps: Object.assign({ role: 'columnheader', 'aria-sort': this.props.sortDirection === 'asc' ? 'ascending' : this.props.sortDirection ? 'descending' : 'none' }, props.eventHandlers) }),
|
|
3718
|
-
this.renderHeaderCheckbox(),
|
|
3719
|
-
this.getColumnCaption(),
|
|
3720
|
-
this.props.allowColumnsResizing && this.renderResizeMark(props)));
|
|
3721
|
-
this.renderCellWithFilter = (props) => (React__namespace.createElement(ColumnHeaderDropdown, { isOpen: this.state.isDropdownOpen, isSortable: this.props.column.isSortable, renderTarget: (dropdownProps) => this.renderCellContent(props, dropdownProps), renderFilter: this.props.renderFilter, onSort: this.props.onSort, sortDirection: this.props.sortDirection, onOpenChange: (isDropdownOpen) => this.setState({ isDropdownOpen }), title: this.props.column.caption }));
|
|
3722
|
-
}
|
|
3723
|
-
render() {
|
|
3724
|
-
return React__namespace.createElement(uuiComponents.DataTableHeaderCell, Object.assign({}, this.props, { cx: "uui-dt-vars", renderCellContent: this.props.column.renderFilter ? this.renderCellWithFilter : this.renderCellContent }));
|
|
3725
|
-
}
|
|
3595
|
+
var css$i = {"preset-input-cell":"YU5Qnp","preset-input":"myofec","presetInputCell":"YU5Qnp","presetInput":"myofec"};
|
|
3596
|
+
|
|
3597
|
+
function PresetInput(props) {
|
|
3598
|
+
var _a;
|
|
3599
|
+
const [presetCaption, setPresetCaption] = React.useState(((_a = props.preset) === null || _a === void 0 ? void 0 : _a.name) || '');
|
|
3600
|
+
const cancelActionHandler = React.useCallback(() => {
|
|
3601
|
+
setPresetCaption('');
|
|
3602
|
+
props.onCancel();
|
|
3603
|
+
}, [props.onCancel]);
|
|
3604
|
+
const acceptActionHandler = React.useCallback(() => __awaiter(this, void 0, void 0, function* () {
|
|
3605
|
+
if (presetCaption) {
|
|
3606
|
+
yield props.onSuccess(presetCaption);
|
|
3607
|
+
}
|
|
3608
|
+
props.onCancel();
|
|
3609
|
+
}), [presetCaption]);
|
|
3610
|
+
const newPresetOnBlurHandler = React.useCallback(() => {
|
|
3611
|
+
if (presetCaption.length) {
|
|
3612
|
+
return;
|
|
3613
|
+
}
|
|
3614
|
+
props.onCancel();
|
|
3615
|
+
}, [presetCaption.length, props.onCancel]);
|
|
3616
|
+
return (React__namespace.default.createElement(FlexCell, { cx: css$i.presetInputCell, minWidth: 180 },
|
|
3617
|
+
React__namespace.default.createElement(TextInput, { cx: css$i.presetInput, onValueChange: setPresetCaption, value: presetCaption, onCancel: cancelActionHandler, onAccept: acceptActionHandler, onBlur: newPresetOnBlurHandler, autoFocus: true, maxLength: 50 })));
|
|
3726
3618
|
}
|
|
3727
3619
|
|
|
3728
|
-
var css$h = {"
|
|
3620
|
+
var css$h = {"preset":"O3CRt6","activePreset":"PJKTaV"};
|
|
3621
|
+
|
|
3622
|
+
function Preset(props) {
|
|
3623
|
+
const [isRenamePreset, setIsRenamePreset] = React.useState(false);
|
|
3624
|
+
const choosePresetHandler = React.useCallback(() => props.choosePreset(props.preset), [props]);
|
|
3625
|
+
const cancelRenamePreset = React.useCallback(() => {
|
|
3626
|
+
setIsRenamePreset(() => false);
|
|
3627
|
+
}, []);
|
|
3628
|
+
const setPresetForRename = React.useCallback(() => {
|
|
3629
|
+
if (!isRenamePreset) {
|
|
3630
|
+
setIsRenamePreset(() => true);
|
|
3631
|
+
}
|
|
3632
|
+
}, []);
|
|
3633
|
+
const handlePresetRename = React.useCallback((name) => {
|
|
3634
|
+
const newPreset = Object.assign(Object.assign({}, props.preset), { name: name });
|
|
3635
|
+
return props.updatePreset(newPreset);
|
|
3636
|
+
}, [props.preset]);
|
|
3637
|
+
const isPresetActive = props.activePresetId === props.preset.id;
|
|
3638
|
+
return (React__namespace.default.createElement(FlexCell, { key: props.preset.id, alignSelf: "center", width: "auto" }, isRenamePreset ? (React__namespace.default.createElement(PresetInput, { onCancel: cancelRenamePreset, onSuccess: handlePresetRename, preset: props.preset })) : (React__namespace.default.createElement(TabButton, { caption: props.preset.name, onClick: !isPresetActive && choosePresetHandler, cx: [css$h.preset, isPresetActive && css$h.activePreset], size: "60", withNotify: isPresetActive && props.hasPresetChanged(props.preset), icon: () => React__namespace.default.createElement(PresetActionsDropdown, Object.assign({ renamePreset: setPresetForRename }, props)), iconPosition: "right", isLinkActive: isPresetActive }))));
|
|
3639
|
+
}
|
|
3729
3640
|
|
|
3730
3641
|
var _path$c;
|
|
3731
3642
|
function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
3732
|
-
var
|
|
3643
|
+
var SvgContentPlusBold18 = function SvgContentPlusBold18(props, ref) {
|
|
3733
3644
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
3734
3645
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3735
3646
|
width: 18,
|
|
@@ -3737,19 +3648,90 @@ var SvgActionSettings18 = function SvgActionSettings18(props, ref) {
|
|
|
3737
3648
|
viewBox: "0 0 18 18",
|
|
3738
3649
|
ref: ref
|
|
3739
3650
|
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3740
|
-
|
|
3741
|
-
d: "M3 9.093a6.083 6.083 0 0 1 0-.186L1.55 7.271a1 1 0 0 1-.118-1.163l1.28-2.216a1 1 0 0 1 1.066-.48l2.14.439a3.81 3.81 0 0 1 .163-.094l.691-2.073A1 1 0 0 1 7.721 1h2.558a1 1 0 0 1 .949.684l.69 2.073c.056.03.11.061.163.094l2.141-.439a1 1 0 0 1 1.067.48l1.279 2.216a1 1 0 0 1-.118 1.163L15 8.907a5.72 5.72 0 0 1 0 .186l1.45 1.636a1 1 0 0 1 .118 1.163l-1.28 2.216a1 1 0 0 1-1.066.48l-2.14-.438a6.215 6.215 0 0 1-.163.093l-.691 2.073a1 1 0 0 1-.949.684H7.721a1 1 0 0 1-.949-.684l-.69-2.073a6.105 6.105 0 0 1-.163-.094l-2.141.439a1 1 0 0 1-1.067-.48l-1.279-2.216a1 1 0 0 1 .118-1.163L3 9.093zM9 12a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",
|
|
3742
|
-
clipRule: "evenodd"
|
|
3651
|
+
d: "M10.5 3h-3v4.5H3v3h4.5V15h3v-4.5H15v-3h-4.5V3z"
|
|
3743
3652
|
})));
|
|
3744
3653
|
};
|
|
3745
|
-
var ForwardRef$d = /*#__PURE__*/React.forwardRef(
|
|
3654
|
+
var ForwardRef$d = /*#__PURE__*/React.forwardRef(SvgContentPlusBold18);
|
|
3746
3655
|
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3656
|
+
function PresetsPanel(props) {
|
|
3657
|
+
const [isAddingPreset, setIsAddingPreset] = React.useState(false);
|
|
3658
|
+
const setAddingPreset = React.useCallback(() => {
|
|
3659
|
+
setIsAddingPreset(true);
|
|
3660
|
+
}, []);
|
|
3661
|
+
const cancelAddingPreset = React.useCallback(() => {
|
|
3662
|
+
setIsAddingPreset(false);
|
|
3663
|
+
}, []);
|
|
3664
|
+
const presetApi = __rest(props, ["presets"]);
|
|
3665
|
+
const renderPreset = (preset) => {
|
|
3666
|
+
return React__namespace.default.createElement(Preset, Object.assign({ key: preset.id, preset: preset, addPreset: setAddingPreset }, presetApi));
|
|
3667
|
+
};
|
|
3668
|
+
const renderAddPresetButton = React.useCallback(() => {
|
|
3669
|
+
return (React__namespace.default.createElement("div", { key: "addingPresetBlock", className: css$k.addPresetContainer }, !isAddingPreset ? (React__namespace.default.createElement(Button, { size: "36", onClick: setAddingPreset, caption: i18n.presetPanel.addCaption, icon: ForwardRef$d, iconPosition: "left", mode: "ghost", color: "primary" })) : (React__namespace.default.createElement(PresetInput, { onCancel: cancelAddingPreset, onSuccess: props.createNewPreset }))));
|
|
3670
|
+
}, [isAddingPreset]);
|
|
3671
|
+
const onPresetDropdownSelect = (preset) => {
|
|
3672
|
+
props.choosePreset(preset.preset);
|
|
3673
|
+
};
|
|
3674
|
+
const renderMoreButtonDropdown = (item, hiddenItems) => {
|
|
3675
|
+
return (React__namespace.default.createElement(Dropdown, { key: "more", renderTarget: (props) => (React__namespace.default.createElement(FlexRow, null,
|
|
3676
|
+
React__namespace.default.createElement("div", { className: css$k.divider }),
|
|
3677
|
+
React__namespace.default.createElement(Button, Object.assign({ mode: "ghost", color: "secondary", caption: `${(hiddenItems === null || hiddenItems === void 0 ? void 0 : hiddenItems.length) || ''} more` }, props)))), renderBody: (propsBody) => (React__namespace.default.createElement(DropdownContainer, Object.assign({ cx: uuiCore.cx(css$k.dropContainer), width: 230 }, propsBody),
|
|
3678
|
+
React__namespace.default.createElement(uuiComponents.ScrollBars, null, hiddenItems.map((hiddenItem) => (React__namespace.default.createElement(DropdownMenuButton, { key: hiddenItem.preset.id, onClick: () => onPresetDropdownSelect(hiddenItem), caption: hiddenItem.preset.name, icon: !hiddenItem.preset.isReadonly && ForwardRef$e, iconPosition: "right", cx: css$k.dropdownDeleteIcon, onIconClick: !hiddenItem.preset.isReadonly && (() => props.deletePreset(hiddenItem.preset)) })))))) }));
|
|
3679
|
+
};
|
|
3680
|
+
const getPresetPriority = (preset, index) => {
|
|
3681
|
+
return preset.id === props.activePresetId ? 100499 : 1000 - index;
|
|
3682
|
+
};
|
|
3683
|
+
const getPanelItems = () => {
|
|
3684
|
+
return [
|
|
3685
|
+
...sortBy__default.default(props.presets, (i) => i.order).map((preset, index) => ({
|
|
3686
|
+
id: preset.id.toString(),
|
|
3687
|
+
render: () => renderPreset(preset),
|
|
3688
|
+
priority: getPresetPriority(preset, index),
|
|
3689
|
+
preset: preset,
|
|
3690
|
+
})), {
|
|
3691
|
+
id: 'collapsedContainer', render: renderMoreButtonDropdown, priority: 100501, collapsedContainer: true,
|
|
3692
|
+
}, { id: 'addPreset', render: renderAddPresetButton, priority: 100501 },
|
|
3693
|
+
];
|
|
3694
|
+
};
|
|
3695
|
+
return (React__namespace.default.createElement(FlexCell, { grow: 1, minWidth: 310, rawProps: props.rawProps },
|
|
3696
|
+
React__namespace.default.createElement(FlexRow, { size: null, spacing: "12", cx: css$k.presetsWrapper },
|
|
3697
|
+
React__namespace.default.createElement(uuiComponents.AdaptivePanel, { items: getPanelItems() }))));
|
|
3698
|
+
}
|
|
3699
|
+
|
|
3700
|
+
const defaultPredicates = {
|
|
3701
|
+
numeric: [
|
|
3702
|
+
{ predicate: 'eq', name: '=', isDefault: true }, { predicate: 'neq', name: '≠' }, { predicate: 'lte', name: '≤' }, { predicate: 'gte', name: '≥' }, { predicate: 'inRange', name: 'In Range' },
|
|
3703
|
+
],
|
|
3704
|
+
multiPicker: [{ predicate: 'in', name: 'is', isDefault: true }, { predicate: 'nin', name: 'is not' }],
|
|
3705
|
+
rangeDatePicker: [{ predicate: 'inRange', name: 'In Range', isDefault: true }, { predicate: 'notInRange', name: 'Not in Range' }],
|
|
3706
|
+
};
|
|
3707
|
+
|
|
3708
|
+
const useColumnsWithFilters = (initialColumns, filters) => {
|
|
3709
|
+
const makeFilterRenderCallback = React.useCallback((key) => function (filterLens, dropdownProps) {
|
|
3710
|
+
const filter = filters.find((f) => f.columnKey === key);
|
|
3711
|
+
if (!filter)
|
|
3712
|
+
return null;
|
|
3713
|
+
const props = filterLens.prop(filter.field).toProps();
|
|
3714
|
+
return React__namespace.default.createElement(FilterItemBody, Object.assign({}, props, filter, dropdownProps));
|
|
3715
|
+
}, [filters]);
|
|
3716
|
+
const columns = React.useMemo(() => {
|
|
3717
|
+
if (filters) {
|
|
3718
|
+
const filterKeys = filters.map((f) => f.columnKey);
|
|
3719
|
+
const newColumns = (initialColumns.map((column) => {
|
|
3720
|
+
if (filterKeys.includes(column.key)) {
|
|
3721
|
+
return Object.assign(Object.assign({}, column), { renderFilter: makeFilterRenderCallback(column.key) });
|
|
3722
|
+
}
|
|
3723
|
+
else {
|
|
3724
|
+
return column;
|
|
3725
|
+
}
|
|
3726
|
+
}));
|
|
3727
|
+
return newColumns;
|
|
3728
|
+
}
|
|
3729
|
+
return initialColumns;
|
|
3730
|
+
}, [filters, initialColumns]);
|
|
3731
|
+
return columns;
|
|
3732
|
+
};
|
|
3751
3733
|
|
|
3752
|
-
var styles$1 = {"main-panel":"
|
|
3734
|
+
var styles$1 = {"main-panel":"ptMu9v","group-title":"DgOUCA","group-title-text":"nHbzNL","group-title-badge":"dRSUbf","group-items":"BBN0YY","no-data":"_2vwEda","h-divider":"fklXNs","search-area":"pbBbKM","mainPanel":"ptMu9v","groupTitle":"DgOUCA","groupTitleText":"nHbzNL","groupTitleBadge":"dRSUbf","groupItems":"BBN0YY","noData":"_2vwEda","hDivider":"fklXNs","searchArea":"pbBbKM"};
|
|
3753
3735
|
|
|
3754
3736
|
var _path$b;
|
|
3755
3737
|
function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
@@ -3828,7 +3810,7 @@ function PinIconButton(props) {
|
|
|
3828
3810
|
React__namespace.createElement(IconButton, { icon: pinIcon, onClick: pinClickHandler, isDisabled: isPinnedAlways, color: isPinned ? 'info' : undefined }))));
|
|
3829
3811
|
}
|
|
3830
3812
|
|
|
3831
|
-
var styles = {"row-wrapper":"
|
|
3813
|
+
var styles = {"row-wrapper":"SWMZi6","not-pinned":"yxnsHl","pin-icon-button":"yr-iBp","checkbox":"YmqO7-","drag-handle":"_9RqGv3","dnd-disabled":"EDh2d-","rowWrapper":"SWMZi6","notPinned":"yxnsHl","pinIconButton":"yr-iBp","dragHandle":"_9RqGv3","dndDisabled":"EDh2d-"};
|
|
3832
3814
|
|
|
3833
3815
|
const ColumnRow = React__namespace.memo(function ColumnRow(props) {
|
|
3834
3816
|
const { column } = props;
|
|
@@ -3854,7 +3836,7 @@ const ColumnRow = React__namespace.memo(function ColumnRow(props) {
|
|
|
3854
3836
|
|
|
3855
3837
|
const renderGroupTitle = (title, amount) => (React__namespace.createElement(FlexRow, { size: "24", padding: "24", spacing: "6", cx: styles$1.groupTitle },
|
|
3856
3838
|
React__namespace.createElement(Text, { cx: styles$1.groupTitleText, font: "semibold", lineHeight: "24", fontSize: "14" }, title),
|
|
3857
|
-
React__namespace.createElement(Badge, { cx: styles$1.groupTitleBadge, caption: amount, color: "
|
|
3839
|
+
React__namespace.createElement(Badge, { cx: styles$1.groupTitleBadge, caption: amount, color: "default", size: "18" })));
|
|
3858
3840
|
function ColumnsConfigurationModal(props) {
|
|
3859
3841
|
const i18n$1 = i18n.tables.columnsConfigurationModal;
|
|
3860
3842
|
const { columns, columnsConfig: initialColumnsConfig, defaultConfig } = props, modalProps = __rest(props, ["columns", "columnsConfig", "defaultConfig"]);
|
|
@@ -3896,10 +3878,10 @@ function ColumnsConfigurationModal(props) {
|
|
|
3896
3878
|
React__namespace.createElement(ModalHeader, { title: i18n$1.configureColumnsTitle, onClose: close }),
|
|
3897
3879
|
React__namespace.createElement(FlexRow, { padding: "24", borderBottom: true, spacing: "12", cx: styles$1.searchArea },
|
|
3898
3880
|
React__namespace.createElement(SearchInput, { size: "30", value: searchValue, onValueChange: setSearchValue, placeholder: i18n$1.searchPlaceholder }),
|
|
3899
|
-
React__namespace.createElement(Dropdown, { closeOnTargetClick: true, renderBody: () => (React__namespace.createElement(Panel, {
|
|
3881
|
+
React__namespace.createElement(Dropdown, { closeOnTargetClick: true, renderBody: () => (React__namespace.createElement(Panel, { shadow: true },
|
|
3900
3882
|
React__namespace.createElement(DropdownMenuButton, { caption: i18n$1.clearAllButton, onClick: uncheckAll }),
|
|
3901
|
-
React__namespace.createElement(DropdownMenuButton, { caption: i18n$1.selectAllButton, onClick: checkAll }))), renderTarget: (props) => React__namespace.createElement(Button, Object.assign({}, props, {
|
|
3902
|
-
React__namespace.createElement(Panel, {
|
|
3883
|
+
React__namespace.createElement(DropdownMenuButton, { caption: i18n$1.selectAllButton, onClick: checkAll }))), renderTarget: (props) => React__namespace.createElement(Button, Object.assign({}, props, { mode: "none", icon: ForwardRef$l, size: "30", color: "secondary", isDropdown: false })) })),
|
|
3884
|
+
React__namespace.createElement(Panel, { cx: styles$1.mainPanel },
|
|
3903
3885
|
React__namespace.createElement(ScrollBars, null,
|
|
3904
3886
|
renderVisible(),
|
|
3905
3887
|
renderHidden(),
|
|
@@ -3907,67 +3889,12 @@ function ColumnsConfigurationModal(props) {
|
|
|
3907
3889
|
React__namespace.createElement(Text, { fontSize: "24", lineHeight: "30", color: "primary", font: "semibold" }, i18n$1.noResultsFound.text),
|
|
3908
3890
|
React__namespace.createElement(Text, { fontSize: "16", lineHeight: "24", font: "regular", color: "primary" }, i18n$1.noResultsFound.subText))))),
|
|
3909
3891
|
React__namespace.createElement(ModalFooter, { borderTop: true },
|
|
3910
|
-
React__namespace.createElement(LinkButton, { icon: ForwardRef$
|
|
3892
|
+
React__namespace.createElement(LinkButton, { icon: ForwardRef$k, caption: i18n$1.resetToDefaultButton, onClick: reset }),
|
|
3911
3893
|
React__namespace.createElement(uuiComponents.FlexSpacer, null),
|
|
3912
|
-
React__namespace.createElement(Button, {
|
|
3894
|
+
React__namespace.createElement(Button, { mode: "none", color: "secondary", caption: i18n$1.cancelButton, onClick: close }),
|
|
3913
3895
|
noVisibleColumns ? (React__namespace.createElement(Tooltip, { content: i18n$1.enableAtLeastOneColumnMessage, placement: "top-end", color: "critical" }, applyButton)) : (applyButton)))));
|
|
3914
3896
|
}
|
|
3915
3897
|
|
|
3916
|
-
var css$g = {"listContainer":"AyNuAd","header":"_6fSx6A","group":"HcUve7","stickyHeader":"QAVdcT"};
|
|
3917
|
-
|
|
3918
|
-
const getChildrenAndRest = (row, rows) => {
|
|
3919
|
-
const firstNotChildIndex = rows.findIndex((other) => other.depth < row.depth || (row.depth === other.depth && other.isPinned));
|
|
3920
|
-
if (firstNotChildIndex === -1) {
|
|
3921
|
-
return [rows, []];
|
|
3922
|
-
}
|
|
3923
|
-
if (firstNotChildIndex === 0) {
|
|
3924
|
-
return [[], rows];
|
|
3925
|
-
}
|
|
3926
|
-
const children = rows.slice(0, firstNotChildIndex);
|
|
3927
|
-
const rest = rows.slice(firstNotChildIndex, rows.length);
|
|
3928
|
-
return [children, rest];
|
|
3929
|
-
};
|
|
3930
|
-
|
|
3931
|
-
function DataRowsGroup({ row, childRows, renderRow, top = 1, }) {
|
|
3932
|
-
var _a, _b;
|
|
3933
|
-
const rowRef = React.useRef();
|
|
3934
|
-
const childrenPinnedTop = row.isPinned ? (top + ((_b = (_a = rowRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0)) : top;
|
|
3935
|
-
return (React__namespace.default.createElement("div", { className: css$g.group, key: row.rowKey },
|
|
3936
|
-
React__namespace.default.createElement("div", { className: row.isPinned ? css$g.stickyHeader : css$g.header,
|
|
3937
|
-
// Gaps between pinned parents should be removed by -1 from top height.
|
|
3938
|
-
// Otherwise, sometimes top value is rounded top.
|
|
3939
|
-
style: { zIndex: row.depth + 10, top: top - 1 }, ref: rowRef }, renderRow(row)),
|
|
3940
|
-
childRows.length > 0 && (React__namespace.default.createElement("div", null,
|
|
3941
|
-
React__namespace.default.createElement(DataRowsGroups, { rows: childRows, renderRow: renderRow, top: childrenPinnedTop })))));
|
|
3942
|
-
}
|
|
3943
|
-
const renderRows = (rows, renderRow, top) => {
|
|
3944
|
-
if (!rows.length)
|
|
3945
|
-
return [];
|
|
3946
|
-
const [row, ...rest] = rows;
|
|
3947
|
-
if (!rest.length) {
|
|
3948
|
-
return [renderRow(row)];
|
|
3949
|
-
}
|
|
3950
|
-
const [next] = rest;
|
|
3951
|
-
if (next.depth <= row.depth && !row.isPinned) {
|
|
3952
|
-
return [renderRow(row)].concat(renderRows(rest, renderRow, top));
|
|
3953
|
-
}
|
|
3954
|
-
const [children, otherRows] = getChildrenAndRest(row, rest);
|
|
3955
|
-
const group = (React__namespace.default.createElement(DataRowsGroup, { row: row, childRows: children, renderRow: renderRow, top: top, key: row.rowKey }));
|
|
3956
|
-
return [group].concat(renderRows(otherRows, renderRow, top));
|
|
3957
|
-
};
|
|
3958
|
-
function DataRowsGroups({ rows, renderRow, top = 1, }) {
|
|
3959
|
-
const rowsWithGroups = renderRows(rows, renderRow, top);
|
|
3960
|
-
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
3961
|
-
return (React__namespace.default.createElement(React__namespace.default.Fragment, null, rowsWithGroups));
|
|
3962
|
-
}
|
|
3963
|
-
|
|
3964
|
-
function DataRowsContainer({ estimatedHeight, listContainerRef, offsetY, rows, renderRow, headerRef, }) {
|
|
3965
|
-
var _a;
|
|
3966
|
-
return (React__namespace.default.createElement("div", { className: css$g.listContainer, style: { minHeight: `${estimatedHeight}px` } },
|
|
3967
|
-
React__namespace.default.createElement("div", { ref: listContainerRef, role: "rowgroup", style: { marginTop: offsetY } },
|
|
3968
|
-
React__namespace.default.createElement(DataRowsGroups, { rows: rows, renderRow: renderRow, top: (_a = headerRef === null || headerRef === void 0 ? void 0 : headerRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight }))));
|
|
3969
|
-
}
|
|
3970
|
-
|
|
3971
3898
|
var _path$8, _path2, _path3, _path4, _path5, _path6, _g$1, _path7, _path8, _path9, _path10, _path11, _path12, _path13, _path14, _path15, _path16, _path17, _path18, _path19, _path20, _path21, _path22, _path23, _path24, _defs;
|
|
3972
3899
|
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
3973
3900
|
var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
@@ -3979,7 +3906,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
3979
3906
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3980
3907
|
ref: ref
|
|
3981
3908
|
}, props), /*#__PURE__*/React__namespace.createElement("g", {
|
|
3982
|
-
clipPath: "url(#
|
|
3909
|
+
clipPath: "url(#t3z83az7el0ravt2i_a)"
|
|
3983
3910
|
}, _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3984
3911
|
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",
|
|
3985
3912
|
fill: "#F5F6FA"
|
|
@@ -4000,7 +3927,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
4000
3927
|
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",
|
|
4001
3928
|
fill: "#1D1E26"
|
|
4002
3929
|
})), /*#__PURE__*/React__namespace.createElement("mask", {
|
|
4003
|
-
id: "
|
|
3930
|
+
id: "t3z83am5hndtlgftg_b",
|
|
4004
3931
|
style: {
|
|
4005
3932
|
maskType: "alpha"
|
|
4006
3933
|
},
|
|
@@ -4013,7 +3940,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
4013
3940
|
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",
|
|
4014
3941
|
fill: "#9BDEFF"
|
|
4015
3942
|
}))), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
4016
|
-
mask: "url(#
|
|
3943
|
+
mask: "url(#t3z83am5hndtlgftg_b)",
|
|
4017
3944
|
fillRule: "evenodd",
|
|
4018
3945
|
clipRule: "evenodd"
|
|
4019
3946
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -4099,7 +4026,7 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
4099
4026
|
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",
|
|
4100
4027
|
fill: "#fff"
|
|
4101
4028
|
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
4102
|
-
id: "
|
|
4029
|
+
id: "t3z83az7el0ravt2i_a"
|
|
4103
4030
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
4104
4031
|
fill: "#fff",
|
|
4105
4032
|
transform: "translate(.552)",
|
|
@@ -4108,7 +4035,62 @@ var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
|
4108
4035
|
};
|
|
4109
4036
|
var ForwardRef$9 = /*#__PURE__*/React.forwardRef(SvgEmptyTable);
|
|
4110
4037
|
|
|
4111
|
-
var css$
|
|
4038
|
+
var css$g = {"sticky-header":"n17vm3","table":"xo9KCG","no-results":"VHgS0y","no-results-icon":"IYml-v","no-results-title":"Q2QLjx","stickyHeader":"n17vm3","noResults":"VHgS0y","noResultsIcon":"IYml-v","noResultsTitle":"Q2QLjx"};
|
|
4039
|
+
|
|
4040
|
+
var css$f = {"listContainer":"iDegmz","header":"vfZjHc","group":"_95hELF","stickyHeader":"_1qQ29Z"};
|
|
4041
|
+
|
|
4042
|
+
const getChildrenAndRest = (row, rows) => {
|
|
4043
|
+
const firstNotChildIndex = rows.findIndex((other) => other.depth < row.depth || (row.depth === other.depth && other.isPinned));
|
|
4044
|
+
if (firstNotChildIndex === -1) {
|
|
4045
|
+
return [rows, []];
|
|
4046
|
+
}
|
|
4047
|
+
if (firstNotChildIndex === 0) {
|
|
4048
|
+
return [[], rows];
|
|
4049
|
+
}
|
|
4050
|
+
const children = rows.slice(0, firstNotChildIndex);
|
|
4051
|
+
const rest = rows.slice(firstNotChildIndex, rows.length);
|
|
4052
|
+
return [children, rest];
|
|
4053
|
+
};
|
|
4054
|
+
|
|
4055
|
+
function DataRowsGroup({ row, childRows, renderRow, top = 1, }) {
|
|
4056
|
+
var _a, _b;
|
|
4057
|
+
const rowRef = React.useRef();
|
|
4058
|
+
const childrenPinnedTop = row.isPinned ? (top + ((_b = (_a = rowRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0)) : top;
|
|
4059
|
+
return (React__namespace.default.createElement("div", { className: css$f.group, key: row.rowKey },
|
|
4060
|
+
React__namespace.default.createElement("div", { className: row.isPinned ? css$f.stickyHeader : css$f.header,
|
|
4061
|
+
// Gaps between pinned parents should be removed by -1 from top height.
|
|
4062
|
+
// Otherwise, sometimes top value is rounded top.
|
|
4063
|
+
style: { zIndex: row.depth + 10, top: top - 1 }, ref: rowRef }, renderRow(row)),
|
|
4064
|
+
childRows.length > 0 && (React__namespace.default.createElement("div", null,
|
|
4065
|
+
React__namespace.default.createElement(DataRowsGroups, { rows: childRows, renderRow: renderRow, top: childrenPinnedTop })))));
|
|
4066
|
+
}
|
|
4067
|
+
const renderRows = (rows, renderRow, top) => {
|
|
4068
|
+
if (!rows.length)
|
|
4069
|
+
return [];
|
|
4070
|
+
const [row, ...rest] = rows;
|
|
4071
|
+
if (!rest.length) {
|
|
4072
|
+
return [renderRow(row)];
|
|
4073
|
+
}
|
|
4074
|
+
const [next] = rest;
|
|
4075
|
+
if (next.depth <= row.depth && !row.isPinned) {
|
|
4076
|
+
return [renderRow(row)].concat(renderRows(rest, renderRow, top));
|
|
4077
|
+
}
|
|
4078
|
+
const [children, otherRows] = getChildrenAndRest(row, rest);
|
|
4079
|
+
const group = (React__namespace.default.createElement(DataRowsGroup, { row: row, childRows: children, renderRow: renderRow, top: top, key: row.rowKey }));
|
|
4080
|
+
return [group].concat(renderRows(otherRows, renderRow, top));
|
|
4081
|
+
};
|
|
4082
|
+
function DataRowsGroups({ rows, renderRow, top = 1, }) {
|
|
4083
|
+
const rowsWithGroups = renderRows(rows, renderRow, top);
|
|
4084
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
4085
|
+
return (React__namespace.default.createElement(React__namespace.default.Fragment, null, rowsWithGroups));
|
|
4086
|
+
}
|
|
4087
|
+
|
|
4088
|
+
function DataRowsContainer({ estimatedHeight, listContainerRef, offsetY, rows, renderRow, headerRef, }) {
|
|
4089
|
+
var _a;
|
|
4090
|
+
return (React__namespace.default.createElement("div", { className: css$f.listContainer, style: { minHeight: `${estimatedHeight}px` } },
|
|
4091
|
+
React__namespace.default.createElement("div", { ref: listContainerRef, role: "rowgroup", style: { marginTop: offsetY } },
|
|
4092
|
+
React__namespace.default.createElement(DataRowsGroups, { rows: rows, renderRow: renderRow, top: (_a = headerRef === null || headerRef === void 0 ? void 0 : headerRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight }))));
|
|
4093
|
+
}
|
|
4112
4094
|
|
|
4113
4095
|
function DataTable(props) {
|
|
4114
4096
|
var _a;
|
|
@@ -4117,15 +4099,15 @@ function DataTable(props) {
|
|
|
4117
4099
|
const columnsWithFilters = useColumnsWithFilters(props.columns, props.filters);
|
|
4118
4100
|
const { columns, config, defaultConfig } = uuiCore.useColumnsConfig(columnsWithFilters, (_a = props.value) === null || _a === void 0 ? void 0 : _a.columnsConfig);
|
|
4119
4101
|
const defaultRenderRow = React__namespace.useCallback((rowProps) => {
|
|
4120
|
-
return React__namespace.createElement(DataTableRow, Object.assign({ key: rowProps.rowKey, size: props.size, borderBottom: props.border }, rowProps, { cx: css$
|
|
4102
|
+
return React__namespace.createElement(DataTableRow, Object.assign({ key: rowProps.rowKey, size: props.size, borderBottom: props.border }, rowProps, { cx: css$g.cell }));
|
|
4121
4103
|
}, []);
|
|
4122
4104
|
const renderRow = (row) => { var _a; return ((_a = props.renderRow) !== null && _a !== void 0 ? _a : defaultRenderRow)(Object.assign(Object.assign({}, row), { columns })); };
|
|
4123
4105
|
const rows = props.getRows();
|
|
4124
4106
|
const renderNoResultsBlock = React__namespace.useCallback(() => {
|
|
4125
4107
|
var _a;
|
|
4126
|
-
return (React__namespace.createElement("div", { className: css$
|
|
4127
|
-
React__namespace.createElement(uuiComponents.IconContainer, { cx: css$
|
|
4128
|
-
React__namespace.createElement(Text, { cx: css$
|
|
4108
|
+
return (React__namespace.createElement("div", { className: css$g.noResults }, props.renderNoResultsBlock ? ((_a = props.renderNoResultsBlock) === null || _a === void 0 ? void 0 : _a.call(props)) : (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4109
|
+
React__namespace.createElement(uuiComponents.IconContainer, { cx: css$g.noResultsIcon, icon: ForwardRef$9 }),
|
|
4110
|
+
React__namespace.createElement(Text, { cx: css$g.noResultsTitle, fontSize: "24", lineHeight: "30", color: "primary", font: "semibold" }, i18n.tables.noResultsBlock.title),
|
|
4129
4111
|
React__namespace.createElement(Text, { fontSize: "16", lineHeight: "24", font: "regular", color: "primary" }, i18n.tables.noResultsBlock.message)))));
|
|
4130
4112
|
}, [props.renderNoResultsBlock]);
|
|
4131
4113
|
const onConfigurationButtonClick = React__namespace.useCallback(() => {
|
|
@@ -4142,26 +4124,25 @@ function DataTable(props) {
|
|
|
4142
4124
|
props.columns, config, defaultConfig, props.value, props.onValueChange, props.renderColumnsConfigurationModal,
|
|
4143
4125
|
]);
|
|
4144
4126
|
const renderRowsContainer = React__namespace.useCallback(({ listContainerRef, estimatedHeight, offsetY, scrollShadows }) => (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4145
|
-
React__namespace.createElement("div", { className: css$
|
|
4127
|
+
React__namespace.createElement("div", { className: css$g.stickyHeader, ref: headerRef },
|
|
4146
4128
|
React__namespace.createElement(DataTableHeaderRow, { columns: columns, onConfigButtonClick: props.showColumnsConfig && onConfigurationButtonClick, selectAll: props.selectAll, size: props.size, textCase: props.headerTextCase, allowColumnsReordering: props.allowColumnsReordering, allowColumnsResizing: props.allowColumnsResizing, value: Object.assign(Object.assign({}, props.value), { columnsConfig: config }), onValueChange: props.onValueChange }),
|
|
4147
4129
|
React__namespace.createElement("div", { className: uuiCore.cx(uuiCore.uuiScrollShadows.top, {
|
|
4148
4130
|
[uuiCore.uuiScrollShadows.topVisible]: scrollShadows.verticalTop,
|
|
4149
4131
|
}) })),
|
|
4150
|
-
props.exactRowsCount !== 0 ? (React__namespace.createElement(DataRowsContainer, { headerRef: headerRef, listContainerRef: listContainerRef, estimatedHeight: estimatedHeight, offsetY: offsetY, scrollShadows: scrollShadows, renderRow: renderRow, rows: rows })) : (renderNoResultsBlock === null || renderNoResultsBlock === void 0 ? void 0 : renderNoResultsBlock()),
|
|
4151
|
-
React__namespace.createElement(Blocker, { isEnabled: props.isReloading }))), [
|
|
4132
|
+
props.exactRowsCount !== 0 ? (React__namespace.createElement(DataRowsContainer, { headerRef: headerRef, listContainerRef: listContainerRef, estimatedHeight: estimatedHeight, offsetY: offsetY, scrollShadows: scrollShadows, renderRow: renderRow, rows: rows })) : (renderNoResultsBlock === null || renderNoResultsBlock === void 0 ? void 0 : renderNoResultsBlock()))), [
|
|
4152
4133
|
props, columns, rows, renderNoResultsBlock, onConfigurationButtonClick,
|
|
4153
4134
|
]);
|
|
4154
4135
|
return (React__namespace.createElement(uuiComponents.DataTableSelectionProvider, { onCopy: props.onCopy, rows: rows, columns: columns },
|
|
4155
|
-
React__namespace.createElement(VirtualList, { value: props.value, onValueChange: props.onValueChange, onScroll: props.onScroll, rowsCount: props.rowsCount, renderRows: renderRowsContainer, cx: uuiCore.cx(css$
|
|
4136
|
+
React__namespace.createElement(VirtualList, { value: props.value, onValueChange: props.onValueChange, onScroll: props.onScroll, rowsCount: props.rowsCount, renderRows: renderRowsContainer, cx: uuiCore.cx(css$g.table), isLoading: props.isReloading, rowsSelector: "[role=row]", rawProps: {
|
|
4156
4137
|
role: 'table',
|
|
4157
4138
|
'aria-colcount': columns.length,
|
|
4158
4139
|
'aria-rowcount': props.rowsCount,
|
|
4159
4140
|
} })));
|
|
4160
4141
|
}
|
|
4161
4142
|
|
|
4162
|
-
var css$e = {"root":"
|
|
4143
|
+
var css$e = {"root":"fsMBiv"};
|
|
4163
4144
|
|
|
4164
|
-
var css$d = {"root":"
|
|
4145
|
+
var css$d = {"root":"ZE1-SK","burger-content":"p9lqOI","burgerContent":"p9lqOI"};
|
|
4165
4146
|
|
|
4166
4147
|
var _path$7;
|
|
4167
4148
|
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
|
|
@@ -4194,7 +4175,7 @@ var SvgBurgerClose = function SvgBurgerClose(props, ref) {
|
|
|
4194
4175
|
var ForwardRef$7 = /*#__PURE__*/React.forwardRef(SvgBurgerClose);
|
|
4195
4176
|
|
|
4196
4177
|
function applyBurgerMods() {
|
|
4197
|
-
return [
|
|
4178
|
+
return [css$d.root];
|
|
4198
4179
|
}
|
|
4199
4180
|
const Burger = uuiCore.withMods(uuiComponents.Burger, applyBurgerMods, () => ({
|
|
4200
4181
|
burgerIcon: ForwardRef$8,
|
|
@@ -4228,15 +4209,10 @@ var SvgTriangle = function SvgTriangle(props, ref) {
|
|
|
4228
4209
|
};
|
|
4229
4210
|
var ForwardRef$6 = /*#__PURE__*/React.forwardRef(SvgTriangle);
|
|
4230
4211
|
|
|
4231
|
-
var css$c = {"root":"
|
|
4212
|
+
var css$c = {"root":"Q-i3AK","button-primary":"_02zDSe","button-secondary":"CT92mt","hasIcon":"ukj9ak","dropdown":"_6lFcVt","buttonPrimary":"_02zDSe","buttonSecondary":"CT92mt"};
|
|
4232
4213
|
|
|
4233
4214
|
const BurgerButton = uuiCore.withMods(uuiComponents.Button, (props) => [
|
|
4234
|
-
css$c.root,
|
|
4235
|
-
'uui-main_menu-burger-button',
|
|
4236
|
-
css$c['button-' + (props.type || 'primary')],
|
|
4237
|
-
css$c['indent-' + (props.indentLevel || 0)],
|
|
4238
|
-
props.isDropdown && css$c.dropdown,
|
|
4239
|
-
props.icon && css$c.hasIcon,
|
|
4215
|
+
css$c.root, css$c['button-' + (props.type || 'primary')], css$c['indent-' + (props.indentLevel || 0)], props.isDropdown && css$c.dropdown, props.icon && css$c.hasIcon,
|
|
4240
4216
|
], () => ({ dropdownIcon: ForwardRef$6, dropdownIconPosition: 'left', role: 'menuitem' }));
|
|
4241
4217
|
|
|
4242
4218
|
function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
|
|
@@ -4285,21 +4261,21 @@ var SvgMenuInputCancel = function SvgMenuInputCancel(props, ref) {
|
|
|
4285
4261
|
};
|
|
4286
4262
|
var ForwardRef$5 = /*#__PURE__*/React.forwardRef(SvgMenuInputCancel);
|
|
4287
4263
|
|
|
4288
|
-
var css$b = {"search-input":"
|
|
4264
|
+
var css$b = {"search-input":"r0XjCb","searchInput":"r0XjCb"};
|
|
4289
4265
|
|
|
4290
4266
|
function BurgerSearch(props) {
|
|
4291
|
-
return (React__namespace.createElement(uuiComponents.TextInput, { cx:
|
|
4267
|
+
return (React__namespace.createElement(uuiComponents.TextInput, { cx: css$b.searchInput, iconPosition: "left", icon: ForwardRef$15, placeholder: props.placeholder, value: props.value, onValueChange: props.onValueChange, onCancel: props.onCancel, cancelIcon: props.value && ForwardRef$5 }));
|
|
4292
4268
|
}
|
|
4293
4269
|
|
|
4294
|
-
var css$a = {"
|
|
4270
|
+
var css$a = {"group-header":"p0YbjB","group-name":"_7TGLSX","line":"Mifo-d","groupHeader":"p0YbjB","groupName":"_7TGLSX"};
|
|
4295
4271
|
|
|
4296
4272
|
function BurgerGroupHeader(props) {
|
|
4297
|
-
return (React__namespace.createElement("div", { className:
|
|
4273
|
+
return (React__namespace.createElement("div", { className: css$a.groupHeader },
|
|
4298
4274
|
React__namespace.createElement("hr", { className: css$a.line }),
|
|
4299
4275
|
React__namespace.createElement("span", { className: css$a.groupName }, props.caption)));
|
|
4300
4276
|
}
|
|
4301
4277
|
|
|
4302
|
-
var css$9 = {"root":"
|
|
4278
|
+
var css$9 = {"root":"R8rVR3","type-primary":"i8As46","type-secondary":"J5I5nT","typePrimary":"i8As46","typeSecondary":"J5I5nT"};
|
|
4303
4279
|
|
|
4304
4280
|
var _path$4;
|
|
4305
4281
|
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
@@ -4319,7 +4295,7 @@ var ForwardRef$4 = /*#__PURE__*/React.forwardRef(SvgChevronDown24);
|
|
|
4319
4295
|
|
|
4320
4296
|
const MainMenuButton = uuiCore.withMods(uuiComponents.Button, (mods) => [css$9.root, css$9['type-' + (mods.type || 'primary')]], () => ({ dropdownIcon: ForwardRef$4, role: 'menuitem' }));
|
|
4321
4297
|
|
|
4322
|
-
var css$8 = {"dropdown-body":"
|
|
4298
|
+
var css$8 = {"dropdown-body":"T3q0-j","dropdownBody":"T3q0-j"};
|
|
4323
4299
|
|
|
4324
4300
|
class MainMenuDropdown extends React__namespace.Component {
|
|
4325
4301
|
render() {
|
|
@@ -4330,7 +4306,7 @@ class MainMenuDropdown extends React__namespace.Component {
|
|
|
4330
4306
|
}
|
|
4331
4307
|
};
|
|
4332
4308
|
return (React__namespace.createElement(FocusLock__default.default, { returnFocus: true, persistentFocus: true, lockProps: { onKeyDown: handleEscape } },
|
|
4333
|
-
React__namespace.createElement("div", { className: cx__default.default(css$8.dropdownBody
|
|
4309
|
+
React__namespace.createElement("div", { className: cx__default.default(css$8.dropdownBody) }, this.props.renderBody
|
|
4334
4310
|
? this.props.renderBody(Object.assign({}, props))
|
|
4335
4311
|
: React__namespace.Children.map(this.props.children, (item) => {
|
|
4336
4312
|
if (!item)
|
|
@@ -4347,12 +4323,9 @@ class MainMenuDropdown extends React__namespace.Component {
|
|
|
4347
4323
|
}
|
|
4348
4324
|
|
|
4349
4325
|
function applyMainMenuMods() {
|
|
4350
|
-
return [
|
|
4351
|
-
css$e.root,
|
|
4352
|
-
'uui-main_menu',
|
|
4353
|
-
];
|
|
4326
|
+
return [css$e.root];
|
|
4354
4327
|
}
|
|
4355
|
-
const MainMenu = uuiCore.withMods(
|
|
4328
|
+
const MainMenu = uuiCore.withMods(uuiComponents__namespace.MainMenu, applyMainMenuMods, () => ({
|
|
4356
4329
|
Burger,
|
|
4357
4330
|
MainMenuDropdown,
|
|
4358
4331
|
}));
|
|
@@ -4373,12 +4346,12 @@ var SvgGlobalMenu = function SvgGlobalMenu(props, ref) {
|
|
|
4373
4346
|
};
|
|
4374
4347
|
var ForwardRef$3 = /*#__PURE__*/React.forwardRef(SvgGlobalMenu);
|
|
4375
4348
|
|
|
4376
|
-
var css$7 = {"global-menu-btn":"
|
|
4349
|
+
var css$7 = {"global-menu-btn":"QN4W5W","globalMenuIcon":"s0u9hf","globalMenuBtn":"QN4W5W"};
|
|
4377
4350
|
|
|
4378
4351
|
const GlobalMenu = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("button", Object.assign({ ref: ref, id: "global_menu_toggle", className: cx__default.default(css$7.globalMenuBtn, props.cx) }, props.rawProps),
|
|
4379
4352
|
React__namespace.createElement(uuiComponents.IconContainer, { icon: ForwardRef$3, cx: css$7.globalMenuIcon }))));
|
|
4380
4353
|
|
|
4381
|
-
var css$6 = {"container":"
|
|
4354
|
+
var css$6 = {"container":"He0gDq","open":"VSZ-K3"};
|
|
4382
4355
|
|
|
4383
4356
|
const MainMenuAvatar = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("button", { ref: ref, className: cx__default.default(css$6.container, props.isDropdown && css$6.dropdown, props.isOpen && css$6.open, props.onClick && uuiCore.uuiMarkers.clickable, props.cx), onClick: props.onClick },
|
|
4384
4357
|
React__namespace.createElement(uuiComponents.Avatar, { size: "36", img: props.avatarUrl }),
|
|
@@ -4386,18 +4359,18 @@ const MainMenuAvatar = React__namespace.forwardRef((props, ref) => (React__names
|
|
|
4386
4359
|
props.isDropdown && (React__namespace.createElement("div", null,
|
|
4387
4360
|
React__namespace.createElement(uuiComponents.IconContainer, { icon: ForwardRef$1b, flipY: props.isOpen }))))));
|
|
4388
4361
|
|
|
4389
|
-
var css$5 = {"search-input":"
|
|
4362
|
+
var css$5 = {"search-input":"Ar25VF","searchInput":"Ar25VF"};
|
|
4390
4363
|
|
|
4391
4364
|
const MainMenuSearch = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(uuiCore.IEditableDebouncer, Object.assign({}, props, { render: (iEditable) => {
|
|
4392
4365
|
var _a;
|
|
4393
4366
|
return (React__namespace.createElement(uuiComponents.TextInput, Object.assign({ iconPosition: "left", icon: ForwardRef$15, cancelIcon: ((_a = props.value) === null || _a === void 0 ? void 0 : _a.length) > 0 && ForwardRef$5 }, props, iEditable, { ref: ref, cx: uuiCore.cx(css$5.searchInput, props.cx) }, props.rawProps)));
|
|
4394
4367
|
} }))));
|
|
4395
4368
|
|
|
4396
|
-
var css$4 = {"container":"
|
|
4369
|
+
var css$4 = {"container":"iAkKgc"};
|
|
4397
4370
|
|
|
4398
4371
|
const MainMenuIcon = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(IconButton, Object.assign({ ref: ref, icon: props.icon, cx: uuiCore.cx(props.cx, css$4.container) }, props))));
|
|
4399
4372
|
|
|
4400
|
-
var css$3 = {"root":"
|
|
4373
|
+
var css$3 = {"root":"ld2tT3"};
|
|
4401
4374
|
|
|
4402
4375
|
const Anchor = uuiCore.withMods(uuiComponents.Anchor, () => [css$3.root]);
|
|
4403
4376
|
|
|
@@ -4454,7 +4427,7 @@ var SvgShape = function SvgShape(props, ref) {
|
|
|
4454
4427
|
};
|
|
4455
4428
|
var ForwardRef$2 = /*#__PURE__*/React.forwardRef(SvgShape);
|
|
4456
4429
|
|
|
4457
|
-
var css$2 = {"root":"
|
|
4430
|
+
var css$2 = {"root":"P4jVtu","drop-start":"YwK8vh","drop-over":"Au6-Co","link":"XtlE6u","drop-area":"Zh3W1v","icon-blue":"dj7re3","dropStart":"YwK8vh","dropOver":"Au6-Co","dropArea":"Zh3W1v","iconBlue":"dj7re3"};
|
|
4458
4431
|
|
|
4459
4432
|
class DropSpot extends React__namespace.Component {
|
|
4460
4433
|
constructor() {
|
|
@@ -4478,9 +4451,9 @@ class DropSpot extends React__namespace.Component {
|
|
|
4478
4451
|
}
|
|
4479
4452
|
}
|
|
4480
4453
|
|
|
4481
|
-
var css$1 = {"
|
|
4454
|
+
var css$1 = {"file-card-wrapper":"XlyZ-g","file-name":"VBEfku","error-card-wrapper":"jOCM7-","default-color":"oJRqcW","doc-color":"dizH5J","xls-color":"jb1Pdt","pdf-color":"xsBzvk","movie-color":"RD6RHV","img-color":"wAzRUt","error-block":"ei1QGW","icons-block":"_6nRMFF","fileCardWrapper":"XlyZ-g","fileName":"VBEfku","errorCardWrapper":"jOCM7-","defaultColor":"oJRqcW","docColor":"dizH5J","xlsColor":"jb1Pdt","pdfColor":"xsBzvk","movieColor":"RD6RHV","imgColor":"wAzRUt","errorBlock":"ei1QGW","iconsBlock":"_6nRMFF"};
|
|
4482
4455
|
|
|
4483
|
-
var css = {"root":"
|
|
4456
|
+
var css = {"root":"hWmFwp"};
|
|
4484
4457
|
|
|
4485
4458
|
const SvgCircleProgress = React__namespace.forwardRef((props, ref) => {
|
|
4486
4459
|
const outsetRadius = props.size / 2 - 1;
|
|
@@ -4549,7 +4522,7 @@ const FileCard = React__namespace.forwardRef((props, ref) => {
|
|
|
4549
4522
|
case 'mp4':
|
|
4550
4523
|
case 'wmw':
|
|
4551
4524
|
case 'mkv':
|
|
4552
|
-
return React__namespace.createElement(uuiComponents.IconContainer, { size: 24, icon: fileIcons.videoIcon, cx: css$1.
|
|
4525
|
+
return React__namespace.createElement(uuiComponents.IconContainer, { size: 24, icon: fileIcons.videoIcon, cx: css$1.movieColor });
|
|
4553
4526
|
case 'csv':
|
|
4554
4527
|
case 'xml':
|
|
4555
4528
|
return React__namespace.createElement(uuiComponents.IconContainer, { size: 24, icon: fileIcons.tableIcon, cx: css$1.defaultColor });
|
|
@@ -4588,7 +4561,7 @@ const FileCard = React__namespace.forwardRef((props, ref) => {
|
|
|
4588
4561
|
progress && progress < 100 && abortXHR();
|
|
4589
4562
|
onClick();
|
|
4590
4563
|
};
|
|
4591
|
-
return (React__namespace.createElement(FlexCell, { ref: ref, cx: uuiCore.cx(css$1.
|
|
4564
|
+
return (React__namespace.createElement(FlexCell, { ref: ref, cx: uuiCore.cx(css$1.fileCardWrapper, (isLoading || (error === null || error === void 0 ? void 0 : error.isError)) && uuiCore.uuiMod.loading, componentCx, (error === null || error === void 0 ? void 0 : error.isError) && css$1.errorCardWrapper), minWidth: width, width: !width ? '100%' : undefined },
|
|
4592
4565
|
React__namespace.createElement(FlexRow, { cx: css$1.fileCardRow, size: "36", alignItems: "top", spacing: "6" },
|
|
4593
4566
|
fileExtension && getIcon(fileExtension),
|
|
4594
4567
|
React__namespace.createElement(FlexCell, { width: "100%" },
|
|
@@ -4666,7 +4639,6 @@ exports.HintNotification = HintNotification;
|
|
|
4666
4639
|
exports.IconButton = IconButton;
|
|
4667
4640
|
exports.IndeterminateBar = IndeterminateBar;
|
|
4668
4641
|
exports.IndicatorBar = IndicatorBar;
|
|
4669
|
-
exports.Informer = Informer;
|
|
4670
4642
|
exports.InputAddon = InputAddon;
|
|
4671
4643
|
exports.LabeledInput = LabeledInput;
|
|
4672
4644
|
exports.LinkButton = LinkButton;
|
|
@@ -4719,7 +4691,8 @@ exports.VirtualList = VirtualList;
|
|
|
4719
4691
|
exports.WarningAlert = WarningAlert;
|
|
4720
4692
|
exports.WarningNotification = WarningNotification;
|
|
4721
4693
|
exports.allButtonColors = allButtonColors;
|
|
4722
|
-
exports.
|
|
4694
|
+
exports.allButtonModes = allButtonModes;
|
|
4695
|
+
exports.allButtonSemanticColors = allButtonSemanticColors;
|
|
4723
4696
|
exports.allEpamBadgeSemanticColors = allEpamBadgeSemanticColors;
|
|
4724
4697
|
exports.allFillStyles = allFillStyles;
|
|
4725
4698
|
exports.allFontStyles = allFontStyles;
|
|
@@ -4728,7 +4701,6 @@ exports.allLinkButtonColors = allLinkButtonColors;
|
|
|
4728
4701
|
exports.allRowSizes = allRowSizes;
|
|
4729
4702
|
exports.allSemanticColors = allSemanticColors;
|
|
4730
4703
|
exports.allSizes = allSizes;
|
|
4731
|
-
exports.allTextColors = allTextColors;
|
|
4732
4704
|
exports.allTextSizes = allTextSizes;
|
|
4733
4705
|
exports.applyBadgeMods = applyBadgeMods;
|
|
4734
4706
|
exports.applyButtonMods = applyButtonMods;
|