iguazio.dashboard-react-controls 2.2.17 → 2.2.19
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/dist/components/Button/Button.js +5 -4
- package/dist/components/FormChipCell/FormChipCell.js +0 -3
- package/dist/components/Wizard/Wizard.js +9 -3
- package/dist/components/Wizard/Wizard.scss +13 -0
- package/dist/hooks/useChipCell.hook.js +1 -1
- package/dist/utils/validation.util.js +9 -1
- package/package.json +1 -1
|
@@ -38,6 +38,7 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
38
38
|
className = '',
|
|
39
39
|
density = 'normal',
|
|
40
40
|
icon,
|
|
41
|
+
iconPosition = 'left',
|
|
41
42
|
id = 'btn',
|
|
42
43
|
label = 'Button',
|
|
43
44
|
tooltip = '',
|
|
@@ -50,16 +51,16 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
50
51
|
className: buttonClassName,
|
|
51
52
|
ref: ref,
|
|
52
53
|
"data-testid": id,
|
|
53
|
-
children: [icon, tooltip ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
54
|
+
children: [icon && iconPosition === 'left' && icon, tooltip ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
54
55
|
template: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextTooltipTemplate.default, {
|
|
55
56
|
text: tooltip
|
|
56
57
|
}),
|
|
57
|
-
children: label && /*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
58
|
+
children: label && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
58
59
|
children: label
|
|
59
60
|
})
|
|
60
|
-
}) : label && /*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
61
|
+
}) : label && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
61
62
|
children: label
|
|
62
|
-
})]
|
|
63
|
+
}), icon && iconPosition === 'right' && icon]
|
|
63
64
|
});
|
|
64
65
|
});
|
|
65
66
|
Button.propTypes = {
|
|
@@ -82,9 +82,6 @@ const FormChipCell = _ref => {
|
|
|
82
82
|
isValueFocused: false,
|
|
83
83
|
isNewChip: false
|
|
84
84
|
});
|
|
85
|
-
(0, _react.useEffect)(() => {
|
|
86
|
-
formState.form.change('labelsAreInEditMode', editConfig.isEdit);
|
|
87
|
-
}, [editConfig.isEdit, formState.form]);
|
|
88
85
|
let chips = (0, _react.useMemo)(() => {
|
|
89
86
|
return isEditable || visibleChipsMaxLength === 'all' ? {
|
|
90
87
|
visibleChips: (0, _lodash.get)(formState.values, name),
|
|
@@ -13,6 +13,7 @@ var _Modal = _interopRequireDefault(require("../Modal/Modal"));
|
|
|
13
13
|
var _WizardSteps = _interopRequireDefault(require("./WizardSteps/WizardSteps"));
|
|
14
14
|
var _constants = require("../../constants");
|
|
15
15
|
var _types = require("../../types");
|
|
16
|
+
var _backArrow = require("../../images/back-arrow.svg");
|
|
16
17
|
require("./Wizard.scss");
|
|
17
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -107,20 +108,25 @@ const Wizard = _ref => {
|
|
|
107
108
|
if (activeStepNumber !== 0) {
|
|
108
109
|
defaultActions.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
109
110
|
id: "wizard-btn-back",
|
|
111
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_backArrow.ReactComponent, {}),
|
|
112
|
+
className: "wizard-form__back-button",
|
|
110
113
|
onClick: goToPreviousStep,
|
|
111
114
|
disabled: activeStepNumber === 0,
|
|
112
115
|
label: "Back",
|
|
113
116
|
type: "button",
|
|
114
|
-
variant: _constants.
|
|
117
|
+
variant: _constants.TERTIARY_BUTTON
|
|
115
118
|
}));
|
|
116
119
|
}
|
|
117
120
|
defaultActions.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
118
121
|
id: "wizard-btn-next",
|
|
122
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_backArrow.ReactComponent, {}),
|
|
123
|
+
iconPosition: "right",
|
|
124
|
+
className: "wizard-form__next-button",
|
|
119
125
|
disabled: (stepConfig === null || stepConfig === void 0 ? void 0 : stepConfig.nextIsDisabled) || isLastStep,
|
|
120
126
|
onClick: goToNextStep,
|
|
121
|
-
label:
|
|
127
|
+
label: "Next",
|
|
122
128
|
type: "button",
|
|
123
|
-
variant: _constants.
|
|
129
|
+
variant: _constants.TERTIARY_BUTTON
|
|
124
130
|
}));
|
|
125
131
|
return defaultActions;
|
|
126
132
|
};
|
|
@@ -103,7 +103,7 @@ const useChipCell = (isEditMode, visibleChipsMaxLength) => {
|
|
|
103
103
|
setShowChips(true);
|
|
104
104
|
}
|
|
105
105
|
}, [chipsSizes, isEditMode]);
|
|
106
|
-
(0, _react.
|
|
106
|
+
(0, _react.useLayoutEffect)(() => {
|
|
107
107
|
resizeChipCell();
|
|
108
108
|
}, [resizeChipCell]);
|
|
109
109
|
(0, _react.useEffect)(() => {
|
|
@@ -294,7 +294,15 @@ const validationRules = {
|
|
|
294
294
|
artifact: {
|
|
295
295
|
name: [generateRule.validCharacters('a-z A-Z 0-9 - _ .'), generateRule.beginEndWith('a-z A-Z 0-9'), generateRule.length({
|
|
296
296
|
max: 253
|
|
297
|
-
}), generateRule.required()]
|
|
297
|
+
}), generateRule.required()],
|
|
298
|
+
labels: {
|
|
299
|
+
key: [generateRule.notContainCharacters(':'), generateRule.beginEndWith('a-z A-Z 0-9'), generateRule.length({
|
|
300
|
+
max: 255
|
|
301
|
+
})],
|
|
302
|
+
value: [generateRule.beginEndWith('a-z A-Z 0-9'), generateRule.length({
|
|
303
|
+
max: 255
|
|
304
|
+
})]
|
|
305
|
+
}
|
|
298
306
|
},
|
|
299
307
|
feature: {
|
|
300
308
|
sets: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iguazio.dashboard-react-controls",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.19",
|
|
4
4
|
"description": "Collection of resources (such as CSS styles, fonts and images) and ReactJS 17.x components to share among different Iguazio React repos.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|