@synerise/ds-condition 1.0.4 → 1.1.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
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.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@1.0.5...@synerise/ds-condition@1.1.0) (2025-04-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **context-selector:** add isError prop ([e9794d5](https://github.com/Synerise/synerise-design/commit/e9794d5e15a63bbf3afbdeb1d2f6369c76d4afec))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.0.5](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@1.0.4...@synerise/ds-condition@1.0.5) (2025-04-02)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-condition
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [1.0.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@1.0.3...@synerise/ds-condition@1.0.4) (2025-04-01)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-condition
|
package/dist/Condition.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React, { useEffect, useState, useCallback, useMemo } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
import { ReactSortable } from 'react-sortablejs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import Factors from '@synerise/ds-factors';
|
|
4
4
|
import Operators from '@synerise/ds-operators';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React, { useCallback, useMemo } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
import Subject from '@synerise/ds-subject';
|
|
@@ -124,25 +124,21 @@ export var ConditionStep = function ConditionStep(_ref) {
|
|
|
124
124
|
});
|
|
125
125
|
}, [draggableEnabled, duplicateStep, index, removeStep, step.id, step.stepName, text, updateStepName, readOnly]);
|
|
126
126
|
var renderContextSelector = useCallback(function (contextData) {
|
|
127
|
-
|
|
128
|
-
getPopupContainer: getPopupContainerOverride,
|
|
127
|
+
var commonProps = _extends({}, contextData, {
|
|
129
128
|
onActivate: _onActivate,
|
|
130
129
|
onDeactivate: onDeactivate,
|
|
131
|
-
opened: step.id === currentStepId && currentField === SUBJECT,
|
|
132
|
-
onSelectItem: function onSelectItem(value) {
|
|
133
|
-
return selectContext(value, step.id);
|
|
134
|
-
},
|
|
135
|
-
readOnly: contextData.readOnly || readOnly
|
|
136
|
-
})) : /*#__PURE__*/React.createElement(ContextSelector, _extends({}, contextData, {
|
|
137
130
|
errorText: undefined,
|
|
138
|
-
|
|
139
|
-
onActivate: _onActivate,
|
|
140
|
-
onDeactivate: onDeactivate,
|
|
131
|
+
isError: !!contextData.errorText,
|
|
141
132
|
opened: step.id === currentStepId && currentField === SUBJECT,
|
|
142
133
|
onSelectItem: function onSelectItem(value) {
|
|
143
134
|
return selectContext(value, step.id);
|
|
144
135
|
},
|
|
145
136
|
readOnly: contextData.readOnly || readOnly
|
|
137
|
+
});
|
|
138
|
+
return CustomContextSelectorComponent ? /*#__PURE__*/React.createElement(CustomContextSelectorComponent, _extends({}, commonProps, {
|
|
139
|
+
getPopupContainer: getPopupContainerOverride
|
|
140
|
+
})) : /*#__PURE__*/React.createElement(ContextSelector, _extends({}, commonProps, {
|
|
141
|
+
getPopupContainerOverride: getPopupContainerOverride
|
|
146
142
|
}));
|
|
147
143
|
}, [CustomContextSelectorComponent, currentField, currentStepId, getPopupContainerOverride, _onActivate, onDeactivate, readOnly, selectContext, step.id]);
|
|
148
144
|
var addConditionButton = useMemo(function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-condition",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Condition UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^1.1.
|
|
38
|
-
"@synerise/ds-context-selector": "^1.0
|
|
39
|
-
"@synerise/ds-cruds": "^1.0.
|
|
40
|
-
"@synerise/ds-factors": "^1.1.
|
|
41
|
-
"@synerise/ds-icon": "^1.
|
|
42
|
-
"@synerise/ds-inline-edit": "^1.0.
|
|
43
|
-
"@synerise/ds-input": "^1.0.
|
|
44
|
-
"@synerise/ds-operators": "^1.0.
|
|
45
|
-
"@synerise/ds-subject": "^1.0.
|
|
46
|
-
"@synerise/ds-tooltip": "^1.1.
|
|
37
|
+
"@synerise/ds-button": "^1.1.3",
|
|
38
|
+
"@synerise/ds-context-selector": "^1.1.0",
|
|
39
|
+
"@synerise/ds-cruds": "^1.0.4",
|
|
40
|
+
"@synerise/ds-factors": "^1.1.4",
|
|
41
|
+
"@synerise/ds-icon": "^1.3.0",
|
|
42
|
+
"@synerise/ds-inline-edit": "^1.0.5",
|
|
43
|
+
"@synerise/ds-input": "^1.0.4",
|
|
44
|
+
"@synerise/ds-operators": "^1.0.4",
|
|
45
|
+
"@synerise/ds-subject": "^1.0.5",
|
|
46
|
+
"@synerise/ds-tooltip": "^1.1.3",
|
|
47
47
|
"@synerise/ds-utils": "^1.0.1",
|
|
48
48
|
"lodash": "^4.17.19",
|
|
49
49
|
"react-sortablejs": "^6.0.0",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
56
56
|
"styled-components": "^5.3.3"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "55537c6449492265a1d50c1e055ef7cc03c7935e"
|
|
59
59
|
}
|