@synerise/ds-factors 1.11.9 → 1.11.11

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 +43 -27
  3. package/package.json +32 -32
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.11.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@1.11.10...@synerise/ds-factors@1.11.11) (2026-03-20)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-factors
9
+
10
+ ## [1.11.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@1.11.9...@synerise/ds-factors@1.11.10) (2026-03-09)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-factors
13
+
6
14
  ## [1.11.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@1.11.8...@synerise/ds-factors@1.11.9) (2026-02-26)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-factors
package/README.md CHANGED
@@ -100,35 +100,48 @@ import Factors from '@synerise/ds-factors'
100
100
 
101
101
  ## API
102
102
 
103
- | Property | Description | Type | Default |
104
- | ------------------------- | ----------------------------------------------------------------------------------------- | -------------------------------------------------- | --------- |
105
- | autocompleteText | Array of available autocomplete suggestions (only if textType is equal to `autocomplete`) | {options: string[]} | - |
106
- | availableFactorTypes | Array of available factor types | FactorType[] | - |
107
- | defaultFactorType | Default factor type | FactorType | - |
108
- | formulaEditor | Formula editor render in modal when factory type is equal to `formula` | React.ReactNode | - |
109
- | getPopupContainerOverride | Popup container function for child tooltips and dropdowns | (trigger: HTMLElement \ null) => HTMLElement; | - |
110
- | onActivate | Callback called when user opens dropdown | (fieldType: string) => void | - |
111
- | onChangeValue | Callback called when user change value | (value: FactorValueType) => void | - |
112
- | onDeactivate | Callback called when user closes dropdown | () => void | - |
113
- | opened | Whether if dropdown should opens from outside of component | boolean | false |
114
- | parameters | Options for parameters list | ParameterOptions | - |
115
- | selectedFactorType | Selected factor type | FactorType | - |
116
- | setSelectedFactorType | Callback called when user selects factor type | (factor: FactorType) => void | - |
117
- | texts | Translations object | FactorsTexts | - |
118
- | textType | Variant of text type input (`autocomplete` \ `expansible` \ `default` ) | string | `default` |
119
- | unavailableFactorTypes | Array of excluded factor types | FactorType[] | - |
120
- | value | Value | FactorValueType | - |
121
- | withoutTypeSelector | Whether if hide factor type selector | boolean | - |
122
- | inputProps | text input additional props (for text factor type) | InputProps | - |
123
- | arrayProps | options for array factor type | { itemType?: 'string' / 'number', limit?: number } | - |
103
+ | Property | Description | Type | Default |
104
+ | ------------------------- | ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | --------- |
105
+ | selectedFactorType | Selected factor type | FactorType | - |
106
+ | onChangeValue | Callback called when user changes value | (value: FactorValueType) => void | - |
107
+ | value | Value | FactorValueType | - |
108
+ | defaultFactorType | Default factor type (fallback when selectedFactorType is unrecognised) | FactorType | `'text'` |
109
+ | setSelectedFactorType | Callback called when user selects factor type | (factor: FactorType) => void | - |
110
+ | textType | Variant of text type input | `'autocomplete'` / `'expansible'` / `'default'` | `default` |
111
+ | allowClear | Shows clear button on inputs that support it | boolean | true |
112
+ | withoutTypeSelector | Whether to hide factor type selector | boolean | false |
113
+ | uncontrolledComponent | Sub-components manage their own open/close state | boolean | false |
114
+ | error | Shows error styling on the input | boolean | - |
115
+ | errorText | Error message text | ReactNode | - |
116
+ | unavailableFactorTypes | Array of excluded factor types | FactorType[] | - |
117
+ | availableFactorTypes | Array of available factor types (allowlist) | FactorType[] | - |
118
+ | customFactorValueComponents | Override component, name, or icon for any built-in factor type | Partial<FactorTypeMapping> | - |
119
+ | factorValueExtraProps | Pass extra icon/tooltip props to text or dynamicKey inputs | Partial<ExtraPropsMapping> | - |
120
+ | autocompleteText | Autocomplete suggestions (only when textType is `autocomplete`) | { options: string[] } | - |
121
+ | formulaEditor | Content rendered inside the formula editor modal | React.ReactNode | - |
122
+ | getPopupContainerOverride | Popup container function for child tooltips and dropdowns | (trigger: HTMLElement / null) => HTMLElement | - |
123
+ | onActivate | Callback called when user opens dropdown | () => void | - |
124
+ | onDeactivate | Callback called when user closes dropdown | () => void | - |
125
+ | opened | Externally controls whether the dropdown/modal is open | boolean | - |
126
+ | loading | Shows loading state in the input | boolean | - |
127
+ | preventAutoloadData | Prevents auto-fetching data in parameter input | boolean | - |
128
+ | parameters | Options for parameters list | ParameterOptions | - |
129
+ | onParamsClick | Called when the parameter button is clicked | () => void | - |
130
+ | arrayProps | Options for array factor type | { itemType?: 'string' / 'number'; limit?: number; collectorSuggestions?: CollectorValue[] } | - |
131
+ | relativeDateProps | Customise relative date display and available units | { triggerValueFormatter?: (value) => string; availableUnits?: RelativeDateUnit[] } | - |
132
+ | autoResize | Auto-resize behaviour for text inputs | AutoResizeProp | - |
133
+ | inputProps | Extra props forwarded to text inputs | Partial<InputProps> | - |
134
+ | readOnly | Disables all interaction | boolean | - |
135
+ | factorKey | Unique key for the factor instance; used to reset state on remount | ReactText | - |
136
+ | texts | Translations object (deep partial — any subset can be overridden) | DeepPartial<FactorsTexts> | - |
124
137
 
