@synerise/ds-factors 0.23.7 → 0.24.0
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 +16 -0
- package/dist/FactorValue/Parameter/Parameter.js +1 -1
- package/dist/FactorValue/Parameter/ParameterDropdown.js +1 -0
- package/dist/FactorValue/Parameter/ParameterDropdownItem.js +2 -2
- package/dist/Factors.types.d.ts +26 -25
- package/dist/index.d.ts +1 -1
- package/package.json +20 -20
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.24.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@0.23.7...@synerise/ds-factors@0.24.0) (2024-08-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **context-selector:** reuse renderHoverTooltip for selected item ([57e8a14](https://github.com/Synerise/synerise-design/commit/57e8a148e70bccd54c6d4540fb36c14d492f110b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **storybook7:** condition stories ([50c3613](https://github.com/Synerise/synerise-design/commit/50c36138dfd1097fe3b1182047eded4bbea584e9))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.23.7](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@0.23.6...@synerise/ds-factors@0.23.7) (2024-08-27)
|
|
7
23
|
|
|
8
24
|
|
|
@@ -119,7 +119,7 @@ var ParameterInput = function ParameterInput(_ref) {
|
|
|
119
119
|
popupPlacement: 'top',
|
|
120
120
|
getPopupContainer: getPopupContainerOverride || getPopupContainer
|
|
121
121
|
},
|
|
122
|
-
renderHoverTooltip: parameter
|
|
122
|
+
renderHoverTooltip: isSelected ? (parameter == null ? void 0 : parameter.renderHoverTooltip) || function () {
|
|
123
123
|
var _parameter$id;
|
|
124
124
|
|
|
125
125
|
return /*#__PURE__*/React.createElement(InformationCard, _extends({
|
|
@@ -18,7 +18,7 @@ var ParameterDropdownItem = function ParameterDropdownItem(_ref) {
|
|
|
18
18
|
style = _ref.style;
|
|
19
19
|
|
|
20
20
|
var id = item.id,
|
|
21
|
-
|
|
21
|
+
icon = item.icon,
|
|
22
22
|
itemProps = _objectWithoutPropertiesLoose(item, _excluded);
|
|
23
23
|
|
|
24
24
|
return /*#__PURE__*/React.createElement(ListItem, _extends({}, itemProps, {
|
|
@@ -26,7 +26,7 @@ var ParameterDropdownItem = function ParameterDropdownItem(_ref) {
|
|
|
26
26
|
className: className,
|
|
27
27
|
key: item.name + item.id,
|
|
28
28
|
prefixel: /*#__PURE__*/React.createElement(Icon, {
|
|
29
|
-
component:
|
|
29
|
+
component: icon
|
|
30
30
|
}),
|
|
31
31
|
highlight: searchQuery,
|
|
32
32
|
onClick: function onClick() {
|
package/dist/Factors.types.d.ts
CHANGED
|
@@ -1,48 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DateFilter } from '@synerise/ds-date-range-picker/dist/date.types';
|
|
3
|
-
import { Texts as DateRangeTexts } from '@synerise/ds-date-range-picker/dist/DateRangePicker.types';
|
|
1
|
+
import type { ReactText, ReactNode, ElementType } from 'react';
|
|
2
|
+
import type { DateFilter } from '@synerise/ds-date-range-picker/dist/date.types';
|
|
3
|
+
import type { Texts as DateRangeTexts } from '@synerise/ds-date-range-picker/dist/DateRangePicker.types';
|
|
4
4
|
import type { MenuItemProps } from '@synerise/ds-menu';
|
|
5
5
|
import type { AutoResizeProp } from '@synerise/ds-input';
|
|
6
|
-
import { InformationCardProps } from '@synerise/ds-information-card';
|
|
6
|
+
import type { InformationCardProps } from '@synerise/ds-information-card';
|
|
7
|
+
import type { ListItemProps } from '@synerise/ds-list-item';
|
|
7
8
|
export declare const ALL_FACTOR_TYPES: readonly ["text", "number", "parameter", "contextParameter", "dynamicKey", "formula", "array", "date", "dateRange"];
|
|
8
9
|
export type FactorType = typeof ALL_FACTOR_TYPES[number] | string;
|
|
9
10
|
export type DefinedFactorTypes = typeof ALL_FACTOR_TYPES[number];
|
|
10
11
|
export type DynamicKeyValueType = {
|
|
11
|
-
key:
|
|
12
|
-
value:
|
|
12
|
+
key: ReactText;
|
|
13
|
+
value: ReactText;
|
|
13
14
|
};
|
|
14
15
|
export type FormulaValueType = {
|
|
15
16
|
name: string;
|
|
16
17
|
value: string;
|
|
17
18
|
};
|
|
18
|
-
export type ParameterValueType = {
|
|
19
|
+
export type ParameterValueType = Pick<ListItemProps, 'renderHoverTooltip' | 'hoverTooltipProps' | 'disabled'> & {
|
|
19
20
|
type: string;
|
|
20
|
-
icon:
|
|
21
|
+
icon: ReactNode;
|
|
21
22
|
name: string;
|
|
22
|
-
id:
|
|
23
|
-
groupId?:
|
|
23
|
+
id: ReactText;
|
|
24
|
+
groupId?: ReactText;
|
|
24
25
|
description?: string;
|
|
25
26
|
informationCardProps?: Partial<InformationCardProps>;
|
|
26
27
|
};
|
|
27
28
|
export type ParameterGroup = {
|
|
28
|
-
id:
|
|
29
|
+
id: ReactText;
|
|
29
30
|
name: string;
|
|
30
31
|
defaultGroup?: boolean;
|
|
31
|
-
icon?:
|
|
32
|
+
icon?: ReactNode;
|
|
32
33
|
subGroups?: ParameterGroup[];
|
|
33
34
|
};
|
|
34
35
|
export type ParameterItem = {
|
|
35
|
-
id:
|
|
36
|
+
id: ReactText;
|
|
36
37
|
name: string;
|
|
37
|
-
groupId:
|
|
38
|
-
icon?:
|
|
38
|
+
groupId: ReactText;
|
|
39
|
+
icon?: ReactNode;
|
|
39
40
|
disabled?: boolean;
|
|
40
41
|
};
|
|
41
42
|
export type FactorValueType = string | number | Date | undefined | DynamicKeyValueType | FormulaValueType | ParameterValueType | Partial<DateFilter>;
|
|
42
43
|
export type SelectedFactorType = {
|
|
43
44
|
name: string;
|
|
44
|
-
icon:
|
|
45
|
-
input:
|
|
45
|
+
icon: ReactNode;
|
|
46
|
+
input: ElementType;
|
|
46
47
|
};
|
|
47
48
|
export type FactorsTexts = {
|
|
48
49
|
dateRangePicker: Partial<DateRangeTexts>;
|
|
@@ -74,9 +75,9 @@ export type FactorsTexts = {
|
|
|
74
75
|
};
|
|
75
76
|
};
|
|
76
77
|
export type FactorsProps = {
|
|
77
|
-
factorKey?:
|
|
78
|
+
factorKey?: ReactText;
|
|
78
79
|
error?: boolean;
|
|
79
|
-
errorText?:
|
|
80
|
+
errorText?: ReactNode;
|
|
80
81
|
withoutTypeSelector?: boolean;
|
|
81
82
|
setSelectedFactorType?: (factor: FactorType) => void;
|
|
82
83
|
unavailableFactorTypes?: FactorType[];
|
|
@@ -94,20 +95,20 @@ export type FactorsProps = {
|
|
|
94
95
|
options: string[];
|
|
95
96
|
};
|
|
96
97
|
parameters?: {
|
|
97
|
-
buttonLabel:
|
|
98
|
-
buttonIcon:
|
|
98
|
+
buttonLabel: ReactNode;
|
|
99
|
+
buttonIcon: ReactNode;
|
|
99
100
|
selectedButtonColored?: boolean;
|
|
100
101
|
groups?: ParameterGroup[];
|
|
101
102
|
items: ParameterItem[];
|
|
102
103
|
showAllGroup?: boolean;
|
|
103
104
|
};
|
|
104
105
|
onParamsClick?: () => void;
|
|
105
|
-
formulaEditor?:
|
|
106
|
+
formulaEditor?: ReactNode;
|
|
106
107
|
texts?: Partial<FactorsTexts>;
|
|
107
108
|
opened?: boolean;
|
|
108
109
|
loading?: boolean;
|
|
109
110
|
preventAutoloadData?: boolean;
|
|
110
|
-
withCustomFactor?:
|
|
111
|
+
withCustomFactor?: ReactNode;
|
|
111
112
|
inputProps?: Partial<InputProps>;
|
|
112
113
|
readOnly?: boolean;
|
|
113
114
|
getMenuEntryProps?: (arg?: ParameterValueType) => MenuItemProps;
|
|
@@ -128,7 +129,7 @@ export type InputProps = Pick<FactorsProps, 'value' | 'parameters' | 'autocomple
|
|
|
128
129
|
onChange: (value: FactorValueType) => void;
|
|
129
130
|
factorType: FactorType;
|
|
130
131
|
onParamsClick?: () => void;
|
|
131
|
-
formulaEditor?:
|
|
132
|
+
formulaEditor?: ReactNode;
|
|
132
133
|
loading?: boolean;
|
|
133
134
|
preventAutoloadData?: boolean;
|
|
134
135
|
};
|
|
@@ -155,5 +156,5 @@ export type FormulaModalProps = {
|
|
|
155
156
|
visible: boolean;
|
|
156
157
|
onCancel: () => void;
|
|
157
158
|
texts: FactorsTexts;
|
|
158
|
-
formulaEditor?:
|
|
159
|
+
formulaEditor?: ReactNode;
|
|
159
160
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default, factorTypes } from './Factors';
|
|
2
2
|
export { ALL_FACTOR_TYPES } from './Factors.types';
|
|
3
|
-
export type { FactorsProps, ParameterValueType, InputProps } from './Factors.types';
|
|
3
|
+
export type { FactorsProps, ParameterValueType, InputProps, FactorValueType } from './Factors.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-factors",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Factors UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -33,25 +33,25 @@
|
|
|
33
33
|
],
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@synerise/ds-autocomplete": "^0.8.
|
|
37
|
-
"@synerise/ds-badge": "^0.8.
|
|
38
|
-
"@synerise/ds-button": "^0.21.
|
|
39
|
-
"@synerise/ds-date-picker": "^0.11.
|
|
40
|
-
"@synerise/ds-date-range-picker": "^0.29.
|
|
41
|
-
"@synerise/ds-dropdown": "^0.18.
|
|
42
|
-
"@synerise/ds-icon": "^0.65.
|
|
43
|
-
"@synerise/ds-information-card": "^0.5.
|
|
44
|
-
"@synerise/ds-inline-edit": "^0.8.
|
|
45
|
-
"@synerise/ds-input": "^0.24.
|
|
46
|
-
"@synerise/ds-input-number": "^0.10.
|
|
47
|
-
"@synerise/ds-list-item": "^0.4.
|
|
48
|
-
"@synerise/ds-menu": "^0.19.
|
|
49
|
-
"@synerise/ds-modal": "^0.17.
|
|
50
|
-
"@synerise/ds-result": "^0.7.
|
|
51
|
-
"@synerise/ds-scrollbar": "^0.11.
|
|
36
|
+
"@synerise/ds-autocomplete": "^0.8.15",
|
|
37
|
+
"@synerise/ds-badge": "^0.8.6",
|
|
38
|
+
"@synerise/ds-button": "^0.21.7",
|
|
39
|
+
"@synerise/ds-date-picker": "^0.11.13",
|
|
40
|
+
"@synerise/ds-date-range-picker": "^0.29.8",
|
|
41
|
+
"@synerise/ds-dropdown": "^0.18.11",
|
|
42
|
+
"@synerise/ds-icon": "^0.65.2",
|
|
43
|
+
"@synerise/ds-information-card": "^0.5.5",
|
|
44
|
+
"@synerise/ds-inline-edit": "^0.8.7",
|
|
45
|
+
"@synerise/ds-input": "^0.24.1",
|
|
46
|
+
"@synerise/ds-input-number": "^0.10.2",
|
|
47
|
+
"@synerise/ds-list-item": "^0.4.7",
|
|
48
|
+
"@synerise/ds-menu": "^0.19.11",
|
|
49
|
+
"@synerise/ds-modal": "^0.17.38",
|
|
50
|
+
"@synerise/ds-result": "^0.7.1",
|
|
51
|
+
"@synerise/ds-scrollbar": "^0.11.7",
|
|
52
52
|
"@synerise/ds-skeleton": "^0.6.5",
|
|
53
|
-
"@synerise/ds-tabs": "^0.15.
|
|
54
|
-
"@synerise/ds-tooltip": "^0.14.
|
|
53
|
+
"@synerise/ds-tabs": "^0.15.4",
|
|
54
|
+
"@synerise/ds-tooltip": "^0.14.37",
|
|
55
55
|
"@synerise/ds-utils": "^0.28.2",
|
|
56
56
|
"lodash": "^4.17.19",
|
|
57
57
|
"react-intl": "3.12.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"react": ">=16.9.0 <= 17.0.2",
|
|
65
65
|
"styled-components": "5.0.1"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "d5df67eecdc1cbcb56def8c17d04b7d883876fbf"
|
|
68
68
|
}
|