@synerise/ds-condition 0.17.36 → 0.17.37

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,20 @@
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.17.37](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@0.17.36...@synerise/ds-condition@0.17.37) (2022-09-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **condition:** add import inputProps from ds-factors types ([c538a7e](https://github.com/Synerise/synerise-design/commit/c538a7e7ea18e345dbd64cd6b98889dee109c361))
12
+ * **condition:** add prop to de-condition and knob ([9c5c95b](https://github.com/Synerise/synerise-design/commit/9c5c95b455b9ef2d56f460b491e49530f47accb3))
13
+ * **condition:** update documantation ([0ae2ee5](https://github.com/Synerise/synerise-design/commit/0ae2ee5a7f05946bfedb8c60b38186e3025782a7))
14
+ * **condition:** update documentation ([7f0dd22](https://github.com/Synerise/synerise-design/commit/7f0dd220f15362b7536daeda79fcdcf5e155636a))
15
+
16
+
17
+
18
+
19
+
6
20
  ## [0.17.36](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@0.17.35...@synerise/ds-condition@0.17.36) (2022-09-27)
7
21
 
8
22
  **Note:** Version bump only for package @synerise/ds-condition
package/README.md CHANGED
@@ -124,6 +124,8 @@ import Condition from '@synerise/ds-condition'
124
124
  | onUpdateStepName | Callback called when user change the name of step condition | (stepId: React.ReactText, value: string) => void | - |
125
125
  | getPopupContainerOverride | Popup container function for child tooltips and dropdowns | (trigger: HTMLElement | null) => HTMLElement; | - |
126
126
  | defaultOpenedComponent | Component which should be opened after render | 'subject' \ 'operator' \ 'factor' \ 'parameter' \ 'context' | - |
127
+ | inputProps | group of props from ds-factors types | InputProps | - |
128
+
127
129
 
128
130
  ### ConditionStep
129
131
 
package/dist/Condition.js CHANGED
@@ -56,7 +56,8 @@ var Condition = function Condition(props) {
56
56
  showSuffix = props.showSuffix,
57
57
  hoverDisabled = props.hoverDisabled,
58
58
  _props$autoOpenedComp = props.autoOpenedComponent,
59
- autoOpenedComponent = _props$autoOpenedComp === void 0 ? DEFAULT_FIELD : _props$autoOpenedComp;
59
+ autoOpenedComponent = _props$autoOpenedComp === void 0 ? DEFAULT_FIELD : _props$autoOpenedComp,
60
+ inputProps = props.inputProps;
60
61
 
61
62
  var _useIntl = useIntl(),
62
63
  formatMessage = _useIntl.formatMessage;
@@ -269,7 +270,8 @@ var Condition = function Condition(props) {
269
270
  setCurrentStep: setCurrentStepId,
270
271
  onDeactivate: handleClearActiveCondition,
271
272
  showSuffix: showSuffix,
272
- hoverDisabled: hoverDisabled || currentStepId !== step.id && currentStepId !== undefined
273
+ hoverDisabled: hoverDisabled || currentStepId !== step.id && currentStepId !== undefined,
274
+ inputProps: inputProps
273
275
  });
274
276
  })), addStep && /*#__PURE__*/React.createElement(S.AddStepButton, null, /*#__PURE__*/React.createElement(Button, {
275
277
  type: "ghost",
@@ -278,7 +280,7 @@ var Condition = function Condition(props) {
278
280
  }, /*#__PURE__*/React.createElement(Icon, {
279
281
  component: /*#__PURE__*/React.createElement(Add3M, null)
280
282
  }), text.addStep)), renderAddStep && /*#__PURE__*/React.createElement(S.AddStepButton, null, renderAddStep()));
281
- }, [steps, onChangeOrder, addStep, handleAddStep, text, renderAddStep, currentStepId, getPopupContainerOverride, draggableEnabled, selectOperator, selectParameter, selectContext, selectSubject, onUpdateStepName, duplicateStep, removeStep, minConditionsLength, maxConditionsLength, setStepConditionFactorType, setStepConditionFactorValue, currentConditionId, currentField, removeCondition, handleAddCondition, handleClearActiveCondition, showSuffix, hoverDisabled]);
283
+ }, [steps, onChangeOrder, addStep, handleAddStep, text, renderAddStep, currentStepId, getPopupContainerOverride, draggableEnabled, selectOperator, selectParameter, selectContext, selectSubject, onUpdateStepName, duplicateStep, removeStep, minConditionsLength, maxConditionsLength, setStepConditionFactorType, setStepConditionFactorValue, currentConditionId, currentField, removeCondition, handleAddCondition, handleClearActiveCondition, showSuffix, hoverDisabled, inputProps]);
282
284
  };
283
285
 
284
286
  export default Condition;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { SubjectItem, SubjectProps } from '@synerise/ds-subject/dist/Subject.types';
3
- import { FactorsProps, FactorType, FactorValueType } from '@synerise/ds-factors/dist/Factors.types';
3
+ import { FactorsProps, FactorType, FactorValueType, InputProps } from '@synerise/ds-factors/dist/Factors.types';
4
4
  import { OperatorsItem, OperatorsProps } from '@synerise/ds-operators/dist/Operator.types';
5
5
  import { ContextGroup, ContextItem, ContextProps } from '@synerise/ds-context-selector/dist/ContextSelector.types';
6
6
  export declare type StepConditions = {
@@ -53,4 +53,5 @@ export declare type ConditionProps = {
53
53
  showSuffix?: boolean;
54
54
  hoverDisabled?: boolean;
55
55
  autoOpenedComponent?: 'subject' | 'operator' | 'factor' | 'parameter' | 'context';
56
+ inputProps: InputProps;
56
57
  };
@@ -34,7 +34,8 @@ 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;
37
+ error = _ref.error,
38
+ inputProps = _ref.inputProps;
38
39
  return /*#__PURE__*/React.createElement(S.ConditionRow, {
39
40
  stepType: stepType,
40
41
  style: hasPriority ? {
@@ -46,6 +47,7 @@ export var ConditionRow = function ConditionRow(_ref) {
46
47
  first: index === 0,
47
48
  last: Boolean(addCondition && index + 1 === conditionsNumber && maxConditionLength !== undefined && conditionsNumber === maxConditionLength)
48
49
  }), /*#__PURE__*/React.createElement(S.ConditionWrapper, null, conditionParameter && /*#__PURE__*/React.createElement(Factors, _extends({}, conditionParameter, {
50
+ inputProps: inputProps,
49
51
  getPopupContainerOverride: getPopupContainerOverride,
50
52
  onActivate: function onActivate() {
51
53
  return _onActivate && _onActivate(PARAMETER);
@@ -68,6 +70,7 @@ export var ConditionRow = function ConditionRow(_ref) {
68
70
  }))), conditionFactor !== undefined && (conditionOperator == null ? void 0 : conditionOperator.value) && (conditionFactor == null ? void 0 : conditionFactor.availableFactorTypes) !== null && /*#__PURE__*/React.createElement(S.ConditionWrapper, {
69
71
  fullWidth: true
70
72
  }, /*#__PURE__*/React.createElement(React.Fragment, null, (conditionFactor == null ? void 0 : conditionFactor.withCustomFactor) || /*#__PURE__*/React.createElement(Factors, _extends({}, conditionFactor, {
73
+ inputProps: inputProps,
71
74
  getPopupContainerOverride: getPopupContainerOverride,
72
75
  onActivate: function onActivate() {
73
76
  return _onActivate && _onActivate(FACTOR);
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { FactorsProps } from '@synerise/ds-factors/dist/Factors.types';
2
+ import { FactorsProps, InputProps } from '@synerise/ds-factors/dist/Factors.types';
3
3
  import { OperatorsProps } from '@synerise/ds-operators/dist/Operator.types';
4
4
  import { ConditionProps, ConditionTexts } from '../../Condition.types';
5
5
  export declare type ConditionRowProps = {
@@ -28,4 +28,5 @@ export declare type ConditionRowProps = {
28
28
  getPopupContainerOverride?: ConditionProps['getPopupContainerOverride'];
29
29
  texts: Partial<ConditionTexts>;
30
30
  stepType: 'event' | 'attribute' | 'default' | undefined;
31
+ inputProps: InputProps;
31
32
  };
@@ -48,7 +48,8 @@ export var ConditionStep = function ConditionStep(_ref) {
48
48
  setCurrentStep = _ref.setCurrentStep,
49
49
  onDeactivate = _ref.onDeactivate,
50
50
  showSuffix = _ref.showSuffix,
51
- hoverDisabled = _ref.hoverDisabled;
51
+ hoverDisabled = _ref.hoverDisabled,
52
+ inputProps = _ref.inputProps;
52
53
 
53
54
  var _useIntl = useIntl(),
54
55
  formatMessage = _useIntl.formatMessage;
@@ -146,6 +147,7 @@ export var ConditionStep = function ConditionStep(_ref) {
146
147
  index: conditionIndex,
147
148
  conditionId: condition.id,
148
149
  addCondition: addCondition,
150
+ inputProps: inputProps,
149
151
  conditionParameter: condition.parameter,
150
152
  conditionOperator: condition.operator,
151
153
  conditionFactor: condition.factor,
@@ -169,7 +171,7 @@ export var ConditionStep = function ConditionStep(_ref) {
169
171
  stepType: (_step$context2 = step.context) == null ? void 0 : _step$context2.type,
170
172
  onDeactivate: onDeactivate
171
173
  });
172
- }, [step.id, step.conditions.length, step.context, hasPriority, currentConditionId, addCondition, removeCondition, minConditionsLength, maxConditionsLength, currentStepId, currentField, selectParameter, selectOperator, getPopupContainerOverride, setStepConditionFactorType, setStepConditionFactorValue, text, onDeactivate, onActivate, setCurrentField, setCurrentCondition, setCurrentStep]);
174
+ }, [step.id, step.conditions.length, step.context, hasPriority, currentConditionId, addCondition, removeCondition, minConditionsLength, maxConditionsLength, currentStepId, currentField, selectParameter, selectOperator, getPopupContainerOverride, setStepConditionFactorType, setStepConditionFactorValue, text, onDeactivate, onActivate, setCurrentField, setCurrentCondition, setCurrentStep, inputProps]);
173
175
  return /*#__PURE__*/React.createElement(S.Step, {
174
176
  key: step.id,
175
177
  id: "condition-step-" + step.id,
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { FactorType, FactorValueType } from '@synerise/ds-factors/dist/Factors.types';
2
+ import { FactorType, FactorValueType, InputProps } from '@synerise/ds-factors/dist/Factors.types';
3
3
  import { ContextGroup, ContextItem } from '@synerise/ds-context-selector/dist/ContextSelector.types';
4
4
  import { SubjectItem } from '@synerise/ds-subject/dist/Subject.types';
5
5
  import { OperatorsGroup, OperatorsItem } from '@synerise/ds-operators/dist/Operator.types';
@@ -34,4 +34,5 @@ export declare type ConditionStepProps = {
34
34
  onDeactivate: () => void;
35
35
  showSuffix?: boolean;
36
36
  hoverDisabled?: boolean;
37
+ inputProps: InputProps;
37
38
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-condition",
3
- "version": "0.17.36",
3
+ "version": "0.17.37",
4
4
  "description": "Condition UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -33,14 +33,14 @@
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
35
  "@synerise/ds-button": "^0.17.9",
36
- "@synerise/ds-context-selector": "^0.14.1",
36
+ "@synerise/ds-context-selector": "^0.14.2",
37
37
  "@synerise/ds-core": "^0.36.3",
38
38
  "@synerise/ds-cruds": "^0.3.17",
39
- "@synerise/ds-factors": "^0.15.2",
39
+ "@synerise/ds-factors": "^0.15.3",
40
40
  "@synerise/ds-icon": "^0.51.0",
41
- "@synerise/ds-inline-edit": "^0.6.33",
42
- "@synerise/ds-operators": "^0.9.21",
43
- "@synerise/ds-subject": "^0.9.21",
41
+ "@synerise/ds-inline-edit": "^0.6.34",
42
+ "@synerise/ds-operators": "^0.9.22",
43
+ "@synerise/ds-subject": "^0.9.22",
44
44
  "@synerise/ds-tooltip": "^0.11.17",
45
45
  "@synerise/ds-utils": "^0.19.0",
46
46
  "react-sortablejs": "^6.0.0"
@@ -49,5 +49,5 @@
49
49
  "@synerise/ds-core": "*",
50
50
  "react": ">=16.9.0 < 17.0.0"
51
51
  },
52
- "gitHead": "0c2453a26567f2e73744470f9e246c53a5d80a98"
52
+ "gitHead": "07b8ee9d3f238ab4a03d04380ab9011620b55ec1"
53
53
  }