125
138
  ### FactorType
126
139
 
127
- All available factor types: `text`, `number`, `parameter`, `contextParameter`, `dynamicKey`, `formula`, `array`, `date`, `relativeDate`,
140
+ All available factor types: `text`, `number`, `parameter`, `contextParameter`, `dynamicKey`, `formula`, `array`, `date`, `relativeDate`, `dateRange`
128
141
 
129
142
  ### FactorValueType
130
143
 
131
- Type of value depends on current factor type and can contain values: `string` \ `number` \ `Array<string | numer>` \ `Date` \ `undefined` \ `DynamicKeyValueType` \ `FormulaValueType` \ `ParameterValueType`;
144
+ Type of value depends on current factor type and can contain values: `string` / `number` / `Array<string | number>` / `Date` / `undefined` / `DynamicKeyValueType` / `FormulaValueType` / `ParameterValueType` / `Partial<DateFilter>`
132
145
 
133
146
  ### DynamicKeyValueType
134
147
 
@@ -140,15 +153,18 @@ Type of value depends on current factor type and can contain values: `string` \
140
153
 
141
154
  ### ParameterValueType
142
155
 
143
- `{ type: string; icon: string; name: string; id: React.ReactText; }`
156
+ `{ type: string; icon: ReactNode; name: string; id: React.ReactText; groupId?: React.ReactText; description?: string; value?: React.ReactText | null }`
144
157
 
145
158
  ### ParameterOptions
146
159
 
147
160
  | Property | Description | Type | Default |
148
161
  | ----------------------- | ---------------------------------------------------------- | ------------------------ | ------- |
149
162
  | buttonIcon | Icon in button | React.ReactNode | - |
150
- | buttonLabel | Label of button | string \ React.ReactNode | - |
151
- | groups | Array of parameter groups | ParameterGroup[] | - |
163
+ | buttonLabel | Label of button | string / React.ReactNode | - |
152
164
  | items | Array of parameters | ParameterItem[] | - |
165
+ | groups | Array of parameter groups | ParameterGroup[] | - |
166
+ | recentItems | Items shown at top as recently used | ParameterItem[] | - |
153
167
  | selectedButtonColored | Whether to use green custom color if parameter is selected | boolean | - |
154
- | maxSearchResultsInGroup | How many search results should be shown per group | number | 4 |
168
+ | renderEmptyGroups | Show group headers even if group has no items | boolean | - |
169
+ | dropdownDimensionsConfig | Override dropdown height at different viewport sizes | { defaultHeight?, lowerHeight?, threshold? } | - |
170
+ | showAllGroup | **Deprecated** | boolean | - |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-factors",
3
- "version": "1.11.9",
3
+ "version": "1.11.11",
4
4
  "description": "Factors 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": "vitest",
