@synerise/ds-filter 0.16.3 → 0.17.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 +22 -0
- package/dist/Filter.d.ts +1 -1
- package/dist/Filter.js +10 -2
- package/dist/Filter.styles.js +4 -4
- package/dist/Filter.types.d.ts +6 -3
- package/package.json +4 -4
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.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.16.4...@synerise/ds-filter@0.17.0) (2024-02-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **filter:** updates styles for brackets ([0a3ba5f](https://github.com/Synerise/synerise-design/commit/0a3ba5f90cb120347de5d06669147263cd8d7575))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [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)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* fixed broken import paths ([ddc1908](https://github.com/Synerise/synerise-design/commit/ddc1908740a4ff0832b31ddfe18967db541660a8))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [0.16.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.16.2...@synerise/ds-filter@0.16.3) (2024-01-24)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @synerise/ds-filter
|
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,
|
|
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];
|
package/dist/Filter.styles.js
CHANGED
|
@@ -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;
|
|
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
|
-
})(["
|
|
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
|
-
})(["
|
|
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"
|
|
@@ -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
|
});
|
package/dist/Filter.types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { LogicOperator, LogicOperatorValue, LogicProps } from '@synerise/ds-logic/
|
|
3
|
-
import { StepCardProps } from '@synerise/ds-step-card/
|
|
4
|
-
import { MatchingProps, MatchingTexts } from '@synerise/ds-logic/
|
|
2
|
+
import { LogicOperator, LogicOperatorValue, LogicProps } from '@synerise/ds-logic/dist/Logic.types';
|
|
3
|
+
import { StepCardProps } from '@synerise/ds-step-card/dist/StepCard.types';
|
|
4
|
+
import { MatchingProps, MatchingTexts } from '@synerise/ds-logic/dist/Matching/Matching.types';
|
|
5
5
|
export type LogicType = {
|
|
6
6
|
type: 'LOGIC';
|
|
7
7
|
id: string;
|
|
@@ -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.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Filter UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@synerise/ds-button": "^0.19.0",
|
|
37
|
-
"@synerise/ds-logic": "^0.8.
|
|
38
|
-
"@synerise/ds-step-card": "^0.10.
|
|
37
|
+
"@synerise/ds-logic": "^0.8.22",
|
|
38
|
+
"@synerise/ds-step-card": "^0.10.5",
|
|
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": "
|
|
54
|
+
"gitHead": "a61bf46e0ab1fdb9154808bbdd3c7163aa7b0576"
|
|
55
55
|
}
|