iguazio.dashboard-react-controls 1.9.2 → 2.0.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/dist/components/Backdrop/Backdrop.js +7 -7
- package/dist/components/Button/Button.js +20 -26
- package/dist/components/ConfirmDialog/ConfirmDialog.js +18 -17
- package/dist/components/FormCheckBox/FormCheckBox.js +28 -32
- package/dist/components/FormChipCell/FormChip/FormChip.js +46 -50
- package/dist/components/FormChipCell/FormChipCell.js +122 -142
- package/dist/components/FormChipCell/FormChipCellView.js +44 -47
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.js +23 -20
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.js +129 -152
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.js +24 -27
- package/dist/components/FormChipCell/formChipCell.util.js +6 -16
- package/dist/components/FormCombobox/FormCombobox.js +134 -195
- package/dist/components/FormInput/FormInput.js +134 -212
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.js +15 -14
- package/dist/components/FormKeyValueTable/FormKeyValueTable.js +72 -72
- package/dist/components/FormRadio/FormRadio.js +21 -25
- package/dist/components/FormSelect/FormSelect.js +98 -126
- package/dist/components/FormSelect/FormSelect.test.js +56 -60
- package/dist/components/FormTextarea/FormTextarea.js +55 -71
- package/dist/components/FormToggle/FormToggle.js +25 -29
- package/dist/components/Modal/Modal.js +17 -18
- package/dist/components/PopUpDialog/PopUpDialog.js +53 -63
- package/dist/components/RoundedIcon/RoundedIcon.js +14 -13
- package/dist/components/Tip/Tip.js +58 -64
- package/dist/components/Tip/Tip.test.js +41 -64
- package/dist/components/Tooltip/Tooltip.js +75 -89
- package/dist/components/TooltipTemplate/ProducerTooltipTemplate.js +6 -5
- package/dist/components/TooltipTemplate/TextTooltipTemplate.js +10 -10
- package/dist/components/Wizard/Wizard.js +73 -107
- package/dist/components/Wizard/WizardSteps/WizardSteps.js +19 -20
- package/dist/components/index.js +18 -18
- package/dist/constants.js +26 -44
- package/dist/elements/FormActionButton/FormActionButton.js +12 -13
- package/dist/elements/FormRowActions/FormRowActions.js +19 -22
- package/dist/elements/OptionsMenu/OptionsMenu.js +10 -8
- package/dist/elements/SelectOption/SelectOption.js +14 -13
- package/dist/elements/SelectOption/SelectOption.test.js +39 -47
- package/dist/elements/ValidationTemplate/ValidationTemplate.js +7 -6
- package/dist/elements/index.js +5 -5
- package/dist/hooks/index.js +5 -5
- package/dist/hooks/useChipCell.hook.js +66 -85
- package/dist/hooks/useDebounce.hook.js +22 -24
- package/dist/hooks/useDetectOutsideClick.hook.js +4 -4
- package/dist/hooks/useFormTable.hook.js +99 -112
- package/dist/hooks/useHiddenChipsBlock.hook.js +40 -55
- package/dist/index.js +2 -3
- package/dist/scss/borders.scss +6 -0
- package/dist/scss/mixins.scss +32 -0
- package/dist/types.js +43 -67
- package/dist/utils/common.util.js +19 -23
- package/dist/utils/form.util.js +33 -39
- package/dist/utils/generateChipsList.util.js +7 -7
- package/dist/utils/getFirstScrollableParent.util.js +4 -10
- package/dist/utils/math.util.js +3 -3
- package/dist/utils/validation.util.js +74 -131
- package/package.json +34 -34
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -11,8 +10,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
10
|
require("./textTooltipTemplate.scss");
|
|
12
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _getRequireWildcardCache(
|
|
15
|
-
function _interopRequireWildcard(
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
15
|
/*
|
|
17
16
|
Copyright 2022 Iguazio Systems Ltd.
|
|
18
17
|
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
@@ -30,11 +29,13 @@ under the Apache 2.0 license is conditioned upon your compliance with
|
|
|
30
29
|
such restriction.
|
|
31
30
|
*/
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
const TextTooltipTemplate = _ref => {
|
|
33
|
+
let {
|
|
34
|
+
text,
|
|
35
|
+
warning
|
|
36
|
+
} = _ref;
|
|
37
|
+
const textRef = (0, _react.useRef)();
|
|
38
|
+
const tooltipClassNames = (0, _classnames.default)('tooltip-template', 'tooltip__text', warning && 'tooltip__warning');
|
|
38
39
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
39
40
|
className: tooltipClassNames,
|
|
40
41
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -49,5 +50,4 @@ TextTooltipTemplate.propTypes = {
|
|
|
49
50
|
TextTooltipTemplate.propTypes = {
|
|
50
51
|
text: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.element, _propTypes.default.number])
|
|
51
52
|
};
|
|
52
|
-
var _default = TextTooltipTemplate;
|
|
53
|
-
exports.default = _default;
|
|
53
|
+
var _default = exports.default = TextTooltipTemplate;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -17,70 +16,48 @@ var _types = require("../../types");
|
|
|
17
16
|
require("./Wizard.scss");
|
|
18
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
function _getRequireWildcardCache(
|
|
21
|
-
function _interopRequireWildcard(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
previewText = _ref.previewText,
|
|
60
|
-
size = _ref.size,
|
|
61
|
-
stepsConfig = _ref.stepsConfig,
|
|
62
|
-
subTitle = _ref.subTitle,
|
|
63
|
-
title = _ref.title;
|
|
64
|
-
var wizardClasses = (0, _classnames.default)('wizard-form', className);
|
|
65
|
-
var _useState = (0, _react.useState)(false),
|
|
66
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
67
|
-
jumpingToFirstInvalid = _useState2[0],
|
|
68
|
-
setJumpingToFirstInvalid = _useState2[1];
|
|
69
|
-
var _useState3 = (0, _react.useState)(0),
|
|
70
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
71
|
-
activeStepNumber = _useState4[0],
|
|
72
|
-
setActiveStepNumber = _useState4[1];
|
|
73
|
-
var _useState5 = (0, _react.useState)(null),
|
|
74
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
75
|
-
firstDisabledStepIdx = _useState6[0],
|
|
76
|
-
setFirstDisabledStepIdx = _useState6[1];
|
|
77
|
-
var visibleSteps = (0, _react.useMemo)(function () {
|
|
78
|
-
return (stepsConfig === null || stepsConfig === void 0 ? void 0 : stepsConfig.filter(function (step) {
|
|
79
|
-
return !step.hidden;
|
|
80
|
-
})) || [];
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
+
/*
|
|
22
|
+
Copyright 2022 Iguazio Systems Ltd.
|
|
23
|
+
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
24
|
+
an addition restriction as set forth herein. You may not use this
|
|
25
|
+
file except in compliance with the License. You may obtain a copy of
|
|
26
|
+
the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
27
|
+
Unless required by applicable law or agreed to in writing, software
|
|
28
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
29
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
30
|
+
implied. See the License for the specific language governing
|
|
31
|
+
permissions and limitations under the License.
|
|
32
|
+
In addition, you may not use the software for any purposes that are
|
|
33
|
+
illegal under applicable law, and the grant of the foregoing license
|
|
34
|
+
under the Apache 2.0 license is conditioned upon your compliance with
|
|
35
|
+
such restriction.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
const Wizard = _ref => {
|
|
39
|
+
let {
|
|
40
|
+
children,
|
|
41
|
+
className,
|
|
42
|
+
getActions,
|
|
43
|
+
isWizardOpen,
|
|
44
|
+
location,
|
|
45
|
+
onWizardResolve,
|
|
46
|
+
previewText,
|
|
47
|
+
size,
|
|
48
|
+
stepsConfig,
|
|
49
|
+
subTitle,
|
|
50
|
+
title
|
|
51
|
+
} = _ref;
|
|
52
|
+
const wizardClasses = (0, _classnames.default)('wizard-form', className);
|
|
53
|
+
const [jumpingToFirstInvalid, setJumpingToFirstInvalid] = (0, _react.useState)(false);
|
|
54
|
+
const [activeStepNumber, setActiveStepNumber] = (0, _react.useState)(0);
|
|
55
|
+
const [firstDisabledStepIdx, setFirstDisabledStepIdx] = (0, _react.useState)(null);
|
|
56
|
+
const visibleSteps = (0, _react.useMemo)(() => {
|
|
57
|
+
return (stepsConfig === null || stepsConfig === void 0 ? void 0 : stepsConfig.filter(step => !step.hidden)) || [];
|
|
81
58
|
}, [stepsConfig]);
|
|
82
|
-
(0, _react.useLayoutEffect)(
|
|
83
|
-
|
|
59
|
+
(0, _react.useLayoutEffect)(() => {
|
|
60
|
+
const disabledStep = visibleSteps.find((step, stepIdx) => {
|
|
84
61
|
if (step.disabled) {
|
|
85
62
|
setFirstDisabledStepIdx(stepIdx);
|
|
86
63
|
}
|
|
@@ -90,22 +67,18 @@ var Wizard = function Wizard(_ref) {
|
|
|
90
67
|
setFirstDisabledStepIdx(null);
|
|
91
68
|
}
|
|
92
69
|
}, [visibleSteps]);
|
|
93
|
-
(0, _react.useEffect)(
|
|
94
|
-
|
|
95
|
-
return step.invalid;
|
|
96
|
-
});
|
|
70
|
+
(0, _react.useEffect)(() => {
|
|
71
|
+
const firstInvalidStepIdx = visibleSteps.findIndex(step => step.invalid);
|
|
97
72
|
if (jumpingToFirstInvalid && (0, _lodash.isNumber)(firstInvalidStepIdx) && firstInvalidStepIdx !== -1) {
|
|
98
73
|
setActiveStepNumber(firstInvalidStepIdx);
|
|
99
74
|
setJumpingToFirstInvalid(false);
|
|
100
75
|
}
|
|
101
76
|
}, [jumpingToFirstInvalid, visibleSteps]);
|
|
102
|
-
|
|
103
|
-
return _react.default.Children.toArray(children).filter(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
var newChild = !(0, _lodash.isNumber)(firstDisabledStepIdx) || idx < firstDisabledStepIdx ? /*#__PURE__*/_react.default.cloneElement(child, {
|
|
108
|
-
stepIsActive: stepIsActive
|
|
77
|
+
const stepsTemplate = (0, _react.useMemo)(() => {
|
|
78
|
+
return _react.default.Children.toArray(children).filter((child, idx) => !(0, _lodash.isEmpty)(stepsConfig) && !stepsConfig[idx].hidden).map((child, idx) => {
|
|
79
|
+
const stepIsActive = idx === activeStepNumber;
|
|
80
|
+
const newChild = !(0, _lodash.isNumber)(firstDisabledStepIdx) || idx < firstDisabledStepIdx ? /*#__PURE__*/_react.default.cloneElement(child, {
|
|
81
|
+
stepIsActive
|
|
109
82
|
}) : null;
|
|
110
83
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
111
84
|
className: !stepIsActive ? 'wizard-form__hidden-content-item' : 'wizard-form__visible-content-item',
|
|
@@ -113,30 +86,24 @@ var Wizard = function Wizard(_ref) {
|
|
|
113
86
|
}, idx);
|
|
114
87
|
});
|
|
115
88
|
}, [activeStepNumber, children, firstDisabledStepIdx, stepsConfig]);
|
|
116
|
-
|
|
89
|
+
const totalSteps = (0, _react.useMemo)(() => {
|
|
117
90
|
return visibleSteps.length - 1 || 0;
|
|
118
91
|
}, [visibleSteps]);
|
|
119
|
-
|
|
92
|
+
const isLastStep = (0, _react.useMemo)(() => {
|
|
120
93
|
return activeStepNumber === totalSteps;
|
|
121
94
|
}, [activeStepNumber, totalSteps]);
|
|
122
|
-
|
|
123
|
-
setActiveStepNumber(
|
|
124
|
-
return Math.min(++prevStep, totalSteps);
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
var goToPreviousStep = function goToPreviousStep() {
|
|
128
|
-
return setActiveStepNumber(function (prevStep) {
|
|
129
|
-
return Math.max(--prevStep, 0);
|
|
130
|
-
});
|
|
95
|
+
const goToNextStep = () => {
|
|
96
|
+
setActiveStepNumber(prevStep => Math.min(++prevStep, totalSteps));
|
|
131
97
|
};
|
|
132
|
-
|
|
98
|
+
const goToPreviousStep = () => setActiveStepNumber(prevStep => Math.max(--prevStep, 0));
|
|
99
|
+
const goToFirstInvalidStep = () => {
|
|
133
100
|
setJumpingToFirstInvalid(true);
|
|
134
101
|
};
|
|
135
|
-
|
|
102
|
+
const jumpToStep = idx => {
|
|
136
103
|
return setActiveStepNumber(idx);
|
|
137
104
|
};
|
|
138
|
-
|
|
139
|
-
|
|
105
|
+
const getDefaultActions = stepConfig => {
|
|
106
|
+
const defaultActions = [];
|
|
140
107
|
if (activeStepNumber !== 0) {
|
|
141
108
|
defaultActions.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
142
109
|
id: "wizard-btn-back",
|
|
@@ -156,22 +123,20 @@ var Wizard = function Wizard(_ref) {
|
|
|
156
123
|
}));
|
|
157
124
|
return defaultActions;
|
|
158
125
|
};
|
|
159
|
-
|
|
126
|
+
const renderModalActions = () => {
|
|
160
127
|
if ((0, _lodash.isEmpty)(visibleSteps)) return [];
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
return !step.disabled;
|
|
164
|
-
});
|
|
128
|
+
const actionsList = getDefaultActions(visibleSteps[activeStepNumber]);
|
|
129
|
+
const allStepsAreEnabled = visibleSteps.every(step => !step.disabled);
|
|
165
130
|
if (getActions) {
|
|
166
|
-
|
|
167
|
-
allStepsAreEnabled
|
|
168
|
-
jumpToStep
|
|
169
|
-
goToFirstInvalidStep
|
|
131
|
+
const actions = getActions({
|
|
132
|
+
allStepsAreEnabled,
|
|
133
|
+
jumpToStep,
|
|
134
|
+
goToFirstInvalidStep
|
|
170
135
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
});
|
|
174
|
-
actionsList.push
|
|
136
|
+
const mainActions = actions.map(action => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
137
|
+
...action
|
|
138
|
+
}));
|
|
139
|
+
actionsList.push(...mainActions);
|
|
175
140
|
}
|
|
176
141
|
return actionsList;
|
|
177
142
|
};
|
|
@@ -221,9 +186,10 @@ Wizard.propsTypes = {
|
|
|
221
186
|
subTitle: _propTypes.default.string,
|
|
222
187
|
title: _propTypes.default.string.isRequired
|
|
223
188
|
};
|
|
224
|
-
Wizard.Step =
|
|
225
|
-
|
|
189
|
+
Wizard.Step = _ref2 => {
|
|
190
|
+
let {
|
|
191
|
+
children
|
|
192
|
+
} = _ref2;
|
|
226
193
|
return children;
|
|
227
194
|
};
|
|
228
|
-
var _default = Wizard;
|
|
229
|
-
exports.default = _default;
|
|
195
|
+
var _default = exports.default = Wizard;
|
|
@@ -30,26 +30,28 @@ under the Apache 2.0 license is conditioned upon your compliance with
|
|
|
30
30
|
such restriction.
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
const WizardSteps = _ref => {
|
|
34
|
+
let {
|
|
35
|
+
activeStepNumber,
|
|
36
|
+
firstDisabledStepIdx,
|
|
37
|
+
jumpToStep,
|
|
38
|
+
steps
|
|
39
|
+
} = _ref;
|
|
40
|
+
const getStepClassNames = (idx, invalid) => (0, _classnames.default)('wizard-steps__item', idx === activeStepNumber && 'wizard-steps__item_active', invalid && 'wizard-steps__item_invalid');
|
|
41
|
+
const handleJumpToStep = (event, idx) => {
|
|
42
42
|
event.preventDefault();
|
|
43
43
|
jumpToStep(idx);
|
|
44
44
|
};
|
|
45
45
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
46
46
|
className: "wizard-steps",
|
|
47
|
-
children: steps.map(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
children: steps.map((_ref2, idx) => {
|
|
48
|
+
let {
|
|
49
|
+
id,
|
|
50
|
+
label,
|
|
51
|
+
disabled,
|
|
52
|
+
invalid
|
|
53
|
+
} = _ref2;
|
|
54
|
+
const stepIsDisabled = (0, _lodash.isNumber)(firstDisabledStepIdx) && idx >= firstDisabledStepIdx;
|
|
53
55
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
54
56
|
className: getStepClassNames(idx, invalid),
|
|
55
57
|
disabled: stepIsDisabled,
|
|
@@ -58,9 +60,7 @@ var WizardSteps = function WizardSteps(_ref) {
|
|
|
58
60
|
children: idx + 1
|
|
59
61
|
}),
|
|
60
62
|
label: label,
|
|
61
|
-
onClick:
|
|
62
|
-
return handleJumpToStep(e, idx);
|
|
63
|
-
}
|
|
63
|
+
onClick: e => handleJumpToStep(e, idx)
|
|
64
64
|
}, id);
|
|
65
65
|
})
|
|
66
66
|
});
|
|
@@ -74,5 +74,4 @@ WizardSteps.propTypes = {
|
|
|
74
74
|
jumpToStep: _propTypes.default.func.isRequired,
|
|
75
75
|
steps: _types.WIZARD_STEPS_CONFIG
|
|
76
76
|
};
|
|
77
|
-
var _default = WizardSteps;
|
|
78
|
-
exports.default = _default;
|
|
77
|
+
var _default = exports.default = WizardSteps;
|
package/dist/components/index.js
CHANGED
|
@@ -5,109 +5,109 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "Button", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _Button.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "ConfirmDialog", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _ConfirmDialog.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "FormCheckBox", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _FormCheckBox.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "FormChipCell", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _FormChipCell.default;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "FormCombobox", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function
|
|
32
|
+
get: function () {
|
|
33
33
|
return _FormCombobox.default;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "FormInput", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function
|
|
38
|
+
get: function () {
|
|
39
39
|
return _FormInput.default;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "FormKeyValueTable", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function
|
|
44
|
+
get: function () {
|
|
45
45
|
return _FormKeyValueTable.default;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "FormRadio", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function
|
|
50
|
+
get: function () {
|
|
51
51
|
return _FormRadio.default;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "FormSelect", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function
|
|
56
|
+
get: function () {
|
|
57
57
|
return _FormSelect.default;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "FormTextarea", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function
|
|
62
|
+
get: function () {
|
|
63
63
|
return _FormTextarea.default;
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "FormToggle", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function
|
|
68
|
+
get: function () {
|
|
69
69
|
return _FormToggle.default;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "Modal", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function
|
|
74
|
+
get: function () {
|
|
75
75
|
return _Modal.default;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "PopUpDialog", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function
|
|
80
|
+
get: function () {
|
|
81
81
|
return _PopUpDialog.default;
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "RoundedIcon", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function
|
|
86
|
+
get: function () {
|
|
87
87
|
return _RoundedIcon.default;
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "TextTooltipTemplate", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function
|
|
92
|
+
get: function () {
|
|
93
93
|
return _TextTooltipTemplate.default;
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "Tip", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function
|
|
98
|
+
get: function () {
|
|
99
99
|
return _Tip.default;
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "Tooltip", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function
|
|
104
|
+
get: function () {
|
|
105
105
|
return _Tooltip.default;
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "Wizard", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function
|
|
110
|
+
get: function () {
|
|
111
111
|
return _Wizard.default;
|
|
112
112
|
}
|
|
113
113
|
});
|
package/dist/constants.js
CHANGED
|
@@ -21,31 +21,23 @@ under the Apache 2.0 license is conditioned upon your compliance with
|
|
|
21
21
|
such restriction.
|
|
22
22
|
*/
|
|
23
23
|
/*=========== EVENT KEYS =============*/
|
|
24
|
-
|
|
25
|
-
exports.
|
|
26
|
-
|
|
27
|
-
exports.
|
|
28
|
-
|
|
29
|
-
exports.DELETE = DELETE;
|
|
30
|
-
var TAB = 'Tab';
|
|
31
|
-
exports.TAB = TAB;
|
|
32
|
-
var TAB_SHIFT = 'Tab+Shift';
|
|
24
|
+
const BACKSPACE = exports.BACKSPACE = 'Backspace';
|
|
25
|
+
const CLICK = exports.CLICK = 'Click';
|
|
26
|
+
const DELETE = exports.DELETE = 'Delete';
|
|
27
|
+
const TAB = exports.TAB = 'Tab';
|
|
28
|
+
const TAB_SHIFT = exports.TAB_SHIFT = 'Tab+Shift';
|
|
33
29
|
|
|
34
30
|
/*=========== BUTTONS =============*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
exports.
|
|
38
|
-
|
|
39
|
-
exports.
|
|
40
|
-
|
|
41
|
-
exports.TERTIARY_BUTTON = TERTIARY_BUTTON;
|
|
42
|
-
var DANGER_BUTTON = 'danger';
|
|
43
|
-
exports.DANGER_BUTTON = DANGER_BUTTON;
|
|
44
|
-
var LABEL_BUTTON = 'label';
|
|
31
|
+
|
|
32
|
+
const PRIMARY_BUTTON = exports.PRIMARY_BUTTON = 'primary';
|
|
33
|
+
const SECONDARY_BUTTON = exports.SECONDARY_BUTTON = 'secondary';
|
|
34
|
+
const TERTIARY_BUTTON = exports.TERTIARY_BUTTON = 'tertiary';
|
|
35
|
+
const DANGER_BUTTON = exports.DANGER_BUTTON = 'danger';
|
|
36
|
+
const LABEL_BUTTON = exports.LABEL_BUTTON = 'label';
|
|
45
37
|
|
|
46
38
|
/*=========== VALITATION =============*/
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
|
|
40
|
+
const validation = exports.validation = {
|
|
49
41
|
BEGIN_END_NOT_WITH: {
|
|
50
42
|
LABEL: 'Must not begin and end with',
|
|
51
43
|
NAME: 'beginEndNot'
|
|
@@ -105,28 +97,18 @@ var validation = {
|
|
|
105
97
|
};
|
|
106
98
|
|
|
107
99
|
/*=========== STATUS CODES =============*/
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
exports.
|
|
111
|
-
|
|
112
|
-
exports.
|
|
113
|
-
|
|
114
|
-
exports.
|
|
115
|
-
var CONFLICT_ERROR_STATUS_CODE = 409;
|
|
116
|
-
exports.CONFLICT_ERROR_STATUS_CODE = CONFLICT_ERROR_STATUS_CODE;
|
|
117
|
-
var INTERNAL_SERVER_ERROR_STATUS_CODE = 500;
|
|
118
|
-
exports.INTERNAL_SERVER_ERROR_STATUS_CODE = INTERNAL_SERVER_ERROR_STATUS_CODE;
|
|
119
|
-
var GATEWAY_TIMEOUT_STATUS_CODE = 504;
|
|
100
|
+
|
|
101
|
+
const BADREQUEST_ERROR_STATUS_CODE = exports.BADREQUEST_ERROR_STATUS_CODE = 400;
|
|
102
|
+
const FORBIDDEN_ERROR_STATUS_CODE = exports.FORBIDDEN_ERROR_STATUS_CODE = 403;
|
|
103
|
+
const NOTFOUND_ERROR_STATUS_CODE = exports.NOTFOUND_ERROR_STATUS_CODE = 404;
|
|
104
|
+
const CONFLICT_ERROR_STATUS_CODE = exports.CONFLICT_ERROR_STATUS_CODE = 409;
|
|
105
|
+
const INTERNAL_SERVER_ERROR_STATUS_CODE = exports.INTERNAL_SERVER_ERROR_STATUS_CODE = 500;
|
|
106
|
+
const GATEWAY_TIMEOUT_STATUS_CODE = exports.GATEWAY_TIMEOUT_STATUS_CODE = 504;
|
|
120
107
|
|
|
121
108
|
/*=========== MODAL =============*/
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
exports.
|
|
125
|
-
|
|
126
|
-
exports.
|
|
127
|
-
|
|
128
|
-
exports.MODAL_LG = MODAL_LG;
|
|
129
|
-
var MODAL_MIN = 'min';
|
|
130
|
-
exports.MODAL_MIN = MODAL_MIN;
|
|
131
|
-
var MODAL_MAX = 'max';
|
|
132
|
-
exports.MODAL_MAX = MODAL_MAX;
|
|
109
|
+
|
|
110
|
+
const MODAL_SM = exports.MODAL_SM = 'sm';
|
|
111
|
+
const MODAL_MD = exports.MODAL_MD = 'md';
|
|
112
|
+
const MODAL_LG = exports.MODAL_LG = 'lg';
|
|
113
|
+
const MODAL_MIN = exports.MODAL_MIN = 'min';
|
|
114
|
+
const MODAL_MAX = exports.MODAL_MAX = 'max';
|
|
@@ -29,22 +29,22 @@ under the Apache 2.0 license is conditioned upon your compliance with
|
|
|
29
29
|
such restriction.
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
const FormActionButton = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
33
|
+
let {
|
|
34
|
+
disabled,
|
|
35
|
+
fields,
|
|
36
|
+
fieldsPath,
|
|
37
|
+
hidden,
|
|
38
|
+
id,
|
|
39
|
+
label,
|
|
40
|
+
onClick
|
|
41
|
+
} = _ref;
|
|
40
42
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
41
43
|
children: [!hidden && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
42
44
|
className: "form-table__row form-table__action-row no-hover",
|
|
43
45
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
44
46
|
"data-testid": id ? id : "".concat(fieldsPath, "-add-btn"),
|
|
45
|
-
onClick:
|
|
46
|
-
return _onClick(event, fields, fieldsPath);
|
|
47
|
-
},
|
|
47
|
+
onClick: event => onClick(event, fields, fieldsPath),
|
|
48
48
|
disabled: disabled,
|
|
49
49
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_plus.ReactComponent, {}), label]
|
|
50
50
|
})
|
|
@@ -66,5 +66,4 @@ FormActionButton.propTypes = {
|
|
|
66
66
|
label: _propTypes.default.string,
|
|
67
67
|
onClick: _propTypes.default.func.isRequired
|
|
68
68
|
};
|
|
69
|
-
var _default = FormActionButton;
|
|
70
|
-
exports.default = _default;
|
|
69
|
+
var _default = exports.default = FormActionButton;
|