27
- "test:watch": "pnpm run test -- --watch",
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,34 +35,34 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-alert": "^1.1.42",
39
- "@synerise/ds-autocomplete": "^1.2.32",
40
- "@synerise/ds-badge": "^1.0.41",
41
- "@synerise/ds-button": "^1.5.15",
42
- "@synerise/ds-button-group": "^1.1.40",
43
- "@synerise/ds-collector": "^1.4.24",
44
- "@synerise/ds-date-picker": "^1.3.21",
45
- "@synerise/ds-date-range-picker": "^1.6.9",
46
- "@synerise/ds-divider": "^1.2.17",
47
- "@synerise/ds-dropdown": "^1.2.7",
48
- "@synerise/ds-empty-states": "^1.0.34",
49
- "@synerise/ds-icon": "^1.14.1",
50
- "@synerise/ds-information-card": "^1.6.2",
51
- "@synerise/ds-inline-edit": "^1.1.21",
52
- "@synerise/ds-input": "^1.6.7",
53
- "@synerise/ds-input-number": "^1.2.32",
54
- "@synerise/ds-list-item": "^1.4.7",
55
- "@synerise/ds-modal": "^1.3.8",
56
- "@synerise/ds-result": "^1.0.46",
57
- "@synerise/ds-scrollbar": "^1.2.14",
58
- "@synerise/ds-search": "^1.5.7",
59
- "@synerise/ds-select": "^1.3.17",
60
- "@synerise/ds-short-cuts": "^1.0.39",
61
- "@synerise/ds-skeleton": "^1.0.42",
62
- "@synerise/ds-tabs": "^1.1.21",
63
- "@synerise/ds-tag": "^1.4.15",
64
- "@synerise/ds-tooltip": "^1.4.7",
65
- "@synerise/ds-utils": "^1.6.0",
38
+ "@synerise/ds-alert": "^1.1.44",
39
+ "@synerise/ds-autocomplete": "^1.2.34",
40
+ "@synerise/ds-badge": "^1.0.43",
41
+ "@synerise/ds-button": "^1.5.17",
42
+ "@synerise/ds-button-group": "^1.1.42",
43
+ "@synerise/ds-collector": "^1.4.26",
44
+ "@synerise/ds-date-picker": "^1.4.1",
45
+ "@synerise/ds-date-range-picker": "^1.6.11",
46
+ "@synerise/ds-divider": "^1.3.1",
47
+ "@synerise/ds-dropdown": "^1.3.1",
48
+ "@synerise/ds-empty-states": "^1.0.35",
49
+ "@synerise/ds-icon": "^1.15.0",
50
+ "@synerise/ds-information-card": "^1.6.4",
51
+ "@synerise/ds-inline-edit": "^1.1.23",
52
+ "@synerise/ds-input": "^1.6.9",
53
+ "@synerise/ds-input-number": "^1.2.34",
54
+ "@synerise/ds-list-item": "^1.4.9",
55
+ "@synerise/ds-modal": "^1.4.0",
56
+ "@synerise/ds-result": "^1.0.48",
57
+ "@synerise/ds-scrollbar": "^1.2.16",
58
+ "@synerise/ds-search": "^1.5.9",
59
+ "@synerise/ds-select": "^1.3.19",
60
+ "@synerise/ds-short-cuts": "^1.0.41",
61
+ "@synerise/ds-skeleton": "^1.0.44",
62
+ "@synerise/ds-tabs": "^1.1.23",
63
+ "@synerise/ds-tag": "^1.4.17",
64
+ "@synerise/ds-tooltip": "^1.4.9",
65
+ "@synerise/ds-utils": "^1.7.0",
66
66
  "lodash.merge": "^4.6.2",
67
67
  "react-window": "^1.8.11",
68
68
  "uuid": "^8.3.2"
@@ -79,5 +79,5 @@
79
79
  "styled-components": "^5.3.3",
80
80
  "vitest": "4"
81
81
  },
82
- "gitHead": "4ffbd56e9bf6277c4507efeaf000b66b9bb09781"
82
+ "gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
83
83
  }