@epam/uui 4.10.1 → 4.11.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/styles/controlLayout.scss +16 -0
- package/assets/styles/effects.scss +3 -2
- package/assets/styles/inputs.scss +10 -10
- package/assets/styles/prettifyScrollBar.scss +10 -2
- package/assets/styles/typography-mixins.scss +159 -0
- package/assets/styles/typography.scss +35 -0
- package/assets/styles/variables/widgets/badge.scss +36 -36
- package/components/buttons/Button/Button.d.ts +13 -0
- package/components/buttons/Button/Button.d.ts.map +1 -0
- package/components/buttons/Button/Button.test.d.ts +2 -0
- package/components/buttons/Button/Button.test.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 -3
- package/components/buttons/IconButton.d.ts.map +1 -1
- package/components/buttons/LinkButton.d.ts +3 -4
- package/components/buttons/LinkButton.d.ts.map +1 -1
- package/components/buttons/TabButton.d.ts +2 -3
- package/components/buttons/TabButton.d.ts.map +1 -1
- package/components/buttons/VerticalTabButton.d.ts +2 -2
- package/components/buttons/VerticalTabButton.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/Calendar.d.ts +5 -0
- package/components/datePickers/Calendar.d.ts.map +1 -0
- package/components/datePickers/CalendarPresets.d.ts +4 -0
- package/components/datePickers/CalendarPresets.d.ts.map +1 -0
- package/components/datePickers/DatePicker.d.ts +13 -0
- package/components/datePickers/DatePicker.d.ts.map +1 -0
- package/components/datePickers/DatePickerBody.d.ts +4 -0
- package/components/datePickers/DatePickerBody.d.ts.map +1 -0
- package/components/datePickers/RangeDatePicker.d.ts +13 -0
- package/components/datePickers/RangeDatePicker.d.ts.map +1 -0
- package/components/datePickers/RangeDatePickerBody.d.ts +4 -0
- package/components/datePickers/RangeDatePickerBody.d.ts.map +1 -0
- package/components/datePickers/index.d.ts +6 -0
- package/components/datePickers/index.d.ts.map +1 -0
- package/components/dnd/DropMarker.d.ts +9 -0
- package/components/dnd/DropMarker.d.ts.map +1 -0
- package/components/dnd/index.d.ts +2 -0
- package/components/dnd/index.d.ts.map +1 -0
- package/components/filters/FilterDataPickerBody.d.ts +14 -0
- package/components/filters/FilterDataPickerBody.d.ts.map +1 -0
- package/components/filters/FilterItemBody.d.ts +3 -0
- package/components/filters/FilterItemBody.d.ts.map +1 -0
- package/components/filters/FilterNumericBody.d.ts +13 -0
- package/components/filters/FilterNumericBody.d.ts.map +1 -0
- package/components/filters/FilterPanelItemToggler.d.ts +13 -0
- package/components/filters/FilterPanelItemToggler.d.ts.map +1 -0
- package/components/filters/FilterPickerBody.d.ts +20 -0
- package/components/filters/FilterPickerBody.d.ts.map +1 -0
- package/components/filters/FilterRangeDatePickerBody.d.ts +19 -0
- package/components/filters/FilterRangeDatePickerBody.d.ts.map +1 -0
- package/components/filters/FiltersPanel.d.ts +9 -0
- package/components/filters/FiltersPanel.d.ts.map +1 -0
- package/components/filters/FiltersPanelItem.d.ts +8 -0
- package/components/filters/FiltersPanelItem.d.ts.map +1 -0
- package/components/filters/PresetPanel/Preset.d.ts +9 -0
- package/components/filters/PresetPanel/Preset.d.ts.map +1 -0
- package/components/filters/PresetPanel/PresetActionsDropdown.d.ts +10 -0
- package/components/filters/PresetPanel/PresetActionsDropdown.d.ts.map +1 -0
- package/components/filters/PresetPanel/PresetInput.d.ts +9 -0
- package/components/filters/PresetPanel/PresetInput.d.ts.map +1 -0
- package/components/filters/PresetPanel/PresetsPanel.d.ts +7 -0
- package/components/filters/PresetPanel/PresetsPanel.d.ts.map +1 -0
- package/components/filters/PresetPanel/index.d.ts +2 -0
- package/components/filters/PresetPanel/index.d.ts.map +1 -0
- package/components/filters/defaultPredicates.d.ts +5 -0
- package/components/filters/defaultPredicates.d.ts.map +1 -0
- package/components/filters/index.d.ts +5 -0
- package/components/filters/index.d.ts.map +1 -0
- package/components/forms/Form.d.ts +4 -0
- package/components/forms/Form.d.ts.map +1 -0
- package/components/forms/index.d.ts +3 -0
- package/components/forms/index.d.ts.map +1 -0
- package/components/forms/useForm.d.ts +3 -0
- package/components/forms/useForm.d.ts.map +1 -0
- package/components/index.d.ts +5 -0
- package/components/index.d.ts.map +1 -1
- package/components/inputs/Checkbox.d.ts +5 -6
- package/components/inputs/Checkbox.d.ts.map +1 -1
- package/components/inputs/MultiSwitch.d.ts +16 -0
- package/components/inputs/MultiSwitch.d.ts.map +1 -0
- package/components/inputs/NumericInput.d.ts +9 -0
- package/components/inputs/NumericInput.d.ts.map +1 -0
- package/components/inputs/RadioInput.d.ts +3 -4
- package/components/inputs/RadioInput.d.ts.map +1 -1
- package/components/inputs/Switch.d.ts +1 -3
- package/components/inputs/Switch.d.ts.map +1 -1
- package/components/inputs/TextArea.d.ts +10 -0
- package/components/inputs/TextArea.d.ts.map +1 -0
- package/components/inputs/TextInput.d.ts +4 -5
- package/components/inputs/TextInput.d.ts.map +1 -1
- package/components/inputs/index.d.ts +3 -0
- package/components/inputs/index.d.ts.map +1 -1
- package/components/layout/Accordion.d.ts +1 -3
- package/components/layout/Accordion.d.ts.map +1 -1
- package/components/layout/Blocker.d.ts +4 -0
- package/components/layout/Blocker.d.ts.map +1 -0
- package/components/layout/CheckboxGroup.d.ts +3 -0
- package/components/layout/CheckboxGroup.d.ts.map +1 -0
- package/components/layout/ControlGroup.d.ts +1 -2
- package/components/layout/ControlGroup.d.ts.map +1 -1
- package/components/layout/FlexItems/FlexCell.d.ts +2 -2
- package/components/layout/FlexItems/FlexCell.d.ts.map +1 -1
- package/components/layout/FlexItems/FlexRow.d.ts +1 -2
- package/components/layout/FlexItems/FlexRow.d.ts.map +1 -1
- package/components/layout/FlexItems/Panel.d.ts +2 -5
- package/components/layout/FlexItems/Panel.d.ts.map +1 -1
- package/components/layout/LabeledInput.d.ts +1 -3
- package/components/layout/LabeledInput.d.ts.map +1 -1
- package/components/layout/RadioGroup.d.ts +1 -2
- package/components/layout/RadioGroup.d.ts.map +1 -1
- package/components/layout/ScrollBars.d.ts +1 -3
- package/components/layout/ScrollBars.d.ts.map +1 -1
- package/components/layout/VirtualList.d.ts +1 -6
- package/components/layout/VirtualList.d.ts.map +1 -1
- package/components/layout/index.d.ts +3 -1
- package/components/layout/index.d.ts.map +1 -1
- package/components/navigation/MainMenu/Burger/Burger.d.ts +6 -0
- package/components/navigation/MainMenu/Burger/Burger.d.ts.map +1 -0
- package/components/navigation/MainMenu/Burger/BurgerButton.d.ts +8 -0
- package/components/navigation/MainMenu/Burger/BurgerButton.d.ts.map +1 -0
- package/components/navigation/MainMenu/Burger/BurgerGroupHeader.d.ts +5 -0
- package/components/navigation/MainMenu/Burger/BurgerGroupHeader.d.ts.map +1 -0
- package/components/navigation/MainMenu/Burger/BurgerSearch.d.ts +5 -0
- package/components/navigation/MainMenu/Burger/BurgerSearch.d.ts.map +1 -0
- package/components/navigation/MainMenu/Burger/index.d.ts +5 -0
- package/components/navigation/MainMenu/Burger/index.d.ts.map +1 -0
- package/components/navigation/MainMenu/GlobalMenu.d.ts +6 -0
- package/components/navigation/MainMenu/GlobalMenu.d.ts.map +1 -0
- package/components/navigation/MainMenu/MainMenu.d.ts +5 -0
- package/components/navigation/MainMenu/MainMenu.d.ts.map +1 -0
- package/components/navigation/MainMenu/MainMenuAvatar.d.ts +8 -0
- package/components/navigation/MainMenu/MainMenuAvatar.d.ts.map +1 -0
- package/components/navigation/MainMenu/MainMenuButton.d.ts +7 -0
- package/components/navigation/MainMenu/MainMenuButton.d.ts.map +1 -0
- package/components/navigation/MainMenu/MainMenuDropdown.d.ts +6 -0
- package/components/navigation/MainMenu/MainMenuDropdown.d.ts.map +1 -0
- package/components/navigation/MainMenu/MainMenuIcon.d.ts +8 -0
- package/components/navigation/MainMenu/MainMenuIcon.d.ts.map +1 -0
- package/components/navigation/MainMenu/MainMenuSearch.d.ts +7 -0
- package/components/navigation/MainMenu/MainMenuSearch.d.ts.map +1 -0
- package/components/navigation/MainMenu/index.d.ts +9 -0
- package/components/navigation/MainMenu/index.d.ts.map +1 -0
- package/components/navigation/index.d.ts +2 -0
- package/components/navigation/index.d.ts.map +1 -0
- package/components/overlays/Alert.d.ts +24 -0
- package/components/overlays/Alert.d.ts.map +1 -0
- package/components/overlays/ConfirmationModal.d.ts +11 -0
- package/components/overlays/ConfirmationModal.d.ts.map +1 -0
- package/components/overlays/DropdownContainer.d.ts +6 -4
- package/components/overlays/DropdownContainer.d.ts.map +1 -1
- package/components/overlays/DropdownMenu.d.ts +12 -14
- package/components/overlays/DropdownMenu.d.ts.map +1 -1
- package/components/overlays/Modals.d.ts +2 -6
- package/components/overlays/Modals.d.ts.map +1 -1
- package/components/overlays/NotificationCard.d.ts +12 -17
- package/components/overlays/NotificationCard.d.ts.map +1 -1
- package/components/overlays/Tooltip.d.ts +2 -3
- package/components/overlays/Tooltip.d.ts.map +1 -1
- package/components/overlays/index.d.ts +1 -0
- package/components/overlays/index.d.ts.map +1 -1
- package/components/pickers/DataPickerBody.d.ts +2 -1
- package/components/pickers/DataPickerBody.d.ts.map +1 -1
- package/components/pickers/DataPickerFooter.d.ts.map +1 -1
- package/components/pickers/PickerInput.d.ts +1 -1
- package/components/pickers/PickerInput.d.ts.map +1 -1
- package/components/pickers/PickerItem.d.ts +2 -1
- package/components/pickers/PickerItem.d.ts.map +1 -1
- package/components/pickers/PickerModal.d.ts +2 -1
- package/components/pickers/PickerModal.d.ts.map +1 -1
- package/components/pickers/PickerToggler.d.ts +0 -1
- package/components/pickers/PickerToggler.d.ts.map +1 -1
- package/components/tables/ColumnHeaderDropdown/ColumnHeaderDropdown.d.ts +14 -0
- package/components/tables/ColumnHeaderDropdown/ColumnHeaderDropdown.d.ts.map +1 -0
- package/components/tables/ColumnHeaderDropdown/SortingPanel.d.ts +8 -0
- package/components/tables/ColumnHeaderDropdown/SortingPanel.d.ts.map +1 -0
- package/components/tables/ColumnHeaderDropdown/index.d.ts +2 -0
- package/components/tables/ColumnHeaderDropdown/index.d.ts.map +1 -0
- package/components/tables/DataTable.d.ts +16 -0
- package/components/tables/DataTable.d.ts.map +1 -0
- package/components/tables/DataTableCell.d.ts +2 -7
- package/components/tables/DataTableCell.d.ts.map +1 -1
- package/components/tables/DataTableHeaderCell.d.ts +19 -0
- package/components/tables/DataTableHeaderCell.d.ts.map +1 -0
- package/components/tables/DataTableHeaderRow.d.ts +5 -0
- package/components/tables/DataTableHeaderRow.d.ts.map +1 -0
- package/components/tables/DataTableRow.d.ts +11 -0
- package/components/tables/DataTableRow.d.ts.map +1 -0
- package/components/tables/columnsConfigurationModal/ColumnRow.d.ts +7 -0
- package/components/tables/columnsConfigurationModal/ColumnRow.d.ts.map +1 -0
- package/components/tables/columnsConfigurationModal/ColumnsConfigurationModal.d.ts +10 -0
- package/components/tables/columnsConfigurationModal/ColumnsConfigurationModal.d.ts.map +1 -0
- package/components/tables/columnsConfigurationModal/PinIconButton.d.ts +10 -0
- package/components/tables/columnsConfigurationModal/PinIconButton.d.ts.map +1 -0
- package/components/tables/columnsConfigurationModal/index.d.ts +2 -0
- package/components/tables/columnsConfigurationModal/index.d.ts.map +1 -0
- package/components/tables/index.d.ts +6 -1
- package/components/tables/index.d.ts.map +1 -1
- package/components/tables/types.d.ts +26 -3
- package/components/tables/types.d.ts.map +1 -1
- package/components/types.d.ts +10 -5
- package/components/types.d.ts.map +1 -1
- package/components/typography/RichTextView.d.ts +7 -0
- package/components/typography/RichTextView.d.ts.map +1 -0
- package/components/typography/Text.d.ts +3 -3
- package/components/typography/Text.d.ts.map +1 -1
- package/components/typography/TextPlaceholder.d.ts +5 -3
- package/components/typography/TextPlaceholder.d.ts.map +1 -1
- package/components/typography/index.d.ts +1 -0
- package/components/typography/index.d.ts.map +1 -1
- package/components/widgets/Avatar.d.ts +1 -2
- package/components/widgets/Avatar.d.ts.map +1 -1
- package/components/widgets/Badge.d.ts +6 -7
- package/components/widgets/Badge.d.ts.map +1 -1
- package/components/widgets/Spinner.d.ts +6 -0
- package/components/widgets/Spinner.d.ts.map +1 -0
- package/components/widgets/Tag.d.ts +4 -4
- package/components/widgets/Tag.d.ts.map +1 -1
- package/components/widgets/index.d.ts +1 -0
- package/components/widgets/index.d.ts.map +1 -1
- package/helpers/index.d.ts +3 -0
- package/helpers/index.d.ts.map +1 -0
- package/helpers/useColumnsWithFilters.d.ts +3 -0
- package/helpers/useColumnsWithFilters.d.ts.map +1 -0
- package/i18n.d.ts +53 -0
- package/i18n.d.ts.map +1 -1
- package/index.d.ts +2 -1
- package/index.d.ts.map +1 -1
- package/index.js +2603 -762
- package/index.js.map +1 -1
- package/package.json +13 -6
- package/stats.html +1 -1
- package/styles.css +8578 -1832
- package/styles.css.map +1 -1
- package/assets/styles/fonts-variables.scss +0 -24
- package/assets/styles/variables/buttons/button.scss +0 -71
- package/assets/styles/variables/buttons/iconButton.scss +0 -41
- package/assets/styles/variables/buttons/linkButton.scss +0 -6
- package/assets/styles/variables/buttons/tabButton.scss +0 -8
- package/assets/styles/variables/inputs/checkbox.scss +0 -18
- package/assets/styles/variables/inputs/radioInput.scss +0 -15
- package/assets/styles/variables/inputs/switch.scss +0 -24
- package/assets/styles/variables/inputs/textInput.scss +0 -21
- package/assets/styles/variables/layout/accordion.scss +0 -10
- package/assets/styles/variables/layout/iconContainer.scss +0 -23
- package/assets/styles/variables/layout/labeledInput.scss +0 -8
- package/assets/styles/variables/layout/panel.scss +0 -6
- package/assets/styles/variables/layout/scrollBars.scss +0 -4
- package/assets/styles/variables/overlays/dropdownContainer.scss +0 -5
- package/assets/styles/variables/overlays/modals.scss +0 -6
- package/assets/styles/variables/overlays/notificationCard.scss +0 -28
- package/assets/styles/variables/overlays/tooltip.scss +0 -8
- package/assets/styles/variables/pickers/pickerToggler.scss +0 -16
- package/assets/styles/variables/typography/text.scss +0 -19
- package/assets/styles/variables/typography/textPlaceholder.scss +0 -4
- package/assets/styles/variables/widgets/tag.scss +0 -9
- package/components/buttons/Button.d.ts +0 -14
- package/components/buttons/Button.d.ts.map +0 -1
- package/components/layout/IconContainer.d.ts +0 -10
- package/components/layout/IconContainer.d.ts.map +0 -1
- package/components/tables/Presets/Preset.d.ts +0 -14
- package/components/tables/Presets/Preset.d.ts.map +0 -1
- package/components/tables/Presets/Presets.d.ts +0 -9
- package/components/tables/Presets/Presets.d.ts.map +0 -1
- package/components/tables/Presets/index.d.ts +0 -3
- package/components/tables/Presets/index.d.ts.map +0 -1
package/index.js
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
var uuiComponents = require('@epam/uui-components');
|
|
4
4
|
var uuiCore = require('@epam/uui-core');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var FocusLock = require('react-focus-lock');
|
|
7
6
|
var cx = require('classnames');
|
|
7
|
+
var FocusLock = require('react-focus-lock');
|
|
8
|
+
var sortBy = require('lodash.sortby');
|
|
9
|
+
var dayjs = require('dayjs');
|
|
8
10
|
|
|
9
11
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
12
|
|
|
@@ -27,431 +29,434 @@ function _interopNamespace(e) {
|
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
-
var FocusLock__default = /*#__PURE__*/_interopDefault(FocusLock);
|
|
31
32
|
var cx__default = /*#__PURE__*/_interopDefault(cx);
|
|
33
|
+
var FocusLock__default = /*#__PURE__*/_interopDefault(FocusLock);
|
|
34
|
+
var sortBy__default = /*#__PURE__*/_interopDefault(sortBy);
|
|
35
|
+
var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
|
|
32
36
|
|
|
33
|
-
var _path$
|
|
34
|
-
function _extends$
|
|
37
|
+
var _path$Z;
|
|
38
|
+
function _extends$10() { _extends$10 = 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$10.apply(this, arguments); }
|
|
35
39
|
var SvgBtnCross12 = function SvgBtnCross12(props, ref) {
|
|
36
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
40
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$10({
|
|
37
41
|
xmlns: "http://www.w3.org/2000/svg",
|
|
38
42
|
width: 12,
|
|
39
43
|
height: 12,
|
|
40
44
|
viewBox: "0 0 12 12",
|
|
41
45
|
ref: ref
|
|
42
|
-
}, props), _path$
|
|
46
|
+
}, props), _path$Z || (_path$Z = /*#__PURE__*/React__namespace.createElement("path", {
|
|
43
47
|
fillRule: "evenodd",
|
|
44
48
|
d: "M9.5 3.205 8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6z"
|
|
45
49
|
})));
|
|
46
50
|
};
|
|
47
|
-
var ForwardRef$
|
|
51
|
+
var ForwardRef$10 = /*#__PURE__*/React.forwardRef(SvgBtnCross12);
|
|
48
52
|
|
|
49
|
-
var _path$
|
|
50
|
-
function _extends
|
|
53
|
+
var _path$Y;
|
|
54
|
+
function _extends$$() { _extends$$ = 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$$.apply(this, arguments); }
|
|
51
55
|
var SvgBtnCross18 = function SvgBtnCross18(props, ref) {
|
|
52
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends
|
|
56
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$$({
|
|
53
57
|
xmlns: "http://www.w3.org/2000/svg",
|
|
54
58
|
width: 18,
|
|
55
59
|
height: 18,
|
|
56
60
|
viewBox: "0 0 18 18",
|
|
57
61
|
ref: ref
|
|
58
|
-
}, props), _path$
|
|
62
|
+
}, props), _path$Y || (_path$Y = /*#__PURE__*/React__namespace.createElement("path", {
|
|
59
63
|
fillRule: "evenodd",
|
|
60
64
|
d: "M14.25 4.808 13.193 3.75 9 7.942 4.808 3.75 3.75 4.808 7.942 9 3.75 13.193l1.058 1.057L9 10.057l4.193 4.193 1.057-1.057L10.057 9z"
|
|
61
65
|
})));
|
|
62
66
|
};
|
|
63
|
-
var ForwardRef
|
|
67
|
+
var ForwardRef$$ = /*#__PURE__*/React.forwardRef(SvgBtnCross18);
|
|
64
68
|
|
|
65
|
-
var _path$
|
|
66
|
-
function _extends$
|
|
69
|
+
var _path$X;
|
|
70
|
+
function _extends$_() { _extends$_ = 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$_.apply(this, arguments); }
|
|
67
71
|
var SvgBtnCross24 = function SvgBtnCross24(props, ref) {
|
|
68
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
72
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$_({
|
|
69
73
|
xmlns: "http://www.w3.org/2000/svg",
|
|
70
74
|
width: 24,
|
|
71
75
|
height: 24,
|
|
72
76
|
viewBox: "0 0 24 24",
|
|
73
77
|
ref: ref
|
|
74
|
-
}, props), _path$
|
|
78
|
+
}, props), _path$X || (_path$X = /*#__PURE__*/React__namespace.createElement("path", {
|
|
75
79
|
fillRule: "evenodd",
|
|
76
80
|
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"
|
|
77
81
|
})));
|
|
78
82
|
};
|
|
79
|
-
var ForwardRef$
|
|
83
|
+
var ForwardRef$_ = /*#__PURE__*/React.forwardRef(SvgBtnCross24);
|
|
80
84
|
|
|
81
|
-
var _path$
|
|
82
|
-
function _extends$
|
|
85
|
+
var _path$W;
|
|
86
|
+
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); }
|
|
83
87
|
var SvgFoldingArrow12 = function SvgFoldingArrow12(props, ref) {
|
|
84
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
88
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$Z({
|
|
85
89
|
xmlns: "http://www.w3.org/2000/svg",
|
|
86
90
|
width: 12,
|
|
87
91
|
height: 12,
|
|
88
92
|
viewBox: "0 0 12 12",
|
|
89
93
|
ref: ref
|
|
90
|
-
}, props), _path$
|
|
94
|
+
}, props), _path$W || (_path$W = /*#__PURE__*/React__namespace.createElement("path", {
|
|
91
95
|
fillRule: "evenodd",
|
|
92
96
|
d: "M8.295 4.295 6 6.585l-2.295-2.29L3 5l3 3 3-3z"
|
|
93
97
|
})));
|
|
94
98
|
};
|
|
95
|
-
var ForwardRef$
|
|
99
|
+
var ForwardRef$Z = /*#__PURE__*/React.forwardRef(SvgFoldingArrow12);
|
|
96
100
|
|
|
97
|
-
var _path$
|
|
98
|
-
function _extends$
|
|
101
|
+
var _path$V;
|
|
102
|
+
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); }
|
|
99
103
|
var SvgFoldingArrow18 = function SvgFoldingArrow18(props, ref) {
|
|
100
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
104
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$Y({
|
|
101
105
|
xmlns: "http://www.w3.org/2000/svg",
|
|
102
106
|
width: 18,
|
|
103
107
|
height: 18,
|
|
104
108
|
viewBox: "0 0 18 18",
|
|
105
109
|
ref: ref
|
|
106
|
-
}, props), _path$
|
|
110
|
+
}, props), _path$V || (_path$V = /*#__PURE__*/React__namespace.createElement("path", {
|
|
107
111
|
fillRule: "evenodd",
|
|
108
112
|
d: "M12.443 6.442 9 9.877 5.558 6.442 4.5 7.5 9 12l4.5-4.5z"
|
|
109
113
|
})));
|
|
110
114
|
};
|
|
111
|
-
var ForwardRef$
|
|
115
|
+
var ForwardRef$Y = /*#__PURE__*/React.forwardRef(SvgFoldingArrow18);
|
|
112
116
|
|
|
113
|
-
var _path$
|
|
114
|
-
function _extends$
|
|
117
|
+
var _path$U;
|
|
118
|
+
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); }
|
|
115
119
|
var SvgFoldingArrow24 = function SvgFoldingArrow24(props, ref) {
|
|
116
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
120
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$X({
|
|
117
121
|
xmlns: "http://www.w3.org/2000/svg",
|
|
118
122
|
width: 24,
|
|
119
123
|
height: 24,
|
|
120
124
|
viewBox: "0 0 24 24",
|
|
121
125
|
ref: ref
|
|
122
|
-
}, props), _path$
|
|
126
|
+
}, props), _path$U || (_path$U = /*#__PURE__*/React__namespace.createElement("path", {
|
|
123
127
|
fillRule: "evenodd",
|
|
124
128
|
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
125
129
|
})));
|
|
126
130
|
};
|
|
127
|
-
var ForwardRef$
|
|
131
|
+
var ForwardRef$X = /*#__PURE__*/React.forwardRef(SvgFoldingArrow24);
|
|
128
132
|
|
|
129
|
-
var _path$
|
|
130
|
-
function _extends$
|
|
133
|
+
var _path$T;
|
|
134
|
+
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); }
|
|
131
135
|
var SvgAccept12 = function SvgAccept12(props, ref) {
|
|
132
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
136
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$W({
|
|
133
137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
134
138
|
width: 12,
|
|
135
139
|
height: 12,
|
|
136
140
|
viewBox: "0 0 12 12",
|
|
137
141
|
ref: ref
|
|
138
|
-
}, props), _path$
|
|
142
|
+
}, props), _path$T || (_path$T = /*#__PURE__*/React__namespace.createElement("path", {
|
|
139
143
|
fillRule: "evenodd",
|
|
140
144
|
d: "M4.846 6.8 9.462 2 11 3.6 4.846 10l-.77-.8L1 6l1.538-1.6 2.308 2.4z"
|
|
141
145
|
})));
|
|
142
146
|
};
|
|
143
|
-
var ForwardRef$
|
|
147
|
+
var ForwardRef$W = /*#__PURE__*/React.forwardRef(SvgAccept12);
|
|
144
148
|
|
|
145
|
-
var _path$
|
|
146
|
-
function _extends$
|
|
149
|
+
var _path$S;
|
|
150
|
+
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); }
|
|
147
151
|
var SvgAccept18 = function SvgAccept18(props, ref) {
|
|
148
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
152
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$V({
|
|
149
153
|
xmlns: "http://www.w3.org/2000/svg",
|
|
150
154
|
width: 18,
|
|
151
155
|
height: 18,
|
|
152
156
|
viewBox: "0 0 18 18",
|
|
153
157
|
ref: ref
|
|
154
|
-
}, props), _path$
|
|
158
|
+
}, props), _path$S || (_path$S = /*#__PURE__*/React__namespace.createElement("path", {
|
|
155
159
|
fillRule: "evenodd",
|
|
156
160
|
d: "M7.136 11.91 4.034 8.776 3 9.821 7.136 14 16 5.045 14.966 4z"
|
|
157
161
|
})));
|
|
158
162
|
};
|
|
159
|
-
var ForwardRef$
|
|
163
|
+
var ForwardRef$V = /*#__PURE__*/React.forwardRef(SvgAccept18);
|
|
160
164
|
|
|
161
|
-
var _path$
|
|
162
|
-
function _extends$
|
|
165
|
+
var _path$R;
|
|
166
|
+
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); }
|
|
163
167
|
var SvgAccept24 = function SvgAccept24(props, ref) {
|
|
164
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
168
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$U({
|
|
165
169
|
xmlns: "http://www.w3.org/2000/svg",
|
|
166
170
|
width: 24,
|
|
167
171
|
height: 24,
|
|
168
172
|
viewBox: "0 0 24 24",
|
|
169
173
|
ref: ref
|
|
170
|
-
}, props), _path$
|
|
174
|
+
}, props), _path$R || (_path$R = /*#__PURE__*/React__namespace.createElement("path", {
|
|
171
175
|
fillRule: "evenodd",
|
|
172
176
|
d: "m9.727 16.075-4.295-4.388L4 13.149 9.727 19 22 6.463 20.568 5z"
|
|
173
177
|
})));
|
|
174
178
|
};
|
|
175
|
-
var ForwardRef$
|
|
179
|
+
var ForwardRef$U = /*#__PURE__*/React.forwardRef(SvgAccept24);
|
|
176
180
|
|
|
177
|
-
var _path$
|
|
178
|
-
function _extends$
|
|
181
|
+
var _path$Q;
|
|
182
|
+
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); }
|
|
179
183
|
var SvgSearch12 = function SvgSearch12(props, ref) {
|
|
180
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
184
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$T({
|
|
181
185
|
xmlns: "http://www.w3.org/2000/svg",
|
|
182
186
|
width: 12,
|
|
183
187
|
height: 12,
|
|
184
188
|
viewBox: "0 0 12 12",
|
|
185
189
|
ref: ref
|
|
186
|
-
}, props), _path$
|
|
190
|
+
}, props), _path$Q || (_path$Q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
187
191
|
fillRule: "evenodd",
|
|
188
192
|
d: "M9.016 8.309 10.707 10l-.707.707-1.691-1.691a4.5 4.5 0 1 1 .707-.707zM5.5 9a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"
|
|
189
193
|
})));
|
|
190
194
|
};
|
|
191
|
-
var ForwardRef$
|
|
195
|
+
var ForwardRef$T = /*#__PURE__*/React.forwardRef(SvgSearch12);
|
|
192
196
|
|
|
193
|
-
var _path$
|
|
194
|
-
function _extends$
|
|
197
|
+
var _path$P;
|
|
198
|
+
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); }
|
|
195
199
|
var SvgSearch18 = function SvgSearch18(props, ref) {
|
|
196
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
200
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$S({
|
|
197
201
|
xmlns: "http://www.w3.org/2000/svg",
|
|
198
202
|
width: 18,
|
|
199
203
|
height: 18,
|
|
200
204
|
viewBox: "0 0 18 18",
|
|
201
205
|
ref: ref
|
|
202
|
-
}, props), _path$
|
|
206
|
+
}, props), _path$P || (_path$P = /*#__PURE__*/React__namespace.createElement("path", {
|
|
203
207
|
fillRule: "evenodd",
|
|
204
208
|
d: "M13.749 12.335 16.414 15 15 16.414l-2.665-2.665a6.5 6.5 0 1 1 1.414-1.414zM8.5 13a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9z"
|
|
205
209
|
})));
|
|
206
210
|
};
|
|
207
|
-
var ForwardRef$
|
|
211
|
+
var ForwardRef$S = /*#__PURE__*/React.forwardRef(SvgSearch18);
|
|
208
212
|
|
|
209
|
-
var _path$
|
|
210
|
-
function _extends$
|
|
213
|
+
var _path$O;
|
|
214
|
+
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); }
|
|
211
215
|
var SvgSearch24 = function SvgSearch24(props, ref) {
|
|
212
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
216
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$R({
|
|
213
217
|
xmlns: "http://www.w3.org/2000/svg",
|
|
214
218
|
width: 24,
|
|
215
219
|
height: 24,
|
|
216
220
|
viewBox: "0 0 24 24",
|
|
217
221
|
ref: ref
|
|
218
|
-
}, props), _path$
|
|
222
|
+
}, props), _path$O || (_path$O = /*#__PURE__*/React__namespace.createElement("path", {
|
|
219
223
|
fillRule: "evenodd",
|
|
220
224
|
d: "M17.32 15.906 21.414 20 20 21.414l-4.094-4.094a8 8 0 1 1 1.414-1.414zM11 17a6 6 0 1 0 0-12 6 6 0 0 0 0 12z"
|
|
221
225
|
})));
|
|
222
226
|
};
|
|
223
|
-
var ForwardRef$
|
|
227
|
+
var ForwardRef$R = /*#__PURE__*/React.forwardRef(SvgSearch24);
|
|
224
228
|
|
|
225
|
-
var _path$
|
|
226
|
-
function _extends$
|
|
229
|
+
var _path$N;
|
|
230
|
+
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); }
|
|
227
231
|
var SvgCalendar12 = function SvgCalendar12(props, ref) {
|
|
228
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
232
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$Q({
|
|
229
233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
230
234
|
width: 12,
|
|
231
235
|
height: 12,
|
|
232
236
|
viewBox: "0 0 12 12",
|
|
233
237
|
ref: ref
|
|
234
|
-
}, props), _path$
|
|
238
|
+
}, props), _path$N || (_path$N = /*#__PURE__*/React__namespace.createElement("path", {
|
|
235
239
|
fillRule: "evenodd",
|
|
236
240
|
d: "M10 2H9V1H8v1H4V1H3v1H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h8c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm0 8H2V4h8v6z"
|
|
237
241
|
})));
|
|
238
242
|
};
|
|
239
|
-
var ForwardRef$
|
|
243
|
+
var ForwardRef$Q = /*#__PURE__*/React.forwardRef(SvgCalendar12);
|
|
240
244
|
|
|
241
|
-
var _path$
|
|
242
|
-
function _extends$
|
|
245
|
+
var _path$M;
|
|
246
|
+
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); }
|
|
243
247
|
var SvgCalendar18 = function SvgCalendar18(props, ref) {
|
|
244
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
248
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$P({
|
|
245
249
|
xmlns: "http://www.w3.org/2000/svg",
|
|
246
250
|
width: 18,
|
|
247
251
|
height: 18,
|
|
248
252
|
viewBox: "0 0 18 18",
|
|
249
253
|
ref: ref
|
|
250
|
-
}, props), _path$
|
|
254
|
+
}, props), _path$M || (_path$M = /*#__PURE__*/React__namespace.createElement("path", {
|
|
251
255
|
fillRule: "evenodd",
|
|
252
256
|
d: "M14 3V1h-2v2H6V1H4v2C3 3 2 4 2 5v10c0 1 1 2 2 2h10c1 0 2-1 2-2V5c0-1-1-2-2-2zm0 12-10 .048V7h10v8z"
|
|
253
257
|
})));
|
|
254
258
|
};
|
|
255
|
-
var ForwardRef$
|
|
259
|
+
var ForwardRef$P = /*#__PURE__*/React.forwardRef(SvgCalendar18);
|
|
256
260
|
|
|
257
|
-
var _path$
|
|
258
|
-
function _extends$
|
|
261
|
+
var _path$L;
|
|
262
|
+
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); }
|
|
259
263
|
var SvgCalendar24 = function SvgCalendar24(props, ref) {
|
|
260
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
264
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$O({
|
|
261
265
|
xmlns: "http://www.w3.org/2000/svg",
|
|
262
266
|
width: 24,
|
|
263
267
|
height: 24,
|
|
264
268
|
viewBox: "0 0 24 24",
|
|
265
269
|
ref: ref
|
|
266
|
-
}, props), _path$
|
|
270
|
+
}, props), _path$L || (_path$L = /*#__PURE__*/React__namespace.createElement("path", {
|
|
267
271
|
fillRule: "evenodd",
|
|
268
272
|
d: "M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"
|
|
269
273
|
})));
|
|
270
274
|
};
|
|
271
|
-
var ForwardRef$
|
|
275
|
+
var ForwardRef$O = /*#__PURE__*/React.forwardRef(SvgCalendar24);
|
|
272
276
|
|
|
273
|
-
var _path$
|
|
274
|
-
function _extends$
|
|
277
|
+
var _path$K;
|
|
278
|
+
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); }
|
|
275
279
|
var SvgInfo12 = function SvgInfo12(props, ref) {
|
|
276
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
280
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$N({
|
|
277
281
|
width: 12,
|
|
278
282
|
height: 12,
|
|
279
283
|
viewBox: "0 0 12 12",
|
|
280
284
|
xmlns: "http://www.w3.org/2000/svg",
|
|
281
285
|
ref: ref
|
|
282
|
-
}, props), _path$
|
|
286
|
+
}, props), _path$K || (_path$K = /*#__PURE__*/React__namespace.createElement("path", {
|
|
283
287
|
d: "M6 1C3.24 1 1 3.24 1 6s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm1 8H5V5h2zm0-5c-.471.471-1.529.471-2 0s-.471-1.529 0-2 1.529-.471 2 0 .471 1.529 0 2z",
|
|
284
288
|
fillRule: "evenodd"
|
|
285
289
|
})));
|
|
286
290
|
};
|
|
287
|
-
var ForwardRef$
|
|
291
|
+
var ForwardRef$N = /*#__PURE__*/React.forwardRef(SvgInfo12);
|
|
288
292
|
|
|
289
|
-
var _path$
|
|
290
|
-
function _extends$
|
|
293
|
+
var _path$J;
|
|
294
|
+
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); }
|
|
291
295
|
var SvgInfo18 = function SvgInfo18(props, ref) {
|
|
292
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
296
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$M({
|
|
293
297
|
xmlns: "http://www.w3.org/2000/svg",
|
|
294
298
|
width: 18,
|
|
295
299
|
height: 18,
|
|
296
300
|
viewBox: "0 0 18 18",
|
|
297
301
|
ref: ref
|
|
298
|
-
}, props), _path$
|
|
302
|
+
}, props), _path$J || (_path$J = /*#__PURE__*/React__namespace.createElement("path", {
|
|
299
303
|
fillRule: "evenodd",
|
|
300
304
|
d: "M8 13h2V8H8v5zM9 1C4.584 1 1 4.584 1 9s3.584 8 8 8 8-3.584 8-8-3.584-8-8-8zm0 15c-3.859 0-7-3.141-7-7s3.141-7 7-7 7 3.141 7 7-3.141 7-7 7zM8 7h2V5H8v2z"
|
|
301
305
|
})));
|
|
302
306
|
};
|
|
303
|
-
var ForwardRef$
|
|
307
|
+
var ForwardRef$M = /*#__PURE__*/React.forwardRef(SvgInfo18);
|
|
304
308
|
|
|
305
|
-
var _path$
|
|
306
|
-
function _extends$
|
|
309
|
+
var _path$I;
|
|
310
|
+
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); }
|
|
307
311
|
var SvgInfo24 = function SvgInfo24(props, ref) {
|
|
308
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
312
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$L({
|
|
309
313
|
xmlns: "http://www.w3.org/2000/svg",
|
|
310
314
|
width: 24,
|
|
311
315
|
height: 24,
|
|
312
316
|
viewBox: "0 0 24 24",
|
|
313
317
|
ref: ref
|
|
314
|
-
}, props), _path$
|
|
318
|
+
}, props), _path$I || (_path$I = /*#__PURE__*/React__namespace.createElement("path", {
|
|
315
319
|
fillRule: "evenodd",
|
|
316
320
|
d: "M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z"
|
|
317
321
|
})));
|
|
318
322
|
};
|
|
319
|
-
var ForwardRef$
|
|
323
|
+
var ForwardRef$L = /*#__PURE__*/React.forwardRef(SvgInfo24);
|
|
320
324
|
|
|
321
|
-
var _path$
|
|
322
|
-
function _extends$
|
|
325
|
+
var _path$H;
|
|
326
|
+
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); }
|
|
323
327
|
var SvgHelpFill10 = function SvgHelpFill10(props, ref) {
|
|
324
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
328
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$K({
|
|
325
329
|
width: 10,
|
|
326
330
|
height: 10,
|
|
327
331
|
viewBox: "0 0 10 10",
|
|
328
332
|
xmlns: "http://www.w3.org/2000/svg",
|
|
329
333
|
ref: ref
|
|
330
|
-
}, props), _path$
|
|
334
|
+
}, props), _path$H || (_path$H = /*#__PURE__*/React__namespace.createElement("path", {
|
|
331
335
|
d: "M5 0C2.24 0 0 2.24 0 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5Zm.5 7.5h-1v-3h1v3Zm0-4h-1v-1h1v1Z"
|
|
332
336
|
})));
|
|
333
337
|
};
|
|
334
|
-
var ForwardRef$
|
|
338
|
+
var ForwardRef$K = /*#__PURE__*/React.forwardRef(SvgHelpFill10);
|
|
335
339
|
|
|
336
|
-
var _path$
|
|
337
|
-
function _extends$
|
|
340
|
+
var _path$G;
|
|
341
|
+
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); }
|
|
338
342
|
var SvgHelpFill16 = function SvgHelpFill16(props, ref) {
|
|
339
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
343
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$J({
|
|
340
344
|
width: 16,
|
|
341
345
|
height: 16,
|
|
342
346
|
viewBox: "0 0 16 16",
|
|
343
347
|
xmlns: "http://www.w3.org/2000/svg",
|
|
344
348
|
ref: ref
|
|
345
|
-
}, props), _path$
|
|
349
|
+
}, props), _path$G || (_path$G = /*#__PURE__*/React__namespace.createElement("path", {
|
|
346
350
|
d: "M7 12h2V7H7v5ZM8 0C3.584 0 0 3.584 0 8s3.584 8 8 8 8-3.584 8-8-3.584-8-8-8Zm0 15c-3.859 0-7-3.141-7-7s3.141-7 7-7 7 3.141 7 7-3.141 7-7 7ZM7 6h2V4H7v2Z"
|
|
347
351
|
})));
|
|
348
352
|
};
|
|
349
|
-
var ForwardRef$
|
|
353
|
+
var ForwardRef$J = /*#__PURE__*/React.forwardRef(SvgHelpFill16);
|
|
350
354
|
|
|
351
355
|
const systemIcons = {
|
|
352
356
|
'18': {
|
|
353
|
-
clear: ForwardRef$
|
|
354
|
-
foldingArrow: ForwardRef$
|
|
355
|
-
accept: ForwardRef$
|
|
356
|
-
search: ForwardRef$
|
|
357
|
-
calendar: ForwardRef$
|
|
358
|
-
info: ForwardRef$
|
|
359
|
-
help: ForwardRef$
|
|
357
|
+
clear: ForwardRef$10,
|
|
358
|
+
foldingArrow: ForwardRef$Z,
|
|
359
|
+
accept: ForwardRef$W,
|
|
360
|
+
search: ForwardRef$T,
|
|
361
|
+
calendar: ForwardRef$Q,
|
|
362
|
+
info: ForwardRef$N,
|
|
363
|
+
help: ForwardRef$K,
|
|
360
364
|
},
|
|
361
365
|
'24': {
|
|
362
|
-
clear: ForwardRef$
|
|
363
|
-
foldingArrow: ForwardRef$
|
|
364
|
-
accept: ForwardRef$
|
|
365
|
-
search: ForwardRef$
|
|
366
|
-
calendar: ForwardRef$
|
|
367
|
-
info: ForwardRef$
|
|
368
|
-
help: ForwardRef$
|
|
366
|
+
clear: ForwardRef$10,
|
|
367
|
+
foldingArrow: ForwardRef$Z,
|
|
368
|
+
accept: ForwardRef$W,
|
|
369
|
+
search: ForwardRef$T,
|
|
370
|
+
calendar: ForwardRef$Q,
|
|
371
|
+
info: ForwardRef$N,
|
|
372
|
+
help: ForwardRef$K,
|
|
369
373
|
},
|
|
370
374
|
'30': {
|
|
371
|
-
clear: ForwardRef
|
|
372
|
-
foldingArrow: ForwardRef$
|
|
373
|
-
accept: ForwardRef$
|
|
374
|
-
search: ForwardRef$
|
|
375
|
-
calendar: ForwardRef$
|
|
376
|
-
info: ForwardRef$
|
|
377
|
-
help: ForwardRef$
|
|
375
|
+
clear: ForwardRef$$,
|
|
376
|
+
foldingArrow: ForwardRef$Y,
|
|
377
|
+
accept: ForwardRef$V,
|
|
378
|
+
search: ForwardRef$S,
|
|
379
|
+
calendar: ForwardRef$P,
|
|
380
|
+
info: ForwardRef$M,
|
|
381
|
+
help: ForwardRef$K,
|
|
378
382
|
},
|
|
379
383
|
'36': {
|
|
380
|
-
clear: ForwardRef
|
|
381
|
-
foldingArrow: ForwardRef$
|
|
382
|
-
accept: ForwardRef$
|
|
383
|
-
search: ForwardRef$
|
|
384
|
-
calendar: ForwardRef$
|
|
385
|
-
info: ForwardRef$
|
|
386
|
-
help: ForwardRef$
|
|
384
|
+
clear: ForwardRef$$,
|
|
385
|
+
foldingArrow: ForwardRef$Y,
|
|
386
|
+
accept: ForwardRef$V,
|
|
387
|
+
search: ForwardRef$S,
|
|
388
|
+
calendar: ForwardRef$P,
|
|
389
|
+
info: ForwardRef$M,
|
|
390
|
+
help: ForwardRef$J,
|
|
387
391
|
},
|
|
388
392
|
'42': {
|
|
389
|
-
clear: ForwardRef
|
|
390
|
-
foldingArrow: ForwardRef$
|
|
391
|
-
accept: ForwardRef$
|
|
392
|
-
search: ForwardRef$
|
|
393
|
-
calendar: ForwardRef$
|
|
394
|
-
info: ForwardRef$
|
|
395
|
-
help: ForwardRef$
|
|
393
|
+
clear: ForwardRef$$,
|
|
394
|
+
foldingArrow: ForwardRef$Y,
|
|
395
|
+
accept: ForwardRef$V,
|
|
396
|
+
search: ForwardRef$S,
|
|
397
|
+
calendar: ForwardRef$P,
|
|
398
|
+
info: ForwardRef$M,
|
|
399
|
+
help: ForwardRef$J,
|
|
396
400
|
},
|
|
397
401
|
'48': {
|
|
398
|
-
clear: ForwardRef$
|
|
399
|
-
foldingArrow: ForwardRef$
|
|
400
|
-
accept: ForwardRef$
|
|
401
|
-
search: ForwardRef$
|
|
402
|
-
calendar: ForwardRef$
|
|
403
|
-
info: ForwardRef$
|
|
404
|
-
help: ForwardRef$
|
|
402
|
+
clear: ForwardRef$_,
|
|
403
|
+
foldingArrow: ForwardRef$X,
|
|
404
|
+
accept: ForwardRef$U,
|
|
405
|
+
search: ForwardRef$R,
|
|
406
|
+
calendar: ForwardRef$O,
|
|
407
|
+
info: ForwardRef$L,
|
|
408
|
+
help: ForwardRef$J,
|
|
405
409
|
},
|
|
406
410
|
'60': {
|
|
407
|
-
clear: ForwardRef$
|
|
408
|
-
foldingArrow: ForwardRef$
|
|
409
|
-
accept: ForwardRef$
|
|
410
|
-
search: ForwardRef$
|
|
411
|
-
calendar: ForwardRef$
|
|
412
|
-
info: ForwardRef$
|
|
413
|
-
help: ForwardRef$
|
|
411
|
+
clear: ForwardRef$_,
|
|
412
|
+
foldingArrow: ForwardRef$X,
|
|
413
|
+
accept: ForwardRef$U,
|
|
414
|
+
search: ForwardRef$R,
|
|
415
|
+
calendar: ForwardRef$O,
|
|
416
|
+
info: ForwardRef$L,
|
|
417
|
+
help: ForwardRef$J,
|
|
414
418
|
},
|
|
415
419
|
'none': {
|
|
416
|
-
clear: ForwardRef
|
|
417
|
-
foldingArrow: ForwardRef$
|
|
418
|
-
accept: ForwardRef$
|
|
419
|
-
search: ForwardRef$
|
|
420
|
-
calendar: ForwardRef$
|
|
421
|
-
info: ForwardRef$
|
|
422
|
-
help: ForwardRef$
|
|
420
|
+
clear: ForwardRef$$,
|
|
421
|
+
foldingArrow: ForwardRef$Y,
|
|
422
|
+
accept: ForwardRef$V,
|
|
423
|
+
search: ForwardRef$S,
|
|
424
|
+
calendar: ForwardRef$P,
|
|
425
|
+
info: ForwardRef$M,
|
|
426
|
+
help: ForwardRef$J,
|
|
423
427
|
},
|
|
424
428
|
};
|
|
425
429
|
|
|
426
|
-
var buttonCss = {"root":"
|
|
430
|
+
var buttonCss = {"typography-header":"Button_typography-header__N39Sj","typography-block":"Button_typography-block__wNgIs","typography-inline":"Button_typography-inline__rkIhO","typography-16":"Button_typography-16__zilSM","typography-14":"Button_typography-14__TkTJy","typography-12":"Button_typography-12__qT2zs","typography-promo":"Button_typography-promo__34xBe Button_typography-header__N39Sj Button_typography-block__wNgIs Button_typography-inline__rkIhO","root":"Button_root__uIzk9","mode-solid":"Button_mode-solid__zr23o","mode-outline":"Button_mode-outline__e9LiF","mode-none":"Button_mode-none__j8rJ3","mode-ghost":"Button_mode-ghost__c8QtK","size-24":"Button_size-24__8SJZp","size-30":"Button_size-30__z1sFR","size-36":"Button_size-36__7ldWy","size-42":"Button_size-42__h3Y-0","size-48":"Button_size-48__VaI4-","typographyHeader":"Button_typography-header__N39Sj","typographyBlock":"Button_typography-block__wNgIs","typographyInline":"Button_typography-inline__rkIhO","typography16":"Button_typography-16__zilSM","typography14":"Button_typography-14__TkTJy","typography12":"Button_typography-12__qT2zs","typographyPromo":"Button_typography-promo__34xBe Button_typography-header__N39Sj Button_typography-block__wNgIs Button_typography-inline__rkIhO","modeSolid":"Button_mode-solid__zr23o","modeOutline":"Button_mode-outline__e9LiF","modeNone":"Button_mode-none__j8rJ3","modeGhost":"Button_mode-ghost__c8QtK","size24":"Button_size-24__8SJZp","size30":"Button_size-30__z1sFR","size36":"Button_size-36__7ldWy","size42":"Button_size-42__h3Y-0","size48":"Button_size-48__VaI4-"};
|
|
427
431
|
|
|
428
432
|
const allButtonColors = ['accent', 'primary', 'secondary', 'negative'];
|
|
429
|
-
const defaultSize$
|
|
433
|
+
const defaultSize$a = '36';
|
|
430
434
|
function applyButtonMods(mods) {
|
|
431
435
|
return [
|
|
432
|
-
|
|
433
|
-
`button-color-${mods.color || 'primary'}`,
|
|
436
|
+
`button-${mods.color || 'primary'}`,
|
|
434
437
|
buttonCss.root,
|
|
435
|
-
buttonCss[`size-${mods.size || defaultSize$
|
|
438
|
+
buttonCss[`size-${mods.size || defaultSize$a}`],
|
|
436
439
|
buttonCss[`mode-${mods.mode || 'solid'}`],
|
|
437
440
|
];
|
|
438
441
|
}
|
|
439
442
|
const Button = uuiCore.withMods(uuiComponents.Button, applyButtonMods, (props) => ({
|
|
440
|
-
dropdownIcon: systemIcons[props.size || defaultSize$
|
|
441
|
-
clearIcon: systemIcons[props.size || defaultSize$
|
|
443
|
+
dropdownIcon: systemIcons[props.size || defaultSize$a].foldingArrow,
|
|
444
|
+
clearIcon: systemIcons[props.size || defaultSize$a].clear,
|
|
442
445
|
}));
|
|
443
446
|
|
|
444
|
-
var css$
|
|
447
|
+
var css$12 = {"root":"IconButton_root__c1hRd"};
|
|
445
448
|
|
|
446
449
|
const allIconColors = ['info', 'success', 'warning', 'error', 'secondary', 'default'];
|
|
447
450
|
function applyIconButtonMods(mods) {
|
|
448
451
|
return [
|
|
449
|
-
`icon-button
|
|
450
|
-
css$
|
|
452
|
+
`icon-button-${mods.color || 'default'}`,
|
|
453
|
+
css$12.root,
|
|
451
454
|
];
|
|
452
455
|
}
|
|
453
456
|
const IconButton = uuiCore.withMods(uuiComponents.IconButton, applyIconButtonMods);
|
|
454
457
|
|
|
458
|
+
var css$11 = {"root":"LinkButton_root__SWC7c","size-18":"LinkButton_size-18__XI44N","size-24":"LinkButton_size-24__yj-DG","size-30":"LinkButton_size-30__sKZ9H","size-36":"LinkButton_size-36__HIbgO","size-42":"LinkButton_size-42__apHCj","size-48":"LinkButton_size-48__7zgFe","size18":"LinkButton_size-18__XI44N","size24":"LinkButton_size-24__yj-DG","size30":"LinkButton_size-30__sKZ9H","size36":"LinkButton_size-36__HIbgO","size42":"LinkButton_size-42__apHCj","size48":"LinkButton_size-48__7zgFe"};
|
|
459
|
+
|
|
455
460
|
function getIconClass(props) {
|
|
456
461
|
let classList = {
|
|
457
462
|
'has-left-icon': false,
|
|
@@ -472,128 +477,140 @@ function getIconClass(props) {
|
|
|
472
477
|
];
|
|
473
478
|
}
|
|
474
479
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
const defaultSize$6 = '36';
|
|
480
|
+
const defaultSize$9 = '36';
|
|
478
481
|
function applyLinkButtonMods(mods) {
|
|
479
482
|
return [
|
|
480
|
-
|
|
481
|
-
css$
|
|
482
|
-
css$A['size-' + (mods.size || defaultSize$6)],
|
|
483
|
+
css$11.root,
|
|
484
|
+
css$11['size-' + (mods.size || defaultSize$9)],
|
|
483
485
|
...getIconClass(mods),
|
|
484
486
|
];
|
|
485
487
|
}
|
|
486
488
|
const LinkButton = uuiCore.withMods(uuiComponents.Button, applyLinkButtonMods, (props) => ({
|
|
487
|
-
dropdownIcon: systemIcons[props.size || defaultSize$
|
|
488
|
-
clearIcon: systemIcons[props.size || defaultSize$
|
|
489
|
+
dropdownIcon: systemIcons[props.size || defaultSize$9].foldingArrow,
|
|
490
|
+
clearIcon: systemIcons[props.size || defaultSize$9].clear,
|
|
489
491
|
}));
|
|
490
492
|
|
|
491
|
-
var css$
|
|
493
|
+
var css$10 = {"typography-header":"TabButton_typography-header__RS80s","typography-block":"TabButton_typography-block__GaCpm","typography-inline":"TabButton_typography-inline__JMTQP","typography-16":"TabButton_typography-16__GLE4t","typography-14":"TabButton_typography-14__VWnXE","typography-12":"TabButton_typography-12__nGcxo","typography-promo":"TabButton_typography-promo__Des7p TabButton_typography-header__RS80s TabButton_typography-block__GaCpm TabButton_typography-inline__JMTQP","root":"TabButton_root__WwWmb","uui-notification":"TabButton_uui-notification__kS3SP","size-36":"TabButton_size-36__GqZ6d","size-48":"TabButton_size-48__SPXAO","size-60":"TabButton_size-60__lPhOn","typographyHeader":"TabButton_typography-header__RS80s","typographyBlock":"TabButton_typography-block__GaCpm","typographyInline":"TabButton_typography-inline__JMTQP","typography16":"TabButton_typography-16__GLE4t","typography14":"TabButton_typography-14__VWnXE","typography12":"TabButton_typography-12__nGcxo","typographyPromo":"TabButton_typography-promo__Des7p TabButton_typography-header__RS80s TabButton_typography-block__GaCpm TabButton_typography-inline__JMTQP","uuiNotification":"TabButton_uui-notification__kS3SP","size36":"TabButton_size-36__GqZ6d","size48":"TabButton_size-48__SPXAO","size60":"TabButton_size-60__lPhOn"};
|
|
492
494
|
|
|
493
495
|
function applyTabButtonMods(mods) {
|
|
494
496
|
return [
|
|
495
|
-
|
|
496
|
-
css$
|
|
497
|
-
|
|
498
|
-
mods.withNotify && css$z.uuiNotification,
|
|
497
|
+
css$10.root,
|
|
498
|
+
css$10['size-' + (mods.size || '48')],
|
|
499
|
+
mods.withNotify && css$10.uuiNotification,
|
|
499
500
|
...getIconClass(mods),
|
|
500
501
|
];
|
|
501
502
|
}
|
|
502
503
|
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) })));
|
|
503
504
|
|
|
504
|
-
var css
|
|
505
|
+
var css$$ = {"typography-header":"VerticalTabButton_typography-header__S9ICQ","typography-block":"VerticalTabButton_typography-block__CJa1q","typography-inline":"VerticalTabButton_typography-inline__evOKQ","typography-16":"VerticalTabButton_typography-16__DAHVj","typography-14":"VerticalTabButton_typography-14__XEpmf","typography-12":"VerticalTabButton_typography-12__db63C","typography-promo":"VerticalTabButton_typography-promo__LMvtV VerticalTabButton_typography-header__S9ICQ VerticalTabButton_typography-block__CJa1q VerticalTabButton_typography-inline__evOKQ","root":"VerticalTabButton_root__LInYW","typographyHeader":"VerticalTabButton_typography-header__S9ICQ","typographyBlock":"VerticalTabButton_typography-block__CJa1q","typographyInline":"VerticalTabButton_typography-inline__evOKQ","typography16":"VerticalTabButton_typography-16__DAHVj","typography14":"VerticalTabButton_typography-14__XEpmf","typography12":"VerticalTabButton_typography-12__db63C","typographyPromo":"VerticalTabButton_typography-promo__LMvtV VerticalTabButton_typography-header__S9ICQ VerticalTabButton_typography-block__CJa1q VerticalTabButton_typography-inline__evOKQ"};
|
|
505
506
|
|
|
506
507
|
function applyVerticalTabButtonMods() {
|
|
507
508
|
return [
|
|
508
|
-
css
|
|
509
|
+
css$$.root,
|
|
509
510
|
];
|
|
510
511
|
}
|
|
511
512
|
const VerticalTabButton = uuiCore.withMods(TabButton, applyVerticalTabButtonMods);
|
|
512
513
|
|
|
513
|
-
|
|
514
|
+
const allButtonModes = ['solid', 'outline', 'ghost', 'none'];
|
|
515
|
+
const allSizes = ['24', '30', '36', '42', '48'];
|
|
516
|
+
const allRowSizes = [null, '24', '30', '36', '42', '48'];
|
|
517
|
+
const allSemanticColors = ['info', 'success', 'warning', 'error'];
|
|
518
|
+
const allButtonSemanticColors = ['accent', 'primary', 'secondary', 'negative'];
|
|
519
|
+
const allEpamBadgeSemanticColors = ['info', 'success', 'warning', 'error', 'default'];
|
|
520
|
+
const allTextSizes = ['18', '24', '30', '36', '48'];
|
|
521
|
+
const allFontStyles = ['regular', 'semibold', 'italic', 'primary', 'promo'];
|
|
522
|
+
exports.EditMode = void 0;
|
|
523
|
+
(function (EditMode) {
|
|
524
|
+
EditMode["FORM"] = "form";
|
|
525
|
+
EditMode["CELL"] = "cell";
|
|
526
|
+
EditMode["INLINE"] = "inline";
|
|
527
|
+
})(exports.EditMode || (exports.EditMode = {}));
|
|
514
528
|
|
|
515
|
-
var _path$
|
|
516
|
-
function _extends$
|
|
529
|
+
var _path$F;
|
|
530
|
+
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); }
|
|
517
531
|
var SvgCheck12 = function SvgCheck12(props, ref) {
|
|
518
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
532
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$I({
|
|
519
533
|
width: 12,
|
|
520
534
|
height: 12,
|
|
521
535
|
viewBox: "0 0 12 12",
|
|
522
536
|
xmlns: "http://www.w3.org/2000/svg",
|
|
523
537
|
ref: ref
|
|
524
|
-
}, props), _path$
|
|
538
|
+
}, props), _path$F || (_path$F = /*#__PURE__*/React__namespace.createElement("path", {
|
|
525
539
|
fillRule: "evenodd",
|
|
526
540
|
d: "M9.491 3.449 10.51 4.55 5.663 9.024 2.487 6.047l1.026-1.094L5.67 6.975z"
|
|
527
541
|
})));
|
|
528
542
|
};
|
|
529
|
-
var ForwardRef$
|
|
543
|
+
var ForwardRef$I = /*#__PURE__*/React.forwardRef(SvgCheck12);
|
|
530
544
|
|
|
531
|
-
var _path$
|
|
532
|
-
function _extends$
|
|
545
|
+
var _path$E;
|
|
546
|
+
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); }
|
|
533
547
|
var SvgCheck18 = function SvgCheck18(props, ref) {
|
|
534
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
548
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$H({
|
|
535
549
|
width: 18,
|
|
536
550
|
height: 18,
|
|
537
551
|
viewBox: "0 0 18 18",
|
|
538
552
|
xmlns: "http://www.w3.org/2000/svg",
|
|
539
553
|
ref: ref
|
|
540
|
-
}, props), _path$
|
|
554
|
+
}, props), _path$E || (_path$E = /*#__PURE__*/React__namespace.createElement("path", {
|
|
541
555
|
fillRule: "evenodd",
|
|
542
556
|
d: "m14.247 4.341 1.506 1.318-7.704 8.804-4.756-4.756 1.414-1.414 3.244 3.243z"
|
|
543
557
|
})));
|
|
544
558
|
};
|
|
545
|
-
var ForwardRef$
|
|
559
|
+
var ForwardRef$H = /*#__PURE__*/React.forwardRef(SvgCheck18);
|
|
546
560
|
|
|
547
|
-
var _path$
|
|
548
|
-
function _extends$
|
|
561
|
+
var _path$D;
|
|
562
|
+
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); }
|
|
549
563
|
var SvgPartlySelect12 = function SvgPartlySelect12(props, ref) {
|
|
550
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
564
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$G({
|
|
551
565
|
width: 12,
|
|
552
566
|
height: 12,
|
|
553
567
|
viewBox: "0 0 12 12",
|
|
554
568
|
xmlns: "http://www.w3.org/2000/svg",
|
|
555
569
|
ref: ref
|
|
556
|
-
}, props), _path$
|
|
570
|
+
}, props), _path$D || (_path$D = /*#__PURE__*/React__namespace.createElement("path", {
|
|
557
571
|
fillRule: "evenodd",
|
|
558
572
|
d: "M9 5v2H3V5z"
|
|
559
573
|
})));
|
|
560
574
|
};
|
|
561
|
-
var ForwardRef$
|
|
575
|
+
var ForwardRef$G = /*#__PURE__*/React.forwardRef(SvgPartlySelect12);
|
|
562
576
|
|
|
563
|
-
var _path$
|
|
564
|
-
function _extends$
|
|
577
|
+
var _path$C;
|
|
578
|
+
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); }
|
|
565
579
|
var SvgPartlySelect18 = function SvgPartlySelect18(props, ref) {
|
|
566
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
580
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$F({
|
|
567
581
|
width: 18,
|
|
568
582
|
height: 18,
|
|
569
583
|
viewBox: "0 0 18 18",
|
|
570
584
|
xmlns: "http://www.w3.org/2000/svg",
|
|
571
585
|
ref: ref
|
|
572
|
-
}, props), _path$
|
|
586
|
+
}, props), _path$C || (_path$C = /*#__PURE__*/React__namespace.createElement("path", {
|
|
573
587
|
fillRule: "evenodd",
|
|
574
588
|
d: "M14 8v2H4V8z"
|
|
575
589
|
})));
|
|
576
590
|
};
|
|
577
|
-
var ForwardRef$
|
|
591
|
+
var ForwardRef$F = /*#__PURE__*/React.forwardRef(SvgPartlySelect18);
|
|
592
|
+
|
|
593
|
+
var css$_ = {"typography-header":"Checkbox_typography-header__7PKo9","typography-block":"Checkbox_typography-block__9ZdZP","typography-inline":"Checkbox_typography-inline__v0o42","typography-16":"Checkbox_typography-16__QPhxK","typography-14":"Checkbox_typography-14__LuNUA","typography-12":"Checkbox_typography-12__UsWx3","typography-promo":"Checkbox_typography-promo__-nAeN Checkbox_typography-header__7PKo9 Checkbox_typography-block__9ZdZP Checkbox_typography-inline__v0o42","root":"Checkbox_root__-oMf6","size-18":"Checkbox_size-18__BzbEk","size-12":"Checkbox_size-12__ASr3R","mode-cell":"Checkbox_mode-cell__qVdJV","typographyHeader":"Checkbox_typography-header__7PKo9","typographyBlock":"Checkbox_typography-block__9ZdZP","typographyInline":"Checkbox_typography-inline__v0o42","typography16":"Checkbox_typography-16__QPhxK","typography14":"Checkbox_typography-14__LuNUA","typography12":"Checkbox_typography-12__UsWx3","typographyPromo":"Checkbox_typography-promo__-nAeN Checkbox_typography-header__7PKo9 Checkbox_typography-block__9ZdZP Checkbox_typography-inline__v0o42","size18":"Checkbox_size-18__BzbEk","size12":"Checkbox_size-12__ASr3R","modeCell":"Checkbox_mode-cell__qVdJV"};
|
|
578
594
|
|
|
579
595
|
function applyCheckboxMods(mods) {
|
|
580
596
|
return [
|
|
581
|
-
|
|
582
|
-
css$
|
|
583
|
-
css$
|
|
597
|
+
css$_.root,
|
|
598
|
+
css$_['size-' + (mods.size || '18')],
|
|
599
|
+
css$_['mode-' + (mods.mode || 'form')],
|
|
584
600
|
];
|
|
585
601
|
}
|
|
586
|
-
const
|
|
587
|
-
icon: (props.size === '12') ? ForwardRef$
|
|
588
|
-
indeterminateIcon: (props.size === '12') ? ForwardRef$
|
|
589
|
-
})
|
|
602
|
+
const applyUUICheckboxProps = (props) => ({
|
|
603
|
+
icon: (props.size === '12') ? ForwardRef$I : ForwardRef$H,
|
|
604
|
+
indeterminateIcon: (props.size === '12') ? ForwardRef$G : ForwardRef$F,
|
|
605
|
+
});
|
|
606
|
+
const Checkbox = uuiCore.withMods(uuiComponents.Checkbox, applyCheckboxMods, applyUUICheckboxProps);
|
|
590
607
|
|
|
591
|
-
var css$
|
|
608
|
+
var css$Z = {"typography-header":"RadioInput_typography-header__TjrmU","typography-block":"RadioInput_typography-block__N9NNT","typography-inline":"RadioInput_typography-inline__9Q7fd","typography-16":"RadioInput_typography-16__MAISE","typography-14":"RadioInput_typography-14__dXuSH","typography-12":"RadioInput_typography-12__qFDEG","typography-promo":"RadioInput_typography-promo__w74S0 RadioInput_typography-header__TjrmU RadioInput_typography-block__N9NNT RadioInput_typography-inline__9Q7fd","root":"RadioInput_root__wxJgt","size-18":"RadioInput_size-18__csI3z","size-12":"RadioInput_size-12__2lBQH","typographyHeader":"RadioInput_typography-header__TjrmU","typographyBlock":"RadioInput_typography-block__N9NNT","typographyInline":"RadioInput_typography-inline__9Q7fd","typography16":"RadioInput_typography-16__MAISE","typography14":"RadioInput_typography-14__dXuSH","typography12":"RadioInput_typography-12__qFDEG","typographyPromo":"RadioInput_typography-promo__w74S0 RadioInput_typography-header__TjrmU RadioInput_typography-block__N9NNT RadioInput_typography-inline__9Q7fd","size18":"RadioInput_size-18__csI3z","size12":"RadioInput_size-12__2lBQH"};
|
|
592
609
|
|
|
593
610
|
var _circle;
|
|
594
|
-
function _extends$
|
|
611
|
+
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); }
|
|
595
612
|
var SvgRadioPoint = function SvgRadioPoint(props, ref) {
|
|
596
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
613
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$E({
|
|
597
614
|
width: 18,
|
|
598
615
|
height: 18,
|
|
599
616
|
viewBox: "0 0 18 18",
|
|
@@ -605,124 +622,228 @@ var SvgRadioPoint = function SvgRadioPoint(props, ref) {
|
|
|
605
622
|
r: 6
|
|
606
623
|
})));
|
|
607
624
|
};
|
|
608
|
-
var ForwardRef$
|
|
625
|
+
var ForwardRef$E = /*#__PURE__*/React.forwardRef(SvgRadioPoint);
|
|
609
626
|
|
|
610
627
|
function applyRadioInputMods(mods) {
|
|
611
628
|
return [
|
|
612
|
-
|
|
613
|
-
css$
|
|
614
|
-
css$w['size-' + (mods.size || '18')],
|
|
629
|
+
css$Z.root,
|
|
630
|
+
css$Z['size-' + (mods.size || '18')],
|
|
615
631
|
];
|
|
616
632
|
}
|
|
617
|
-
const RadioInput = uuiCore.withMods(uuiComponents.RadioInput, applyRadioInputMods, () => ({ icon: ForwardRef$
|
|
633
|
+
const RadioInput = uuiCore.withMods(uuiComponents.RadioInput, applyRadioInputMods, () => ({ icon: ForwardRef$E }));
|
|
618
634
|
|
|
619
|
-
var css$
|
|
635
|
+
var css$Y = {"root":"Switch_root__q-6Iy","size-12":"Switch_size-12__7-pqh","size-18":"Switch_size-18__l3E-E","size-24":"Switch_size-24__DmaSh","size12":"Switch_size-12__7-pqh","size18":"Switch_size-18__l3E-E","size24":"Switch_size-24__DmaSh"};
|
|
620
636
|
|
|
621
637
|
function applySwitchMods(mods) {
|
|
622
638
|
return [
|
|
623
639
|
'switch-vars',
|
|
624
|
-
css$
|
|
625
|
-
css$
|
|
640
|
+
css$Y.root,
|
|
641
|
+
css$Y['size-' + (mods.size || '18')],
|
|
626
642
|
];
|
|
627
643
|
}
|
|
628
644
|
const Switch = uuiCore.withMods(uuiComponents.Switch, applySwitchMods);
|
|
629
645
|
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
646
|
+
/******************************************************************************
|
|
647
|
+
Copyright (c) Microsoft Corporation.
|
|
648
|
+
|
|
649
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
650
|
+
purpose with or without fee is hereby granted.
|
|
651
|
+
|
|
652
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
653
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
654
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
655
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
656
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
657
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
658
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
659
|
+
***************************************************************************** */
|
|
660
|
+
|
|
661
|
+
function __rest(s, e) {
|
|
662
|
+
var t = {};
|
|
663
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
664
|
+
t[p] = s[p];
|
|
665
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
666
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
667
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
668
|
+
t[p[i]] = s[p[i]];
|
|
669
|
+
}
|
|
670
|
+
return t;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
674
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
675
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
676
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
677
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
678
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
679
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
680
|
+
});
|
|
681
|
+
}
|
|
641
682
|
|
|
642
|
-
var
|
|
683
|
+
var textInputCss = {"typography-header":"TextInput_typography-header__D2R6e","typography-block":"TextInput_typography-block__tb5ac","typography-inline":"TextInput_typography-inline__DAwAE","typography-16":"TextInput_typography-16__FJ4fX","typography-14":"TextInput_typography-14__LgtNs","typography-12":"TextInput_typography-12__rCAko","typography-promo":"TextInput_typography-promo__uZQ6- TextInput_typography-header__D2R6e TextInput_typography-block__tb5ac TextInput_typography-inline__DAwAE","root":"TextInput_root__UKzkT","mode-form":"TextInput_mode-form__JsK1y","mode-inline":"TextInput_mode-inline__QkIod","mode-cell":"TextInput_mode-cell__H2C-f","size-24":"TextInput_size-24__buGZm","size-30":"TextInput_size-30__G0e43","size-36":"TextInput_size-36__bOehk","size-42":"TextInput_size-42__5Gdbv","size-48":"TextInput_size-48__Eb1Xy","typographyHeader":"TextInput_typography-header__D2R6e","typographyBlock":"TextInput_typography-block__tb5ac","typographyInline":"TextInput_typography-inline__DAwAE","typography16":"TextInput_typography-16__FJ4fX","typography14":"TextInput_typography-14__LgtNs","typography12":"TextInput_typography-12__rCAko","typographyPromo":"TextInput_typography-promo__uZQ6- TextInput_typography-header__D2R6e TextInput_typography-block__tb5ac TextInput_typography-inline__DAwAE","modeForm":"TextInput_mode-form__JsK1y","modeInline":"TextInput_mode-inline__QkIod","modeCell":"TextInput_mode-cell__H2C-f","size24":"TextInput_size-24__buGZm","size30":"TextInput_size-30__G0e43","size36":"TextInput_size-36__bOehk","size42":"TextInput_size-42__5Gdbv","size48":"TextInput_size-48__Eb1Xy"};
|
|
643
684
|
|
|
644
|
-
const defaultSize$
|
|
645
|
-
const defaultMode$
|
|
685
|
+
const defaultSize$8 = '36';
|
|
686
|
+
const defaultMode$4 = exports.EditMode.FORM;
|
|
646
687
|
function applyTextInputMods(mods) {
|
|
647
688
|
return [
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
css$u['mode-' + (mods.mode || defaultMode$1)],
|
|
689
|
+
textInputCss.root,
|
|
690
|
+
textInputCss['size-' + (mods.size || defaultSize$8)],
|
|
691
|
+
textInputCss['mode-' + (mods.mode || defaultMode$4)],
|
|
652
692
|
];
|
|
653
693
|
}
|
|
654
694
|
const TextInput = uuiCore.withMods(uuiComponents.TextInput, applyTextInputMods, (props) => ({
|
|
655
|
-
acceptIcon: systemIcons[props.size || defaultSize$
|
|
656
|
-
cancelIcon: systemIcons[props.size || defaultSize$
|
|
657
|
-
dropdownIcon: systemIcons[props.size || defaultSize$
|
|
695
|
+
acceptIcon: systemIcons[props.size || defaultSize$8].accept,
|
|
696
|
+
cancelIcon: systemIcons[props.size || defaultSize$8].clear,
|
|
697
|
+
dropdownIcon: systemIcons[props.size || defaultSize$8].foldingArrow,
|
|
658
698
|
}));
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
}
|
|
666
|
-
}
|
|
699
|
+
const SearchInput = React__namespace.default.forwardRef((props, ref) => {
|
|
700
|
+
// analytics events are sending in IEditableDebouncer, so we need to avoid sending events in TextInput
|
|
701
|
+
const textInputProps = __rest(props, []);
|
|
702
|
+
delete textInputProps.getValueChangeAnalyticsEvent;
|
|
703
|
+
return (React__namespace.default.createElement(uuiCore.IEditableDebouncer, Object.assign({}, props, { render: iEditable => (React__namespace.default.createElement(TextInput, Object.assign({ icon: systemIcons[props.size || defaultSize$8].search, onCancel: !!props.value ? (() => iEditable.onValueChange('')) : undefined, type: "search", inputMode: "search", ref: ref }, textInputProps, iEditable))) })));
|
|
704
|
+
});
|
|
667
705
|
|
|
668
|
-
var css$
|
|
706
|
+
var css$X = {"root":"Accordion_root__fTEyW","mode-block":"Accordion_mode-block__WJ0h9","mode-inline":"Accordion_mode-inline__2zs0-","padding-0":"Accordion_padding-0__GQG7C","padding-6":"Accordion_padding-6__0FFj5","padding-12":"Accordion_padding-12__Bl9rW","padding-18":"Accordion_padding-18__XQdL-","modeBlock":"Accordion_mode-block__WJ0h9","modeInline":"Accordion_mode-inline__2zs0-","padding0":"Accordion_padding-0__GQG7C","padding6":"Accordion_padding-6__0FFj5","padding12":"Accordion_padding-12__Bl9rW","padding18":"Accordion_padding-18__XQdL-"};
|
|
669
707
|
|
|
670
708
|
function applyAccordionMods(mods) {
|
|
671
709
|
return [
|
|
672
|
-
|
|
673
|
-
css$
|
|
674
|
-
css$
|
|
675
|
-
mods.padding && css$t['padding-' + mods.padding],
|
|
710
|
+
css$X.root,
|
|
711
|
+
css$X['mode-' + (mods.mode || 'block')],
|
|
712
|
+
mods.padding && css$X['padding-' + mods.padding],
|
|
676
713
|
];
|
|
677
714
|
}
|
|
678
715
|
const Accordion = uuiCore.withMods(uuiComponents.Accordion, applyAccordionMods, (mods) => ({
|
|
679
716
|
dropdownIcon: mods.dropdownIcon !== null && systemIcons[mods.mode === 'block' ? '60' : '30'].foldingArrow,
|
|
680
717
|
}));
|
|
681
718
|
|
|
682
|
-
var css$
|
|
719
|
+
var css$W = {"root":"ControlGroup_root__wOZ9-"};
|
|
683
720
|
|
|
684
|
-
const ControlGroup = uuiCore.withMods(uuiComponents.ControlGroup, () => [css$
|
|
721
|
+
const ControlGroup = uuiCore.withMods(uuiComponents.ControlGroup, () => [css$W.root]);
|
|
685
722
|
|
|
686
|
-
var css$
|
|
723
|
+
var css$V = {"typography-header":"FlexRow_typography-header__2lsWG","typography-block":"FlexRow_typography-block__I0TO6","typography-inline":"FlexRow_typography-inline__br3BL","typography-16":"FlexRow_typography-16__ZDP4a","typography-14":"FlexRow_typography-14__fbJ6t","typography-12":"FlexRow_typography-12__xjb4B","typography-promo":"FlexRow_typography-promo__63NoR FlexRow_typography-header__2lsWG FlexRow_typography-block__I0TO6 FlexRow_typography-inline__br3BL","root":"FlexRow_root__8pevZ","top-shadow":"FlexRow_top-shadow__yLJfa","size-24":"FlexRow_size-24__UC-Ra","size-30":"FlexRow_size-30__KKsZ5","size-36":"FlexRow_size-36__oVCZp","size-42":"FlexRow_size-42__n5Pxh","size-48":"FlexRow_size-48__N-bVM","padding-6":"FlexRow_padding-6__TyXUB","padding-12":"FlexRow_padding-12__NiZVt","padding-18":"FlexRow_padding-18__f-DJ9","padding-24":"FlexRow_padding-24__aVQje","margin-24":"FlexRow_margin-24__W8cmr","margin-12":"FlexRow_margin-12__Tt04l","vPadding-12":"FlexRow_vPadding-12__f3sn6","vPadding-18":"FlexRow_vPadding-18__7Ljl4","vPadding-24":"FlexRow_vPadding-24__nJLBC","vPadding-36":"FlexRow_vPadding-36__7E6EY","vPadding-48":"FlexRow_vPadding-48__zzaPF","spacing-6":"FlexRow_spacing-6__l7a8O","spacing-12":"FlexRow_spacing-12__8ToPe","spacing-18":"FlexRow_spacing-18__QdC3L","border-bottom":"FlexRow_border-bottom__5L1Xk","typographyHeader":"FlexRow_typography-header__2lsWG","typographyBlock":"FlexRow_typography-block__I0TO6","typographyInline":"FlexRow_typography-inline__br3BL","typography16":"FlexRow_typography-16__ZDP4a","typography14":"FlexRow_typography-14__fbJ6t","typography12":"FlexRow_typography-12__xjb4B","typographyPromo":"FlexRow_typography-promo__63NoR FlexRow_typography-header__2lsWG FlexRow_typography-block__I0TO6 FlexRow_typography-inline__br3BL","topShadow":"FlexRow_top-shadow__yLJfa","size24":"FlexRow_size-24__UC-Ra","size30":"FlexRow_size-30__KKsZ5","size36":"FlexRow_size-36__oVCZp","size42":"FlexRow_size-42__n5Pxh","size48":"FlexRow_size-48__N-bVM","padding6":"FlexRow_padding-6__TyXUB","padding12":"FlexRow_padding-12__NiZVt","padding18":"FlexRow_padding-18__f-DJ9","padding24":"FlexRow_padding-24__aVQje","margin24":"FlexRow_margin-24__W8cmr","margin12":"FlexRow_margin-12__Tt04l","vPadding12":"FlexRow_vPadding-12__f3sn6","vPadding18":"FlexRow_vPadding-18__7Ljl4","vPadding24":"FlexRow_vPadding-24__nJLBC","vPadding36":"FlexRow_vPadding-36__7E6EY","vPadding48":"FlexRow_vPadding-48__zzaPF","spacing6":"FlexRow_spacing-6__l7a8O","spacing12":"FlexRow_spacing-12__8ToPe","spacing18":"FlexRow_spacing-18__QdC3L","borderBottom":"FlexRow_border-bottom__5L1Xk"};
|
|
687
724
|
|
|
688
725
|
const FlexCell = uuiCore.withMods(uuiComponents.FlexCell, props => [
|
|
689
|
-
css$
|
|
726
|
+
css$V.flexCell,
|
|
690
727
|
]);
|
|
691
728
|
|
|
692
729
|
const FlexRow = uuiCore.withMods(uuiComponents.FlexRow, props => {
|
|
693
730
|
return [
|
|
694
|
-
css$
|
|
695
|
-
props.size !== null && css$
|
|
696
|
-
props.padding && css$
|
|
697
|
-
props.vPadding && css$
|
|
698
|
-
props.margin && css$
|
|
699
|
-
props.topShadow && css$
|
|
700
|
-
props.borderBottom && css$
|
|
701
|
-
props.spacing && css$
|
|
731
|
+
css$V.root,
|
|
732
|
+
props.size !== null && css$V['size-' + (props.size || '36')],
|
|
733
|
+
props.padding && css$V['padding-' + props.padding],
|
|
734
|
+
props.vPadding && css$V['vPadding-' + props.vPadding],
|
|
735
|
+
props.margin && css$V['margin-' + props.margin],
|
|
736
|
+
props.topShadow && css$V.topShadow,
|
|
737
|
+
props.borderBottom && css$V['border-bottom'],
|
|
738
|
+
props.spacing && css$V['spacing-' + props.spacing],
|
|
702
739
|
];
|
|
703
740
|
});
|
|
704
741
|
|
|
705
742
|
const FlexSpacer = uuiComponents.FlexSpacer;
|
|
706
743
|
|
|
707
|
-
var css$
|
|
744
|
+
var css$U = {"root":"Panel_root__Ue9u5","margin-24":"Panel_margin-24__EZfwq","padding-12":"Panel_padding-12__zmnQV","padding-24":"Panel_padding-24__mOtka","shadow":"Panel_shadow__lMI9N","margin24":"Panel_margin-24__EZfwq","padding12":"Panel_padding-12__zmnQV","padding24":"Panel_padding-24__mOtka"};
|
|
708
745
|
|
|
709
746
|
const Panel = uuiCore.withMods(uuiComponents.VPanel, props => [
|
|
710
|
-
'panel
|
|
711
|
-
css$
|
|
712
|
-
props.shadow && css$
|
|
713
|
-
props.
|
|
714
|
-
props.margin && css$q['margin-' + props.margin],
|
|
747
|
+
'uui-panel',
|
|
748
|
+
css$U.root,
|
|
749
|
+
props.shadow && css$U.shadow,
|
|
750
|
+
props.margin && css$U['margin-' + props.margin],
|
|
715
751
|
]);
|
|
716
752
|
|
|
717
|
-
var
|
|
753
|
+
var _path$B;
|
|
754
|
+
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); }
|
|
755
|
+
var SvgNotificationCheckCircleFill24 = function SvgNotificationCheckCircleFill24(props, ref) {
|
|
756
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$D({
|
|
757
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
758
|
+
width: 24,
|
|
759
|
+
height: 24,
|
|
760
|
+
viewBox: "0 0 24 24",
|
|
761
|
+
ref: ref
|
|
762
|
+
}, props), _path$B || (_path$B = /*#__PURE__*/React__namespace.createElement("path", {
|
|
763
|
+
fillRule: "evenodd",
|
|
764
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
765
|
+
})));
|
|
766
|
+
};
|
|
767
|
+
var ForwardRef$D = /*#__PURE__*/React.forwardRef(SvgNotificationCheckCircleFill24);
|
|
768
|
+
|
|
769
|
+
var _path$A;
|
|
770
|
+
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); }
|
|
771
|
+
var SvgNotificationWarningFill24 = function SvgNotificationWarningFill24(props, ref) {
|
|
772
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$C({
|
|
773
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
774
|
+
width: 24,
|
|
775
|
+
height: 24,
|
|
776
|
+
viewBox: "0 0 24 24",
|
|
777
|
+
ref: ref
|
|
778
|
+
}, props), _path$A || (_path$A = /*#__PURE__*/React__namespace.createElement("path", {
|
|
779
|
+
fillRule: "evenodd",
|
|
780
|
+
d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
|
|
781
|
+
})));
|
|
782
|
+
};
|
|
783
|
+
var ForwardRef$C = /*#__PURE__*/React.forwardRef(SvgNotificationWarningFill24);
|
|
718
784
|
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
785
|
+
var _path$z;
|
|
786
|
+
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); }
|
|
787
|
+
var SvgNotificationErrorFill24 = function SvgNotificationErrorFill24(props, ref) {
|
|
788
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$B({
|
|
789
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
790
|
+
width: 24,
|
|
791
|
+
height: 24,
|
|
792
|
+
viewBox: "0 0 24 24",
|
|
793
|
+
ref: ref
|
|
794
|
+
}, props), _path$z || (_path$z = /*#__PURE__*/React__namespace.createElement("path", {
|
|
795
|
+
fillRule: "evenodd",
|
|
796
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
|
|
797
|
+
})));
|
|
798
|
+
};
|
|
799
|
+
var ForwardRef$B = /*#__PURE__*/React.forwardRef(SvgNotificationErrorFill24);
|
|
800
|
+
|
|
801
|
+
var _path$y;
|
|
802
|
+
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); }
|
|
803
|
+
var SvgNotificationHelpFill24 = function SvgNotificationHelpFill24(props, ref) {
|
|
804
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$A({
|
|
805
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
806
|
+
width: 24,
|
|
807
|
+
height: 24,
|
|
808
|
+
viewBox: "0 0 24 24",
|
|
809
|
+
ref: ref
|
|
810
|
+
}, props), _path$y || (_path$y = /*#__PURE__*/React__namespace.createElement("path", {
|
|
811
|
+
fillRule: "evenodd",
|
|
812
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"
|
|
813
|
+
})));
|
|
814
|
+
};
|
|
815
|
+
var ForwardRef$A = /*#__PURE__*/React.forwardRef(SvgNotificationHelpFill24);
|
|
816
|
+
|
|
817
|
+
var _path$x;
|
|
818
|
+
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); }
|
|
819
|
+
var SvgNavigationClose24$1 = function SvgNavigationClose24(props, ref) {
|
|
820
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
|
|
821
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
822
|
+
width: 24,
|
|
823
|
+
height: 24,
|
|
824
|
+
viewBox: "0 0 24 24",
|
|
825
|
+
ref: ref
|
|
826
|
+
}, props), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
|
|
827
|
+
fillRule: "evenodd",
|
|
828
|
+
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"
|
|
829
|
+
})));
|
|
830
|
+
};
|
|
831
|
+
var ForwardRef$z = /*#__PURE__*/React.forwardRef(SvgNavigationClose24$1);
|
|
832
|
+
|
|
833
|
+
var css$T = {"root":"Alert_root__o9-Bu","icon-wrapper":"Alert_icon-wrapper__MVBsA","alert-wrapper":"Alert_alert-wrapper__QuJWm","action-wrapper":"Alert_action-wrapper__-z2l9","action-link":"Alert_action-link__Hj-D2","close-icon":"Alert_close-icon__brCPM","main-path":"Alert_main-path__jHhJZ","content":"Alert_content__ae2CO","iconWrapper":"Alert_icon-wrapper__MVBsA","alertWrapper":"Alert_alert-wrapper__QuJWm","actionWrapper":"Alert_action-wrapper__-z2l9","actionLink":"Alert_action-link__Hj-D2","closeIcon":"Alert_close-icon__brCPM","mainPath":"Alert_main-path__jHhJZ"};
|
|
834
|
+
|
|
835
|
+
const Alert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", Object.assign({ role: "alert", ref: ref, className: cx__default.default(css$T.alertWrapper, `alert-${props.color || 'default'}`, css$T.root, props.cx) }, props.rawProps),
|
|
836
|
+
React__namespace.createElement("div", { className: css$T.mainPath },
|
|
837
|
+
props.icon && React__namespace.createElement("div", { className: css$T.iconWrapper },
|
|
838
|
+
React__namespace.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$T.actionIcon })),
|
|
839
|
+
React__namespace.createElement("div", { className: css$T.content },
|
|
840
|
+
props.children,
|
|
841
|
+
props.actions && React__namespace.createElement("div", { className: css$T.actionWrapper }, props.actions.map(action => (React__namespace.createElement(LinkButton, { caption: action.name, onClick: action.action, key: action.name, cx: css$T.actionLink, size: '24' }))))),
|
|
842
|
+
props.onClose && React__namespace.createElement(IconButton, { icon: ForwardRef$z, color: 'default', onClick: props.onClose, cx: css$T.closeIcon })))));
|
|
843
|
+
const WarningAlert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$C, color: 'warning', ref: ref }, props))));
|
|
844
|
+
const SuccessAlert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$D, color: 'success', ref: ref }, props))));
|
|
845
|
+
const HintAlert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$A, color: 'info', ref: ref }, props))));
|
|
846
|
+
const ErrorAlert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$B, color: 'error', ref: ref }, props))));
|
|
726
847
|
|
|
727
848
|
class Dropdown extends React__namespace.Component {
|
|
728
849
|
render() {
|
|
@@ -730,27 +851,29 @@ class Dropdown extends React__namespace.Component {
|
|
|
730
851
|
}
|
|
731
852
|
}
|
|
732
853
|
|
|
733
|
-
var css$
|
|
854
|
+
var css$S = {"root":"DropdownContainer_root__0tHS6"};
|
|
734
855
|
|
|
735
856
|
function applyDropdownContainerMods(mods) {
|
|
736
857
|
return [
|
|
737
|
-
|
|
738
|
-
|
|
858
|
+
css$S.root,
|
|
859
|
+
mods.vPadding && `vPadding-${mods.vPadding}`,
|
|
860
|
+
mods.padding && `padding-${mods.padding}`,
|
|
739
861
|
];
|
|
740
862
|
}
|
|
741
863
|
const DropdownContainer = uuiCore.withMods(uuiComponents.DropdownContainer, applyDropdownContainerMods);
|
|
742
864
|
|
|
743
|
-
var css$
|
|
865
|
+
var css$R = {"typography-header":"DropdownMenu_typography-header__d5Gl6","typography-block":"DropdownMenu_typography-block__-l-b3","typography-inline":"DropdownMenu_typography-inline__QTz-3","typography-16":"DropdownMenu_typography-16__FrdMO","typography-14":"DropdownMenu_typography-14__cx4-6","typography-12":"DropdownMenu_typography-12__PDMu0","typography-promo":"DropdownMenu_typography-promo__-BGfx DropdownMenu_typography-header__d5Gl6 DropdownMenu_typography-block__-l-b3 DropdownMenu_typography-inline__QTz-3","menuRoot":"DropdownMenu_menuRoot__gRW4S","bodyRoot":"DropdownMenu_bodyRoot__hAgqI","submenuRootItem":"DropdownMenu_submenuRootItem__52Bxy","iconAfter":"DropdownMenu_iconAfter__Hbijr","iconCheck":"DropdownMenu_iconCheck__TtmI6","splitterRoot":"DropdownMenu_splitterRoot__mJGU2","splitter":"DropdownMenu_splitter__7AuFo","headerRoot":"DropdownMenu_headerRoot__iEVUM","itemRoot":"DropdownMenu_itemRoot__mBMPU","icon":"DropdownMenu_icon__YE2-L","link":"DropdownMenu_link__pgNjs","typographyHeader":"DropdownMenu_typography-header__d5Gl6","typographyBlock":"DropdownMenu_typography-block__-l-b3","typographyInline":"DropdownMenu_typography-inline__QTz-3","typography16":"DropdownMenu_typography-16__FrdMO","typography14":"DropdownMenu_typography-14__cx4-6","typography12":"DropdownMenu_typography-12__PDMu0","typographyPromo":"DropdownMenu_typography-promo__-BGfx DropdownMenu_typography-header__d5Gl6 DropdownMenu_typography-block__-l-b3 DropdownMenu_typography-inline__QTz-3"};
|
|
744
866
|
|
|
745
867
|
const icons = systemIcons['36'];
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
868
|
+
exports.IDropdownControlKeys = void 0;
|
|
869
|
+
(function (IDropdownControlKeys) {
|
|
870
|
+
IDropdownControlKeys["ENTER"] = "Enter";
|
|
871
|
+
IDropdownControlKeys["ESCAPE"] = "Escape";
|
|
872
|
+
IDropdownControlKeys["LEFT_ARROW"] = "ArrowLeft";
|
|
873
|
+
IDropdownControlKeys["RIGHT_ARROW"] = "ArrowRight";
|
|
874
|
+
IDropdownControlKeys["UP_ARROW"] = "ArrowUp";
|
|
875
|
+
IDropdownControlKeys["DOWN_ARROW"] = "ArrowDown";
|
|
876
|
+
})(exports.IDropdownControlKeys || (exports.IDropdownControlKeys = {}));
|
|
754
877
|
const DropdownMenuContainer = (props) => {
|
|
755
878
|
const menuRef = React.useRef(null);
|
|
756
879
|
const [currentlyFocused, setFocused] = React.useState(-1);
|
|
@@ -768,23 +891,23 @@ const DropdownMenuContainer = (props) => {
|
|
|
768
891
|
const handleArrowKeys = (e) => {
|
|
769
892
|
e.stopPropagation();
|
|
770
893
|
const lastMenuItemsIndex = menuItems.length - 1;
|
|
771
|
-
if (e.key ===
|
|
894
|
+
if (e.key === exports.IDropdownControlKeys.UP_ARROW) {
|
|
772
895
|
changeFocus(currentlyFocused > 0 ? currentlyFocused - 1 : lastMenuItemsIndex);
|
|
773
896
|
}
|
|
774
|
-
else if (e.key ===
|
|
897
|
+
else if (e.key === exports.IDropdownControlKeys.DOWN_ARROW) {
|
|
775
898
|
changeFocus(currentlyFocused < lastMenuItemsIndex ? currentlyFocused + 1 : 0);
|
|
776
899
|
}
|
|
777
900
|
else if (e.key === props.closeOnKey && props.onClose) {
|
|
778
901
|
props.onClose();
|
|
779
902
|
}
|
|
780
903
|
};
|
|
781
|
-
return (React__namespace.default.createElement(FocusLock__default.default, { as: "menu", className: css$
|
|
904
|
+
return (React__namespace.default.createElement(FocusLock__default.default, { as: "menu", className: css$R.menuRoot, returnFocus: true, autoFocus: false, ref: menuRef, lockProps: { onKeyDown: handleArrowKeys, tabIndex: -1 } },
|
|
782
905
|
React__namespace.default.createElement(uuiComponents.DropdownContainer, Object.assign({}, props, { rawProps: { tabIndex: -1 } }))));
|
|
783
906
|
};
|
|
784
|
-
const DropdownMenuBody = uuiCore.withMods(DropdownMenuContainer, () => [css$
|
|
785
|
-
const DropdownMenuButton = (props) => {
|
|
907
|
+
const DropdownMenuBody = uuiCore.withMods(DropdownMenuContainer, () => [css$R.bodyRoot], ({ style }) => ({ style }));
|
|
908
|
+
const DropdownMenuButton = React__namespace.default.forwardRef((props, ref) => {
|
|
786
909
|
const context = React.useContext(uuiCore.UuiContext);
|
|
787
|
-
const { icon, iconPosition, caption, isDisabled, isSelected, link, href, onClick, toggleDropdownOpening, isDropdown, target, } = props;
|
|
910
|
+
const { icon, iconPosition, onIconClick, caption, isDisabled, isSelected, isActive, link, href, onClick, toggleDropdownOpening, isDropdown, isOpen, target, } = props;
|
|
788
911
|
const handleClick = (event) => {
|
|
789
912
|
if (isDisabled || !onClick)
|
|
790
913
|
return;
|
|
@@ -792,39 +915,44 @@ const DropdownMenuButton = (props) => {
|
|
|
792
915
|
context.uuiAnalytics.sendEvent(props.clickAnalyticsEvent);
|
|
793
916
|
};
|
|
794
917
|
const handleOpenDropdown = (event) => {
|
|
795
|
-
if (event.key ===
|
|
918
|
+
if (event.key === exports.IDropdownControlKeys.RIGHT_ARROW && isDropdown) {
|
|
796
919
|
toggleDropdownOpening(true);
|
|
797
920
|
}
|
|
798
|
-
else if (event.key ===
|
|
921
|
+
else if (event.key === exports.IDropdownControlKeys.ENTER && onClick) {
|
|
799
922
|
onClick(event);
|
|
800
923
|
}
|
|
801
924
|
};
|
|
802
925
|
const getMenuButtonContent = () => {
|
|
803
926
|
const isIconBefore = Boolean(icon && iconPosition !== "right");
|
|
804
927
|
const isIconAfter = Boolean(icon && iconPosition === "right");
|
|
805
|
-
const iconElement = React__namespace.default.createElement(
|
|
928
|
+
const iconElement = React__namespace.default.createElement(IconButton, { icon: icon, color: isActive ? 'info' : 'default', onClick: onIconClick, cx: uuiCore.cx(css$R.icon, iconPosition === "right" ? css$R.iconAfter : css$R.iconBefore) });
|
|
806
929
|
return React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
807
930
|
isIconBefore && iconElement,
|
|
808
|
-
React__namespace.default.createElement(uuiComponents.Text, { cx: css$
|
|
931
|
+
React__namespace.default.createElement(uuiComponents.Text, { cx: css$R.caption }, caption),
|
|
809
932
|
isIconAfter && React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
810
933
|
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
811
934
|
iconElement));
|
|
812
935
|
};
|
|
813
936
|
const isAnchor = Boolean(link || href);
|
|
814
|
-
const itemClassNames = uuiCore.cx(props.cx, css$
|
|
815
|
-
return isAnchor ? (React__namespace.default.createElement(uuiComponents.Anchor, { cx: uuiCore.cx(css$
|
|
937
|
+
const itemClassNames = uuiCore.cx(props.cx, css$R.itemRoot, isDisabled && uuiCore.uuiMod.disabled, isActive && uuiCore.uuiMod.active, isOpen && uuiCore.uuiMod.opened);
|
|
938
|
+
return isAnchor ? (React__namespace.default.createElement(uuiComponents.Anchor, { cx: uuiCore.cx(css$R.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: {
|
|
816
939
|
tabIndex: isDisabled ? -1 : 0,
|
|
817
940
|
role: 'menuitem',
|
|
818
941
|
onKeyDown: isDisabled ? null : handleOpenDropdown,
|
|
819
|
-
}, cx: itemClassNames, onClick: handleClick },
|
|
820
|
-
|
|
942
|
+
}, cx: itemClassNames, onClick: handleClick, ref: ref },
|
|
943
|
+
getMenuButtonContent(),
|
|
944
|
+
isSelected && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icons.accept, cx: css$R.selectedCheckmark })));
|
|
945
|
+
});
|
|
821
946
|
DropdownMenuButton.displayName = 'DropdownMenuButton';
|
|
822
|
-
const DropdownMenuSplitter = (props) => (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$
|
|
823
|
-
React__namespace.default.createElement("hr", { className: css$
|
|
824
|
-
const DropdownMenuHeader = (props) => (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$
|
|
825
|
-
React__namespace.default.createElement("span", { className: css$
|
|
947
|
+
const DropdownMenuSplitter = (props) => (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$R.splitterRoot) },
|
|
948
|
+
React__namespace.default.createElement("hr", { className: css$R.splitter })));
|
|
949
|
+
const DropdownMenuHeader = (props) => (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$R.headerRoot) },
|
|
950
|
+
React__namespace.default.createElement("span", { className: css$R.header }, props.caption)));
|
|
826
951
|
const DropdownSubMenu = (props) => {
|
|
827
|
-
return (React__namespace.default.createElement(uuiComponents.Dropdown, { openOnHover: props.openOnHover || true, closeOnMouseLeave: "boundary", placement: "right-start", renderBody: (
|
|
952
|
+
return (React__namespace.default.createElement(uuiComponents.Dropdown, { openOnHover: props.openOnHover || true, closeOnMouseLeave: "boundary", placement: "right-start", renderBody: (dropdownProps) => (React__namespace.default.createElement(DropdownMenuBody, Object.assign({ closeOnKey: exports.IDropdownControlKeys.LEFT_ARROW }, props, dropdownProps))), renderTarget: (_a) => {
|
|
953
|
+
var { toggleDropdownOpening } = _a, targetProps = __rest(_a, ["toggleDropdownOpening"]);
|
|
954
|
+
return (React__namespace.default.createElement(DropdownMenuButton, Object.assign({ cx: uuiCore.cx(css$R.submenuRootItem), icon: icons.foldingArrow, iconPosition: "right", isDropdown: true, toggleDropdownOpening: toggleDropdownOpening }, props, targetProps)));
|
|
955
|
+
} }));
|
|
828
956
|
};
|
|
829
957
|
const DropdownMenuSwitchButton = (props) => {
|
|
830
958
|
const context = React.useContext(uuiCore.UuiContext);
|
|
@@ -836,20 +964,20 @@ const DropdownMenuSwitchButton = (props) => {
|
|
|
836
964
|
context.uuiAnalytics.sendEvent(props.clickAnalyticsEvent);
|
|
837
965
|
};
|
|
838
966
|
const handleKeySelect = (e) => {
|
|
839
|
-
if (e.key ===
|
|
967
|
+
if (e.key === exports.IDropdownControlKeys.ENTER) {
|
|
840
968
|
onHandleValueChange(!isSelected);
|
|
841
969
|
}
|
|
842
970
|
};
|
|
843
|
-
return (React__namespace.default.createElement(uuiComponents.FlexRow, { cx: uuiCore.cx(props.cx, css$
|
|
844
|
-
icon && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icon, cx: css$
|
|
845
|
-
React__namespace.default.createElement(uuiComponents.Text, { cx: css$
|
|
971
|
+
return (React__namespace.default.createElement(uuiComponents.FlexRow, { cx: uuiCore.cx(props.cx, css$R.itemRoot, isDisabled && uuiCore.uuiMod.disabled), onClick: () => onHandleValueChange(!isSelected), rawProps: { role: 'menuitem', onKeyDown: handleKeySelect, tabIndex: isDisabled ? -1 : 0 } },
|
|
972
|
+
icon && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icon, cx: css$R.iconBefore }),
|
|
973
|
+
React__namespace.default.createElement(uuiComponents.Text, { cx: css$R.caption }, caption),
|
|
846
974
|
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
847
975
|
React__namespace.default.createElement(Switch, { value: isSelected, tabIndex: -1, onValueChange: onHandleValueChange })));
|
|
848
976
|
};
|
|
849
977
|
|
|
850
|
-
var css$
|
|
978
|
+
var css$Q = {"root":"Text_root__iUAW9"};
|
|
851
979
|
|
|
852
|
-
var css$
|
|
980
|
+
var css$P = {"line-height-12":"text-layout_line-height-12__-fXrz","line-height-18":"text-layout_line-height-18__kfeYe","line-height-24":"text-layout_line-height-24__VmJFi","line-height-30":"text-layout_line-height-30__C4k89","font-size-10":"text-layout_font-size-10__U-DE-","font-size-12":"text-layout_font-size-12__1WdLm","font-size-14":"text-layout_font-size-14__5I7px","font-size-16":"text-layout_font-size-16__loUuU","font-size-18":"text-layout_font-size-18__PvhrF","font-size-24":"text-layout_font-size-24__JsYUV","v-padding-2":"text-layout_v-padding-2__-bGuG","v-padding-3":"text-layout_v-padding-3__ImU4D","v-padding-5":"text-layout_v-padding-5__el2DC","v-padding-6":"text-layout_v-padding-6__4QshS","v-padding-8":"text-layout_v-padding-8__CKQZ6","v-padding-9":"text-layout_v-padding-9__8cSJ-","v-padding-11":"text-layout_v-padding-11__kJwOK","v-padding-12":"text-layout_v-padding-12__J6PjS","v-padding-14":"text-layout_v-padding-14__TgJs7","v-padding-15":"text-layout_v-padding-15__kVl-D","v-padding-17":"text-layout_v-padding-17__065AA","v-padding-18":"text-layout_v-padding-18__hxDYP","v-padding-23":"text-layout_v-padding-23__44pE2","v-padding-24":"text-layout_v-padding-24__gxRAs","lineHeight12":"text-layout_line-height-12__-fXrz","lineHeight18":"text-layout_line-height-18__kfeYe","lineHeight24":"text-layout_line-height-24__VmJFi","lineHeight30":"text-layout_line-height-30__C4k89","fontSize10":"text-layout_font-size-10__U-DE-","fontSize12":"text-layout_font-size-12__1WdLm","fontSize14":"text-layout_font-size-14__5I7px","fontSize16":"text-layout_font-size-16__loUuU","fontSize18":"text-layout_font-size-18__PvhrF","fontSize24":"text-layout_font-size-24__JsYUV","vPadding2":"text-layout_v-padding-2__-bGuG","vPadding3":"text-layout_v-padding-3__ImU4D","vPadding5":"text-layout_v-padding-5__el2DC","vPadding6":"text-layout_v-padding-6__4QshS","vPadding8":"text-layout_v-padding-8__CKQZ6","vPadding9":"text-layout_v-padding-9__8cSJ-","vPadding11":"text-layout_v-padding-11__kJwOK","vPadding12":"text-layout_v-padding-12__J6PjS","vPadding14":"text-layout_v-padding-14__TgJs7","vPadding15":"text-layout_v-padding-15__kVl-D","vPadding17":"text-layout_v-padding-17__065AA","vPadding18":"text-layout_v-padding-18__hxDYP","vPadding23":"text-layout_v-padding-23__44pE2","vPadding24":"text-layout_v-padding-24__gxRAs"};
|
|
853
981
|
|
|
854
982
|
const defaultTextSettings = {
|
|
855
983
|
18: { lineHeight: 12, fontSize: 10 },
|
|
@@ -863,8 +991,8 @@ const defaultTextSettings = {
|
|
|
863
991
|
function getTextClasses(props, border) {
|
|
864
992
|
if (props.size === 'none') {
|
|
865
993
|
return [
|
|
866
|
-
css$
|
|
867
|
-
css$
|
|
994
|
+
css$P['line-height-' + props.lineHeight],
|
|
995
|
+
css$P['font-size-' + props.fontSize],
|
|
868
996
|
];
|
|
869
997
|
}
|
|
870
998
|
const setting = {
|
|
@@ -874,9 +1002,9 @@ function getTextClasses(props, border) {
|
|
|
874
1002
|
};
|
|
875
1003
|
const vPadding = (+setting.size - +setting.lineHeight - (border ? 2 : 0)) / 2;
|
|
876
1004
|
return [
|
|
877
|
-
css$
|
|
878
|
-
css$
|
|
879
|
-
css$
|
|
1005
|
+
css$P['line-height-' + setting.lineHeight],
|
|
1006
|
+
css$P['font-size-' + setting.fontSize],
|
|
1007
|
+
css$P['v-padding-' + vPadding],
|
|
880
1008
|
];
|
|
881
1009
|
}
|
|
882
1010
|
|
|
@@ -887,17 +1015,17 @@ function applyTextMods(mods) {
|
|
|
887
1015
|
fontSize: mods.fontSize,
|
|
888
1016
|
}, false);
|
|
889
1017
|
return [
|
|
890
|
-
`font-${mods.font || 'regular'}`,
|
|
891
|
-
`text
|
|
892
|
-
css$
|
|
1018
|
+
`uui-font-${mods.font || 'regular'}`,
|
|
1019
|
+
`uui-text-${mods.color || 'primary'}`,
|
|
1020
|
+
css$Q.root,
|
|
893
1021
|
].concat(textClasses);
|
|
894
1022
|
}
|
|
895
1023
|
const Text = uuiCore.withMods(uuiComponents.Text, applyTextMods);
|
|
896
1024
|
|
|
897
|
-
var css$
|
|
1025
|
+
var css$O = {"container":"TextPlaceholder_container__Jn60D","loading-word":"TextPlaceholder_loading-word__22WpS","animated-loading":"TextPlaceholder_animated-loading__ao75r","skeleton_loading":"TextPlaceholder_skeleton_loading__NzV8h","loadingWord":"TextPlaceholder_loading-word__22WpS","animatedLoading":"TextPlaceholder_animated-loading__ao75r","skeletonLoading":"TextPlaceholder_skeleton_loading__NzV8h"};
|
|
898
1026
|
|
|
899
1027
|
const TextPlaceholder = (props) => {
|
|
900
|
-
const pattern =
|
|
1028
|
+
const pattern = ` `;
|
|
901
1029
|
const text = React__namespace.useMemo(() => {
|
|
902
1030
|
const words = [];
|
|
903
1031
|
for (let i = 0; i < (props.wordsCount || 1); i++) {
|
|
@@ -906,81 +1034,67 @@ const TextPlaceholder = (props) => {
|
|
|
906
1034
|
}
|
|
907
1035
|
return words;
|
|
908
1036
|
}, [props.wordsCount]);
|
|
909
|
-
return (React__namespace.createElement("div", { "aria-busy": true, className: css$
|
|
910
|
-
|
|
911
|
-
css$
|
|
912
|
-
!props.isNotAnimated && css$
|
|
1037
|
+
return (React__namespace.createElement("div", Object.assign({ "aria-busy": true, className: css$O.container }, props.rawProps), text.map((it, index) => (React__namespace.createElement("span", { key: index, className: cx__default.default([
|
|
1038
|
+
props.cx,
|
|
1039
|
+
css$O.loadingWord,
|
|
1040
|
+
!props.isNotAnimated && css$O.animatedLoading,
|
|
913
1041
|
]), dangerouslySetInnerHTML: { __html: it } })))));
|
|
914
1042
|
};
|
|
915
1043
|
|
|
916
|
-
var
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
height: 24,
|
|
923
|
-
viewBox: "0 0 24 24",
|
|
924
|
-
ref: ref
|
|
925
|
-
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
926
|
-
fillRule: "evenodd",
|
|
927
|
-
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"
|
|
928
|
-
})));
|
|
929
|
-
};
|
|
930
|
-
var ForwardRef$b = /*#__PURE__*/React.forwardRef(SvgNavigationClose24$1);
|
|
1044
|
+
var style = {"typography-header":"typography_typography-header__xCe-Q","typography-block":"typography_typography-block__xvrwC","typography-inline":"typography_typography-inline__EbQN2","typography-16":"typography_typography-16__4OCWa","typography-14":"typography_typography-14__4Rcyl","typography-12":"typography_typography-12__2BEhy","typography-promo":"typography_typography-promo__P68Jv typography_typography-header__xCe-Q typography_typography-block__xvrwC typography_typography-inline__EbQN2","typographyHeader":"typography_typography-header__xCe-Q","typographyBlock":"typography_typography-block__xvrwC","typographyInline":"typography_typography-inline__EbQN2","typography16":"typography_typography-16__4OCWa","typography14":"typography_typography-14__4Rcyl","typography12":"typography_typography-12__2BEhy","typographyPromo":"typography_typography-promo__P68Jv typography_typography-header__xCe-Q typography_typography-block__xvrwC typography_typography-inline__EbQN2"};
|
|
1045
|
+
|
|
1046
|
+
const RichTextView = uuiCore.withMods(uuiComponents.RichTextView, (mods) => [
|
|
1047
|
+
style.typographyPromo,
|
|
1048
|
+
style['typography-' + (mods.size || '14')],
|
|
1049
|
+
]);
|
|
931
1050
|
|
|
932
|
-
var css$
|
|
1051
|
+
var css$N = {"typography-header":"Modals_typography-header__Jwt-p","typography-block":"Modals_typography-block__szftG","typography-inline":"Modals_typography-inline__ZDBk-","typography-16":"Modals_typography-16__5x7rd","typography-14":"Modals_typography-14__ZF20L","typography-12":"Modals_typography-12__4fSpR","typography-promo":"Modals_typography-promo__JbRIA Modals_typography-header__Jwt-p Modals_typography-block__szftG Modals_typography-inline__ZDBk-","modal-blocker":"Modals_modal-blocker__nCAZ7","animateModalBlocker":"Modals_animateModalBlocker__S-4dL","modal":"Modals_modal__m41wI","modal-footer":"Modals_modal-footer__gg-90","border-top":"Modals_border-top__cfzhv","modal-header":"Modals_modal-header__8aswP","typographyHeader":"Modals_typography-header__Jwt-p","typographyBlock":"Modals_typography-block__szftG","typographyInline":"Modals_typography-inline__ZDBk-","typography16":"Modals_typography-16__5x7rd","typography14":"Modals_typography-14__ZF20L","typography12":"Modals_typography-12__4fSpR","typographyPromo":"Modals_typography-promo__JbRIA Modals_typography-header__Jwt-p Modals_typography-block__szftG Modals_typography-inline__ZDBk-","modalBlocker":"Modals_modal-blocker__nCAZ7","modalFooter":"Modals_modal-footer__gg-90","borderTop":"Modals_border-top__cfzhv","modalHeader":"Modals_modal-header__8aswP"};
|
|
933
1052
|
|
|
934
|
-
const ModalBlocker = uuiCore.withMods(uuiComponents.ModalBlocker,
|
|
935
|
-
|
|
936
|
-
css$j.modalBlocker,
|
|
937
|
-
mods.overlay && css$j['blocker-overlay'],
|
|
1053
|
+
const ModalBlocker = uuiCore.withMods(uuiComponents.ModalBlocker, () => [
|
|
1054
|
+
css$N.modalBlocker,
|
|
938
1055
|
]);
|
|
939
|
-
const ModalWindow = uuiCore.withMods(uuiComponents.ModalWindow, () => [
|
|
1056
|
+
const ModalWindow = uuiCore.withMods(uuiComponents.ModalWindow, () => [css$N.modal], props => ({ rawProps: {
|
|
940
1057
|
style: {
|
|
941
1058
|
width: `${props.width || 480}px`,
|
|
942
|
-
height: props.height ? `${props.height}px` : '',
|
|
1059
|
+
height: props.height ? `${props.height}px` : 'auto',
|
|
943
1060
|
},
|
|
944
1061
|
},
|
|
945
1062
|
}));
|
|
946
1063
|
class ModalHeader extends React__namespace.Component {
|
|
947
1064
|
render() {
|
|
948
|
-
return (React__namespace.createElement(FlexRow, { padding: this.props.padding || '24', vPadding: '12', borderBottom:
|
|
1065
|
+
return (React__namespace.createElement(FlexRow, { padding: this.props.padding || '24', vPadding: '12', borderBottom: this.props.borderBottom, cx: [css$N.modalHeader, this.props.cx], spacing: '12', rawProps: this.props.rawProps },
|
|
949
1066
|
this.props.title && React__namespace.createElement(Text, { size: '48', fontSize: '18', font: 'semibold' }, this.props.title),
|
|
950
1067
|
this.props.children,
|
|
951
1068
|
this.props.onClose && React__namespace.createElement(FlexSpacer, null),
|
|
952
1069
|
this.props.onClose && React__namespace.createElement(FlexCell, { shrink: 0, width: 'auto' },
|
|
953
|
-
React__namespace.createElement(IconButton, { icon: ForwardRef$
|
|
1070
|
+
React__namespace.createElement(IconButton, { icon: ForwardRef$z, onClick: this.props.onClose }))));
|
|
954
1071
|
}
|
|
955
1072
|
}
|
|
956
1073
|
class ModalFooter extends React__namespace.Component {
|
|
957
1074
|
render() {
|
|
958
|
-
return (React__namespace.createElement(FlexRow, { spacing: this.props.spacing || '12', cx: [
|
|
1075
|
+
return (React__namespace.createElement(FlexRow, { spacing: this.props.spacing || '12', cx: [css$N.modalFooter, this.props.borderTop && css$N.borderTop, this.props.cx], padding: this.props.padding || '24', vPadding: this.props.vPadding || '24', rawProps: this.props.rawProps }, this.props.children));
|
|
959
1076
|
}
|
|
960
1077
|
}
|
|
961
1078
|
|
|
962
|
-
const i18n = {
|
|
963
|
-
dataPickerBody: {
|
|
1079
|
+
const i18n = Object.assign(Object.assign({}, uuiCore.i18n), { dataPickerBody: {
|
|
964
1080
|
searchPlaceholder: 'Search',
|
|
965
1081
|
noRecordsMessage: 'No records found',
|
|
966
|
-
|
|
967
|
-
pickerModal: {
|
|
1082
|
+
noRecordsSubTitle: 'Check your spelling, or search for a different keyword',
|
|
1083
|
+
}, pickerModal: {
|
|
968
1084
|
headerTitle: 'Please select',
|
|
969
1085
|
searchPlaceholder: 'Type text for quick search',
|
|
970
1086
|
cancelButton: 'Cancel',
|
|
971
1087
|
selectButton: 'Select',
|
|
972
1088
|
clearAllButton: 'CLEAR ALL',
|
|
973
1089
|
selectAllButton: 'SELECT ALL',
|
|
974
|
-
},
|
|
975
|
-
pickerInput: {
|
|
1090
|
+
}, pickerInput: {
|
|
976
1091
|
showOnlySelectedLabel: 'Show only selected',
|
|
977
1092
|
clearSelectionButton: 'CLEAR ALL',
|
|
1093
|
+
clearSelectionButtonSingle: 'CLEAR',
|
|
978
1094
|
selectAllButton: 'SELECT ALL',
|
|
979
|
-
},
|
|
980
|
-
notificationCard: {
|
|
1095
|
+
}, notificationCard: {
|
|
981
1096
|
closeAllNotificationsButton: 'CLOSE ALL NOTIFICATIONS',
|
|
982
|
-
},
|
|
983
|
-
form: {
|
|
1097
|
+
}, form: {
|
|
984
1098
|
notifications: {
|
|
985
1099
|
actionButtonCaption: 'Restore',
|
|
986
1100
|
unsavedChangesMessage: 'You have unsaved changes. Click Restore button if you would like to recover the data',
|
|
@@ -990,193 +1104,301 @@ const i18n = {
|
|
|
990
1104
|
discardButton: 'Discard',
|
|
991
1105
|
saveButton: 'Save',
|
|
992
1106
|
},
|
|
993
|
-
},
|
|
994
|
-
rangeDatePicker: {
|
|
1107
|
+
}, rangeDatePicker: {
|
|
995
1108
|
pickerPlaceholderFrom: 'From:',
|
|
996
1109
|
pickerPlaceholderTo: 'To:',
|
|
997
|
-
},
|
|
998
|
-
|
|
1110
|
+
}, tables: {
|
|
1111
|
+
noResultsBlock: {
|
|
1112
|
+
title: 'No results found',
|
|
1113
|
+
message: 'We can’t find any item matching your request',
|
|
1114
|
+
},
|
|
999
1115
|
columnsConfigurationModal: {
|
|
1000
1116
|
applyButton: 'Apply',
|
|
1001
|
-
|
|
1002
|
-
|
|
1117
|
+
cancelButton: 'Cancel',
|
|
1118
|
+
selectAllButton: 'Select all',
|
|
1119
|
+
clearAllButton: 'Clear all',
|
|
1120
|
+
checkAllButton: 'Check All',
|
|
1121
|
+
uncheckAllButton: 'Uncheck All',
|
|
1003
1122
|
configureColumnsTitle: 'Configure columns',
|
|
1004
1123
|
resetToDefaultButton: 'Reset to Default',
|
|
1124
|
+
displayedSectionTitle: 'Displayed in table',
|
|
1125
|
+
hiddenSectionTitle: 'Hidden in table',
|
|
1126
|
+
searchPlaceholder: 'Search by column name',
|
|
1127
|
+
noResultsFound: {
|
|
1128
|
+
text: 'No results found',
|
|
1129
|
+
subText: 'We can’t find any item matching your request',
|
|
1130
|
+
},
|
|
1131
|
+
enableAtLeastOneColumnMessage: 'Please enable at least one column',
|
|
1132
|
+
pinColumnButton: "Pin column",
|
|
1133
|
+
unPinColumnButton: "Unpin column",
|
|
1134
|
+
lockedColumnPinButton: "You cannot unpin this column",
|
|
1005
1135
|
},
|
|
1006
|
-
},
|
|
1007
|
-
pickerFilterHeader: {
|
|
1136
|
+
}, pickerFilterHeader: {
|
|
1008
1137
|
sortAscending: 'Sort Ascending',
|
|
1009
1138
|
sortDescending: 'Sort Descending',
|
|
1010
|
-
},
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
1033
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1034
|
-
width: 24,
|
|
1035
|
-
height: 24,
|
|
1036
|
-
viewBox: "0 0 24 24",
|
|
1037
|
-
ref: ref
|
|
1038
|
-
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1039
|
-
fillRule: "evenodd",
|
|
1040
|
-
d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
|
|
1041
|
-
})));
|
|
1042
|
-
};
|
|
1043
|
-
var ForwardRef$9 = /*#__PURE__*/React.forwardRef(SvgNotificationWarningFill24);
|
|
1044
|
-
|
|
1045
|
-
var _path$7;
|
|
1046
|
-
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); }
|
|
1047
|
-
var SvgNotificationErrorFill24 = function SvgNotificationErrorFill24(props, ref) {
|
|
1048
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
1049
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1050
|
-
width: 24,
|
|
1051
|
-
height: 24,
|
|
1052
|
-
viewBox: "0 0 24 24",
|
|
1053
|
-
ref: ref
|
|
1054
|
-
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1055
|
-
fillRule: "evenodd",
|
|
1056
|
-
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
|
|
1057
|
-
})));
|
|
1058
|
-
};
|
|
1059
|
-
var ForwardRef$8 = /*#__PURE__*/React.forwardRef(SvgNotificationErrorFill24);
|
|
1060
|
-
|
|
1061
|
-
var _path$6;
|
|
1062
|
-
function _extends$7() { _extends$7 = 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$7.apply(this, arguments); }
|
|
1063
|
-
var SvgNotificationHelpFill24 = function SvgNotificationHelpFill24(props, ref) {
|
|
1064
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
1065
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1066
|
-
width: 24,
|
|
1067
|
-
height: 24,
|
|
1068
|
-
viewBox: "0 0 24 24",
|
|
1069
|
-
ref: ref
|
|
1070
|
-
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1071
|
-
fillRule: "evenodd",
|
|
1072
|
-
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"
|
|
1073
|
-
})));
|
|
1074
|
-
};
|
|
1075
|
-
var ForwardRef$7 = /*#__PURE__*/React.forwardRef(SvgNotificationHelpFill24);
|
|
1139
|
+
}, filterToolbar: {
|
|
1140
|
+
addCaption: 'Add filter',
|
|
1141
|
+
datePicker: {
|
|
1142
|
+
placeholder: 'Select date',
|
|
1143
|
+
removeCaption: 'REMOVE FILTER',
|
|
1144
|
+
clearCaption: 'CLEAR',
|
|
1145
|
+
},
|
|
1146
|
+
rangeDatePicker: {
|
|
1147
|
+
emptyPickerPlaceholder: 'Select period',
|
|
1148
|
+
emptyPlaceholderFrom: 'Select From',
|
|
1149
|
+
emptyPlaceholderTo: 'Select To',
|
|
1150
|
+
},
|
|
1151
|
+
pickerInput: {
|
|
1152
|
+
itemsPlaceholder: 'items',
|
|
1153
|
+
emptyValueCaption: 'ALL',
|
|
1154
|
+
},
|
|
1155
|
+
}, presetPanel: {
|
|
1156
|
+
addCaption: 'Add Preset',
|
|
1157
|
+
}, confirmationModal: {
|
|
1158
|
+
discardButton: 'Discard',
|
|
1159
|
+
saveButton: 'Save',
|
|
1160
|
+
} });
|
|
1076
1161
|
|
|
1077
|
-
var _path$
|
|
1078
|
-
function _extends$
|
|
1162
|
+
var _path$w;
|
|
1163
|
+
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); }
|
|
1079
1164
|
var SvgCross = function SvgCross(props, ref) {
|
|
1080
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1165
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
|
|
1081
1166
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1082
1167
|
width: 24,
|
|
1083
1168
|
height: 24,
|
|
1084
1169
|
viewBox: "0 0 24 24",
|
|
1085
1170
|
ref: ref
|
|
1086
|
-
}, props), _path$
|
|
1171
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1087
1172
|
fillRule: "evenodd",
|
|
1088
1173
|
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"
|
|
1089
1174
|
})));
|
|
1090
1175
|
};
|
|
1091
|
-
var ForwardRef$
|
|
1176
|
+
var ForwardRef$y = /*#__PURE__*/React.forwardRef(SvgCross);
|
|
1092
1177
|
|
|
1093
|
-
var css$
|
|
1178
|
+
var css$M = {"typography-header":"NotificationCard_typography-header__JcbKn","typography-block":"NotificationCard_typography-block__nKwA0","typography-inline":"NotificationCard_typography-inline__BO1HG","typography-16":"NotificationCard_typography-16__mixDm","typography-14":"NotificationCard_typography-14__E40GV","typography-12":"NotificationCard_typography-12__r-3ka","typography-promo":"NotificationCard_typography-promo__P5KSk NotificationCard_typography-header__JcbKn NotificationCard_typography-block__nKwA0 NotificationCard_typography-inline__BO1HG","root":"NotificationCard_root__HP4NM","icon-wrapper":"NotificationCard_icon-wrapper__FZUAl","action-wrapper":"NotificationCard_action-wrapper__MahuR","action-link":"NotificationCard_action-link__DXfp7","close-icon":"NotificationCard_close-icon__p0MvI","main-path":"NotificationCard_main-path__yWH2j","content":"NotificationCard_content__O4mCt","clear-button":"NotificationCard_clear-button__-RzMj","close-wrapper":"NotificationCard_close-wrapper__BVl8x","typographyHeader":"NotificationCard_typography-header__JcbKn","typographyBlock":"NotificationCard_typography-block__nKwA0","typographyInline":"NotificationCard_typography-inline__BO1HG","typography16":"NotificationCard_typography-16__mixDm","typography14":"NotificationCard_typography-14__E40GV","typography12":"NotificationCard_typography-12__r-3ka","typographyPromo":"NotificationCard_typography-promo__P5KSk NotificationCard_typography-header__JcbKn NotificationCard_typography-block__nKwA0 NotificationCard_typography-inline__BO1HG","iconWrapper":"NotificationCard_icon-wrapper__FZUAl","actionWrapper":"NotificationCard_action-wrapper__MahuR","actionLink":"NotificationCard_action-link__DXfp7","closeIcon":"NotificationCard_close-icon__p0MvI","mainPath":"NotificationCard_main-path__yWH2j","clearButton":"NotificationCard_clear-button__-RzMj","closeWrapper":"NotificationCard_close-wrapper__BVl8x"};
|
|
1094
1179
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
}
|
|
1100
|
-
componentDidMount() {
|
|
1180
|
+
const NotificationCard = React__namespace.default.forwardRef((props, ref) => {
|
|
1181
|
+
const notificationCardNode = React__namespace.default.useRef(null);
|
|
1182
|
+
React__namespace.default.useImperativeHandle(ref, () => notificationCardNode.current, [notificationCardNode.current]);
|
|
1183
|
+
React__namespace.default.useLayoutEffect(() => {
|
|
1101
1184
|
var _a, _b;
|
|
1102
|
-
(_a =
|
|
1103
|
-
(_b =
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
React__namespace.default.createElement("div", { className: css$
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
}
|
|
1124
|
-
const WarningNotification = (props) => React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$9, color: 'warning' }, props, { cx: cx__default.default(props.cx) }));
|
|
1125
|
-
const SuccessNotification = (props) => React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$a, color: 'success' }, props, { cx: cx__default.default(props.cx) }));
|
|
1126
|
-
const HintNotification = (props) => React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$7, color: 'info' }, props, { cx: cx__default.default(props.cx) }));
|
|
1127
|
-
const ErrorNotification = (props) => React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$8, color: 'error' }, props, { cx: cx__default.default(props.cx) }));
|
|
1185
|
+
(_a = notificationCardNode.current) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', props.clearTimer);
|
|
1186
|
+
(_b = notificationCardNode.current) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', props.refreshTimer);
|
|
1187
|
+
return () => {
|
|
1188
|
+
var _a, _b;
|
|
1189
|
+
(_a = notificationCardNode.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', props.clearTimer);
|
|
1190
|
+
(_b = notificationCardNode.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', props.refreshTimer);
|
|
1191
|
+
};
|
|
1192
|
+
}, []);
|
|
1193
|
+
return (React__namespace.default.createElement("div", Object.assign({ role: "alert", className: cx__default.default(`notification-card-${props.color}`, css$M.root, props.cx), ref: notificationCardNode }, props.rawProps),
|
|
1194
|
+
React__namespace.default.createElement("div", { className: css$M.mainPath },
|
|
1195
|
+
props.icon && (React__namespace.default.createElement("div", { className: css$M.iconWrapper },
|
|
1196
|
+
React__namespace.default.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$M.actionIcon }))),
|
|
1197
|
+
React__namespace.default.createElement("div", { className: css$M.content },
|
|
1198
|
+
props.children,
|
|
1199
|
+
props.actions && React__namespace.default.createElement("div", { className: css$M.actionWrapper }, props.actions.map(action => (React__namespace.default.createElement(LinkButton, { caption: action.name, onClick: action.action, key: action.name, cx: css$M.actionLink, size: '36', rawProps: action.rawProps }))))),
|
|
1200
|
+
props.onClose && (React__namespace.default.createElement("div", { className: css$M.closeWrapper },
|
|
1201
|
+
React__namespace.default.createElement(IconButton, { icon: ForwardRef$y, color: 'default', onClick: props.onClose, cx: css$M.closeIcon }))))));
|
|
1202
|
+
});
|
|
1203
|
+
const WarningNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$C, color: 'warning' }, props, { ref: ref, cx: props.cx }))));
|
|
1204
|
+
const SuccessNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$D, color: 'success' }, props, { ref: ref, cx: props.cx }))));
|
|
1205
|
+
const HintNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$A, color: 'info' }, props, { ref: ref, cx: props.cx }))));
|
|
1206
|
+
const ErrorNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$B, color: 'error' }, props, { ref: ref, cx: props.cx }))));
|
|
1128
1207
|
class ClearNotification extends React__namespace.default.Component {
|
|
1129
1208
|
render() {
|
|
1130
|
-
return React__namespace.default.createElement("div", { className: cx__default.default(css$
|
|
1209
|
+
return React__namespace.default.createElement("div", { className: cx__default.default(css$M.notificationWrapper, css$M.clearButton) },
|
|
1131
1210
|
React__namespace.default.createElement(LinkButton, { caption: i18n.notificationCard.closeAllNotificationsButton, onClick: () => this.context.uuiNotifications.clearAll() }));
|
|
1132
1211
|
}
|
|
1133
1212
|
}
|
|
1134
1213
|
ClearNotification.contextType = uuiCore.UuiContext;
|
|
1135
1214
|
|
|
1136
|
-
var css$
|
|
1215
|
+
var css$L = {"typography-header":"Tooltip_typography-header__cNsyM","typography-block":"Tooltip_typography-block__l3S7W","typography-inline":"Tooltip_typography-inline__PWbqK","typography-16":"Tooltip_typography-16__v0Yv5","typography-14":"Tooltip_typography-14__WqOph","typography-12":"Tooltip_typography-12__4oje1","typography-promo":"Tooltip_typography-promo__Epmej Tooltip_typography-header__cNsyM Tooltip_typography-block__l3S7W Tooltip_typography-inline__PWbqK","root":"Tooltip_root__zZwnu","typographyHeader":"Tooltip_typography-header__cNsyM","typographyBlock":"Tooltip_typography-block__l3S7W","typographyInline":"Tooltip_typography-inline__PWbqK","typography16":"Tooltip_typography-16__v0Yv5","typography14":"Tooltip_typography-14__WqOph","typography12":"Tooltip_typography-12__4oje1","typographyPromo":"Tooltip_typography-promo__Epmej Tooltip_typography-header__cNsyM Tooltip_typography-block__l3S7W Tooltip_typography-inline__PWbqK"};
|
|
1137
1216
|
|
|
1138
1217
|
function applyTooltipMods(mods) {
|
|
1139
1218
|
return [
|
|
1140
|
-
|
|
1141
|
-
css$
|
|
1219
|
+
`tooltip-${mods.color}`,
|
|
1220
|
+
css$L.root,
|
|
1142
1221
|
];
|
|
1143
1222
|
}
|
|
1144
1223
|
const Tooltip = uuiCore.withMods(uuiComponents.Tooltip, applyTooltipMods);
|
|
1145
1224
|
|
|
1146
|
-
var css$
|
|
1225
|
+
var css$K = {"typography-header":"LabeledInput_typography-header__HJu91","typography-block":"LabeledInput_typography-block__4Jo8P","typography-inline":"LabeledInput_typography-inline__iNLix","typography-16":"LabeledInput_typography-16__B-aku","typography-14":"LabeledInput_typography-14__YxFLH","typography-12":"LabeledInput_typography-12__Jr6Uq","typography-promo":"LabeledInput_typography-promo__3-e-V LabeledInput_typography-header__HJu91 LabeledInput_typography-block__4Jo8P LabeledInput_typography-inline__iNLix","root":"LabeledInput_root__xDC2q","size-24":"LabeledInput_size-24__0LWBQ","size-30":"LabeledInput_size-30__KDnLe","size-36":"LabeledInput_size-36__4qHf7","size-42":"LabeledInput_size-42__zo6a7","size-48":"LabeledInput_size-48__3NqJt","typographyHeader":"LabeledInput_typography-header__HJu91","typographyBlock":"LabeledInput_typography-block__4Jo8P","typographyInline":"LabeledInput_typography-inline__iNLix","typography16":"LabeledInput_typography-16__B-aku","typography14":"LabeledInput_typography-14__YxFLH","typography12":"LabeledInput_typography-12__Jr6Uq","typographyPromo":"LabeledInput_typography-promo__3-e-V LabeledInput_typography-header__HJu91 LabeledInput_typography-block__4Jo8P LabeledInput_typography-inline__iNLix","size24":"LabeledInput_size-24__0LWBQ","size30":"LabeledInput_size-30__KDnLe","size36":"LabeledInput_size-36__4qHf7","size42":"LabeledInput_size-42__zo6a7","size48":"LabeledInput_size-48__3NqJt"};
|
|
1147
1226
|
|
|
1148
|
-
const defaultSize$
|
|
1227
|
+
const defaultSize$7 = '36';
|
|
1149
1228
|
function applyLabeledInputMods(mods) {
|
|
1150
1229
|
return [
|
|
1151
|
-
|
|
1152
|
-
css$
|
|
1153
|
-
css$g['size-' + (mods.size || defaultSize$4)],
|
|
1230
|
+
css$K.root,
|
|
1231
|
+
css$K['size-' + (mods.size || defaultSize$7)],
|
|
1154
1232
|
];
|
|
1155
1233
|
}
|
|
1156
1234
|
const LabeledInput = uuiCore.withMods(uuiComponents.LabeledInput, applyLabeledInputMods, (props) => ({
|
|
1157
1235
|
Tooltip,
|
|
1158
|
-
infoIcon: systemIcons[props.size || defaultSize$
|
|
1236
|
+
infoIcon: systemIcons[props.size || defaultSize$7].help,
|
|
1159
1237
|
}));
|
|
1160
1238
|
|
|
1161
|
-
var css$
|
|
1239
|
+
var css$J = {"root":"RadioGroup_root__uLWIn"};
|
|
1162
1240
|
|
|
1163
|
-
const RadioGroup = uuiCore.withMods(uuiComponents.RadioGroup, () => [css$
|
|
1241
|
+
const RadioGroup = uuiCore.withMods(uuiComponents.RadioGroup, () => [css$J.root], () => ({ RadioInput }));
|
|
1164
1242
|
|
|
1165
1243
|
function applyScrollBarsMods() {
|
|
1166
1244
|
return [
|
|
1167
|
-
'scroll-bars
|
|
1245
|
+
'uui-scroll-bars',
|
|
1246
|
+
'uui-shadow-top',
|
|
1247
|
+
'uui-shadow-bottom',
|
|
1168
1248
|
];
|
|
1169
1249
|
}
|
|
1170
1250
|
const ScrollBars = uuiCore.withMods(uuiComponents.ScrollBars, applyScrollBarsMods);
|
|
1171
1251
|
|
|
1172
|
-
|
|
1252
|
+
const VirtualList = uuiComponents.VirtualList;
|
|
1253
|
+
|
|
1254
|
+
var css$I = {"root":"Blocker_root__OB584"};
|
|
1255
|
+
|
|
1256
|
+
var css$H = {"root":"Spinner_root__jJ3FR","uui-spinner":"Spinner_uui-spinner__qD4cq","uuiSpinner":"Spinner_uui-spinner__qD4cq"};
|
|
1257
|
+
|
|
1258
|
+
function applySpinnerMods() {
|
|
1259
|
+
return [
|
|
1260
|
+
css$H.root,
|
|
1261
|
+
];
|
|
1262
|
+
}
|
|
1263
|
+
const Spinner = uuiCore.withMods(uuiComponents.Spinner, applySpinnerMods);
|
|
1264
|
+
|
|
1265
|
+
const Blocker = uuiCore.withMods(uuiComponents.Blocker, () => [css$I.root], (cmpProps) => ({ renderSpinner: cmpProps.renderSpinner || (() => React__namespace.default.createElement(Spinner, null)) }));
|
|
1266
|
+
|
|
1267
|
+
var css$G = {"root":"CheckboxGroup_root__6KmvL"};
|
|
1268
|
+
|
|
1269
|
+
const CheckboxGroup = uuiCore.withMods(uuiComponents.CheckboxGroup, () => [css$G.root], () => ({ CheckboxInput: Checkbox }));
|
|
1270
|
+
|
|
1271
|
+
function MultiSwitchComponent(props, ref) {
|
|
1272
|
+
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' } }))))));
|
|
1273
|
+
}
|
|
1274
|
+
const MultiSwitch = React__namespace.forwardRef(MultiSwitchComponent);
|
|
1275
|
+
|
|
1276
|
+
var css$F = {"typography-header":"NumericInput_typography-header__GGZXK","typography-block":"NumericInput_typography-block__kzaEI","typography-inline":"NumericInput_typography-inline__i-mmY","typography-16":"NumericInput_typography-16__1kNP6","typography-14":"NumericInput_typography-14__GS-GA","typography-12":"NumericInput_typography-12__-r6Ni","typography-promo":"NumericInput_typography-promo__7QcU- NumericInput_typography-header__GGZXK NumericInput_typography-block__kzaEI NumericInput_typography-inline__i-mmY","root":"NumericInput_root__vElno","size-24":"NumericInput_size-24__9pSyj","size-30":"NumericInput_size-30__kfXj0","size-36":"NumericInput_size-36__tYgRe","size-42":"NumericInput_size-42__RoV0p","size-48":"NumericInput_size-48__wyaYa","mode-form":"NumericInput_mode-form__2EKWT","mode-cell":"NumericInput_mode-cell__oJI4L","typographyHeader":"NumericInput_typography-header__GGZXK","typographyBlock":"NumericInput_typography-block__kzaEI","typographyInline":"NumericInput_typography-inline__i-mmY","typography16":"NumericInput_typography-16__1kNP6","typography14":"NumericInput_typography-14__GS-GA","typography12":"NumericInput_typography-12__-r6Ni","typographyPromo":"NumericInput_typography-promo__7QcU- NumericInput_typography-header__GGZXK NumericInput_typography-block__kzaEI NumericInput_typography-inline__i-mmY","size24":"NumericInput_size-24__9pSyj","size30":"NumericInput_size-30__kfXj0","size36":"NumericInput_size-36__tYgRe","size42":"NumericInput_size-42__RoV0p","size48":"NumericInput_size-48__wyaYa","modeForm":"NumericInput_mode-form__2EKWT","modeCell":"NumericInput_mode-cell__oJI4L"};
|
|
1277
|
+
|
|
1278
|
+
const defaultSize$6 = "36";
|
|
1279
|
+
const defaultMode$3 = exports.EditMode.FORM;
|
|
1280
|
+
function applyNumericInputMods(mods) {
|
|
1281
|
+
return [
|
|
1282
|
+
textInputCss.root,
|
|
1283
|
+
css$F.root,
|
|
1284
|
+
css$F["size-" + (mods.size || defaultSize$6)],
|
|
1285
|
+
textInputCss["size-" + (mods.size || defaultSize$6)],
|
|
1286
|
+
textInputCss["mode-" + (mods.mode || defaultMode$3)],
|
|
1287
|
+
];
|
|
1288
|
+
}
|
|
1289
|
+
const NumericInput = uuiCore.withMods(uuiComponents.NumericInput, applyNumericInputMods, (props) => {
|
|
1290
|
+
var _a, _b;
|
|
1291
|
+
return ({
|
|
1292
|
+
upIcon: systemIcons[props.size || defaultSize$6].foldingArrow,
|
|
1293
|
+
downIcon: systemIcons[props.size || defaultSize$6].foldingArrow,
|
|
1294
|
+
align: (_a = props.align) !== null && _a !== void 0 ? _a : (props.mode === "cell" ? "right" : "left"),
|
|
1295
|
+
disableArrows: (_b = props.disableArrows) !== null && _b !== void 0 ? _b : props.mode === "cell",
|
|
1296
|
+
});
|
|
1297
|
+
});
|
|
1298
|
+
|
|
1299
|
+
var css$E = {"typography-header":"TextArea_typography-header__o-1aw","typography-block":"TextArea_typography-block__eszLT","typography-inline":"TextArea_typography-inline__Y5s6o","typography-16":"TextArea_typography-16__FZZaw","typography-14":"TextArea_typography-14__ZQ-8z","typography-12":"TextArea_typography-12__iYiOG","typography-promo":"TextArea_typography-promo__pYQ5f TextArea_typography-header__o-1aw TextArea_typography-block__eszLT TextArea_typography-inline__Y5s6o","root":"TextArea_root__rb0Et","mode-form":"TextArea_mode-form__1DZlL","mode-cell":"TextArea_mode-cell__KthXC","mode-inline":"TextArea_mode-inline__dZEPS","size-24":"TextArea_size-24__-1cgl","size-30":"TextArea_size-30__B2Zjq","size-36":"TextArea_size-36__r2jj6","size-42":"TextArea_size-42__G6PPY","size-48":"TextArea_size-48__1yQdt","typographyHeader":"TextArea_typography-header__o-1aw","typographyBlock":"TextArea_typography-block__eszLT","typographyInline":"TextArea_typography-inline__Y5s6o","typography16":"TextArea_typography-16__FZZaw","typography14":"TextArea_typography-14__ZQ-8z","typography12":"TextArea_typography-12__iYiOG","typographyPromo":"TextArea_typography-promo__pYQ5f TextArea_typography-header__o-1aw TextArea_typography-block__eszLT TextArea_typography-inline__Y5s6o","modeForm":"TextArea_mode-form__1DZlL","modeCell":"TextArea_mode-cell__KthXC","modeInline":"TextArea_mode-inline__dZEPS","size24":"TextArea_size-24__-1cgl","size30":"TextArea_size-30__B2Zjq","size36":"TextArea_size-36__r2jj6","size42":"TextArea_size-42__G6PPY","size48":"TextArea_size-48__1yQdt"};
|
|
1300
|
+
|
|
1301
|
+
const defaultSize$5 = '36';
|
|
1302
|
+
const defaultMode$2 = exports.EditMode.FORM;
|
|
1303
|
+
function applyTextAreaMods(mods) {
|
|
1304
|
+
return [
|
|
1305
|
+
css$E.root,
|
|
1306
|
+
css$E['size-' + (mods.size || defaultSize$5)],
|
|
1307
|
+
css$E['mode-' + (mods.mode || defaultMode$2)],
|
|
1308
|
+
];
|
|
1309
|
+
}
|
|
1310
|
+
const TextArea = uuiCore.withMods(uuiComponents.TextArea, applyTextAreaMods, props => ({
|
|
1311
|
+
autoSize: props.mode === exports.EditMode.CELL ? true : props.autoSize,
|
|
1312
|
+
maxLength: props.mode === exports.EditMode.CELL ? undefined : props.maxLength,
|
|
1313
|
+
}));
|
|
1314
|
+
|
|
1315
|
+
var css$D = {"typography-header":"DatePicker_typography-header__d3UN6","typography-block":"DatePicker_typography-block__vnQqM","typography-inline":"DatePicker_typography-inline__uM5kg","typography-16":"DatePicker_typography-16__-wmeU","typography-14":"DatePicker_typography-14__Upcdm","typography-12":"DatePicker_typography-12__Z1YnJ","typography-promo":"DatePicker_typography-promo__V5CNx DatePicker_typography-header__d3UN6 DatePicker_typography-block__vnQqM DatePicker_typography-inline__uM5kg","root":"DatePicker_root__kqFyh","typographyHeader":"DatePicker_typography-header__d3UN6","typographyBlock":"DatePicker_typography-block__vnQqM","typographyInline":"DatePicker_typography-inline__uM5kg","typography16":"DatePicker_typography-16__-wmeU","typography14":"DatePicker_typography-14__Upcdm","typography12":"DatePicker_typography-12__Z1YnJ","typographyPromo":"DatePicker_typography-promo__V5CNx DatePicker_typography-header__d3UN6 DatePicker_typography-block__vnQqM DatePicker_typography-inline__uM5kg"};
|
|
1316
|
+
|
|
1317
|
+
var calendarCss = {"typography-header":"Calendar_typography-header__dkLL8","typography-block":"Calendar_typography-block__DXJIH","typography-inline":"Calendar_typography-inline__NGFRU","typography-16":"Calendar_typography-16__FGS6a","typography-14":"Calendar_typography-14__fa4gQ","typography-12":"Calendar_typography-12__8rwED","typography-promo":"Calendar_typography-promo__-3dg- Calendar_typography-header__dkLL8 Calendar_typography-block__DXJIH Calendar_typography-inline__NGFRU","root":"Calendar_root__Vh71D","typographyHeader":"Calendar_typography-header__dkLL8","typographyBlock":"Calendar_typography-block__DXJIH","typographyInline":"Calendar_typography-inline__NGFRU","typography16":"Calendar_typography-16__FGS6a","typography14":"Calendar_typography-14__fa4gQ","typography12":"Calendar_typography-12__8rwED","typographyPromo":"Calendar_typography-promo__-3dg- Calendar_typography-header__dkLL8 Calendar_typography-block__DXJIH Calendar_typography-inline__NGFRU"};
|
|
1318
|
+
|
|
1319
|
+
function applyDatePickerBodyMods() {
|
|
1320
|
+
return [
|
|
1321
|
+
css$D.root,
|
|
1322
|
+
calendarCss.root,
|
|
1323
|
+
];
|
|
1324
|
+
}
|
|
1325
|
+
const DatePickerBody = uuiCore.withMods(uuiComponents.DatePickerBody, applyDatePickerBodyMods, () => ({ navIconLeft: ForwardRef$Y, navIconRight: ForwardRef$Y }));
|
|
1326
|
+
|
|
1327
|
+
const defaultMode$1 = exports.EditMode.FORM;
|
|
1328
|
+
class DatePicker extends uuiComponents.BaseDatePicker {
|
|
1329
|
+
constructor() {
|
|
1330
|
+
super(...arguments);
|
|
1331
|
+
this.renderInput = (props) => {
|
|
1332
|
+
var _a;
|
|
1333
|
+
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 })));
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1336
|
+
renderBody(props) {
|
|
1337
|
+
var _a, _b, _c;
|
|
1338
|
+
return React__namespace.default.createElement(DropdownContainer, Object.assign({}, props),
|
|
1339
|
+
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 :
|
|
1340
|
+
_c.call(_b));
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
function applyDateSelectionMods() {
|
|
1345
|
+
return [
|
|
1346
|
+
calendarCss.root,
|
|
1347
|
+
];
|
|
1348
|
+
}
|
|
1349
|
+
const Calendar = uuiCore.withMods(uuiComponents.Calendar, applyDateSelectionMods);
|
|
1350
|
+
|
|
1351
|
+
var css$C = {"typography-header":"RangeDatePicker_typography-header__1MSa3","typography-block":"RangeDatePicker_typography-block__pC0T7","typography-inline":"RangeDatePicker_typography-inline__efdyU","typography-16":"RangeDatePicker_typography-16__FHiRR","typography-14":"RangeDatePicker_typography-14__5MCXV","typography-12":"RangeDatePicker_typography-12__zcQS2","typography-promo":"RangeDatePicker_typography-promo__GtLFC RangeDatePicker_typography-header__1MSa3 RangeDatePicker_typography-block__pC0T7 RangeDatePicker_typography-inline__efdyU","dropdown-container":"RangeDatePicker_dropdown-container__GJh6o","container":"RangeDatePicker_container__Kz2FS","button-group":"RangeDatePicker_button-group__a-twv","counter":"RangeDatePicker_counter__rNj2e","date-input":"RangeDatePicker_date-input__2aXJj","size-24":"RangeDatePicker_size-24__64v-x","size-30":"RangeDatePicker_size-30__7OPWW","size-36":"RangeDatePicker_size-36__urHhS","size-42":"RangeDatePicker_size-42__VMCut","size-48":"RangeDatePicker_size-48__YHcLe","date-input-group":"RangeDatePicker_date-input-group__CGdCd","separator":"RangeDatePicker_separator__qmCk8","mode-form":"RangeDatePicker_mode-form__o0e0M","mode-cell":"RangeDatePicker_mode-cell__neiVz","typographyHeader":"RangeDatePicker_typography-header__1MSa3","typographyBlock":"RangeDatePicker_typography-block__pC0T7","typographyInline":"RangeDatePicker_typography-inline__efdyU","typography16":"RangeDatePicker_typography-16__FHiRR","typography14":"RangeDatePicker_typography-14__5MCXV","typography12":"RangeDatePicker_typography-12__zcQS2","typographyPromo":"RangeDatePicker_typography-promo__GtLFC RangeDatePicker_typography-header__1MSa3 RangeDatePicker_typography-block__pC0T7 RangeDatePicker_typography-inline__efdyU","dropdownContainer":"RangeDatePicker_dropdown-container__GJh6o","buttonGroup":"RangeDatePicker_button-group__a-twv","dateInput":"RangeDatePicker_date-input__2aXJj","size24":"RangeDatePicker_size-24__64v-x","size30":"RangeDatePicker_size-30__7OPWW","size36":"RangeDatePicker_size-36__urHhS","size42":"RangeDatePicker_size-42__VMCut","size48":"RangeDatePicker_size-48__YHcLe","dateInputGroup":"RangeDatePicker_date-input-group__CGdCd","modeForm":"RangeDatePicker_mode-form__o0e0M","modeCell":"RangeDatePicker_mode-cell__neiVz"};
|
|
1352
|
+
|
|
1353
|
+
const defaultValue = { from: null, to: null };
|
|
1354
|
+
class RangeDatePicker extends uuiComponents.BaseRangeDatePicker {
|
|
1355
|
+
constructor() {
|
|
1356
|
+
super(...arguments);
|
|
1357
|
+
this.renderInput = (props) => {
|
|
1358
|
+
var _a, _b;
|
|
1359
|
+
return (React__namespace.createElement("div", { className: cx__default.default(this.props.inputCx, css$C.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 },
|
|
1360
|
+
React__namespace.createElement(TextInput, { icon: systemIcons[this.props.size || '36'].calendar, cx: cx__default.default(this.props.bodyCx, css$C.dateInput, css$C['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 }),
|
|
1361
|
+
React__namespace.createElement("div", { className: css$C.separator }),
|
|
1362
|
+
React__namespace.createElement(TextInput, { cx: cx__default.default(this.props.bodyCx, css$C.dateInput, css$C['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 })));
|
|
1363
|
+
};
|
|
1364
|
+
}
|
|
1365
|
+
renderBody(props) {
|
|
1366
|
+
var _a;
|
|
1367
|
+
return (React__namespace.createElement(DropdownContainer, Object.assign({}, props, { cx: cx__default.default(css$C.dropdownContainer) }),
|
|
1368
|
+
React__namespace.createElement(FlexRow, null,
|
|
1369
|
+
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 }))));
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
var rangeCss = {"typography-header":"RangeDatePickerBody_typography-header__yuzZD","typography-block":"RangeDatePickerBody_typography-block__lYgPa","typography-inline":"RangeDatePickerBody_typography-inline__E8RNG","typography-16":"RangeDatePickerBody_typography-16__9uEL3","typography-14":"RangeDatePickerBody_typography-14__TEa5n","typography-12":"RangeDatePickerBody_typography-12__S-NBX","typography-promo":"RangeDatePickerBody_typography-promo__4VksA RangeDatePickerBody_typography-header__yuzZD RangeDatePickerBody_typography-block__lYgPa RangeDatePickerBody_typography-inline__E8RNG","root":"RangeDatePickerBody_root__CCVfb","typographyHeader":"RangeDatePickerBody_typography-header__yuzZD","typographyBlock":"RangeDatePickerBody_typography-block__lYgPa","typographyInline":"RangeDatePickerBody_typography-inline__E8RNG","typography16":"RangeDatePickerBody_typography-16__9uEL3","typography14":"RangeDatePickerBody_typography-14__TEa5n","typography12":"RangeDatePickerBody_typography-12__S-NBX","typographyPromo":"RangeDatePickerBody_typography-promo__4VksA RangeDatePickerBody_typography-header__yuzZD RangeDatePickerBody_typography-block__lYgPa RangeDatePickerBody_typography-inline__E8RNG"};
|
|
1374
|
+
|
|
1375
|
+
var calendarPresetsCss = {"typography-header":"CalendarPresets_typography-header__D2UZW","typography-block":"CalendarPresets_typography-block__68m9o","typography-inline":"CalendarPresets_typography-inline__5mzPE","typography-16":"CalendarPresets_typography-16__-TrF-","typography-14":"CalendarPresets_typography-14__-onzo","typography-12":"CalendarPresets_typography-12__zE74w","typography-promo":"CalendarPresets_typography-promo__Zp05u CalendarPresets_typography-header__D2UZW CalendarPresets_typography-block__68m9o CalendarPresets_typography-inline__5mzPE","root":"CalendarPresets_root__5O668","typographyHeader":"CalendarPresets_typography-header__D2UZW","typographyBlock":"CalendarPresets_typography-block__68m9o","typographyInline":"CalendarPresets_typography-inline__5mzPE","typography16":"CalendarPresets_typography-16__-TrF-","typography14":"CalendarPresets_typography-14__-onzo","typography12":"CalendarPresets_typography-12__zE74w","typographyPromo":"CalendarPresets_typography-promo__Zp05u CalendarPresets_typography-header__D2UZW CalendarPresets_typography-block__68m9o CalendarPresets_typography-inline__5mzPE"};
|
|
1376
|
+
|
|
1377
|
+
function applyRangeDatePickerBodyMods() {
|
|
1173
1378
|
return [
|
|
1174
|
-
|
|
1379
|
+
css$D.root,
|
|
1380
|
+
rangeCss.root,
|
|
1381
|
+
calendarCss.root,
|
|
1382
|
+
calendarPresetsCss.root,
|
|
1175
1383
|
];
|
|
1176
1384
|
}
|
|
1177
|
-
const
|
|
1385
|
+
const RangeDatePickerBody = uuiCore.withMods(uuiComponents.RangeDatePickerBody, applyRangeDatePickerBodyMods, () => ({ navIconLeft: ForwardRef$Y, navIconRight: ForwardRef$Y }));
|
|
1386
|
+
|
|
1387
|
+
var css$B = {"typography-header":"DropMarker_typography-header__W65wc","typography-block":"DropMarker_typography-block__uaCk0","typography-inline":"DropMarker_typography-inline__tZ3Y-","typography-16":"DropMarker_typography-16__o-pNo","typography-14":"DropMarker_typography-14__so29S","typography-12":"DropMarker_typography-12__UmnG8","typography-promo":"DropMarker_typography-promo__rioi4 DropMarker_typography-header__W65wc DropMarker_typography-block__uaCk0 DropMarker_typography-inline__tZ3Y-","blocker":"DropMarker_blocker__x-t-D","marker":"DropMarker_marker__5weO4","top":"DropMarker_top__a-UDx","bottom":"DropMarker_bottom__kUP91","left":"DropMarker_left__w5JwO","right":"DropMarker_right__zAmSs","inside":"DropMarker_inside__SfmMo","typographyHeader":"DropMarker_typography-header__W65wc","typographyBlock":"DropMarker_typography-block__uaCk0","typographyInline":"DropMarker_typography-inline__tZ3Y-","typography16":"DropMarker_typography-16__o-pNo","typography14":"DropMarker_typography-14__so29S","typography12":"DropMarker_typography-12__UmnG8","typographyPromo":"DropMarker_typography-promo__rioi4 DropMarker_typography-header__W65wc DropMarker_typography-block__uaCk0 DropMarker_typography-inline__tZ3Y-"};
|
|
1388
|
+
|
|
1389
|
+
class DropMarker extends React__namespace.Component {
|
|
1390
|
+
render() {
|
|
1391
|
+
return this.props.isDndInProgress ? React__namespace.createElement(React__namespace.Fragment, null,
|
|
1392
|
+
this.props.enableBlocker && React__namespace.createElement("div", { className: css$B.blocker }),
|
|
1393
|
+
React__namespace.createElement("div", { className: cx__default.default({
|
|
1394
|
+
[css$B.marker]: true,
|
|
1395
|
+
[css$B[this.props.position]]: true,
|
|
1396
|
+
[this.props.cx]: !!this.props.cx,
|
|
1397
|
+
}) })) : null;
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1178
1400
|
|
|
1179
|
-
var css$
|
|
1401
|
+
var css$A = {"typography-header":"DataPickerBody_typography-header__AlPy4","typography-block":"DataPickerBody_typography-block__BIQe2","typography-inline":"DataPickerBody_typography-inline__lOHW0","typography-16":"DataPickerBody_typography-16__P2rqG","typography-14":"DataPickerBody_typography-14__kmNXP","typography-12":"DataPickerBody_typography-12__W2f-m","typography-promo":"DataPickerBody_typography-promo__VoJO5 DataPickerBody_typography-header__AlPy4 DataPickerBody_typography-block__BIQe2 DataPickerBody_typography-inline__lOHW0","body":"DataPickerBody_body__9Atow","multi":"DataPickerBody_multi__sToHj","modal":"DataPickerBody_modal__zvOE2","search-wrapper":"DataPickerBody_search-wrapper__UeG2b","checkbox":"DataPickerBody_checkbox__EFs7y","no-found-size-24":"DataPickerBody_no-found-size-24__4RC9-","no-found-size-30":"DataPickerBody_no-found-size-30__M8eYW","no-found-size-36":"DataPickerBody_no-found-size-36__jr82u","no-found-size-42":"DataPickerBody_no-found-size-42__9WVA5","typographyHeader":"DataPickerBody_typography-header__AlPy4","typographyBlock":"DataPickerBody_typography-block__BIQe2","typographyInline":"DataPickerBody_typography-inline__lOHW0","typography16":"DataPickerBody_typography-16__P2rqG","typography14":"DataPickerBody_typography-14__kmNXP","typography12":"DataPickerBody_typography-12__W2f-m","typographyPromo":"DataPickerBody_typography-promo__VoJO5 DataPickerBody_typography-header__AlPy4 DataPickerBody_typography-block__BIQe2 DataPickerBody_typography-inline__lOHW0","searchWrapper":"DataPickerBody_search-wrapper__UeG2b","noFoundSize24":"DataPickerBody_no-found-size-24__4RC9-","noFoundSize30":"DataPickerBody_no-found-size-30__M8eYW","noFoundSize36":"DataPickerBody_no-found-size-36__jr82u","noFoundSize42":"DataPickerBody_no-found-size-42__9WVA5"};
|
|
1180
1402
|
|
|
1181
1403
|
class DataPickerBody extends uuiComponents.PickerBodyBase {
|
|
1182
1404
|
constructor() {
|
|
@@ -1184,29 +1406,25 @@ class DataPickerBody extends uuiComponents.PickerBodyBase {
|
|
|
1184
1406
|
this.lens = uuiCore.Lens.onEditableComponent(this);
|
|
1185
1407
|
this.searchLens = this.lens.prop('search');
|
|
1186
1408
|
}
|
|
1187
|
-
|
|
1409
|
+
renderNotFound() {
|
|
1188
1410
|
if (this.props.renderNotFound) {
|
|
1189
1411
|
return this.props.renderNotFound();
|
|
1190
1412
|
}
|
|
1191
|
-
return React__namespace.default.createElement(uuiComponents.FlexCell, { cx: css$
|
|
1413
|
+
return React__namespace.default.createElement(uuiComponents.FlexCell, { cx: css$A[`no-found-size-${this.props.searchSize || 36}`], grow: 1, textAlign: 'center' },
|
|
1192
1414
|
React__namespace.default.createElement(Text, { size: this.props.searchSize || '36' }, i18n.dataPickerBody.noRecordsMessage));
|
|
1193
1415
|
}
|
|
1194
1416
|
render() {
|
|
1195
|
-
this.props.value;
|
|
1196
1417
|
const searchSize = uuiCore.isMobile() ? '48' : (this.props.searchSize || '36');
|
|
1197
|
-
const searchClass = uuiCore.cx(css$e.searchWrapper, css$e[`search-size-${searchSize}`]);
|
|
1198
1418
|
return React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
1199
|
-
this.showSearch() && (React__namespace.default.createElement("div", { key: 'search', className:
|
|
1419
|
+
this.showSearch() && (React__namespace.default.createElement("div", { key: 'search', className: css$A.searchWrapper },
|
|
1200
1420
|
React__namespace.default.createElement(uuiComponents.FlexCell, { grow: 1 },
|
|
1201
|
-
React__namespace.default.createElement(SearchInput, Object.assign({
|
|
1202
|
-
React__namespace.default.createElement(FlexRow, { key: 'body', cx: uuiCore.cx(css$
|
|
1203
|
-
? React__namespace.default.createElement(VirtualList, Object.assign({}, this.lens.toProps(), { rows: this.props.rows, role:
|
|
1204
|
-
: this.
|
|
1421
|
+
React__namespace.default.createElement(SearchInput, Object.assign({ ref: this.searchRef, placeholder: i18n.dataPickerBody.searchPlaceholder }, this.searchLens.toProps(), { onKeyDown: this.searchKeyDown, size: searchSize }))))),
|
|
1422
|
+
React__namespace.default.createElement(FlexRow, { key: 'body', cx: uuiCore.cx(css$A.body, css$A[this.props.editMode], css$A[this.props.selectionMode]), rawProps: { style: { maxHeight: this.props.maxHeight } } }, this.props.rowsCount > 0
|
|
1423
|
+
? React__namespace.default.createElement(VirtualList, Object.assign({}, this.lens.toProps(), { rows: this.props.rows, role: 'listbox', rawProps: this.props.rawProps, rowsCount: this.props.rowsCount }))
|
|
1424
|
+
: this.renderNotFound()));
|
|
1205
1425
|
}
|
|
1206
1426
|
}
|
|
1207
1427
|
|
|
1208
|
-
var css$d = {"footer-wrapper":"DataPickerFooter_footer-wrapper__Us28N","footerWrapper":"DataPickerFooter_footer-wrapper__Us28N"};
|
|
1209
|
-
|
|
1210
1428
|
const switchSizes = {
|
|
1211
1429
|
'24': '12',
|
|
1212
1430
|
'36': '18',
|
|
@@ -1222,7 +1440,7 @@ const DataPickerFooterImpl = (props) => {
|
|
|
1222
1440
|
if (!e.shiftKey && e.key === 'Tab')
|
|
1223
1441
|
e.preventDefault();
|
|
1224
1442
|
};
|
|
1225
|
-
return (React__namespace.default.createElement(FlexRow, { padding: '12'
|
|
1443
|
+
return (React__namespace.default.createElement(FlexRow, { padding: '12' },
|
|
1226
1444
|
!props.hideShowOnlySelected && React__namespace.default.createElement(Switch, { size: switchSize, value: showSelected.value, isDisabled: !hasSelection, onValueChange: showSelected.onValueChange, label: i18n.pickerInput.showOnlySelectedLabel }),
|
|
1227
1445
|
React__namespace.default.createElement(FlexSpacer, null),
|
|
1228
1446
|
view.selectAll && (React__namespace.default.createElement(FlexCell, { width: 'auto', alignSelf: 'center' },
|
|
@@ -1234,44 +1452,44 @@ const DataPickerFooterImpl = (props) => {
|
|
|
1234
1452
|
};
|
|
1235
1453
|
const DataPickerFooter = React__namespace.default.memo(DataPickerFooterImpl);
|
|
1236
1454
|
|
|
1237
|
-
var css$
|
|
1455
|
+
var css$z = {"header":"DataPickerHeader_header__UDMhr","close":"DataPickerHeader_close__30pW6"};
|
|
1238
1456
|
|
|
1239
|
-
var _path$
|
|
1240
|
-
function _extends$
|
|
1457
|
+
var _path$v;
|
|
1458
|
+
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); }
|
|
1241
1459
|
var SvgNavigationClose24 = function SvgNavigationClose24(props, ref) {
|
|
1242
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1460
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
|
|
1243
1461
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1244
1462
|
width: 24,
|
|
1245
1463
|
height: 24,
|
|
1246
1464
|
viewBox: "0 0 24 24",
|
|
1247
1465
|
ref: ref
|
|
1248
|
-
}, props), _path$
|
|
1466
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1249
1467
|
fillRule: "evenodd",
|
|
1250
1468
|
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",
|
|
1251
1469
|
clipRule: "evenodd"
|
|
1252
1470
|
})));
|
|
1253
1471
|
};
|
|
1254
|
-
var ForwardRef$
|
|
1472
|
+
var ForwardRef$x = /*#__PURE__*/React.forwardRef(SvgNavigationClose24);
|
|
1255
1473
|
|
|
1256
1474
|
const DataPickerHeaderImpl = props => {
|
|
1257
1475
|
const title = props.title ? props.title.charAt(0).toUpperCase() + props.title.slice(1) : '';
|
|
1258
|
-
return (React__namespace.default.createElement(FlexRow, { alignItems: 'center', borderBottom: true, size: "48", cx: css$
|
|
1476
|
+
return (React__namespace.default.createElement(FlexRow, { alignItems: 'center', borderBottom: true, size: "48", cx: css$z.header },
|
|
1259
1477
|
React__namespace.default.createElement(Text, { font: 'semibold' }, title),
|
|
1260
|
-
React__namespace.default.createElement(IconButton, { icon: ForwardRef$
|
|
1478
|
+
React__namespace.default.createElement(IconButton, { icon: ForwardRef$x, onClick: () => { var _a; return (_a = props.close) === null || _a === void 0 ? void 0 : _a.call(props); }, cx: css$z.close })));
|
|
1261
1479
|
};
|
|
1262
1480
|
const DataPickerHeader = React__namespace.default.memo(DataPickerHeaderImpl);
|
|
1263
1481
|
|
|
1264
|
-
var _defs, _use;
|
|
1265
|
-
function _extends$
|
|
1482
|
+
var _defs$1, _use;
|
|
1483
|
+
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); }
|
|
1266
1484
|
var SvgTreeFoldingArrow = function SvgTreeFoldingArrow(props, ref) {
|
|
1267
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1485
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
1268
1486
|
width: 18,
|
|
1269
1487
|
height: 18,
|
|
1270
1488
|
viewBox: "0 0 18 18",
|
|
1271
1489
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1272
1490
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1273
1491
|
ref: ref
|
|
1274
|
-
}, props), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1492
|
+
}, props), _defs$1 || (_defs$1 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1275
1493
|
id: "a",
|
|
1276
1494
|
d: "M6.056 6.998a.997.997 0 0 1-.769-.29L.293 1.712a1 1 0 0 1 0-1.414L.299.293a1 1 0 0 1 1.414 0L6 4.58 10.288.293c.39-.39 1.023-.39 1.42.006a1 1 0 0 1 0 1.414L6.712 6.707a.993.993 0 0 1-.657.291z"
|
|
1277
1495
|
}))), _use || (_use = /*#__PURE__*/React__namespace.createElement("use", {
|
|
@@ -1282,208 +1500,764 @@ var SvgTreeFoldingArrow = function SvgTreeFoldingArrow(props, ref) {
|
|
|
1282
1500
|
fillRule: "evenodd"
|
|
1283
1501
|
})));
|
|
1284
1502
|
};
|
|
1285
|
-
var ForwardRef$
|
|
1286
|
-
|
|
1287
|
-
var css$
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
this.props.isFirstColumn && this.isDraggable() && React__namespace.createElement(uuiComponents.DragHandle, { cx: css$b.dragHandle }),
|
|
1305
|
-
this.props.isFirstColumn && ((_a = row === null || row === void 0 ? void 0 : row.checkbox) === null || _a === void 0 ? void 0 : _a.isVisible) && React__namespace.createElement(Checkbox, { key: 'cb', cx: css$b.checkbox, tabIndex: this.props.tabIndex, size: additionalItemSize, value: row.isChecked, indeterminate: !row.isChecked && row.isChildrenChecked, onValueChange: () => row.onCheck(row), isDisabled: row.checkbox.isDisabled, isInvalid: row.checkbox.isInvalid }),
|
|
1306
|
-
this.props.isFirstColumn && row.indent > 0 && (React__namespace.createElement("div", { key: 'fold', className: css$b.indent, style: { marginLeft: (row.indent - 1) * 24 } }, row.isFoldable &&
|
|
1307
|
-
React__namespace.createElement(uuiComponents.IconContainer, { key: 'icon', icon: ForwardRef$4, cx: [css$b.foldingArrow, css$b[`folding-arrow-${additionalItemSize}`], uuiCore.uuiMarkers.clickable], rotate: row.isFolded ? '90ccw' : '0', onClick: () => row.onFold(row) }))),
|
|
1308
|
-
cellContent));
|
|
1309
|
-
};
|
|
1310
|
-
}
|
|
1311
|
-
render() {
|
|
1312
|
-
return (React__namespace.createElement(FlexCell, Object.assign({}, this.props.column, { rawProps: { role: 'cell' }, cx: uuiCore.cx(css$b.cell, this.props.isFirstColumn && this.hasDepsWidgets && css$b.wrapper, css$b['size-' + (this.props.size || '36')], css$b[`padding-${this.props.padding || '12'}`], this.props.isFirstColumn && css$b[`padding-left-${this.props.padding || '24'}`], this.props.isLastColumn && css$b['padding-right-24'], this.props.column.cx, css$b[`align-widgets-${this.props.alignActions || 'top'}`]) }), this.getContent()));
|
|
1503
|
+
var ForwardRef$w = /*#__PURE__*/React.forwardRef(SvgTreeFoldingArrow);
|
|
1504
|
+
|
|
1505
|
+
var css$y = {"cell":"DataTableCell_cell__VgHTT","wrapper":"DataTableCell_wrapper__6hBNx","align-widgets-top":"DataTableCell_align-widgets-top__7LNVl","size-24":"DataTableCell_size-24__g6m7O","folding-arrow":"DataTableCell_folding-arrow__6iI4s","size-30":"DataTableCell_size-30__hpjkm","size-36":"DataTableCell_size-36__8qiBq","size-42":"DataTableCell_size-42__jJMhr","size-48":"DataTableCell_size-48__XXrAx","size-60":"DataTableCell_size-60__0XLPh","align-widgets-center":"DataTableCell_align-widgets-center__VXHNb","padding-12":"DataTableCell_padding-12__xvGe5","padding-24":"DataTableCell_padding-24__r322g","padding-left-12":"DataTableCell_padding-left-12__g6QSx","padding-left-24":"DataTableCell_padding-left-24__vm-bI","padding-right-24":"DataTableCell_padding-right-24__CjNWh","drag-handle":"DataTableCell_drag-handle__Ge7UM","checkbox":"DataTableCell_checkbox__sY2kh","indent":"DataTableCell_indent__lcZWO","folding-arrow-12":"DataTableCell_folding-arrow-12__mVKaH","folding-arrow-18":"DataTableCell_folding-arrow-18__hiEIW","icon-container":"DataTableCell_icon-container__1fR7V","alignWidgetsTop":"DataTableCell_align-widgets-top__7LNVl","size24":"DataTableCell_size-24__g6m7O","foldingArrow":"DataTableCell_folding-arrow__6iI4s","size30":"DataTableCell_size-30__hpjkm","size36":"DataTableCell_size-36__8qiBq","size42":"DataTableCell_size-42__jJMhr","size48":"DataTableCell_size-48__XXrAx","size60":"DataTableCell_size-60__0XLPh","alignWidgetsCenter":"DataTableCell_align-widgets-center__VXHNb","padding12":"DataTableCell_padding-12__xvGe5","padding24":"DataTableCell_padding-24__r322g","paddingLeft12":"DataTableCell_padding-left-12__g6QSx","paddingLeft24":"DataTableCell_padding-left-24__vm-bI","paddingRight24":"DataTableCell_padding-right-24__CjNWh","dragHandle":"DataTableCell_drag-handle__Ge7UM","foldingArrow12":"DataTableCell_folding-arrow-12__mVKaH","foldingArrow18":"DataTableCell_folding-arrow-18__hiEIW","iconContainer":"DataTableCell_icon-container__1fR7V"};
|
|
1506
|
+
|
|
1507
|
+
function DataTableRowAddons(props) {
|
|
1508
|
+
var _a, _b;
|
|
1509
|
+
const row = props.rowProps;
|
|
1510
|
+
const additionalItemSize = +props.size < 30 ? '12' : '18';
|
|
1511
|
+
return React__namespace.createElement(React__namespace.Fragment, null,
|
|
1512
|
+
((_a = row.dnd) === null || _a === void 0 ? void 0 : _a.srcData) && React__namespace.createElement(uuiComponents.DragHandle, { key: 'dh', cx: css$y.dragHandle }),
|
|
1513
|
+
((_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$y.checkbox, tabIndex: props.tabIndex, size: additionalItemSize, value: row.isChecked, indeterminate: !row.isChecked && row.isChildrenChecked, onValueChange: () => row.onCheck(row), isDisabled: row.checkbox.isDisabled, isInvalid: row.checkbox.isInvalid }),
|
|
1514
|
+
row.indent > 0 && (React__namespace.createElement("div", { key: 'fold', className: css$y.indent, style: { marginLeft: (row.indent - 1) * 24 } }, row.isFoldable &&
|
|
1515
|
+
React__namespace.createElement(uuiComponents.IconContainer, { key: 'icon', icon: ForwardRef$w, cx: [css$y.foldingArrow, css$y[`folding-arrow-${additionalItemSize}`], uuiCore.uuiMarkers.clickable, css$y.iconContainer], rotate: row.isFolded ? '90ccw' : '0', onClick: () => row.onFold(row) }))));
|
|
1516
|
+
}
|
|
1517
|
+
function DataTableCell(props) {
|
|
1518
|
+
var _a;
|
|
1519
|
+
props = Object.assign({}, props);
|
|
1520
|
+
if (props.isFirstColumn) {
|
|
1521
|
+
props.addons = React__namespace.createElement(DataTableRowAddons, Object.assign({}, props));
|
|
1313
1522
|
}
|
|
1523
|
+
props.renderPlaceholder = props.renderPlaceholder || (() => (React__namespace.createElement(Text, { key: 't', size: props.size != '60' ? props.size : '48' },
|
|
1524
|
+
React__namespace.createElement(TextPlaceholder, null))));
|
|
1525
|
+
props.renderTooltip = (tooltipProps) => React__namespace.createElement(Tooltip, Object.assign({ color: 'critical' }, tooltipProps));
|
|
1526
|
+
const isEditable = !!props.onValueChange;
|
|
1527
|
+
props.border = (_a = props.border) !== null && _a !== void 0 ? _a : (isEditable ? true : null);
|
|
1528
|
+
props.cx = [
|
|
1529
|
+
'data-table-cell',
|
|
1530
|
+
props.cx,
|
|
1531
|
+
css$y.cell,
|
|
1532
|
+
css$y['size-' + (props.size || '36')],
|
|
1533
|
+
css$y[`padding-${props.padding || ((isEditable && !props.rowProps.isLoading) && '0') || '12'}`],
|
|
1534
|
+
props.isFirstColumn && css$y[`padding-left-${props.padding || '24'}`],
|
|
1535
|
+
props.isLastColumn && css$y['padding-right-24'],
|
|
1536
|
+
css$y[`align-widgets-${props.alignActions || 'top'}`],
|
|
1537
|
+
props.background && `background-${props.background}`,
|
|
1538
|
+
props.border && 'uui-dt-cell-border',
|
|
1539
|
+
];
|
|
1540
|
+
return React__namespace.createElement(uuiComponents.DataTableCell, Object.assign({}, props));
|
|
1314
1541
|
}
|
|
1315
1542
|
|
|
1316
|
-
var
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1543
|
+
var css$x = {"typography-header":"DataTableRow_typography-header__uNO7L","typography-block":"DataTableRow_typography-block__tHe35","typography-inline":"DataTableRow_typography-inline__KgXSh","typography-16":"DataTableRow_typography-16__gMKvg","typography-14":"DataTableRow_typography-14__itR0W","typography-12":"DataTableRow_typography-12__G4k4k","typography-promo":"DataTableRow_typography-promo__LE-gA DataTableRow_typography-header__uNO7L DataTableRow_typography-block__tHe35 DataTableRow_typography-inline__KgXSh","root":"DataTableRow_root__ThnfZ","size-24":"DataTableRow_size-24__mjGKU","size-30":"DataTableRow_size-30__Kb8nP","size-36":"DataTableRow_size-36__dolOJ","size-48":"DataTableRow_size-48__DpAQX","size-60":"DataTableRow_size-60__k0ZKS","background-white":"DataTableRow_background-white__GKFMn","typographyHeader":"DataTableRow_typography-header__uNO7L","typographyBlock":"DataTableRow_typography-block__tHe35","typographyInline":"DataTableRow_typography-inline__KgXSh","typography16":"DataTableRow_typography-16__gMKvg","typography14":"DataTableRow_typography-14__itR0W","typography12":"DataTableRow_typography-12__G4k4k","typographyPromo":"DataTableRow_typography-promo__LE-gA DataTableRow_typography-header__uNO7L DataTableRow_typography-block__tHe35 DataTableRow_typography-inline__KgXSh","size24":"DataTableRow_size-24__mjGKU","size30":"DataTableRow_size-30__Kb8nP","size36":"DataTableRow_size-36__dolOJ","size48":"DataTableRow_size-48__DpAQX","size60":"DataTableRow_size-60__k0ZKS","backgroundWhite":"DataTableRow_background-white__GKFMn"};
|
|
1544
|
+
|
|
1545
|
+
// Here we define a single instance of the renderCell function to make DataTableRow#shouldComponentUpdate work.
|
|
1546
|
+
// 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.
|
|
1547
|
+
const renderCell = (props) => {
|
|
1548
|
+
const mods = props.rowProps;
|
|
1549
|
+
return React__namespace.createElement(DataTableCell, Object.assign({ size: mods.size }, props));
|
|
1550
|
+
};
|
|
1551
|
+
const renderDropMarkers = (props) => React__namespace.createElement(DropMarker, Object.assign({}, props, { enableBlocker: true }));
|
|
1552
|
+
const propsMods = { renderCell, renderDropMarkers };
|
|
1553
|
+
const DataTableRow = uuiCore.withMods(uuiComponents.DataTableRow, ({ borderBottom = true, background, size }) => {
|
|
1554
|
+
return [
|
|
1555
|
+
css$x.root,
|
|
1556
|
+
borderBottom && 'uui-dt-row-border',
|
|
1557
|
+
css$x['size-' + (size || '36')],
|
|
1558
|
+
css$x['background-' + (background || 'default')],
|
|
1559
|
+
];
|
|
1560
|
+
}, () => propsMods);
|
|
1561
|
+
|
|
1562
|
+
var css$w = {"typography-header":"DataTableHeaderRow_typography-header__17Mf0","typography-block":"DataTableHeaderRow_typography-block__qHB6b","typography-inline":"DataTableHeaderRow_typography-inline__lCA-Y","typography-16":"DataTableHeaderRow_typography-16__ZijSq","typography-14":"DataTableHeaderRow_typography-14__wGc4t","typography-12":"DataTableHeaderRow_typography-12__spGat","typography-promo":"DataTableHeaderRow_typography-promo__j-vYv DataTableHeaderRow_typography-header__17Mf0 DataTableHeaderRow_typography-block__qHB6b DataTableHeaderRow_typography-inline__lCA-Y","header-cell":"DataTableHeaderRow_header-cell__KtC6r","config-icon":"DataTableHeaderRow_config-icon__w0uLR","typographyHeader":"DataTableHeaderRow_typography-header__17Mf0","typographyBlock":"DataTableHeaderRow_typography-block__qHB6b","typographyInline":"DataTableHeaderRow_typography-inline__lCA-Y","typography16":"DataTableHeaderRow_typography-16__ZijSq","typography14":"DataTableHeaderRow_typography-14__wGc4t","typography12":"DataTableHeaderRow_typography-12__spGat","typographyPromo":"DataTableHeaderRow_typography-promo__j-vYv DataTableHeaderRow_typography-header__17Mf0 DataTableHeaderRow_typography-block__qHB6b DataTableHeaderRow_typography-inline__lCA-Y","headerCell":"DataTableHeaderRow_header-cell__KtC6r","configIcon":"DataTableHeaderRow_config-icon__w0uLR"};
|
|
1563
|
+
|
|
1564
|
+
var _path$u;
|
|
1565
|
+
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); }
|
|
1566
|
+
var SvgActionSettings18 = function SvgActionSettings18(props, ref) {
|
|
1567
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
|
|
1320
1568
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1321
|
-
width:
|
|
1322
|
-
height:
|
|
1323
|
-
viewBox: "0 0
|
|
1569
|
+
width: 18,
|
|
1570
|
+
height: 18,
|
|
1571
|
+
viewBox: "0 0 18 18",
|
|
1324
1572
|
ref: ref
|
|
1325
|
-
}, props), _path$
|
|
1573
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1326
1574
|
fillRule: "evenodd",
|
|
1327
|
-
d: "
|
|
1575
|
+
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",
|
|
1328
1576
|
clipRule: "evenodd"
|
|
1329
1577
|
})));
|
|
1330
1578
|
};
|
|
1331
|
-
var ForwardRef$
|
|
1579
|
+
var ForwardRef$v = /*#__PURE__*/React.forwardRef(SvgActionSettings18);
|
|
1332
1580
|
|
|
1333
|
-
|
|
1581
|
+
const DataTableHeaderRow = uuiCore.withMods(uuiComponents.DataTableHeaderRow, mods => [css$w.root], mods => ({
|
|
1582
|
+
renderCell: props => React__namespace.createElement(DataTableHeaderCell, Object.assign({}, props, { size: mods.size, textCase: mods.textCase || 'normal', key: props.column.key })),
|
|
1583
|
+
renderConfigButton: () => React__namespace.createElement(IconButton, { key: 'configuration', onClick: mods.onConfigButtonClick, cx: css$w.configIcon, color: 'default', icon: ForwardRef$v }),
|
|
1584
|
+
}));
|
|
1334
1585
|
|
|
1335
|
-
|
|
1336
|
-
const [isRenaming, setIsRenaming] = React.useState(false);
|
|
1337
|
-
const [renamingValue, setRenamingValue] = React.useState("");
|
|
1338
|
-
const handleChoose = React.useCallback(() => choosePreset(preset), [preset, choosePreset]);
|
|
1339
|
-
const handleUpdate = React.useCallback(() => updatePreset(preset), [preset, updatePreset]);
|
|
1340
|
-
const acceptRenaming = React.useCallback(() => {
|
|
1341
|
-
if (renamingValue) {
|
|
1342
|
-
const newPreset = Object.assign(Object.assign({}, preset), { name: renamingValue });
|
|
1343
|
-
updatePreset(newPreset);
|
|
1344
|
-
}
|
|
1345
|
-
setIsRenaming(false);
|
|
1346
|
-
}, [renamingValue, updatePreset]);
|
|
1347
|
-
const renderBody = React.useCallback((props) => {
|
|
1348
|
-
const handleDuplicate = () => {
|
|
1349
|
-
duplicatePreset(preset);
|
|
1350
|
-
props.onClose();
|
|
1351
|
-
};
|
|
1352
|
-
const startRenaming = () => {
|
|
1353
|
-
setIsRenaming(true);
|
|
1354
|
-
setRenamingValue(preset.name);
|
|
1355
|
-
props.onClose();
|
|
1356
|
-
};
|
|
1357
|
-
const handleDelete = () => {
|
|
1358
|
-
deletePreset(preset);
|
|
1359
|
-
props.onClose();
|
|
1360
|
-
};
|
|
1361
|
-
const update = () => {
|
|
1362
|
-
handleUpdate();
|
|
1363
|
-
props.onClose();
|
|
1364
|
-
};
|
|
1365
|
-
const choose = () => {
|
|
1366
|
-
choosePreset(preset);
|
|
1367
|
-
props.onClose();
|
|
1368
|
-
};
|
|
1369
|
-
return (React__namespace.default.createElement(DropdownMenuBody, Object.assign({}, props),
|
|
1370
|
-
React__namespace.default.createElement(DropdownMenuButton, { caption: 'Duplicate', onClick: handleDuplicate }),
|
|
1371
|
-
React__namespace.default.createElement(DropdownMenuButton, { caption: 'Rename', onClick: startRenaming }),
|
|
1372
|
-
React__namespace.default.createElement(DropdownMenuButton, { caption: 'Update', onClick: update, isDisabled: !hasChanged }),
|
|
1373
|
-
React__namespace.default.createElement(DropdownMenuButton, { caption: 'Delete', onClick: handleDelete }),
|
|
1374
|
-
React__namespace.default.createElement(DropdownMenuSplitter, null),
|
|
1375
|
-
React__namespace.default.createElement(DropdownMenuButton, { caption: 'Discard all changes', onClick: choose, isDisabled: !hasChanged })));
|
|
1376
|
-
}, [preset, duplicatePreset, deletePreset, isActive, choosePreset, hasChanged]);
|
|
1377
|
-
const renderTarget = React.useCallback((props) => {
|
|
1378
|
-
return (React__namespace.default.createElement(Button, Object.assign({}, props, { icon: ForwardRef$3, size: '24', isDropdown: false, mode: isActive ? 'solid' : 'outline', cx: [css$a.target, hasChanged && css$a.notification] })));
|
|
1379
|
-
}, [preset, isActive, hasChanged]);
|
|
1380
|
-
return (React__namespace.default.createElement(React__namespace.default.Fragment, null, isRenaming
|
|
1381
|
-
? (React__namespace.default.createElement(TextInput, { value: renamingValue, onValueChange: setRenamingValue, size: '24', onAccept: acceptRenaming, onBlur: acceptRenaming, cx: css$a.input, autoFocus: true }))
|
|
1382
|
-
: (React__namespace.default.createElement(ControlGroup, { cx: css$a.container },
|
|
1383
|
-
React__namespace.default.createElement(Button, { key: preset.id, size: '24', caption: preset.name, mode: isActive ? 'solid' : 'outline', onClick: isActive ? null : handleChoose }),
|
|
1384
|
-
!preset.isReadonly && (React__namespace.default.createElement(Dropdown, { renderBody: renderBody, renderTarget: renderTarget, placement: 'bottom-end' }))))));
|
|
1385
|
-
};
|
|
1386
|
-
|
|
1387
|
-
var css$9 = {"row":"Presets_row__Sgwiy"};
|
|
1388
|
-
|
|
1389
|
-
const PresetsImpl = ({ tableState, presets, createNewPreset, activePresetId, hasPresetChanged, choosePreset, duplicatePreset, deletePreset, updatePreset }) => {
|
|
1390
|
-
const newPresetTitle = "New preset";
|
|
1391
|
-
const saveNewPreset = React.useCallback(() => {
|
|
1392
|
-
createNewPreset(newPresetTitle);
|
|
1393
|
-
}, [createNewPreset, newPresetTitle]);
|
|
1394
|
-
const activePreset = presets.find(p => p.id === activePresetId);
|
|
1395
|
-
const hasActivePresetChanged = React.useMemo(() => {
|
|
1396
|
-
return hasPresetChanged(activePreset);
|
|
1397
|
-
}, [activePreset, tableState.filter]);
|
|
1398
|
-
return (React__namespace.default.createElement(FlexRow, { spacing: "6", size: "48", padding: "18", cx: css$9.row },
|
|
1399
|
-
presets.map(preset => (React__namespace.default.createElement(Preset, { preset: preset, isActive: preset.id === activePresetId, hasChanged: preset.id === activePresetId && hasActivePresetChanged, choosePreset: choosePreset, duplicatePreset: duplicatePreset, deletePreset: deletePreset, updatePreset: updatePreset, key: preset.id }))),
|
|
1400
|
-
hasActivePresetChanged && (React__namespace.default.createElement(Button, { caption: `Save as ${newPresetTitle}`, onClick: saveNewPreset, color: 'accent', mode: 'solid', size: '24' }))));
|
|
1401
|
-
};
|
|
1402
|
-
const Presets = React__namespace.default.memo(PresetsImpl);
|
|
1586
|
+
var css$v = {"typography-header":"DataTableHeaderCell_typography-header__oILYa","typography-block":"DataTableHeaderCell_typography-block__BQMtM","typography-inline":"DataTableHeaderCell_typography-inline__cfsue","typography-16":"DataTableHeaderCell_typography-16__ZEqH6","typography-14":"DataTableHeaderCell_typography-14__keNR5","typography-12":"DataTableHeaderCell_typography-12__PhqnS","typography-promo":"DataTableHeaderCell_typography-promo__G4UmR DataTableHeaderCell_typography-header__oILYa DataTableHeaderCell_typography-block__BQMtM DataTableHeaderCell_typography-inline__cfsue","cell":"DataTableHeaderCell_cell__8JnbB","sort-icon":"DataTableHeaderCell_sort-icon__Wi-rh","dropdown-icon":"DataTableHeaderCell_dropdown-icon__-vO3u","infoIcon":"DataTableHeaderCell_infoIcon__1Ang4","resizable":"DataTableHeaderCell_resizable__sNvwo","size-24":"DataTableHeaderCell_size-24__ntP26","size-30":"DataTableHeaderCell_size-30__znptx","size-36":"DataTableHeaderCell_size-36__m5DC6","size-42":"DataTableHeaderCell_size-42__YX4yM","size-48":"DataTableHeaderCell_size-48__YCyCX","padding-left-24":"DataTableHeaderCell_padding-left-24__sZhuC","padding-right-24":"DataTableHeaderCell_padding-right-24__5Ne7M","caption":"DataTableHeaderCell_caption__pF7VF","checkbox":"DataTableHeaderCell_checkbox__sg2V-","icon":"DataTableHeaderCell_icon__XDYeh","icon-cell":"DataTableHeaderCell_icon-cell__t-wBF","align-right":"DataTableHeaderCell_align-right__JzZ-h","align-center":"DataTableHeaderCell_align-center__BegNE","tooltip-wrapper":"DataTableHeaderCell_tooltip-wrapper__ILECw","cell-tooltip":"DataTableHeaderCell_cell-tooltip__XAI4G","upper-case":"DataTableHeaderCell_upper-case__YCQ24","font-size-14":"DataTableHeaderCell_font-size-14__3JeGt","resize-mark":"DataTableHeaderCell_resize-mark__Vlv3w","draggable":"DataTableHeaderCell_draggable__c0dne","ghost":"DataTableHeaderCell_ghost__Yjb5B","is-dragged-out":"DataTableHeaderCell_is-dragged-out__HzBd6","dnd-marker-left":"DataTableHeaderCell_dnd-marker-left__0pkPC","dnd-marker-right":"DataTableHeaderCell_dnd-marker-right__1i9gh","typographyHeader":"DataTableHeaderCell_typography-header__oILYa","typographyBlock":"DataTableHeaderCell_typography-block__BQMtM","typographyInline":"DataTableHeaderCell_typography-inline__cfsue","typography16":"DataTableHeaderCell_typography-16__ZEqH6","typography14":"DataTableHeaderCell_typography-14__keNR5","typography12":"DataTableHeaderCell_typography-12__PhqnS","typographyPromo":"DataTableHeaderCell_typography-promo__G4UmR DataTableHeaderCell_typography-header__oILYa DataTableHeaderCell_typography-block__BQMtM DataTableHeaderCell_typography-inline__cfsue","sortIcon":"DataTableHeaderCell_sort-icon__Wi-rh","dropdownIcon":"DataTableHeaderCell_dropdown-icon__-vO3u","size24":"DataTableHeaderCell_size-24__ntP26","size30":"DataTableHeaderCell_size-30__znptx","size36":"DataTableHeaderCell_size-36__m5DC6","size42":"DataTableHeaderCell_size-42__YX4yM","size48":"DataTableHeaderCell_size-48__YCyCX","paddingLeft24":"DataTableHeaderCell_padding-left-24__sZhuC","paddingRight24":"DataTableHeaderCell_padding-right-24__5Ne7M","iconCell":"DataTableHeaderCell_icon-cell__t-wBF","alignRight":"DataTableHeaderCell_align-right__JzZ-h","alignCenter":"DataTableHeaderCell_align-center__BegNE","tooltipWrapper":"DataTableHeaderCell_tooltip-wrapper__ILECw","cellTooltip":"DataTableHeaderCell_cell-tooltip__XAI4G","upperCase":"DataTableHeaderCell_upper-case__YCQ24","fontSize14":"DataTableHeaderCell_font-size-14__3JeGt","resizeMark":"DataTableHeaderCell_resize-mark__Vlv3w","isDraggedOut":"DataTableHeaderCell_is-dragged-out__HzBd6","dndMarkerLeft":"DataTableHeaderCell_dnd-marker-left__0pkPC","dndMarkerRight":"DataTableHeaderCell_dnd-marker-right__1i9gh"};
|
|
1403
1587
|
|
|
1404
|
-
var _path$
|
|
1405
|
-
function _extends$
|
|
1406
|
-
var
|
|
1407
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1588
|
+
var _path$t;
|
|
1589
|
+
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); }
|
|
1590
|
+
var SvgTableSwap18 = function SvgTableSwap18(props, ref) {
|
|
1591
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
1408
1592
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1409
|
-
width:
|
|
1410
|
-
height:
|
|
1411
|
-
viewBox: "0 0
|
|
1593
|
+
width: 18,
|
|
1594
|
+
height: 18,
|
|
1595
|
+
viewBox: "0 0 18 18",
|
|
1412
1596
|
ref: ref
|
|
1413
|
-
}, props), _path$
|
|
1597
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1414
1598
|
fillRule: "evenodd",
|
|
1415
|
-
d: "
|
|
1599
|
+
d: "M6 1 2 5h3v7h2V5h3L6 1zm7 12V6h-2v7H8l4 4 4-4h-3z",
|
|
1416
1600
|
clipRule: "evenodd"
|
|
1417
1601
|
})));
|
|
1418
1602
|
};
|
|
1419
|
-
var ForwardRef$
|
|
1603
|
+
var ForwardRef$u = /*#__PURE__*/React.forwardRef(SvgTableSwap18);
|
|
1420
1604
|
|
|
1421
|
-
var _path$
|
|
1422
|
-
function _extends$
|
|
1423
|
-
var
|
|
1424
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1605
|
+
var _path$s;
|
|
1606
|
+
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); }
|
|
1607
|
+
var SvgTableSortAsc18 = function SvgTableSortAsc18(props, ref) {
|
|
1608
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
1425
1609
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1426
1610
|
width: 18,
|
|
1427
1611
|
height: 18,
|
|
1428
1612
|
viewBox: "0 0 18 18",
|
|
1429
1613
|
ref: ref
|
|
1430
|
-
}, props), _path$
|
|
1614
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1431
1615
|
fillRule: "evenodd",
|
|
1432
|
-
d: "
|
|
1616
|
+
d: "M10 6v10H8V6H5l4-4 4 4h-3z",
|
|
1433
1617
|
clipRule: "evenodd"
|
|
1434
1618
|
})));
|
|
1435
1619
|
};
|
|
1436
|
-
var ForwardRef$
|
|
1620
|
+
var ForwardRef$t = /*#__PURE__*/React.forwardRef(SvgTableSortAsc18);
|
|
1437
1621
|
|
|
1438
|
-
var _path;
|
|
1439
|
-
function _extends() { _extends = 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.apply(this, arguments); }
|
|
1440
|
-
var
|
|
1441
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
1622
|
+
var _path$r;
|
|
1623
|
+
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); }
|
|
1624
|
+
var SvgTableSortDesc18 = function SvgTableSortDesc18(props, ref) {
|
|
1625
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
1442
1626
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1443
|
-
width:
|
|
1444
|
-
height:
|
|
1445
|
-
viewBox: "0 0
|
|
1627
|
+
width: 18,
|
|
1628
|
+
height: 18,
|
|
1629
|
+
viewBox: "0 0 18 18",
|
|
1446
1630
|
ref: ref
|
|
1447
|
-
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1448
|
-
|
|
1631
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1632
|
+
fillRule: "evenodd",
|
|
1633
|
+
d: "M10 12V2H8v10H5l4 4 4-4h-3z",
|
|
1634
|
+
clipRule: "evenodd"
|
|
1449
1635
|
})));
|
|
1450
1636
|
};
|
|
1451
|
-
var ForwardRef = /*#__PURE__*/React.forwardRef(
|
|
1637
|
+
var ForwardRef$s = /*#__PURE__*/React.forwardRef(SvgTableSortDesc18);
|
|
1452
1638
|
|
|
1453
|
-
var
|
|
1639
|
+
var _path$q;
|
|
1640
|
+
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); }
|
|
1641
|
+
var SvgContentFiltration18 = function SvgContentFiltration18(props, ref) {
|
|
1642
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
1643
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1644
|
+
width: 18,
|
|
1645
|
+
height: 18,
|
|
1646
|
+
viewBox: "0 0 18 18",
|
|
1647
|
+
ref: ref
|
|
1648
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1649
|
+
fillRule: "evenodd",
|
|
1650
|
+
d: "m8 14 2 2v-5H8v3zM2 3v2h14V3H2zm6 8h2l6-6H2l6 6z",
|
|
1651
|
+
clipRule: "evenodd"
|
|
1652
|
+
})));
|
|
1653
|
+
};
|
|
1654
|
+
var ForwardRef$r = /*#__PURE__*/React.forwardRef(SvgContentFiltration18);
|
|
1655
|
+
|
|
1656
|
+
var _path$p;
|
|
1657
|
+
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); }
|
|
1658
|
+
var SvgNavigationChevronDown18 = function SvgNavigationChevronDown18(props, ref) {
|
|
1659
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
1660
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1661
|
+
width: 18,
|
|
1662
|
+
height: 18,
|
|
1663
|
+
viewBox: "0 0 18 18",
|
|
1664
|
+
ref: ref
|
|
1665
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1666
|
+
fillRule: "evenodd",
|
|
1667
|
+
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",
|
|
1668
|
+
clipRule: "evenodd"
|
|
1669
|
+
})));
|
|
1670
|
+
};
|
|
1671
|
+
var ForwardRef$q = /*#__PURE__*/React.forwardRef(SvgNavigationChevronDown18);
|
|
1672
|
+
|
|
1673
|
+
var _path$o;
|
|
1674
|
+
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); }
|
|
1675
|
+
var SvgNavigationChevronUp18 = function SvgNavigationChevronUp18(props, ref) {
|
|
1676
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
1677
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1678
|
+
width: 18,
|
|
1679
|
+
height: 18,
|
|
1680
|
+
viewBox: "0 0 18 18",
|
|
1681
|
+
ref: ref
|
|
1682
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1683
|
+
fillRule: "evenodd",
|
|
1684
|
+
d: "m9 6-4.5 4.5 1.058 1.057L9 8.123l3.443 3.434L13.5 10.5 9 6z",
|
|
1685
|
+
clipRule: "evenodd"
|
|
1686
|
+
})));
|
|
1687
|
+
};
|
|
1688
|
+
var ForwardRef$p = /*#__PURE__*/React.forwardRef(SvgNavigationChevronUp18);
|
|
1689
|
+
|
|
1690
|
+
var _path$n;
|
|
1691
|
+
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); }
|
|
1692
|
+
var SvgNotificationInfoOutline18 = function SvgNotificationInfoOutline18(props, ref) {
|
|
1693
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
1694
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1695
|
+
width: 18,
|
|
1696
|
+
height: 18,
|
|
1697
|
+
viewBox: "0 0 18 18",
|
|
1698
|
+
ref: ref
|
|
1699
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1700
|
+
fillRule: "evenodd",
|
|
1701
|
+
d: "M8 13h2V8H8v5zM9 1C4.584 1 1 4.584 1 9s3.584 8 8 8 8-3.584 8-8-3.584-8-8-8zm0 15c-3.859 0-7-3.141-7-7s3.141-7 7-7 7 3.141 7 7-3.141 7-7 7zM8 7h2V5H8v2z",
|
|
1702
|
+
clipRule: "evenodd"
|
|
1703
|
+
})));
|
|
1704
|
+
};
|
|
1705
|
+
var ForwardRef$o = /*#__PURE__*/React.forwardRef(SvgNotificationInfoOutline18);
|
|
1706
|
+
|
|
1707
|
+
class DataTableHeaderCell extends React__namespace.Component {
|
|
1708
|
+
constructor() {
|
|
1709
|
+
super(...arguments);
|
|
1710
|
+
this.state = {
|
|
1711
|
+
isDropdownOpen: null,
|
|
1712
|
+
};
|
|
1713
|
+
this.getTextStyle = () => {
|
|
1714
|
+
if (this.props.textCase === 'upper')
|
|
1715
|
+
return css$v.upperCase;
|
|
1716
|
+
return css$v['font-size-14'];
|
|
1717
|
+
};
|
|
1718
|
+
this.getColumnCaption = () => (React__namespace.createElement("div", { className: css$v.tooltipWrapper },
|
|
1719
|
+
React__namespace.createElement(Tooltip, { trigger: "hover", placement: "bottom-start", renderContent: (!this.state.isDropdownOpen && this.props.column.info) ? () => this.props.column.info : null, color: "default", cx: css$v.cellTooltip, offset: [-12, 12] },
|
|
1720
|
+
React__namespace.createElement("div", { className: uuiCore.cx(css$v.iconCell, css$v['align-' + this.props.column.textAlign], uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCaptionWrapper) },
|
|
1721
|
+
React__namespace.createElement(Text, { key: "text", lineHeight: "30", fontSize: "14", size: "30", cx: uuiCore.cx(css$v.caption, this.getTextStyle(), uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCaption) }, this.props.column.caption),
|
|
1722
|
+
this.props.column.info && (React__namespace.createElement(IconButton, { key: "info", cx: uuiCore.cx(css$v.icon, css$v.infoIcon, this.props.sortDirection && css$v.sortIconActive, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderSortIcon), color: 'secondary', icon: ForwardRef$o })),
|
|
1723
|
+
this.props.column.isSortable && (!this.props.column.renderFilter || this.props.sortDirection) && (React__namespace.createElement(IconButton, { key: "sort", cx: uuiCore.cx(css$v.icon, css$v.sortIcon, this.props.sortDirection && css$v.sortIconActive, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderSortIcon), color: this.props.sortDirection ? 'default' : 'secondary', icon: this.props.sortDirection === 'desc' ? ForwardRef$s : this.props.sortDirection === 'asc' ? ForwardRef$t : ForwardRef$u })),
|
|
1724
|
+
this.props.isFilterActive && (React__namespace.createElement(IconButton, { key: "filter", cx: uuiCore.cx(css$v.icon, !this.props.sortDirection && css$v.filterIcon, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderFilterIcon), color: "default", icon: ForwardRef$r })),
|
|
1725
|
+
this.props.column.renderFilter && (React__namespace.createElement(IconButton, { key: "dropdown", cx: uuiCore.cx(css$v.icon, css$v.dropdownIcon, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderDropdownIcon), color: "secondary", icon: this.state.isDropdownOpen ? ForwardRef$p : ForwardRef$q }))))));
|
|
1726
|
+
this.renderHeaderCheckbox = () => this.props.selectAll && this.props.isFirstColumn && (React__namespace.createElement(Checkbox, Object.assign({ size: +this.props.size < 36 ? '12' : '18' }, this.props.selectAll, { cx: uuiCore.cx(css$v.checkbox, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCheckbox) })));
|
|
1727
|
+
this.renderResizeMark = (props) => (React__namespace.createElement("div", { onMouseDown: props.onResizeStart, className: uuiCore.cx(css$v.resizeMark, uuiCore.uuiMarkers.draggable) }));
|
|
1728
|
+
this.renderCellContent = (props, dropdownProps) => (React__namespace.createElement(FlexCell, Object.assign({}, this.props.column, { minWidth: this.props.column.width, ref: ref => {
|
|
1729
|
+
var _a;
|
|
1730
|
+
props.ref(ref);
|
|
1731
|
+
(_a = dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.ref) === null || _a === void 0 ? void 0 : _a.call(dropdownProps, ref);
|
|
1732
|
+
}, cx: uuiCore.cx(uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCell, (this.props.column.isSortable || this.props.isDropdown) && uuiCore.uuiMarkers.clickable, css$v.cell, css$v['size-' + (this.props.size || '36')], this.props.isFirstColumn && css$v[`padding-left-24`], this.props.isLastColumn && css$v['padding-right-24'], this.props.column.cx, this.props.allowColumnsResizing && css$v.resizable, props.isDraggable && css$v.draggable, props.isDragGhost && css$v.ghost, props.isDraggedOut && css$v.isDraggedOut, props.isDndInProgress && css$v['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) }),
|
|
1733
|
+
this.renderHeaderCheckbox(),
|
|
1734
|
+
this.getColumnCaption(),
|
|
1735
|
+
this.props.allowColumnsResizing && this.renderResizeMark(props)));
|
|
1736
|
+
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 }));
|
|
1737
|
+
}
|
|
1738
|
+
render() {
|
|
1739
|
+
return (React__namespace.createElement(uuiComponents.DataTableHeaderCell, Object.assign({}, this.props, { renderCellContent: this.props.column.renderFilter
|
|
1740
|
+
? this.renderCellWithFilter
|
|
1741
|
+
: this.renderCellContent })));
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
const useColumnsWithFilters = (initialColumns, filters) => {
|
|
1746
|
+
const makeFilterRenderCallback = React.useCallback((key) => (filterLens, dropdownProps) => {
|
|
1747
|
+
const filter = filters.find(f => f.columnKey === key);
|
|
1748
|
+
if (!filter)
|
|
1749
|
+
return null;
|
|
1750
|
+
const props = filterLens.prop(filter.field).toProps();
|
|
1751
|
+
return React__namespace.default.createElement(FilterItemBody, Object.assign({}, props, filter, dropdownProps));
|
|
1752
|
+
}, [filters]);
|
|
1753
|
+
const columns = React.useMemo(() => {
|
|
1754
|
+
if (filters) {
|
|
1755
|
+
const filterKeys = filters.map(f => f.columnKey);
|
|
1756
|
+
const newColumns = (initialColumns.map(column => {
|
|
1757
|
+
if (filterKeys.includes(column.key)) {
|
|
1758
|
+
return Object.assign(Object.assign({}, column), { renderFilter: makeFilterRenderCallback(column.key) });
|
|
1759
|
+
}
|
|
1760
|
+
else {
|
|
1761
|
+
return column;
|
|
1762
|
+
}
|
|
1763
|
+
}));
|
|
1764
|
+
return newColumns;
|
|
1765
|
+
}
|
|
1766
|
+
return initialColumns;
|
|
1767
|
+
}, [filters, initialColumns]);
|
|
1768
|
+
return columns;
|
|
1769
|
+
};
|
|
1770
|
+
|
|
1771
|
+
var _path$m, _path2$1, _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;
|
|
1772
|
+
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); }
|
|
1773
|
+
var SvgEmptyTable = function SvgEmptyTable(props, ref) {
|
|
1774
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
1775
|
+
width: 232,
|
|
1776
|
+
height: 180,
|
|
1777
|
+
viewBox: "0 0 232 180",
|
|
1778
|
+
fill: "none",
|
|
1779
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1780
|
+
ref: ref
|
|
1781
|
+
}, props), /*#__PURE__*/React__namespace.createElement("g", {
|
|
1782
|
+
clipPath: "url(#a)"
|
|
1783
|
+
}, _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1784
|
+
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",
|
|
1785
|
+
fill: "#F5F6FA"
|
|
1786
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1787
|
+
d: "m58.069 136.51-.654 4.238-1.27-5.38a58.934 58.934 0 0 0-11.462-4.965l-.083 5.636-2.545-6.393a55.094 55.094 0 0 0-13.655-1.854l.704 6.178-3.356-6.108c-4.151.183-8.256.946-12.195 2.268l2.33 3.525s-2.173-1.597-4.084-2.896a40.951 40.951 0 0 0-10.833 6.285 85.492 85.492 0 0 0 12.575 10.527c2.482-.637 5.127-1.279 5.127-1.279l-3.261 2.537a69.366 69.366 0 0 0 13.283 6.865c2.346-1.353 5.416-3.269 5.416-3.269l-3.554 3.931a42.226 42.226 0 0 0 15.45 2.359l4.259-4.213-1.697 4.001c7.002-.848 14.144-3.902 20.95-10.344-1.621-3.869-5.768-8.073-11.445-11.649Z",
|
|
1788
|
+
fill: "#9BDEFF"
|
|
1789
|
+
})), _path3 || (_path3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1790
|
+
fillRule: "evenodd",
|
|
1791
|
+
clipRule: "evenodd",
|
|
1792
|
+
d: "M.557 136.978a.413.413 0 0 1 .475-.342l68.549 11.118a.414.414 0 0 1-.133.817L.9 137.453a.415.415 0 0 1-.342-.475Z",
|
|
1793
|
+
fill: "#fff"
|
|
1794
|
+
})), _path4 || (_path4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1795
|
+
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",
|
|
1796
|
+
fill: "#9BDEFF"
|
|
1797
|
+
})), _path5 || (_path5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1798
|
+
fillRule: "evenodd",
|
|
1799
|
+
clipRule: "evenodd",
|
|
1800
|
+
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",
|
|
1801
|
+
fill: "#1D1E26"
|
|
1802
|
+
})), /*#__PURE__*/React__namespace.createElement("mask", {
|
|
1803
|
+
id: "b",
|
|
1804
|
+
style: {
|
|
1805
|
+
maskType: "alpha"
|
|
1806
|
+
},
|
|
1807
|
+
maskUnits: "userSpaceOnUse",
|
|
1808
|
+
x: 81,
|
|
1809
|
+
y: 22,
|
|
1810
|
+
width: 100,
|
|
1811
|
+
height: 104
|
|
1812
|
+
}, _path6 || (_path6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1813
|
+
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",
|
|
1814
|
+
fill: "#9BDEFF"
|
|
1815
|
+
}))), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
1816
|
+
mask: "url(#b)",
|
|
1817
|
+
fillRule: "evenodd",
|
|
1818
|
+
clipRule: "evenodd"
|
|
1819
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1820
|
+
d: "M69.817 99.247a.414.414 0 0 1 .585-.003l50.88 50.483a.414.414 0 0 1-.583.588l-50.88-50.483a.414.414 0 0 1-.002-.585ZM72.802 28.407a.414.414 0 0 1 .553.192l63.6 131.172a.413.413 0 1 1-.745.361L72.61 28.96a.414.414 0 0 1 .192-.553Z",
|
|
1821
|
+
fill: "#fff"
|
|
1822
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1823
|
+
d: "M142.576 6.515a.415.415 0 0 1 .087.58L60.185 118.817a.413.413 0 1 1-.665-.491L141.997 6.603a.414.414 0 0 1 .579-.088ZM197.977 60.314c.181.14.214.4.075.58l-76.734 99.311a.414.414 0 0 1-.655-.506l76.734-99.31a.413.413 0 0 1 .58-.075ZM192.316 43.44a.413.413 0 0 1-.103.576L60.089 135.878a.414.414 0 0 1-.473-.68L191.74 43.336a.414.414 0 0 1 .576.104Z",
|
|
1824
|
+
fill: "#fff"
|
|
1825
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1826
|
+
d: "M91.966 11.532a.414.414 0 0 1 .585-.021l129.252 120a.414.414 0 0 1-.563.606l-129.252-120a.414.414 0 0 1-.022-.585ZM75.232 2.769a.414.414 0 0 1 .568.143l93.554 156.828a.414.414 0 1 1-.711.424L75.089 3.336a.414.414 0 0 1 .143-.567ZM125.643.329a.414.414 0 0 1 .584.041l71.81 82.759a.413.413 0 1 1-.625.542L125.602.913a.414.414 0 0 1 .041-.584Z",
|
|
1827
|
+
fill: "#fff"
|
|
1828
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1829
|
+
d: "M67.271 75.369a.414.414 0 0 1 .547-.209l156.745 70.345a.413.413 0 1 1-.339.755L67.479 75.916a.414.414 0 0 1-.208-.547Z",
|
|
1830
|
+
fill: "#fff"
|
|
1831
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1832
|
+
d: "M159.279 8.938a.414.414 0 0 1 .265.522L101.278 187.39a.413.413 0 1 1-.787-.258l58.266-177.93a.414.414 0 0 1 .522-.265Z",
|
|
1833
|
+
fill: "#fff"
|
|
1834
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1835
|
+
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",
|
|
1836
|
+
fill: "#1D1E26"
|
|
1837
|
+
}))), _path7 || (_path7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1838
|
+
d: "M180.287 30.828H81.39v-3.724a4.966 4.966 0 0 1 4.966-4.966H175.3a4.963 4.963 0 0 1 4.986 4.965v3.725Z",
|
|
1839
|
+
fill: "#fff"
|
|
1840
|
+
})), _path8 || (_path8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1841
|
+
fillRule: "evenodd",
|
|
1842
|
+
clipRule: "evenodd",
|
|
1843
|
+
d: "M177.05 22.893a4.548 4.548 0 0 0-1.748-.341H86.356a4.552 4.552 0 0 0-4.552 4.552v3.31h98.069v-3.31a4.55 4.55 0 0 0-2.823-4.211Zm-1.75-1.169a5.375 5.375 0 0 1 4.989 3.316c.272.654.412 1.355.412 2.064v3.724a.414.414 0 0 1-.414.413H81.39a.414.414 0 0 1-.413-.413v-3.724a5.38 5.38 0 0 1 5.379-5.38H175.3Z",
|
|
1844
|
+
fill: "#1D1E26"
|
|
1845
|
+
})), _path9 || (_path9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1846
|
+
d: "M87.324 28.217a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6ZM93.597 28.217a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6ZM99.866 28.217a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6Z",
|
|
1847
|
+
fill: "#1D1E26"
|
|
1848
|
+
})), _path10 || (_path10 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1849
|
+
d: "M151.71 47.806H63.614a4.986 4.986 0 0 0-4.986 4.986v93.062a4.986 4.986 0 0 0 4.986 4.986h88.096a4.986 4.986 0 0 0 4.987-4.986V52.792a4.987 4.987 0 0 0-4.987-4.986Z",
|
|
1850
|
+
fill: "#fff"
|
|
1851
|
+
})), _path11 || (_path11 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1852
|
+
fillRule: "evenodd",
|
|
1853
|
+
clipRule: "evenodd",
|
|
1854
|
+
d: "M63.614 48.22a4.572 4.572 0 0 0-4.572 4.572v93.062a4.572 4.572 0 0 0 4.572 4.572h88.096a4.572 4.572 0 0 0 4.573-4.572V52.792a4.572 4.572 0 0 0-4.573-4.573H63.614Zm-5.4 4.572a5.4 5.4 0 0 1 5.4-5.4h88.096a5.4 5.4 0 0 1 5.4 5.4v93.062a5.4 5.4 0 0 1-5.4 5.4H63.614a5.4 5.4 0 0 1-5.4-5.4V52.792Z",
|
|
1855
|
+
fill: "#1D1E26"
|
|
1856
|
+
})), _path12 || (_path12 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1857
|
+
d: "M157.11 56.081H58.214v-3.724a4.986 4.986 0 0 1 4.986-4.965h88.924a4.988 4.988 0 0 1 4.986 4.965v3.724Z",
|
|
1858
|
+
fill: "#008ACE"
|
|
1859
|
+
})), _path13 || (_path13 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1860
|
+
d: "M64.566 53.474a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6ZM70.835 53.474a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6ZM77.103 53.474a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6Z",
|
|
1861
|
+
fill: "#1D1E26"
|
|
1862
|
+
})), _path14 || (_path14 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1863
|
+
fillRule: "evenodd",
|
|
1864
|
+
clipRule: "evenodd",
|
|
1865
|
+
d: "M48.968 36.067a.414.414 0 0 1 .585.018l7.005 7.448a.414.414 0 1 1-.603.567l-7.005-7.448a.414.414 0 0 1 .018-.585ZM46.99 44.047a.414.414 0 0 1 .554-.188l6.269 3.104a.414.414 0 0 1-.367.742l-6.27-3.104a.414.414 0 0 1-.187-.554ZM183.97 9.366a.414.414 0 0 1 .213.545l-2.896 6.62a.414.414 0 0 1-.759-.331l2.897-6.621a.414.414 0 0 1 .545-.213ZM192.373 9.866a.415.415 0 0 1 0 .585l-8.276 8.276a.414.414 0 1 1-.585-.585l8.275-8.276a.415.415 0 0 1 .586 0ZM192.464 19.108a.413.413 0 0 1-.23.538l-6.207 2.483a.414.414 0 0 1-.308-.768l6.207-2.483a.414.414 0 0 1 .538.23ZM182.977 54.848c.228 0 .413.185.413.414v58.345a.414.414 0 1 1-.827 0V55.262c0-.229.185-.414.414-.414Z",
|
|
1866
|
+
fill: "#1D1E26"
|
|
1867
|
+
})), _path15 || (_path15 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1868
|
+
d: "M133.371 157.945c23.196 0 42-18.804 42-42s-18.804-42-42-42-42 18.804-42 42 18.804 42 42 42Z",
|
|
1869
|
+
fill: "#008ACE"
|
|
1870
|
+
})), _path16 || (_path16 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1871
|
+
d: "M133.371 149.669c18.625 0 33.724-15.099 33.724-33.724 0-18.625-15.099-33.724-33.724-33.724-18.625 0-33.724 15.099-33.724 33.724 0 18.625 15.099 33.724 33.724 33.724Z",
|
|
1872
|
+
fill: "#fff"
|
|
1873
|
+
})), _path17 || (_path17 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1874
|
+
d: "M117.312 113.565a3.807 3.807 0 1 0 0-7.614 3.807 3.807 0 0 0 0 7.614ZM149.435 113.565a3.806 3.806 0 1 0 0-7.612 3.806 3.806 0 0 0 0 7.612Z",
|
|
1875
|
+
fill: "#1D1E26"
|
|
1876
|
+
})), _path18 || (_path18 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1877
|
+
fillRule: "evenodd",
|
|
1878
|
+
clipRule: "evenodd",
|
|
1879
|
+
d: "M133.38 123.952c-4.592 0-8.525 2.259-10.468 5.423a.827.827 0 1 1-1.41-.866c2.27-3.697 6.762-6.212 11.878-6.212 5.108 0 9.646 2.485 11.882 6.22a.827.827 0 1 1-1.42.85c-1.902-3.176-5.863-5.415-10.462-5.415Z",
|
|
1880
|
+
fill: "#1D1E26"
|
|
1881
|
+
})), _path19 || (_path19 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1882
|
+
d: "m170.965 137.356-7.822 9.777 1.668 1.334 7.822-9.777-1.668-1.334Z",
|
|
1883
|
+
fill: "#1D1E26"
|
|
1884
|
+
})), _path20 || (_path20 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1885
|
+
d: "M200.774 163.345c.579 2.143-3.331 6.852-5.553 6.939-7.035.277-28.73-23.913-28.73-23.913l4.44-5.553s28.122 16.142 29.843 22.527Z",
|
|
1886
|
+
fill: "#9BDEFF"
|
|
1887
|
+
})), _path21 || (_path21 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1888
|
+
d: "M204.424 178.378a6.223 6.223 0 0 0 6.223-6.224 6.224 6.224 0 1 0-6.223 6.224Z",
|
|
1889
|
+
fill: "#9BDEFF"
|
|
1890
|
+
})), _path22 || (_path22 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1891
|
+
d: "M199.586 168.269a6.173 6.173 0 0 1 3.311-2.131l-2.123-1.697c-.464 2.069-2.959 4.995-4.837 5.69l2.296 1.837a6.173 6.173 0 0 1 1.353-3.699Z",
|
|
1892
|
+
fill: "#1D1E26"
|
|
1893
|
+
})), _path23 || (_path23 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1894
|
+
d: "m72.357 138.314-3.5 2.955 2.722-5.317a67.379 67.379 0 0 0-5.958-12.509l-4.014 4.514 2.38-7.076a63.412 63.412 0 0 0-9.932-11.611l-3.724 5.549 1.54-7.448a50.152 50.152 0 0 0-11.628-7.179l-.567 4.605s-.675-2.896-1.333-5.38a44.62 44.62 0 0 0-13.315-2.896 96.722 96.722 0 0 0 2.983 17.856c2.483 1.311 5.119 2.751 5.119 2.751l-4.461-.347a79.474 79.474 0 0 0 6.091 15.385c2.897.637 6.745 1.353 6.745 1.353l-5.677.55c2.871 4.965 6.492 9.6 11.069 13.349l6.45-.269-4.191 1.99c6.356 4.49 14.37 7.3 24.48 7.105 1.398-4.332.902-10.816-1.279-17.93Z",
|
|
1895
|
+
fill: "#008ACE"
|
|
1896
|
+
})), _path24 || (_path24 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1897
|
+
fillRule: "evenodd",
|
|
1898
|
+
clipRule: "evenodd",
|
|
1899
|
+
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",
|
|
1900
|
+
fill: "#fff"
|
|
1901
|
+
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
1902
|
+
id: "a"
|
|
1903
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1904
|
+
fill: "#fff",
|
|
1905
|
+
transform: "translate(.552)",
|
|
1906
|
+
d: "M0 0h230.897v180H0z"
|
|
1907
|
+
})))));
|
|
1908
|
+
};
|
|
1909
|
+
var ForwardRef$n = /*#__PURE__*/React.forwardRef(SvgEmptyTable);
|
|
1910
|
+
|
|
1911
|
+
var css$u = {"sticky-header":"DataTable_sticky-header__Dt-br","listContainer":"DataTable_listContainer__MJ2d9","table":"DataTable_table__n--u-","no-results":"DataTable_no-results__8wzS9","no-results-icon":"DataTable_no-results-icon__-nnhq","no-results-title":"DataTable_no-results-title__MM7z0","stickyHeader":"DataTable_sticky-header__Dt-br","noResults":"DataTable_no-results__8wzS9","noResultsIcon":"DataTable_no-results-icon__-nnhq","noResultsTitle":"DataTable_no-results-title__MM7z0"};
|
|
1912
|
+
|
|
1913
|
+
function DataTable(props) {
|
|
1914
|
+
var _a;
|
|
1915
|
+
const { uuiModals } = uuiCore.useUuiContext();
|
|
1916
|
+
const columnsWithFilters = useColumnsWithFilters(props.columns, props.filters);
|
|
1917
|
+
const { columns, config, defaultConfig } = uuiCore.useColumnsConfig(columnsWithFilters, (_a = props.value) === null || _a === void 0 ? void 0 : _a.columnsConfig);
|
|
1918
|
+
const renderRow = React__namespace.useCallback((rowProps) => {
|
|
1919
|
+
return React__namespace.createElement(DataTableRow, Object.assign({ key: rowProps.rowKey, size: props.size, borderBottom: props.border }, rowProps));
|
|
1920
|
+
}, []);
|
|
1921
|
+
const rows = props.getRows();
|
|
1922
|
+
const renderedRows = rows.map(row => (props.renderRow || renderRow)(Object.assign(Object.assign({}, row), { columns })));
|
|
1923
|
+
const renderNoResultsBlock = React__namespace.useCallback(() => {
|
|
1924
|
+
var _a;
|
|
1925
|
+
return (React__namespace.createElement("div", { className: css$u.noResults }, props.renderNoResultsBlock ? (_a = props.renderNoResultsBlock) === null || _a === void 0 ? void 0 : _a.call(props) :
|
|
1926
|
+
React__namespace.createElement(React__namespace.Fragment, null,
|
|
1927
|
+
React__namespace.createElement(uuiComponents.IconContainer, { cx: css$u.noResultsIcon, icon: ForwardRef$n }),
|
|
1928
|
+
React__namespace.createElement(Text, { cx: css$u.noResultsTitle, fontSize: '24', lineHeight: '30', color: 'primary', font: 'semibold' }, i18n.tables.noResultsBlock.title),
|
|
1929
|
+
React__namespace.createElement(Text, { fontSize: '16', lineHeight: '24', font: 'regular', color: 'primary' }, i18n.tables.noResultsBlock.message))));
|
|
1930
|
+
}, [props.renderNoResultsBlock]);
|
|
1931
|
+
const onConfigurationButtonClick = React__namespace.useCallback(() => {
|
|
1932
|
+
uuiModals.show(modalProps => (React__namespace.createElement(ColumnsConfigurationModal, Object.assign({}, modalProps, { columns: props.columns, columnsConfig: config, defaultConfig: defaultConfig }))))
|
|
1933
|
+
.then(columnsConfig => props.onValueChange(Object.assign(Object.assign({}, props.value), { columnsConfig })))
|
|
1934
|
+
.catch(() => null);
|
|
1935
|
+
}, [props.columns, config, defaultConfig, props.value, props.onValueChange]);
|
|
1936
|
+
const renderRowsContainer = React__namespace.useCallback(({ listContainerRef, estimatedHeight, offsetY, scrollShadows }) => (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1937
|
+
React__namespace.createElement("div", { className: css$u.stickyHeader },
|
|
1938
|
+
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: props.value, onValueChange: props.onValueChange }),
|
|
1939
|
+
React__namespace.createElement("div", { className: uuiCore.cx(uuiCore.uuiScrollShadows.top, {
|
|
1940
|
+
[uuiCore.uuiScrollShadows.topVisible]: scrollShadows.verticalTop,
|
|
1941
|
+
}) })),
|
|
1942
|
+
props.exactRowsCount !== 0 ? (React__namespace.createElement("div", { className: css$u.listContainer, style: { minHeight: `${estimatedHeight}px` } },
|
|
1943
|
+
React__namespace.createElement("div", { ref: listContainerRef, role: 'rowgroup', style: { marginTop: offsetY }, children: renderedRows }))) : renderNoResultsBlock === null || renderNoResultsBlock === void 0 ? void 0 : renderNoResultsBlock())), [props, columns, rows, renderNoResultsBlock, onConfigurationButtonClick]);
|
|
1944
|
+
return (React__namespace.createElement(uuiComponents.DataTableSelectionProvider, { onCopy: props.onCopy, rows: rows, columns: columns },
|
|
1945
|
+
React__namespace.createElement(VirtualList, { value: props.value, onValueChange: props.onValueChange, onScroll: props.onScroll, rows: renderedRows, rowsCount: props.rowsCount, renderRows: renderRowsContainer, cx: uuiCore.cx(css$u.table), rawProps: {
|
|
1946
|
+
role: 'table',
|
|
1947
|
+
'aria-colcount': columns.length,
|
|
1948
|
+
'aria-rowcount': props.rowsCount,
|
|
1949
|
+
} })));
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
var styles$1 = {"typography-header":"ColumnsConfigurationModal_typography-header__o3r5C","typography-block":"ColumnsConfigurationModal_typography-block__CXaTR","typography-inline":"ColumnsConfigurationModal_typography-inline__VJCzZ","typography-16":"ColumnsConfigurationModal_typography-16__97zzl","typography-14":"ColumnsConfigurationModal_typography-14__tVuMI","typography-12":"ColumnsConfigurationModal_typography-12__-4gpA","typography-promo":"ColumnsConfigurationModal_typography-promo__5VMFg ColumnsConfigurationModal_typography-header__o3r5C ColumnsConfigurationModal_typography-block__CXaTR ColumnsConfigurationModal_typography-inline__VJCzZ","main-panel":"ColumnsConfigurationModal_main-panel__hCrXd","group-title":"ColumnsConfigurationModal_group-title__UtJIu","group-title-text":"ColumnsConfigurationModal_group-title-text__3hOPf","group-title-badge":"ColumnsConfigurationModal_group-title-badge__4agZV","group-items":"ColumnsConfigurationModal_group-items__g1FUY","no-data":"ColumnsConfigurationModal_no-data__CzFcf","h-divider":"ColumnsConfigurationModal_h-divider__W9MsK","search-area":"ColumnsConfigurationModal_search-area__FGWyb","typographyHeader":"ColumnsConfigurationModal_typography-header__o3r5C","typographyBlock":"ColumnsConfigurationModal_typography-block__CXaTR","typographyInline":"ColumnsConfigurationModal_typography-inline__VJCzZ","typography16":"ColumnsConfigurationModal_typography-16__97zzl","typography14":"ColumnsConfigurationModal_typography-14__tVuMI","typography12":"ColumnsConfigurationModal_typography-12__-4gpA","typographyPromo":"ColumnsConfigurationModal_typography-promo__5VMFg ColumnsConfigurationModal_typography-header__o3r5C ColumnsConfigurationModal_typography-block__CXaTR ColumnsConfigurationModal_typography-inline__VJCzZ","mainPanel":"ColumnsConfigurationModal_main-panel__hCrXd","groupTitle":"ColumnsConfigurationModal_group-title__UtJIu","groupTitleText":"ColumnsConfigurationModal_group-title-text__3hOPf","groupTitleBadge":"ColumnsConfigurationModal_group-title-badge__4agZV","groupItems":"ColumnsConfigurationModal_group-items__g1FUY","noData":"ColumnsConfigurationModal_no-data__CzFcf","hDivider":"ColumnsConfigurationModal_h-divider__W9MsK","searchArea":"ColumnsConfigurationModal_search-area__FGWyb"};
|
|
1953
|
+
|
|
1954
|
+
var _path$l;
|
|
1955
|
+
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); }
|
|
1956
|
+
var SvgNavigationMoreVert18 = function SvgNavigationMoreVert18(props, ref) {
|
|
1957
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
1958
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1959
|
+
width: 18,
|
|
1960
|
+
height: 18,
|
|
1961
|
+
viewBox: "0 0 18 18",
|
|
1962
|
+
ref: ref
|
|
1963
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1964
|
+
fillRule: "evenodd",
|
|
1965
|
+
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",
|
|
1966
|
+
clipRule: "evenodd"
|
|
1967
|
+
})));
|
|
1968
|
+
};
|
|
1969
|
+
var ForwardRef$m = /*#__PURE__*/React.forwardRef(SvgNavigationMoreVert18);
|
|
1970
|
+
|
|
1971
|
+
var _path$k;
|
|
1972
|
+
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); }
|
|
1973
|
+
var SvgActionUpdate18 = function SvgActionUpdate18(props, ref) {
|
|
1974
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
1975
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1976
|
+
width: 18,
|
|
1977
|
+
height: 18,
|
|
1978
|
+
viewBox: "0 0 18 18",
|
|
1979
|
+
ref: ref
|
|
1980
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1981
|
+
fillRule: "evenodd",
|
|
1982
|
+
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",
|
|
1983
|
+
clipRule: "evenodd"
|
|
1984
|
+
})));
|
|
1985
|
+
};
|
|
1986
|
+
var ForwardRef$l = /*#__PURE__*/React.forwardRef(SvgActionUpdate18);
|
|
1987
|
+
|
|
1988
|
+
var _path$j;
|
|
1989
|
+
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); }
|
|
1990
|
+
var SvgActionLockFill18 = function SvgActionLockFill18(props, ref) {
|
|
1991
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
1992
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1993
|
+
width: 18,
|
|
1994
|
+
height: 18,
|
|
1995
|
+
viewBox: "0 0 18 18",
|
|
1996
|
+
ref: ref
|
|
1997
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1998
|
+
fillRule: "evenodd",
|
|
1999
|
+
d: "M5 7V5a4 4 0 1 1 8 0v2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2zm2 0h4V5a2 2 0 1 0-4 0v2zm2 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4z",
|
|
2000
|
+
clipRule: "evenodd"
|
|
2001
|
+
})));
|
|
2002
|
+
};
|
|
2003
|
+
var ForwardRef$k = /*#__PURE__*/React.forwardRef(SvgActionLockFill18);
|
|
2004
|
+
|
|
2005
|
+
var _path$i;
|
|
2006
|
+
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); }
|
|
2007
|
+
var SvgActionPinOn18 = function SvgActionPinOn18(props, ref) {
|
|
2008
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
2009
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2010
|
+
width: 18,
|
|
2011
|
+
height: 18,
|
|
2012
|
+
viewBox: "0 0 18 18",
|
|
2013
|
+
ref: ref
|
|
2014
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2015
|
+
fillRule: "evenodd",
|
|
2016
|
+
d: "M12 9V3h1V2H5v1h1v6l-2 1v1h4v5h2v-5h4v-1l-2-1z",
|
|
2017
|
+
clipRule: "evenodd"
|
|
2018
|
+
})));
|
|
2019
|
+
};
|
|
2020
|
+
var ForwardRef$j = /*#__PURE__*/React.forwardRef(SvgActionPinOn18);
|
|
2021
|
+
|
|
2022
|
+
var _path$h;
|
|
2023
|
+
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); }
|
|
2024
|
+
var SvgActionPinOff18 = function SvgActionPinOff18(props, ref) {
|
|
2025
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
2026
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2027
|
+
width: 18,
|
|
2028
|
+
height: 18,
|
|
2029
|
+
viewBox: "0 0 18 18",
|
|
2030
|
+
ref: ref
|
|
2031
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2032
|
+
d: "M6 4.586 12.414 11H14v-1l-2-1V3h1V2H5v1h1v1.586zM10 16v-4.586l3.743 3.743.707-.707L3.136 3.136l-.707.707L6 7.414V9l-2 1v1h4v5h2z"
|
|
2033
|
+
})));
|
|
2034
|
+
};
|
|
2035
|
+
var ForwardRef$i = /*#__PURE__*/React.forwardRef(SvgActionPinOff18);
|
|
2036
|
+
|
|
2037
|
+
const i18nLocal$1 = i18n.tables.columnsConfigurationModal;
|
|
2038
|
+
function PinIconButton(props) {
|
|
2039
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
2040
|
+
const { id, onTogglePin, isPinned, canUnpin } = props;
|
|
2041
|
+
const isPinnedAlways = isPinned && !canUnpin;
|
|
2042
|
+
const tooltipText = React.useMemo(() => {
|
|
2043
|
+
if (isPinned) {
|
|
2044
|
+
return isPinnedAlways ? i18nLocal$1.lockedColumnPinButton : i18nLocal$1.unPinColumnButton;
|
|
2045
|
+
}
|
|
2046
|
+
return i18nLocal$1.pinColumnButton;
|
|
2047
|
+
}, [isPinned, isPinnedAlways]);
|
|
2048
|
+
const pinIcon = React.useMemo(() => {
|
|
2049
|
+
if (isPinnedAlways) {
|
|
2050
|
+
return ForwardRef$k;
|
|
2051
|
+
}
|
|
2052
|
+
if (isPinned) {
|
|
2053
|
+
return isHovered ? ForwardRef$i : ForwardRef$j;
|
|
2054
|
+
}
|
|
2055
|
+
return ForwardRef$j;
|
|
2056
|
+
}, [isPinnedAlways, isHovered, isPinned]);
|
|
2057
|
+
const pinClickHandler = isPinnedAlways ? undefined : () => onTogglePin(id);
|
|
2058
|
+
return (React__namespace.createElement("span", { onMouseOver: () => setIsHovered(true), onMouseOut: () => setIsHovered(false) },
|
|
2059
|
+
React__namespace.createElement(Tooltip, { content: tooltipText, placement: "bottom" },
|
|
2060
|
+
React__namespace.createElement(IconButton, { icon: pinIcon, onClick: pinClickHandler, isDisabled: isPinnedAlways, color: isPinned ? 'info' : undefined }))));
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
var styles = {"typography-header":"ColumnRow_typography-header__v5iBP","typography-block":"ColumnRow_typography-block__PpJOb","typography-inline":"ColumnRow_typography-inline__GYRwx","typography-16":"ColumnRow_typography-16__4CRKd","typography-14":"ColumnRow_typography-14__xizHg","typography-12":"ColumnRow_typography-12__Cr5Gv","typography-promo":"ColumnRow_typography-promo__ea8Ex ColumnRow_typography-header__v5iBP ColumnRow_typography-block__PpJOb ColumnRow_typography-inline__GYRwx","row-wrapper":"ColumnRow_row-wrapper__XJiWz","not-pinned":"ColumnRow_not-pinned__I-gDy","pin-icon-button":"ColumnRow_pin-icon-button__YTlTW","drag-handle":"ColumnRow_drag-handle__S4faK","dnd-disabled":"ColumnRow_dnd-disabled__HqbOB","typographyHeader":"ColumnRow_typography-header__v5iBP","typographyBlock":"ColumnRow_typography-block__PpJOb","typographyInline":"ColumnRow_typography-inline__GYRwx","typography16":"ColumnRow_typography-16__4CRKd","typography14":"ColumnRow_typography-14__xizHg","typography12":"ColumnRow_typography-12__Cr5Gv","typographyPromo":"ColumnRow_typography-promo__ea8Ex ColumnRow_typography-header__v5iBP ColumnRow_typography-block__PpJOb ColumnRow_typography-inline__GYRwx","rowWrapper":"ColumnRow_row-wrapper__XJiWz","notPinned":"ColumnRow_not-pinned__I-gDy","pinIconButton":"ColumnRow_pin-icon-button__YTlTW","dragHandle":"ColumnRow_drag-handle__S4faK","dndDisabled":"ColumnRow_dnd-disabled__HqbOB"};
|
|
2064
|
+
|
|
2065
|
+
const ColumnRow = React__namespace.memo(function ColumnRow(props) {
|
|
2066
|
+
const { column } = props;
|
|
2067
|
+
const { toggleVisibility, togglePin, onCanAcceptDrop, onDrop, columnConfig, isDndAllowed, isPinnedAlways } = column;
|
|
2068
|
+
const { isVisible, fix } = columnConfig;
|
|
2069
|
+
const isPinned = fix || isPinnedAlways;
|
|
2070
|
+
const data = { column, columnConfig };
|
|
2071
|
+
const renderContent = (dndActorParams) => {
|
|
2072
|
+
const wrapperClasses = uuiCore.cx(styles.rowWrapper, !isPinned && styles.notPinned, ...(isDndAllowed ? dndActorParams.classNames : []));
|
|
2073
|
+
const _a = dndActorParams.eventHandlers, { onTouchStart, onPointerDown } = _a, restEventHandlers = __rest(_a, ["onTouchStart", "onPointerDown"]);
|
|
2074
|
+
const wrapperAttrs = Object.assign(Object.assign({}, (isDndAllowed ? { ref: dndActorParams.ref } : {})), (isDndAllowed ? { rawProps: Object.assign({}, restEventHandlers) } : {}));
|
|
2075
|
+
const dragHandleRawProps = Object.assign({}, (isDndAllowed ? { onTouchStart, onPointerDown } : {}));
|
|
2076
|
+
return (React__namespace.createElement(FlexRow, Object.assign({ size: "30", cx: wrapperClasses }, wrapperAttrs),
|
|
2077
|
+
React__namespace.createElement(FlexRow, { size: "30", spacing: '6', cx: styles.title },
|
|
2078
|
+
React__namespace.createElement(uuiComponents.DragHandle, { rawProps: dragHandleRawProps, isDisabled: !isDndAllowed, cx: uuiCore.cx(styles.dragHandle, !isDndAllowed && styles.dndDisabled) }),
|
|
2079
|
+
React__namespace.createElement(Checkbox, { key: column.key, label: column.caption, value: isVisible, onValueChange: toggleVisibility, isDisabled: column.isAlwaysVisible })),
|
|
2080
|
+
React__namespace.createElement(uuiComponents.FlexSpacer, null),
|
|
2081
|
+
React__namespace.createElement(FlexRow, { size: "30", cx: styles.pinIconButton },
|
|
2082
|
+
React__namespace.createElement(PinIconButton, { id: column.key, isPinned: !!isPinned, canUnpin: !isPinnedAlways, onTogglePin: togglePin })),
|
|
2083
|
+
React__namespace.createElement(DropMarker, Object.assign({}, dndActorParams))));
|
|
2084
|
+
};
|
|
2085
|
+
return (React__namespace.createElement(uuiCore.DndActor, { key: column.key, srcData: data, dstData: data, canAcceptDrop: onCanAcceptDrop, onDrop: onDrop, render: renderContent }));
|
|
2086
|
+
});
|
|
2087
|
+
|
|
2088
|
+
const i18nLocal = i18n.tables.columnsConfigurationModal;
|
|
2089
|
+
const renderGroupTitle = (title, amount) => React__namespace.createElement(FlexRow, { size: "24", padding: "24", spacing: "6", cx: styles$1.groupTitle },
|
|
2090
|
+
React__namespace.createElement(Text, { cx: styles$1.groupTitleText, font: "semibold", lineHeight: "24", fontSize: "14" }, title),
|
|
2091
|
+
React__namespace.createElement(Badge, { cx: styles$1.groupTitleBadge, caption: amount, color: 'info', size: "18" }));
|
|
2092
|
+
function ColumnsConfigurationModal(props) {
|
|
2093
|
+
const { columns, columnsConfig: initialColumnsConfig, defaultConfig } = props, modalProps = __rest(props, ["columns", "columnsConfig", "defaultConfig"]);
|
|
2094
|
+
const { groupedColumns, searchValue, columnsConfig, reset, checkAll, uncheckAll, setSearchValue, } = uuiComponents.useColumnsConfiguration({ initialColumnsConfig, columns, defaultConfig });
|
|
2095
|
+
const apply = React.useCallback(() => modalProps.success(columnsConfig), [columnsConfig, modalProps]);
|
|
2096
|
+
const close = React.useCallback(() => modalProps.abort(), [modalProps]);
|
|
2097
|
+
const isNoData = React.useMemo(() => Object.values(groupedColumns).every(v => !v.length), [groupedColumns]);
|
|
2098
|
+
const renderVisible = () => {
|
|
2099
|
+
const amountPinned = groupedColumns.displayedPinned.length;
|
|
2100
|
+
const amountUnPinned = groupedColumns.displayedUnpinned.length;
|
|
2101
|
+
if (!amountPinned && !amountUnPinned) {
|
|
2102
|
+
return null;
|
|
2103
|
+
}
|
|
2104
|
+
const hasDivider = !!(amountPinned && amountUnPinned);
|
|
2105
|
+
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2106
|
+
renderGroupTitle(i18nLocal.displayedSectionTitle, amountPinned + amountUnPinned),
|
|
2107
|
+
!!amountPinned && React__namespace.createElement(FlexRow, { cx: styles$1.groupItems, size: "30" }, groupedColumns.displayedPinned.map(c => React__namespace.createElement(ColumnRow, { column: c, key: c.key }))),
|
|
2108
|
+
hasDivider && React__namespace.createElement("div", { className: styles$1.hDivider }),
|
|
2109
|
+
!!amountUnPinned && React__namespace.createElement(FlexRow, { cx: styles$1.groupItems, size: "30" }, groupedColumns.displayedUnpinned.map(c => React__namespace.createElement(ColumnRow, { column: c, key: c.key })))));
|
|
2110
|
+
};
|
|
2111
|
+
const renderHidden = () => {
|
|
2112
|
+
const amountHidden = groupedColumns.hidden.length;
|
|
2113
|
+
if (!amountHidden) {
|
|
2114
|
+
return null;
|
|
2115
|
+
}
|
|
2116
|
+
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2117
|
+
renderGroupTitle(i18nLocal.hiddenSectionTitle, amountHidden),
|
|
2118
|
+
React__namespace.createElement(FlexRow, { cx: styles$1.groupItems, size: "30" }, groupedColumns.hidden.map(c => React__namespace.createElement(ColumnRow, { column: c, key: c.key })))));
|
|
2119
|
+
};
|
|
2120
|
+
const noVisibleColumns = React.useMemo(() => !groupedColumns.displayedPinned.length && !groupedColumns.displayedUnpinned.length, [groupedColumns.displayedPinned, groupedColumns.displayedUnpinned]);
|
|
2121
|
+
const applyButton = React__namespace.createElement(Button, { caption: i18nLocal.applyButton, isDisabled: noVisibleColumns, color: "accent", onClick: apply });
|
|
2122
|
+
return (React__namespace.createElement(ModalBlocker, Object.assign({}, modalProps),
|
|
2123
|
+
React__namespace.createElement(ModalWindow, { height: 700 },
|
|
2124
|
+
React__namespace.createElement(ModalHeader, { title: i18nLocal.configureColumnsTitle, onClose: close }),
|
|
2125
|
+
React__namespace.createElement(FlexRow, { padding: "24", borderBottom: true, spacing: "12", cx: styles$1.searchArea },
|
|
2126
|
+
React__namespace.createElement(SearchInput, { size: "30", value: searchValue, onValueChange: setSearchValue, placeholder: i18nLocal.searchPlaceholder }),
|
|
2127
|
+
React__namespace.createElement(Dropdown, { closeOnTargetClick: true, renderBody: () => React__namespace.createElement(Panel, { shadow: true },
|
|
2128
|
+
React__namespace.createElement(DropdownMenuButton, { caption: i18nLocal.clearAllButton, onClick: uncheckAll }),
|
|
2129
|
+
React__namespace.createElement(DropdownMenuButton, { caption: i18nLocal.selectAllButton, onClick: checkAll })), renderTarget: props => React__namespace.createElement(Button, Object.assign({}, props, { mode: "none", icon: ForwardRef$m, size: "30", color: "secondary", isDropdown: false })) })),
|
|
2130
|
+
React__namespace.createElement(Panel, { cx: styles$1.mainPanel },
|
|
2131
|
+
React__namespace.createElement(ScrollBars, null,
|
|
2132
|
+
renderVisible(),
|
|
2133
|
+
renderHidden(),
|
|
2134
|
+
isNoData && (React__namespace.createElement(FlexRow, { cx: styles$1.noData },
|
|
2135
|
+
React__namespace.createElement(Text, { fontSize: '24', lineHeight: '30', color: 'primary', font: 'semibold' }, i18nLocal.noResultsFound.text),
|
|
2136
|
+
React__namespace.createElement(Text, { fontSize: '16', lineHeight: '24', font: 'regular', color: 'primary' }, i18nLocal.noResultsFound.subText))))),
|
|
2137
|
+
React__namespace.createElement(ModalFooter, { borderTop: true },
|
|
2138
|
+
React__namespace.createElement(LinkButton, { icon: ForwardRef$l, caption: i18nLocal.resetToDefaultButton, onClick: reset }),
|
|
2139
|
+
React__namespace.createElement(FlexSpacer, null),
|
|
2140
|
+
React__namespace.createElement(Button, { mode: "ghost", color: "secondary", caption: i18nLocal.cancelButton, onClick: close }),
|
|
2141
|
+
noVisibleColumns
|
|
2142
|
+
? (React__namespace.createElement(Tooltip, { content: i18nLocal.enableAtLeastOneColumnMessage, placement: 'top-end', color: 'contrast' }, applyButton))
|
|
2143
|
+
: applyButton))));
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
var css$t = {"panel":"ColumnHeaderDropdown_panel__52aQo"};
|
|
2147
|
+
|
|
2148
|
+
var css$s = {"typography-header":"SortingPanel_typography-header__xME1m","typography-block":"SortingPanel_typography-block__YDYpy","typography-inline":"SortingPanel_typography-inline__Tcu9M","typography-16":"SortingPanel_typography-16__63gUO","typography-14":"SortingPanel_typography-14__fFFKh","typography-12":"SortingPanel_typography-12__gbS0m","typography-promo":"SortingPanel_typography-promo__Ng4h4 SortingPanel_typography-header__xME1m SortingPanel_typography-block__YDYpy SortingPanel_typography-inline__Tcu9M","sorting-panel-container":"SortingPanel_sorting-panel-container__DH1x6","sort-active":"SortingPanel_sort-active__KNhjc","typographyHeader":"SortingPanel_typography-header__xME1m","typographyBlock":"SortingPanel_typography-block__YDYpy","typographyInline":"SortingPanel_typography-inline__Tcu9M","typography16":"SortingPanel_typography-16__63gUO","typography14":"SortingPanel_typography-14__fFFKh","typography12":"SortingPanel_typography-12__gbS0m","typographyPromo":"SortingPanel_typography-promo__Ng4h4 SortingPanel_typography-header__xME1m SortingPanel_typography-block__YDYpy SortingPanel_typography-inline__Tcu9M","sortingPanelContainer":"SortingPanel_sorting-panel-container__DH1x6","sortActive":"SortingPanel_sort-active__KNhjc"};
|
|
2149
|
+
|
|
2150
|
+
const SortingPanelImpl = ({ sortDirection, onSort }) => {
|
|
2151
|
+
const sortAsc = React.useCallback(() => onSort(sortDirection === 'asc' ? undefined : 'asc'), [onSort]);
|
|
2152
|
+
const sortDesc = React.useCallback(() => onSort(sortDirection === 'desc' ? undefined : 'desc'), [onSort]);
|
|
2153
|
+
return (React__namespace.default.createElement(FlexCell, { cx: css$s.sortingPanelContainer },
|
|
2154
|
+
React__namespace.default.createElement(DropdownMenuButton, { isActive: sortDirection === 'asc', caption: i18n.pickerFilterHeader.sortAscending, icon: ForwardRef$t, onClick: sortAsc }),
|
|
2155
|
+
React__namespace.default.createElement(DropdownMenuButton, { isActive: sortDirection === 'desc', caption: i18n.pickerFilterHeader.sortDescending, icon: ForwardRef$s, onClick: sortDesc })));
|
|
2156
|
+
};
|
|
2157
|
+
const SortingPanel = React__namespace.default.memo(SortingPanelImpl);
|
|
2158
|
+
|
|
2159
|
+
const ColumnHeaderDropdownImpl = props => {
|
|
2160
|
+
const popperModifiers = React.useMemo(() => [
|
|
2161
|
+
{
|
|
2162
|
+
name: 'offset',
|
|
2163
|
+
options: { offset: [0, 1] },
|
|
2164
|
+
},
|
|
2165
|
+
uuiCore.mobilePopperModifier,
|
|
2166
|
+
], []);
|
|
2167
|
+
const style = React.useMemo(() => ({
|
|
2168
|
+
width: uuiCore.isMobile() ? document.documentElement.clientWidth : undefined,
|
|
2169
|
+
}), []);
|
|
2170
|
+
const closeDropdown = React.useCallback(() => props.onOpenChange(false), [props.onOpenChange]);
|
|
2171
|
+
return (React__namespace.default.createElement(uuiComponents.Dropdown, { renderTarget: props.renderTarget, renderBody: dropdownProps => (React__namespace.default.createElement(Panel, { style: style, shadow: true, cx: css$t.panel },
|
|
2172
|
+
React__namespace.default.createElement(MobileDropdownWrapper, { title: props.title, close: closeDropdown },
|
|
2173
|
+
props.isSortable && (React__namespace.default.createElement(SortingPanel, { sortDirection: props.sortDirection, onSort: props.onSort })),
|
|
2174
|
+
props.renderFilter(dropdownProps)))), modifiers: popperModifiers, value: props.isOpen, onValueChange: props.onOpenChange }));
|
|
2175
|
+
};
|
|
2176
|
+
const ColumnHeaderDropdown = React__namespace.default.memo(ColumnHeaderDropdownImpl);
|
|
2177
|
+
|
|
2178
|
+
var _path$g;
|
|
2179
|
+
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); }
|
|
2180
|
+
var SvgNotificationDone24 = function SvgNotificationDone24(props, ref) {
|
|
2181
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
2182
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2183
|
+
width: 24,
|
|
2184
|
+
height: 24,
|
|
2185
|
+
viewBox: "0 0 24 24",
|
|
2186
|
+
ref: ref
|
|
2187
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2188
|
+
fillRule: "evenodd",
|
|
2189
|
+
d: "m9.727 16.075-4.295-4.388L4 13.149 9.727 19 22 6.463 20.568 5 9.728 16.075z",
|
|
2190
|
+
clipRule: "evenodd"
|
|
2191
|
+
})));
|
|
2192
|
+
};
|
|
2193
|
+
var ForwardRef$h = /*#__PURE__*/React.forwardRef(SvgNotificationDone24);
|
|
2194
|
+
|
|
2195
|
+
var _path$f;
|
|
2196
|
+
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); }
|
|
2197
|
+
var SvgNotificationDone18 = function SvgNotificationDone18(props, ref) {
|
|
2198
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
2199
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2200
|
+
width: 18,
|
|
2201
|
+
height: 18,
|
|
2202
|
+
viewBox: "0 0 18 18",
|
|
2203
|
+
ref: ref
|
|
2204
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2205
|
+
fillRule: "evenodd",
|
|
2206
|
+
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",
|
|
2207
|
+
clipRule: "evenodd"
|
|
2208
|
+
})));
|
|
2209
|
+
};
|
|
2210
|
+
var ForwardRef$g = /*#__PURE__*/React.forwardRef(SvgNotificationDone18);
|
|
2211
|
+
|
|
2212
|
+
var _path$e;
|
|
2213
|
+
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); }
|
|
2214
|
+
var SvgNotificationDone12 = function SvgNotificationDone12(props, ref) {
|
|
2215
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
2216
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2217
|
+
width: 12,
|
|
2218
|
+
height: 12,
|
|
2219
|
+
viewBox: "0 0 12 12",
|
|
2220
|
+
ref: ref
|
|
2221
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2222
|
+
d: "M11 3.6 9.462 2 4.846 6.8 2.538 4.4 1 6l3.846 4L11 3.6z"
|
|
2223
|
+
})));
|
|
2224
|
+
};
|
|
2225
|
+
var ForwardRef$f = /*#__PURE__*/React.forwardRef(SvgNotificationDone12);
|
|
2226
|
+
|
|
2227
|
+
var css$r = {"typography-header":"DataPickerRow_typography-header__IfaEa","typography-block":"DataPickerRow_typography-block__h7PJR","typography-inline":"DataPickerRow_typography-inline__nLffn","typography-16":"DataPickerRow_typography-16__d2vFn","typography-14":"DataPickerRow_typography-14__lhGfr","typography-12":"DataPickerRow_typography-12__jpyOF","typography-promo":"DataPickerRow_typography-promo__XThFP DataPickerRow_typography-header__IfaEa DataPickerRow_typography-block__h7PJR DataPickerRow_typography-inline__nLffn","render-item":"DataPickerRow_render-item__YsRTQ","icon-wrapper":"DataPickerRow_icon-wrapper__Pwg6e","picker-row":"DataPickerRow_picker-row__yZk93","icon-default":"DataPickerRow_icon-default__DpPlP","icon-info":"DataPickerRow_icon-info__7aYSO","typographyHeader":"DataPickerRow_typography-header__IfaEa","typographyBlock":"DataPickerRow_typography-block__h7PJR","typographyInline":"DataPickerRow_typography-inline__nLffn","typography16":"DataPickerRow_typography-16__d2vFn","typography14":"DataPickerRow_typography-14__lhGfr","typography12":"DataPickerRow_typography-12__jpyOF","typographyPromo":"DataPickerRow_typography-promo__XThFP DataPickerRow_typography-header__IfaEa DataPickerRow_typography-block__h7PJR DataPickerRow_typography-inline__nLffn","renderItem":"DataPickerRow_render-item__YsRTQ","iconWrapper":"DataPickerRow_icon-wrapper__Pwg6e","pickerRow":"DataPickerRow_picker-row__yZk93","iconDefault":"DataPickerRow_icon-default__DpPlP","iconInfo":"DataPickerRow_icon-info__7aYSO"};
|
|
1454
2228
|
|
|
1455
2229
|
class DataPickerRow extends React__namespace.Component {
|
|
1456
2230
|
constructor() {
|
|
1457
2231
|
super(...arguments);
|
|
1458
2232
|
this.getIcon = (size) => {
|
|
1459
2233
|
switch (size) {
|
|
1460
|
-
case '24': return ForwardRef;
|
|
1461
|
-
case '30': return ForwardRef$
|
|
1462
|
-
case '36': return ForwardRef$
|
|
1463
|
-
case '42': return ForwardRef$
|
|
1464
|
-
default: return ForwardRef$
|
|
2234
|
+
case '24': return ForwardRef$f;
|
|
2235
|
+
case '30': return ForwardRef$g;
|
|
2236
|
+
case '36': return ForwardRef$g;
|
|
2237
|
+
case '42': return ForwardRef$h;
|
|
2238
|
+
default: return ForwardRef$g;
|
|
1465
2239
|
}
|
|
1466
2240
|
};
|
|
1467
2241
|
this.column = {
|
|
1468
2242
|
key: 'name',
|
|
1469
2243
|
grow: 1,
|
|
1470
2244
|
width: 0,
|
|
1471
|
-
render: (item, rowProps) => React__namespace.createElement("div", { key: rowProps.id, className: css$
|
|
2245
|
+
render: (item, rowProps) => React__namespace.createElement("div", { key: rowProps.id, className: css$r.renderItem },
|
|
1472
2246
|
this.props.renderItem(item, rowProps),
|
|
1473
2247
|
React__namespace.createElement(FlexSpacer, null),
|
|
1474
|
-
(rowProps.isChildrenSelected || rowProps.isSelected) && React__namespace.createElement("div", { className: css$
|
|
1475
|
-
React__namespace.createElement(IconContainer, { icon: this.getIcon(this.props.size),
|
|
2248
|
+
(rowProps.isChildrenSelected || rowProps.isSelected) && React__namespace.createElement("div", { className: css$r.iconWrapper },
|
|
2249
|
+
React__namespace.createElement(uuiComponents.IconContainer, { icon: this.getIcon(this.props.size), cx: rowProps.isChildrenSelected ? css$r.iconDefault : css$r.iconInfo }))),
|
|
1476
2250
|
};
|
|
1477
2251
|
this.renderContent = () => {
|
|
1478
2252
|
return React__namespace.createElement(DataTableCell, { key: 'name', size: this.props.size || '36', padding: this.props.padding || '24', isFirstColumn: true, isLastColumn: false, tabIndex: -1, column: this.column, rowProps: this.props, alignActions: this.props.alignActions || 'top' });
|
|
1479
2253
|
};
|
|
1480
2254
|
}
|
|
1481
2255
|
render() {
|
|
1482
|
-
return React__namespace.createElement(uuiComponents.DataPickerRow, Object.assign({}, this.props, { cx: [css$
|
|
2256
|
+
return React__namespace.createElement(uuiComponents.DataPickerRow, Object.assign({}, this.props, { cx: [css$r.pickerRow, this.props.cx], renderContent: this.renderContent }));
|
|
1483
2257
|
}
|
|
1484
2258
|
}
|
|
1485
2259
|
|
|
1486
|
-
var css$
|
|
2260
|
+
var css$q = {"typography-header":"MobileDropdownWrapper_typography-header__x4CWx","typography-block":"MobileDropdownWrapper_typography-block__qdVMl","typography-inline":"MobileDropdownWrapper_typography-inline__yk-yR","typography-16":"MobileDropdownWrapper_typography-16__keTAm","typography-14":"MobileDropdownWrapper_typography-14__kN-FT","typography-12":"MobileDropdownWrapper_typography-12__X6oPE","typography-promo":"MobileDropdownWrapper_typography-promo__tKPcE MobileDropdownWrapper_typography-header__x4CWx MobileDropdownWrapper_typography-block__qdVMl MobileDropdownWrapper_typography-inline__yk-yR","done":"MobileDropdownWrapper_done__kE5Pe","typographyHeader":"MobileDropdownWrapper_typography-header__x4CWx","typographyBlock":"MobileDropdownWrapper_typography-block__qdVMl","typographyInline":"MobileDropdownWrapper_typography-inline__yk-yR","typography16":"MobileDropdownWrapper_typography-16__keTAm","typography14":"MobileDropdownWrapper_typography-14__kN-FT","typography12":"MobileDropdownWrapper_typography-12__X6oPE","typographyPromo":"MobileDropdownWrapper_typography-promo__tKPcE MobileDropdownWrapper_typography-header__x4CWx MobileDropdownWrapper_typography-block__qdVMl MobileDropdownWrapper_typography-inline__yk-yR"};
|
|
1487
2261
|
|
|
1488
2262
|
const MobileDropdownWrapper = props => {
|
|
1489
2263
|
const isVisible = uuiCore.isMobile();
|
|
@@ -1491,39 +2265,45 @@ const MobileDropdownWrapper = props => {
|
|
|
1491
2265
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
1492
2266
|
isVisible && React__namespace.default.createElement(DataPickerHeader, { title: props.title, close: props.close }),
|
|
1493
2267
|
props.children,
|
|
1494
|
-
isVisible && (React__namespace.default.createElement(LinkButton, { caption: 'DONE', onClick: () => { var _a; return (_a = props.close) === null || _a === void 0 ? void 0 : _a.call(props); }, cx: css$
|
|
2268
|
+
isVisible && (React__namespace.default.createElement(LinkButton, { caption: 'DONE', onClick: () => { var _a; return (_a = props.close) === null || _a === void 0 ? void 0 : _a.call(props); }, cx: css$q.done, size: '48' }))));
|
|
1495
2269
|
};
|
|
1496
2270
|
|
|
1497
|
-
|
|
1498
|
-
Copyright (c) Microsoft Corporation.
|
|
1499
|
-
|
|
1500
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1501
|
-
purpose with or without fee is hereby granted.
|
|
1502
|
-
|
|
1503
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1504
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1505
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1506
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1507
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1508
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1509
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1510
|
-
***************************************************************************** */
|
|
1511
|
-
|
|
1512
|
-
function __rest(s, e) {
|
|
1513
|
-
var t = {};
|
|
1514
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1515
|
-
t[p] = s[p];
|
|
1516
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1517
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1518
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1519
|
-
t[p[i]] = s[p[i]];
|
|
1520
|
-
}
|
|
1521
|
-
return t;
|
|
1522
|
-
}
|
|
2271
|
+
var css$p = {"typography-header":"PickerModal_typography-header__UkGcm","typography-block":"PickerModal_typography-block__ZZN4H","typography-inline":"PickerModal_typography-inline__KorkO","typography-16":"PickerModal_typography-16__iu8BL","typography-14":"PickerModal_typography-14__q81pu","typography-12":"PickerModal_typography-12__yekWT","typography-promo":"PickerModal_typography-promo__aiTeX PickerModal_typography-header__UkGcm PickerModal_typography-block__ZZN4H PickerModal_typography-inline__KorkO","sub-header-wrapper":"PickerModal_sub-header-wrapper__ArWps","switch":"PickerModal_switch__l1-Vd","typographyHeader":"PickerModal_typography-header__UkGcm","typographyBlock":"PickerModal_typography-block__ZZN4H","typographyInline":"PickerModal_typography-inline__KorkO","typography16":"PickerModal_typography-16__iu8BL","typography14":"PickerModal_typography-14__q81pu","typography12":"PickerModal_typography-12__yekWT","typographyPromo":"PickerModal_typography-promo__aiTeX PickerModal_typography-header__UkGcm PickerModal_typography-block__ZZN4H PickerModal_typography-inline__KorkO","subHeaderWrapper":"PickerModal_sub-header-wrapper__ArWps","$switch$":"PickerModal_switch__l1-Vd"};
|
|
1523
2272
|
|
|
1524
|
-
var
|
|
2273
|
+
var _path$d, _path2;
|
|
2274
|
+
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); }
|
|
2275
|
+
var SvgSearchWithBackground = function SvgSearchWithBackground(props, ref) {
|
|
2276
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
2277
|
+
width: 66,
|
|
2278
|
+
height: 67,
|
|
2279
|
+
viewBox: "0 0 66 67",
|
|
2280
|
+
fill: "none",
|
|
2281
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2282
|
+
ref: ref
|
|
2283
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2284
|
+
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",
|
|
2285
|
+
fill: "#EBEDF5"
|
|
2286
|
+
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2287
|
+
fillRule: "evenodd",
|
|
2288
|
+
clipRule: "evenodd",
|
|
2289
|
+
d: "m42.31 40.335 7.165 7.165L47 49.975l-7.165-7.165a13.94 13.94 0 0 1-8.585 2.94c-7.732 0-14-6.268-14-14s6.268-14 14-14 14 6.268 14 14a13.94 13.94 0 0 1-2.94 8.585ZM31.25 42.25c5.799 0 10.5-4.701 10.5-10.5s-4.701-10.5-10.5-10.5-10.5 4.701-10.5 10.5 4.701 10.5 10.5 10.5Z",
|
|
2290
|
+
fill: "#6C6F80"
|
|
2291
|
+
})));
|
|
2292
|
+
};
|
|
2293
|
+
var ForwardRef$e = /*#__PURE__*/React.forwardRef(SvgSearchWithBackground);
|
|
1525
2294
|
|
|
1526
2295
|
class PickerModalImpl extends uuiComponents.PickerModalBase {
|
|
2296
|
+
constructor() {
|
|
2297
|
+
super(...arguments);
|
|
2298
|
+
this.renderNotFound = () => {
|
|
2299
|
+
return this.props.renderNotFound
|
|
2300
|
+
? this.props.renderNotFound({ search: this.state.dataSourceState.search, onClose: () => this.props.success(null) })
|
|
2301
|
+
: React__namespace.createElement("div", { className: css$p.noFoundModalContainer },
|
|
2302
|
+
React__namespace.createElement(uuiComponents.IconContainer, { cx: css$p.noFoundModalContainerIcon, icon: ForwardRef$e }),
|
|
2303
|
+
React__namespace.createElement(Text, { cx: css$p.noFoundModalContainerText, font: 'semibold', fontSize: '16', lineHeight: '24', color: 'primary', size: '36' }, i18n.dataPickerBody.noRecordsMessage),
|
|
2304
|
+
React__namespace.createElement(Text, { cx: css$p.noFoundModalContainerText, fontSize: '12', lineHeight: '18', font: 'regular', color: 'primary', size: '36' }, i18n.dataPickerBody.noRecordsSubTitle));
|
|
2305
|
+
};
|
|
2306
|
+
}
|
|
1527
2307
|
renderRow(rowProps) {
|
|
1528
2308
|
return this.props.renderRow ? this.props.renderRow(rowProps, this.state.dataSourceState) : (React__namespace.createElement(DataPickerRow, Object.assign({}, rowProps, { key: rowProps.rowKey, borderBottom: 'none', padding: '24', size: '36', renderItem: (i) => React__namespace.createElement(Text, { size: '36' }, rowProps.isLoading ? React__namespace.createElement(TextPlaceholder, { wordsCount: 2 }) : this.getName(i)) })));
|
|
1529
2309
|
}
|
|
@@ -1543,8 +2323,8 @@ class PickerModalImpl extends uuiComponents.PickerModalBase {
|
|
|
1543
2323
|
const rows = dataRows.map(props => this.renderRow(props));
|
|
1544
2324
|
return (React__namespace.createElement(ModalBlocker, Object.assign({}, this.props),
|
|
1545
2325
|
React__namespace.createElement(ModalWindow, { width: 600, height: 700 },
|
|
1546
|
-
React__namespace.createElement(ModalHeader, {
|
|
1547
|
-
React__namespace.createElement(FlexCell, { cx: css$
|
|
2326
|
+
React__namespace.createElement(ModalHeader, { title: this.props.caption || i18n.pickerModal.headerTitle, onClose: () => this.props.abort() }),
|
|
2327
|
+
React__namespace.createElement(FlexCell, { cx: css$p.subHeaderWrapper },
|
|
1548
2328
|
React__namespace.createElement(FlexRow, { vPadding: '24' },
|
|
1549
2329
|
React__namespace.createElement(SearchInput, Object.assign({}, this.lens.prop('dataSourceState').prop('search').toProps(), { onKeyDown: (e) => uuiComponents.handleDataSourceKeyboard({
|
|
1550
2330
|
value: this.getDataSourceState(),
|
|
@@ -1553,13 +2333,10 @@ class PickerModalImpl extends uuiComponents.PickerModalBase {
|
|
|
1553
2333
|
rows: dataRows,
|
|
1554
2334
|
editMode: 'modal',
|
|
1555
2335
|
}, e), autoFocus: true, placeholder: i18n.pickerModal.searchPlaceholder }))),
|
|
1556
|
-
!this.isSingleSelect() && React__namespace.createElement(Switch, Object.assign({ cx: css$
|
|
2336
|
+
!this.isSingleSelect() && React__namespace.createElement(Switch, Object.assign({ cx: css$p.switch, size: '18' }, this.stateLens.prop('showSelected').toProps(), { isDisabled: selectedDataRows.length < 1, label: 'Show only selected' })),
|
|
1557
2337
|
this.props.renderFilter && React__namespace.createElement(FlexCell, { grow: 2 }, this.props.renderFilter(this.lens.prop('dataSourceState').prop('filter').toProps()))),
|
|
1558
|
-
React__namespace.createElement(DataPickerBody, Object.assign({}, this.getListProps(), { value: this.getDataSourceState(), onValueChange: this.handleDataSourceValueChange, search: this.lens.prop('dataSourceState').prop('search').toProps(), showSearch: false, rows: rows, renderNotFound: this.
|
|
1559
|
-
|
|
1560
|
-
onClose: () => this.props.success(selectedDataRows),
|
|
1561
|
-
})), editMode: 'modal' })),
|
|
1562
|
-
React__namespace.createElement(ModalFooter, { borderTop: true, padding: '24', vPadding: '24' }, this.props.renderFooter
|
|
2338
|
+
React__namespace.createElement(DataPickerBody, Object.assign({}, this.getListProps(), { value: this.getDataSourceState(), onValueChange: this.handleDataSourceValueChange, search: this.lens.prop('dataSourceState').prop('search').toProps(), showSearch: false, rows: rows, renderNotFound: this.renderNotFound, editMode: 'modal' })),
|
|
2339
|
+
React__namespace.createElement(ModalFooter, { padding: '24', vPadding: '24' }, this.props.renderFooter
|
|
1563
2340
|
? this.props.renderFooter(this.getFooterProps())
|
|
1564
2341
|
: this.renderFooter(selectedDataRows)))));
|
|
1565
2342
|
}
|
|
@@ -1577,9 +2354,9 @@ class PickerModal extends React__namespace.Component {
|
|
|
1577
2354
|
|
|
1578
2355
|
const Avatar = uuiCore.withMods(uuiComponents.Avatar, () => []);
|
|
1579
2356
|
|
|
1580
|
-
var css$
|
|
2357
|
+
var css$o = {"typography-header":"Badge_typography-header__zhcFQ","typography-block":"Badge_typography-block__aR47j","typography-inline":"Badge_typography-inline__MLd7F","typography-16":"Badge_typography-16__gwWRC","typography-14":"Badge_typography-14__ins26","typography-12":"Badge_typography-12__pj7lQ","typography-promo":"Badge_typography-promo__jJwa3 Badge_typography-header__zhcFQ Badge_typography-block__aR47j Badge_typography-inline__MLd7F","root":"Badge_root__wIzSP","size-18":"Badge_size-18__-VlZJ","fill-transparent":"Badge_fill-transparent__za27N","size-24":"Badge_size-24__WZsqd","size-30":"Badge_size-30__oGbuk","size-36":"Badge_size-36__MMdK5","size-42":"Badge_size-42__MOPTB","size-48":"Badge_size-48__FEYnJ","fill-solid":"Badge_fill-solid__ptnEO","fill-semitransparent":"Badge_fill-semitransparent__Nd9RN","typographyHeader":"Badge_typography-header__zhcFQ","typographyBlock":"Badge_typography-block__aR47j","typographyInline":"Badge_typography-inline__MLd7F","typography16":"Badge_typography-16__gwWRC","typography14":"Badge_typography-14__ins26","typography12":"Badge_typography-12__pj7lQ","typographyPromo":"Badge_typography-promo__jJwa3 Badge_typography-header__zhcFQ Badge_typography-block__aR47j Badge_typography-inline__MLd7F","size18":"Badge_size-18__-VlZJ","fillTransparent":"Badge_fill-transparent__za27N","size24":"Badge_size-24__WZsqd","size30":"Badge_size-30__oGbuk","size36":"Badge_size-36__MMdK5","size42":"Badge_size-42__MOPTB","size48":"Badge_size-48__FEYnJ","fillSolid":"Badge_fill-solid__ptnEO","fillSemitransparent":"Badge_fill-semitransparent__Nd9RN"};
|
|
1581
2358
|
|
|
1582
|
-
const defaultSize$
|
|
2359
|
+
const defaultSize$4 = '36';
|
|
1583
2360
|
const mapSize$1 = {
|
|
1584
2361
|
'48': '48',
|
|
1585
2362
|
'42': '48',
|
|
@@ -1590,22 +2367,22 @@ const mapSize$1 = {
|
|
|
1590
2367
|
};
|
|
1591
2368
|
function applyBadgeMods(mods) {
|
|
1592
2369
|
return [
|
|
1593
|
-
|
|
2370
|
+
css$o.root,
|
|
1594
2371
|
buttonCss.root,
|
|
1595
|
-
css$
|
|
1596
|
-
css$
|
|
1597
|
-
|
|
2372
|
+
css$o['size-' + (mods.size || defaultSize$4)],
|
|
2373
|
+
css$o['fill-' + (mods.fill || 'solid')],
|
|
2374
|
+
mods.color && `badge-${(mods.color)}`,
|
|
1598
2375
|
];
|
|
1599
2376
|
}
|
|
1600
2377
|
const Badge = uuiCore.withMods(uuiComponents.Button, applyBadgeMods, (props) => ({
|
|
1601
|
-
dropdownIcon: systemIcons[props.size && mapSize$1[props.size] || defaultSize$
|
|
1602
|
-
clearIcon: systemIcons[props.size && mapSize$1[props.size] || defaultSize$
|
|
2378
|
+
dropdownIcon: systemIcons[props.size && mapSize$1[props.size] || defaultSize$4].foldingArrow,
|
|
2379
|
+
clearIcon: systemIcons[props.size && mapSize$1[props.size] || defaultSize$4].clear,
|
|
1603
2380
|
countPosition: 'left',
|
|
1604
2381
|
}));
|
|
1605
2382
|
|
|
1606
|
-
var css$
|
|
2383
|
+
var css$n = {"typography-header":"Tag_typography-header__F6CIv","typography-block":"Tag_typography-block__3N7TQ","typography-inline":"Tag_typography-inline__Yhikn","typography-16":"Tag_typography-16__Qssa4","typography-14":"Tag_typography-14__k1h7D","typography-12":"Tag_typography-12__ZH87T","typography-promo":"Tag_typography-promo__32H9w Tag_typography-header__F6CIv Tag_typography-block__3N7TQ Tag_typography-inline__Yhikn","root":"Tag_root__610w5","size-18":"Tag_size-18__mPDDm","size-24":"Tag_size-24__VXzbd","size-30":"Tag_size-30__pmOOa","size-36":"Tag_size-36__3O1rY","size-42":"Tag_size-42__20AON","size-48":"Tag_size-48__488DB","typographyHeader":"Tag_typography-header__F6CIv","typographyBlock":"Tag_typography-block__3N7TQ","typographyInline":"Tag_typography-inline__Yhikn","typography16":"Tag_typography-16__Qssa4","typography14":"Tag_typography-14__k1h7D","typography12":"Tag_typography-12__ZH87T","typographyPromo":"Tag_typography-promo__32H9w Tag_typography-header__F6CIv Tag_typography-block__3N7TQ Tag_typography-inline__Yhikn","size18":"Tag_size-18__mPDDm","size24":"Tag_size-24__VXzbd","size30":"Tag_size-30__pmOOa","size36":"Tag_size-36__3O1rY","size42":"Tag_size-42__20AON","size48":"Tag_size-48__488DB"};
|
|
1607
2384
|
|
|
1608
|
-
const defaultSize$
|
|
2385
|
+
const defaultSize$3 = '36';
|
|
1609
2386
|
const mapSize = {
|
|
1610
2387
|
'48': '48',
|
|
1611
2388
|
'42': '48',
|
|
@@ -1616,27 +2393,24 @@ const mapSize = {
|
|
|
1616
2393
|
};
|
|
1617
2394
|
function applyTagMods(mods) {
|
|
1618
2395
|
return [
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
css$4['size-' + (mods.size || defaultSize$2)],
|
|
1622
|
-
css$4.root,
|
|
2396
|
+
css$n['size-' + (mods.size || defaultSize$3)],
|
|
2397
|
+
css$n.root,
|
|
1623
2398
|
];
|
|
1624
2399
|
}
|
|
1625
2400
|
const Tag = uuiCore.withMods(uuiComponents.Button, applyTagMods, (props) => ({
|
|
1626
|
-
dropdownIcon: systemIcons[mapSize[props.size] || defaultSize$
|
|
1627
|
-
clearIcon: systemIcons[mapSize[props.size] || defaultSize$
|
|
2401
|
+
dropdownIcon: systemIcons[mapSize[props.size] || defaultSize$3].foldingArrow,
|
|
2402
|
+
clearIcon: systemIcons[mapSize[props.size] || defaultSize$3].clear,
|
|
1628
2403
|
}));
|
|
1629
2404
|
|
|
1630
|
-
var css$
|
|
2405
|
+
var css$m = {"typography-header":"PickerToggler_typography-header__Wl3bF","typography-block":"PickerToggler_typography-block__ujo3e","typography-inline":"PickerToggler_typography-inline__R6g9F","typography-16":"PickerToggler_typography-16__umTFU","typography-14":"PickerToggler_typography-14__3RWdh","typography-12":"PickerToggler_typography-12__PnVPR","typography-promo":"PickerToggler_typography-promo__PFoH7 PickerToggler_typography-header__Wl3bF PickerToggler_typography-block__ujo3e PickerToggler_typography-inline__R6g9F","root":"PickerToggler_root__G7gEl","mode-form":"PickerToggler_mode-form__OlTHW","mode-cell":"PickerToggler_mode-cell__hBg0t","size-24":"PickerToggler_size-24__MUg2U","size-30":"PickerToggler_size-30__K0XU-","size-36":"PickerToggler_size-36__NqG3q","size-42":"PickerToggler_size-42__xm0IS","size-48":"PickerToggler_size-48__DGIi9","typographyHeader":"PickerToggler_typography-header__Wl3bF","typographyBlock":"PickerToggler_typography-block__ujo3e","typographyInline":"PickerToggler_typography-inline__R6g9F","typography16":"PickerToggler_typography-16__umTFU","typography14":"PickerToggler_typography-14__3RWdh","typography12":"PickerToggler_typography-12__PnVPR","typographyPromo":"PickerToggler_typography-promo__PFoH7 PickerToggler_typography-header__Wl3bF PickerToggler_typography-block__ujo3e PickerToggler_typography-inline__R6g9F","modeForm":"PickerToggler_mode-form__OlTHW","modeCell":"PickerToggler_mode-cell__hBg0t","size24":"PickerToggler_size-24__MUg2U","size30":"PickerToggler_size-30__K0XU-","size36":"PickerToggler_size-36__NqG3q","size42":"PickerToggler_size-42__xm0IS","size48":"PickerToggler_size-48__DGIi9"};
|
|
1631
2406
|
|
|
1632
|
-
const defaultSize$
|
|
2407
|
+
const defaultSize$2 = '36';
|
|
1633
2408
|
const defaultMode = exports.EditMode.FORM;
|
|
1634
2409
|
function applyPickerTogglerMods(mods) {
|
|
1635
2410
|
return [
|
|
1636
|
-
|
|
1637
|
-
css$
|
|
1638
|
-
css$
|
|
1639
|
-
css$3['mode-' + (mods.mode || defaultMode)],
|
|
2411
|
+
css$m.root,
|
|
2412
|
+
css$m['size-' + (mods.size || defaultSize$2)],
|
|
2413
|
+
css$m['mode-' + (mods.mode || defaultMode)],
|
|
1640
2414
|
];
|
|
1641
2415
|
}
|
|
1642
2416
|
function PickerTogglerComponent(props, ref) {
|
|
@@ -1669,18 +2443,19 @@ function PickerTogglerComponent(props, ref) {
|
|
|
1669
2443
|
};
|
|
1670
2444
|
const renderItem = (row) => {
|
|
1671
2445
|
var _a;
|
|
1672
|
-
return (React__namespace.createElement(Tag, { key: row.
|
|
1673
|
-
|
|
2446
|
+
return (React__namespace.createElement(Tag, { key: row.rowKey, caption: getCaption(row), tabIndex: -1, size: props.size ? getPickerTogglerButtonSize(props.size) : '30', onClear: e => {
|
|
2447
|
+
var _a;
|
|
2448
|
+
(_a = row.onCheck) === null || _a === void 0 ? void 0 : _a.call(row, row);
|
|
1674
2449
|
e.stopPropagation();
|
|
1675
2450
|
}, isDisabled: props.isDisabled || props.isReadonly || ((_a = row === null || row === void 0 ? void 0 : row.checkbox) === null || _a === void 0 ? void 0 : _a.isDisabled) }));
|
|
1676
2451
|
};
|
|
1677
|
-
return (React__namespace.createElement(uuiComponents.PickerToggler, Object.assign({}, props, { ref: ref, cx: [applyPickerTogglerMods(props), props.cx], renderItem: !!props.renderItem ? props.renderItem : renderItem, getName: (item) => props.getName ? props.getName(item) : item, cancelIcon: systemIcons[props.size || defaultSize$
|
|
2452
|
+
return (React__namespace.createElement(uuiComponents.PickerToggler, Object.assign({}, props, { ref: ref, cx: [applyPickerTogglerMods(props), props.cx], renderItem: !!props.renderItem ? props.renderItem : renderItem, getName: (item) => props.getName ? props.getName(item) : item, cancelIcon: systemIcons[props.size || defaultSize$2].clear, dropdownIcon: systemIcons[props.size || defaultSize$2].foldingArrow })));
|
|
1678
2453
|
}
|
|
1679
2454
|
const PickerToggler = React__namespace.forwardRef(PickerTogglerComponent);
|
|
1680
2455
|
|
|
1681
|
-
var css$
|
|
2456
|
+
var css$l = {"root":"PickerItem_root__m-i2g","multiline-vertical-padding-24":"PickerItem_multiline-vertical-padding-24__ivzzQ","multiline-vertical-padding-30":"PickerItem_multiline-vertical-padding-30__tBEW-","multiline-vertical-padding-36":"PickerItem_multiline-vertical-padding-36__NpueM","multiline-vertical-padding-42":"PickerItem_multiline-vertical-padding-42__UjLpR","multiline-vertical-padding-48":"PickerItem_multiline-vertical-padding-48__65Jdv","text":"PickerItem_text__k9Jsu","multilineVerticalPadding24":"PickerItem_multiline-vertical-padding-24__ivzzQ","multilineVerticalPadding30":"PickerItem_multiline-vertical-padding-30__tBEW-","multilineVerticalPadding36":"PickerItem_multiline-vertical-padding-36__NpueM","multilineVerticalPadding42":"PickerItem_multiline-vertical-padding-42__UjLpR","multilineVerticalPadding48":"PickerItem_multiline-vertical-padding-48__65Jdv"};
|
|
1682
2457
|
|
|
1683
|
-
const defaultSize = '36';
|
|
2458
|
+
const defaultSize$1 = '36';
|
|
1684
2459
|
class PickerItem extends React__namespace.Component {
|
|
1685
2460
|
constructor() {
|
|
1686
2461
|
super(...arguments);
|
|
@@ -1689,22 +2464,23 @@ class PickerItem extends React__namespace.Component {
|
|
|
1689
2464
|
};
|
|
1690
2465
|
}
|
|
1691
2466
|
render() {
|
|
1692
|
-
const { size, avatarUrl, title, subtitle, isLoading, isDisabled } = this.props;
|
|
1693
|
-
const itemSize = size && size !== 'none' ? size : defaultSize;
|
|
2467
|
+
const { size, avatarUrl, title, subtitle, isLoading, isDisabled, icon } = this.props;
|
|
2468
|
+
const itemSize = size && size !== 'none' ? size : defaultSize$1;
|
|
1694
2469
|
const isMultiline = !!(title && subtitle);
|
|
1695
|
-
return (React__namespace.createElement(FlexCell, { width: 'auto', cx: css$
|
|
1696
|
-
React__namespace.createElement(FlexRow, { size: itemSize, cx: isMultiline && css$
|
|
2470
|
+
return (React__namespace.createElement(FlexCell, { width: 'auto', cx: css$l.root },
|
|
2471
|
+
React__namespace.createElement(FlexRow, { size: itemSize, cx: isMultiline && css$l[`multiline-vertical-padding-${itemSize}`], spacing: '12' },
|
|
1697
2472
|
avatarUrl && React__namespace.createElement(Avatar, { isLoading: isLoading, img: avatarUrl, size: this.getAvatarSize(itemSize, isMultiline).toString() }),
|
|
2473
|
+
icon && React__namespace.createElement(uuiComponents.IconContainer, { icon: icon }),
|
|
1698
2474
|
React__namespace.createElement(FlexCell, { width: 'auto' },
|
|
1699
|
-
title && React__namespace.createElement(Text, { size: itemSize, cx: css$
|
|
1700
|
-
subtitle && React__namespace.createElement(Text, { size: itemSize, color: 'disabled', cx: css$
|
|
2475
|
+
title && React__namespace.createElement(Text, { size: itemSize, cx: css$l.text, color: isDisabled ? 'disabled' : 'primary' }, isLoading ? React__namespace.createElement(TextPlaceholder, { wordsCount: 2 }) : title),
|
|
2476
|
+
subtitle && React__namespace.createElement(Text, { size: itemSize, color: 'disabled', cx: css$l.text }, isLoading ? React__namespace.createElement(TextPlaceholder, { wordsCount: 2 }) : subtitle)))));
|
|
1701
2477
|
}
|
|
1702
2478
|
}
|
|
1703
2479
|
|
|
1704
|
-
var css$
|
|
2480
|
+
var css$k = {"typography-header":"PickerInput_typography-header__pZmu4","typography-block":"PickerInput_typography-block__MMlH6","typography-inline":"PickerInput_typography-inline__3Z1Fw","typography-16":"PickerInput_typography-16__58rbi","typography-14":"PickerInput_typography-14__CCnu9","typography-12":"PickerInput_typography-12__T51Lb","typography-promo":"PickerInput_typography-promo__tcN6K PickerInput_typography-header__pZmu4 PickerInput_typography-block__MMlH6 PickerInput_typography-inline__3Z1Fw","panel":"PickerInput_panel__0GHsI","footer-wrapper":"PickerInput_footer-wrapper__hMVx6","footer-size-24":"PickerInput_footer-size-24__X1s8w","footer-size-30":"PickerInput_footer-size-30__2kxYO","footer-size-36":"PickerInput_footer-size-36__xEFus","footer-size-42":"PickerInput_footer-size-42__q6lln","footer-size-48":"PickerInput_footer-size-48__uP99C","typographyHeader":"PickerInput_typography-header__pZmu4","typographyBlock":"PickerInput_typography-block__MMlH6","typographyInline":"PickerInput_typography-inline__3Z1Fw","typography16":"PickerInput_typography-16__58rbi","typography14":"PickerInput_typography-14__CCnu9","typography12":"PickerInput_typography-12__T51Lb","typographyPromo":"PickerInput_typography-promo__tcN6K PickerInput_typography-header__pZmu4 PickerInput_typography-block__MMlH6 PickerInput_typography-inline__3Z1Fw","footerWrapper":"PickerInput_footer-wrapper__hMVx6","footerSize24":"PickerInput_footer-size-24__X1s8w","footerSize30":"PickerInput_footer-size-30__2kxYO","footerSize36":"PickerInput_footer-size-36__xEFus","footerSize42":"PickerInput_footer-size-42__q6lln","footerSize48":"PickerInput_footer-size-48__uP99C"};
|
|
1705
2481
|
|
|
1706
|
-
const pickerHeight = 300;
|
|
1707
|
-
const pickerWidth = 360;
|
|
2482
|
+
const pickerHeight$1 = 300;
|
|
2483
|
+
const pickerWidth$1 = 360;
|
|
1708
2484
|
class PickerInput extends uuiComponents.PickerInputBase {
|
|
1709
2485
|
constructor() {
|
|
1710
2486
|
super(...arguments);
|
|
@@ -1712,14 +2488,19 @@ class PickerInput extends uuiComponents.PickerInputBase {
|
|
|
1712
2488
|
return React__namespace.default.createElement(PickerItem, Object.assign({ title: this.getName(item), size: this.getRowSize() }, rowProps));
|
|
1713
2489
|
};
|
|
1714
2490
|
this.renderRow = (rowProps) => {
|
|
1715
|
-
return this.props.renderRow ? this.props.renderRow(rowProps, this.state.dataSourceState) : (React__namespace.default.createElement(DataPickerRow, Object.assign({}, rowProps, { key: rowProps.rowKey, borderBottom: 'none', size: this.getRowSize(),
|
|
2491
|
+
return this.props.renderRow ? this.props.renderRow(rowProps, this.state.dataSourceState) : (React__namespace.default.createElement(DataPickerRow, Object.assign({}, rowProps, { key: rowProps.rowKey, borderBottom: 'none', size: this.getRowSize(), padding: this.props.editMode === 'modal' ? '24' : '12', renderItem: this.renderItem })));
|
|
1716
2492
|
};
|
|
1717
2493
|
}
|
|
1718
2494
|
toggleModalOpening(opened) {
|
|
1719
|
-
const _a = this.props, restProps = __rest(_a, ["renderFooter"]);
|
|
1720
|
-
this.context.uuiModals.show(props => React__namespace.default.createElement(PickerModal, Object.assign({}, restProps, props, { caption: this.getPlaceholder(), initialValue: this.props.value, renderRow: this.renderRow, selectionMode: this.props.selectionMode, valueType: this.props.valueType })))
|
|
1721
|
-
.then(newSelection =>
|
|
1722
|
-
.
|
|
2495
|
+
const _a = this.props, { renderFooter, rawProps } = _a, restProps = __rest(_a, ["renderFooter", "rawProps"]);
|
|
2496
|
+
this.context.uuiModals.show(props => React__namespace.default.createElement(PickerModal, Object.assign({}, restProps, { rawProps: rawProps === null || rawProps === void 0 ? void 0 : rawProps.body }, props, { caption: this.getPlaceholder(), initialValue: this.props.value, renderRow: this.renderRow, selectionMode: this.props.selectionMode, valueType: this.props.valueType })))
|
|
2497
|
+
.then(newSelection => {
|
|
2498
|
+
this.handleSelectionValueChange(newSelection);
|
|
2499
|
+
this.returnFocusToInput();
|
|
2500
|
+
})
|
|
2501
|
+
.catch(() => {
|
|
2502
|
+
this.returnFocusToInput();
|
|
2503
|
+
});
|
|
1723
2504
|
}
|
|
1724
2505
|
getRowSize() {
|
|
1725
2506
|
return uuiCore.isMobile()
|
|
@@ -1746,16 +2527,23 @@ class PickerInput extends uuiComponents.PickerInputBase {
|
|
|
1746
2527
|
}
|
|
1747
2528
|
renderBody(props, rows) {
|
|
1748
2529
|
const renderedDataRows = rows.map((props) => this.renderRow(props));
|
|
1749
|
-
const maxHeight = uuiCore.isMobile() ? document.documentElement.clientHeight : (this.props.dropdownHeight || pickerHeight);
|
|
1750
|
-
const minBodyWidth = uuiCore.isMobile() ? document.documentElement.clientWidth : (this.props.minBodyWidth || pickerWidth);
|
|
1751
|
-
return (React__namespace.default.createElement(Panel, { shadow: true, style: { width: props.togglerWidth > minBodyWidth ? props.togglerWidth : minBodyWidth }, rawProps: { tabIndex: -1 }, cx: [css$
|
|
1752
|
-
React__namespace.default.createElement(MobileDropdownWrapper, { title: this.props.entityName, close: () =>
|
|
1753
|
-
|
|
2530
|
+
const maxHeight = uuiCore.isMobile() ? document.documentElement.clientHeight : (this.props.dropdownHeight || pickerHeight$1);
|
|
2531
|
+
const minBodyWidth = uuiCore.isMobile() ? document.documentElement.clientWidth : (this.props.minBodyWidth || pickerWidth$1);
|
|
2532
|
+
return (React__namespace.default.createElement(Panel, { shadow: true, style: { width: props.togglerWidth > minBodyWidth ? props.togglerWidth : minBodyWidth }, rawProps: { tabIndex: -1 }, cx: [css$k.panel, uuiCore.uuiMarkers.lockFocus] },
|
|
2533
|
+
React__namespace.default.createElement(MobileDropdownWrapper, { title: this.props.entityName, close: () => {
|
|
2534
|
+
this.returnFocusToInput();
|
|
2535
|
+
this.toggleBodyOpening(false);
|
|
2536
|
+
} },
|
|
2537
|
+
React__namespace.default.createElement(DataPickerBody, Object.assign({}, props, { rows: renderedDataRows, maxHeight: maxHeight, searchSize: this.props.size, editMode: 'dropdown', selectionMode: this.props.selectionMode, renderNotFound: this.props.renderNotFound ?
|
|
2538
|
+
() => this.props.renderNotFound({
|
|
2539
|
+
search: this.state.dataSourceState.search,
|
|
2540
|
+
onClose: () => this.toggleBodyOpening(false),
|
|
2541
|
+
}) : undefined })),
|
|
1754
2542
|
!this.isSingleSelect() && this.renderFooter())));
|
|
1755
2543
|
}
|
|
1756
2544
|
}
|
|
1757
2545
|
|
|
1758
|
-
var css = {"row":"PickerListItem_row__1Uzrn"};
|
|
2546
|
+
var css$j = {"row":"PickerListItem_row__1Uzrn"};
|
|
1759
2547
|
|
|
1760
2548
|
class PickerListItem extends React__namespace.default.Component {
|
|
1761
2549
|
render() {
|
|
@@ -1773,7 +2561,7 @@ class PickerListItem extends React__namespace.default.Component {
|
|
|
1773
2561
|
else {
|
|
1774
2562
|
component = React__namespace.default.createElement(RadioInput, { label: label, value: this.props.isSelected, isDisabled: this.props.isLoading || !this.props.isSelectable, onValueChange: () => this.props.onSelect(this.props) });
|
|
1775
2563
|
}
|
|
1776
|
-
return React__namespace.default.createElement("div", { className: css.row }, component);
|
|
2564
|
+
return React__namespace.default.createElement("div", { className: css$j.row }, component);
|
|
1777
2565
|
}
|
|
1778
2566
|
}
|
|
1779
2567
|
|
|
@@ -1815,42 +2603,1080 @@ class PickerList extends uuiComponents.PickerListBase {
|
|
|
1815
2603
|
}
|
|
1816
2604
|
PickerList.contextType = uuiCore.UuiContext;
|
|
1817
2605
|
|
|
2606
|
+
var css$i = {"typography-header":"FilterPanelItemToggler_typography-header__nwnk9","typography-block":"FilterPanelItemToggler_typography-block__RS98Q","typography-inline":"FilterPanelItemToggler_typography-inline__GBz0E","typography-16":"FilterPanelItemToggler_typography-16__ilpGd","typography-14":"FilterPanelItemToggler_typography-14__O2RUd","typography-12":"FilterPanelItemToggler_typography-12__kvTGV","typography-promo":"FilterPanelItemToggler_typography-promo__6cloV FilterPanelItemToggler_typography-header__nwnk9 FilterPanelItemToggler_typography-block__RS98Q FilterPanelItemToggler_typography-inline__GBz0E","root":"FilterPanelItemToggler_root__KIGYZ","title-wrapper":"FilterPanelItemToggler_title-wrapper__hrBtt","title":"FilterPanelItemToggler_title__wECIj","text-wrapper":"FilterPanelItemToggler_text-wrapper__lYOV6","selection":"FilterPanelItemToggler_selection__4HBx1","postfix":"FilterPanelItemToggler_postfix__Sz2ir","selected":"FilterPanelItemToggler_selected__97jlL","typographyHeader":"FilterPanelItemToggler_typography-header__nwnk9","typographyBlock":"FilterPanelItemToggler_typography-block__RS98Q","typographyInline":"FilterPanelItemToggler_typography-inline__GBz0E","typography16":"FilterPanelItemToggler_typography-16__ilpGd","typography14":"FilterPanelItemToggler_typography-14__O2RUd","typography12":"FilterPanelItemToggler_typography-12__kvTGV","typographyPromo":"FilterPanelItemToggler_typography-promo__6cloV FilterPanelItemToggler_typography-header__nwnk9 FilterPanelItemToggler_typography-block__RS98Q FilterPanelItemToggler_typography-inline__GBz0E","titleWrapper":"FilterPanelItemToggler_title-wrapper__hrBtt","textWrapper":"FilterPanelItemToggler_text-wrapper__lYOV6"};
|
|
2607
|
+
|
|
2608
|
+
const defaultSize = "36";
|
|
2609
|
+
const FilterPanelItemToggler = React__namespace.forwardRef((props, ref) => {
|
|
2610
|
+
const togglerPickerOpened = (e) => {
|
|
2611
|
+
var _a;
|
|
2612
|
+
if (props.isDisabled)
|
|
2613
|
+
return;
|
|
2614
|
+
e.preventDefault();
|
|
2615
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
2616
|
+
};
|
|
2617
|
+
const getTitle = props.predicateName ? `${props.title} ${props.predicateName}` : `${props.title}:`;
|
|
2618
|
+
return (React__namespace.createElement(uuiComponents.FlexRow, Object.assign({}, props, { rawProps: { style: { maxWidth: `${(props.maxWidth ? (props.maxWidth + 'px') : 'auto')}` } }, cx: cx__default.default(css$i.root, uuiCore.uuiElement.inputBox, uuiCore.uuiMarkers.clickable, props.isOpen && uuiCore.uuiMod.opened, ["size-" + (props.size || defaultSize)], props.cx), onClick: togglerPickerOpened, ref: ref }),
|
|
2619
|
+
React__namespace.createElement(uuiComponents.FlexRow, { cx: css$i.titleWrapper },
|
|
2620
|
+
React__namespace.createElement(Text, { cx: css$i.title }, getTitle),
|
|
2621
|
+
React__namespace.createElement("div", { className: css$i.textWrapper },
|
|
2622
|
+
React__namespace.createElement(Text, { color: "brand", cx: css$i.selection }, props.selection),
|
|
2623
|
+
props.postfix && React__namespace.createElement(Text, { color: "brand", cx: css$i.postfix }, props.postfix))),
|
|
2624
|
+
!props.isDisabled &&
|
|
2625
|
+
React__namespace.createElement(uuiComponents.IconContainer, { icon: systemIcons[props.size || defaultSize].foldingArrow, flipY: props.isOpen, cx: "uui-icon-dropdown" })));
|
|
2626
|
+
});
|
|
2627
|
+
|
|
2628
|
+
var css$h = {"typography-header":"FilterPickerBody_typography-header__2k2Z8","typography-block":"FilterPickerBody_typography-block__IVJqu","typography-inline":"FilterPickerBody_typography-inline__mBxPJ","typography-16":"FilterPickerBody_typography-16__dtP5r","typography-14":"FilterPickerBody_typography-14__HZiqg","typography-12":"FilterPickerBody_typography-12__w8xeY","typography-promo":"FilterPickerBody_typography-promo__S9Gyx FilterPickerBody_typography-header__2k2Z8 FilterPickerBody_typography-block__IVJqu FilterPickerBody_typography-inline__mBxPJ","footer-wrapper":"FilterPickerBody_footer-wrapper__-CvZO","typographyHeader":"FilterPickerBody_typography-header__2k2Z8","typographyBlock":"FilterPickerBody_typography-block__IVJqu","typographyInline":"FilterPickerBody_typography-inline__mBxPJ","typography16":"FilterPickerBody_typography-16__dtP5r","typography14":"FilterPickerBody_typography-14__HZiqg","typography12":"FilterPickerBody_typography-12__w8xeY","typographyPromo":"FilterPickerBody_typography-promo__S9Gyx FilterPickerBody_typography-header__2k2Z8 FilterPickerBody_typography-block__IVJqu FilterPickerBody_typography-inline__mBxPJ","footerWrapper":"FilterPickerBody_footer-wrapper__-CvZO"};
|
|
2629
|
+
|
|
2630
|
+
const pickerHeight = 300;
|
|
2631
|
+
const pickerWidth = 360;
|
|
2632
|
+
class FilterPickerBody extends uuiComponents.PickerInputBase {
|
|
2633
|
+
constructor() {
|
|
2634
|
+
super(...arguments);
|
|
2635
|
+
this.renderItem = (item, rowProps) => {
|
|
2636
|
+
return React__namespace.createElement(PickerItem, Object.assign({ title: this.getName(item), size: "36" }, rowProps));
|
|
2637
|
+
};
|
|
2638
|
+
this.onSelect = (row) => {
|
|
2639
|
+
this.props.onClose();
|
|
2640
|
+
this.handleDataSourceValueChange(Object.assign(Object.assign({}, this.state.dataSourceState), { search: '', selectedId: row.id }));
|
|
2641
|
+
};
|
|
2642
|
+
this.renderRow = (rowProps) => {
|
|
2643
|
+
if (rowProps.isSelectable && this.isSingleSelect() && this.props.editMode !== 'modal') {
|
|
2644
|
+
rowProps.onSelect = this.onSelect;
|
|
2645
|
+
}
|
|
2646
|
+
return this.props.renderRow ? this.props.renderRow(rowProps, this.state.dataSourceState) : (React__namespace.createElement(DataPickerRow, Object.assign({}, rowProps, { key: rowProps.rowKey, borderBottom: "none", size: "36", padding: "12", renderItem: this.renderItem })));
|
|
2647
|
+
};
|
|
2648
|
+
this.renderFooter = (isSelectAll) => {
|
|
2649
|
+
if (isSelectAll) {
|
|
2650
|
+
return React__namespace.createElement(DataPickerFooter, Object.assign({}, this.getFooterProps(), { hideShowOnlySelected: this.isSingleSelect(), size: "36" }));
|
|
2651
|
+
}
|
|
2652
|
+
const { clearSelection, view } = this.getFooterProps();
|
|
2653
|
+
const size = uuiCore.isMobile() ? '48' : '36';
|
|
2654
|
+
const hasSelection = view.getSelectedRows().length > 0;
|
|
2655
|
+
const handleKeyDown = (e) => {
|
|
2656
|
+
if (!e.shiftKey && e.key === 'Tab')
|
|
2657
|
+
e.preventDefault();
|
|
2658
|
+
};
|
|
2659
|
+
return (React__namespace.createElement(FlexRow, { padding: "12", cx: cx__default.default(css$h.footerWrapper) },
|
|
2660
|
+
React__namespace.createElement(FlexCell, { width: "auto", alignSelf: "center" },
|
|
2661
|
+
React__namespace.createElement(LinkButton, { isDisabled: !hasSelection, size: size, caption: i18n.pickerInput.clearSelectionButtonSingle, onClick: clearSelection, rawProps: { onKeyDown: handleKeyDown } }))));
|
|
2662
|
+
};
|
|
2663
|
+
}
|
|
2664
|
+
shouldShowBody() {
|
|
2665
|
+
return this.props.isOpen;
|
|
2666
|
+
}
|
|
2667
|
+
toggleModalOpening(opened) {
|
|
2668
|
+
}
|
|
2669
|
+
renderTarget(targetProps) {
|
|
2670
|
+
return React__namespace.createElement("div", null);
|
|
2671
|
+
}
|
|
2672
|
+
renderBody(props, rows) {
|
|
2673
|
+
const renderedDataRows = rows.map(props => this.renderRow(props));
|
|
2674
|
+
const maxHeight = uuiCore.isMobile() ? document.documentElement.clientHeight : (this.props.dropdownHeight || pickerHeight);
|
|
2675
|
+
const minBodyWidth = uuiCore.isMobile() ? document.documentElement.clientWidth : (this.props.minBodyWidth || pickerWidth);
|
|
2676
|
+
return (React__namespace.createElement(Panel, { style: { width: minBodyWidth }, rawProps: { tabIndex: -1 }, cx: [uuiCore.uuiMarkers.lockFocus] },
|
|
2677
|
+
React__namespace.createElement(MobileDropdownWrapper, { title: this.props.entityName, close: () => this.toggleBodyOpening(false) },
|
|
2678
|
+
React__namespace.createElement(DataPickerBody, Object.assign({}, props, { selectionMode: this.props.selectionMode, rows: renderedDataRows, maxHeight: maxHeight, searchSize: "36", editMode: "dropdown", showSearch: true })),
|
|
2679
|
+
this.renderFooter(props.selectAll))));
|
|
2680
|
+
}
|
|
2681
|
+
render() {
|
|
2682
|
+
const rows = this.getRows();
|
|
2683
|
+
return this.renderBody(Object.assign(Object.assign({}, this.getPickerBodyProps(rows)), this.getListProps()), rows);
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
class FilterDataPickerBody extends uuiComponents.BaseDatePicker {
|
|
2688
|
+
constructor() {
|
|
2689
|
+
super(...arguments);
|
|
2690
|
+
this.state = Object.assign(Object.assign({}, super.getValue()), { isOpen: false, inputValue: null });
|
|
2691
|
+
this.renderInput = () => {
|
|
2692
|
+
return null;
|
|
2693
|
+
};
|
|
2694
|
+
this.onToggleHandler = (val) => {
|
|
2695
|
+
this.onToggle(val);
|
|
2696
|
+
this.props.onClose();
|
|
2697
|
+
};
|
|
2698
|
+
this.handleCancel = () => {
|
|
2699
|
+
this.handleValueChange(undefined);
|
|
2700
|
+
this.setState({ inputValue: null, selectedDate: null });
|
|
2701
|
+
};
|
|
2702
|
+
}
|
|
2703
|
+
renderBody() {
|
|
2704
|
+
var _a;
|
|
2705
|
+
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
2706
|
+
React__namespace.default.createElement(FlexRow, { borderBottom: true },
|
|
2707
|
+
React__namespace.default.createElement(DatePickerBody, { filter: this.props.filter, value: this.getValue(), setSelectedDate: this.setSelectedDate, setDisplayedDateAndView: this.setDisplayedDateAndView, changeIsOpen: this.onToggleHandler, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.body })),
|
|
2708
|
+
React__namespace.default.createElement(FlexCell, { alignSelf: "stretch" },
|
|
2709
|
+
React__namespace.default.createElement(FlexRow, { padding: "24", vPadding: "12" },
|
|
2710
|
+
React__namespace.default.createElement(Text, null, this.state.selectedDate ? dayjs__default.default(this.state.selectedDate).format('MMM DD, YYYY') : ''),
|
|
2711
|
+
React__namespace.default.createElement(FlexSpacer, null),
|
|
2712
|
+
React__namespace.default.createElement(LinkButton, { isDisabled: !this.state.selectedDate, caption: i18n.filterToolbar.datePicker.clearCaption, onClick: this.handleCancel })))));
|
|
2713
|
+
}
|
|
2714
|
+
render() {
|
|
2715
|
+
return this.renderBody();
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
|
|
2719
|
+
var css$g = {"typography-header":"FilterRangeDatePickerBody_typography-header__HGaXO","typography-block":"FilterRangeDatePickerBody_typography-block__xPG--","typography-inline":"FilterRangeDatePickerBody_typography-inline__M3AvG","typography-16":"FilterRangeDatePickerBody_typography-16__gUKHq","typography-14":"FilterRangeDatePickerBody_typography-14__Cf-Is","typography-12":"FilterRangeDatePickerBody_typography-12__gG1-W","typography-promo":"FilterRangeDatePickerBody_typography-promo__ENzVq FilterRangeDatePickerBody_typography-header__HGaXO FilterRangeDatePickerBody_typography-block__xPG-- FilterRangeDatePickerBody_typography-inline__M3AvG","date-input":"FilterRangeDatePickerBody_date-input__5E3aM","size-24":"FilterRangeDatePickerBody_size-24__tTZkD","size-30":"FilterRangeDatePickerBody_size-30__YcAKz","size-36":"FilterRangeDatePickerBody_size-36__On-Tz","size-42":"FilterRangeDatePickerBody_size-42__Qe9fl","size-48":"FilterRangeDatePickerBody_size-48__5yljc","date-input-group":"FilterRangeDatePickerBody_date-input-group__cYRz6","separator":"FilterRangeDatePickerBody_separator__Txi2W","mode-form":"FilterRangeDatePickerBody_mode-form__V4zoN","mode-cell":"FilterRangeDatePickerBody_mode-cell__RA5Pu","typographyHeader":"FilterRangeDatePickerBody_typography-header__HGaXO","typographyBlock":"FilterRangeDatePickerBody_typography-block__xPG--","typographyInline":"FilterRangeDatePickerBody_typography-inline__M3AvG","typography16":"FilterRangeDatePickerBody_typography-16__gUKHq","typography14":"FilterRangeDatePickerBody_typography-14__Cf-Is","typography12":"FilterRangeDatePickerBody_typography-12__gG1-W","typographyPromo":"FilterRangeDatePickerBody_typography-promo__ENzVq FilterRangeDatePickerBody_typography-header__HGaXO FilterRangeDatePickerBody_typography-block__xPG-- FilterRangeDatePickerBody_typography-inline__M3AvG","dateInput":"FilterRangeDatePickerBody_date-input__5E3aM","size24":"FilterRangeDatePickerBody_size-24__tTZkD","size30":"FilterRangeDatePickerBody_size-30__YcAKz","size36":"FilterRangeDatePickerBody_size-36__On-Tz","size42":"FilterRangeDatePickerBody_size-42__Qe9fl","size48":"FilterRangeDatePickerBody_size-48__5yljc","dateInputGroup":"FilterRangeDatePickerBody_date-input-group__cYRz6","modeForm":"FilterRangeDatePickerBody_mode-form__V4zoN","modeCell":"FilterRangeDatePickerBody_mode-cell__RA5Pu"};
|
|
2720
|
+
|
|
2721
|
+
class FilterRangeDatePickerBody extends uuiComponents.BaseRangeDatePicker {
|
|
2722
|
+
constructor() {
|
|
2723
|
+
super(...arguments);
|
|
2724
|
+
this.state = Object.assign(Object.assign({}, super.getInitialState()), { inFocus: 'from' });
|
|
2725
|
+
this.renderInput = () => {
|
|
2726
|
+
return null;
|
|
2727
|
+
};
|
|
2728
|
+
}
|
|
2729
|
+
renderBody() {
|
|
2730
|
+
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2731
|
+
React__namespace.createElement(FlexRow, { borderBottom: true },
|
|
2732
|
+
React__namespace.createElement(RangeDatePickerBody, { value: this.getValue(), onValueChange: this.onRangeChange, filter: this.props.filter, focusPart: this.state.inFocus, changeIsOpen: this.toggleOpening })),
|
|
2733
|
+
React__namespace.createElement(FlexCell, { alignSelf: "stretch" },
|
|
2734
|
+
React__namespace.createElement(FlexRow, { padding: "24", vPadding: "12" },
|
|
2735
|
+
React__namespace.createElement("div", { className: cx__default.default(css$g.dateInputGroup, this.state.inFocus && uuiCore.uuiMod.focus) },
|
|
2736
|
+
React__namespace.createElement(TextInput, { icon: systemIcons['30'].calendar, cx: cx__default.default(css$g.dateInput, css$g['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') }),
|
|
2737
|
+
React__namespace.createElement("div", { className: css$g.separator }),
|
|
2738
|
+
React__namespace.createElement(TextInput, { cx: cx__default.default(css$g.dateInput, css$g['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') })),
|
|
2739
|
+
React__namespace.createElement(FlexSpacer, null),
|
|
2740
|
+
React__namespace.createElement(LinkButton, { isDisabled: !this.state.inputValue.from && !this.state.inputValue.to, caption: i18n.pickerModal.clearAllButton, onClick: this.handleCancel })))));
|
|
2741
|
+
}
|
|
2742
|
+
render() {
|
|
2743
|
+
return this.renderBody();
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
|
|
2747
|
+
const FilterNumericBody = (props) => {
|
|
2748
|
+
var _a, _b;
|
|
2749
|
+
const isInRangePredicate = (props === null || props === void 0 ? void 0 : props.selectedPredicate) === 'inRange' || (props === null || props === void 0 ? void 0 : props.selectedPredicate) === 'notInRange';
|
|
2750
|
+
const rangeValueHandler = (type) => (val) => {
|
|
2751
|
+
var _a, _b;
|
|
2752
|
+
const value = props.value;
|
|
2753
|
+
switch (type) {
|
|
2754
|
+
case "from": {
|
|
2755
|
+
props.onValueChange({
|
|
2756
|
+
from: val,
|
|
2757
|
+
to: (_a = value === null || value === void 0 ? void 0 : value.to) !== null && _a !== void 0 ? _a : null,
|
|
2758
|
+
});
|
|
2759
|
+
break;
|
|
2760
|
+
}
|
|
2761
|
+
case "to": {
|
|
2762
|
+
props.onValueChange({
|
|
2763
|
+
from: (_b = value === null || value === void 0 ? void 0 : value.from) !== null && _b !== void 0 ? _b : null,
|
|
2764
|
+
to: val,
|
|
2765
|
+
});
|
|
2766
|
+
break;
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
};
|
|
2770
|
+
const renderFooter = () => {
|
|
2771
|
+
const size = uuiCore.isMobile() ? '48' : '36';
|
|
2772
|
+
const clearSelection = () => {
|
|
2773
|
+
if (isInRangePredicate) {
|
|
2774
|
+
props.onValueChange({ from: null, to: null });
|
|
2775
|
+
}
|
|
2776
|
+
else {
|
|
2777
|
+
props.onValueChange(null);
|
|
2778
|
+
}
|
|
2779
|
+
};
|
|
2780
|
+
const isClearDisabled = typeof props.value !== 'number' && typeof props.value !== 'object';
|
|
2781
|
+
return (React__namespace.default.createElement(FlexRow, { padding: "12" },
|
|
2782
|
+
React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
|
|
2783
|
+
React__namespace.default.createElement(FlexCell, { width: "auto", alignSelf: "center" },
|
|
2784
|
+
React__namespace.default.createElement(LinkButton, { isDisabled: isClearDisabled, size: size, caption: i18n.pickerInput.clearSelectionButtonSingle, onClick: clearSelection }))));
|
|
2785
|
+
};
|
|
2786
|
+
if (isInRangePredicate) {
|
|
2787
|
+
const value = props.value;
|
|
2788
|
+
return (React__namespace.default.createElement("div", null,
|
|
2789
|
+
React__namespace.default.createElement(FlexRow, { padding: "12", vPadding: "24", alignItems: "center", spacing: "12", borderBottom: true },
|
|
2790
|
+
React__namespace.default.createElement(FlexCell, { width: '100%' },
|
|
2791
|
+
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: "30", placeholder: "Min", formatOptions: { maximumFractionDigits: 2 } })),
|
|
2792
|
+
React__namespace.default.createElement(FlexCell, { width: '100%' },
|
|
2793
|
+
React__namespace.default.createElement(NumericInput, { value: (_b = value === null || value === void 0 ? void 0 : value.to) !== null && _b !== void 0 ? _b : null, onValueChange: rangeValueHandler('to'), size: "30", placeholder: "Max", formatOptions: { maximumFractionDigits: 2 } }))),
|
|
2794
|
+
renderFooter()));
|
|
2795
|
+
}
|
|
2796
|
+
return (React__namespace.default.createElement("div", null,
|
|
2797
|
+
React__namespace.default.createElement(FlexRow, { padding: "12", vPadding: "24", alignItems: "center", borderBottom: true },
|
|
2798
|
+
React__namespace.default.createElement(FlexCell, { width: 130 },
|
|
2799
|
+
React__namespace.default.createElement(NumericInput, { value: typeof props.value === 'number' ? props.value : null, onValueChange: props.onValueChange, size: "30", placeholder: "Enter a number", formatOptions: { maximumFractionDigits: 2 } }))),
|
|
2800
|
+
renderFooter()));
|
|
2801
|
+
};
|
|
2802
|
+
|
|
2803
|
+
const FilterItemBody = (props) => {
|
|
2804
|
+
switch (props.type) {
|
|
2805
|
+
case "singlePicker":
|
|
2806
|
+
return (React__namespace.default.createElement(FilterPickerBody, Object.assign({}, props, { selectionMode: "single", valueType: "id" })));
|
|
2807
|
+
case "numeric":
|
|
2808
|
+
return (React__namespace.default.createElement(FilterNumericBody, Object.assign({}, props)));
|
|
2809
|
+
case "multiPicker":
|
|
2810
|
+
return (React__namespace.default.createElement(FilterPickerBody, Object.assign({}, props, { selectionMode: "multi", valueType: "id" })));
|
|
2811
|
+
case "datePicker":
|
|
2812
|
+
return (React__namespace.default.createElement(FilterDataPickerBody, Object.assign({}, props, { format: props.format || "DD/MM/YYYY" })));
|
|
2813
|
+
case "rangeDatePicker":
|
|
2814
|
+
return (React__namespace.default.createElement(FilterRangeDatePickerBody, Object.assign({}, props, { format: props.format || "DD/MM/YYYY", value: props.value || { from: null, to: null } })));
|
|
2815
|
+
}
|
|
2816
|
+
};
|
|
2817
|
+
|
|
2818
|
+
var _path$c;
|
|
2819
|
+
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); }
|
|
2820
|
+
var SvgActionDeleteforever12 = function SvgActionDeleteforever12(props, ref) {
|
|
2821
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
2822
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2823
|
+
width: 12,
|
|
2824
|
+
height: 12,
|
|
2825
|
+
viewBox: "0 0 18 18",
|
|
2826
|
+
ref: ref
|
|
2827
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2828
|
+
fillRule: "evenodd",
|
|
2829
|
+
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"
|
|
2830
|
+
})));
|
|
2831
|
+
};
|
|
2832
|
+
var ForwardRef$d = /*#__PURE__*/React.forwardRef(SvgActionDeleteforever12);
|
|
2833
|
+
|
|
2834
|
+
var css$f = {"typography-header":"FiltersPanelItem_typography-header__cxbkP","typography-block":"FiltersPanelItem_typography-block__AI7VG","typography-inline":"FiltersPanelItem_typography-inline__j90GN","typography-16":"FiltersPanelItem_typography-16__h8TGe","typography-14":"FiltersPanelItem_typography-14__xFk8h","typography-12":"FiltersPanelItem_typography-12__5Pmwi","typography-promo":"FiltersPanelItem_typography-promo__-gtw7 FiltersPanelItem_typography-header__cxbkP FiltersPanelItem_typography-block__AI7VG FiltersPanelItem_typography-inline__j90GN","header":"FiltersPanelItem_header__1Ogc3","removeButton":"FiltersPanelItem_removeButton__ykSMB","typographyHeader":"FiltersPanelItem_typography-header__cxbkP","typographyBlock":"FiltersPanelItem_typography-block__AI7VG","typographyInline":"FiltersPanelItem_typography-inline__j90GN","typography16":"FiltersPanelItem_typography-16__h8TGe","typography14":"FiltersPanelItem_typography-14__xFk8h","typography12":"FiltersPanelItem_typography-12__5Pmwi","typographyPromo":"FiltersPanelItem_typography-promo__-gtw7 FiltersPanelItem_typography-header__cxbkP FiltersPanelItem_typography-block__AI7VG FiltersPanelItem_typography-inline__j90GN"};
|
|
2835
|
+
|
|
2836
|
+
const FiltersToolbarItemImpl = (props) => {
|
|
2837
|
+
const getDefaultPredicate = () => {
|
|
2838
|
+
var _a, _b;
|
|
2839
|
+
if (!props.predicates) {
|
|
2840
|
+
return null;
|
|
2841
|
+
}
|
|
2842
|
+
return Object.keys(props.value || {})[0] || ((_a = props.predicates.find(i => i.isDefault)) === null || _a === void 0 ? void 0 : _a.predicate) || ((_b = props.predicates) === null || _b === void 0 ? void 0 : _b[0].predicate);
|
|
2843
|
+
};
|
|
2844
|
+
const [isOpen, isOpenChange] = React.useState(props.autoFocus);
|
|
2845
|
+
const [predicate, setPredicate] = React.useState(getDefaultPredicate());
|
|
2846
|
+
const predicateName = React__namespace.default.useMemo(() => predicate && props.predicates.find(p => p.predicate === predicate).name, [predicate]);
|
|
2847
|
+
const forceUpdate = uuiCore.useForceUpdate();
|
|
2848
|
+
React.useEffect(() => {
|
|
2849
|
+
if (props.predicates && Object.keys(props.value || {})[0] && Object.keys(props.value || {})[0] !== predicate) {
|
|
2850
|
+
setPredicate(Object.keys(props.value || {})[0]);
|
|
2851
|
+
}
|
|
2852
|
+
}, [props.value]);
|
|
2853
|
+
const onValueChange = React.useCallback((value) => {
|
|
2854
|
+
if (props.predicates) {
|
|
2855
|
+
props.onValueChange({ [props.field]: { [predicate]: value } });
|
|
2856
|
+
}
|
|
2857
|
+
else {
|
|
2858
|
+
props.onValueChange({ [props.field]: value });
|
|
2859
|
+
}
|
|
2860
|
+
}, [props.field, props.onValueChange]);
|
|
2861
|
+
const removeOnclickHandler = () => {
|
|
2862
|
+
props.removeFilter(props.field);
|
|
2863
|
+
};
|
|
2864
|
+
const changePredicate = (val) => {
|
|
2865
|
+
const isInRange = (p) => p === 'inRange' || p === 'notInRange';
|
|
2866
|
+
if (props.type === 'numeric') {
|
|
2867
|
+
let predicateValue = {
|
|
2868
|
+
[props.field]: { [val]: getValue() },
|
|
2869
|
+
};
|
|
2870
|
+
if (isInRange(val) && !isInRange(predicate)) { // from simple predicate -> to Range
|
|
2871
|
+
predicateValue = { [props.field]: { [val]: { from: null, to: null } } };
|
|
2872
|
+
}
|
|
2873
|
+
else if (!isInRange(val) && isInRange(predicate)) { // from Range -> to simple predicate
|
|
2874
|
+
predicateValue = { [props.field]: { [val]: null } };
|
|
2875
|
+
}
|
|
2876
|
+
props.onValueChange(predicateValue);
|
|
2877
|
+
}
|
|
2878
|
+
else {
|
|
2879
|
+
props.onValueChange({ [props.field]: { [val]: getValue() } });
|
|
2880
|
+
}
|
|
2881
|
+
setPredicate(val);
|
|
2882
|
+
};
|
|
2883
|
+
const renderHeader = () => (React__namespace.default.createElement("div", { className: cx__default.default(css$f.header) },
|
|
2884
|
+
props.predicates ? React__namespace.default.createElement(MultiSwitch, { items: props.predicates.map(i => ({ id: i.predicate, caption: i.name })), value: predicate, onValueChange: changePredicate, size: "24" }) : React__namespace.default.createElement(Text, { color: "secondary", fontSize: "12" }, props.title),
|
|
2885
|
+
!(props === null || props === void 0 ? void 0 : props.isAlwaysVisible) && (React__namespace.default.createElement(LinkButton, { cx: css$f.removeButton, caption: i18n.filterToolbar.datePicker.removeCaption, onClick: removeOnclickHandler, size: "24", icon: ForwardRef$d }))));
|
|
2886
|
+
const renderBody = (dropdownProps) => (React__namespace.default.createElement(DropdownContainer, null,
|
|
2887
|
+
React__namespace.default.createElement(Panel, null,
|
|
2888
|
+
renderHeader(),
|
|
2889
|
+
React__namespace.default.createElement(FilterItemBody, Object.assign({}, props, dropdownProps, { selectedPredicate: predicate, value: getValue(), onValueChange: onValueChange })))));
|
|
2890
|
+
const getValue = () => {
|
|
2891
|
+
var _a;
|
|
2892
|
+
return predicate ? (_a = props.value) === null || _a === void 0 ? void 0 : _a[predicate] : props.value;
|
|
2893
|
+
};
|
|
2894
|
+
const getTogglerValue = () => {
|
|
2895
|
+
const currentValue = getValue();
|
|
2896
|
+
const defaultFormat = "MMM DD, YYYY";
|
|
2897
|
+
switch (props.type) {
|
|
2898
|
+
case "multiPicker": {
|
|
2899
|
+
const view = props.dataSource.getView({}, forceUpdate);
|
|
2900
|
+
let postfix = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.length) > 2 ? ` +${(currentValue.length - 2).toString()} ${i18n.filterToolbar.pickerInput.itemsPlaceholder}` : null;
|
|
2901
|
+
let isLoading = false;
|
|
2902
|
+
const selection = currentValue ? currentValue === null || currentValue === void 0 ? void 0 : currentValue.slice(0, 2).map((i) => {
|
|
2903
|
+
const item = view.getById(i, null);
|
|
2904
|
+
isLoading = item.isLoading;
|
|
2905
|
+
return item.isLoading ? React__namespace.default.createElement(TextPlaceholder, null) : (props.getName ? props.getName(item.value) : item.value.name);
|
|
2906
|
+
}) : [i18n.filterToolbar.pickerInput.emptyValueCaption];
|
|
2907
|
+
const selectionText = isLoading ? selection : selection.join(', ');
|
|
2908
|
+
return { selection: selectionText, postfix };
|
|
2909
|
+
}
|
|
2910
|
+
case "numeric": {
|
|
2911
|
+
const isRangePredicate = predicate === 'inRange' || predicate === 'notInRange';
|
|
2912
|
+
const decimalFormat = (val) => uuiCore.getSeparatedValue(val, { maximumFractionDigits: 2 });
|
|
2913
|
+
if ((isRangePredicate && !currentValue) || (!isRangePredicate && !currentValue && currentValue !== 0)) {
|
|
2914
|
+
return { selection: i18n.filterToolbar.pickerInput.emptyValueCaption };
|
|
2915
|
+
}
|
|
2916
|
+
const selection = isRangePredicate
|
|
2917
|
+
? `${(!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.from) && (currentValue === null || currentValue === void 0 ? void 0 : currentValue.from) !== 0) ? 'Min' : decimalFormat(currentValue === null || currentValue === void 0 ? void 0 : currentValue.from)} - ${(!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.to) && (currentValue === null || currentValue === void 0 ? void 0 : currentValue.to) !== 0) ? 'Max' : decimalFormat(currentValue === null || currentValue === void 0 ? void 0 : currentValue.to)}`
|
|
2918
|
+
: `${(!currentValue && currentValue !== 0) ? 'ALL' : decimalFormat(currentValue)}`;
|
|
2919
|
+
return { selection };
|
|
2920
|
+
}
|
|
2921
|
+
case "singlePicker": {
|
|
2922
|
+
const view = props.dataSource.getView({}, forceUpdate);
|
|
2923
|
+
const item = (currentValue !== null && currentValue !== undefined) && view.getById(currentValue, null);
|
|
2924
|
+
if (!item) {
|
|
2925
|
+
return { selection: i18n.filterToolbar.pickerInput.emptyValueCaption };
|
|
2926
|
+
}
|
|
2927
|
+
const selection = item.isLoading ? React__namespace.default.createElement(TextPlaceholder, null) : (props.getName ? props.getName(item.value) : item.value.name);
|
|
2928
|
+
return { selection };
|
|
2929
|
+
}
|
|
2930
|
+
case "datePicker": {
|
|
2931
|
+
return { selection: currentValue ? dayjs__default.default(currentValue).format(props.format || defaultFormat) : i18n.filterToolbar.datePicker.placeholder };
|
|
2932
|
+
}
|
|
2933
|
+
case "rangeDatePicker": {
|
|
2934
|
+
if (!currentValue || (!currentValue.from && !currentValue.to)) {
|
|
2935
|
+
return { selection: i18n.filterToolbar.rangeDatePicker.emptyPickerPlaceholder };
|
|
2936
|
+
}
|
|
2937
|
+
const currentValueFrom = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.from) ? dayjs__default.default(currentValue === null || currentValue === void 0 ? void 0 : currentValue.from).format(props.format || defaultFormat) : i18n.filterToolbar.rangeDatePicker.emptyPlaceholderFrom;
|
|
2938
|
+
const currentValueTo = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.to) ? dayjs__default.default(currentValue === null || currentValue === void 0 ? void 0 : currentValue.to).format(props.format || defaultFormat) : i18n.filterToolbar.rangeDatePicker.emptyPlaceholderTo;
|
|
2939
|
+
const selection = `${currentValueFrom} - ${currentValueTo}`;
|
|
2940
|
+
return { selection };
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
};
|
|
2944
|
+
const renderTarget = (dropdownProps) => (React__namespace.default.createElement(FilterPanelItemToggler, Object.assign({}, dropdownProps, getTogglerValue(), { title: props.title, predicateName: props.value ? predicateName : null, maxWidth: (props.type === 'datePicker' || props.type === 'rangeDatePicker') ? null : '300' })));
|
|
2945
|
+
return (React__namespace.default.createElement(uuiComponents.Dropdown, { renderTarget: renderTarget, renderBody: renderBody, closeBodyOnTogglerHidden: !uuiCore.isMobile(), value: isOpen, onValueChange: isOpenChange, modifiers: [{ name: 'offset', options: { offset: [0, 6] } }] }));
|
|
2946
|
+
};
|
|
2947
|
+
const FiltersPanelItem = React__namespace.default.memo(FiltersToolbarItemImpl);
|
|
2948
|
+
|
|
2949
|
+
var _path$b;
|
|
2950
|
+
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); }
|
|
2951
|
+
var SvgContentPlusBold18 = function SvgContentPlusBold18(props, ref) {
|
|
2952
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
2953
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2954
|
+
width: 18,
|
|
2955
|
+
height: 18,
|
|
2956
|
+
viewBox: "0 0 18 18",
|
|
2957
|
+
ref: ref
|
|
2958
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2959
|
+
d: "M10.5 3h-3v4.5H3v3h4.5V15h3v-4.5H15v-3h-4.5V3z"
|
|
2960
|
+
})));
|
|
2961
|
+
};
|
|
2962
|
+
var ForwardRef$c = /*#__PURE__*/React.forwardRef(SvgContentPlusBold18);
|
|
2963
|
+
|
|
2964
|
+
const normalizeFilterWithPredicates = (filter) => {
|
|
2965
|
+
if (!filter) {
|
|
2966
|
+
return {};
|
|
2967
|
+
}
|
|
2968
|
+
const result = filter;
|
|
2969
|
+
const keys = Object.keys(filter);
|
|
2970
|
+
for (let n = 0; n < keys.length; n++) {
|
|
2971
|
+
const key = keys[n];
|
|
2972
|
+
const filterValue = filter[key];
|
|
2973
|
+
if (filterValue && typeof filterValue === "object") {
|
|
2974
|
+
if ('from' in filterValue && 'to' in filterValue) {
|
|
2975
|
+
continue;
|
|
2976
|
+
}
|
|
2977
|
+
if ('in' in filterValue && (!Array.isArray(filterValue.in) || !filterValue.in.length)) {
|
|
2978
|
+
delete filter[key];
|
|
2979
|
+
}
|
|
2980
|
+
if ('nin' in filterValue && (!Array.isArray(filterValue.nin) || !filterValue.nin.length)) {
|
|
2981
|
+
delete filter[key];
|
|
2982
|
+
}
|
|
2983
|
+
if ('inRange' in filterValue) {
|
|
2984
|
+
if (!filterValue.inRange || (!filterValue.inRange.from && !filterValue.inRange.to)) {
|
|
2985
|
+
delete filter[key];
|
|
2986
|
+
}
|
|
2987
|
+
}
|
|
2988
|
+
if ('notInRange' in filterValue) {
|
|
2989
|
+
if (!filterValue.notInRange.from && !filterValue.notInRange.to) {
|
|
2990
|
+
delete filter[key];
|
|
2991
|
+
}
|
|
2992
|
+
}
|
|
2993
|
+
Object.keys(filterValue).forEach(predicate => {
|
|
2994
|
+
if (filterValue[predicate] === null || filterValue[predicate] === undefined) {
|
|
2995
|
+
delete filter[key];
|
|
2996
|
+
}
|
|
2997
|
+
});
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
return result;
|
|
3001
|
+
};
|
|
3002
|
+
const FiltersToolbarImpl = (props) => {
|
|
3003
|
+
const { filters, tableState, setTableState } = props;
|
|
3004
|
+
const [newFilterId, setNewFilterId] = React.useState(null);
|
|
3005
|
+
const dataSource = uuiCore.useArrayDataSource({
|
|
3006
|
+
items: filters,
|
|
3007
|
+
getId: item => item.field,
|
|
3008
|
+
}, []);
|
|
3009
|
+
const onFiltersChange = (filters) => {
|
|
3010
|
+
var _a;
|
|
3011
|
+
const newConfig = {};
|
|
3012
|
+
const newFilter = {};
|
|
3013
|
+
const sortedOrders = tableState.filtersConfig && sortBy__default.default(tableState.filtersConfig, f => f === null || f === void 0 ? void 0 : f.order);
|
|
3014
|
+
let order = (sortedOrders === null || sortedOrders === void 0 ? void 0 : sortedOrders.length) ? (_a = sortedOrders[sortedOrders.length - 1]) === null || _a === void 0 ? void 0 : _a.order : null;
|
|
3015
|
+
filters.forEach(filter => {
|
|
3016
|
+
var _a, _b;
|
|
3017
|
+
const newOrder = ((_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) || uuiCore.getOrderBetween(order, null);
|
|
3018
|
+
order = newOrder;
|
|
3019
|
+
newConfig[filter.field] = { isVisible: true, order: newOrder };
|
|
3020
|
+
// Remove unselected filters from filter object
|
|
3021
|
+
if (tableState.filter) {
|
|
3022
|
+
newFilter[filter.field] = tableState.filter[filter.field];
|
|
3023
|
+
}
|
|
3024
|
+
});
|
|
3025
|
+
setTableState(Object.assign(Object.assign({}, tableState), { filtersConfig: newConfig, filter: newFilter }));
|
|
3026
|
+
};
|
|
3027
|
+
const handleFilterChange = (newFilter) => {
|
|
3028
|
+
const filter = normalizeFilterWithPredicates(Object.assign(Object.assign({}, tableState.filter), newFilter));
|
|
3029
|
+
setTableState(Object.assign(Object.assign({}, tableState), { filter: filter }));
|
|
3030
|
+
};
|
|
3031
|
+
const removeFilter = (field) => {
|
|
3032
|
+
const filterConfig = Object.assign({}, tableState.filtersConfig);
|
|
3033
|
+
delete filterConfig[field];
|
|
3034
|
+
const filter = Object.assign({}, tableState.filter);
|
|
3035
|
+
delete filter[field];
|
|
3036
|
+
const newTableState = Object.assign(Object.assign({}, tableState), { filtersConfig: filterConfig, filter: filter });
|
|
3037
|
+
setTableState(Object.assign({}, newTableState));
|
|
3038
|
+
};
|
|
3039
|
+
const selectedFilters = React.useMemo(() => {
|
|
3040
|
+
const filtersConfig = tableState.filtersConfig || {};
|
|
3041
|
+
return filters.filter(filter => {
|
|
3042
|
+
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);
|
|
3043
|
+
});
|
|
3044
|
+
}, [tableState.filtersConfig, filters]);
|
|
3045
|
+
const sortedActiveFilters = React.useMemo(() => {
|
|
3046
|
+
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; });
|
|
3047
|
+
}, [filters, tableState.filtersConfig]);
|
|
3048
|
+
const renderAddFilterToggler = React.useCallback((props) => {
|
|
3049
|
+
return React__namespace.default.createElement(Button, { size: "36", onClick: props.onClick, ref: props.ref, caption: i18n.filterToolbar.addCaption, icon: ForwardRef$c, iconPosition: "left", mode: "ghost", color: "primary" });
|
|
3050
|
+
}, []);
|
|
3051
|
+
const getRowOptions = React.useCallback((item) => ({
|
|
3052
|
+
isDisabled: item.isAlwaysVisible,
|
|
3053
|
+
checkbox: {
|
|
3054
|
+
isVisible: true,
|
|
3055
|
+
isDisabled: item.isAlwaysVisible,
|
|
3056
|
+
},
|
|
3057
|
+
}), []);
|
|
3058
|
+
React.useEffect(() => {
|
|
3059
|
+
// Reset new filter id, after first render with autofocus
|
|
3060
|
+
setNewFilterId(null);
|
|
3061
|
+
}, [newFilterId]);
|
|
3062
|
+
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
3063
|
+
sortedActiveFilters.map(f => {
|
|
3064
|
+
var _a;
|
|
3065
|
+
return (React__namespace.default.createElement(uuiComponents.FlexCell, { width: "auto", key: f.field },
|
|
3066
|
+
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 }))));
|
|
3067
|
+
}),
|
|
3068
|
+
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) => { props.onCheck(row); !row.isChecked && setNewFilterId(row.value.field); }, 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 })));
|
|
3069
|
+
};
|
|
3070
|
+
const FiltersPanel = React__namespace.default.memo(FiltersToolbarImpl);
|
|
3071
|
+
|
|
3072
|
+
var css$e = {"divider":"PresetsPanel_divider__jIY7S","dropdownDeleteIcon":"PresetsPanel_dropdownDeleteIcon__58Nc7","presetsWrapper":"PresetsPanel_presetsWrapper__ssv3J","addPresetContainer":"PresetsPanel_addPresetContainer__SLcW-"};
|
|
3073
|
+
|
|
3074
|
+
var css$d = {"preset-dropdown-panel":"PresetActionsDropdown_preset-dropdown-panel__tHjiI","delete-row":"PresetActionsDropdown_delete-row__43HRE","delete-button":"PresetActionsDropdown_delete-button__RZ0Ak","targetOpen":"PresetActionsDropdown_targetOpen__nZyO-","presetDropdownPanel":"PresetActionsDropdown_preset-dropdown-panel__tHjiI","deleteRow":"PresetActionsDropdown_delete-row__43HRE","deleteButton":"PresetActionsDropdown_delete-button__RZ0Ak"};
|
|
3075
|
+
|
|
3076
|
+
var _path$a;
|
|
3077
|
+
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); }
|
|
3078
|
+
var SvgSaveOutline18 = function SvgSaveOutline18(props, ref) {
|
|
3079
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
3080
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3081
|
+
width: 18,
|
|
3082
|
+
height: 18,
|
|
3083
|
+
viewBox: "0 0 18 18",
|
|
3084
|
+
ref: ref
|
|
3085
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3086
|
+
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"
|
|
3087
|
+
})));
|
|
3088
|
+
};
|
|
3089
|
+
var ForwardRef$b = /*#__PURE__*/React.forwardRef(SvgSaveOutline18);
|
|
3090
|
+
|
|
3091
|
+
var _path$9;
|
|
3092
|
+
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); }
|
|
3093
|
+
var SvgContentEditUndo18 = function SvgContentEditUndo18(props, ref) {
|
|
3094
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
3095
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3096
|
+
width: 18,
|
|
3097
|
+
height: 18,
|
|
3098
|
+
viewBox: "0 0 18 18",
|
|
3099
|
+
ref: ref
|
|
3100
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3101
|
+
fillRule: "evenodd",
|
|
3102
|
+
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",
|
|
3103
|
+
clipRule: "evenodd"
|
|
3104
|
+
})));
|
|
3105
|
+
};
|
|
3106
|
+
var ForwardRef$a = /*#__PURE__*/React.forwardRef(SvgContentEditUndo18);
|
|
3107
|
+
|
|
3108
|
+
var _path$8;
|
|
3109
|
+
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); }
|
|
3110
|
+
var SvgActionCopyContent18 = function SvgActionCopyContent18(props, ref) {
|
|
3111
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
3112
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3113
|
+
width: 18,
|
|
3114
|
+
height: 18,
|
|
3115
|
+
viewBox: "0 0 18 18",
|
|
3116
|
+
ref: ref
|
|
3117
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3118
|
+
fillRule: "evenodd",
|
|
3119
|
+
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",
|
|
3120
|
+
clipRule: "evenodd"
|
|
3121
|
+
})));
|
|
3122
|
+
};
|
|
3123
|
+
var ForwardRef$9 = /*#__PURE__*/React.forwardRef(SvgActionCopyContent18);
|
|
3124
|
+
|
|
3125
|
+
var _path$7;
|
|
3126
|
+
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); }
|
|
3127
|
+
var SvgContentEdit18 = function SvgContentEdit18(props, ref) {
|
|
3128
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
3129
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3130
|
+
width: 18,
|
|
3131
|
+
height: 18,
|
|
3132
|
+
viewBox: "0 0 18 18",
|
|
3133
|
+
ref: ref
|
|
3134
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3135
|
+
fillRule: "evenodd",
|
|
3136
|
+
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",
|
|
3137
|
+
clipRule: "evenodd"
|
|
3138
|
+
})));
|
|
3139
|
+
};
|
|
3140
|
+
var ForwardRef$8 = /*#__PURE__*/React.forwardRef(SvgContentEdit18);
|
|
3141
|
+
|
|
3142
|
+
var _path$6;
|
|
3143
|
+
function _extends$7() { _extends$7 = 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$7.apply(this, arguments); }
|
|
3144
|
+
var SvgContentLink18 = function SvgContentLink18(props, ref) {
|
|
3145
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
3146
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3147
|
+
width: 18,
|
|
3148
|
+
height: 18,
|
|
3149
|
+
viewBox: "0 0 18 18",
|
|
3150
|
+
ref: ref
|
|
3151
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3152
|
+
fillRule: "evenodd",
|
|
3153
|
+
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",
|
|
3154
|
+
clipRule: "evenodd"
|
|
3155
|
+
})));
|
|
3156
|
+
};
|
|
3157
|
+
var ForwardRef$7 = /*#__PURE__*/React.forwardRef(SvgContentLink18);
|
|
3158
|
+
|
|
3159
|
+
var _path$5;
|
|
3160
|
+
function _extends$6() { _extends$6 = 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$6.apply(this, arguments); }
|
|
3161
|
+
var SvgActionDeleteforever18 = function SvgActionDeleteforever18(props, ref) {
|
|
3162
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
3163
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3164
|
+
width: 18,
|
|
3165
|
+
height: 18,
|
|
3166
|
+
viewBox: "0 0 18 18",
|
|
3167
|
+
ref: ref
|
|
3168
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3169
|
+
fillRule: "evenodd",
|
|
3170
|
+
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",
|
|
3171
|
+
clipRule: "evenodd"
|
|
3172
|
+
})));
|
|
3173
|
+
};
|
|
3174
|
+
var ForwardRef$6 = /*#__PURE__*/React.forwardRef(SvgActionDeleteforever18);
|
|
3175
|
+
|
|
3176
|
+
const PresetActionsDropdown = (props) => {
|
|
3177
|
+
const { uuiNotifications } = uuiCore.useUuiContext();
|
|
3178
|
+
const copyUrlToClipboard = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
3179
|
+
yield navigator.clipboard.writeText(props.getPresetLink(props.preset));
|
|
3180
|
+
successNotificationHandler('Link copied!');
|
|
3181
|
+
}), []);
|
|
3182
|
+
const saveInCurrent = React.useCallback((preset) => __awaiter(void 0, void 0, void 0, function* () {
|
|
3183
|
+
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 });
|
|
3184
|
+
yield props.updatePreset(newPreset);
|
|
3185
|
+
successNotificationHandler('Changes saved!');
|
|
3186
|
+
}), [props.tableState.filter, props.tableState.columnsConfig, props.tableState.filtersConfig]);
|
|
3187
|
+
const successNotificationHandler = React.useCallback((text) => {
|
|
3188
|
+
uuiNotifications.show((props) => (React__namespace.default.createElement(SuccessNotification, Object.assign({}, props),
|
|
3189
|
+
React__namespace.default.createElement(Text, { size: "36", font: "regular", fontSize: "14" }, text))), { duration: 3 }).catch(() => null);
|
|
3190
|
+
}, []);
|
|
3191
|
+
const saveInCurrentHandler = React.useCallback(() => {
|
|
3192
|
+
saveInCurrent(props.preset);
|
|
3193
|
+
}, [props.preset]);
|
|
3194
|
+
const discardAllChangesHandler = React.useCallback(() => {
|
|
3195
|
+
props.choosePreset(props.preset);
|
|
3196
|
+
}, [props.preset]);
|
|
3197
|
+
const duplicateHandler = React.useCallback(() => {
|
|
3198
|
+
props.duplicatePreset(props.preset);
|
|
3199
|
+
}, [props.preset]);
|
|
3200
|
+
const deleteHandler = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
3201
|
+
yield props.deletePreset(props.preset);
|
|
3202
|
+
}), [props.activePresetId, props.deletePreset, props.preset]);
|
|
3203
|
+
const renderBody = () => {
|
|
3204
|
+
const isReadonlyPreset = props.preset.isReadonly;
|
|
3205
|
+
return (React__namespace.default.createElement(Panel, { shadow: true, cx: css$d.presetDropdownPanel },
|
|
3206
|
+
(props.activePresetId === props.preset.id && props.hasPresetChanged(props.preset)) &&
|
|
3207
|
+
React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
3208
|
+
!isReadonlyPreset && React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-save-in-current` },
|
|
3209
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$l, caption: "Save in current", onClick: saveInCurrentHandler })),
|
|
3210
|
+
React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-save-as-new` },
|
|
3211
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$b, caption: "Save as new", onClick: props.addPreset })),
|
|
3212
|
+
React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-discard`, borderBottom: true },
|
|
3213
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$a, caption: "Discard all changes", onClick: discardAllChangesHandler }))),
|
|
3214
|
+
props.preset.id === props.activePresetId && !isReadonlyPreset && React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-rename` },
|
|
3215
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$8, caption: "Rename", onClick: props.renamePreset })),
|
|
3216
|
+
React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-duplicate` },
|
|
3217
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$9, caption: "Duplicate", onClick: duplicateHandler })),
|
|
3218
|
+
React__namespace.default.createElement(FlexRow, { borderBottom: true, key: `${props.preset.id}-copyLink` },
|
|
3219
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$7, caption: "Copy Link", onClick: copyUrlToClipboard })),
|
|
3220
|
+
!isReadonlyPreset && React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-delete`, cx: css$d.deleteRow },
|
|
3221
|
+
React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$6, caption: "Delete", cx: css$d.deleteButton, onClick: deleteHandler }))));
|
|
3222
|
+
};
|
|
3223
|
+
const renderTarget = React.useCallback((dropdownProps) => {
|
|
3224
|
+
return (React__namespace.default.createElement(IconButton, Object.assign({ cx: dropdownProps.isOpen && css$d.targetOpen, color: props.preset.id === props.activePresetId ? 'info' : 'default' }, dropdownProps, { icon: ForwardRef$m })));
|
|
3225
|
+
}, []);
|
|
3226
|
+
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
3227
|
+
React__namespace.default.createElement(Dropdown, { renderBody: renderBody, renderTarget: renderTarget, placement: "bottom-end", modifiers: [{ name: 'offset', options: { offset: [0, 22] } }] })));
|
|
3228
|
+
};
|
|
3229
|
+
|
|
3230
|
+
var css$c = {"preset-input-cell":"PresetInput_preset-input-cell__PInCC","preset-input":"PresetInput_preset-input__vBBRA","presetInputCell":"PresetInput_preset-input-cell__PInCC","presetInput":"PresetInput_preset-input__vBBRA"};
|
|
3231
|
+
|
|
3232
|
+
const PresetInput = (props) => {
|
|
3233
|
+
var _a;
|
|
3234
|
+
const [presetCaption, setPresetCaption] = React.useState(((_a = props.preset) === null || _a === void 0 ? void 0 : _a.name) || '');
|
|
3235
|
+
const cancelActionHandler = React.useCallback(() => {
|
|
3236
|
+
setPresetCaption('');
|
|
3237
|
+
props.onCancel();
|
|
3238
|
+
}, [props.onCancel]);
|
|
3239
|
+
const acceptActionHandler = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
3240
|
+
if (presetCaption) {
|
|
3241
|
+
yield props.onSuccess(presetCaption);
|
|
3242
|
+
}
|
|
3243
|
+
props.onCancel();
|
|
3244
|
+
}), [presetCaption]);
|
|
3245
|
+
const newPresetOnBlurHandler = React.useCallback(() => {
|
|
3246
|
+
if (presetCaption.length) {
|
|
3247
|
+
return;
|
|
3248
|
+
}
|
|
3249
|
+
props.onCancel();
|
|
3250
|
+
}, [presetCaption.length, props.onCancel]);
|
|
3251
|
+
return (React__namespace.default.createElement(FlexCell, { cx: css$c.presetInputCell, minWidth: 180 },
|
|
3252
|
+
React__namespace.default.createElement(TextInput, { cx: css$c.presetInput, onValueChange: setPresetCaption, value: presetCaption, onCancel: cancelActionHandler, onAccept: acceptActionHandler, onBlur: newPresetOnBlurHandler, autoFocus: true })));
|
|
3253
|
+
};
|
|
3254
|
+
|
|
3255
|
+
var css$b = {"preset":"Preset_preset__aitu-","activePreset":"Preset_activePreset__SFqmD"};
|
|
3256
|
+
|
|
3257
|
+
const Preset = (props) => {
|
|
3258
|
+
const [isRenamePreset, setIsRenamePreset] = React.useState(false);
|
|
3259
|
+
const choosePresetHandler = React.useCallback(() => props.choosePreset(props.preset), [props]);
|
|
3260
|
+
const cancelRenamePreset = React.useCallback(() => {
|
|
3261
|
+
setIsRenamePreset(() => false);
|
|
3262
|
+
}, []);
|
|
3263
|
+
const setPresetForRename = React.useCallback(() => {
|
|
3264
|
+
if (!isRenamePreset) {
|
|
3265
|
+
setIsRenamePreset(() => true);
|
|
3266
|
+
}
|
|
3267
|
+
}, []);
|
|
3268
|
+
const handlePresetRename = React.useCallback((name) => {
|
|
3269
|
+
const newPreset = Object.assign(Object.assign({}, props.preset), { name: name });
|
|
3270
|
+
return props.updatePreset(newPreset);
|
|
3271
|
+
}, [props.preset]);
|
|
3272
|
+
const isPresetActive = props.activePresetId === props.preset.id;
|
|
3273
|
+
return (React__namespace.default.createElement(FlexCell, { key: props.preset.id, alignSelf: 'center', width: 'auto' }, isRenamePreset
|
|
3274
|
+
? React__namespace.default.createElement(PresetInput, { onCancel: cancelRenamePreset, onSuccess: handlePresetRename, preset: props.preset })
|
|
3275
|
+
:
|
|
3276
|
+
React__namespace.default.createElement(TabButton, { caption: props.preset.name, onClick: !isPresetActive && choosePresetHandler, cx: [css$b.preset, isPresetActive && css$b.activePreset], size: "60", withNotify: isPresetActive && props.hasPresetChanged(props.preset), icon: () => React__namespace.default.createElement(PresetActionsDropdown, Object.assign({ renamePreset: setPresetForRename }, props)), iconPosition: "right", isLinkActive: isPresetActive })));
|
|
3277
|
+
};
|
|
3278
|
+
|
|
3279
|
+
const PresetsPanel = (props) => {
|
|
3280
|
+
const [isAddingPreset, setIsAddingPreset] = React.useState(false);
|
|
3281
|
+
const setAddingPreset = React.useCallback(() => {
|
|
3282
|
+
setIsAddingPreset(true);
|
|
3283
|
+
}, []);
|
|
3284
|
+
const cancelAddingPreset = React.useCallback(() => {
|
|
3285
|
+
setIsAddingPreset(false);
|
|
3286
|
+
}, []);
|
|
3287
|
+
const presetApi = __rest(props, ["presets"]);
|
|
3288
|
+
const renderPreset = (preset) => {
|
|
3289
|
+
return (React__namespace.default.createElement(Preset, Object.assign({ key: preset.id, preset: preset, addPreset: setAddingPreset }, presetApi)));
|
|
3290
|
+
};
|
|
3291
|
+
const renderAddPresetButton = React.useCallback(() => {
|
|
3292
|
+
return (React__namespace.default.createElement("div", { key: 'addingPresetBlock', className: css$e.addPresetContainer }, !isAddingPreset ? React__namespace.default.createElement(Button, { size: "36", onClick: setAddingPreset, caption: i18n.presetPanel.addCaption, icon: ForwardRef$c, iconPosition: "left", mode: "ghost", color: "primary" }) :
|
|
3293
|
+
React__namespace.default.createElement(PresetInput, { onCancel: cancelAddingPreset, onSuccess: props.createNewPreset })));
|
|
3294
|
+
}, [isAddingPreset]);
|
|
3295
|
+
const onPresetDropdownSelect = (preset) => {
|
|
3296
|
+
props.choosePreset(preset.preset);
|
|
3297
|
+
props.updatePreset(preset.preset);
|
|
3298
|
+
};
|
|
3299
|
+
const renderMoreButtonDropdown = (item, hiddenItems) => {
|
|
3300
|
+
return (React__namespace.default.createElement(Dropdown, { renderTarget: (props) => React__namespace.default.createElement(FlexRow, null,
|
|
3301
|
+
React__namespace.default.createElement("div", { className: css$e.divider }),
|
|
3302
|
+
React__namespace.default.createElement(Button, Object.assign({ mode: "ghost", color: 'secondary', caption: `${(hiddenItems === null || hiddenItems === void 0 ? void 0 : hiddenItems.length) || ''} more` }, props))), renderBody: () => React__namespace.default.createElement(DropdownContainer, { width: 230 }, hiddenItems.map(item => React__namespace.default.createElement(DropdownMenuButton, { onClick: () => onPresetDropdownSelect(item), caption: item.preset.name, icon: !item.preset.isReadonly && ForwardRef$6, iconPosition: 'right', cx: css$e.dropdownDeleteIcon, onIconClick: !item.preset.isReadonly && (() => props.deletePreset(item.preset)) }))) }));
|
|
3303
|
+
};
|
|
3304
|
+
const getPresetPriority = (preset, index) => {
|
|
3305
|
+
return preset.id === props.activePresetId ? 100499 : 1000 - index;
|
|
3306
|
+
};
|
|
3307
|
+
const getPanelItems = () => {
|
|
3308
|
+
return [
|
|
3309
|
+
...sortBy__default.default(props.presets, (i) => i.order).map((preset, index) => ({ id: preset.id.toString(), render: () => renderPreset(preset), priority: getPresetPriority(preset, index), preset: preset })),
|
|
3310
|
+
{ id: 'collapsedContainer', render: renderMoreButtonDropdown,
|
|
3311
|
+
priority: 100501, collapsedContainer: true,
|
|
3312
|
+
},
|
|
3313
|
+
{ id: 'addPreset', render: renderAddPresetButton, priority: 100501 },
|
|
3314
|
+
];
|
|
3315
|
+
};
|
|
3316
|
+
return (React__namespace.default.createElement(FlexCell, { grow: 1, minWidth: 310 },
|
|
3317
|
+
React__namespace.default.createElement(FlexRow, { size: null, spacing: '12', cx: css$e.presetsWrapper },
|
|
3318
|
+
React__namespace.default.createElement(uuiComponents.AdaptivePanel, { items: getPanelItems() }))));
|
|
3319
|
+
};
|
|
3320
|
+
|
|
3321
|
+
const defaultPredicates = {
|
|
3322
|
+
numeric: [
|
|
3323
|
+
{ predicate: 'eq', name: '=', isDefault: true },
|
|
3324
|
+
{ predicate: 'neq', name: '≠' },
|
|
3325
|
+
{ predicate: 'lte', name: '≤' },
|
|
3326
|
+
{ predicate: 'gte', name: '≥' },
|
|
3327
|
+
{ predicate: 'inRange', name: 'In Range' },
|
|
3328
|
+
],
|
|
3329
|
+
multiPicker: [
|
|
3330
|
+
{ predicate: 'in', name: 'is', isDefault: true },
|
|
3331
|
+
{ predicate: 'nin', name: 'is not' },
|
|
3332
|
+
],
|
|
3333
|
+
rangeDatePicker: [
|
|
3334
|
+
{ predicate: 'inRange', name: 'In Range', isDefault: true },
|
|
3335
|
+
{ predicate: 'notInRange', name: 'Not in Range' },
|
|
3336
|
+
],
|
|
3337
|
+
};
|
|
3338
|
+
|
|
3339
|
+
var css$a = {"root":"MainMenu_root__39Kfw"};
|
|
3340
|
+
|
|
3341
|
+
function applyMainMenuMods() {
|
|
3342
|
+
return [css$a.root];
|
|
3343
|
+
}
|
|
3344
|
+
const MainMenu = uuiCore.withMods(uuiComponents.MainMenu, applyMainMenuMods, () => ({
|
|
3345
|
+
Burger,
|
|
3346
|
+
MainMenuDropdown,
|
|
3347
|
+
}));
|
|
3348
|
+
|
|
3349
|
+
var _path$4;
|
|
3350
|
+
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); }
|
|
3351
|
+
var SvgGlobalMenu = function SvgGlobalMenu(props, ref) {
|
|
3352
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
3353
|
+
width: 60,
|
|
3354
|
+
height: 60,
|
|
3355
|
+
viewBox: "0 0 24 24",
|
|
3356
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3357
|
+
ref: ref
|
|
3358
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3359
|
+
className: "cls-2",
|
|
3360
|
+
d: "M12 11.2a.8.8 0 1 1-.8.8.8.8 0 0 1 .8-.8zm3.2 0a.8.8 0 1 1-.8.8.802.802 0 0 1 .8-.8zm-6.4 0a.8.8 0 1 1-.8.8.8.8 0 0 1 .8-.8zM12 7.6a.8.8 0 1 1-.8.8.8.8 0 0 1 .8-.8zm3.2 0a.8.8 0 1 1-.8.8.802.802 0 0 1 .8-.8zm-6.4 0a.8.8 0 1 1-.8.8.8.8 0 0 1 .8-.8zm3.2 7.2a.8.8 0 1 1-.8.8.8.8 0 0 1 .8-.8zm3.2 0a.8.8 0 1 1-.8.8.802.802 0 0 1 .8-.8zm-6.4 0a.8.8 0 1 1-.8.8.8.8 0 0 1 .8-.8z"
|
|
3361
|
+
})));
|
|
3362
|
+
};
|
|
3363
|
+
var ForwardRef$5 = /*#__PURE__*/React.forwardRef(SvgGlobalMenu);
|
|
3364
|
+
|
|
3365
|
+
var css$9 = {"global-menu-btn":"GlobalMenu_global-menu-btn__QdXAw","globalMenuIcon":"GlobalMenu_globalMenuIcon__62mij","globalMenuBtn":"GlobalMenu_global-menu-btn__QdXAw"};
|
|
3366
|
+
|
|
3367
|
+
const GlobalMenu = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", Object.assign({ ref: ref, id: 'global_menu_toggle', className: cx__default.default(css$9.globalMenuBtn, props.cx) }, props.rawProps),
|
|
3368
|
+
React__namespace.createElement(uuiComponents.IconContainer, { icon: ForwardRef$5, cx: css$9.globalMenuIcon }))));
|
|
3369
|
+
|
|
3370
|
+
var css$8 = {"root":"Burger_root__euW9D","burger-content":"Burger_burger-content__4ssSJ","burgerContent":"Burger_burger-content__4ssSJ"};
|
|
3371
|
+
|
|
3372
|
+
var _path$3;
|
|
3373
|
+
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); }
|
|
3374
|
+
var SvgBurger = function SvgBurger(props, ref) {
|
|
3375
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
3376
|
+
width: 60,
|
|
3377
|
+
height: 60,
|
|
3378
|
+
viewBox: "0 0 24 24",
|
|
3379
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3380
|
+
ref: ref
|
|
3381
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3382
|
+
d: "M8 9.2h8v.8H8zM8 14h6v.8H8zm0-2.4h8v.8H8z"
|
|
3383
|
+
})));
|
|
3384
|
+
};
|
|
3385
|
+
var ForwardRef$4 = /*#__PURE__*/React.forwardRef(SvgBurger);
|
|
3386
|
+
|
|
3387
|
+
var _path$2;
|
|
3388
|
+
function _extends$3() { _extends$3 = 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$3.apply(this, arguments); }
|
|
3389
|
+
var SvgBurgerClose = function SvgBurgerClose(props, ref) {
|
|
3390
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
3391
|
+
width: 60,
|
|
3392
|
+
height: 60,
|
|
3393
|
+
viewBox: "0 0 60 60",
|
|
3394
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3395
|
+
ref: ref
|
|
3396
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3397
|
+
d: "M38.543 20 40 21.457 31.456 30 40 38.543 38.543 40 30 31.456 21.457 40 20 38.543 28.543 30 20 21.457 21.457 20 30 28.543 38.543 20Z"
|
|
3398
|
+
})));
|
|
3399
|
+
};
|
|
3400
|
+
var ForwardRef$3 = /*#__PURE__*/React.forwardRef(SvgBurgerClose);
|
|
3401
|
+
|
|
3402
|
+
function applyBurgerMods() {
|
|
3403
|
+
return [css$8.root];
|
|
3404
|
+
}
|
|
3405
|
+
const Burger = uuiCore.withMods(uuiComponents.Burger, applyBurgerMods, () => ({
|
|
3406
|
+
burgerIcon: ForwardRef$4,
|
|
3407
|
+
crossIcon: ForwardRef$3,
|
|
3408
|
+
burgerContentCx: css$8.burgerContent,
|
|
3409
|
+
}));
|
|
3410
|
+
|
|
3411
|
+
var _g, _path$1;
|
|
3412
|
+
function _extends$2() { _extends$2 = 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$2.apply(this, arguments); }
|
|
3413
|
+
var SvgTriangle = function SvgTriangle(props, ref) {
|
|
3414
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
3415
|
+
width: 12,
|
|
3416
|
+
height: 24,
|
|
3417
|
+
viewBox: "0 0 12 24",
|
|
3418
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3419
|
+
ref: ref
|
|
3420
|
+
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
3421
|
+
transform: "translate(0 -290.65)",
|
|
3422
|
+
fill: "none",
|
|
3423
|
+
stroke: "#000",
|
|
3424
|
+
strokeWidth: 0.05
|
|
3425
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
3426
|
+
d: "M-6 284.65h36v36H-6z"
|
|
3427
|
+
}), /*#__PURE__*/React__namespace.createElement("circle", {
|
|
3428
|
+
cx: 12,
|
|
3429
|
+
cy: 302.65,
|
|
3430
|
+
r: 18
|
|
3431
|
+
}))), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3432
|
+
d: "m5 14-4-4h8z"
|
|
3433
|
+
})));
|
|
3434
|
+
};
|
|
3435
|
+
var ForwardRef$2 = /*#__PURE__*/React.forwardRef(SvgTriangle);
|
|
3436
|
+
|
|
3437
|
+
var css$7 = {"typography-header":"BurgerButton_typography-header__U1Ojg","typography-block":"BurgerButton_typography-block__-fzNQ","typography-inline":"BurgerButton_typography-inline__Q7e9n","typography-16":"BurgerButton_typography-16__yCkJk","typography-14":"BurgerButton_typography-14__Oe153","typography-12":"BurgerButton_typography-12__Lfcud","typography-promo":"BurgerButton_typography-promo__4LGMX BurgerButton_typography-header__U1Ojg BurgerButton_typography-block__-fzNQ BurgerButton_typography-inline__Q7e9n","root":"BurgerButton_root__FLwMS","button-primary":"BurgerButton_button-primary__CJHtP","button-secondary":"BurgerButton_button-secondary__6Aa0H","hasIcon":"BurgerButton_hasIcon__-Hrg6","dropdown":"BurgerButton_dropdown__TUqjg","typographyHeader":"BurgerButton_typography-header__U1Ojg","typographyBlock":"BurgerButton_typography-block__-fzNQ","typographyInline":"BurgerButton_typography-inline__Q7e9n","typography16":"BurgerButton_typography-16__yCkJk","typography14":"BurgerButton_typography-14__Oe153","typography12":"BurgerButton_typography-12__Lfcud","typographyPromo":"BurgerButton_typography-promo__4LGMX BurgerButton_typography-header__U1Ojg BurgerButton_typography-block__-fzNQ BurgerButton_typography-inline__Q7e9n","buttonPrimary":"BurgerButton_button-primary__CJHtP","buttonSecondary":"BurgerButton_button-secondary__6Aa0H"};
|
|
3438
|
+
|
|
3439
|
+
const BurgerButton = uuiCore.withMods(uuiComponents.Button, props => [
|
|
3440
|
+
css$7.root,
|
|
3441
|
+
css$7['button-' + (props.type || 'primary')],
|
|
3442
|
+
css$7['indent-' + (props.indentLevel || 0)],
|
|
3443
|
+
props.isDropdown && css$7.dropdown,
|
|
3444
|
+
props.icon && css$7.hasIcon,
|
|
3445
|
+
], () => ({ dropdownIcon: ForwardRef$2, dropdownIconPosition: 'left', role: 'menuitem' }));
|
|
3446
|
+
|
|
3447
|
+
function _extends$1() { _extends$1 = 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$1.apply(this, arguments); }
|
|
3448
|
+
var SvgMenuInputCancel = function SvgMenuInputCancel(props, ref) {
|
|
3449
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
3450
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3451
|
+
width: 18,
|
|
3452
|
+
height: 24,
|
|
3453
|
+
viewBox: "0 0 18 24",
|
|
3454
|
+
ref: ref
|
|
3455
|
+
}, props), /*#__PURE__*/React__namespace.createElement("g", {
|
|
3456
|
+
style: {
|
|
3457
|
+
display: "inline"
|
|
3458
|
+
}
|
|
3459
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
3460
|
+
style: {
|
|
3461
|
+
opacity: 1,
|
|
3462
|
+
fill: "none",
|
|
3463
|
+
fillOpacity: 1,
|
|
3464
|
+
stroke: "none",
|
|
3465
|
+
strokeWidth: 0.39687493,
|
|
3466
|
+
strokeMiterlimit: 4,
|
|
3467
|
+
strokeDasharray: "none",
|
|
3468
|
+
strokeOpacity: 1
|
|
3469
|
+
},
|
|
3470
|
+
d: "M95.25 170h9.525v9.525H95.25z",
|
|
3471
|
+
transform: "matrix(3.77953 0 0 3.77953 -369 -648.52)"
|
|
3472
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3473
|
+
style: {
|
|
3474
|
+
opacity: 1,
|
|
3475
|
+
vectorEffect: "none",
|
|
3476
|
+
fillOpacity: 1,
|
|
3477
|
+
fillRule: "nonzero",
|
|
3478
|
+
stroke: "none",
|
|
3479
|
+
strokeWidth: 0.26458335,
|
|
3480
|
+
strokeLinecap: "butt",
|
|
3481
|
+
strokeLinejoin: "miter",
|
|
3482
|
+
strokeMiterlimit: 4,
|
|
3483
|
+
strokeDasharray: "none",
|
|
3484
|
+
strokeDashoffset: 0,
|
|
3485
|
+
strokeOpacity: 1
|
|
3486
|
+
},
|
|
3487
|
+
d: "m100.76 173.64-.748.748-.748-.748-.374.374.748.748-.748.749.374.374.748-.748.749.748.374-.374-.748-.749.748-.748z",
|
|
3488
|
+
transform: "matrix(3.77953 0 0 3.77953 -369 -648.52)"
|
|
3489
|
+
})));
|
|
3490
|
+
};
|
|
3491
|
+
var ForwardRef$1 = /*#__PURE__*/React.forwardRef(SvgMenuInputCancel);
|
|
3492
|
+
|
|
3493
|
+
var css$6 = {"search-input":"BurgerSearch_search-input__pTnno","searchInput":"BurgerSearch_search-input__pTnno"};
|
|
3494
|
+
|
|
3495
|
+
const BurgerSearch = (props) => (React__namespace.createElement(uuiComponents.TextInput, { cx: css$6.searchInput, iconPosition: 'left', icon: ForwardRef$S, placeholder: props.placeholder, value: props.value, onValueChange: props.onValueChange, onCancel: props.onCancel, cancelIcon: props.value && ForwardRef$1, autoFocus: true }));
|
|
3496
|
+
|
|
3497
|
+
var css$5 = {"group-header":"BurgerGroupHeader_group-header__3i4ay","group-name":"BurgerGroupHeader_group-name__szcRq","line":"BurgerGroupHeader_line__oAhHd","groupHeader":"BurgerGroupHeader_group-header__3i4ay","groupName":"BurgerGroupHeader_group-name__szcRq"};
|
|
3498
|
+
|
|
3499
|
+
const BurgerGroupHeader = (props) => {
|
|
3500
|
+
return (React__namespace.createElement("div", { className: css$5.groupHeader },
|
|
3501
|
+
React__namespace.createElement("hr", { className: css$5.line }),
|
|
3502
|
+
React__namespace.createElement("span", { className: css$5.groupName }, props.caption)));
|
|
3503
|
+
};
|
|
3504
|
+
|
|
3505
|
+
var css$4 = {"container":"MainMenuAvatar_container__vT8rb","dropdown":"MainMenuAvatar_dropdown__ezcds","open":"MainMenuAvatar_open__S2acz"};
|
|
3506
|
+
|
|
3507
|
+
const MainMenuAvatar = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", { ref: ref, className: cx__default.default(css$4.container, props.isDropdown && css$4.dropdown, props.isOpen && css$4.open, props.cx), onClick: props.onClick },
|
|
3508
|
+
React__namespace.createElement(uuiComponents.Avatar, { size: '36', img: props.avatarUrl }),
|
|
3509
|
+
props.icon && React__namespace.createElement(uuiComponents.IconContainer, { icon: props.icon }),
|
|
3510
|
+
props.isDropdown && (React__namespace.createElement("div", null,
|
|
3511
|
+
React__namespace.createElement(uuiComponents.IconContainer, { icon: ForwardRef$Y, flipY: props.isOpen }))))));
|
|
3512
|
+
|
|
3513
|
+
var css$3 = {"search-input":"MainMenuSearch_search-input__xTdYX","searchInput":"MainMenuSearch_search-input__xTdYX"};
|
|
3514
|
+
|
|
3515
|
+
const MainMenuSearch = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(uuiCore.IEditableDebouncer, Object.assign({}, props, { render: iEditable => {
|
|
3516
|
+
var _a;
|
|
3517
|
+
return React__namespace.createElement(uuiComponents.TextInput, Object.assign({ iconPosition: 'left', icon: ForwardRef$S, cancelIcon: ((_a = props.value) === null || _a === void 0 ? void 0 : _a.length) > 0 && ForwardRef$1 }, props, iEditable, { ref: ref, cx: uuiCore.cx(css$3.searchInput, props.cx) }, props.rawProps));
|
|
3518
|
+
} }))));
|
|
3519
|
+
|
|
3520
|
+
var css$2 = {"container":"MainMenuIcon_container__s-83v"};
|
|
3521
|
+
|
|
3522
|
+
const MainMenuIcon = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(IconButton, Object.assign({ ref: ref, icon: props.icon, cx: uuiCore.cx(props.cx, css$2.container) }, props))));
|
|
3523
|
+
|
|
3524
|
+
var css$1 = {"dropdown-body":"MainMenuDropdown_dropdown-body__k9qxb","dropdownBody":"MainMenuDropdown_dropdown-body__k9qxb"};
|
|
3525
|
+
|
|
3526
|
+
var css = {"typography-header":"MainMenuButton_typography-header__pWBln","typography-block":"MainMenuButton_typography-block__yRJgj","typography-inline":"MainMenuButton_typography-inline__dABqt","typography-16":"MainMenuButton_typography-16__Qsux4","typography-14":"MainMenuButton_typography-14__Xy5hg","typography-12":"MainMenuButton_typography-12__QTtay","typography-promo":"MainMenuButton_typography-promo__8AGoE MainMenuButton_typography-header__pWBln MainMenuButton_typography-block__yRJgj MainMenuButton_typography-inline__dABqt","root":"MainMenuButton_root__182y5","type-primary":"MainMenuButton_type-primary__pzpis","type-secondary":"MainMenuButton_type-secondary__bUETW","typographyHeader":"MainMenuButton_typography-header__pWBln","typographyBlock":"MainMenuButton_typography-block__yRJgj","typographyInline":"MainMenuButton_typography-inline__dABqt","typography16":"MainMenuButton_typography-16__Qsux4","typography14":"MainMenuButton_typography-14__Xy5hg","typography12":"MainMenuButton_typography-12__QTtay","typographyPromo":"MainMenuButton_typography-promo__8AGoE MainMenuButton_typography-header__pWBln MainMenuButton_typography-block__yRJgj MainMenuButton_typography-inline__dABqt","typePrimary":"MainMenuButton_type-primary__pzpis","typeSecondary":"MainMenuButton_type-secondary__bUETW"};
|
|
3527
|
+
|
|
3528
|
+
var _path;
|
|
3529
|
+
function _extends() { _extends = 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.apply(this, arguments); }
|
|
3530
|
+
var SvgChevronDown24 = function SvgChevronDown24(props, ref) {
|
|
3531
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
3532
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3533
|
+
width: 24,
|
|
3534
|
+
height: 24,
|
|
3535
|
+
viewBox: "0 0 24 24",
|
|
3536
|
+
ref: ref
|
|
3537
|
+
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3538
|
+
fillRule: "evenodd",
|
|
3539
|
+
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
3540
|
+
})));
|
|
3541
|
+
};
|
|
3542
|
+
var ForwardRef = /*#__PURE__*/React.forwardRef(SvgChevronDown24);
|
|
3543
|
+
|
|
3544
|
+
const MainMenuButton = uuiCore.withMods(uuiComponents.Button, mods => [
|
|
3545
|
+
css.root,
|
|
3546
|
+
css['type-' + (mods.type || 'primary')],
|
|
3547
|
+
], () => ({ dropdownIcon: ForwardRef, role: 'menuitem' }));
|
|
3548
|
+
|
|
3549
|
+
class MainMenuDropdown extends React__namespace.Component {
|
|
3550
|
+
render() {
|
|
3551
|
+
return (React__namespace.createElement(uuiComponents.Dropdown, { renderTarget: props => (React__namespace.createElement(MainMenuButton, Object.assign({ caption: this.props.caption }, props, { rawProps: this.props.rawProps, isLinkActive: this.props.isLinkActive, isDropdown: true }))), renderBody: props => (React__namespace.createElement("div", { className: cx__default.default(css$1.dropdownBody) }, React__namespace.Children.map(this.props.children, item => {
|
|
3552
|
+
if (!item)
|
|
3553
|
+
return item;
|
|
3554
|
+
return React__namespace.createElement(item.type, Object.assign(Object.assign({}, item.props), { onClick: item.props.onClick ? () => {
|
|
3555
|
+
item.props.onClick();
|
|
3556
|
+
props.onClose();
|
|
3557
|
+
} : null }));
|
|
3558
|
+
}))), placement: "bottom-start" }));
|
|
3559
|
+
}
|
|
3560
|
+
}
|
|
3561
|
+
|
|
3562
|
+
class ConfirmationModal extends React__namespace.Component {
|
|
3563
|
+
render() {
|
|
3564
|
+
let bodyContent;
|
|
3565
|
+
if (this.props.bodyContent) {
|
|
3566
|
+
bodyContent = React__namespace.createElement(Panel, { margin: '24' }, this.props.bodyContent);
|
|
3567
|
+
}
|
|
3568
|
+
return (React__namespace.createElement(ModalBlocker, Object.assign({}, this.props),
|
|
3569
|
+
React__namespace.createElement(ModalWindow, { width: 420 },
|
|
3570
|
+
React__namespace.createElement(ModalHeader, { borderBottom: true, title: this.props.caption, onClose: () => this.props.abort() }),
|
|
3571
|
+
React__namespace.createElement(ScrollBars, null, bodyContent),
|
|
3572
|
+
React__namespace.createElement(ModalFooter, null,
|
|
3573
|
+
React__namespace.createElement(FlexSpacer, null),
|
|
3574
|
+
this.props.hideCancelButton || React__namespace.createElement(Button, { caption: i18n.form.modals.discardButton, onClick: () => this.props.success(false), mode: 'outline', color: 'secondary' }),
|
|
3575
|
+
React__namespace.createElement(Button, { caption: i18n.form.modals.saveButton, onClick: () => this.props.success(true), color: 'accent' })))));
|
|
3576
|
+
}
|
|
3577
|
+
}
|
|
3578
|
+
|
|
3579
|
+
function Form(props) {
|
|
3580
|
+
const context = uuiCore.useUuiContext();
|
|
3581
|
+
const beforeLeave = () => {
|
|
3582
|
+
return context.uuiModals.show(modalProps => React__namespace.createElement(ConfirmationModal, Object.assign({ caption: i18n.form.modals.beforeLeaveMessage }, modalProps)));
|
|
3583
|
+
};
|
|
3584
|
+
const loadUnsavedChanges = () => {
|
|
3585
|
+
return context.uuiNotifications.show((props) => React__namespace.createElement(WarningNotification, Object.assign({}, props, { actions: [{
|
|
3586
|
+
name: i18n.form.notifications.actionButtonCaption,
|
|
3587
|
+
action: props.onSuccess,
|
|
3588
|
+
}] }),
|
|
3589
|
+
React__namespace.createElement(RichTextView, null,
|
|
3590
|
+
React__namespace.createElement(Text, { size: "36" }, i18n.form.notifications.unsavedChangesMessage))), { duration: 5, position: 'bot-left' }).catch(() => null);
|
|
3591
|
+
};
|
|
3592
|
+
return (React__namespace.createElement(uuiCore.Form, Object.assign({ loadUnsavedChanges: loadUnsavedChanges, beforeLeave: beforeLeave }, props)));
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
function useForm(props) {
|
|
3596
|
+
const context = uuiCore.useUuiContext();
|
|
3597
|
+
const beforeLeave = () => {
|
|
3598
|
+
return context.uuiModals.show(modalProps => (React__namespace.default.createElement(ConfirmationModal, Object.assign({ caption: i18n.form.modals.beforeLeaveMessage }, modalProps))));
|
|
3599
|
+
};
|
|
3600
|
+
const loadUnsavedChanges = () => {
|
|
3601
|
+
return context.uuiNotifications.show((props) => React__namespace.default.createElement(WarningNotification, Object.assign({}, props, { actions: [{
|
|
3602
|
+
name: i18n.form.notifications.actionButtonCaption,
|
|
3603
|
+
action: props.onSuccess,
|
|
3604
|
+
}] }),
|
|
3605
|
+
React__namespace.default.createElement(RichTextView, null,
|
|
3606
|
+
React__namespace.default.createElement(Text, { size: "36" }, i18n.form.notifications.unsavedChangesMessage))), { duration: 5, position: 'bot-left' }).catch(() => null);
|
|
3607
|
+
};
|
|
3608
|
+
return uuiCore.useForm(Object.assign({ beforeLeave, loadUnsavedChanges }, props));
|
|
3609
|
+
}
|
|
3610
|
+
|
|
3611
|
+
Object.defineProperty(exports, 'IconContainer', {
|
|
3612
|
+
enumerable: true,
|
|
3613
|
+
get: function () { return uuiComponents.IconContainer; }
|
|
3614
|
+
});
|
|
1818
3615
|
exports.Accordion = Accordion;
|
|
3616
|
+
exports.Alert = Alert;
|
|
1819
3617
|
exports.Avatar = Avatar;
|
|
1820
3618
|
exports.Badge = Badge;
|
|
3619
|
+
exports.Blocker = Blocker;
|
|
3620
|
+
exports.Burger = Burger;
|
|
3621
|
+
exports.BurgerButton = BurgerButton;
|
|
3622
|
+
exports.BurgerGroupHeader = BurgerGroupHeader;
|
|
3623
|
+
exports.BurgerSearch = BurgerSearch;
|
|
1821
3624
|
exports.Button = Button;
|
|
3625
|
+
exports.Calendar = Calendar;
|
|
1822
3626
|
exports.Checkbox = Checkbox;
|
|
3627
|
+
exports.CheckboxGroup = CheckboxGroup;
|
|
1823
3628
|
exports.ClearNotification = ClearNotification;
|
|
3629
|
+
exports.ColumnHeaderDropdown = ColumnHeaderDropdown;
|
|
3630
|
+
exports.ColumnsConfigurationModal = ColumnsConfigurationModal;
|
|
1824
3631
|
exports.ControlGroup = ControlGroup;
|
|
1825
3632
|
exports.DataPickerBody = DataPickerBody;
|
|
1826
3633
|
exports.DataPickerFooter = DataPickerFooter;
|
|
1827
3634
|
exports.DataPickerHeader = DataPickerHeader;
|
|
1828
3635
|
exports.DataPickerRow = DataPickerRow;
|
|
3636
|
+
exports.DataTable = DataTable;
|
|
1829
3637
|
exports.DataTableCell = DataTableCell;
|
|
3638
|
+
exports.DataTableHeaderCell = DataTableHeaderCell;
|
|
3639
|
+
exports.DataTableHeaderRow = DataTableHeaderRow;
|
|
3640
|
+
exports.DataTableRow = DataTableRow;
|
|
3641
|
+
exports.DatePicker = DatePicker;
|
|
3642
|
+
exports.DatePickerBody = DatePickerBody;
|
|
3643
|
+
exports.DropMarker = DropMarker;
|
|
1830
3644
|
exports.Dropdown = Dropdown;
|
|
1831
3645
|
exports.DropdownContainer = DropdownContainer;
|
|
1832
|
-
exports.DropdownControlKeys = DropdownControlKeys;
|
|
1833
3646
|
exports.DropdownMenuBody = DropdownMenuBody;
|
|
1834
3647
|
exports.DropdownMenuButton = DropdownMenuButton;
|
|
1835
3648
|
exports.DropdownMenuHeader = DropdownMenuHeader;
|
|
1836
3649
|
exports.DropdownMenuSplitter = DropdownMenuSplitter;
|
|
1837
3650
|
exports.DropdownMenuSwitchButton = DropdownMenuSwitchButton;
|
|
1838
3651
|
exports.DropdownSubMenu = DropdownSubMenu;
|
|
3652
|
+
exports.ErrorAlert = ErrorAlert;
|
|
1839
3653
|
exports.ErrorNotification = ErrorNotification;
|
|
3654
|
+
exports.FilterItemBody = FilterItemBody;
|
|
3655
|
+
exports.FiltersPanel = FiltersPanel;
|
|
1840
3656
|
exports.FlexCell = FlexCell;
|
|
1841
3657
|
exports.FlexRow = FlexRow;
|
|
1842
3658
|
exports.FlexSpacer = FlexSpacer;
|
|
3659
|
+
exports.Form = Form;
|
|
3660
|
+
exports.GlobalMenu = GlobalMenu;
|
|
3661
|
+
exports.HintAlert = HintAlert;
|
|
1843
3662
|
exports.HintNotification = HintNotification;
|
|
1844
3663
|
exports.IconButton = IconButton;
|
|
1845
|
-
exports.IconContainer = IconContainer;
|
|
1846
3664
|
exports.LabeledInput = LabeledInput;
|
|
1847
3665
|
exports.LinkButton = LinkButton;
|
|
3666
|
+
exports.MainMenu = MainMenu;
|
|
3667
|
+
exports.MainMenuAvatar = MainMenuAvatar;
|
|
3668
|
+
exports.MainMenuButton = MainMenuButton;
|
|
3669
|
+
exports.MainMenuDropdown = MainMenuDropdown;
|
|
3670
|
+
exports.MainMenuIcon = MainMenuIcon;
|
|
3671
|
+
exports.MainMenuSearch = MainMenuSearch;
|
|
1848
3672
|
exports.MobileDropdownWrapper = MobileDropdownWrapper;
|
|
1849
3673
|
exports.ModalBlocker = ModalBlocker;
|
|
1850
3674
|
exports.ModalFooter = ModalFooter;
|
|
1851
3675
|
exports.ModalHeader = ModalHeader;
|
|
1852
3676
|
exports.ModalWindow = ModalWindow;
|
|
3677
|
+
exports.MultiSwitch = MultiSwitch;
|
|
1853
3678
|
exports.NotificationCard = NotificationCard;
|
|
3679
|
+
exports.NumericInput = NumericInput;
|
|
1854
3680
|
exports.Panel = Panel;
|
|
1855
3681
|
exports.PickerInput = PickerInput;
|
|
1856
3682
|
exports.PickerItem = PickerItem;
|
|
@@ -1859,42 +3685,57 @@ exports.PickerListItem = PickerListItem;
|
|
|
1859
3685
|
exports.PickerModal = PickerModal;
|
|
1860
3686
|
exports.PickerModalImpl = PickerModalImpl;
|
|
1861
3687
|
exports.PickerToggler = PickerToggler;
|
|
1862
|
-
exports.
|
|
1863
|
-
exports.Presets = Presets;
|
|
3688
|
+
exports.PresetsPanel = PresetsPanel;
|
|
1864
3689
|
exports.RadioGroup = RadioGroup;
|
|
1865
3690
|
exports.RadioInput = RadioInput;
|
|
3691
|
+
exports.RangeDatePicker = RangeDatePicker;
|
|
3692
|
+
exports.RangeDatePickerBody = RangeDatePickerBody;
|
|
3693
|
+
exports.RichTextView = RichTextView;
|
|
1866
3694
|
exports.ScrollBars = ScrollBars;
|
|
1867
3695
|
exports.SearchInput = SearchInput;
|
|
3696
|
+
exports.Spinner = Spinner;
|
|
3697
|
+
exports.SuccessAlert = SuccessAlert;
|
|
1868
3698
|
exports.SuccessNotification = SuccessNotification;
|
|
1869
3699
|
exports.Switch = Switch;
|
|
1870
3700
|
exports.TabButton = TabButton;
|
|
1871
3701
|
exports.Tag = Tag;
|
|
1872
3702
|
exports.Text = Text;
|
|
3703
|
+
exports.TextArea = TextArea;
|
|
1873
3704
|
exports.TextInput = TextInput;
|
|
1874
3705
|
exports.TextPlaceholder = TextPlaceholder;
|
|
1875
3706
|
exports.Tooltip = Tooltip;
|
|
1876
3707
|
exports.VerticalTabButton = VerticalTabButton;
|
|
1877
3708
|
exports.VirtualList = VirtualList;
|
|
3709
|
+
exports.WarningAlert = WarningAlert;
|
|
1878
3710
|
exports.WarningNotification = WarningNotification;
|
|
1879
3711
|
exports.allButtonColors = allButtonColors;
|
|
1880
3712
|
exports.allButtonModes = allButtonModes;
|
|
1881
|
-
exports.
|
|
3713
|
+
exports.allButtonSemanticColors = allButtonSemanticColors;
|
|
3714
|
+
exports.allEpamBadgeSemanticColors = allEpamBadgeSemanticColors;
|
|
1882
3715
|
exports.allFontStyles = allFontStyles;
|
|
1883
3716
|
exports.allIconColors = allIconColors;
|
|
1884
3717
|
exports.allRowSizes = allRowSizes;
|
|
3718
|
+
exports.allSemanticColors = allSemanticColors;
|
|
1885
3719
|
exports.allSizes = allSizes;
|
|
1886
3720
|
exports.allTextSizes = allTextSizes;
|
|
1887
3721
|
exports.applyBadgeMods = applyBadgeMods;
|
|
1888
3722
|
exports.applyButtonMods = applyButtonMods;
|
|
1889
3723
|
exports.applyCheckboxMods = applyCheckboxMods;
|
|
1890
|
-
exports.
|
|
3724
|
+
exports.applyDatePickerBodyMods = applyDatePickerBodyMods;
|
|
3725
|
+
exports.applyDateSelectionMods = applyDateSelectionMods;
|
|
3726
|
+
exports.applyNumericInputMods = applyNumericInputMods;
|
|
3727
|
+
exports.applyRangeDatePickerBodyMods = applyRangeDatePickerBodyMods;
|
|
3728
|
+
exports.applySpinnerMods = applySpinnerMods;
|
|
1891
3729
|
exports.applySwitchMods = applySwitchMods;
|
|
1892
3730
|
exports.applyTagMods = applyTagMods;
|
|
3731
|
+
exports.applyTextAreaMods = applyTextAreaMods;
|
|
1893
3732
|
exports.applyTextInputMods = applyTextInputMods;
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
3733
|
+
exports.defaultPredicates = defaultPredicates;
|
|
3734
|
+
exports.getTextClasses = getTextClasses;
|
|
3735
|
+
exports.i18n = i18n;
|
|
3736
|
+
exports.propsMods = propsMods;
|
|
3737
|
+
exports.renderCell = renderCell;
|
|
3738
|
+
exports.renderDropMarkers = renderDropMarkers;
|
|
3739
|
+
exports.useColumnsWithFilters = useColumnsWithFilters;
|
|
3740
|
+
exports.useForm = useForm;
|
|
1900
3741
|
//# sourceMappingURL=index.js.map
|