@synerise/ds-factors 1.11.10 → 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.
- package/CHANGELOG.md +4 -0
- package/README.md +43 -27
- package/package.json +32 -32
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
|
|
6
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)
|
|
7
11
|
|
|
8
12
|
**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
|
|
104
|
-
| ------------------------- | ----------------------------------------------------------------------------------------- |
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
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`
|
|
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:
|
|
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
|
|
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
|
-
|
|
|
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.
|
|
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": "
|
|
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.
|
|
39
|
-
"@synerise/ds-autocomplete": "^1.2.
|
|
40
|
-
"@synerise/ds-badge": "^1.0.
|
|
41
|
-
"@synerise/ds-button": "^1.5.
|
|
42
|
-
"@synerise/ds-button-group": "^1.1.
|
|
43
|
-
"@synerise/ds-collector": "^1.4.
|
|
44
|
-
"@synerise/ds-date-picker": "^1.4.
|
|
45
|
-
"@synerise/ds-date-range-picker": "^1.6.
|
|
46
|
-
"@synerise/ds-divider": "^1.3.
|
|
47
|
-
"@synerise/ds-dropdown": "^1.3.
|
|
48
|
-
"@synerise/ds-empty-states": "^1.0.
|
|
49
|
-
"@synerise/ds-icon": "^1.
|
|
50
|
-
"@synerise/ds-information-card": "^1.6.
|
|
51
|
-
"@synerise/ds-inline-edit": "^1.1.
|
|
52
|
-
"@synerise/ds-input": "^1.6.
|
|
53
|
-
"@synerise/ds-input-number": "^1.2.
|
|
54
|
-
"@synerise/ds-list-item": "^1.4.
|
|
55
|
-
"@synerise/ds-modal": "^1.
|
|
56
|
-
"@synerise/ds-result": "^1.0.
|
|
57
|
-
"@synerise/ds-scrollbar": "^1.2.
|
|
58
|
-
"@synerise/ds-search": "^1.5.
|
|
59
|
-
"@synerise/ds-select": "^1.3.
|
|
60
|
-
"@synerise/ds-short-cuts": "^1.0.
|
|
61
|
-
"@synerise/ds-skeleton": "^1.0.
|
|
62
|
-
"@synerise/ds-tabs": "^1.1.
|
|
63
|
-
"@synerise/ds-tag": "^1.4.
|
|
64
|
-
"@synerise/ds-tooltip": "^1.4.
|
|
65
|
-
"@synerise/ds-utils": "^1.
|
|
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": "
|
|
82
|
+
"gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
|
|
83
83
|
}
|