@synerise/ds-filter 0.16.4 → 0.17.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,28 @@
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.17.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.17.0...@synerise/ds-filter@0.17.1) (2024-02-19)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **filter:** fixes z-index of .ghost-element ([b27386b](https://github.com/Synerise/synerise-design/commit/b27386bb5f1f421d89919c23470bba08dbecb342))
12
+
13
+
14
+
15
+
16
+
17
+ # [0.17.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.16.4...@synerise/ds-filter@0.17.0) (2024-02-15)
18
+
19
+
20
+ ### Features
21
+
22
+ * **filter:** updates styles for brackets ([0a3ba5f](https://github.com/Synerise/synerise-design/commit/0a3ba5f90cb120347de5d06669147263cd8d7575))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [0.16.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.16.3...@synerise/ds-filter@0.16.4) (2024-02-06)
7
29
 
8
30
 
package/dist/Filter.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { FilterProps } from './Filter.types';
2
- declare const Filter: ({ maxConditionsLimit, expressions, matching, onChangeOrder, onChangeLogic, onChangeStepMatching, onChangeStepName, onDeleteStep, onDuplicateStep, renderStepFooter, renderStepContent, renderStepHeaderRightSide, addFilterComponent, texts, logicOptions, renderHeaderRightSide, visibilityConfig, readOnly, }: FilterProps) => JSX.Element;
2
+ declare const Filter: ({ maxConditionsLimit, expressions, matching, onChangeOrder, onChangeLogic, onChangeStepMatching, onChangeStepName, onDeleteStep, onDuplicateStep, renderStepFooter, renderStepContent, renderStepHeaderRightSide, addFilterComponent, texts, logicOptions, renderHeaderRightSide, visibilityConfig, readOnly, getMoveByLabel, }: FilterProps) => JSX.Element;
3
3
  export default Filter;
package/dist/Filter.js CHANGED
@@ -54,7 +54,8 @@ var Filter = function Filter(_ref) {
54
54
  isStepCardHeaderVisible: true
55
55
  } : _ref$visibilityConfig,
56
56
  _ref$readOnly = _ref.readOnly,
57
- readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly;
57
+ readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
58
+ getMoveByLabel = _ref.getMoveByLabel;
58
59
  var previousExpressions = usePrevious(expressions);
59
60
 
60
61
  var _useState = useState(null),
@@ -192,6 +193,12 @@ var Filter = function Filter(_ref) {
192
193
  moveTooltip: formatMessage({
193
194
  id: 'DS.STEP-CARD.MOVE'
194
195
  }),
196
+ moveUpTooltip: formatMessage({
197
+ id: 'DS.STEP-CARD.MOVE_UP'
198
+ }),
199
+ moveDownTooltip: formatMessage({
200
+ id: 'DS.STEP-CARD.MOVE_DOWN'
201
+ }),
195
202
  deleteTooltip: formatMessage({
196
203
  id: 'DS.STEP-CARD.DELETE'
197
204
  }),
@@ -274,11 +281,12 @@ var Filter = function Filter(_ref) {
274
281
  children: renderStepContent && renderStepContent(expression, !!activeExpressionId && !isActive(expression)),
275
282
  isHeaderVisible: visibilityConfig.isStepCardHeaderVisible,
276
283
  headerRightSide: renderStepHeaderRightSide && renderStepHeaderRightSide(expression, index),
284
+ getMoveByLabel: getMoveByLabel,
277
285
  texts: _objectSpread({}, text.step, {}, contextTypeTexts)
278
286
  })
279
287
  };
280
288
  return props[expression.type];
281
- }, [activeExpressionId, getContextTypeTexts, handleMove, isActive, isLimitExceeded, logicOptions, movedExpressionId, onChangeLogic, onChangeStepMatching, onChangeStepName, onDeleteStep, onDuplicateStep, renderStepContent, renderStepFooter, renderStepHeaderRightSide, stepExpressionCount, text.step, visibilityConfig.isStepCardHeaderVisible]);
289
+ }, [activeExpressionId, getContextTypeTexts, getMoveByLabel, handleMove, isActive, isLimitExceeded, logicOptions, onChangeLogic, onChangeStepMatching, onChangeStepName, onDeleteStep, onDuplicateStep, renderStepContent, renderStepFooter, renderStepHeaderRightSide, stepExpressionCount, text.step, visibilityConfig.isStepCardHeaderVisible]);
282
290
  var renderExpression = useCallback(function (expression, index) {
283
291
  var Component = component[expression.type];
284
292
  var LogicComponent = expression.logic && component[expression.logic.type];
@@ -7,15 +7,15 @@ export var FilterWrapper = styled.div.withConfig({
7
7
  export var FilterHeader = styled.div.withConfig({
8
8
  displayName: "Filterstyles__FilterHeader",
9
9
  componentId: "w5f27p-1"
10
- })(["display:flex;flex-direction:row;justify-content:space-between;width:100%;margin-bottom:24px;"]);
10
+ })(["width:100%;display:flex;margin-bottom:24px;flex-direction:row;align-items:center;justify-content:space-between;"]);
11
11
  export var FilterHeaderRightSide = styled.div.withConfig({
12
12
  displayName: "Filterstyles__FilterHeaderRightSide",
13
13
  componentId: "w5f27p-2"
14
- })(["align-self:flex-end;flex:0 0 auto;"]);
14
+ })(["flex:1;overflow-x:hidden;"]);
15
15
  export var MatchingWrapper = styled.div.withConfig({
16
16
  displayName: "Filterstyles__MatchingWrapper",
17
17
  componentId: "w5f27p-3"
18
- })(["display:flex;align-items:center;justify-content:space-between;align-content:flex-end;"]);
18
+ })(["flex:0 0 auto;margin-right:24px;"]);
19
19
  export var ConditionsLimit = styled.div.withConfig({
20
20
  displayName: "Filterstyles__ConditionsLimit",
21
21
  componentId: "w5f27p-4"
@@ -31,7 +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;&.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) {
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;&&&&.ghost-element{z-index:100 !important;}", "{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) {
35
35
  return props.theme.palette['blue-050'];
36
36
  }, function (props) {
37
37
  return props.theme.palette['blue-600'];
@@ -45,6 +45,6 @@ export var AddButtonWrapper = styled.div.withConfig({
45
45
  export var FilterTitle = styled.div.withConfig({
46
46
  displayName: "Filterstyles__FilterTitle",
47
47
  componentId: "w5f27p-9"
48
- })(["font-size:16px;font-weight:500;line-height:1.25;color:", ";text-align:left;user-select:none;margin-bottom:24px;&:first-letter{text-transform:uppercase;}"], function (props) {
48
+ })(["font-size:16px;font-weight:500;line-height:1.25;color:", ";text-align:left;user-select:none;margin-bottom:24px;flex:0 0 auto;&:first-letter{text-transform:uppercase;}"], function (props) {
49
49
  return props.theme.palette['grey-800'];
50
50
  });
@@ -35,6 +35,7 @@ export type FilterProps = {
35
35
  logicOptions?: LogicOperator[];
36
36
  readOnly?: boolean;
37
37
  renderHeaderRightSide?: (expressions: Expression[]) => React.ReactNode;
38
+ getMoveByLabel?: (moveByOffset: number) => string;
38
39
  texts?: {
39
40
  matching?: MatchingTexts;
40
41
  step?: {
@@ -50,6 +51,8 @@ export type FilterProps = {
50
51
  notEvent?: string;
51
52
  namePlaceholder?: string;
52
53
  moveTooltip?: string;
54
+ moveUpTooltip?: string;
55
+ moveDownTooltip?: string;
53
56
  deleteTooltip?: string;
54
57
  duplicateTooltip?: string;
55
58
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-filter",
3
- "version": "0.16.4",
3
+ "version": "0.17.1",
4
4
  "description": "Filter UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -35,7 +35,7 @@
35
35
  "dependencies": {
36
36
  "@synerise/ds-button": "^0.19.0",
37
37
  "@synerise/ds-logic": "^0.8.22",
38
- "@synerise/ds-step-card": "^0.10.4",
38
+ "@synerise/ds-step-card": "^0.10.6",
39
39
  "@synerise/ds-utils": "^0.24.24",
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": "413b02fb31c0c6fb8631fde0bc5b00e16f7f30b7"
54
+ "gitHead": "17e3bca1d4d134a28aaa186f0e2637616ca86174"
55
55
  }