@synerise/ds-filter 1.2.39 → 1.2.41

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 +8 -0
  2. package/README.md +38 -29
  3. package/package.json +7 -7
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
+ ## [1.2.41](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@1.2.40...@synerise/ds-filter@1.2.41) (2026-03-20)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-filter
9
+
10
+ ## [1.2.40](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@1.2.39...@synerise/ds-filter@1.2.40) (2026-03-09)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-filter
13
+
6
14
  ## [1.2.39](https://github.com/Synerise/synerise-design/compare/@synerise/ds-filter@1.2.38...@synerise/ds-filter@1.2.39) (2026-02-23)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-filter
package/README.md CHANGED
@@ -20,7 +20,7 @@ import Filter from '@synerise/ds-filter'
20
20
 
21
21
  <Filter
22
22
  expressions={[]}
23
- onAdd={() => {}}
23
+ addFilterComponent={({ isLimitExceeded }) => <button disabled={isLimitExceeded}>Add filter</button>}
24
24
  onChangeLogic={(stepId, logicValue) => {}}
25
25
  onChangeOrder={(expressions) => {}}
26
26
  onChangeStepMatching={(stepId, matchingValue) => {}}
@@ -59,37 +59,46 @@ import Filter from '@synerise/ds-filter'
59
59
 
60
60
  ## API
61
61
 
62
- | Property | Description | Type | Default |
63
- | ------------------------- | ----------------------------------------------------------- | ---------------------------------------------------------- | ------- |
64
- | expressions | Array of expressions | Expression[] | - |
65
- | matching | Main matching configuration | : MatchingProps | - |
66
- | onChangeOrder | Function called when user change order of StepCards | (newOrder: Expression[]) => void | - |
67
- | onChangeLogic | Function called when user change value of Logic | (id: string, logic: LogicOperatorValue) => void | - |
68
- | onChangeStepMatching | Function called when user change value of StepCard matching | (id: string, matching: boolean) => void | - |
69
- | onChangeStepName | Function called when user change name of StepCard | (id: string, name: string) => void | - |
70
- | onDeleteStep | Function called when user click on delete StepCard icon | (id: string) => void | - |
71
- | onDuplicateStep | Function called when user click on duplicate StepCard icon | (id: string) => void | - |
72
- | renderHeaderRightSide | Renders filter header right side slot | (expressions: Expression[]) => React.ReactNode; | - |
73
- | renderStepFooter | Function which renders footer of StepCard | (expression: Expression) => React.ReactNode | - |
74
- | renderStepContent | Function which render content of StepCard | (expression: Expression) => React.ReactNode | - |
75
- | renderStepHeaderRightSide | Function which renders right side slot in StepCard header | (expression: Expression, index: number) => React.ReactNode | - |
76
- | onAdd | Function called when user click on AddFilter button | () => void | - |
77
- | texts | Object with translations | FilterTexts | - |
62
+ | Property | Description | Type | Default |
63
+ | ------------------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------- |
64
+ | expressions | Array of expressions | Expression[] | - |
65
+ | matching | Main matching configuration | MatchingProps | - |
66
+ | onChangeOrder | Called when user changes order; also enables drag mode when 2+ expressions | (newOrder: Expression[]) => void | - |
67
+ | onChangeLogic | Called when user changes value of Logic | (id: string, logic: LogicOperatorValue) => void | - |
68
+ | onChangeStepMatching | Called when user changes value of StepCard matching | (id: string, matching: boolean) => void | - |
69
+ | onChangeStepName | Called when user changes name of StepCard | (id: string, name: string) => void | - |
70
+ | onDeleteStep | Called when user clicks delete StepCard icon | (id: string) => void | - |
71
+ | onDuplicateStep | Called when user clicks duplicate; hidden when maxConditionsLimit exceeded | (id: string) => void | - |
72
+ | addFilterComponent | Add filter button area; hidden in readOnly; function form receives { isLimitExceeded } | ReactNode or ((arg: { isLimitExceeded: boolean }) => ReactNode) | - |
73
+ | renderHeaderRightSide | Renders filter header right side slot | (expressions: Expression[]) => React.ReactNode | - |
74
+ | renderStepFooter | Renders footer of each StepCard | (expression: Expression) => React.ReactNode | - |
75
+ | renderStepContent | Renders content of each StepCard; hoverDisabled is true when another step is active | (expression: Expression, hoverDisabled?: boolean) => React.ReactNode | - |
76
+ | renderStepHeaderRightSide | Renders right side slot in each StepCard header | (expression: Expression, index: number, options?: { placeholder?: boolean }) => React.ReactNode | - |
77
+ | logicOptions | Available logic operator choices | LogicOperator[] | - |
78
+ | maxConditionsLimit | Shows count/limit in header; disables duplicate when reached | number | - |
79
+ | readOnly | Disables all editing interactions | boolean | false |
80
+ | singleStepCondition | Passes single-condition variant flag to StepCard | boolean | false |
81
+ | visibilityConfig | Controls StepCard header visibility | { isStepCardHeaderVisible?: boolean } | { isStepCardHeaderVisible: true } |
82
+ | getMoveByLabel | Returns accessible aria label for keyboard-move buttons | (moveByOffset: number) => string | - |
83
+ | texts | Object with translations (deep partial — any subset can be overridden) | DeepPartial<FilterTexts> | - |
78
84
 
