@synerise/ds-operators 1.1.22 → 1.1.24
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/CHANGELOG.md +8 -0
- package/README.md +12 -10
- package/dist/Operator.types.d.ts +1 -1
- package/dist/Operator.types.js +1 -1
- package/dist/Operators.d.ts +2 -2
- package/dist/Operators.js +77 -107
- package/dist/Operators.style.d.ts +7 -7
- package/dist/Operators.style.js +22 -23
- package/dist/OperatorsDropdown/OperatorsDropdown.d.ts +2 -2
- package/dist/OperatorsDropdown/OperatorsDropdown.js +76 -158
- package/dist/OperatorsDropdown/OperatorsDropdownGroupName.d.ts +1 -1
- package/dist/OperatorsDropdown/OperatorsDropdownGroupName.js +9 -8
- package/dist/OperatorsDropdown/OperatorsDropdownItem.d.ts +2 -2
- package/dist/OperatorsDropdown/OperatorsDropdownItem.js +21 -30
- package/dist/constants.js +18 -8
- package/dist/index.js +4 -1
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/dist/utils/groupByGroupName.d.ts +1 -1
- package/dist/utils/groupByGroupName.js +9 -6
- package/dist/utils/index.js +4 -1
- package/package.json +13 -13
- package/dist/__specs__/data/Operators.data.d.ts +0 -42
- package/dist/utils/groupByGroupName.spec.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.1.24](https://github.com/Synerise/synerise-design/compare/@synerise/ds-operators@1.1.23...@synerise/ds-operators@1.1.24) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-operators
|
|
9
|
+
|
|
10
|
+
## [1.1.23](https://github.com/Synerise/synerise-design/compare/@synerise/ds-operators@1.1.22...@synerise/ds-operators@1.1.23) (2026-03-20)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-operators
|
|
13
|
+
|
|
6
14
|
## [1.1.22](https://github.com/Synerise/synerise-design/compare/@synerise/ds-operators@1.1.21...@synerise/ds-operators@1.1.22) (2026-03-09)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-operators
|
package/README.md
CHANGED
|
@@ -80,16 +80,18 @@ import Operators from '@synerise/ds-operators'
|
|
|
80
80
|
|
|
81
81
|
| Property | Description | Type | Default |
|
|
82
82
|
| ------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | --------- |
|
|
83
|
-
|
|
|
84
|
-
| getPopupContainerOverride | Popup container function for child tooltips and dropdowns | (trigger: HTMLElement
|
|
85
|
-
| groups | Groups of operators | OperatorsGroup[]
|
|
86
|
-
| items | Array of operators | OperatorsItem[]
|
|
87
|
-
| onActivate | Callback called when user opens dropdown | (
|
|
88
|
-
| onChange | Callback called when user selects operator | (item: OperatorsItem
|
|
89
|
-
| onDeactivate | Callback called when user closes dropdown | () => void
|
|
90
|
-
| opened | Whether if dropdown should opens from outside of component | boolean
|
|
91
|
-
|
|
|
92
|
-
|
|
|
83
|
+
| errorText | Puts the trigger button in error state | ReactNode | - |
|
|
84
|
+
| getPopupContainerOverride | Popup container function for child tooltips and dropdowns | (trigger: HTMLElement \| null) => HTMLElement | - |
|
|
85
|
+
| groups | Groups of operators | OperatorsGroup[] | - |
|
|
86
|
+
| items | Array of operators | OperatorsItem[] | - |
|
|
87
|
+
| onActivate | Callback called when user opens dropdown | () => void | - |
|
|
88
|
+
| onChange | Callback called when user selects operator | (item: OperatorsItem \| undefined) => void | - |
|
|
89
|
+
| onDeactivate | Callback called when user closes dropdown | () => void | - |
|
|
90
|
+
| opened | Whether if dropdown should opens from outside of component | boolean | false |
|
|
91
|
+
| readOnly | Disables the dropdown; shows selected value without arrow | boolean | false |
|
|
92
|
+
| texts | Translations object | Partial\<OperatorTexts\> | - |
|
|
93
|
+
| value | Selected operator | OperatorsItem \| undefined | undefined |
|
|
94
|
+
| dropdownDimensionsConfig | Override responsive height thresholds | `{ defaultHeight?, lowerHeight?, threshold? }`| - |
|
|
93
95
|
|
|
94
96
|
### OperatorsGroup
|
|
95
97
|
|
package/dist/Operator.types.d.ts
CHANGED
package/dist/Operator.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/Operators.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OperatorsProps } from './Operator.types';
|
|
3
3
|
declare const Operators: ({ value, onChange, groups, items, texts, opened, getPopupContainerOverride, onActivate, onDeactivate, readOnly, errorText, dropdownDimensionsConfig, }: OperatorsProps) => React.JSX.Element;
|
|
4
4
|
export default Operators;
|
package/dist/Operators.js
CHANGED
|
@@ -1,125 +1,95 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { useIntl } from
|
|
4
|
-
import Button from
|
|
5
|
-
import Dropdown from
|
|
6
|
-
import Icon, { AngleDownS } from
|
|
7
|
-
import Tooltip from
|
|
8
|
-
import { getPopupContainer } from
|
|
9
|
-
import
|
|
10
|
-
import OperatorsDropdown from
|
|
11
|
-
import { DROPDOWN_HEIGHT, DROPDOWN_HEIGHT_BELOW_THRESHOLD, DROPDOWN_HEIGHT_THRESHOLD } from
|
|
12
|
-
|
|
13
|
-
return
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useMemo, useCallback, useEffect } from "react";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import Button from "@synerise/ds-button";
|
|
5
|
+
import Dropdown from "@synerise/ds-dropdown";
|
|
6
|
+
import Icon, { AngleDownS } from "@synerise/ds-icon";
|
|
7
|
+
import Tooltip from "@synerise/ds-tooltip";
|
|
8
|
+
import { getPopupContainer } from "@synerise/ds-utils";
|
|
9
|
+
import { Value } from "./Operators.style.js";
|
|
10
|
+
import OperatorsDropdown from "./OperatorsDropdown/OperatorsDropdown.js";
|
|
11
|
+
import { DROPDOWN_HEIGHT, DROPDOWN_HEIGHT_BELOW_THRESHOLD, DROPDOWN_HEIGHT_THRESHOLD } from "./constants.js";
|
|
12
|
+
const isOperatorItem = (item) => {
|
|
13
|
+
return "groupId" in item;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
15
|
+
const Operators = ({
|
|
16
|
+
value,
|
|
17
|
+
onChange,
|
|
18
|
+
groups,
|
|
19
|
+
items,
|
|
20
|
+
texts,
|
|
21
|
+
opened,
|
|
22
|
+
getPopupContainerOverride,
|
|
23
|
+
onActivate,
|
|
24
|
+
onDeactivate,
|
|
25
|
+
readOnly = false,
|
|
26
|
+
errorText,
|
|
27
|
+
dropdownDimensionsConfig
|
|
28
|
+
}) => {
|
|
29
|
+
const dimensionsConfig = {
|
|
30
30
|
defaultHeight: DROPDOWN_HEIGHT,
|
|
31
31
|
lowerHeight: DROPDOWN_HEIGHT_BELOW_THRESHOLD,
|
|
32
|
-
threshold: DROPDOWN_HEIGHT_THRESHOLD
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}, texts);
|
|
57
|
-
}, [texts, formatMessage]);
|
|
58
|
-
var handleChange = useCallback(function (val) {
|
|
32
|
+
threshold: DROPDOWN_HEIGHT_THRESHOLD,
|
|
33
|
+
...dropdownDimensionsConfig
|
|
34
|
+
};
|
|
35
|
+
const {
|
|
36
|
+
formatMessage
|
|
37
|
+
} = useIntl();
|
|
38
|
+
const [dropdownVisible, setDropdownVisible] = useState(false);
|
|
39
|
+
const [outerHeight, setOuterHeight] = useState(dimensionsConfig.defaultHeight);
|
|
40
|
+
const text = useMemo(() => ({
|
|
41
|
+
buttonLabel: formatMessage({
|
|
42
|
+
id: "DS.OPERATORS.BUTTON_LABEL",
|
|
43
|
+
defaultMessage: "Choose"
|
|
44
|
+
}),
|
|
45
|
+
searchPlaceholder: formatMessage({
|
|
46
|
+
id: "DS.OPERATORS.SEARCH_PLACEHOLDER",
|
|
47
|
+
defaultMessage: "Search"
|
|
48
|
+
}),
|
|
49
|
+
noResults: formatMessage({
|
|
50
|
+
id: "DS.OPERATORS.NO_RESULTS",
|
|
51
|
+
defaultMessage: "No results"
|
|
52
|
+
}),
|
|
53
|
+
...texts
|
|
54
|
+
}), [texts, formatMessage]);
|
|
55
|
+
const handleChange = useCallback((val) => {
|
|
59
56
|
(!val || isOperatorItem(val)) && onChange(val);
|
|
60
57
|
}, [onChange]);
|
|
61
|
-
useEffect(
|
|
58
|
+
useEffect(() => {
|
|
62
59
|
setDropdownVisible(Boolean(opened));
|
|
63
60
|
}, [opened]);
|
|
64
|
-
|
|
65
|
-
onActivate
|
|
61
|
+
const handleClick = useCallback(() => {
|
|
62
|
+
onActivate?.();
|
|
66
63
|
}, [onActivate]);
|
|
67
|
-
|
|
64
|
+
const onDropdownVisibilityChange = useCallback((newValue) => {
|
|
68
65
|
setDropdownVisible(newValue);
|
|
69
|
-
newValue &&
|
|
66
|
+
newValue && onActivate?.();
|
|
70
67
|
}, [onActivate]);
|
|
71
|
-
|
|
68
|
+
const triggerMode = useMemo(() => {
|
|
72
69
|
if (value) {
|
|
73
|
-
return readOnly ?
|
|
70
|
+
return readOnly ? "icon-label" : "two-icons";
|
|
74
71
|
}
|
|
75
|
-
return readOnly ?
|
|
72
|
+
return readOnly ? "simple" : "label-icon";
|
|
76
73
|
}, [value, readOnly]);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
mode: triggerMode,
|
|
85
|
-
onClick: !readOnly ? handleClick : undefined,
|
|
86
|
-
readOnly: readOnly
|
|
87
|
-
}, value && /*#__PURE__*/React.createElement(Icon, {
|
|
88
|
-
component: value.icon
|
|
89
|
-
}), /*#__PURE__*/React.createElement(S.Value, null, value ? value.name : text.buttonLabel), !readOnly && /*#__PURE__*/React.createElement(Icon, {
|
|
90
|
-
component: /*#__PURE__*/React.createElement(AngleDownS, null)
|
|
91
|
-
})));
|
|
92
|
-
useEffect(function () {
|
|
93
|
-
var checkViewportHeight = function checkViewportHeight() {
|
|
94
|
-
return setOuterHeight(window.innerHeight < dimensionsConfig.threshold ? dimensionsConfig.lowerHeight : dimensionsConfig.defaultHeight);
|
|
95
|
-
};
|
|
74
|
+
const dropdownTrigger = /* @__PURE__ */ jsx(Tooltip, { getPopupContainer: getPopupContainerOverride || getPopupContainer, title: value?.name || "", trigger: ["hover"], children: /* @__PURE__ */ jsxs(Button, { error: Boolean(errorText), type: "secondary", mode: triggerMode, onClick: !readOnly ? handleClick : void 0, readOnly, children: [
|
|
75
|
+
value && /* @__PURE__ */ jsx(Icon, { component: value.icon }),
|
|
76
|
+
/* @__PURE__ */ jsx(Value, { children: value ? value.name : text.buttonLabel }),
|
|
77
|
+
!readOnly && /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(AngleDownS, {}) })
|
|
78
|
+
] }) });
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
const checkViewportHeight = () => setOuterHeight(window.innerHeight < dimensionsConfig.threshold ? dimensionsConfig.lowerHeight : dimensionsConfig.defaultHeight);
|
|
96
81
|
checkViewportHeight();
|
|
97
|
-
window.addEventListener(
|
|
98
|
-
return
|
|
99
|
-
window.removeEventListener(
|
|
82
|
+
window.addEventListener("resize", checkViewportHeight);
|
|
83
|
+
return () => {
|
|
84
|
+
window.removeEventListener("resize", checkViewportHeight);
|
|
100
85
|
};
|
|
101
86
|
}, [dimensionsConfig.defaultHeight, dimensionsConfig.lowerHeight, dimensionsConfig.threshold]);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
asChild: false,
|
|
107
|
-
size: "medium",
|
|
108
|
-
onDismiss: onDeactivate,
|
|
109
|
-
popoverProps: {
|
|
110
|
-
testId: 'operators',
|
|
111
|
-
returnFocus: false
|
|
112
|
-
},
|
|
113
|
-
overlay: /*#__PURE__*/React.createElement(OperatorsDropdown, {
|
|
114
|
-
value: value,
|
|
115
|
-
setDropdownVisible: setDropdownVisible,
|
|
116
|
-
setSelected: handleChange,
|
|
117
|
-
groups: groups,
|
|
118
|
-
items: items,
|
|
119
|
-
texts: text,
|
|
120
|
-
outerHeight: outerHeight
|
|
121
|
-
})
|
|
122
|
-
}, dropdownTrigger);
|
|
87
|
+
const content = readOnly ? dropdownTrigger : /* @__PURE__ */ jsx(Dropdown, { open: dropdownVisible, onOpenChange: onDropdownVisibilityChange, getPopupContainer: getPopupContainerOverride || getPopupContainer, asChild: false, size: "medium", onDismiss: onDeactivate, popoverProps: {
|
|
88
|
+
testId: "operators",
|
|
89
|
+
returnFocus: false
|
|
90
|
+
}, overlay: /* @__PURE__ */ jsx(OperatorsDropdown, { value, setDropdownVisible, setSelected: handleChange, groups, items, texts: text, outerHeight }), children: dropdownTrigger });
|
|
123
91
|
return content;
|
|
124
92
|
};
|
|
125
|
-
export
|
|
93
|
+
export {
|
|
94
|
+
Operators as default
|
|
95
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const TabsWrapper: import(
|
|
2
|
-
export declare const ContentPlaceholder: import(
|
|
3
|
-
export declare const ItemsList: import(
|
|
1
|
+
export declare const TabsWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ContentPlaceholder: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const ItemsList: import('styled-components').StyledComponent<"div", any, {
|
|
4
4
|
contentHeight?: number;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const SearchResult: import(
|
|
7
|
-
export declare const SearchResultHighlight: import(
|
|
8
|
-
export declare const Title: import(
|
|
9
|
-
export declare const Value: import(
|
|
6
|
+
export declare const SearchResult: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
7
|
+
export declare const SearchResultHighlight: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
8
|
+
export declare const Title: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const Value: import('styled-components').StyledComponent<"span", any, {}, never>;
|
package/dist/Operators.style.js
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const TabsWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "Operatorsstyle__TabsWrapper",
|
|
4
4
|
componentId: "sc-vzf1ol-0"
|
|
5
5
|
})(["width:100%;padding:0 0 8px 0;"]);
|
|
6
|
-
|
|
6
|
+
const ContentPlaceholder = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "Operatorsstyle__ContentPlaceholder",
|
|
8
8
|
componentId: "sc-vzf1ol-1"
|
|
9
9
|
})(["height:100px;"]);
|
|
10
|
-
|
|
10
|
+
const ItemsList = /* @__PURE__ */ styled.div.withConfig({
|
|
11
11
|
displayName: "Operatorsstyle__ItemsList",
|
|
12
12
|
componentId: "sc-vzf1ol-2"
|
|
13
|
-
})(["width:100%;backgorund:", ";", ""],
|
|
14
|
-
|
|
15
|
-
}, function (props) {
|
|
16
|
-
return props.contentHeight !== undefined && "height: " + props.contentHeight + "px;";
|
|
17
|
-
});
|
|
18
|
-
export var SearchResult = styled.span.withConfig({
|
|
13
|
+
})(["width:100%;backgorund:", ";", ""], (props) => props.theme.palette.white, (props) => props.contentHeight !== void 0 && `height: ${props.contentHeight}px;`);
|
|
14
|
+
const SearchResult = /* @__PURE__ */ styled.span.withConfig({
|
|
19
15
|
displayName: "Operatorsstyle__SearchResult",
|
|
20
16
|
componentId: "sc-vzf1ol-3"
|
|
21
|
-
})(["font-weight:400;color:", ";"],
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
export var SearchResultHighlight = styled.span.withConfig({
|
|
17
|
+
})(["font-weight:400;color:", ";"], (props) => props.theme.palette["grey-500"]);
|
|
18
|
+
const SearchResultHighlight = /* @__PURE__ */ styled.span.withConfig({
|
|
25
19
|
displayName: "Operatorsstyle__SearchResultHighlight",
|
|
26
20
|
componentId: "sc-vzf1ol-4"
|
|
27
|
-
})(["font-weight:500;color:", ";"],
|
|
28
|
-
|
|
29
|
-
});
|
|
30
|
-
export var Title = styled.div.withConfig({
|
|
21
|
+
})(["font-weight:500;color:", ";"], (props) => props.theme.palette["grey-700"]);
|
|
22
|
+
const Title = /* @__PURE__ */ styled.div.withConfig({
|
|
31
23
|
displayName: "Operatorsstyle__Title",
|
|
32
24
|
componentId: "sc-vzf1ol-5"
|
|
33
|
-
})(["font-size:10px;line-height:1.6;font-weight:500;text-transform:uppercase;color:", ";padding:8px 12px;"],
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
export var Value = styled.span.withConfig({
|
|
25
|
+
})(["font-size:10px;line-height:1.6;font-weight:500;text-transform:uppercase;color:", ";padding:8px 12px;"], (props) => props.theme.palette["grey-500"]);
|
|
26
|
+
const Value = /* @__PURE__ */ styled.span.withConfig({
|
|
37
27
|
displayName: "Operatorsstyle__Value",
|
|
38
28
|
componentId: "sc-vzf1ol-6"
|
|
39
|
-
})(["max-width:100px;text-overflow:ellipsis;overflow:hidden;"]);
|
|
29
|
+
})(["max-width:100px;text-overflow:ellipsis;overflow:hidden;"]);
|
|
30
|
+
export {
|
|
31
|
+
ContentPlaceholder,
|
|
32
|
+
ItemsList,
|
|
33
|
+
SearchResult,
|
|
34
|
+
SearchResultHighlight,
|
|
35
|
+
TabsWrapper,
|
|
36
|
+
Title,
|
|
37
|
+
Value
|
|
38
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OperatorsDropdownProps } from '../Operator.types';
|
|
3
3
|
declare const OperatorsDropdown: ({ texts, setSelected, groups, items, setDropdownVisible, value, outerHeight, }: OperatorsDropdownProps) => React.JSX.Element;
|
|
4
4
|
export default OperatorsDropdown;
|
|
@@ -1,186 +1,104 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
activeGroup = _useState3[0],
|
|
33
|
-
setActiveGroup = _useState3[1];
|
|
34
|
-
var _useState4 = useState(true),
|
|
35
|
-
searchInputCanBeFocused = _useState4[0],
|
|
36
|
-
setSearchInputFocus = _useState4[1];
|
|
37
|
-
useEffect(function () {
|
|
38
|
-
var defaultIndex = groups == null ? void 0 : groups.findIndex(function (group) {
|
|
39
|
-
return group.defaultGroup || value && group.id === value.groupId;
|
|
40
|
-
});
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState, useEffect, useMemo, useCallback } from "react";
|
|
3
|
+
import { v4 } from "uuid";
|
|
4
|
+
import { theme } from "@synerise/ds-core";
|
|
5
|
+
import Dropdown from "@synerise/ds-dropdown";
|
|
6
|
+
import Icon, { SearchM } from "@synerise/ds-icon";
|
|
7
|
+
import Result from "@synerise/ds-result";
|
|
8
|
+
import Scrollbar from "@synerise/ds-scrollbar";
|
|
9
|
+
import Tabs from "@synerise/ds-tabs";
|
|
10
|
+
import { focusWithArrowKeys } from "@synerise/ds-utils";
|
|
11
|
+
import { TabsWrapper, ItemsList } from "../Operators.style.js";
|
|
12
|
+
import { DEFAULT_TAB_INDEX, NO_GROUP_NAME, DROPDOWN_HEIGHT, TABS_HEIGHT, SEARCH_HEIGHT, PADDING } from "../constants.js";
|
|
13
|
+
import { groupByGroupName } from "../utils/groupByGroupName.js";
|
|
14
|
+
import OperatorsDropdownGroupName from "./OperatorsDropdownGroupName.js";
|
|
15
|
+
import OperatorsDropdownItem from "./OperatorsDropdownItem.js";
|
|
16
|
+
const OperatorsDropdown = ({
|
|
17
|
+
texts,
|
|
18
|
+
setSelected,
|
|
19
|
+
groups,
|
|
20
|
+
items,
|
|
21
|
+
setDropdownVisible,
|
|
22
|
+
value,
|
|
23
|
+
outerHeight = DROPDOWN_HEIGHT
|
|
24
|
+
}) => {
|
|
25
|
+
const overlayRef = useRef(null);
|
|
26
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
27
|
+
const [activeTab, setActiveTab] = useState(DEFAULT_TAB_INDEX);
|
|
28
|
+
const [activeGroup, setActiveGroup] = useState(void 0);
|
|
29
|
+
const [searchInputCanBeFocused, setSearchInputFocus] = useState(true);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
const defaultIndex = groups?.findIndex((group) => group.defaultGroup || value && group.id === value.groupId);
|
|
41
32
|
setActiveTab(defaultIndex === -1 ? DEFAULT_TAB_INDEX : defaultIndex);
|
|
42
33
|
}, [groups, value]);
|
|
43
|
-
|
|
44
|
-
return
|
|
34
|
+
const classNames = useMemo(() => {
|
|
35
|
+
return `ds-operator-item ds-operator-item-${v4()}`;
|
|
45
36
|
}, []);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Object.keys(groupedItems).forEach(
|
|
37
|
+
const renderGroupedItems = useCallback((activeItems) => {
|
|
38
|
+
const groupedItems = groupByGroupName(activeItems);
|
|
39
|
+
const renderedItems = [];
|
|
40
|
+
Object.keys(groupedItems).forEach((key) => {
|
|
50
41
|
if (key !== NO_GROUP_NAME) {
|
|
51
|
-
renderedItems.push(
|
|
52
|
-
"data-testid": "operator-group-title",
|
|
53
|
-
name: key
|
|
54
|
-
}));
|
|
42
|
+
renderedItems.push(/* @__PURE__ */ jsx(OperatorsDropdownGroupName, { "data-testid": "operator-group-title", name: key }));
|
|
55
43
|
}
|
|
56
|
-
groupedItems[key].forEach(
|
|
57
|
-
return renderedItems.push(/*#__PURE__*/React.createElement(OperatorsDropdownItem, {
|
|
58
|
-
className: classNames,
|
|
59
|
-
key: uuid(),
|
|
60
|
-
item: item,
|
|
61
|
-
searchQuery: searchQuery,
|
|
62
|
-
hideDropdown: function hideDropdown() {
|
|
63
|
-
return setDropdownVisible(false);
|
|
64
|
-
},
|
|
65
|
-
select: setSelected,
|
|
66
|
-
selected: Boolean(value) && item.id === (value == null ? void 0 : value.id)
|
|
67
|
-
}));
|
|
68
|
-
});
|
|
44
|
+
groupedItems[key].forEach((item) => renderedItems.push(/* @__PURE__ */ jsx(OperatorsDropdownItem, { className: classNames, item, searchQuery, hideDropdown: () => setDropdownVisible(false), select: setSelected, selected: Boolean(value) && item.id === value?.id }, v4())));
|
|
69
45
|
});
|
|
70
46
|
return renderedItems;
|
|
71
47
|
}, [searchQuery, setDropdownVisible, setSelected, value, classNames]);
|
|
72
|
-
|
|
73
|
-
return groups
|
|
48
|
+
const currentTabItems = useMemo(() => {
|
|
49
|
+
return groups?.find((group, index) => {
|
|
74
50
|
return activeTab === index;
|
|
75
51
|
});
|
|
76
52
|
}, [groups, activeTab]);
|
|
77
|
-
|
|
78
|
-
return
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return /*#__PURE__*/React.createElement(OperatorsDropdownItem, {
|
|
82
|
-
className: classNames,
|
|
83
|
-
key: item.name + item.groupId,
|
|
84
|
-
item: item,
|
|
85
|
-
searchQuery: searchQuery,
|
|
86
|
-
clearSearch: function clearSearch() {
|
|
87
|
-
return setSearchQuery('');
|
|
88
|
-
},
|
|
89
|
-
hideDropdown: function hideDropdown() {
|
|
90
|
-
return setDropdownVisible(false);
|
|
91
|
-
},
|
|
92
|
-
select: setSelected,
|
|
93
|
-
selected: Boolean(value) && item.id === (value == null ? void 0 : value.id)
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
}, [items, searchQuery, setDropdownVisible, setSelected, value, classNames]);
|
|
97
|
-
var currentItems = useMemo(function () {
|
|
53
|
+
const filteredItems = useMemo(() => items.filter((item) => item.name.toLowerCase().includes(searchQuery.toLowerCase())).map((item) => {
|
|
54
|
+
return /* @__PURE__ */ jsx(OperatorsDropdownItem, { className: classNames, item, searchQuery, clearSearch: () => setSearchQuery(""), hideDropdown: () => setDropdownVisible(false), select: setSelected, selected: Boolean(value) && item.id === value?.id }, item.name + item.groupId);
|
|
55
|
+
}), [items, searchQuery, setDropdownVisible, setSelected, value, classNames]);
|
|
56
|
+
const currentItems = useMemo(() => {
|
|
98
57
|
if (searchQuery) {
|
|
99
58
|
return filteredItems;
|
|
100
59
|
}
|
|
101
|
-
|
|
60
|
+
const hasSubgroups = Boolean(currentTabItems?.subGroups);
|
|
102
61
|
if (hasSubgroups && !activeGroup) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
return /*#__PURE__*/React.createElement(OperatorsDropdownItem, {
|
|
106
|
-
className: classNames,
|
|
107
|
-
key: subGroup.name + subGroup.id,
|
|
108
|
-
item: subGroup,
|
|
109
|
-
searchQuery: searchQuery,
|
|
110
|
-
select: setActiveGroup
|
|
111
|
-
});
|
|
62
|
+
return currentTabItems?.subGroups?.map((subGroup) => {
|
|
63
|
+
return /* @__PURE__ */ jsx(OperatorsDropdownItem, { className: classNames, item: subGroup, searchQuery, select: setActiveGroup }, subGroup.name + subGroup.id);
|
|
112
64
|
});
|
|
113
65
|
}
|
|
114
|
-
if (activeGroup
|
|
115
|
-
return renderGroupedItems(items
|
|
116
|
-
return item.groupId === activeGroup.id;
|
|
117
|
-
}));
|
|
66
|
+
if (activeGroup?.id) {
|
|
67
|
+
return renderGroupedItems(items?.filter((item) => item.groupId === activeGroup.id));
|
|
118
68
|
}
|
|
119
|
-
return renderGroupedItems(items
|
|
120
|
-
var _groups$activeTab;
|
|
121
|
-
return item.groupId === ((_groups$activeTab = groups[activeTab]) == null ? void 0 : _groups$activeTab.id);
|
|
122
|
-
}));
|
|
69
|
+
return renderGroupedItems(items?.filter((item) => item.groupId === groups[activeTab]?.id));
|
|
123
70
|
}, [currentTabItems, items, groups, searchQuery, activeTab, filteredItems, activeGroup, renderGroupedItems, classNames]);
|
|
124
|
-
|
|
71
|
+
const handleSearch = useCallback((val) => {
|
|
125
72
|
setSearchQuery(val);
|
|
126
73
|
}, [setSearchQuery]);
|
|
127
|
-
|
|
128
|
-
return
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
tooltip: group.tooltip
|
|
132
|
-
};
|
|
74
|
+
const getTabs = useMemo(() => {
|
|
75
|
+
return groups?.map((group) => ({
|
|
76
|
+
icon: group.icon,
|
|
77
|
+
tooltip: group.tooltip
|
|
133
78
|
})) || [];
|
|
134
79
|
}, [groups]);
|
|
135
|
-
|
|
136
|
-
|
|
80
|
+
const hasTabs = getTabs.length > 1;
|
|
81
|
+
const dropdownContentHeight = useMemo(() => {
|
|
137
82
|
return outerHeight - (!searchQuery && hasTabs ? TABS_HEIGHT : 0) - SEARCH_HEIGHT;
|
|
138
83
|
}, [hasTabs, searchQuery, outerHeight]);
|
|
139
|
-
return
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
}, /*#__PURE__*/React.createElement(Dropdown.SearchInput, {
|
|
152
|
-
onSearchChange: handleSearch,
|
|
153
|
-
onClearInput: function onClearInput() {
|
|
154
|
-
return handleSearch('');
|
|
155
|
-
},
|
|
156
|
-
placeholder: texts.searchPlaceholder,
|
|
157
|
-
value: searchQuery,
|
|
158
|
-
autofocus: !searchQuery || searchInputCanBeFocused,
|
|
159
|
-
autofocusDelay: 50,
|
|
160
|
-
iconLeft: /*#__PURE__*/React.createElement(Icon, {
|
|
161
|
-
component: /*#__PURE__*/React.createElement(SearchM, null),
|
|
162
|
-
color: theme.palette['grey-600']
|
|
163
|
-
})
|
|
164
|
-
}), searchQuery === '' && hasTabs && /*#__PURE__*/React.createElement(S.TabsWrapper, null, /*#__PURE__*/React.createElement(Tabs, {
|
|
165
|
-
block: true,
|
|
166
|
-
tabs: getTabs,
|
|
167
|
-
activeTab: activeTab,
|
|
168
|
-
handleTabClick: function handleTabClick(index) {
|
|
84
|
+
return /* @__PURE__ */ jsxs(Dropdown.Wrapper, { "data-testid": "ds-operators-dropdown-wrapper", style: {
|
|
85
|
+
zIndex: 1005
|
|
86
|
+
}, ref: overlayRef, onKeyDown: (e) => {
|
|
87
|
+
setSearchInputFocus(false);
|
|
88
|
+
searchQuery && focusWithArrowKeys(e, classNames.split(" ")[1], () => {
|
|
89
|
+
setSearchInputFocus(true);
|
|
90
|
+
});
|
|
91
|
+
}, children: [
|
|
92
|
+
/* @__PURE__ */ jsx(Dropdown.SearchInput, { onSearchChange: handleSearch, onClearInput: () => handleSearch(""), placeholder: texts.searchPlaceholder, value: searchQuery, autofocus: !searchQuery || searchInputCanBeFocused, autofocusDelay: 50, iconLeft: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchM, {}), color: theme.palette["grey-600"] }) }),
|
|
93
|
+
searchQuery === "" && hasTabs && /* @__PURE__ */ jsx(TabsWrapper, { children: /* @__PURE__ */ jsx(Tabs, { block: true, tabs: getTabs, activeTab, handleTabClick: (index) => {
|
|
169
94
|
setActiveTab(index);
|
|
170
|
-
setActiveGroup(
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
contentHeight: dropdownContentHeight
|
|
174
|
-
}, /*#__PURE__*/React.createElement(Scrollbar, {
|
|
175
|
-
absolute: true,
|
|
176
|
-
maxHeight: dropdownContentHeight,
|
|
177
|
-
style: {
|
|
95
|
+
setActiveGroup(void 0);
|
|
96
|
+
} }) }),
|
|
97
|
+
/* @__PURE__ */ jsx(ItemsList, { contentHeight: dropdownContentHeight, children: /* @__PURE__ */ jsx(Scrollbar, { absolute: true, maxHeight: dropdownContentHeight, style: {
|
|
178
98
|
padding: PADDING
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}))));
|
|
99
|
+
}, children: currentItems?.length ? currentItems : /* @__PURE__ */ jsx(Result, { noSearchResults: true, type: "no-results", description: texts.noResults }) }) })
|
|
100
|
+
] });
|
|
101
|
+
};
|
|
102
|
+
export {
|
|
103
|
+
OperatorsDropdown as default
|
|
185
104
|
};
|
|
186
|
-
export default OperatorsDropdown;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Title } from "../Operators.style.js";
|
|
3
|
+
const OperatorsDropdownGroupName = ({
|
|
4
|
+
name
|
|
5
|
+
}) => {
|
|
6
|
+
return /* @__PURE__ */ jsx(Title, { "data-testid": "operator-group-title", children: name });
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
OperatorsDropdownGroupName as default
|
|
8
10
|
};
|
|
9
|
-
export default OperatorsDropdownGroupName;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OperatorsGroup, OperatorsItem } from '../Operator.types';
|
|
3
3
|
type OperatorsDropdownItemProps = {
|
|
4
4
|
item: OperatorsItem | OperatorsGroup;
|
|
5
5
|
searchQuery: string;
|
|
@@ -1,31 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { theme } from
|
|
3
|
-
import Icon, { CheckS } from
|
|
4
|
-
import ListItem from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
color: theme.palette['green-600']
|
|
23
|
-
}),
|
|
24
|
-
onClick: function onClick() {
|
|
25
|
-
clearSearch && clearSearch();
|
|
26
|
-
hideDropdown && hideDropdown();
|
|
27
|
-
select && select(item);
|
|
28
|
-
}
|
|
29
|
-
}, item.name);
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { theme } from "@synerise/ds-core";
|
|
3
|
+
import Icon, { CheckS } from "@synerise/ds-icon";
|
|
4
|
+
import ListItem from "@synerise/ds-list-item";
|
|
5
|
+
const OperatorsDropdownItem = ({
|
|
6
|
+
item,
|
|
7
|
+
clearSearch,
|
|
8
|
+
searchQuery,
|
|
9
|
+
hideDropdown,
|
|
10
|
+
select,
|
|
11
|
+
selected,
|
|
12
|
+
className
|
|
13
|
+
}) => {
|
|
14
|
+
return /* @__PURE__ */ jsx(ListItem, { className, prefixel: searchQuery && /* @__PURE__ */ jsx(Icon, { component: item.icon }), highlight: searchQuery, suffixel: selected && /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CheckS, {}), color: theme.palette["green-600"] }), onClick: () => {
|
|
15
|
+
clearSearch && clearSearch();
|
|
16
|
+
hideDropdown && hideDropdown();
|
|
17
|
+
select && select(item);
|
|
18
|
+
}, children: item.name }, item.name + item.id);
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
OperatorsDropdownItem as default
|
|
30
22
|
};
|
|
31
|
-
export default OperatorsDropdownItem;
|
package/dist/constants.js
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
const NO_GROUP_NAME = "NO_GROUP_NAME";
|
|
2
|
+
const DROPDOWN_HEIGHT = 420;
|
|
3
|
+
const DROPDOWN_HEIGHT_BELOW_THRESHOLD = 350;
|
|
4
|
+
const DROPDOWN_HEIGHT_THRESHOLD = 900;
|
|
5
|
+
const SEARCH_HEIGHT = 53;
|
|
6
|
+
const TABS_HEIGHT = 50;
|
|
7
|
+
const PADDING = 8;
|
|
8
|
+
const DEFAULT_TAB_INDEX = 0;
|
|
9
|
+
export {
|
|
10
|
+
DEFAULT_TAB_INDEX,
|
|
11
|
+
DROPDOWN_HEIGHT,
|
|
12
|
+
DROPDOWN_HEIGHT_BELOW_THRESHOLD,
|
|
13
|
+
DROPDOWN_HEIGHT_THRESHOLD,
|
|
14
|
+
NO_GROUP_NAME,
|
|
15
|
+
PADDING,
|
|
16
|
+
SEARCH_HEIGHT,
|
|
17
|
+
TABS_HEIGHT
|
|
18
|
+
};
|
package/dist/index.js
CHANGED
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OperatorsItem } from '../Operator.types';
|
|
2
2
|
type GroupedOperators = Record<string, OperatorsItem[]>;
|
|
3
3
|
export declare const groupByGroupName: (activeItems: OperatorsItem[]) => GroupedOperators;
|
|
4
4
|
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { NO_GROUP_NAME } from
|
|
2
|
-
|
|
3
|
-
return activeItems.reduce(
|
|
4
|
-
|
|
5
|
-
acc[groupName] = [
|
|
1
|
+
import { NO_GROUP_NAME } from "../constants.js";
|
|
2
|
+
const groupByGroupName = (activeItems) => {
|
|
3
|
+
return activeItems.reduce((acc, item) => {
|
|
4
|
+
const groupName = item.groupName || NO_GROUP_NAME;
|
|
5
|
+
acc[groupName] = [...acc[groupName] || [], item];
|
|
6
6
|
return acc;
|
|
7
7
|
}, {});
|
|
8
|
-
};
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
groupByGroupName
|
|
11
|
+
};
|
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-operators",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.24",
|
|
4
4
|
"description": "Operators UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-button": "^1.5.
|
|
39
|
-
"@synerise/ds-dropdown": "^1.3.
|
|
40
|
-
"@synerise/ds-icon": "^1.
|
|
41
|
-
"@synerise/ds-list-item": "^1.4.
|
|
42
|
-
"@synerise/ds-result": "^1.0.
|
|
43
|
-
"@synerise/ds-scrollbar": "^1.2.
|
|
44
|
-
"@synerise/ds-tabs": "^1.1.
|
|
45
|
-
"@synerise/ds-tooltip": "^1.4.
|
|
46
|
-
"@synerise/ds-utils": "^1.
|
|
38
|
+
"@synerise/ds-button": "^1.5.18",
|
|
39
|
+
"@synerise/ds-dropdown": "^1.3.2",
|
|
40
|
+
"@synerise/ds-icon": "^1.15.1",
|
|
41
|
+
"@synerise/ds-list-item": "^1.4.10",
|
|
42
|
+
"@synerise/ds-result": "^1.0.49",
|
|
43
|
+
"@synerise/ds-scrollbar": "^1.2.17",
|
|
44
|
+
"@synerise/ds-tabs": "^1.1.24",
|
|
45
|
+
"@synerise/ds-tooltip": "^1.4.10",
|
|
46
|
+
"@synerise/ds-utils": "^1.7.1",
|
|
47
47
|
"uuid": "^8.3.2"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
53
53
|
"styled-components": "^5.3.3"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
56
56
|
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const OPERATORS_TEXTS: {
|
|
3
|
-
buttonLabel: string;
|
|
4
|
-
searchPlaceholder: string;
|
|
5
|
-
noResults: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const OPERATORS_GROUPS: ({
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
temsType: null;
|
|
11
|
-
tooltip: string;
|
|
12
|
-
icon: React.JSX.Element;
|
|
13
|
-
defaultGroup: boolean;
|
|
14
|
-
itemsType?: undefined;
|
|
15
|
-
} | {
|
|
16
|
-
id: string;
|
|
17
|
-
name: string;
|
|
18
|
-
itemsType: null;
|
|
19
|
-
tooltip: string;
|
|
20
|
-
icon: React.JSX.Element;
|
|
21
|
-
defaultGroup: boolean;
|
|
22
|
-
temsType?: undefined;
|
|
23
|
-
})[];
|
|
24
|
-
export declare const OPERATORS_ITEMS: ({
|
|
25
|
-
id: string;
|
|
26
|
-
value: string;
|
|
27
|
-
logic: string;
|
|
28
|
-
name: string;
|
|
29
|
-
groupId: string;
|
|
30
|
-
group: string;
|
|
31
|
-
icon: React.JSX.Element;
|
|
32
|
-
groupName?: undefined;
|
|
33
|
-
} | {
|
|
34
|
-
id: string;
|
|
35
|
-
value: string;
|
|
36
|
-
logic: string;
|
|
37
|
-
name: string;
|
|
38
|
-
groupId: string;
|
|
39
|
-
group: string;
|
|
40
|
-
icon: React.JSX.Element;
|
|
41
|
-
groupName: string;
|
|
42
|
-
})[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|