@luminati-io/uikit 3.4.1 → 3.4.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -33020,7 +33020,7 @@ Button.defaultProps = {
|
|
33020
33020
|
loadingText: 'Loading...'
|
33021
33021
|
};
|
33022
33022
|
Button.propTypes = {
|
33023
|
-
text: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().
|
33023
|
+
text: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node).isRequired,
|
33024
33024
|
variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['primary', 'secondary', 'negative', 'negative_secondary', 'positive', 'white']),
|
33025
33025
|
size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'sm', 'md', 'lg']),
|
33026
33026
|
icon: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_6__.iconNames),
|
@@ -36606,7 +36606,6 @@ IconButton.defaultProps = {
|
|
36606
36606
|
size: 'md'
|
36607
36607
|
};
|
36608
36608
|
IconButton.propTypes = {
|
36609
|
-
// variant: PT.oneOf(['icon', 'icon-button', 'ghost']),
|
36610
36609
|
icon: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_4__.iconNames).isRequired,
|
36611
36610
|
disabled: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),
|
36612
36611
|
active: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),
|
@@ -36782,7 +36781,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
36782
36781
|
|
36783
36782
|
|
36784
36783
|
/*jslint react:true*/
|
36785
|
-
var _excluded = ["checked", "onChange", "onClick", "label", "disabled", "tooltip", "indeterminate", "verticalAlign"];
|
36784
|
+
var _excluded = ["id", "checked", "onChange", "onClick", "label", "disabled", "tooltip", "indeterminate", "verticalAlign"];
|
36786
36785
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
36787
36786
|
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; }
|
36788
36787
|
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; }
|
@@ -36794,7 +36793,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
36794
36793
|
|
36795
36794
|
|
36796
36795
|
var Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {
|
36797
|
-
var
|
36796
|
+
var id = props.id,
|
36797
|
+
checked = props.checked,
|
36798
36798
|
onChange = props.onChange,
|
36799
36799
|
onClick = props.onClick,
|
36800
36800
|
label = props.label,
|
@@ -36803,7 +36803,7 @@ var Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forward
|
|
36803
36803
|
indeterminate = props.indeterminate,
|
36804
36804
|
verticalAlign = props.verticalAlign,
|
36805
36805
|
rest = _objectWithoutProperties(props, _excluded);
|
36806
|
-
var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useLabelId)(
|
36806
|
+
var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useLabelId)(id);
|
36807
36807
|
var handleClick = function handleClick(evt) {
|
36808
36808
|
if (disabled) return;
|
36809
36809
|
onClick === null || onClick === void 0 ? void 0 : onClick(evt);
|
@@ -36819,6 +36819,7 @@ var Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forward
|
|
36819
36819
|
$verticalAlign: verticalAlign,
|
36820
36820
|
$disabled: disabled
|
36821
36821
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CheckboxControl, {
|
36822
|
+
id: id,
|
36822
36823
|
role: "checkbox",
|
36823
36824
|
"aria-checked": checked ? true : indeterminate ? 'mixed' : false,
|
36824
36825
|
"aria-disabled": disabled,
|
@@ -39091,6 +39092,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
39091
39092
|
|
39092
39093
|
/*jslint react:true*/
|
39093
39094
|
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); }
|
39095
|
+
var _excluded = ["id", "value", "leftInnerContent", "leftOuterContent", "rightInnerContent", "rightOuterContent", "heightCalculationCallback", "Field", "onChange", "onFocus", "onBlur", "placeholder", "disabled", "invalid", "autofocus", "helperText", "label", "labelIcon", "required", "necessityIndicator", "autoresize", "verticalAlign", "innerWrapper"];
|
39094
39096
|
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; }
|
39095
39097
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
39096
39098
|
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); }
|
@@ -39101,6 +39103,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
39101
39103
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
39102
39104
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
39103
39105
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
39106
|
+
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; }
|
39107
|
+
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; }
|
39104
39108
|
|
39105
39109
|
|
39106
39110
|
|
@@ -39115,7 +39119,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39115
39119
|
var inputVerticalPadding = 4;
|
39116
39120
|
var inputHorizontalPadding = 12;
|
39117
39121
|
var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {
|
39118
|
-
var
|
39122
|
+
var id = props.id,
|
39123
|
+
value = props.value,
|
39119
39124
|
leftInnerContent = props.leftInnerContent,
|
39120
39125
|
leftOuterContent = props.leftOuterContent,
|
39121
39126
|
rightInnerContent = props.rightInnerContent,
|
@@ -39136,7 +39141,8 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
|
|
39136
39141
|
necessityIndicator = props.necessityIndicator,
|
39137
39142
|
autoresize = props.autoresize,
|
39138
39143
|
verticalAlign = props.verticalAlign,
|
39139
|
-
innerWrapper = props.innerWrapper
|
39144
|
+
innerWrapper = props.innerWrapper,
|
39145
|
+
rest = _objectWithoutProperties(props, _excluded);
|
39140
39146
|
var field = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
39141
39147
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(),
|
39142
39148
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -39162,10 +39168,10 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
|
|
39162
39168
|
// XXX vadimv: hack to autoresize textarea
|
39163
39169
|
if (autoresize) field.current.style.height = (0,_utils__WEBPACK_IMPORTED_MODULE_10__.toPixel)(field.current.scrollHeight);
|
39164
39170
|
}, [autoresize, value]);
|
39165
|
-
var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useLabelId)(
|
39171
|
+
var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useLabelId)(id);
|
39166
39172
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex, _extends({
|
39167
39173
|
ref: ref
|
39168
|
-
}, (0,_util__WEBPACK_IMPORTED_MODULE_9__.getCommonProps)(
|
39174
|
+
}, (0,_util__WEBPACK_IMPORTED_MODULE_9__.getCommonProps)(rest), {
|
39169
39175
|
flex_direction: "column",
|
39170
39176
|
gap: "4px"
|
39171
39177
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(InputLabel, {
|
@@ -39188,6 +39194,7 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
|
|
39188
39194
|
onClick: onWrapperClick
|
39189
39195
|
}, leftInnerContent, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Field, _extends({}, props.inputProps, {
|
39190
39196
|
ref: field,
|
39197
|
+
id: id,
|
39191
39198
|
disabled: disabled,
|
39192
39199
|
onChange: onChange,
|
39193
39200
|
onFocus: onFieldFocus,
|
@@ -39593,18 +39600,19 @@ var ButtonAddInput = function ButtonAddInput(props) {
|
|
39593
39600
|
onInputFocus = props.onInputFocus,
|
39594
39601
|
onInputBlur = props.onInputBlur,
|
39595
39602
|
onInputKeyDown = props.onInputKeyDown,
|
39603
|
+
onInputShow = props.onInputShow,
|
39596
39604
|
error = props.error,
|
39597
39605
|
setError = props.setError;
|
39598
39606
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
39599
39607
|
_useState2 = _slicedToArray(_useState, 2),
|
39600
39608
|
showInput = _useState2[0],
|
39601
39609
|
setShowInput = _useState2[1];
|
39602
|
-
var
|
39610
|
+
var onBlur = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
|
39603
39611
|
onInputBlur === null || onInputBlur === void 0 ? void 0 : onInputBlur(evt);
|
39604
39612
|
if (inputValue) return;
|
39605
39613
|
setShowInput(false);
|
39606
39614
|
}, [inputValue, onInputBlur]);
|
39607
|
-
var
|
39615
|
+
var _onButtonClick = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
|
39608
39616
|
void _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
39609
39617
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
39610
39618
|
while (1) switch (_context.prev = _context.next) {
|
@@ -39628,7 +39636,8 @@ var ButtonAddInput = function ButtonAddInput(props) {
|
|
39628
39636
|
case 8:
|
39629
39637
|
setError();
|
39630
39638
|
setShowInput(true);
|
39631
|
-
|
39639
|
+
onInputShow === null || onInputShow === void 0 ? void 0 : onInputShow();
|
39640
|
+
case 11:
|
39632
39641
|
case "end":
|
39633
39642
|
return _context.stop();
|
39634
39643
|
}
|
@@ -39638,6 +39647,7 @@ var ButtonAddInput = function ButtonAddInput(props) {
|
|
39638
39647
|
if (showInput) {
|
39639
39648
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_textbox__WEBPACK_IMPORTED_MODULE_3__.Textbox, {
|
39640
39649
|
autofocus: true,
|
39650
|
+
"data-name": "input",
|
39641
39651
|
className: (0,_util__WEBPACK_IMPORTED_MODULE_2__.classNames)(className, {
|
39642
39652
|
input: true
|
39643
39653
|
}),
|
@@ -39645,8 +39655,10 @@ var ButtonAddInput = function ButtonAddInput(props) {
|
|
39645
39655
|
value: inputValue,
|
39646
39656
|
placeholder: placeholder,
|
39647
39657
|
onFocus: onInputFocus,
|
39648
|
-
onBlur:
|
39649
|
-
onChange:
|
39658
|
+
onBlur: onBlur,
|
39659
|
+
onChange: function onChange(val) {
|
39660
|
+
return onInputValueChange(val);
|
39661
|
+
},
|
39650
39662
|
inputProps: {
|
39651
39663
|
onKeyDown: onInputKeyDown
|
39652
39664
|
},
|
@@ -39654,6 +39666,7 @@ var ButtonAddInput = function ButtonAddInput(props) {
|
|
39654
39666
|
});
|
39655
39667
|
}
|
39656
39668
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_button__WEBPACK_IMPORTED_MODULE_1__.Button, {
|
39669
|
+
"data-action": "add",
|
39657
39670
|
className: (0,_util__WEBPACK_IMPORTED_MODULE_2__.classNames)(className, {
|
39658
39671
|
button: true,
|
39659
39672
|
'button--is-diabled': disabled
|
@@ -39663,7 +39676,7 @@ var ButtonAddInput = function ButtonAddInput(props) {
|
|
39663
39676
|
size: size,
|
39664
39677
|
disabled: disabled,
|
39665
39678
|
text: buttonText,
|
39666
|
-
onClick:
|
39679
|
+
onClick: _onButtonClick
|
39667
39680
|
});
|
39668
39681
|
};
|
39669
39682
|
|
@@ -39728,17 +39741,19 @@ var ItemList = function ItemList(props) {
|
|
39728
39741
|
_props$value = props.value,
|
39729
39742
|
value = _props$value === void 0 ? [] : _props$value,
|
39730
39743
|
maxItems = props.maxItems,
|
39731
|
-
|
39744
|
+
onRemoveItem = props.onRemoveItem,
|
39732
39745
|
_props$itemRenderer = props.itemRenderer,
|
39733
39746
|
itemRenderer = _props$itemRenderer === void 0 ? DefaultItemRenderer : _props$itemRenderer,
|
39734
39747
|
isItemDisabled = props.isItemDisabled;
|
39748
|
+
if (!value.length) return null;
|
39735
39749
|
var filtered = maxItems ? value.slice(0, maxItems) : value;
|
39736
39750
|
var extra = value.length - filtered.length;
|
39737
39751
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_3__.Flex, {
|
39738
39752
|
className: (0,_util__WEBPACK_IMPORTED_MODULE_4__.classNames)(className, {
|
39739
39753
|
itemList: true
|
39740
39754
|
}),
|
39741
|
-
flex_direction: "column"
|
39755
|
+
flex_direction: "column",
|
39756
|
+
role: "list"
|
39742
39757
|
}, lodash_map__WEBPACK_IMPORTED_MODULE_0___default()(filtered, function (val, i) {
|
39743
39758
|
return (0,_util__WEBPACK_IMPORTED_MODULE_4__.flexRender)(itemRenderer, {
|
39744
39759
|
key: "item-".concat(i, "_").concat(val),
|
@@ -39747,12 +39762,13 @@ var ItemList = function ItemList(props) {
|
|
39747
39762
|
}),
|
39748
39763
|
value: val,
|
39749
39764
|
onRemove: function onRemove() {
|
39750
|
-
return
|
39765
|
+
return onRemoveItem(val);
|
39751
39766
|
},
|
39752
39767
|
showRemove: !isItemDisabled || !isItemDisabled(val)
|
39753
39768
|
});
|
39754
39769
|
}), extra > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Item, {
|
39755
39770
|
key: "extra",
|
39771
|
+
role: "listitem",
|
39756
39772
|
className: (0,_util__WEBPACK_IMPORTED_MODULE_4__.classNames)(className, {
|
39757
39773
|
extra: true
|
39758
39774
|
})
|
@@ -39767,11 +39783,14 @@ var DefaultItemRenderer = function DefaultItemRenderer(props) {
|
|
39767
39783
|
onRemove = props.onRemove,
|
39768
39784
|
showRemove = props.showRemove;
|
39769
39785
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ItemWithHover, {
|
39770
|
-
className: className
|
39786
|
+
className: className,
|
39787
|
+
role: "listitem"
|
39771
39788
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_5__.Label, {
|
39772
39789
|
variant: "sm",
|
39773
39790
|
color: "gray_11_50"
|
39774
39791
|
}, value), showRemove && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_6__.IconButton, {
|
39792
|
+
"data-action": "remove",
|
39793
|
+
title: "Remove",
|
39775
39794
|
onClick: onRemove,
|
39776
39795
|
variant: "xxs",
|
39777
39796
|
icon: "CloseSmall"
|
@@ -39814,7 +39833,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
39814
39833
|
|
39815
39834
|
/*jslint node:true, react:true*/
|
39816
39835
|
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); }
|
39817
|
-
var _excluded = ["className", "size", "label", "labelIcon", "required", "necessityIndicator", "disabled", "buttonText", "onButtonClick", "invalid", "helperText", "placeholder", "value", "onFocus", "onBlur", "onValidate", "
|
39836
|
+
var _excluded = ["className", "size", "label", "labelIcon", "required", "necessityIndicator", "disabled", "buttonText", "onButtonClick", "invalid", "helperText", "placeholder", "value", "onFocus", "onBlur", "onValidate", "onRemoveItem", "onChange", "maxItems", "itemRenderer", "isItemDisabled", "onInputShow"];
|
39818
39837
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
39819
39838
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
39820
39839
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
@@ -39856,11 +39875,12 @@ var TextboxList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
|
|
39856
39875
|
onFocus = props.onFocus,
|
39857
39876
|
onBlur = props.onBlur,
|
39858
39877
|
onValidate = props.onValidate,
|
39859
|
-
|
39878
|
+
onRemoveItem = props.onRemoveItem,
|
39860
39879
|
onChange = props.onChange,
|
39861
39880
|
maxItems = props.maxItems,
|
39862
39881
|
itemRenderer = props.itemRenderer,
|
39863
39882
|
isItemDisabled = props.isItemDisabled,
|
39883
|
+
onInputShow = props.onInputShow,
|
39864
39884
|
rest = _objectWithoutProperties(props, _excluded);
|
39865
39885
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
|
39866
39886
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -39908,18 +39928,18 @@ var TextboxList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
|
|
39908
39928
|
var onInputKeyDown = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
|
39909
39929
|
if (evt.key === 'Enter') onInputBlur(evt);
|
39910
39930
|
}, [onInputBlur]);
|
39911
|
-
var
|
39931
|
+
var _onRemoveItem = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (val) {
|
39912
39932
|
void _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
39913
39933
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
39914
39934
|
while (1) switch (_context2.prev = _context2.next) {
|
39915
39935
|
case 0:
|
39916
|
-
_context2.t0 =
|
39936
|
+
_context2.t0 = onRemoveItem;
|
39917
39937
|
if (!_context2.t0) {
|
39918
39938
|
_context2.next = 6;
|
39919
39939
|
break;
|
39920
39940
|
}
|
39921
39941
|
_context2.next = 4;
|
39922
|
-
return
|
39942
|
+
return onRemoveItem(val, value);
|
39923
39943
|
case 4:
|
39924
39944
|
_context2.t1 = _context2.sent;
|
39925
39945
|
_context2.t0 = _context2.t1 === false;
|
@@ -39939,11 +39959,14 @@ var TextboxList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
|
|
39939
39959
|
}
|
39940
39960
|
}, _callee2);
|
39941
39961
|
}))();
|
39942
|
-
}, [value,
|
39943
|
-
var
|
39962
|
+
}, [value, onRemoveItem, onChange]);
|
39963
|
+
var _isItemDisabled = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (val) {
|
39944
39964
|
if (disabled) return true;
|
39945
39965
|
return isItemDisabled ? isItemDisabled(val) : false;
|
39946
39966
|
}, [disabled, isItemDisabled]);
|
39967
|
+
var _onInputShow = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
39968
|
+
onInputShow === null || onInputShow === void 0 ? void 0 : onInputShow(inputValue, setInputValue);
|
39969
|
+
}, [onInputShow, inputValue, setInputValue]);
|
39947
39970
|
var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useLabelId)(props.id);
|
39948
39971
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_3__.Flex, _extends({
|
39949
39972
|
ref: ref,
|
@@ -39963,8 +39986,8 @@ var TextboxList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
|
|
39963
39986
|
className: className,
|
39964
39987
|
value: value,
|
39965
39988
|
maxItems: maxItems,
|
39966
|
-
|
39967
|
-
isItemDisabled:
|
39989
|
+
onRemoveItem: _onRemoveItem,
|
39990
|
+
isItemDisabled: _isItemDisabled,
|
39968
39991
|
itemRenderer: itemRenderer
|
39969
39992
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_button_add_input__WEBPACK_IMPORTED_MODULE_6__.ButtonAddInput, {
|
39970
39993
|
className: className,
|
@@ -39978,6 +40001,7 @@ var TextboxList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
|
|
39978
40001
|
onInputFocus: onFocus,
|
39979
40002
|
onInputBlur: onInputBlur,
|
39980
40003
|
onInputKeyDown: onInputKeyDown,
|
40004
|
+
onInputShow: _onInputShow,
|
39981
40005
|
error: error,
|
39982
40006
|
setError: setError
|
39983
40007
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_5__.HelperText, {
|
@@ -40006,9 +40030,10 @@ TextboxList.propTypes = {
|
|
40006
40030
|
value: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().array),
|
40007
40031
|
onChange: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
40008
40032
|
maxItems: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
|
40009
|
-
|
40010
|
-
itemRenderer: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().
|
40011
|
-
isItemDisabled: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)
|
40033
|
+
onRemoveItem: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
40034
|
+
itemRenderer: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().element), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
|
40035
|
+
isItemDisabled: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
40036
|
+
onInputShow: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)
|
40012
40037
|
};
|
40013
40038
|
|
40014
40039
|
/***/ }),
|
@@ -40038,7 +40063,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
40038
40063
|
|
40039
40064
|
|
40040
40065
|
/*jslint react:true*/
|
40066
|
+
var _excluded = ["id", "value", "label", "disabled", "size", "onChange"];
|
40041
40067
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
40068
|
+
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; }
|
40069
|
+
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; }
|
40042
40070
|
|
40043
40071
|
|
40044
40072
|
|
@@ -40047,19 +40075,22 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
40047
40075
|
|
40048
40076
|
|
40049
40077
|
var Toggle = function Toggle(props) {
|
40050
|
-
var
|
40078
|
+
var id = props.id,
|
40079
|
+
value = props.value,
|
40051
40080
|
label = props.label,
|
40052
40081
|
disabled = props.disabled,
|
40053
40082
|
size = props.size,
|
40054
|
-
onChange = props.onChange
|
40083
|
+
onChange = props.onChange,
|
40084
|
+
rest = _objectWithoutProperties(props, _excluded);
|
40055
40085
|
var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (evt) {
|
40056
40086
|
var checked = evt.target.checked;
|
40057
40087
|
onChange === null || onChange === void 0 ? void 0 : onChange(checked, evt);
|
40058
40088
|
}, [onChange]);
|
40059
40089
|
var color = getLabelColor(props);
|
40060
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ToggleLabel, _extends({}, (0,_util__WEBPACK_IMPORTED_MODULE_5__.getCommonProps)(
|
40090
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ToggleLabel, _extends({}, (0,_util__WEBPACK_IMPORTED_MODULE_5__.getCommonProps)(rest), {
|
40061
40091
|
$size: size
|
40062
40092
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ToggleInput, {
|
40093
|
+
id: id,
|
40063
40094
|
$size: size,
|
40064
40095
|
checked: value,
|
40065
40096
|
onChange: handleChange,
|
@@ -40494,7 +40525,7 @@ Link.defaultProps = {
|
|
40494
40525
|
iconPlacement: 'left'
|
40495
40526
|
};
|
40496
40527
|
Link.propTypes = {
|
40497
|
-
text: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().
|
40528
|
+
text: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node).isRequired,
|
40498
40529
|
variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['primary', 'secondary', 'inline']),
|
40499
40530
|
size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['sm', 'md', 'lg']),
|
40500
40531
|
icon: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_7__.iconNames),
|