@reltio/components 1.4.2197 → 1.4.2199
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/ModeSwitcherSelect/ModeSwitcherSelect.d.ts +1 -0
- package/ModeSwitcherSelect/ModeSwitcherSelect.js +3 -3
- package/cjs/ModeSwitcherSelect/ModeSwitcherSelect.d.ts +1 -0
- package/cjs/ModeSwitcherSelect/ModeSwitcherSelect.js +3 -3
- package/cjs/hooks/useCssVariableStyles/useCssVariableStyles.js +1 -1
- package/hooks/useCssVariableStyles/useCssVariableStyles.js +1 -1
- package/package.json +2 -2
|
@@ -75,11 +75,11 @@ export var ModeSwitcherSelect = function (_a) {
|
|
|
75
75
|
icon: classnames(styles.arrowIcon, styles[variant]),
|
|
76
76
|
outlined: styles.outlined
|
|
77
77
|
}, value: value, onChange: handleChange, variant: "outlined", renderValue: function (value) {
|
|
78
|
-
var _a = optionsGroup.find(propEq('value', value)) || {}, IconComponent = _a.icon, _b = _a.label, label = _b === void 0 ? value : _b;
|
|
78
|
+
var _a = optionsGroup.find(propEq('value', value)) || {}, IconComponent = _a.icon, _b = _a.label, label = _b === void 0 ? value : _b, shortLabel = _a.shortLabel;
|
|
79
79
|
return (React.createElement(Box, { className: styles.currentValue },
|
|
80
80
|
loading ? (React.createElement(CircularProgress, { size: "1em", "data-reltio-id": "mode-loading-spinner", className: styles.currentValueIcon })) : (IconComponent && React.createElement(IconComponent, { className: styles.currentValueIcon })),
|
|
81
|
-
React.createElement(Tooltip, { title: label },
|
|
82
|
-
React.createElement(Typography, { className: styles.currentValueText }, label))));
|
|
81
|
+
React.createElement(Tooltip, { title: shortLabel !== null && shortLabel !== void 0 ? shortLabel : label },
|
|
82
|
+
React.createElement(Typography, { className: styles.currentValueText }, shortLabel !== null && shortLabel !== void 0 ? shortLabel : label))));
|
|
83
83
|
}, MenuProps: {
|
|
84
84
|
anchorOrigin: {
|
|
85
85
|
vertical: 'bottom',
|
|
@@ -81,11 +81,11 @@ var ModeSwitcherSelect = function (_a) {
|
|
|
81
81
|
icon: (0, classnames_1.default)(ModeSwitcherSelect_module_css_1.default.arrowIcon, ModeSwitcherSelect_module_css_1.default[variant]),
|
|
82
82
|
outlined: ModeSwitcherSelect_module_css_1.default.outlined
|
|
83
83
|
}, value: value, onChange: handleChange, variant: "outlined", renderValue: function (value) {
|
|
84
|
-
var _a = optionsGroup.find((0, ramda_1.propEq)('value', value)) || {}, IconComponent = _a.icon, _b = _a.label, label = _b === void 0 ? value : _b;
|
|
84
|
+
var _a = optionsGroup.find((0, ramda_1.propEq)('value', value)) || {}, IconComponent = _a.icon, _b = _a.label, label = _b === void 0 ? value : _b, shortLabel = _a.shortLabel;
|
|
85
85
|
return (react_1.default.createElement(Box_1.default, { className: ModeSwitcherSelect_module_css_1.default.currentValue },
|
|
86
86
|
loading ? (react_1.default.createElement(CircularProgress_1.default, { size: "1em", "data-reltio-id": "mode-loading-spinner", className: ModeSwitcherSelect_module_css_1.default.currentValueIcon })) : (IconComponent && react_1.default.createElement(IconComponent, { className: ModeSwitcherSelect_module_css_1.default.currentValueIcon })),
|
|
87
|
-
react_1.default.createElement(Tooltip_1.default, { title: label },
|
|
88
|
-
react_1.default.createElement(Typography_1.default, { className: ModeSwitcherSelect_module_css_1.default.currentValueText }, label))));
|
|
87
|
+
react_1.default.createElement(Tooltip_1.default, { title: shortLabel !== null && shortLabel !== void 0 ? shortLabel : label },
|
|
88
|
+
react_1.default.createElement(Typography_1.default, { className: ModeSwitcherSelect_module_css_1.default.currentValueText }, shortLabel !== null && shortLabel !== void 0 ? shortLabel : label))));
|
|
89
89
|
}, MenuProps: {
|
|
90
90
|
anchorOrigin: {
|
|
91
91
|
vertical: 'bottom',
|
|
@@ -23,6 +23,6 @@ var useCssVariableStyles = function (variables, additionalStyles) {
|
|
|
23
23
|
return [key, verifiedValue];
|
|
24
24
|
}));
|
|
25
25
|
}, [variables]);
|
|
26
|
-
return __assign(__assign({}, style), additionalStyles);
|
|
26
|
+
return (0, react_1.useMemo)(function () { return (__assign(__assign({}, style), additionalStyles)); }, [style, additionalStyles]);
|
|
27
27
|
};
|
|
28
28
|
exports.useCssVariableStyles = useCssVariableStyles;
|
|
@@ -20,5 +20,5 @@ export var useCssVariableStyles = function (variables, additionalStyles) {
|
|
|
20
20
|
return [key, verifiedValue];
|
|
21
21
|
}));
|
|
22
22
|
}, [variables]);
|
|
23
|
-
return __assign(__assign({}, style), additionalStyles);
|
|
23
|
+
return useMemo(function () { return (__assign(__assign({}, style), additionalStyles)); }, [style, additionalStyles]);
|
|
24
24
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2199",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
12
12
|
"@googlemaps/markerclusterer": "^2.5.3",
|
|
13
13
|
"@react-sigma/core": "3.4.0",
|
|
14
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
14
|
+
"@reltio/mdm-sdk": "^1.4.2002",
|
|
15
15
|
"@vis.gl/react-google-maps": "^1.3.0",
|
|
16
16
|
"d3-cloud": "^1.2.5",
|
|
17
17
|
"d3-geo": "^2.0.1",
|