@synerise/ds-filter 1.1.0 → 1.2.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 +19 -0
- package/dist/Filter.js +6 -5
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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
|
+
## [1.2.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@1.2.0...@synerise/ds-filter@1.2.1) (2025-06-26)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-filter
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@1.1.0...@synerise/ds-filter@1.2.0) (2025-06-24)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **condition:** sortable lib ([8cbc3f5](https://github.com/Synerise/synerise-design/commit/8cbc3f5956ce9138f1a6b0a5eb0e7cd85bb7f4e7))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [1.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@1.0.10...@synerise/ds-filter@1.1.0) (2025-06-05)
|
|
7
26
|
|
|
8
27
|
|
package/dist/Filter.js
CHANGED
|
@@ -219,8 +219,9 @@ var Filter = function Filter(_ref) {
|
|
|
219
219
|
var newIndex = index + offset;
|
|
220
220
|
var newOrder = rearrangeItems([].concat(expressions), index, newIndex);
|
|
221
221
|
movedExpressionId.current = newOrder[newIndex].id;
|
|
222
|
-
onChangeOrder
|
|
222
|
+
onChangeOrder == null || onChangeOrder(newOrder);
|
|
223
223
|
}, [expressions, onChangeOrder]);
|
|
224
|
+
var isDraggable = Boolean(onChangeOrder && expressions.length > 1);
|
|
224
225
|
var getStepProps = useCallback(function (expression, index) {
|
|
225
226
|
var contextTypeTexts = getContextTypeTexts(expression);
|
|
226
227
|
var reorderProps = {
|
|
@@ -248,14 +249,14 @@ var Filter = function Filter(_ref) {
|
|
|
248
249
|
renderHeaderRightSide: renderStepHeaderRightSide ? function (itemIndex, options) {
|
|
249
250
|
return renderStepHeaderRightSide(expression, itemIndex, options);
|
|
250
251
|
} : undefined,
|
|
251
|
-
isDraggable:
|
|
252
|
+
isDraggable: isDraggable,
|
|
252
253
|
singleStepCondition: Boolean(singleStepCondition),
|
|
253
254
|
additionalFields: expression.data.additionalFields,
|
|
254
255
|
getMoveByLabel: getMoveByLabel,
|
|
255
256
|
dropLabel: text.dropMeHere,
|
|
256
257
|
texts: _extends({}, text.step, contextTypeTexts)
|
|
257
258
|
});
|
|
258
|
-
}, [
|
|
259
|
+
}, [getContextTypeTexts, stepExpressionCount, handleMove, onChangeStepMatching, onChangeStepName, onDeleteStep, onDuplicateStep, isLimitExceeded, renderStepFooter, renderStepContent, activeExpressionId, isActive, visibilityConfig.isStepCardHeaderVisible, renderStepHeaderRightSide, isDraggable, singleStepCondition, getMoveByLabel, text.dropMeHere, text.step]);
|
|
259
260
|
var getLogicProps = useCallback(function (expression) {
|
|
260
261
|
return {
|
|
261
262
|
value: '',
|
|
@@ -307,7 +308,7 @@ var Filter = function Filter(_ref) {
|
|
|
307
308
|
}
|
|
308
309
|
}, [onChangeOrder, expressions]);
|
|
309
310
|
var renderExpressions = useCallback(function () {
|
|
310
|
-
if (
|
|
311
|
+
if (isDraggable) {
|
|
311
312
|
return /*#__PURE__*/React.createElement(Sortable, {
|
|
312
313
|
placeholderCss: S.placeholderCss,
|
|
313
314
|
axis: "y",
|
|
@@ -317,7 +318,7 @@ var Filter = function Filter(_ref) {
|
|
|
317
318
|
});
|
|
318
319
|
}
|
|
319
320
|
return expressionData.map(ExpressionItem);
|
|
320
|
-
}, [expressionData, handleChangeOrder,
|
|
321
|
+
}, [expressionData, handleChangeOrder, isDraggable]);
|
|
321
322
|
return /*#__PURE__*/React.createElement(S.FilterWrapper, null, /*#__PURE__*/React.createElement(S.FilterHeader, null, texts != null && (_texts$overwritten = texts.overwritten) != null && _texts$overwritten.filterTitle ? /*#__PURE__*/React.createElement(S.FilterTitle, null, texts.overwritten.filterTitle) : /*#__PURE__*/React.createElement(S.MatchingAndConditionsWrapper, null, /*#__PURE__*/React.createElement(S.MatchingWrapper, null, matching && /*#__PURE__*/React.createElement(Matching, _extends({}, matching, {
|
|
322
323
|
texts: text.matching,
|
|
323
324
|
readOnly: readOnly
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-filter",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Filter UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^1.
|
|
38
|
-
"@synerise/ds-logic": "^1.1.
|
|
39
|
-
"@synerise/ds-sortable": "^1.
|
|
40
|
-
"@synerise/ds-step-card": "^1.1
|
|
41
|
-
"@synerise/ds-utils": "^1.
|
|
37
|
+
"@synerise/ds-button": "^1.4.1",
|
|
38
|
+
"@synerise/ds-logic": "^1.1.2",
|
|
39
|
+
"@synerise/ds-sortable": "^1.3.0",
|
|
40
|
+
"@synerise/ds-step-card": "^1.2.1",
|
|
41
|
+
"@synerise/ds-utils": "^1.3.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@synerise/ds-core": "*",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
47
47
|
"styled-components": "^5.3.3"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "11fe1d29b2ac23e70c3d5e6ce8ae20201a619a34"
|
|
50
50
|
}
|