@synerise/ds-filter 0.9.2 → 0.10.0
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 +11 -0
- package/dist/Filter.js +5 -3
- package/dist/Filter.types.d.ts +2 -1
- package/package.json +2 -2
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.10.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.9.2...@synerise/ds-filter@0.10.0) (2022-06-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **filter:** adds logicOptions prop ([74b41c7](https://github.com/Synerise/synerise-design/commit/74b41c7858b6920528aef4ba4c0826833aeaac58))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [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)
|
|
7
18
|
|
|
8
19
|
|
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),
|
|
@@ -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];
|
package/dist/Filter.types.d.ts
CHANGED
|
@@ -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?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-filter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Filter UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"@synerise/ds-step-card": "*",
|
|
44
44
|
"react": ">=16.9.0 < 17.0.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "860bc9763a0bfa2717b514baae4e1d50577d7cd2"
|
|
47
47
|
}
|