@synerise/ds-condition 1.6.14 → 1.6.16

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +24 -4
  3. package/package.json +19 -18
package/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
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.6.16](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@1.6.15...@synerise/ds-condition@1.6.16) (2026-03-20)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-condition
9
+
10
+ ## [1.6.15](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@1.6.14...@synerise/ds-condition@1.6.15) (2026-03-09)
11
+
12
+ ### Bug Fixes
13
+
14
+ - **condition:** change jest to vitest ([4b59376](https://github.com/Synerise/synerise-design/commit/4b593763b668a2609510ff67c59594be3599ba6a))
15
+
6
16
  ## [1.6.14](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@1.6.13...@synerise/ds-condition@1.6.14) (2026-02-26)
7
17
 
8
18
  **Note:** Version bump only for package @synerise/ds-condition
package/README.md CHANGED
@@ -11,6 +11,8 @@ Condition UI Component
11
11
  npm i @synerise/ds-condition
12
12
  or
13
13
  yarn add @synerise/ds-condition
14
+ or
15
+ pnpm add @synerise/ds-condition
14
16
  ```
15
17
 
16
18
  ## Usage
@@ -109,8 +111,8 @@ import Condition from '@synerise/ds-condition'
109
111
  | removeCondition | Callback called when user clicks on remove row of condtions | (stepId: React.ReactText, conditionRowId: React.ReactText) => void | - |
110
112
  | steps | Array contains all steps of condition | ConditionStep[] | - |
111
113
  | texts | Translations object | Texts | - |
112
- | updateStepName | Callback called when user change the name of step | (stepId: React.ReactText, value: string) => void | - |
113
- | addStep | Callback called when user clicks on add step button | () => void | - |
114
+ | onUpdateStepName | Callback called when user change the name of step | (stepId: React.ReactText, value: string) => void | - |
115
+ | addStep | Callback called when user clicks on add step button | () => ReactText \| void | - |
114
116
  | duplicateStep | Callback called when user clicks on duplicate step button | (stepId: React.ReactText) => void | - |
115
117
  | removeStep | Callback called when user clicks on remove step button | (stepId: React.ReactText) => void | - |
116
118
  | onChangeOrder | Callback called when user change order of steps | (order: ConditionStep[]) => void | - |
@@ -126,8 +128,21 @@ import Condition from '@synerise/ds-condition'
126
128
  | onUpdateStepName | Callback called when user change the name of step condition | (stepId: React.ReactText, value: string) => void | - |
127
129
  | onDeactivate | Callback called when user blur on of the condition inputs | (stepId: React.ReactText, conditionId: string) => void | - |
128
130
  | getPopupContainerOverride | Popup container function for child tooltips and dropdowns | (trigger: HTMLElement | null) => HTMLElement; | - |
129
- | defaultOpenedComponent | Component which should be opened after render | 'subject' \ 'operator' \ 'factor' \ 'parameter' \ 'context' | - |
131
+ | autoOpenedComponent | Component which should be opened after render | 'subject' \| 'operator' \| 'factor' \| 'parameter' \| 'context' | - |
130
132
  | inputProps | group of props from ds-factors types | InputProps | - |
133
+ | readOnly | Disables all editing and hides add/remove/duplicate controls | boolean | false |
134
+ | singleStepCondition | Hides step CRUD and drag handle | boolean | - |
135
+ | showActionAttribute | Renders action-attribute selector after subject/context | boolean | - |
136
+ | showEmptyConditionPlaceholder | Shows placeholder when no subject/context chosen | boolean | false |
137
+ | showSuffix | Renders suffix text ("and") between condition rows | boolean | - |
138
+ | hoverDisabled | Disables hover highlight on steps | boolean | - |
139
+ | renderAddStep | Replaces the default add step button with custom content | () => ReactNode | - |
140
+ | contextSelectorComponent | Replaces default context selector | ComponentType\<CustomContextSelectorProps\> | - |
141
+ | parameterSelectorComponent | Replaces default parameter value component | ComponentType\<FactorValueComponentProps\> | - |
142
+ | factorParameterSelectorComponent | Replaces default factor parameter selector | ComponentType\<FactorValueComponentProps\> | - |
143
+ | actionAttributeParameterSelectorComponent | Replaces default action-attribute parameter selector | ComponentType\<FactorValueComponentProps\> | - |
144
+ | onChangeActionAttribute | Callback when action attribute value changes | (stepId: React.ReactText, value: FactorValueType \| undefined) => void | - |
145
+ | factorValueExtraProps | Extra props forwarded to all factor value components | FactorsProps['factorValueExtraProps'] | - |
131
146
 
132
147
  ### ConditionStep
133
148
 
@@ -138,7 +153,8 @@ import Condition from '@synerise/ds-condition'
138
153
  | stepName | The name of step | string | - |
139
154
  | subject | Subject options | [SubjectProps](/docs/components/subject) | - |
140
155
  | context | ContextSelector options | [ContextSelectorProps](/docs/components/context-selector) | - |
141
- | getPopupContainerOverride | Popup container function for child tooltips and dropdowns | (trigger: HTMLElement | null) => HTMLElement; | - |
156
+ | actionAttribute | Action-attribute selector options | Omit\<FactorsProps, 'onChangeValue' \| 'selectedFactorType' \| 'defaultFactorType'\> | - |
157
+ | addConditionErrorText | Error displayed below the "Add condition" button | ReactNode | - |
142
158
 
143
159
  ### StepConditions
144
160
 
@@ -170,3 +186,7 @@ See [Condition.spec.tsx](./src/__specs__/Condition.spec.tsx) for code examples
170
186
  | moveTooltip | Tooltip on move step button | string | - |
171
187
  | removeTooltip | Tooltip on remove step button | string | - |
172
188
  | dropLabel | Label on drop zone | string | - |
189
+ | addFirstConditionRowButton | Label for the first "Add condition" button | string | - |
190
+ | conditionSuffix | Text between condition rows ("and") | string | - |
191
+ | stepNamePrefix | Prefix before step index ("Step") | string | - |
192
+ | emptyConditionLabel | Placeholder label before event selected | string | - |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-condition",
3
- "version": "1.6.14",
3
+ "version": "1.6.16",
4
4
  "description": "Condition UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -23,8 +23,8 @@
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
25
25
  "prepublish": "pnpm run build",
26
- "test": "jest",
27
- "test:watch": "pnpm run test -- --watchAll",
26
+ "test": "vitest run",
27
+ "test:watch": "vitest",
28
28
  "types": "tsc --noEmit",
29
29
  "check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
30
30
  "upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
@@ -35,24 +35,25 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-button": "^1.5.15",
39
- "@synerise/ds-context-selector": "^1.3.14",
40
- "@synerise/ds-cruds": "^1.0.37",
41
- "@synerise/ds-factors": "^1.11.9",
42
- "@synerise/ds-icon": "^1.14.1",
43
- "@synerise/ds-inline-edit": "^1.1.21",
44
- "@synerise/ds-input": "^1.6.7",
45
- "@synerise/ds-operators": "^1.1.21",
46
- "@synerise/ds-sortable": "^1.3.12",
47
- "@synerise/ds-subject": "^1.1.21",
48
- "@synerise/ds-tooltip": "^1.4.7",
49
- "@synerise/ds-typography": "^1.1.10",
50
- "@synerise/ds-utils": "^1.6.0",
38
+ "@synerise/ds-button": "^1.5.17",
39
+ "@synerise/ds-context-selector": "^1.3.16",
40
+ "@synerise/ds-cruds": "^1.1.1",
41
+ "@synerise/ds-factors": "^1.11.11",
42
+ "@synerise/ds-icon": "^1.15.0",
43
+ "@synerise/ds-inline-edit": "^1.1.23",
44
+ "@synerise/ds-input": "^1.6.9",
45
+ "@synerise/ds-operators": "^1.1.23",
46
+ "@synerise/ds-sortable": "^1.3.13",
47
+ "@synerise/ds-subject": "^1.1.23",
48
+ "@synerise/ds-tooltip": "^1.4.9",
49
+ "@synerise/ds-typography": "^1.1.12",
50
+ "@synerise/ds-utils": "^1.7.0",
51
51
  "lodash.debounce": "^4.0.8"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@testing-library/user-event": "^14",
55
- "@types/lodash.debounce": "^4.0.9"
55
+ "@types/lodash.debounce": "^4.0.9",
56
+ "vitest": "4"
56
57
  },
57
58
  "peerDependencies": {
58
59
  "@synerise/ds-core": "*",
@@ -60,5 +61,5 @@
60
61
  "react-intl": ">=3.12.0 <= 6.8",
61
62
  "styled-components": "^5.3.3"
62
63
  },
63
- "gitHead": "4ffbd56e9bf6277c4507efeaf000b66b9bb09781"
64
+ "gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
64
65
  }