iguazio.dashboard-react-controls 0.0.39 → 1.2.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 +4 -11
- package/dist/components/Button/Button.js +25 -28
- package/dist/components/ConfirmDialog/ConfirmDialog.js +10 -24
- package/dist/components/FormCheckBox/FormCheckBox.js +25 -25
- package/dist/components/FormChipCell/FormChip/FormChip.js +33 -33
- package/dist/components/FormChipCell/FormChipCell.js +66 -109
- package/dist/components/FormChipCell/FormChipCellView.js +19 -37
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.js +58 -90
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.js +24 -22
- package/dist/components/FormChipCell/formChipCell.util.js +0 -1
- package/dist/components/FormCombobox/FormCombobox.js +82 -140
- package/dist/components/FormInput/FormInput.js +110 -175
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.js +6 -21
- package/dist/components/FormKeyValueTable/FormKeyValueTable.js +23 -39
- package/dist/components/FormRadio/FormRadio.js +23 -22
- package/dist/components/FormSelect/FormSelect.js +56 -92
- package/dist/components/FormSelect/FormSelect.test.js +19 -35
- package/dist/components/FormTextarea/FormTextarea.js +44 -69
- package/dist/components/Modal/Modal.js +8 -21
- package/dist/components/Modal/Modal.scss +2 -2
- package/dist/components/PopUpDialog/PopUpDialog.js +28 -43
- package/dist/components/RoundedIcon/RoundedIcon.js +7 -18
- package/dist/components/RoundedIcon/roundedIcon.scss +2 -2
- package/dist/components/Tip/Tip.js +25 -40
- package/dist/components/Tip/Tip.test.js +36 -45
- package/dist/components/Tooltip/Tooltip.js +40 -64
- package/dist/components/TooltipTemplate/ProducerTooltipTemplate.js +2 -8
- package/dist/components/TooltipTemplate/TextTooltipTemplate.js +2 -12
- package/dist/components/Wizard/Wizard.js +35 -57
- package/dist/components/Wizard/Wizard.scss +1 -3
- package/dist/components/Wizard/WizardSteps/WizardSteps.js +4 -16
- package/dist/components/Wizard/WizardSteps/WizardSteps.scss +1 -0
- package/dist/components/index.js +0 -18
- package/dist/constants.js +4 -6
- package/dist/elements/FormActionButton/FormActionButton.js +6 -12
- package/dist/elements/FormRowActions/FormRowActions.js +6 -18
- package/dist/elements/HiddenChipsBlock/HiddenChipsBlock.js +37 -55
- package/dist/elements/OptionsMenu/OptionsMenu.js +4 -14
- package/dist/elements/SelectOption/SelectOption.js +6 -18
- package/dist/elements/SelectOption/SelectOption.test.js +19 -12
- package/dist/elements/SelectOption/selectOption.scss +5 -2
- package/dist/elements/ValidationTemplate/ValidationTemplate.js +2 -11
- package/dist/elements/index.js +0 -6
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/useDebounce.js +1 -5
- package/dist/hooks/useDetectOutsideClick.js +4 -8
- package/dist/hooks/useFormTable.hook.js +31 -41
- package/dist/images/archive-icon.svg +3 -0
- package/dist/images/arrow.svg +1 -1
- package/dist/images/close.svg +2 -2
- package/dist/images/collapse.svg +2 -2
- package/dist/images/copy-to-clipboard-icon.svg +3 -0
- package/dist/images/deploy-icon.svg +4 -0
- package/dist/images/edit.svg +1 -1
- package/dist/images/edit_old.svg +3 -0
- package/dist/images/expand.svg +2 -2
- package/dist/images/eye-icon.svg +3 -0
- package/dist/images/link-icon.svg +5 -0
- package/dist/images/monitor-icon.svg +3 -0
- package/dist/images/refresh.svg +1 -1
- package/dist/images/tag-icon.svg +4 -0
- package/dist/images/unarchive-icon.svg +3 -0
- package/dist/images/yaml.svg +2 -3
- package/dist/images/yaml_old.svg +4 -0
- package/dist/index.js +0 -13
- package/dist/scss/borders.scss +1 -1
- package/dist/scss/colors.scss +2 -0
- package/dist/scss/common.scss +7 -3
- package/dist/scss/mixins.scss +6 -19
- package/dist/scss/shadows.scss +3 -3
- package/dist/scss/variables.scss +2 -0
- package/dist/types.js +19 -49
- package/dist/utils/common.util.js +3 -13
- package/dist/utils/form.util.js +20 -24
- package/dist/utils/generateChipsList.util.js +0 -3
- package/dist/utils/getFirstScrollableParent.util.js +0 -5
- package/dist/utils/validation.util.js +72 -94
- package/package.json +104 -104
- package/dist/images/eye.svg +0 -4
|
@@ -4,19 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _reactTransitionGroup = require("react-transition-group");
|
|
13
|
-
|
|
14
10
|
require("./Backdrop.scss");
|
|
15
|
-
|
|
16
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
13
|
/*
|
|
21
14
|
Copyright 2022 Iguazio Systems Ltd.
|
|
22
15
|
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
@@ -33,11 +26,12 @@ illegal under applicable law, and the grant of the foregoing license
|
|
|
33
26
|
under the Apache 2.0 license is conditioned upon your compliance with
|
|
34
27
|
such restriction.
|
|
35
28
|
*/
|
|
29
|
+
|
|
36
30
|
var Backdrop = function Backdrop(_ref) {
|
|
37
31
|
var _ref$duration = _ref.duration,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
duration = _ref$duration === void 0 ? 300 : _ref$duration,
|
|
33
|
+
show = _ref.show,
|
|
34
|
+
onClose = _ref.onClose;
|
|
41
35
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
42
36
|
in: show,
|
|
43
37
|
timeout: duration,
|
|
@@ -50,7 +44,6 @@ var Backdrop = function Backdrop(_ref) {
|
|
|
50
44
|
})
|
|
51
45
|
});
|
|
52
46
|
};
|
|
53
|
-
|
|
54
47
|
Backdrop.defaultProps = {
|
|
55
48
|
duration: 300,
|
|
56
49
|
show: false
|
|
@@ -1,57 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
11
|
var _Tooltip = _interopRequireDefault(require("../Tooltip/Tooltip"));
|
|
17
|
-
|
|
18
12
|
var _TextTooltipTemplate = _interopRequireDefault(require("../TooltipTemplate/TextTooltipTemplate"));
|
|
19
|
-
|
|
20
13
|
var _types = require("../../types");
|
|
21
|
-
|
|
22
14
|
var _constants = require("../../constants");
|
|
23
|
-
|
|
24
15
|
require("./Button.scss");
|
|
25
|
-
|
|
26
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
-
|
|
28
17
|
var _excluded = ["className", "density", "icon", "label", "tooltip", "variant"];
|
|
29
|
-
|
|
18
|
+
/*
|
|
19
|
+
Copyright 2022 Iguazio Systems Ltd.
|
|
20
|
+
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
21
|
+
an addition restriction as set forth herein. You may not use this
|
|
22
|
+
file except in compliance with the License. You may obtain a copy of
|
|
23
|
+
the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
24
|
+
Unless required by applicable law or agreed to in writing, software
|
|
25
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
26
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
27
|
+
implied. See the License for the specific language governing
|
|
28
|
+
permissions and limitations under the License.
|
|
29
|
+
In addition, you may not use the software for any purposes that are
|
|
30
|
+
illegal under applicable law, and the grant of the foregoing license
|
|
31
|
+
under the Apache 2.0 license is conditioned upon your compliance with
|
|
32
|
+
such restriction.
|
|
33
|
+
*/
|
|
30
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
35
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
-
|
|
34
36
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
-
|
|
36
37
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
-
|
|
38
38
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
39
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
40
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
41
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
42
42
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
43
|
-
|
|
44
43
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
45
|
-
|
|
46
44
|
var Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
47
45
|
var className = _ref.className,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
density = _ref.density,
|
|
47
|
+
icon = _ref.icon,
|
|
48
|
+
label = _ref.label,
|
|
49
|
+
tooltip = _ref.tooltip,
|
|
50
|
+
variant = _ref.variant,
|
|
51
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
55
52
|
var buttonClassName = (0, _classnames.default)('btn', "btn-".concat(variant), "btn-".concat(density), className);
|
|
56
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", _objectSpread(_objectSpread({}, restProps), {}, {
|
|
57
54
|
className: buttonClassName,
|
|
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
15
|
-
|
|
16
11
|
var _PopUpDialog = _interopRequireDefault(require("../PopUpDialog/PopUpDialog"));
|
|
17
|
-
|
|
18
12
|
var _types = require("../../types");
|
|
19
|
-
|
|
20
13
|
require("./confirmDialog.scss");
|
|
21
|
-
|
|
22
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
-
|
|
24
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
16
|
/*
|
|
27
17
|
Copyright 2022 Iguazio Systems Ltd.
|
|
28
18
|
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
@@ -39,34 +29,31 @@ illegal under applicable law, and the grant of the foregoing license
|
|
|
39
29
|
under the Apache 2.0 license is conditioned upon your compliance with
|
|
40
30
|
such restriction.
|
|
41
31
|
*/
|
|
32
|
+
|
|
42
33
|
var ConfirmDialog = function ConfirmDialog(_ref) {
|
|
43
34
|
var cancelButton = _ref.cancelButton,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
35
|
+
className = _ref.className,
|
|
36
|
+
closePopUp = _ref.closePopUp,
|
|
37
|
+
confirmButton = _ref.confirmButton,
|
|
38
|
+
customPosition = _ref.customPosition,
|
|
39
|
+
header = _ref.header,
|
|
40
|
+
isOpen = _ref.isOpen,
|
|
41
|
+
message = _ref.message,
|
|
42
|
+
messageOnly = _ref.messageOnly,
|
|
43
|
+
onResolve = _ref.onResolve;
|
|
53
44
|
var messageClassNames = (0, _classnames.default)('confirm-dialog__message', messageOnly && 'confirm-dialog__message-only');
|
|
54
|
-
|
|
55
45
|
var handleCancelDialog = function handleCancelDialog(event) {
|
|
56
46
|
onResolve && onResolve();
|
|
57
47
|
cancelButton.handler && cancelButton.handler(event);
|
|
58
48
|
};
|
|
59
|
-
|
|
60
49
|
var handleCloseDialog = function handleCloseDialog(event) {
|
|
61
50
|
onResolve && onResolve();
|
|
62
51
|
closePopUp && closePopUp(event);
|
|
63
52
|
};
|
|
64
|
-
|
|
65
53
|
var handleConfirmDialog = function handleConfirmDialog(event) {
|
|
66
54
|
onResolve && onResolve();
|
|
67
55
|
confirmButton.handler && confirmButton.handler(event);
|
|
68
56
|
};
|
|
69
|
-
|
|
70
57
|
return isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_PopUpDialog.default, {
|
|
71
58
|
className: className,
|
|
72
59
|
closePopUp: handleCloseDialog,
|
|
@@ -93,7 +80,6 @@ var ConfirmDialog = function ConfirmDialog(_ref) {
|
|
|
93
80
|
})
|
|
94
81
|
});
|
|
95
82
|
};
|
|
96
|
-
|
|
97
83
|
ConfirmDialog.defaultProps = {
|
|
98
84
|
cancelButton: null,
|
|
99
85
|
className: '',
|
|
@@ -1,44 +1,48 @@
|
|
|
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = void 0;
|
|
7
|
-
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
var _reactFinalForm = require("react-final-form");
|
|
13
|
-
|
|
14
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
12
|
require("./formCheckBox.scss");
|
|
17
|
-
|
|
18
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
14
|
var _excluded = ["children", "className", "highlightLabel", "label", "name"];
|
|
21
|
-
|
|
15
|
+
/*
|
|
16
|
+
Copyright 2022 Iguazio Systems Ltd.
|
|
17
|
+
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
18
|
+
an addition restriction as set forth herein. You may not use this
|
|
19
|
+
file except in compliance with the License. You may obtain a copy of
|
|
20
|
+
the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
21
|
+
Unless required by applicable law or agreed to in writing, software
|
|
22
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
23
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
24
|
+
implied. See the License for the specific language governing
|
|
25
|
+
permissions and limitations under the License.
|
|
26
|
+
In addition, you may not use the software for any purposes that are
|
|
27
|
+
illegal under applicable law, and the grant of the foregoing license
|
|
28
|
+
under the Apache 2.0 license is conditioned upon your compliance with
|
|
29
|
+
such restriction.
|
|
30
|
+
*/
|
|
22
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
32
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
-
|
|
26
33
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
34
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
36
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
30
37
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
|
-
|
|
32
38
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
-
|
|
34
39
|
var FormCheckBox = function FormCheckBox(_ref) {
|
|
35
40
|
var _children = _ref.children,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
className = _ref.className,
|
|
42
|
+
highlightLabel = _ref.highlightLabel,
|
|
43
|
+
label = _ref.label,
|
|
44
|
+
name = _ref.name,
|
|
45
|
+
inputProps = _objectWithoutProperties(_ref, _excluded);
|
|
42
46
|
var formFieldClassNames = (0, _classnames.default)('form-field-checkbox', className);
|
|
43
47
|
var labelClassNames = (0, _classnames.default)(highlightLabel && 'highlighted');
|
|
44
48
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
@@ -47,7 +51,6 @@ var FormCheckBox = function FormCheckBox(_ref) {
|
|
|
47
51
|
type: "checkbox",
|
|
48
52
|
children: function children(_ref2) {
|
|
49
53
|
var _inputProps$value, _inputProps$value2;
|
|
50
|
-
|
|
51
54
|
var input = _ref2.input;
|
|
52
55
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
53
56
|
className: formFieldClassNames,
|
|
@@ -62,7 +65,6 @@ var FormCheckBox = function FormCheckBox(_ref) {
|
|
|
62
65
|
}
|
|
63
66
|
});
|
|
64
67
|
};
|
|
65
|
-
|
|
66
68
|
FormCheckBox.defaultProps = {
|
|
67
69
|
className: '',
|
|
68
70
|
highlightLabel: false,
|
|
@@ -74,7 +76,5 @@ FormCheckBox.propTypes = {
|
|
|
74
76
|
name: _propTypes.default.string.isRequired,
|
|
75
77
|
label: _propTypes.default.string
|
|
76
78
|
};
|
|
77
|
-
|
|
78
79
|
var _default = /*#__PURE__*/_react.default.memo(FormCheckBox);
|
|
79
|
-
|
|
80
80
|
exports.default = _default;
|
|
@@ -1,55 +1,56 @@
|
|
|
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
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
9
|
var _NewChipForm = _interopRequireDefault(require("../NewChipForm/NewChipForm"));
|
|
15
|
-
|
|
16
10
|
var _types = require("../../../types");
|
|
17
|
-
|
|
18
11
|
require("./formChip.scss");
|
|
19
|
-
|
|
20
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
|
|
22
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
16
|
+
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); }
|
|
28
17
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
-
|
|
30
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
19
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
|
|
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
|
+
*/
|
|
34
37
|
var FormChip = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
35
38
|
var chip = _ref.chip,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
chipIndex = _ref.chipIndex,
|
|
40
|
+
chipOptions = _ref.chipOptions,
|
|
41
|
+
editConfig = _ref.editConfig,
|
|
42
|
+
handleEditChip = _ref.handleEditChip,
|
|
43
|
+
handleRemoveChip = _ref.handleRemoveChip,
|
|
44
|
+
handleToEditMode = _ref.handleToEditMode,
|
|
45
|
+
isDeleteMode = _ref.isDeleteMode,
|
|
46
|
+
isEditable = _ref.isEditable,
|
|
47
|
+
keyName = _ref.keyName,
|
|
48
|
+
meta = _ref.meta,
|
|
49
|
+
setChipsSizes = _ref.setChipsSizes,
|
|
50
|
+
setEditConfig = _ref.setEditConfig,
|
|
51
|
+
validationRules = _ref.validationRules,
|
|
52
|
+
valueName = _ref.valueName;
|
|
51
53
|
var chipRef = _react.default.useRef();
|
|
52
|
-
|
|
53
54
|
(0, _react.useEffect)(function () {
|
|
54
55
|
queueMicrotask(function () {
|
|
55
56
|
if (chipRef.current && setChipsSizes) {
|
|
@@ -82,7 +83,6 @@ var FormChip = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
82
83
|
})
|
|
83
84
|
});
|
|
84
85
|
});
|
|
85
|
-
|
|
86
86
|
FormChip.defaultProps = {
|
|
87
87
|
chipOptions: {
|
|
88
88
|
background: 'purple',
|