@synerise/ds-condition 0.20.20 → 0.20.21

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,14 @@
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.21](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@0.20.20...@synerise/ds-condition@0.20.21) (2023-05-16)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-condition
9
+
10
+
11
+
12
+
13
+
6
14
  ## [0.20.20](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@0.20.19...@synerise/ds-condition@0.20.20) (2023-04-26)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-condition
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ConditionRowProps } from './ConditionStep/ConditionRow';
3
+ export declare const ErrorWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
4
  export declare const DragIcon: import("styled-components").StyledComponent<import("react").FC<import("@synerise/ds-icon").IconProps>, any, {}, never>;
4
5
  export declare const StepConditionCruds: import("styled-components").StyledComponent<import("react").FC<import("@synerise/ds-cruds/dist/Cruds.types").CrudsProps> & import("@synerise/ds-cruds/dist/Cruds.types").CrudsSubComponents, any, {}, never>;
5
6
  export declare const StepConditions: import("styled-components").StyledComponent<"div", any, {
@@ -27,14 +28,17 @@ export declare const ConditionWrapper: import("styled-components").StyledCompone
27
28
  export declare const Subject: import("styled-components").StyledComponent<"div", any, {}, never>;
28
29
  export declare const RemoveIconWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
29
30
  export declare const ConditionRows: import("styled-components").StyledComponent<"div", any, {}, never>;
30
- export declare const ConditionRow: import("styled-components").StyledComponent<"div", any, {
31
- index: number;
32
- stepType: ConditionRowProps['stepType'];
33
- }, never>;
31
+ export declare const ConditionRowDefinition: import("styled-components").StyledComponent<"div", any, {}, never>;
32
+ export declare const ConditionRowLine: import("styled-components").StyledComponent<"div", any, {}, never>;
34
33
  export declare const AddConditionRow: import("styled-components").StyledComponent<"div", any, {}, never>;
35
34
  export declare const ConditionConnections: import("styled-components").StyledComponent<"span", any, {
36
35
  first?: boolean | undefined;
37
36
  last?: boolean | undefined;
38
37
  readOnly?: boolean | undefined;
39
38
  }, never>;
39
+ export declare const ConditionRow: import("styled-components").StyledComponent<"div", any, {
40
+ withError: boolean;
41
+ index: number;
42
+ stepType: ConditionRowProps['stepType'];
43
+ }, never>;
40
44
  export declare const AddStepButton: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -2,66 +2,72 @@ import styled, { css } from 'styled-components';
2
2
  import { IconWrapper } from '@synerise/ds-inline-edit/dist/InlineEdit.styles';
3
3
  import Icon from '@synerise/ds-icon';
4
4
  import Cruds from '@synerise/ds-cruds';
5
+ export var ErrorWrapper = styled.div.withConfig({
6
+ displayName: "Conditionstyle__ErrorWrapper",
7
+ componentId: "sc-1lk06p3-0"
8
+ })(["color:", ";margin-top:8px;"], function (props) {
9
+ return props.theme.palette['red-600'];
10
+ });
5
11
  export var DragIcon = styled(Icon).withConfig({
6
12
  displayName: "Conditionstyle__DragIcon",
7
- componentId: "sc-1lk06p3-0"
13
+ componentId: "sc-1lk06p3-1"
8
14
  })(["opacity:0;visibility:hidden;position:absolute;top:0;left:-24px;cursor:grab;"]);
9
15
  export var StepConditionCruds = styled(Cruds).withConfig({
10
16
  displayName: "Conditionstyle__StepConditionCruds",
11
- componentId: "sc-1lk06p3-1"
17
+ componentId: "sc-1lk06p3-2"
12
18
  })(["position:absolute;top:16px;right:24px;visibility:hidden;opacity:0;"]);
13
19
  export var StepConditions = styled.div.withConfig({
14
20
  displayName: "Conditionstyle__StepConditions",
15
- componentId: "sc-1lk06p3-2"
21
+ componentId: "sc-1lk06p3-3"
16
22
  })(["display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;margin-top:0;padding:0 24px;width:", ";", "{left:0;top:16px;}"], function (props) {
17
23
  return props.withoutStepName ? 'calc(100% - 48px)' : '100%';
18
24
  }, DragIcon);
19
25
  export var StepName = styled.div.withConfig({
20
26
  displayName: "Conditionstyle__StepName",
21
- componentId: "sc-1lk06p3-3"
27
+ componentId: "sc-1lk06p3-4"
22
28
  })(["font-size:13px;line-height:1.84;color:", ";display:flex;flex-direction:row;align-items:center;justify-content:flex-start;white-space:pre-wrap;&&& input{margin-top:2px;cursor:default;}"], function (props) {
23
29
  return props.theme.palette['grey-800'];
24
30
  });
25
31
  export var StepIndexWrapper = styled.span.withConfig({
26
32
  displayName: "Conditionstyle__StepIndexWrapper",
27
- componentId: "sc-1lk06p3-4"
33
+ componentId: "sc-1lk06p3-5"
28
34
  })(["font-size:13px;font-weight:", ";"], function (_ref) {
29
35
  var readOnly = _ref.readOnly;
30
36
  return readOnly ? '500' : '400';
31
37
  });
32
38
  export var Condition = styled.div.withConfig({
33
39
  displayName: "Conditionstyle__Condition",
34
- componentId: "sc-1lk06p3-5"
40
+ componentId: "sc-1lk06p3-6"
35
41
  })(["padding:12px 0;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;min-width:575px;width:100%;.steps-list{width:100%;}"]);
36
42
  export var ConditionStepWrapper = styled.div.withConfig({
37
43
  displayName: "Conditionstyle__ConditionStepWrapper",
38
- componentId: "sc-1lk06p3-6"
44
+ componentId: "sc-1lk06p3-7"
39
45
  })(["display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;width:100%;"]);
40
46
  export var And = styled.div.withConfig({
41
47
  displayName: "Conditionstyle__And",
42
- componentId: "sc-1lk06p3-7"
48
+ componentId: "sc-1lk06p3-8"
43
49
  })(["display:contents;"]);
44
50
  export var StepCruds = styled.div.withConfig({
45
51
  displayName: "Conditionstyle__StepCruds",
46
- componentId: "sc-1lk06p3-8"
52
+ componentId: "sc-1lk06p3-9"
47
53
  })(["display:flex;align-items:center;justify-content:flex-end;opacity:0;visibility:hidden;"]);
48
54
  export var LeftSide = styled.div.withConfig({
49
55
  displayName: "Conditionstyle__LeftSide",
50
- componentId: "sc-1lk06p3-9"
56
+ componentId: "sc-1lk06p3-10"
51
57
  })(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;position:relative;"]);
52
58
  export var StepHeader = styled.div.withConfig({
53
59
  displayName: "Conditionstyle__StepHeader",
54
- componentId: "sc-1lk06p3-10"
60
+ componentId: "sc-1lk06p3-11"
55
61
  })(["display:flex;width:100%;flex-direction:row;align-items:flex-end;justify-content:space-between;margin-bottom:8px;padding:0 24px;"]);
56
62
  export var DraggedLabel = styled.span.withConfig({
57
63
  displayName: "Conditionstyle__DraggedLabel",
58
- componentId: "sc-1lk06p3-11"
64
+ componentId: "sc-1lk06p3-12"
59
65
  })(["width:100%;height:100%;display:none;position:absolute;top:0;left:0;align-items:center;justify-content:flex-start;padding-left:18px;color:", ";font-size:13px;"], function (props) {
60
66
  return props.theme.palette['grey-600'];
61
67
  });
62
68
  export var Step = styled.div.withConfig({
63
69
  displayName: "Conditionstyle__Step",
64
- componentId: "sc-1lk06p3-12"
70
+ componentId: "sc-1lk06p3-13"
65
71
  })(["display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding:12px 0 12px;position:relative;", " &:first-of-type{&.steps-list-ghost-element{&:after{display:none;}}}background-color:", ";&:hover{background-color:", ";", "{opacity:1;visibility:visible;}", "{opacity:1;visibility:visible;}", "{opacity:1;visibility:visible;}}&.sortable-chosen,&.sortable-drag{cursor:grabbing;width:100%;opacity:1 !important;height:50px;background-color:", ";display:flex;align-items:center;justify-content:center;padding:0 20px;box-shadow:0 16px 32px 0 #23293619;&:after{display:none;}", "{align-items:center;}", "{margin:0;", "{display:none;}}", "{display:none;}", "{display:flex;}}&.steps-list-ghost-element{cursor:grabbing;width:100%;background-color:", ";border-left:2px solid ", ";border-radius:0;display:flex;align-items:center;justify-content:center;padding:0;height:50px;box-shadow:none;position:relative;&:before{content:attr(data-dropLabel);text-align:center;position:relative;color:", ";}", "{display:none;}*{display:none;}&:after{display:none;content:'';}}}"], function (props) {
66
72
  return Boolean(props.showSuffix) && css(["&:after{display:none;width:100%;padding:18px 0 18px 24px;bottom:-18px;content:attr(data-conditionSuffix);background-color:", ";position:relative;font-size:16px;font-weight:500;color:#3f4c5b;}&:first-child:not(:last-child){&:after{display:flex;}}&:not(:last-child){&:after{display:flex;}}"], props.theme.palette.white);
67
73
  }, function (props) {
@@ -79,36 +85,36 @@ export var Step = styled.div.withConfig({
79
85
  }, DraggedLabel);
80
86
  export var ConditionWrapper = styled.div.withConfig({
81
87
  displayName: "Conditionstyle__ConditionWrapper",
82
- componentId: "sc-1lk06p3-13"
88
+ componentId: "sc-1lk06p3-14"
83
89
  })([""]);
84
90
  export var Subject = styled.div.withConfig({
85
91
  displayName: "Conditionstyle__Subject",
86
- componentId: "sc-1lk06p3-14"
92
+ componentId: "sc-1lk06p3-15"
87
93
  })([""]);
88
94
  export var RemoveIconWrapper = styled.span.withConfig({
89
95
  displayName: "Conditionstyle__RemoveIconWrapper",
90
- componentId: "sc-1lk06p3-15"
96
+ componentId: "sc-1lk06p3-16"
91
97
  })(["visibility:hidden;pointer-events:none;opacity:0;transition:all 0.3s ease;width:32px;height:32px;display:flex;align-items:center;justify-content:center;margin-left:8px;"]);
92
98
  export var ConditionRows = styled.div.withConfig({
93
99
  displayName: "Conditionstyle__ConditionRows",
94
- componentId: "sc-1lk06p3-16"
95
- })(["display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;"]);
96
- export var ConditionRow = styled.div.withConfig({
97
- displayName: "Conditionstyle__ConditionRow",
98
100
  componentId: "sc-1lk06p3-17"
99
- })(["display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;padding-bottom:", ";z-index:", ";", "{margin-right:8px;&:last-of-type{margin-right:0;}}&:hover{", "{opacity:1;visibility:visible;pointer-events:all;cursor:pointer;}}"], function (props) {
100
- return props.stepType === 'event' ? '16px' : '0';
101
- }, function (props) {
102
- return 10000 - props.index;
103
- }, ConditionWrapper, RemoveIconWrapper);
101
+ })(["display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;"]);
102
+ export var ConditionRowDefinition = styled.div.withConfig({
103
+ displayName: "Conditionstyle__ConditionRowDefinition",
104
+ componentId: "sc-1lk06p3-18"
105
+ })(["display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;"]);
106
+ export var ConditionRowLine = styled.div.withConfig({
107
+ displayName: "Conditionstyle__ConditionRowLine",
108
+ componentId: "sc-1lk06p3-19"
109
+ })([""]);
104
110
  export var AddConditionRow = styled.div.withConfig({
105
111
  displayName: "Conditionstyle__AddConditionRow",
106
- componentId: "sc-1lk06p3-18"
112
+ componentId: "sc-1lk06p3-20"
107
113
  })(["display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:row;"]);
108
114
  export var ConditionConnections = styled.span.withConfig({
109
115
  displayName: "Conditionstyle__ConditionConnections",
110
- componentId: "sc-1lk06p3-19"
111
- })(["display:flex;width:32px;min-width:32px;margin:0 12px;position:relative;height:32px;&:before{position:absolute;content:'';width:", ";height:1px;top:50%;left:", ";background-color:", ";}&:after{display:", ";position:absolute;content:'';width:1px;left:50%;height:auto;top:", ";bottom:", ";background-color:", ";}"], function (props) {
116
+ componentId: "sc-1lk06p3-21"
117
+ })(["display:flex;width:32px;min-width:32px;margin:0 12px;position:relative;height:32px;&:before{position:absolute;content:'';width:", ";height:1px;top:16px;left:", ";background-color:", ";}&:after{display:", ";position:absolute;content:'';width:1px;left:50%;height:auto;top:", ";bottom:", ";background-color:", ";}"], function (props) {
112
118
  return props.first ? '100%' : '16px';
113
119
  }, function (props) {
114
120
  return props.first ? '0' : '16px';
@@ -123,7 +129,17 @@ export var ConditionConnections = styled.span.withConfig({
123
129
  }, function (props) {
124
130
  return props.theme.palette['grey-300'];
125
131
  });
132
+ export var ConditionRow = styled.div.withConfig({
133
+ displayName: "Conditionstyle__ConditionRow",
134
+ componentId: "sc-1lk06p3-22"
135
+ })(["padding-bottom:", ";z-index:", ";display:flex;", "{height:", ";}", "{margin-right:8px;&:last-of-type{margin-right:0;}}&:hover{", "{opacity:1;visibility:visible;pointer-events:all;cursor:pointer;}}"], function (props) {
136
+ return props.stepType === 'event' ? '16px' : '0';
137
+ }, function (props) {
138
+ return 10000 - props.index;
139
+ }, ConditionConnections, function (props) {
140
+ return props.withError ? 'auto' : '32px';
141
+ }, ConditionWrapper, RemoveIconWrapper);
126
142
  export var AddStepButton = styled.div.withConfig({
127
143
  displayName: "Conditionstyle__AddStepButton",
128
- componentId: "sc-1lk06p3-20"
144
+ componentId: "sc-1lk06p3-23"
129
145
  })(["margin:12px 24px 0;"]);
@@ -15,6 +15,7 @@ export declare type ConditionStep = {
15
15
  context?: Omit<ContextProps, 'onSelectItem'>;
16
16
  stepName?: string;
17
17
  conditions: StepConditions[];
18
+ addConditionErrorText?: React.ReactNode | string;
18
19
  };
19
20
  export declare type ConditionTexts = {
20
21
  stepNamePlaceholder: string;
@@ -11,18 +11,22 @@ export var AddCondition = function AddCondition(_ref) {
11
11
  selectedSubject = _ref.selectedSubject,
12
12
  selectedContext = _ref.selectedContext,
13
13
  _ref$readOnly = _ref.readOnly,
14
- readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly;
15
- return /*#__PURE__*/React.createElement(S.AddConditionRow, null, /*#__PURE__*/React.createElement(S.ConditionConnections, {
14
+ readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
15
+ errorText = _ref.errorText;
16
+ var disabled = !(selectedSubject || selectedContext);
17
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.AddConditionRow, null, /*#__PURE__*/React.createElement(S.ConditionConnections, {
16
18
  last: true,
17
19
  first: conditionsNumber === 0
18
- }), /*#__PURE__*/React.createElement(Button, {
20
+ }), /*#__PURE__*/React.createElement(S.ConditionRowLine, null, /*#__PURE__*/React.createElement(Button, {
21
+ icon: /*#__PURE__*/React.createElement(Icon, {
22
+ component: /*#__PURE__*/React.createElement(Add2M, null)
23
+ }),
24
+ error: !disabled && Boolean(errorText),
19
25
  type: "ghost",
20
26
  mode: "icon-label",
21
27
  onClick: function onClick() {
22
28
  addCondition && addCondition(stepId);
23
29
  },
24
- disabled: !(selectedSubject || selectedContext)
25
- }, /*#__PURE__*/React.createElement(Icon, {
26
- component: /*#__PURE__*/React.createElement(Add2M, null)
27
- }), !readOnly && conditionsNumber > 0 ? texts.addConditionRowButton : texts.addFirstConditionRowButton));
30
+ disabled: disabled
31
+ }, !readOnly && conditionsNumber > 0 ? texts.addConditionRowButton : texts.addFirstConditionRowButton), !disabled && errorText && /*#__PURE__*/React.createElement(S.ErrorWrapper, null, errorText))));
28
32
  };
@@ -8,4 +8,5 @@ export declare type AddConditionProps = {
8
8
  selectedSubject: boolean;
9
9
  selectedContext: boolean;
10
10
  readOnly?: boolean;
11
+ errorText?: React.ReactNode | string;
11
12
  };
@@ -34,22 +34,37 @@ export var ConditionRow = function ConditionRow(_ref) {
34
34
  texts = _ref.texts,
35
35
  stepType = _ref.stepType,
36
36
  onDeactivate = _ref.onDeactivate,
37
- error = _ref.error,
38
37
  inputProps = _ref.inputProps,
39
38
  _ref$readOnly = _ref.readOnly,
40
39
  readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly;
40
+ var conditionFactorErrorText = conditionFactor == null ? void 0 : conditionFactor.errorText;
41
+ var conditionParameterErrorText = conditionParameter == null ? void 0 : conditionParameter.errorText;
42
+ var conditionParameterValue = conditionParameter == null ? void 0 : conditionParameter.value;
43
+ var rowHasError = !!(conditionParameterErrorText || conditionFactorErrorText && conditionParameterValue);
44
+ var conditionErrorMessage = React.useMemo(function () {
45
+ var errorText;
46
+
47
+ if (conditionParameterErrorText) {
48
+ errorText = conditionParameterErrorText;
49
+ } else if (conditionFactorErrorText && conditionParameterValue) {
50
+ errorText = conditionFactorErrorText;
51
+ }
52
+
53
+ return errorText ? /*#__PURE__*/React.createElement(S.ErrorWrapper, null, errorText) : /*#__PURE__*/React.createElement(React.Fragment, null);
54
+ }, [conditionFactorErrorText, conditionParameterErrorText, conditionParameterValue]);
41
55
  return /*#__PURE__*/React.createElement(S.ConditionRow, {
42
56
  stepType: stepType,
43
57
  style: hasPriority ? {
44
58
  zIndex: 10001
45
59
  } : undefined,
46
60
  key: "condition-row-" + conditionId,
47
- index: index
61
+ index: index,
62
+ withError: rowHasError
48
63
  }, /*#__PURE__*/React.createElement(S.ConditionConnections, {
49
64
  first: index === 0,
50
65
  last: readOnly ? Boolean(index + 1 === conditionsNumber) : Boolean(addCondition && index + 1 === conditionsNumber && maxConditionLength !== undefined && conditionsNumber === maxConditionLength),
51
66
  readOnly: readOnly
52
- }), /*#__PURE__*/React.createElement(S.ConditionWrapper, null, conditionParameter && /*#__PURE__*/React.createElement(Factors, _extends({}, conditionParameter, {
67
+ }), /*#__PURE__*/React.createElement(S.ConditionRowLine, null, /*#__PURE__*/React.createElement(S.ConditionRowDefinition, null, /*#__PURE__*/React.createElement(S.ConditionWrapper, null, conditionParameter && /*#__PURE__*/React.createElement(Factors, _extends({}, conditionParameter, {
53
68
  inputProps: inputProps,
54
69
  getPopupContainerOverride: getPopupContainerOverride,
55
70
  onActivate: function onActivate() {
@@ -60,7 +75,8 @@ export var ConditionRow = function ConditionRow(_ref) {
60
75
  return selectParameter(stepId, conditionId, value);
61
76
  },
62
77
  opened: hasPriority && stepId === currentStepId && conditionId === currentConditionId && currentField === PARAMETER,
63
- readOnly: readOnly
78
+ readOnly: readOnly,
79
+ error: Boolean(conditionParameter.errorText)
64
80
  }))), (!conditionParameter || (conditionParameter == null ? void 0 : conditionParameter.value) && (conditionParameter == null ? void 0 : conditionParameter.value).name !== '') && conditionOperator && /*#__PURE__*/React.createElement(S.ConditionWrapper, null, /*#__PURE__*/React.createElement(Operators, _extends({}, conditionOperator, {
65
81
  getPopupContainerOverride: getPopupContainerOverride,
66
82
  onActivate: function onActivate() {
@@ -74,7 +90,7 @@ export var ConditionRow = function ConditionRow(_ref) {
74
90
  readOnly: readOnly
75
91
  }))), conditionFactor !== undefined && (conditionOperator == null ? void 0 : conditionOperator.value) && (conditionFactor == null ? void 0 : conditionFactor.availableFactorTypes) !== null && /*#__PURE__*/React.createElement(S.ConditionWrapper, {
76
92
  fullWidth: true
77
- }, /*#__PURE__*/React.createElement(React.Fragment, null, (conditionFactor == null ? void 0 : conditionFactor.withCustomFactor) || /*#__PURE__*/React.createElement(Factors, _extends({}, conditionFactor, {
93
+ }, (conditionFactor == null ? void 0 : conditionFactor.withCustomFactor) || /*#__PURE__*/React.createElement(Factors, _extends({}, conditionFactor, {
78
94
  inputProps: inputProps,
79
95
  getPopupContainerOverride: getPopupContainerOverride,
80
96
  onActivate: function onActivate() {
@@ -88,10 +104,10 @@ export var ConditionRow = function ConditionRow(_ref) {
88
104
  return setStepConditionFactorValue(stepId, conditionId, value);
89
105
  },
90
106
  factorKey: conditionId,
91
- error: error,
107
+ error: Boolean(conditionFactor.errorText),
92
108
  opened: hasPriority && stepId === currentStepId && conditionId === currentConditionId && currentField === FACTOR,
93
109
  readOnly: readOnly
94
- })))), !readOnly && removeCondition && conditionsNumber > minConditionLength && /*#__PURE__*/React.createElement(S.RemoveIconWrapper, {
110
+ }))), !readOnly && removeCondition && conditionsNumber > minConditionLength && /*#__PURE__*/React.createElement(S.RemoveIconWrapper, {
95
111
  onClick: function onClick() {
96
112
  return removeCondition(stepId, conditionId);
97
113
  },
@@ -102,5 +118,5 @@ export var ConditionRow = function ConditionRow(_ref) {
102
118
  }, /*#__PURE__*/React.createElement(Icon, {
103
119
  component: /*#__PURE__*/React.createElement(CloseS, null),
104
120
  color: theme.palette['red-600']
105
- }))));
121
+ })))), conditionErrorMessage));
106
122
  };
@@ -124,6 +124,7 @@ export var ConditionStep = function ConditionStep(_ref) {
124
124
  var _step$subject, _step$context;
125
125
 
126
126
  return !readOnly && addCondition && (maxConditionsLength === undefined || step.conditions.length < maxConditionsLength) && /*#__PURE__*/React.createElement(AddCondition, {
127
+ errorText: step.addConditionErrorText,
127
128
  texts: text,
128
129
  stepId: step.id,
129
130
  addCondition: onAddCondition,
@@ -131,7 +132,7 @@ export var ConditionStep = function ConditionStep(_ref) {
131
132
  selectedSubject: Boolean((_step$subject = step.subject) == null ? void 0 : _step$subject.selectedItem),
132
133
  selectedContext: Boolean((_step$context = step.context) == null ? void 0 : _step$context.selectedItem)
133
134
  });
134
- }, [addCondition, onAddCondition, maxConditionsLength, step.conditions.length, step.context, step.id, step.subject, text, readOnly]);
135
+ }, [addCondition, onAddCondition, maxConditionsLength, step.conditions.length, step.context, step.id, step.subject, text, readOnly, step.addConditionErrorText]);
135
136
  var renderConditionRow = React.useCallback(function (condition, conditionIndex) {
136
137
  var _step$context2;
137
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-condition",
3
- "version": "0.20.20",
3
+ "version": "0.20.21",
4
4
  "description": "Condition UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -36,10 +36,10 @@
36
36
  "@synerise/ds-context-selector": "^0.16.13",
37
37
  "@synerise/ds-core": "^0.39.8",
38
38
  "@synerise/ds-cruds": "^0.3.24",
39
- "@synerise/ds-factors": "^0.17.20",
39
+ "@synerise/ds-factors": "^0.17.21",
40
40
  "@synerise/ds-icon": "^0.56.0",
41
41
  "@synerise/ds-inline-edit": "^0.6.61",
42
- "@synerise/ds-operators": "^0.10.19",
42
+ "@synerise/ds-operators": "^0.10.20",
43
43
  "@synerise/ds-subject": "^0.9.48",
44
44
  "@synerise/ds-tooltip": "^0.13.2",
45
45
  "@synerise/ds-utils": "^0.19.0",
@@ -49,5 +49,5 @@
49
49
  "@synerise/ds-core": "*",
50
50
  "react": ">=16.9.0 < 17.0.0"
51
51
  },
52
- "gitHead": "41163901b144e78a83329029519cb9eb48bf4787"
52
+ "gitHead": "71daf94c4b480a9b8f675537a7894ad5d7db4ff9"
53
53
  }