@synerise/ds-filter 0.16.0 → 0.16.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,17 @@
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.16.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.16.0...@synerise/ds-filter@0.16.1) (2024-01-15)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **filter:** fixed zindex issues ([71ce5bc](https://github.com/Synerise/synerise-design/commit/71ce5bcf25f2107fd1b43969d2c255e18c112b47))
12
+
13
+
14
+
15
+
16
+
6
17
  # [0.16.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.15.21...@synerise/ds-filter@0.16.0) (2023-12-14)
7
18
 
8
19
 
package/dist/Filter.js CHANGED
@@ -21,8 +21,9 @@ var component = {
21
21
  };
22
22
  var TRANSITION_DURATION = 0.5;
23
23
  var TRANSITION_DURATION_MAX = 1.5;
24
- var TOP_TRANSITION_ZINDEX = '10003';
25
- var BOTTOM_TRANSITION_ZINDEX = '10002';
24
+ var TOP_TRANSITION_ZINDEX = 10003;
25
+ var BOTTOM_TRANSITION_ZINDEX = 10002;
26
+ var DRAGGING_TRANSITION_ZINDEX = 10004;
26
27
 
27
28
  var rearrangeItems = function rearrangeItems(sourceArray, oldIndex, newIndex) {
28
29
  sourceArray.splice(newIndex, 0, sourceArray.splice(oldIndex, 1)[0]);
@@ -71,6 +72,13 @@ var Filter = function Filter(_ref) {
71
72
  filter: '.ds-matching-toggle, .step-card-right-side',
72
73
  onStart: function onStart() {
73
74
  movedExpressionId.current = null;
75
+ },
76
+ onChoose: function onChoose(evt) {
77
+ // eslint-disable-next-line no-param-reassign
78
+ evt.item.style.zIndex = DRAGGING_TRANSITION_ZINDEX;
79
+ },
80
+ onUnchoose: function onUnchoose(evt) {
81
+ evt.item.style.removeProperty('z-index');
74
82
  }
75
83
  };
76
84
  useEffect(function () {
@@ -282,9 +290,6 @@ var Filter = function Filter(_ref) {
282
290
  key: expression.id,
283
291
  "data-dropLabel": text.dropMeHere,
284
292
  index: index,
285
- style: !readOnly && isActive(expression) ? {
286
- zIndex: 10001
287
- } : undefined,
288
293
  onMouseDown: function onMouseDown() {
289
294
  return setActiveExpressionId(expression.id);
290
295
  }
@@ -293,7 +298,7 @@ var Filter = function Filter(_ref) {
293
298
  })), expression.logic && index + 1 < expressions.length && /*#__PURE__*/React.createElement(S.LogicWrapper, null, /*#__PURE__*/React.createElement(LogicComponent, _extends({}, expression.logic.data, componentProps(expression.logic, index), {
294
299
  readOnly: readOnly
295
300
  }))));
296
- }, [text.dropMeHere, isActive, componentProps, expressions.length, readOnly]);
301
+ }, [text.dropMeHere, componentProps, expressions.length, readOnly]);
297
302
  return /*#__PURE__*/React.createElement(S.FilterWrapper, null, /*#__PURE__*/React.createElement(S.FilterHeader, null, texts != null && (_texts$overwritten = texts.overwritten) != null && _texts$overwritten.filterTitle ? /*#__PURE__*/React.createElement(S.FilterTitle, null, texts.overwritten.filterTitle) : /*#__PURE__*/React.createElement(S.MatchingWrapper, null, /*#__PURE__*/React.createElement("div", null, matching && /*#__PURE__*/React.createElement(Matching, _extends({}, matching, {
298
303
  texts: text.matching,
299
304
  readOnly: readOnly
@@ -31,9 +31,7 @@ export var LogicWrapper = styled.div.withConfig({
31
31
  export var ExpressionWrapper = styled.div.withConfig({
32
32
  displayName: "Filterstyles__ExpressionWrapper",
33
33
  componentId: "w5f27p-7"
34
- })(["width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;z-index:", ";&.sortable-chosen{cursor:grabbing;width:100%;opacity:1 !important;height:50px;display:flex;align-items:center;justify-content:center;padding:0;box-shadow:0 16px 32px 0 #23293619;", "{visibility:visible;opacity:1;}", "{position:absolute;opacity:0;height:0;}", ",", "{display:none;}}&.ghost-element{cursor:grabbing;width:100%;background-color:", ";border-left:2px solid ", ";border-radius:3px;display:flex;align-items:center;justify-content:center;padding:0;margin-bottom:24px;height:68px;box-shadow:none;position:relative;&:before{content:attr(data-dropLabel);text-align:center;position:relative;color:", ";}*{position:absolute;opacity:0;height:0;}}"], function (props) {
35
- return 1000 - props.index;
36
- }, DragIcon, Body, Footer, LogicWrapper, function (props) {
34
+ })(["width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;&.sortable-chosen{cursor:grabbing;width:100%;opacity:1 !important;height:50px;display:flex;align-items:center;justify-content:center;padding:0;box-shadow:0 16px 32px 0 #23293619;", "{visibility:visible;opacity:1;}", "{position:absolute;opacity:0;height:0;}", ",", "{display:none;}}&.ghost-element{cursor:grabbing;width:100%;background-color:", ";border-left:2px solid ", ";border-radius:3px;display:flex;align-items:center;justify-content:center;padding:0;margin-bottom:24px;height:68px;box-shadow:none;position:relative;&:before{content:attr(data-dropLabel);text-align:center;position:relative;color:", ";}*{position:absolute;opacity:0;height:0;}}"], DragIcon, Body, Footer, LogicWrapper, function (props) {
37
35
  return props.theme.palette['blue-050'];
38
36
  }, function (props) {
39
37
  return props.theme.palette['blue-600'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-filter",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "Filter UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -33,9 +33,9 @@
33
33
  ],
34
34
  "types": "dist/index.d.ts",
35
35
  "dependencies": {
36
- "@synerise/ds-button": "^0.18.9",
37
- "@synerise/ds-logic": "^0.8.18",
38
- "@synerise/ds-step-card": "^0.10.0",
36
+ "@synerise/ds-button": "^0.18.10",
37
+ "@synerise/ds-logic": "^0.8.19",
38
+ "@synerise/ds-step-card": "^0.10.1",
39
39
  "@synerise/ds-utils": "^0.24.23",
40
40
  "react-intl": "3.12.0",
41
41
  "react-sortablejs": "^6.0.0",
@@ -51,5 +51,5 @@
51
51
  "@testing-library/dom": "^7.0.2",
52
52
  "@testing-library/jest-dom": "5.1.1"
53
53
  },
54
- "gitHead": "0a23e5f431033a6180383d3e0e19e885b5a66778"
54
+ "gitHead": "ba51e38beff83b8adba409f09311131f429ada01"
55
55
  }