@synerise/ds-filter 0.19.9 → 0.20.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 +19 -0
- package/dist/Filter.js +13 -14
- package/dist/modules.d.js +1 -1
- package/package.json +8 -8
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
|
+
# [0.20.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.19.10...@synerise/ds-filter@0.20.0) (2025-01-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* antd@4.24 react@18 ([d97a667](https://github.com/Synerise/synerise-design/commit/d97a667b1f33aed3177e1851de3b6f60be2d46a6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.19.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.19.9...@synerise/ds-filter@0.19.10) (2025-01-21)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-filter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.19.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@0.19.8...@synerise/ds-filter@0.19.9) (2025-01-15)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-filter
|
package/dist/Filter.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
2
|
import React, { useCallback, useMemo, useEffect, useState, useRef } from 'react';
|
|
8
3
|
import { useIntl } from 'react-intl';
|
|
9
4
|
import { ReactSortable } from 'react-sortablejs';
|
|
@@ -123,7 +118,7 @@ var Filter = function Filter(_ref) {
|
|
|
123
118
|
var _useIntl = useIntl(),
|
|
124
119
|
formatMessage = _useIntl.formatMessage;
|
|
125
120
|
var text = useMemo(function () {
|
|
126
|
-
return
|
|
121
|
+
return _extends({
|
|
127
122
|
addFilter: formatMessage({
|
|
128
123
|
id: 'DS.FILTER.ADD-FILTER'
|
|
129
124
|
}),
|
|
@@ -134,7 +129,7 @@ var Filter = function Filter(_ref) {
|
|
|
134
129
|
id: 'DS.FILTER.CONDITIONS-LIMIT'
|
|
135
130
|
})
|
|
136
131
|
}, texts, {
|
|
137
|
-
matching:
|
|
132
|
+
matching: _extends({
|
|
138
133
|
matching: formatMessage({
|
|
139
134
|
id: 'DS.MATCHING.MATCHING'
|
|
140
135
|
}),
|
|
@@ -142,7 +137,7 @@ var Filter = function Filter(_ref) {
|
|
|
142
137
|
id: 'DS.MATCHING.NOT-MATCHING'
|
|
143
138
|
})
|
|
144
139
|
}, texts == null ? void 0 : texts.matching),
|
|
145
|
-
step:
|
|
140
|
+
step: _extends({
|
|
146
141
|
matching: formatMessage({
|
|
147
142
|
id: 'DS.MATCHING.MATCHING'
|
|
148
143
|
}),
|
|
@@ -200,7 +195,7 @@ var Filter = function Filter(_ref) {
|
|
|
200
195
|
id: 'DS.STEP-CARD.DUPLICATE'
|
|
201
196
|
})
|
|
202
197
|
}, texts == null ? void 0 : texts.step),
|
|
203
|
-
placeholder:
|
|
198
|
+
placeholder: _extends({
|
|
204
199
|
chooseCondition: formatMessage({
|
|
205
200
|
id: 'DS.PLACEHOLDER.CHOOSE-CONDITION'
|
|
206
201
|
}),
|
|
@@ -210,7 +205,9 @@ var Filter = function Filter(_ref) {
|
|
|
210
205
|
}, texts == null ? void 0 : texts.placeholder)
|
|
211
206
|
});
|
|
212
207
|
}, [formatMessage, texts]);
|
|
213
|
-
var getContextTypeTexts = useCallback(
|
|
208
|
+
var getContextTypeTexts = useCallback(
|
|
209
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
210
|
+
function (expression) {
|
|
214
211
|
var contextType = expression.expressionType;
|
|
215
212
|
return {
|
|
216
213
|
matching: contextType === 'attribute' ? text.step.have : text.step.performed,
|
|
@@ -256,7 +253,7 @@ var Filter = function Filter(_ref) {
|
|
|
256
253
|
} : undefined,
|
|
257
254
|
options: logicOptions
|
|
258
255
|
},
|
|
259
|
-
STEP:
|
|
256
|
+
STEP: _extends({}, reorderProps, {
|
|
260
257
|
onChangeMatching: onChangeStepMatching ? function (value) {
|
|
261
258
|
return onChangeStepMatching(expression.id, value);
|
|
262
259
|
} : undefined,
|
|
@@ -277,12 +274,14 @@ var Filter = function Filter(_ref) {
|
|
|
277
274
|
singleStepCondition: Boolean(singleStepCondition),
|
|
278
275
|
additionalFields: expression.data.additionalFields,
|
|
279
276
|
getMoveByLabel: getMoveByLabel,
|
|
280
|
-
texts:
|
|
277
|
+
texts: _extends({}, text.step, contextTypeTexts)
|
|
281
278
|
})
|
|
282
279
|
};
|
|
283
280
|
return props[expression.type];
|
|
284
281
|
}, [activeExpressionId, getContextTypeTexts, getMoveByLabel, handleMove, isActive, isLimitExceeded, logicOptions, onChangeLogic, onChangeStepMatching, onChangeStepName, onDeleteStep, onDuplicateStep, renderStepContent, renderStepFooter, renderStepHeaderRightSide, stepExpressionCount, text.step, visibilityConfig.isStepCardHeaderVisible, singleStepCondition, onChangeOrder]);
|
|
285
|
-
var renderExpression = useCallback(
|
|
282
|
+
var renderExpression = useCallback(
|
|
283
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
284
|
+
function (expression, index) {
|
|
286
285
|
var Component = component[expression.type];
|
|
287
286
|
var LogicComponent = expression.logic && component[expression.logic.type];
|
|
288
287
|
return /*#__PURE__*/React.createElement(S.ExpressionWrapper, {
|
|
@@ -299,7 +298,7 @@ var Filter = function Filter(_ref) {
|
|
|
299
298
|
}
|
|
300
299
|
}, /*#__PURE__*/React.createElement(Component, _extends({}, expression.data, componentProps(expression, index), {
|
|
301
300
|
readOnly: readOnly
|
|
302
|
-
})), expression.logic && index + 1 < expressions.length && /*#__PURE__*/React.createElement(S.LogicWrapper, {
|
|
301
|
+
})), expression.logic && index + 1 < expressions.length && LogicComponent && /*#__PURE__*/React.createElement(S.LogicWrapper, {
|
|
303
302
|
"data-testid": "condition-logic"
|
|
304
303
|
}, /*#__PURE__*/React.createElement(LogicComponent, _extends({}, expression.logic.data, componentProps(expression.logic, index), {
|
|
305
304
|
readOnly: readOnly
|
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@testing-library/jest-dom
|
|
1
|
+
import '@testing-library/jest-dom';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-filter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Filter UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,18 +34,18 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^0.
|
|
38
|
-
"@synerise/ds-logic": "^0.
|
|
39
|
-
"@synerise/ds-step-card": "^0.
|
|
40
|
-
"@synerise/ds-utils": "^0.
|
|
37
|
+
"@synerise/ds-button": "^0.23.0",
|
|
38
|
+
"@synerise/ds-logic": "^0.10.0",
|
|
39
|
+
"@synerise/ds-step-card": "^0.13.0",
|
|
40
|
+
"@synerise/ds-utils": "^0.32.0",
|
|
41
41
|
"react-sortablejs": "^6.0.0",
|
|
42
42
|
"sortablejs": "1.15.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@synerise/ds-core": "*",
|
|
46
|
-
"react": ">=16.9.0 <=
|
|
46
|
+
"react": ">=16.9.0 <= 18.3.1",
|
|
47
47
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
48
|
-
"styled-components": "5.
|
|
48
|
+
"styled-components": "^5.3.3"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "fbde34e126b492edaf148e469ab96247a891d6df"
|
|
51
51
|
}
|