@synerise/ds-filter 0.9.1 → 0.10.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,37 @@
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.10.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.10.0...@synerise/ds-filter@0.10.1) (2022-06-29)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-filter
9
+
10
+
11
+
12
+
13
+
14
+ # [0.10.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.9.2...@synerise/ds-filter@0.10.0) (2022-06-21)
15
+
16
+
17
+ ### Features
18
+
19
+ * **filter:** adds logicOptions prop ([74b41c7](https://github.com/Synerise/synerise-design/commit/74b41c7858b6920528aef4ba4c0826833aeaac58))
20
+
21
+
22
+
23
+
24
+
25
+ ## [0.9.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.9.1...@synerise/ds-filter@0.9.2) (2022-06-20)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **filter:** adds ability to override default translation ([ea9d27c](https://github.com/Synerise/synerise-design/commit/ea9d27c018678539a5b835273b8110175334d51b))
31
+ * **filter:** update text prop types ([663e4f9](https://github.com/Synerise/synerise-design/commit/663e4f9ecd327e5414f8424d43711dc2c3f0c563))
32
+
33
+
34
+
35
+
36
+
6
37
  ## [0.9.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.9.0...@synerise/ds-filter@0.9.1) (2022-06-15)
7
38
 
8
39
  **Note:** Version bump only for package @synerise/ds-filter
package/dist/Filter.js CHANGED
@@ -41,7 +41,8 @@ var Filter = function Filter(_ref) {
41
41
  renderStepFooter = _ref.renderStepFooter,
42
42
  renderStepContent = _ref.renderStepContent,
43
43
  addFilterComponent = _ref.addFilterComponent,
44
- texts = _ref.texts;
44
+ texts = _ref.texts,
45
+ logicOptions = _ref.logicOptions;
45
46
  var previousExpressions = usePrevious(expressions);
46
47
 
47
48
  var _React$useState = React.useState(null),
@@ -118,14 +119,14 @@ var Filter = function Filter(_ref) {
118
119
  id: 'DS.STEP-CARD.DUPLICATE'
119
120
  })
120
121
  }, texts == null ? void 0 : texts.step),
121
- placeholder: {
122
+ placeholder: _objectSpread({
122
123
  chooseCondition: formatMessage({
123
124
  id: 'DS.PLACEHOLDER.CHOOSE-CONDITION'
124
125
  }),
125
126
  getPreview: formatMessage({
126
127
  id: 'DS.PLACEHOLDER.GET-PREVIEW'
127
128
  })
128
- }
129
+ }, texts == null ? void 0 : texts.placeholder)
129
130
  });
130
131
  }, [formatMessage, texts]);
131
132
  var getContextTypeTexts = React.useCallback(function (expression) {
@@ -145,7 +146,8 @@ var Filter = function Filter(_ref) {
145
146
  LOGIC: {
146
147
  onChange: function onChange(value) {
147
148
  return onChangeLogic(expression.id, value);
148
- }
149
+ },
150
+ options: logicOptions
149
151
  },
150
152
  STEP: {
151
153
  onChangeMatching: function onChangeMatching(value) {
@@ -166,7 +168,7 @@ var Filter = function Filter(_ref) {
166
168
  }
167
169
  };
168
170
  return props[expression.type];
169
- }, [activeExpressionId, getContextTypeTexts, isActive, onChangeLogic, onChangeStepMatching, onChangeStepName, onDeleteStep, onDuplicateStep, renderStepContent, renderStepFooter, text.step]);
171
+ }, [activeExpressionId, getContextTypeTexts, isActive, logicOptions, onChangeLogic, onChangeStepMatching, onChangeStepName, onDeleteStep, onDuplicateStep, renderStepContent, renderStepFooter, text.step]);
170
172
  var renderExpression = React.useCallback(function (expression, index) {
171
173
  var Component = component[expression.type];
172
174
  var LogicComponent = expression.logic && component[expression.logic.type];
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { LogicOperatorValue, LogicProps } from '@synerise/ds-logic/src/Logic.types';
2
+ import { LogicOperator, LogicOperatorValue, LogicProps } from '@synerise/ds-logic/src/Logic.types';
3
3
  import { StepCardProps } from '@synerise/ds-step-card/src/StepCard.types';
4
4
  import { MatchingProps, MatchingTexts } from '@synerise/ds-logic/src/Matching/Matching.types';
5
5
  declare type LogicType = {
@@ -27,6 +27,7 @@ export declare type FilterProps = {
27
27
  renderStepFooter?: (expression: Expression) => React.ReactNode;
28
28
  renderStepContent?: (expression: Expression, hoverDisabled?: boolean) => React.ReactNode;
29
29
  addFilterComponent?: React.ReactNode;
30
+ logicOptions?: LogicOperator[];
30
31
  texts?: {
31
32
  matching?: MatchingTexts;
32
33
  step?: {
@@ -43,6 +44,10 @@ export declare type FilterProps = {
43
44
  deleteTooltip?: string;
44
45
  duplicateTooltip?: string;
45
46
  };
47
+ placeholder?: {
48
+ chooseCondition?: string;
49
+ getPreview?: string;
50
+ };
46
51
  addFilter?: string;
47
52
  dropMeHere?: string;
48
53
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-filter",
3
- "version": "0.9.1",
3
+ "version": "0.10.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
  "@synerise/ds-button": "^0.17.2",
36
36
  "@synerise/ds-icon": "^0.49.0",
37
37
  "@synerise/ds-logic": "^0.7.0",
38
- "@synerise/ds-step-card": "^0.6.3",
38
+ "@synerise/ds-step-card": "^0.6.4",
39
39
  "react-sortablejs": "^6.0.0"
40
40
  },
41
41
  "peerDependencies": {
@@ -43,5 +43,5 @@
43
43
  "@synerise/ds-step-card": "*",
44
44
  "react": ">=16.9.0 < 17.0.0"
45
45
  },
46
- "gitHead": "d787395998e479858cb58f6d56555e4c51fe45d5"
46
+ "gitHead": "3df224bc0e56a55beaa9df7e0dcfbda4c04631ad"
47
47
  }