@synerise/ds-operators 0.7.8 → 0.8.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,42 @@
|
|
|
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
|
+
## [0.8.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-operators@0.8.0...@synerise/ds-operators@0.8.1) (2022-04-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* fix filter dropdowns ([eaab107](https://github.com/Synerise/synerise-design/commit/eaab107b6dca7401a17c2e36806febd11edc677b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [0.8.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-operators@0.7.9...@synerise/ds-operators@0.8.0) (2022-04-05)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **operators:** fixes scrolling operator dropdown with page ([78fd630](https://github.com/Synerise/synerise-design/commit/78fd63003cc4aa7a651b4a4e766bc4d1b5b292d3))
|
|
23
|
+
* fix eslint errors ([7cce9b9](https://github.com/Synerise/synerise-design/commit/7cce9b94f8dea533b3c36a0f0cfd5145d4737166))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* **filter:** fixes bugs ([b862ddd](https://github.com/Synerise/synerise-design/commit/b862dddbce1293c2a5381663fc903bb574edd135))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [0.7.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-operators@0.7.8...@synerise/ds-operators@0.7.9) (2022-03-30)
|
|
35
|
+
|
|
36
|
+
**Note:** Version bump only for package @synerise/ds-operators
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
6
42
|
## [0.7.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-operators@0.7.7...@synerise/ds-operators@0.7.8) (2022-03-24)
|
|
7
43
|
|
|
8
44
|
**Note:** Version bump only for package @synerise/ds-operators
|
package/dist/Operators.js
CHANGED
|
@@ -51,14 +51,16 @@ var Operators = function Operators(_ref) {
|
|
|
51
51
|
onChange(val);
|
|
52
52
|
}, [onChange]);
|
|
53
53
|
React.useEffect(function () {
|
|
54
|
+
setDropdownVisible(Boolean(opened));
|
|
55
|
+
|
|
54
56
|
if (opened) {
|
|
55
|
-
|
|
57
|
+
onActivate && onActivate();
|
|
56
58
|
}
|
|
57
|
-
}, [opened]);
|
|
59
|
+
}, [onActivate, opened]);
|
|
58
60
|
var handleClick = React.useCallback(function () {
|
|
59
|
-
setDropdownVisible(true);
|
|
60
61
|
onActivate && onActivate();
|
|
61
|
-
|
|
62
|
+
setDropdownVisible(true);
|
|
63
|
+
}, [onActivate]);
|
|
62
64
|
var onDropdownVisibilityChange = React.useCallback(function (newValue) {
|
|
63
65
|
return newValue && onActivate && onActivate();
|
|
64
66
|
}, [onActivate]);
|
|
@@ -67,7 +69,7 @@ var Operators = function Operators(_ref) {
|
|
|
67
69
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
68
70
|
visible: dropdownVisible,
|
|
69
71
|
onVisibleChange: onDropdownVisibilityChange,
|
|
70
|
-
getPopupContainer: getPopupContainerOverride,
|
|
72
|
+
getPopupContainer: getPopupContainerOverride || getPopupContainer,
|
|
71
73
|
overlay: /*#__PURE__*/React.createElement(OperatorsDropdown, {
|
|
72
74
|
value: value,
|
|
73
75
|
setDropdownVisible: setDropdownVisible,
|
|
@@ -18,19 +18,13 @@ var OperatorsDropdown = function OperatorsDropdown(_ref) {
|
|
|
18
18
|
items = _ref.items,
|
|
19
19
|
setDropdownVisible = _ref.setDropdownVisible,
|
|
20
20
|
value = _ref.value;
|
|
21
|
-
var defaultTab = React.useMemo(function () {
|
|
22
|
-
var defaultIndex = groups == null ? void 0 : groups.findIndex(function (group) {
|
|
23
|
-
return group.defaultGroup;
|
|
24
|
-
});
|
|
25
|
-
return defaultIndex || 0;
|
|
26
|
-
}, [groups]);
|
|
27
21
|
var overlayRef = React.useRef(null);
|
|
28
22
|
|
|
29
23
|
var _React$useState = React.useState(''),
|
|
30
24
|
searchQuery = _React$useState[0],
|
|
31
25
|
setSearchQuery = _React$useState[1];
|
|
32
26
|
|
|
33
|
-
var _React$useState2 = React.useState(
|
|
27
|
+
var _React$useState2 = React.useState(0),
|
|
34
28
|
activeTab = _React$useState2[0],
|
|
35
29
|
setActiveTab = _React$useState2[1];
|
|
36
30
|
|
|
@@ -42,6 +36,12 @@ var OperatorsDropdown = function OperatorsDropdown(_ref) {
|
|
|
42
36
|
searchInputCanBeFocused = _React$useState4[0],
|
|
43
37
|
setSearchInputFocus = _React$useState4[1];
|
|
44
38
|
|
|
39
|
+
React.useEffect(function () {
|
|
40
|
+
var defaultIndex = groups == null ? void 0 : groups.findIndex(function (group) {
|
|
41
|
+
return group.defaultGroup || value && group.id === value.groupId;
|
|
42
|
+
});
|
|
43
|
+
setActiveTab(defaultIndex === -1 ? 0 : defaultIndex);
|
|
44
|
+
}, [groups, value]);
|
|
45
45
|
var classNames = React.useMemo(function () {
|
|
46
46
|
return "ds-operator-item ds-operator-item-" + uuid();
|
|
47
47
|
}, []);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-operators",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Operators UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
],
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@synerise/ds-button": "^0.17.
|
|
36
|
-
"@synerise/ds-dropdown": "^0.17.
|
|
37
|
-
"@synerise/ds-icon": "^0.
|
|
38
|
-
"@synerise/ds-menu": "^0.13.
|
|
39
|
-
"@synerise/ds-result": "^0.6.
|
|
40
|
-
"@synerise/ds-scrollbar": "^0.4.
|
|
41
|
-
"@synerise/ds-tabs": "^0.13.
|
|
35
|
+
"@synerise/ds-button": "^0.17.2",
|
|
36
|
+
"@synerise/ds-dropdown": "^0.17.16",
|
|
37
|
+
"@synerise/ds-icon": "^0.49.0",
|
|
38
|
+
"@synerise/ds-menu": "^0.13.2",
|
|
39
|
+
"@synerise/ds-result": "^0.6.9",
|
|
40
|
+
"@synerise/ds-scrollbar": "^0.4.7",
|
|
41
|
+
"@synerise/ds-tabs": "^0.13.10",
|
|
42
42
|
"@synerise/ds-utils": "^0.19.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@synerise/ds-core": "*",
|
|
46
46
|
"react": ">=16.9.0 < 17.0.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "78a3de75d8ec9c917d96c1b54c70d24f50dc8c7a"
|
|
49
49
|
}
|