@synerise/ds-filter 0.5.2 → 0.6.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 +27 -0
- package/dist/Filter.js +13 -4
- package/dist/Filter.styles.d.ts +1 -0
- package/dist/Filter.styles.js +8 -4
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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.6.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.5.4...@synerise/ds-filter@0.6.0) (2022-03-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **filter:** simple imprv into filter & card & card-tabs component ([206cb9d](https://github.com/Synerise/synerise-design/commit/206cb9d8b9ba3687daf1a02862e8dd88698b582f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.5.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.5.3...@synerise/ds-filter@0.5.4) (2022-02-25)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-filter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [0.5.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.5.2...@synerise/ds-filter@0.5.3) (2022-02-16)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @synerise/ds-filter
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [0.5.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.5.1...@synerise/ds-filter@0.5.2) (2022-02-03)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @synerise/ds-filter
|
package/dist/Filter.js
CHANGED
|
@@ -14,6 +14,7 @@ import Placeholder from '@synerise/ds-logic/dist/Placeholder/Placeholder';
|
|
|
14
14
|
import StepCard from '@synerise/ds-step-card';
|
|
15
15
|
import { useIntl } from 'react-intl';
|
|
16
16
|
import * as S from './Filter.styles';
|
|
17
|
+
import { MatchingWrapper } from './Filter.styles';
|
|
17
18
|
var SORTABLE_CONFIG = {
|
|
18
19
|
ghostClass: 'ghost-element',
|
|
19
20
|
className: 'sortable-list',
|
|
@@ -83,7 +84,15 @@ var Filter = function Filter(_ref) {
|
|
|
83
84
|
duplicateTooltip: formatMessage({
|
|
84
85
|
id: 'DS.STEP-CARD.DUPLICATE'
|
|
85
86
|
})
|
|
86
|
-
}, texts == null ? void 0 : texts.step)
|
|
87
|
+
}, texts == null ? void 0 : texts.step),
|
|
88
|
+
placeholder: {
|
|
89
|
+
chooseCondition: formatMessage({
|
|
90
|
+
id: 'DS.PLACEHOLDER.CHOOSE-CONDITION'
|
|
91
|
+
}),
|
|
92
|
+
getPreview: formatMessage({
|
|
93
|
+
id: 'DS.PLACEHOLDER.GET-PREVIEW'
|
|
94
|
+
})
|
|
95
|
+
}
|
|
87
96
|
});
|
|
88
97
|
}, [formatMessage, texts]);
|
|
89
98
|
var componentProps = React.useCallback(function (expression) {
|
|
@@ -128,13 +137,13 @@ var Filter = function Filter(_ref) {
|
|
|
128
137
|
}
|
|
129
138
|
}, /*#__PURE__*/React.createElement(Component, _extends({}, expression.data, componentProps(expression))), expression.logic && index + 1 < expressions.length && /*#__PURE__*/React.createElement(S.LogicWrapper, null, /*#__PURE__*/React.createElement(LogicComponent, _extends({}, expression.logic.data, componentProps(expression.logic)))));
|
|
130
139
|
}, [componentProps, expressions.length, activeExpressionId, text]);
|
|
131
|
-
return /*#__PURE__*/React.createElement(S.FilterWrapper, null, matching && /*#__PURE__*/React.createElement(Matching, _extends({}, matching, {
|
|
140
|
+
return /*#__PURE__*/React.createElement(S.FilterWrapper, null, matching && /*#__PURE__*/React.createElement(MatchingWrapper, null, /*#__PURE__*/React.createElement(Matching, _extends({}, matching, {
|
|
132
141
|
texts: text.matching
|
|
133
|
-
})), /*#__PURE__*/React.createElement(React.Fragment, null, expressions.length > 0 ? /*#__PURE__*/React.createElement(ReactSortable, _extends({}, SORTABLE_CONFIG, {
|
|
142
|
+
}))), /*#__PURE__*/React.createElement(React.Fragment, null, expressions.length > 0 ? /*#__PURE__*/React.createElement(ReactSortable, _extends({}, SORTABLE_CONFIG, {
|
|
134
143
|
list: expressions,
|
|
135
144
|
setList: onChangeOrder
|
|
136
145
|
}), expressions.map(renderExpression)) : /*#__PURE__*/React.createElement(Placeholder, {
|
|
137
|
-
text:
|
|
146
|
+
text: text.placeholder.chooseCondition
|
|
138
147
|
})), addFilterComponent && /*#__PURE__*/React.createElement(S.AddButtonWrapper, null, addFilterComponent));
|
|
139
148
|
};
|
|
140
149
|
|
package/dist/Filter.styles.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const FilterWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const MatchingWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
3
|
export declare const LogicWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
4
|
export declare const ExpressionWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
4
5
|
index: number;
|
package/dist/Filter.styles.js
CHANGED
|
@@ -4,14 +4,18 @@ export var FilterWrapper = styled.div.withConfig({
|
|
|
4
4
|
displayName: "Filterstyles__FilterWrapper",
|
|
5
5
|
componentId: "w5f27p-0"
|
|
6
6
|
})(["display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;width:auto;"]);
|
|
7
|
+
export var MatchingWrapper = styled.div.withConfig({
|
|
8
|
+
displayName: "Filterstyles__MatchingWrapper",
|
|
9
|
+
componentId: "w5f27p-1"
|
|
10
|
+
})(["margin-bottom:24px;"]);
|
|
7
11
|
export var LogicWrapper = styled.div.withConfig({
|
|
8
12
|
displayName: "Filterstyles__LogicWrapper",
|
|
9
|
-
componentId: "w5f27p-
|
|
13
|
+
componentId: "w5f27p-2"
|
|
10
14
|
})(["margin-top:24px;"]);
|
|
11
15
|
export var ExpressionWrapper = styled.div.withConfig({
|
|
12
16
|
displayName: "Filterstyles__ExpressionWrapper",
|
|
13
|
-
componentId: "w5f27p-
|
|
14
|
-
})(["width:100%;
|
|
17
|
+
componentId: "w5f27p-3"
|
|
18
|
+
})(["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;", "{display:none;}", "{display:none;}", "{display:none;}}&.ghost-element{cursor:grabbing;width:100%;background-color:", ";border:1px dashed ", ";border-radius:3px;display:flex;align-items:center;justify-content:center;padding:0;margin-bottom:24px;height:70px;box-shadow:none;position:relative;&:before{content:attr(data-dropLabel);text-align:center;position:relative;color:", ";}*{display:none;}}"], function (props) {
|
|
15
19
|
return 1000 - props.index;
|
|
16
20
|
}, Body, Footer, LogicWrapper, function (props) {
|
|
17
21
|
return props.theme.palette['blue-050'];
|
|
@@ -22,5 +26,5 @@ export var ExpressionWrapper = styled.div.withConfig({
|
|
|
22
26
|
});
|
|
23
27
|
export var AddButtonWrapper = styled.div.withConfig({
|
|
24
28
|
displayName: "Filterstyles__AddButtonWrapper",
|
|
25
|
-
componentId: "w5f27p-
|
|
29
|
+
componentId: "w5f27p-4"
|
|
26
30
|
})(["display:flex;align-items:flex-start;justify-content:flex-start;margin:24px 0 0;width:100%;"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-filter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Filter UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
],
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@synerise/ds-button": "^0.
|
|
36
|
-
"@synerise/ds-icon": "^0.47.
|
|
37
|
-
"@synerise/ds-logic": "^0.
|
|
38
|
-
"@synerise/ds-step-card": "^0.5.
|
|
35
|
+
"@synerise/ds-button": "^0.17.0",
|
|
36
|
+
"@synerise/ds-icon": "^0.47.2",
|
|
37
|
+
"@synerise/ds-logic": "^0.6.0",
|
|
38
|
+
"@synerise/ds-step-card": "^0.5.5",
|
|
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": "
|
|
46
|
+
"gitHead": "739b52320bb20c1646371224de5bb0c3454fac8c"
|
|
47
47
|
}
|