79
85
  ### Expression
80
86
 
81
- | Property | Description | Type | Default |
82
- | -------- | --------------------------------------------------- | ------------------------------------------------ | ------- |
83
- | type | Type of expression: `STEP` or `LOGIC` | `STEP` \ `LOGIC` | - |
84
- | id | Id of expression | string | - |
85
- | data | Object with props of expression, base of type value | `Partial<StepCardProps>` \ `Partial<LogicProps>` | - |
86
- | logic | Logic component related to Step expression | `Expression` | - |
87
+ | Property | Description | Type | Default |
88
+ | -------------- | ------------------------------------------------------ | ------------------------------------------------- | ------- |
89
+ | type | Type of expression: STEP or LOGIC | 'STEP' or 'LOGIC' | - |
90
+ | id | Id of expression | string | - |
91
+ | data | Object with props of expression, based on type | Partial<StepCardProps> or Partial<LogicProps> | - |
92
+ | logic | Logic operator before this step (STEP only) | LogicType | - |
93
+ | expressionType | Controls matching text variant (STEP only) | 'attribute' or 'event' | - |
87
94
 
88
95
  ### FilterTexts
89
96
 
90
- | Property | Description | Type | Default |
91
- | ---------- | ----------------------------------------------- | ------------- | -------------- |
92
- | matching | Object with translations for Matching component | MatchingTexts | - |
93
- | step | Object with translations for StepCard component | StepCardTexts | - |
94
- | addFilter | Label of AddFilter button | string | 'Add filter' |
95
- | dropMeHere | Label of drop area | string | 'Drop me here' |
97
+ | Property | Description | Type | Default |
98
+ | ----------- | ----------------------------------------------- | ------------- | -------------- |
99
+ | matching | Object with translations for Matching component | MatchingTexts | - |
100
+ | step | Object with translations for StepCard component | object | - |
101
+ | addFilter | Label of AddFilter button | string | 'Add filter' |
102
+ | dropMeHere | Label of drop area | string | 'Drop me here' |
103
+ | placeholder | Object with placeholder translations | object | - |
104
+ | overwritten | Object for header overrides (filterTitle) | object | - |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-filter",
3
- "version": "1.2.39",
3
+ "version": "1.2.41",
4
4
  "description": "Filter UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -35,11 +35,11 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-button": "^1.5.15",
39
- "@synerise/ds-logic": "^1.1.29",
40
- "@synerise/ds-sortable": "^1.3.12",
41
- "@synerise/ds-step-card": "^1.2.37",
42
- "@synerise/ds-utils": "^1.6.0"
38
+ "@synerise/ds-button": "^1.5.17",
39
+ "@synerise/ds-logic": "^1.1.31",
40
+ "@synerise/ds-sortable": "^1.3.13",
41
+ "@synerise/ds-step-card": "^1.2.39",
42
+ "@synerise/ds-utils": "^1.7.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@synerise/ds-core": "*",
@@ -47,5 +47,5 @@
47
47
  "react-intl": ">=3.12.0 <= 6.8",
48
48
  "styled-components": "^5.3.3"
49
49
  },
50
- "gitHead": "2997f77d657c1aed2fc39901d3e0b8f88b05cc53"
50
+ "gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
51
51
  }