@luminati-io/uikit 3.7.2 → 3.7.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -29543,7 +29543,11 @@ var BarChart = function BarChart(props) {
|
|
29543
29543
|
onPointerUp = props.onPointerUp,
|
29544
29544
|
onPointerDown = props.onPointerDown,
|
29545
29545
|
pointerEventsDataKey = props.pointerEventsDataKey,
|
29546
|
-
children = props.children
|
29546
|
+
children = props.children,
|
29547
|
+
_props$snapTooltipToD = props.snapTooltipToDatumX,
|
29548
|
+
snapTooltipToDatumX = _props$snapTooltipToD === void 0 ? true : _props$snapTooltipToD,
|
29549
|
+
_props$snapTooltipToD2 = props.snapTooltipToDatumY,
|
29550
|
+
snapTooltipToDatumY = _props$snapTooltipToD2 === void 0 ? true : _props$snapTooltipToD2;
|
29547
29551
|
var _getAnimatedOrUnanima = (0,_get_components__WEBPACK_IMPORTED_MODULE_5__.getAnimatedOrUnanimatedComponents)(animated),
|
29548
29552
|
XYChart = _getAnimatedOrUnanima.XYChart,
|
29549
29553
|
Grid = _getAnimatedOrUnanima.Grid,
|
@@ -29567,6 +29571,8 @@ var BarChart = function BarChart(props) {
|
|
29567
29571
|
id: "pattern_".concat(i)
|
29568
29572
|
}, barProps.pattern);
|
29569
29573
|
}).filter(Boolean);
|
29574
|
+
var showVerticalCrosshair = (0,_util__WEBPACK_IMPORTED_MODULE_2__.firstDefined)(props.showVerticalCrosshair, !stacked && !horizontal);
|
29575
|
+
var showHorizontalCrosshair = (0,_util__WEBPACK_IMPORTED_MODULE_2__.firstDefined)(props.showHorizontalCrosshair, !stacked && horizontal);
|
29570
29576
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(XYChart, {
|
29571
29577
|
theme: chartTheme,
|
29572
29578
|
xScale: config.x,
|
@@ -29640,10 +29646,10 @@ var BarChart = function BarChart(props) {
|
|
29640
29646
|
tickFormat: yAxis.formatTick,
|
29641
29647
|
labelOffset: yAxis.labelOffset
|
29642
29648
|
}), !!showTooltip && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Tooltip, {
|
29643
|
-
showHorizontalCrosshair:
|
29644
|
-
showVerticalCrosshair:
|
29645
|
-
snapTooltipToDatumX:
|
29646
|
-
snapTooltipToDatumY:
|
29649
|
+
showHorizontalCrosshair: showVerticalCrosshair,
|
29650
|
+
showVerticalCrosshair: showHorizontalCrosshair,
|
29651
|
+
snapTooltipToDatumX: snapTooltipToDatumX,
|
29652
|
+
snapTooltipToDatumY: snapTooltipToDatumY,
|
29647
29653
|
unstyled: true,
|
29648
29654
|
applyPositionStyle: true,
|
29649
29655
|
renderTooltip: function renderTooltip(params) {
|
@@ -29659,7 +29665,7 @@ var BarChart = function BarChart(props) {
|
|
29659
29665
|
};
|
29660
29666
|
BarChart.displayName = 'BarChart';
|
29661
29667
|
var Bar = function Bar(props) {
|
29662
|
-
var _splitProps = (0,_util__WEBPACK_IMPORTED_MODULE_2__.splitProps)(props, 'animated', 'showGridRows', 'showGridColumns', 'numTicks', 'xAxis', 'yAxis', 'formatValue', 'margin', 'horizontal', 'stacked', 'showAnnotations', 'showTooltip', 'tooltipContent', 'onPointerMove', 'onPointerOut', 'onPointerUp', 'onPointerDown', 'pointerEventsDataKey', 'children'),
|
29668
|
+
var _splitProps = (0,_util__WEBPACK_IMPORTED_MODULE_2__.splitProps)(props, 'animated', 'showGridRows', 'showGridColumns', 'numTicks', 'xAxis', 'yAxis', 'formatValue', 'margin', 'horizontal', 'stacked', 'showAnnotations', 'showTooltip', 'tooltipContent', 'snapTooltipToDatumX', 'snapTooltipToDatumY', 'showVerticalCrosshair', 'showHorizontalCrosshair', 'onPointerMove', 'onPointerOut', 'onPointerUp', 'onPointerDown', 'pointerEventsDataKey', 'children'),
|
29663
29669
|
_splitProps2 = _slicedToArray(_splitProps, 2),
|
29664
29670
|
chartProps = _splitProps2[0],
|
29665
29671
|
restProps = _splitProps2[1];
|
@@ -29714,6 +29720,10 @@ Bar.propTypes = {
|
|
29714
29720
|
showAnnotations: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
29715
29721
|
showTooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
29716
29722
|
tooltipContent: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().element), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
|
29723
|
+
snapTooltipToDatumX: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
29724
|
+
snapTooltipToDatumY: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
29725
|
+
showVerticalCrosshair: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
29726
|
+
showHorizontalCrosshair: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
29717
29727
|
onPointerMove: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
29718
29728
|
onPointerOut: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
29719
29729
|
onPointerUp: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
@@ -30116,8 +30126,8 @@ ChartContainer.defaultProps = {
|
|
30116
30126
|
variant: 'default'
|
30117
30127
|
};
|
30118
30128
|
ChartContainer.propTypes = {
|
30119
|
-
header: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().
|
30120
|
-
description: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().
|
30129
|
+
header: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
30130
|
+
description: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
30121
30131
|
actions: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
30122
30132
|
width: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
30123
30133
|
height: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number).isRequired,
|
@@ -34404,6 +34414,7 @@ var ClearIndicator = function ClearIndicator(props) {
|
|
34404
34414
|
var ic = _icons__WEBPACK_IMPORTED_MODULE_0__["default"].CloseSmall;
|
34405
34415
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
|
34406
34416
|
ref: innerRef,
|
34417
|
+
"data-testid": "clear-indicator",
|
34407
34418
|
width: "18px",
|
34408
34419
|
height: "18px",
|
34409
34420
|
viewBox: ic.viewBox,
|
@@ -34641,6 +34652,7 @@ var DropdownIndicator = function DropdownIndicator(props) {
|
|
34641
34652
|
var ic = _icons__WEBPACK_IMPORTED_MODULE_0__["default"][selectProps.menuIsOpen ? 'ChevronUp' : 'ChevronDown'];
|
34642
34653
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
|
34643
34654
|
ref: innerRef,
|
34655
|
+
"data-testid": "dropdown-indicator",
|
34644
34656
|
width: "18px",
|
34645
34657
|
height: "18px",
|
34646
34658
|
viewBox: ic.viewBox,
|
@@ -35653,35 +35665,37 @@ UploadItemState.propTypes = {
|
|
35653
35665
|
"use strict";
|
35654
35666
|
__webpack_require__.r(__webpack_exports__);
|
35655
35667
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
35656
|
-
/* harmony export */ Checkbox: () => (/* reexport safe */
|
35668
|
+
/* harmony export */ Checkbox: () => (/* reexport safe */ _checkbox__WEBPACK_IMPORTED_MODULE_6__.Checkbox),
|
35657
35669
|
/* harmony export */ CheckboxList: () => (/* reexport safe */ _checkbox_list__WEBPACK_IMPORTED_MODULE_0__.CheckboxList),
|
35658
|
-
/* harmony export */ CompareTo: () => (/* reexport safe */
|
35659
|
-
/* harmony export */ DatePicker: () => (/* reexport safe */
|
35660
|
-
/* harmony export */ DragDrop: () => (/* reexport safe */
|
35661
|
-
/* harmony export */ Dropdown: () => (/* reexport safe */
|
35662
|
-
/* harmony export */ FILE_STATUS: () => (/* reexport safe */
|
35663
|
-
/* harmony export */ FileUploader: () => (/* reexport safe */
|
35664
|
-
/* harmony export */ Number: () => (/* reexport safe */
|
35665
|
-
/* harmony export */
|
35666
|
-
/* harmony export */
|
35667
|
-
/* harmony export */
|
35668
|
-
/* harmony export */
|
35669
|
-
/* harmony export */
|
35670
|
-
/* harmony export */
|
35670
|
+
/* harmony export */ CompareTo: () => (/* reexport safe */ _compare_to__WEBPACK_IMPORTED_MODULE_7__.CompareTo),
|
35671
|
+
/* harmony export */ DatePicker: () => (/* reexport safe */ _date_picker__WEBPACK_IMPORTED_MODULE_8__.DatePicker),
|
35672
|
+
/* harmony export */ DragDrop: () => (/* reexport safe */ _drag_drop__WEBPACK_IMPORTED_MODULE_1__.DragDrop),
|
35673
|
+
/* harmony export */ Dropdown: () => (/* reexport safe */ _dropdown__WEBPACK_IMPORTED_MODULE_2__.Dropdown),
|
35674
|
+
/* harmony export */ FILE_STATUS: () => (/* reexport safe */ _file_uploader__WEBPACK_IMPORTED_MODULE_3__.FILE_STATUS),
|
35675
|
+
/* harmony export */ FileUploader: () => (/* reexport safe */ _file_uploader__WEBPACK_IMPORTED_MODULE_3__.FileUploader),
|
35676
|
+
/* harmony export */ Number: () => (/* reexport safe */ _number__WEBPACK_IMPORTED_MODULE_9__.Number),
|
35677
|
+
/* harmony export */ Phone: () => (/* reexport safe */ _phone__WEBPACK_IMPORTED_MODULE_4__.Phone),
|
35678
|
+
/* harmony export */ RadioGroup: () => (/* reexport safe */ _radio_group__WEBPACK_IMPORTED_MODULE_10__.RadioGroup),
|
35679
|
+
/* harmony export */ StyledDayPicker: () => (/* reexport safe */ _date_picker__WEBPACK_IMPORTED_MODULE_8__.StyledDayPicker),
|
35680
|
+
/* harmony export */ Textarea: () => (/* reexport safe */ _textarea__WEBPACK_IMPORTED_MODULE_11__.Textarea),
|
35681
|
+
/* harmony export */ Textbox: () => (/* reexport safe */ _textbox__WEBPACK_IMPORTED_MODULE_12__.Textbox),
|
35682
|
+
/* harmony export */ TextboxList: () => (/* reexport safe */ _textbox_list__WEBPACK_IMPORTED_MODULE_5__.TextboxList),
|
35683
|
+
/* harmony export */ Toggle: () => (/* reexport safe */ _toggle__WEBPACK_IMPORTED_MODULE_13__.Toggle)
|
35671
35684
|
/* harmony export */ });
|
35672
35685
|
/* harmony import */ var _checkbox_list__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./checkbox_list */ "./src/input/checkbox_list/index.js");
|
35673
|
-
/* harmony import */ var
|
35674
|
-
/* harmony import */ var
|
35675
|
-
/* harmony import */ var
|
35676
|
-
/* harmony import */ var
|
35677
|
-
/* harmony import */ var
|
35678
|
-
/* harmony import */ var
|
35679
|
-
/* harmony import */ var
|
35680
|
-
/* harmony import */ var
|
35681
|
-
/* harmony import */ var
|
35682
|
-
/* harmony import */ var
|
35683
|
-
/* harmony import */ var
|
35684
|
-
/* harmony import */ var
|
35686
|
+
/* harmony import */ var _drag_drop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./drag_drop */ "./src/input/drag_drop/index.js");
|
35687
|
+
/* harmony import */ var _dropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dropdown */ "./src/input/dropdown/index.js");
|
35688
|
+
/* harmony import */ var _file_uploader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./file_uploader */ "./src/input/file_uploader/index.js");
|
35689
|
+
/* harmony import */ var _phone__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./phone */ "./src/input/phone/index.js");
|
35690
|
+
/* harmony import */ var _textbox_list__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./textbox_list */ "./src/input/textbox_list/index.js");
|
35691
|
+
/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./checkbox */ "./src/input/checkbox.js");
|
35692
|
+
/* harmony import */ var _compare_to__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./compare_to */ "./src/input/compare_to.js");
|
35693
|
+
/* harmony import */ var _date_picker__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./date_picker */ "./src/input/date_picker.js");
|
35694
|
+
/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./number */ "./src/input/number.js");
|
35695
|
+
/* harmony import */ var _radio_group__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./radio_group */ "./src/input/radio_group.js");
|
35696
|
+
/* harmony import */ var _textarea__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./textarea */ "./src/input/textarea.js");
|
35697
|
+
/* harmony import */ var _textbox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./textbox */ "./src/input/textbox.js");
|
35698
|
+
/* harmony import */ var _toggle__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./toggle */ "./src/input/toggle.js");
|
35685
35699
|
// LICENSE_CODE ZON
|
35686
35700
|
|
35687
35701
|
|
@@ -35700,6 +35714,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
35700
35714
|
|
35701
35715
|
|
35702
35716
|
|
35717
|
+
|
35703
35718
|
/***/ }),
|
35704
35719
|
|
35705
35720
|
/***/ "./src/input/number.js":
|
@@ -35723,23 +35738,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
35723
35738
|
/* harmony import */ var _translation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../translation */ "./src/translation.js");
|
35724
35739
|
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
35725
35740
|
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
|
35726
|
-
/* harmony import */ var
|
35727
|
-
/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./shared */ "./src/input/shared.js");
|
35741
|
+
/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./shared */ "./src/input/shared.js");
|
35728
35742
|
// LICENSE_CODE ZON
|
35729
35743
|
|
35730
35744
|
|
35731
35745
|
/*jslint react:true*/
|
35732
|
-
var _excluded = ["
|
35746
|
+
var _excluded = ["onChange", "onBlur", "value", "step", "minValue", "maxValue", "size", "placeholder", "changeOnBlur"],
|
35747
|
+
_excluded2 = ["onFocus", "onBlur", "onChange"];
|
35733
35748
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
35734
35749
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
35735
35750
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
35736
35751
|
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; }
|
35737
35752
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
35738
35753
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
35754
|
+
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); }
|
35739
35755
|
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; }
|
35740
35756
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
35741
|
-
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); }
|
35742
|
-
|
35743
35757
|
|
35744
35758
|
|
35745
35759
|
|
@@ -35749,16 +35763,20 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
35749
35763
|
|
35750
35764
|
|
35751
35765
|
var color = _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color;
|
35752
|
-
var Number = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (
|
35753
|
-
var onChange =
|
35754
|
-
onBlur =
|
35755
|
-
value =
|
35756
|
-
step =
|
35757
|
-
|
35758
|
-
|
35759
|
-
|
35760
|
-
|
35761
|
-
|
35766
|
+
var Number = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref, ref) {
|
35767
|
+
var onChange = _ref.onChange,
|
35768
|
+
onBlur = _ref.onBlur,
|
35769
|
+
value = _ref.value,
|
35770
|
+
_ref$step = _ref.step,
|
35771
|
+
step = _ref$step === void 0 ? 1 : _ref$step,
|
35772
|
+
minValue = _ref.minValue,
|
35773
|
+
maxValue = _ref.maxValue,
|
35774
|
+
_ref$size = _ref.size,
|
35775
|
+
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
35776
|
+
placeholder = _ref.placeholder,
|
35777
|
+
_ref$changeOnBlur = _ref.changeOnBlur,
|
35778
|
+
changeOnBlur = _ref$changeOnBlur === void 0 ? true : _ref$changeOnBlur,
|
35779
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
35762
35780
|
var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
|
35763
35781
|
var v = e.target.value;
|
35764
35782
|
if (v != '') v = +v;
|
@@ -35770,19 +35788,10 @@ var Number = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRe
|
|
35770
35788
|
var v = +value;
|
35771
35789
|
if (typeof maxValue == 'number' && v > maxValue) onChange === null || onChange === void 0 || onChange(maxValue, e);else if (typeof minValue == 'number' && v < minValue) onChange === null || onChange === void 0 || onChange(minValue, e);
|
35772
35790
|
}, [onChange, onBlur, value, minValue, maxValue, changeOnBlur]);
|
35773
|
-
var heightCalculationCallback = (0,
|
35774
|
-
var sizes = {
|
35775
|
-
'xs': 28,
|
35776
|
-
'sm': 36,
|
35777
|
-
'md': 40,
|
35778
|
-
'lg': 48
|
35779
|
-
};
|
35780
|
-
return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["height:", ";"], (0,_utils__WEBPACK_IMPORTED_MODULE_7__.toPixel)(sizes[size] || sizes.sm));
|
35781
|
-
}, [size]);
|
35791
|
+
var heightCalculationCallback = (0,_shared__WEBPACK_IMPORTED_MODULE_7__.useHeightCalculationCallback)(size);
|
35782
35792
|
var t = (0,_translation__WEBPACK_IMPORTED_MODULE_4__.useTranslate)();
|
35783
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
35784
|
-
ref: ref
|
35785
|
-
}, props, {
|
35793
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_7__.FieldWrapper, _extends({}, rest, {
|
35794
|
+
ref: ref,
|
35786
35795
|
autoresize: false,
|
35787
35796
|
heightCalculationCallback: heightCalculationCallback,
|
35788
35797
|
inputProps: {
|
@@ -35797,11 +35806,6 @@ var Number = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRe
|
|
35797
35806
|
placeholder: t(placeholder)
|
35798
35807
|
}));
|
35799
35808
|
});
|
35800
|
-
Number.defaultProps = {
|
35801
|
-
size: 'sm',
|
35802
|
-
step: 1,
|
35803
|
-
changeOnBlur: true
|
35804
|
-
};
|
35805
35809
|
Number.displayName = 'Number';
|
35806
35810
|
Number.propTypes = {
|
35807
35811
|
value: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number)]),
|
@@ -35817,13 +35821,18 @@ Number.propTypes = {
|
|
35817
35821
|
necessityIndicator: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['asterisk', 'text']),
|
35818
35822
|
invalid: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
35819
35823
|
leftInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
35820
|
-
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().
|
35824
|
+
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
35821
35825
|
rightInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
35822
|
-
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().
|
35826
|
+
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
35823
35827
|
label: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
35824
35828
|
labelIcon: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
35825
35829
|
labelTooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
35826
35830
|
helperText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
35831
|
+
fieldRef: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().func), prop_types__WEBPACK_IMPORTED_MODULE_1___default().shape({
|
35832
|
+
current: prop_types__WEBPACK_IMPORTED_MODULE_1___default().instanceOf(Element)
|
35833
|
+
})]),
|
35834
|
+
autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
35835
|
+
verticalAlign: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
35827
35836
|
size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'sm', 'md', 'lg']),
|
35828
35837
|
changeOnBlur: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool)
|
35829
35838
|
};
|
@@ -35831,7 +35840,7 @@ var NumberField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
|
|
35831
35840
|
var onFocus = props.onFocus,
|
35832
35841
|
onBlur = props.onBlur,
|
35833
35842
|
onChange = props.onChange,
|
35834
|
-
rest = _objectWithoutProperties(props,
|
35843
|
+
rest = _objectWithoutProperties(props, _excluded2);
|
35835
35844
|
var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
35836
35845
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
35837
35846
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -35906,6 +35915,615 @@ var Buttons = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withC
|
|
35906
35915
|
|
35907
35916
|
/***/ }),
|
35908
35917
|
|
35918
|
+
/***/ "./src/input/phone/country_select.js":
|
35919
|
+
/*!*******************************************!*\
|
35920
|
+
!*** ./src/input/phone/country_select.js ***!
|
35921
|
+
\*******************************************/
|
35922
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
35923
|
+
|
35924
|
+
"use strict";
|
35925
|
+
__webpack_require__.r(__webpack_exports__);
|
35926
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
35927
|
+
/* harmony export */ CountrySelect: () => (/* binding */ CountrySelect)
|
35928
|
+
/* harmony export */ });
|
35929
|
+
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @icons */ "./assets/icons/index.js");
|
35930
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
35931
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
35932
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
|
35933
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
|
35934
|
+
/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react-select */ "./node_modules/react-select/dist/react-select.esm.js");
|
35935
|
+
/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react-select */ "./node_modules/react-select/dist/index-a301f526.esm.js");
|
35936
|
+
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme */ "./src/theme.js");
|
35937
|
+
/* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../typography */ "./src/typography/index.js");
|
35938
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
|
35939
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../constants */ "./src/constants.js");
|
35940
|
+
/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../icon */ "./src/icon.js");
|
35941
|
+
/* harmony import */ var _icon_button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../icon_button */ "./src/icon_button.js");
|
35942
|
+
/* harmony import */ var _textbox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../textbox */ "./src/input/textbox.js");
|
35943
|
+
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../util */ "./src/util/index.js");
|
35944
|
+
// LICENSE_CODE ZON
|
35945
|
+
|
35946
|
+
|
35947
|
+
/*jslint react:true*/
|
35948
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
35949
|
+
var _excluded = ["onBlur"],
|
35950
|
+
_excluded2 = ["inputRef", "innerRef"],
|
35951
|
+
_excluded3 = ["searchInputRef", "onInputBlur", "children", "filterOption"],
|
35952
|
+
_excluded4 = ["size", "disabled", "value", "onChange"];
|
35953
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
35954
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
35955
|
+
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; }
|
35956
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
35957
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
35958
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
35959
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
35960
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
35961
|
+
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; }
|
35962
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
35963
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
35964
|
+
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; }
|
35965
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
35966
|
+
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); }
|
35967
|
+
|
35968
|
+
|
35969
|
+
|
35970
|
+
|
35971
|
+
|
35972
|
+
|
35973
|
+
|
35974
|
+
|
35975
|
+
|
35976
|
+
|
35977
|
+
|
35978
|
+
|
35979
|
+
var font_family = _theme__WEBPACK_IMPORTED_MODULE_3__["default"].font_family,
|
35980
|
+
font_weight = _theme__WEBPACK_IMPORTED_MODULE_3__["default"].font_weight,
|
35981
|
+
font_size = _theme__WEBPACK_IMPORTED_MODULE_3__["default"].font_size,
|
35982
|
+
line_height = _theme__WEBPACK_IMPORTED_MODULE_3__["default"].line_height,
|
35983
|
+
color = _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color;
|
35984
|
+
var CountrySelect = function CountrySelect(_ref) {
|
35985
|
+
var countries = _ref.countries,
|
35986
|
+
country = _ref.country,
|
35987
|
+
onChangeCountry = _ref.onChangeCountry,
|
35988
|
+
size = _ref.size,
|
35989
|
+
disabled = _ref.disabled,
|
35990
|
+
getCountryValue = _ref.getCountryValue,
|
35991
|
+
getCountryLabel = _ref.getCountryLabel,
|
35992
|
+
getCountryCallingCode = _ref.getCountryCallingCode,
|
35993
|
+
getCountryFlag = _ref.getCountryFlag,
|
35994
|
+
filterCountry = _ref.filterCountry,
|
35995
|
+
onMenuClose = _ref.onMenuClose;
|
35996
|
+
var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
35997
|
+
var onInputBlurRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
35998
|
+
var searchInputRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
35999
|
+
var _getCountryValue = useFunOrPropCb('value', getCountryValue);
|
36000
|
+
var _getCountryLabel = useFunOrPropCb('label', getCountryLabel);
|
36001
|
+
var _getCountryCallingCode = useFunOrPropCb('callingCode', getCountryCallingCode);
|
36002
|
+
var _getCountryFlag = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (opt) {
|
36003
|
+
var flag = typeof getCountryFlag == 'function' ? getCountryFlag(opt) : opt.flag;
|
36004
|
+
if (!flag) return null;
|
36005
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(FlagWrapper, null, flag);
|
36006
|
+
}, [getCountryFlag]);
|
36007
|
+
var _filterCountry = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (opt, inputValue) {
|
36008
|
+
if (typeof filterCountry == 'function') return filterCountry(opt, inputValue);
|
36009
|
+
if (!opt) return false;
|
36010
|
+
if (inputValue.startsWith('+')) inputValue = inputValue.slice(1);
|
36011
|
+
var filter = function filter(optValue) {
|
36012
|
+
return compareCountryString(optValue, inputValue);
|
36013
|
+
};
|
36014
|
+
var countryValue = _getCountryValue(opt);
|
36015
|
+
var countryLabel = _getCountryLabel(opt);
|
36016
|
+
var countryCallingCode = _getCountryCallingCode(opt);
|
36017
|
+
return filter(countryLabel) || filter(countryValue) || filter(countryCallingCode);
|
36018
|
+
}, [filterCountry]);
|
36019
|
+
var formatOptionLabel = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (opt, _ref2) {
|
36020
|
+
var context = _ref2.context;
|
36021
|
+
if (!opt) return '';
|
36022
|
+
if (context == 'value') return _getCountryFlag(opt) || '';
|
36023
|
+
var countryCallingCode = _getCountryCallingCode(opt);
|
36024
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Option, null, _getCountryFlag(opt), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_4__.Label, {
|
36025
|
+
variant: "sm",
|
36026
|
+
color: "gray_11_25",
|
36027
|
+
no_wrap: true
|
36028
|
+
}, _getCountryLabel(opt)), !!countryCallingCode && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_4__.Label, {
|
36029
|
+
variant: "sm",
|
36030
|
+
color: "gray_9"
|
36031
|
+
}, "+", countryCallingCode));
|
36032
|
+
}, [_getCountryLabel, _getCountryCallingCode, _getCountryFlag]);
|
36033
|
+
var filterOption = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (_ref3, inputValue) {
|
36034
|
+
var opt = _ref3.data;
|
36035
|
+
return _filterCountry(opt, inputValue);
|
36036
|
+
}, [_filterCountry]);
|
36037
|
+
var setFocus = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
36038
|
+
return setTimeout(function () {
|
36039
|
+
var _searchInputRef$curre;
|
36040
|
+
return (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.focus();
|
36041
|
+
}, 0);
|
36042
|
+
}, []);
|
36043
|
+
var handleBlur = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (event) {
|
36044
|
+
var _onInputBlurRef$curre;
|
36045
|
+
return (_onInputBlurRef$curre = onInputBlurRef.current) === null || _onInputBlurRef$curre === void 0 ? void 0 : _onInputBlurRef$curre.call(onInputBlurRef, event);
|
36046
|
+
}, []);
|
36047
|
+
var handleClose = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
36048
|
+
setTimeout(function () {
|
36049
|
+
var _inputRef$current;
|
36050
|
+
return (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.blur();
|
36051
|
+
}, 0);
|
36052
|
+
onMenuClose === null || onMenuClose === void 0 || onMenuClose();
|
36053
|
+
}, [onMenuClose]);
|
36054
|
+
var MenuListComponent = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36055
|
+
var MenuListC = function MenuListC(rest) {
|
36056
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuList, _extends({}, rest, {
|
36057
|
+
searchInputRef: searchInputRef,
|
36058
|
+
onInputBlur: handleBlur,
|
36059
|
+
filterOption: filterOption
|
36060
|
+
}));
|
36061
|
+
};
|
36062
|
+
return MenuListC;
|
36063
|
+
}, [handleBlur, filterOption]);
|
36064
|
+
var InputComponent = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36065
|
+
var InputC = function InputC(_ref4) {
|
36066
|
+
var onBlur = _ref4.onBlur,
|
36067
|
+
rest = _objectWithoutProperties(_ref4, _excluded);
|
36068
|
+
(0,_util__WEBPACK_IMPORTED_MODULE_10__.useSetRefsEffect)(onBlur, [onInputBlurRef]);
|
36069
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Input, _extends({}, rest, {
|
36070
|
+
inputRef: inputRef
|
36071
|
+
}));
|
36072
|
+
};
|
36073
|
+
return InputC;
|
36074
|
+
}, []);
|
36075
|
+
var comps = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36076
|
+
return {
|
36077
|
+
IndicatorSeparator: null,
|
36078
|
+
DropdownIndicator: DropdownIndicator,
|
36079
|
+
Input: InputComponent,
|
36080
|
+
MenuList: MenuListComponent
|
36081
|
+
};
|
36082
|
+
}, [InputComponent, MenuListComponent]);
|
36083
|
+
var value = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36084
|
+
return countries.find(function (c) {
|
36085
|
+
return _getCountryValue(c) == country;
|
36086
|
+
});
|
36087
|
+
}, [countries, country, _getCountryValue]);
|
36088
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_select__WEBPACK_IMPORTED_MODULE_11__["default"], {
|
36089
|
+
options: countries,
|
36090
|
+
value: value,
|
36091
|
+
onChange: onChangeCountry,
|
36092
|
+
isDisabled: disabled,
|
36093
|
+
menuPortalTarget: document.body,
|
36094
|
+
styles: getStyles(size),
|
36095
|
+
formatOptionLabel: formatOptionLabel,
|
36096
|
+
placeholder: null,
|
36097
|
+
getOptionValue: _getCountryValue,
|
36098
|
+
getOptionLabel: _getCountryLabel,
|
36099
|
+
backspaceRemovesValue: false,
|
36100
|
+
onMenuOpen: setFocus,
|
36101
|
+
onMenuClose: handleClose,
|
36102
|
+
components: comps
|
36103
|
+
});
|
36104
|
+
};
|
36105
|
+
var EventTrap = function EventTrap(_ref5) {
|
36106
|
+
var children = _ref5.children;
|
36107
|
+
var eventTrap = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {
|
36108
|
+
e.preventDefault();
|
36109
|
+
e.stopPropagation();
|
36110
|
+
}, []);
|
36111
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
|
36112
|
+
onMouseDown: eventTrap,
|
36113
|
+
onClick: eventTrap
|
36114
|
+
}, children);
|
36115
|
+
};
|
36116
|
+
var DropdownIndicator = function DropdownIndicator(_ref6) {
|
36117
|
+
var selectProps = _ref6.selectProps,
|
36118
|
+
innerRef = _ref6.innerRef,
|
36119
|
+
innerProps = _ref6.innerProps,
|
36120
|
+
isDisabled = _ref6.isDisabled;
|
36121
|
+
var ic = _icons__WEBPACK_IMPORTED_MODULE_0__["default"][selectProps.menuIsOpen ? 'ChevronUp' : 'ChevronDown'];
|
36122
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
|
36123
|
+
ref: innerRef,
|
36124
|
+
width: "12px",
|
36125
|
+
height: "12px",
|
36126
|
+
viewBox: ic.viewBox,
|
36127
|
+
style: {
|
36128
|
+
color: color.gray_9,
|
36129
|
+
cursor: isDisabled ? 'default' : 'pointer'
|
36130
|
+
}
|
36131
|
+
}, innerProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("use", {
|
36132
|
+
href: "#".concat(ic.id)
|
36133
|
+
}));
|
36134
|
+
};
|
36135
|
+
var Input = function Input(_ref7) {
|
36136
|
+
var inputRef = _ref7.inputRef,
|
36137
|
+
innerRef = _ref7.innerRef,
|
36138
|
+
rest = _objectWithoutProperties(_ref7, _excluded2);
|
36139
|
+
var handleRef = (0,_util__WEBPACK_IMPORTED_MODULE_10__.useSetRefsCallback)([inputRef, innerRef]);
|
36140
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_select__WEBPACK_IMPORTED_MODULE_12__.c.Input, _extends({}, rest, {
|
36141
|
+
innerRef: handleRef,
|
36142
|
+
onBlur: null,
|
36143
|
+
value: "",
|
36144
|
+
readOnly: true
|
36145
|
+
}));
|
36146
|
+
};
|
36147
|
+
var MenuList = function MenuList(_ref8) {
|
36148
|
+
var searchInputRef = _ref8.searchInputRef,
|
36149
|
+
onInputBlur = _ref8.onInputBlur,
|
36150
|
+
children = _ref8.children,
|
36151
|
+
filterOption = _ref8.filterOption,
|
36152
|
+
rest = _objectWithoutProperties(_ref8, _excluded3);
|
36153
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
|
36154
|
+
_useState2 = _slicedToArray(_useState, 2),
|
36155
|
+
value = _useState2[0],
|
36156
|
+
setValue = _useState2[1];
|
36157
|
+
var filteredChildren = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36158
|
+
return Array.isArray(children) ? children.filter(function (i) {
|
36159
|
+
return filterOption(i.props, value);
|
36160
|
+
}) : children;
|
36161
|
+
}, [value, children, filterOption]);
|
36162
|
+
var hasChildren = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36163
|
+
return !Array.isArray(filteredChildren) || filteredChildren.length;
|
36164
|
+
}, [filteredChildren]);
|
36165
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_select__WEBPACK_IMPORTED_MODULE_12__.c.MenuList, rest, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(EventTrap, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(SearchContainer, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(SearchInput, {
|
36166
|
+
ref: searchInputRef,
|
36167
|
+
onBlur: onInputBlur,
|
36168
|
+
onChange: setValue
|
36169
|
+
})), hasChildren ? filteredChildren : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(NoOptionsMessage, rest, "No options")));
|
36170
|
+
};
|
36171
|
+
var SearchInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_ref9, ref) {
|
36172
|
+
var size = _ref9.size,
|
36173
|
+
disabled = _ref9.disabled,
|
36174
|
+
value = _ref9.value,
|
36175
|
+
onChange = _ref9.onChange,
|
36176
|
+
rest = _objectWithoutProperties(_ref9, _excluded4);
|
36177
|
+
var _useValue = (0,_util__WEBPACK_IMPORTED_MODULE_10__.useValue)(value),
|
36178
|
+
_useValue2 = _slicedToArray(_useValue, 2),
|
36179
|
+
val = _useValue2[0],
|
36180
|
+
setVal = _useValue2[1];
|
36181
|
+
var changeValue = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (v, e) {
|
36182
|
+
setVal(v);
|
36183
|
+
onChange === null || onChange === void 0 || onChange(v, e);
|
36184
|
+
}, [onChange]);
|
36185
|
+
var reset = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
36186
|
+
return changeValue('');
|
36187
|
+
}, [changeValue]);
|
36188
|
+
var SearchIcon = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36189
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_7__.Icon, {
|
36190
|
+
name: "Search",
|
36191
|
+
color: "gray_9",
|
36192
|
+
size: size == 'lg' ? 'sm' : 'xs'
|
36193
|
+
});
|
36194
|
+
}, [size]);
|
36195
|
+
var ClearButton = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36196
|
+
return !!val && !disabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_8__.IconButton, {
|
36197
|
+
variant: "ghost",
|
36198
|
+
icon: "Close",
|
36199
|
+
onClick: reset
|
36200
|
+
});
|
36201
|
+
}, [val, disabled, reset]);
|
36202
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_textbox__WEBPACK_IMPORTED_MODULE_9__.Textbox, _extends({}, rest, {
|
36203
|
+
size: size,
|
36204
|
+
disabled: disabled,
|
36205
|
+
fieldRef: ref,
|
36206
|
+
leftInnerContent: SearchIcon,
|
36207
|
+
rightInnerContent: ClearButton,
|
36208
|
+
value: val,
|
36209
|
+
onChange: changeValue
|
36210
|
+
}));
|
36211
|
+
});
|
36212
|
+
SearchInput.displayName = 'SearchInput';
|
36213
|
+
var NoOptionsMessage = function NoOptionsMessage(props) {
|
36214
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_select__WEBPACK_IMPORTED_MODULE_12__.c.NoOptionsMessage, props);
|
36215
|
+
};
|
36216
|
+
var SearchContainer = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
36217
|
+
displayName: "SearchContainer",
|
36218
|
+
componentId: "sc-7zi817-0"
|
36219
|
+
})(["padding:8px;"]);
|
36220
|
+
var Option = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
36221
|
+
displayName: "Option",
|
36222
|
+
componentId: "sc-7zi817-1"
|
36223
|
+
})(["display:flex;flex-direction:row;align-items:center;gap:4px;"]);
|
36224
|
+
var FlagWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
36225
|
+
displayName: "FlagWrapper",
|
36226
|
+
componentId: "sc-7zi817-2"
|
36227
|
+
})(["display:flex;align-items:center;width:18px;height:18px;"]);
|
36228
|
+
var getStyles = function getStyles(size) {
|
36229
|
+
return {
|
36230
|
+
control: function control(baseStyles, _ref10) {
|
36231
|
+
var isDisabled = _ref10.isDisabled;
|
36232
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
36233
|
+
width: '56px',
|
36234
|
+
minHeight: getHeight(size),
|
36235
|
+
padding: "4px 8px 4px 12px",
|
36236
|
+
/* Label/sm */
|
36237
|
+
fontFamily: font_family.sans,
|
36238
|
+
fontStyle: 'normal',
|
36239
|
+
fontWeight: font_weight.regular,
|
36240
|
+
fontSize: font_size.sm,
|
36241
|
+
lineHeight: line_height.none,
|
36242
|
+
color: isDisabled ? color.gray_9 : color.gray_11_50,
|
36243
|
+
backgroundColor: color.gray_2,
|
36244
|
+
borderColor: isDisabled ? color.gray_6 : color.gray_7,
|
36245
|
+
cursor: isDisabled ? 'default' : 'text',
|
36246
|
+
borderRight: '0 none',
|
36247
|
+
borderTopRightRadius: '0',
|
36248
|
+
borderBottomRightRadius: '0',
|
36249
|
+
boxShadow: undefined,
|
36250
|
+
'&:hover': undefined
|
36251
|
+
});
|
36252
|
+
},
|
36253
|
+
valueContainer: function valueContainer(baseStyles) {
|
36254
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
36255
|
+
padding: '0'
|
36256
|
+
});
|
36257
|
+
},
|
36258
|
+
menu: function menu(baseStyles) {
|
36259
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
36260
|
+
padding: 0,
|
36261
|
+
boxSizing: 'border-box',
|
36262
|
+
minWidth: '240px',
|
36263
|
+
width: 'fit-content',
|
36264
|
+
maxWidth: '540px',
|
36265
|
+
backgroundColor: color.white,
|
36266
|
+
borderRadius: '4px',
|
36267
|
+
boxShadow: _theme__WEBPACK_IMPORTED_MODULE_3__["default"].box_shadow.md
|
36268
|
+
});
|
36269
|
+
},
|
36270
|
+
menuPortal: function menuPortal(baseStyles) {
|
36271
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
36272
|
+
zIndex: _constants__WEBPACK_IMPORTED_MODULE_6__.Z_INDEX.dropdown
|
36273
|
+
});
|
36274
|
+
},
|
36275
|
+
option: function option(baseStyles, _ref11) {
|
36276
|
+
var selected = _ref11.selected;
|
36277
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
36278
|
+
backgroundColor: selected ? color.blue_3 : baseStyles.backgroundColor
|
36279
|
+
});
|
36280
|
+
}
|
36281
|
+
};
|
36282
|
+
};
|
36283
|
+
var getHeight = function getHeight(size) {
|
36284
|
+
var height = {
|
36285
|
+
sm: 36,
|
36286
|
+
md: 40,
|
36287
|
+
lg: 48
|
36288
|
+
};
|
36289
|
+
return (0,_utils__WEBPACK_IMPORTED_MODULE_5__.toPixel)(height[size] || height.sm);
|
36290
|
+
};
|
36291
|
+
var compareCountryString = function compareCountryString(optValue, inputValue) {
|
36292
|
+
return optValue === null || optValue === void 0 ? void 0 : optValue.toLowerCase().includes(inputValue.toLowerCase());
|
36293
|
+
};
|
36294
|
+
var useFunOrPropCb = function useFunOrPropCb(propName, fun) {
|
36295
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (obj) {
|
36296
|
+
return typeof fun == 'function' ? fun(obj) : obj[propName];
|
36297
|
+
}, [fun]);
|
36298
|
+
};
|
36299
|
+
|
36300
|
+
/***/ }),
|
36301
|
+
|
36302
|
+
/***/ "./src/input/phone/index.js":
|
36303
|
+
/*!**********************************!*\
|
36304
|
+
!*** ./src/input/phone/index.js ***!
|
36305
|
+
\**********************************/
|
36306
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
36307
|
+
|
36308
|
+
"use strict";
|
36309
|
+
__webpack_require__.r(__webpack_exports__);
|
36310
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
36311
|
+
/* harmony export */ Phone: () => (/* reexport safe */ _phone__WEBPACK_IMPORTED_MODULE_0__.Phone)
|
36312
|
+
/* harmony export */ });
|
36313
|
+
/* harmony import */ var _phone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./phone */ "./src/input/phone/phone.js");
|
36314
|
+
// LICENSE_CODE ZON
|
36315
|
+
|
36316
|
+
|
36317
|
+
/*jslint react:true*/
|
36318
|
+
|
36319
|
+
|
36320
|
+
/***/ }),
|
36321
|
+
|
36322
|
+
/***/ "./src/input/phone/phone.js":
|
36323
|
+
/*!**********************************!*\
|
36324
|
+
!*** ./src/input/phone/phone.js ***!
|
36325
|
+
\**********************************/
|
36326
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
36327
|
+
|
36328
|
+
"use strict";
|
36329
|
+
__webpack_require__.r(__webpack_exports__);
|
36330
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
36331
|
+
/* harmony export */ Phone: () => (/* binding */ Phone)
|
36332
|
+
/* harmony export */ });
|
36333
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
36334
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
36335
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types");
|
36336
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
36337
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
|
36338
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
|
36339
|
+
/* harmony import */ var _translation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../translation */ "./src/translation.js");
|
36340
|
+
/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../shared */ "./src/input/shared.js");
|
36341
|
+
/* harmony import */ var _country_select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./country_select */ "./src/input/phone/country_select.js");
|
36342
|
+
// LICENSE_CODE ZON
|
36343
|
+
|
36344
|
+
|
36345
|
+
/*jslint react:true*/
|
36346
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
36347
|
+
var _excluded = ["size", "value", "onChange", "placeholder", "countries", "maxLength", "inputProps", "disabled", "defaultCountry", "parsePhoneNumber", "getCountryValue", "getCountryLabel", "getCountryCallingCode", "getCountryFlag", "filterCountry"],
|
36348
|
+
_excluded2 = ["value", "parsePhoneNumber"];
|
36349
|
+
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); }
|
36350
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
36351
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
36352
|
+
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; }
|
36353
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
36354
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
36355
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
36356
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
36357
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
36358
|
+
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; }
|
36359
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
36360
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
36361
|
+
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; }
|
36362
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
36363
|
+
|
36364
|
+
|
36365
|
+
|
36366
|
+
|
36367
|
+
|
36368
|
+
|
36369
|
+
var noop = function noop() {};
|
36370
|
+
var Phone = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref, ref) {
|
36371
|
+
var _ref$size = _ref.size,
|
36372
|
+
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
36373
|
+
value = _ref.value,
|
36374
|
+
onChange = _ref.onChange,
|
36375
|
+
placeholder = _ref.placeholder,
|
36376
|
+
_ref$countries = _ref.countries,
|
36377
|
+
countries = _ref$countries === void 0 ? [] : _ref$countries,
|
36378
|
+
_ref$maxLength = _ref.maxLength,
|
36379
|
+
maxLength = _ref$maxLength === void 0 ? 20 : _ref$maxLength,
|
36380
|
+
inputProps = _ref.inputProps,
|
36381
|
+
disabled = _ref.disabled,
|
36382
|
+
_ref$defaultCountry = _ref.defaultCountry,
|
36383
|
+
defaultCountry = _ref$defaultCountry === void 0 ? 'US' : _ref$defaultCountry,
|
36384
|
+
_ref$parsePhoneNumber = _ref.parsePhoneNumber,
|
36385
|
+
parsePhoneNumber = _ref$parsePhoneNumber === void 0 ? noop : _ref$parsePhoneNumber,
|
36386
|
+
getCountryValue = _ref.getCountryValue,
|
36387
|
+
getCountryLabel = _ref.getCountryLabel,
|
36388
|
+
getCountryCallingCode = _ref.getCountryCallingCode,
|
36389
|
+
getCountryFlag = _ref.getCountryFlag,
|
36390
|
+
filterCountry = _ref.filterCountry,
|
36391
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
36392
|
+
var fieldRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
36393
|
+
var unmaskNumber = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
36394
|
+
var number = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
36395
|
+
var unmasked = number;
|
36396
|
+
var parsed = parsePhoneNumber(number);
|
36397
|
+
if (parsed) {
|
36398
|
+
var code = "+".concat(parsed.callingCode);
|
36399
|
+
unmasked = "".concat(code).concat(number.replace(code, '').trim());
|
36400
|
+
}
|
36401
|
+
var char2dig = '22233344455566677778889999';
|
36402
|
+
unmasked = unmasked.replace(/[a-z]/ig, function (c) {
|
36403
|
+
return char2dig[c.charCodeAt(0) - 97];
|
36404
|
+
});
|
36405
|
+
return unmasked.replace(/[^+0-9()-\s]/g, '');
|
36406
|
+
}, [parsePhoneNumber]);
|
36407
|
+
var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
|
36408
|
+
var _e$target;
|
36409
|
+
onChange === null || onChange === void 0 || onChange(unmaskNumber((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value), e);
|
36410
|
+
}, [unmaskNumber, onChange]);
|
36411
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultCountry),
|
36412
|
+
_useState2 = _slicedToArray(_useState, 2),
|
36413
|
+
country = _useState2[0],
|
36414
|
+
setCountry = _useState2[1];
|
36415
|
+
var onChangeCountry = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (v) {
|
36416
|
+
if (!v) return setCountry(null);
|
36417
|
+
var number = value || '';
|
36418
|
+
var newCode = typeof getCountryCallingCode == 'function' ? getCountryCallingCode(v) : v.callingCode;
|
36419
|
+
if (newCode && !number.startsWith("+".concat(newCode))) {
|
36420
|
+
var parsed = parsePhoneNumber(number);
|
36421
|
+
var oldCode = parsed === null || parsed === void 0 ? void 0 : parsed.callingCode;
|
36422
|
+
var repl = oldCode ? "+".concat(oldCode) : number.startsWith('+') ? '+' : '';
|
36423
|
+
number = repl ? number.replace(repl, "+".concat(newCode)) : "+".concat(newCode).concat(number);
|
36424
|
+
onChange === null || onChange === void 0 || onChange(number, {});
|
36425
|
+
}
|
36426
|
+
setCountry(v.value);
|
36427
|
+
}, [value, parsePhoneNumber, getCountryCallingCode, onChange]);
|
36428
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
36429
|
+
var _parsePhoneNumber;
|
36430
|
+
if (value) setCountry(((_parsePhoneNumber = parsePhoneNumber(value)) === null || _parsePhoneNumber === void 0 ? void 0 : _parsePhoneNumber.country) || null);
|
36431
|
+
}, [value, parsePhoneNumber]);
|
36432
|
+
var heightCalculationCallback = (0,_shared__WEBPACK_IMPORTED_MODULE_4__.useHeightCalculationCallback)(size);
|
36433
|
+
var t = (0,_translation__WEBPACK_IMPORTED_MODULE_3__.useTranslate)();
|
36434
|
+
var handleMenuClose = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
36435
|
+
var _fieldRef$current;
|
36436
|
+
return (_fieldRef$current = fieldRef.current) === null || _fieldRef$current === void 0 ? void 0 : _fieldRef$current.focus();
|
36437
|
+
}, []);
|
36438
|
+
var selectProps = {
|
36439
|
+
countries: countries,
|
36440
|
+
country: country,
|
36441
|
+
onChangeCountry: onChangeCountry,
|
36442
|
+
size: size,
|
36443
|
+
disabled: disabled,
|
36444
|
+
getCountryValue: getCountryValue,
|
36445
|
+
getCountryLabel: getCountryLabel,
|
36446
|
+
getCountryCallingCode: getCountryCallingCode,
|
36447
|
+
getCountryFlag: getCountryFlag,
|
36448
|
+
filterCountry: filterCountry,
|
36449
|
+
onMenuClose: handleMenuClose
|
36450
|
+
};
|
36451
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_4__.FieldWrapper, _extends({}, rest, {
|
36452
|
+
ref: ref,
|
36453
|
+
heightCalculationCallback: heightCalculationCallback,
|
36454
|
+
autofocus: false,
|
36455
|
+
autoresize: false,
|
36456
|
+
verticalAlign: "center",
|
36457
|
+
Field: PhoneField,
|
36458
|
+
fieldRef: fieldRef,
|
36459
|
+
disabled: disabled,
|
36460
|
+
value: value,
|
36461
|
+
onChange: handleChange,
|
36462
|
+
placeholder: t(placeholder),
|
36463
|
+
inputProps: _objectSpread(_objectSpread({}, inputProps), {}, {
|
36464
|
+
maxLength: maxLength,
|
36465
|
+
parsePhoneNumber: parsePhoneNumber
|
36466
|
+
}),
|
36467
|
+
leftOuterContent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_country_select__WEBPACK_IMPORTED_MODULE_5__.CountrySelect, selectProps)
|
36468
|
+
}));
|
36469
|
+
});
|
36470
|
+
Phone.displayName = 'Phone';
|
36471
|
+
Phone.propTypes = {
|
36472
|
+
value: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
36473
|
+
onChange: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36474
|
+
onFocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36475
|
+
onBlur: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36476
|
+
placeholder: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
36477
|
+
disabled: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
36478
|
+
required: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
36479
|
+
necessityIndicator: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['asterisk', 'text']),
|
36480
|
+
invalid: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
36481
|
+
leftInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36482
|
+
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36483
|
+
rightInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36484
|
+
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36485
|
+
label: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36486
|
+
labelIcon: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
36487
|
+
labelTooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36488
|
+
helperText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36489
|
+
inputProps: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
|
36490
|
+
size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'sm', 'md', 'lg']),
|
36491
|
+
autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
36492
|
+
maxLength: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
|
36493
|
+
defaultCountry: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
36494
|
+
parsePhoneNumber: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func).isRequired,
|
36495
|
+
getCountryValue: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36496
|
+
getCountryLabel: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36497
|
+
getCountryCallingCode: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36498
|
+
getCountryFlag: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36499
|
+
filterCountry: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36500
|
+
countries: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().array)
|
36501
|
+
};
|
36502
|
+
var PhoneField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref2, ref) {
|
36503
|
+
var value = _ref2.value,
|
36504
|
+
parsePhoneNumber = _ref2.parsePhoneNumber,
|
36505
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
36506
|
+
var phoneNumber = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
36507
|
+
return parsePhoneNumber(value || '');
|
36508
|
+
}, [value, parsePhoneNumber]);
|
36509
|
+
var formatted = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
36510
|
+
return phoneNumber && phoneNumber.formattedOutput || value;
|
36511
|
+
}, [phoneNumber, value]);
|
36512
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TelInput, _extends({}, rest, {
|
36513
|
+
ref: ref,
|
36514
|
+
value: formatted
|
36515
|
+
}));
|
36516
|
+
});
|
36517
|
+
PhoneField.displayName = 'PhoneField';
|
36518
|
+
var TelInput = styled_components__WEBPACK_IMPORTED_MODULE_2___default().input.attrs({
|
36519
|
+
type: 'tel'
|
36520
|
+
}).withConfig({
|
36521
|
+
displayName: "TelInput",
|
36522
|
+
componentId: "sc-ommqlh-0"
|
36523
|
+
})(["padding:0;outline:none;border:0;width:100%;color:inherit;background:inherit;"]);
|
36524
|
+
|
36525
|
+
/***/ }),
|
36526
|
+
|
35909
36527
|
/***/ "./src/input/radio_group.js":
|
35910
36528
|
/*!**********************************!*\
|
35911
36529
|
!*** ./src/input/radio_group.js ***!
|
@@ -36191,7 +36809,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
36191
36809
|
|
36192
36810
|
/*jslint react:true*/
|
36193
36811
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
36194
|
-
var _excluded = ["id", "value", "leftInnerContent", "leftOuterContent", "rightInnerContent", "rightOuterContent", "heightCalculationCallback", "Field", "onChange", "onFocus", "onBlur", "placeholder", "disabled", "invalid", "autofocus", "helperText", "label", "labelIcon", "labelTooltip", "required", "necessityIndicator", "autoresize", "verticalAlign", "innerWrapper"];
|
36812
|
+
var _excluded = ["id", "value", "leftInnerContent", "leftOuterContent", "rightInnerContent", "rightOuterContent", "heightCalculationCallback", "Field", "fieldRef", "onChange", "onFocus", "onBlur", "placeholder", "disabled", "invalid", "autofocus", "helperText", "label", "labelIcon", "labelTooltip", "required", "necessityIndicator", "autoresize", "verticalAlign", "innerWrapper"];
|
36195
36813
|
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; }
|
36196
36814
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
36197
36815
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
@@ -36227,6 +36845,7 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
|
|
36227
36845
|
rightOuterContent = props.rightOuterContent,
|
36228
36846
|
heightCalculationCallback = props.heightCalculationCallback,
|
36229
36847
|
Field = props.Field,
|
36848
|
+
fieldRef = props.fieldRef,
|
36230
36849
|
onChange = props.onChange,
|
36231
36850
|
onFocus = props.onFocus,
|
36232
36851
|
onBlur = props.onBlur,
|
@@ -36245,6 +36864,7 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
|
|
36245
36864
|
innerWrapper = props.innerWrapper,
|
36246
36865
|
rest = _objectWithoutProperties(props, _excluded);
|
36247
36866
|
var field = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
36867
|
+
var setFieldRefs = (0,_util__WEBPACK_IMPORTED_MODULE_10__.useSetRefsCallback)([fieldRef, field]);
|
36248
36868
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(),
|
36249
36869
|
_useState2 = _slicedToArray(_useState, 2),
|
36250
36870
|
active = _useState2[0],
|
@@ -36295,7 +36915,7 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
|
|
36295
36915
|
$verticalAlign: verticalAlign,
|
36296
36916
|
onClick: onWrapperClick
|
36297
36917
|
}, leftInnerContent, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Field, _extends({}, props.inputProps, {
|
36298
|
-
ref:
|
36918
|
+
ref: setFieldRefs,
|
36299
36919
|
id: id,
|
36300
36920
|
disabled: disabled,
|
36301
36921
|
onChange: onChange,
|
@@ -36309,9 +36929,6 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
|
|
36309
36929
|
}, helperText));
|
36310
36930
|
});
|
36311
36931
|
FieldWrapper.displayName = 'FieldWrapper';
|
36312
|
-
FieldWrapper.defaultProps = {
|
36313
|
-
size: 'md'
|
36314
|
-
};
|
36315
36932
|
FieldWrapper.propTypes = {
|
36316
36933
|
value: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().any),
|
36317
36934
|
onChange: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
@@ -36329,7 +36946,16 @@ FieldWrapper.propTypes = {
|
|
36329
36946
|
labelTooltip: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36330
36947
|
helperText: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36331
36948
|
inputProps: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
36332
|
-
Field: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().elementType)
|
36949
|
+
Field: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().elementType),
|
36950
|
+
fieldRef: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
36951
|
+
current: prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Element)
|
36952
|
+
})]),
|
36953
|
+
required: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
36954
|
+
necessityIndicator: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['asterisk', 'text']),
|
36955
|
+
autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
36956
|
+
heightCalculationCallback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
36957
|
+
autoresize: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
36958
|
+
verticalAlign: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
|
36333
36959
|
};
|
36334
36960
|
FieldWrapper.displayName = 'FieldWrapper';
|
36335
36961
|
var Field = styled_components__WEBPACK_IMPORTED_MODULE_2___default().input.withConfig({
|
@@ -36417,11 +37043,11 @@ var Asterisk = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typogra
|
|
36417
37043
|
var LeftOuterContentWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
36418
37044
|
displayName: "LeftOuterContentWrapper",
|
36419
37045
|
componentId: "sc-r60v1b-4"
|
36420
|
-
})(["border-top-left-radius:4px;border-bottom-left-radius:4px;
|
37046
|
+
})(["border-top-left-radius:4px;border-bottom-left-radius:4px;height:100%;"]);
|
36421
37047
|
var RightOuterContentWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
36422
37048
|
displayName: "RightOuterContentWrapper",
|
36423
37049
|
componentId: "sc-r60v1b-5"
|
36424
|
-
})(["border-top-right-radius:4px;border-bottom-right-radius:4px;
|
37050
|
+
})(["border-top-right-radius:4px;border-bottom-right-radius:4px;height:100%;"]);
|
36425
37051
|
var InputContentWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex).withConfig({
|
36426
37052
|
displayName: "InputContentWrapper",
|
36427
37053
|
componentId: "sc-r60v1b-6"
|
@@ -36431,26 +37057,16 @@ var InputContentWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default
|
|
36431
37057
|
var InputWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
36432
37058
|
displayName: "InputWrapper",
|
36433
37059
|
componentId: "sc-r60v1b-7"
|
36434
|
-
})(["position:relative;width:100%;border:1px solid;border-radius:4px;box-sizing:border-box;font-family:", ";padding:", "px ", "px;overflow:auto;display:flex;gap:8px;align-items:", ";", " ", " ", ""], _theme__WEBPACK_IMPORTED_MODULE_6__["default"].font_family.sans, inputVerticalPadding, inputHorizontalPadding, function (props) {
|
37060
|
+
})(["position:relative;width:100%;border:1px solid;border-radius:4px;box-sizing:border-box;font-family:", ";padding:", "px ", "px;overflow:auto;display:flex;gap:8px;align-items:", ";border-left-width:1px;border-right-width:1px;border-top-left-radius:", ";border-bottom-left-radius:", ";border-top-right-radius:", ";border-bottom-right-radius:", ";", " ", ""], _theme__WEBPACK_IMPORTED_MODULE_6__["default"].font_family.sans, inputVerticalPadding, inputHorizontalPadding, function (props) {
|
36435
37061
|
return props.$verticalAlign;
|
36436
37062
|
}, function (props) {
|
36437
|
-
|
36438
|
-
|
36439
|
-
|
36440
|
-
|
36441
|
-
|
36442
|
-
|
36443
|
-
|
36444
|
-
var borderRightWidth = 1;
|
36445
|
-
if ($leftOuterContent) {
|
36446
|
-
borderTopLeftRadius = borderBottomLeftRadius = 0;
|
36447
|
-
borderLeftWidth = 0;
|
36448
|
-
}
|
36449
|
-
if ($rightOuterContent) {
|
36450
|
-
borderTopRightRadius = borderBottomRightRadius = 0;
|
36451
|
-
borderRightWidth = 0;
|
36452
|
-
}
|
36453
|
-
return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["border-left-width:", ";border-right-width:", ";border-top-left-radius:", ";border-bottom-left-radius:", ";border-top-right-radius:", ";border-bottom-right-radius:", ";"], (0,_utils__WEBPACK_IMPORTED_MODULE_11__.toPixel)(borderLeftWidth), (0,_utils__WEBPACK_IMPORTED_MODULE_11__.toPixel)(borderRightWidth), (0,_utils__WEBPACK_IMPORTED_MODULE_11__.toPixel)(borderTopLeftRadius), (0,_utils__WEBPACK_IMPORTED_MODULE_11__.toPixel)(borderBottomLeftRadius), (0,_utils__WEBPACK_IMPORTED_MODULE_11__.toPixel)(borderTopRightRadius), (0,_utils__WEBPACK_IMPORTED_MODULE_11__.toPixel)(borderBottomRightRadius));
|
37063
|
+
return props.$leftOuterContent ? '0' : '4px';
|
37064
|
+
}, function (props) {
|
37065
|
+
return props.$leftOuterContent ? '0' : '4px';
|
37066
|
+
}, function (props) {
|
37067
|
+
return props.$rightOuterContent ? '0' : '4px';
|
37068
|
+
}, function (props) {
|
37069
|
+
return props.$rightOuterContent ? '0' : '4px';
|
36454
37070
|
}, function (props) {
|
36455
37071
|
var _props$$heightCalcula;
|
36456
37072
|
return (_props$$heightCalcula = props.$heightCalculationCallback) === null || _props$$heightCalcula === void 0 ? void 0 : _props$$heightCalcula.call(props);
|
@@ -36529,7 +37145,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
36529
37145
|
|
36530
37146
|
|
36531
37147
|
/*jslint react:true*/
|
37148
|
+
var _excluded = ["onChange", "rows", "maxRows", "placeholder"];
|
36532
37149
|
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); }
|
37150
|
+
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; }
|
37151
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
36533
37152
|
|
36534
37153
|
|
36535
37154
|
|
@@ -36537,11 +37156,13 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
36537
37156
|
|
36538
37157
|
|
36539
37158
|
|
36540
|
-
var Textarea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (
|
36541
|
-
var onChange =
|
36542
|
-
rows =
|
36543
|
-
|
36544
|
-
|
37159
|
+
var Textarea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_ref, ref) {
|
37160
|
+
var onChange = _ref.onChange,
|
37161
|
+
_ref$rows = _ref.rows,
|
37162
|
+
rows = _ref$rows === void 0 ? 1 : _ref$rows,
|
37163
|
+
maxRows = _ref.maxRows,
|
37164
|
+
placeholder = _ref.placeholder,
|
37165
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
36545
37166
|
var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {
|
36546
37167
|
onChange === null || onChange === void 0 || onChange(e.target.value, e);
|
36547
37168
|
}, [onChange]);
|
@@ -36553,9 +37174,8 @@ var Textarea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forward
|
|
36553
37174
|
return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["min-height:", ";max-height:", ";height:", ";"], (0,_utils__WEBPACK_IMPORTED_MODULE_5__.toPixel)(minHeight), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.toPixel)(maxHeight), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.toPixel)(height));
|
36554
37175
|
}, [rows, maxRows]);
|
36555
37176
|
var t = (0,_translation__WEBPACK_IMPORTED_MODULE_4__.useTranslate)();
|
36556
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_6__.FieldWrapper, _extends({
|
36557
|
-
ref: ref
|
36558
|
-
}, props, {
|
37177
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_6__.FieldWrapper, _extends({}, rest, {
|
37178
|
+
ref: ref,
|
36559
37179
|
autoresize: true,
|
36560
37180
|
verticalAlign: "flex-start",
|
36561
37181
|
heightCalculationCallback: heightCalculationCallback,
|
@@ -36575,17 +37195,20 @@ Textarea.propTypes = {
|
|
36575
37195
|
necessityIndicator: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['asterisk', 'text']),
|
36576
37196
|
invalid: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
36577
37197
|
leftInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36578
|
-
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().
|
37198
|
+
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36579
37199
|
rightInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36580
|
-
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().
|
37200
|
+
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36581
37201
|
label: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36582
37202
|
labelIcon: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
36583
37203
|
labelTooltip: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36584
37204
|
helperText: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36585
|
-
|
36586
|
-
|
36587
|
-
|
36588
|
-
|
37205
|
+
inputProps: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
37206
|
+
fieldRef: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
37207
|
+
current: prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Element)
|
37208
|
+
})]),
|
37209
|
+
autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
37210
|
+
rows: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
37211
|
+
maxRows: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
36589
37212
|
};
|
36590
37213
|
Textarea.displayName = 'Textarea';
|
36591
37214
|
var Area = styled_components__WEBPACK_IMPORTED_MODULE_2___default().textarea.withConfig({
|
@@ -36616,21 +37239,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
36616
37239
|
|
36617
37240
|
|
36618
37241
|
/*jslint react:true*/
|
37242
|
+
var _excluded = ["size", "onChange", "placeholder"];
|
36619
37243
|
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); }
|
37244
|
+
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; }
|
37245
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
36620
37246
|
|
36621
37247
|
|
36622
37248
|
|
36623
37249
|
|
36624
|
-
var Textbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (
|
36625
|
-
var size =
|
36626
|
-
onChange =
|
36627
|
-
placeholder =
|
37250
|
+
var Textbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref, ref) {
|
37251
|
+
var size = _ref.size,
|
37252
|
+
onChange = _ref.onChange,
|
37253
|
+
placeholder = _ref.placeholder,
|
37254
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
36628
37255
|
var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
|
36629
|
-
onChange === null || onChange === void 0
|
37256
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value, e);
|
36630
37257
|
}, [onChange]);
|
36631
37258
|
var heightCalculationCallback = (0,_shared__WEBPACK_IMPORTED_MODULE_3__.useHeightCalculationCallback)(size);
|
36632
37259
|
var t = (0,_translation__WEBPACK_IMPORTED_MODULE_2__.useTranslate)();
|
36633
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_3__.FieldWrapper, _extends({},
|
37260
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_3__.FieldWrapper, _extends({}, rest, {
|
36634
37261
|
ref: ref,
|
36635
37262
|
heightCalculationCallback: heightCalculationCallback,
|
36636
37263
|
autoresize: false,
|
@@ -36651,18 +37278,19 @@ Textbox.propTypes = {
|
|
36651
37278
|
necessityIndicator: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['asterisk', 'text']),
|
36652
37279
|
invalid: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
36653
37280
|
leftInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36654
|
-
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().
|
37281
|
+
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36655
37282
|
rightInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36656
|
-
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().
|
37283
|
+
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36657
37284
|
label: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36658
37285
|
labelIcon: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
36659
37286
|
labelTooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36660
37287
|
helperText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
37288
|
+
inputProps: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
|
36661
37289
|
size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'sm', 'md', 'lg']),
|
36662
|
-
autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool)
|
36663
|
-
|
36664
|
-
|
36665
|
-
|
37290
|
+
autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
37291
|
+
fieldRef: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().func), prop_types__WEBPACK_IMPORTED_MODULE_1___default().shape({
|
37292
|
+
current: prop_types__WEBPACK_IMPORTED_MODULE_1___default().instanceOf(Element)
|
37293
|
+
})])
|
36666
37294
|
};
|
36667
37295
|
Textbox.displayName = 'Textbox';
|
36668
37296
|
|
@@ -44704,7 +45332,7 @@ var getStyleProps = function getStyleProps(props, name, classNamesState) {
|
|
44704
45332
|
__webpack_require__.r(__webpack_exports__);
|
44705
45333
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
44706
45334
|
/* harmony export */ OFFSET: () => (/* reexport safe */ _getters__WEBPACK_IMPORTED_MODULE_6__.OFFSET),
|
44707
|
-
/* harmony export */ VirtualizedListFactory: () => (/* reexport safe */
|
45335
|
+
/* harmony export */ VirtualizedListFactory: () => (/* reexport safe */ _virtualized_list__WEBPACK_IMPORTED_MODULE_12__.VirtualizedListFactory),
|
44708
45336
|
/* harmony export */ classNames: () => (/* reexport safe */ _class_names__WEBPACK_IMPORTED_MODULE_0__.classNames),
|
44709
45337
|
/* harmony export */ firstDefined: () => (/* reexport safe */ _first_defined__WEBPACK_IMPORTED_MODULE_1__.firstDefined),
|
44710
45338
|
/* harmony export */ flexRender: () => (/* reexport safe */ _flex_renderer__WEBPACK_IMPORTED_MODULE_2__.flexRender),
|
@@ -44719,10 +45347,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
44719
45347
|
/* harmony export */ getScrollIndex: () => (/* reexport safe */ _getters__WEBPACK_IMPORTED_MODULE_6__.getScrollIndex),
|
44720
45348
|
/* harmony export */ getStyleProps: () => (/* reexport safe */ _getters__WEBPACK_IMPORTED_MODULE_6__.getStyleProps),
|
44721
45349
|
/* harmony export */ isGroupHeader: () => (/* reexport safe */ _getters__WEBPACK_IMPORTED_MODULE_6__.isGroupHeader),
|
44722
|
-
/* harmony export */ mergeRefs: () => (/* reexport safe */
|
44723
|
-
/* harmony export */
|
44724
|
-
/* harmony export */
|
44725
|
-
/* harmony export */
|
45350
|
+
/* harmony export */ mergeRefs: () => (/* reexport safe */ _merge_refs__WEBPACK_IMPORTED_MODULE_8__.mergeRefs),
|
45351
|
+
/* harmony export */ setRef: () => (/* reexport safe */ _set_ref__WEBPACK_IMPORTED_MODULE_7__.setRef),
|
45352
|
+
/* harmony export */ setRefs: () => (/* reexport safe */ _set_ref__WEBPACK_IMPORTED_MODULE_7__.setRefs),
|
45353
|
+
/* harmony export */ splitProps: () => (/* reexport safe */ _split_props__WEBPACK_IMPORTED_MODULE_9__.splitProps),
|
45354
|
+
/* harmony export */ tooltipPlacement: () => (/* reexport safe */ _tooltip_placement__WEBPACK_IMPORTED_MODULE_10__.tooltipPlacement),
|
45355
|
+
/* harmony export */ useSetRefsCallback: () => (/* reexport safe */ _set_ref__WEBPACK_IMPORTED_MODULE_7__.useSetRefsCallback),
|
45356
|
+
/* harmony export */ useSetRefsEffect: () => (/* reexport safe */ _set_ref__WEBPACK_IMPORTED_MODULE_7__.useSetRefsEffect),
|
45357
|
+
/* harmony export */ useValue: () => (/* reexport safe */ _use_value__WEBPACK_IMPORTED_MODULE_11__.useValue),
|
45358
|
+
/* harmony export */ withUserStyles: () => (/* reexport safe */ _with_user_styles__WEBPACK_IMPORTED_MODULE_13__.withUserStyles)
|
44726
45359
|
/* harmony export */ });
|
44727
45360
|
/* harmony import */ var _class_names__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./class_names */ "./src/util/class_names.js");
|
44728
45361
|
/* harmony import */ var _first_defined__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./first_defined */ "./src/util/first_defined.js");
|
@@ -44731,11 +45364,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
44731
45364
|
/* harmony import */ var _get_button_size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./get_button_size */ "./src/util/get_button_size.js");
|
44732
45365
|
/* harmony import */ var _get_props__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./get_props */ "./src/util/get_props.js");
|
44733
45366
|
/* harmony import */ var _getters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./getters */ "./src/util/getters.js");
|
44734
|
-
/* harmony import */ var
|
44735
|
-
/* harmony import */ var
|
44736
|
-
/* harmony import */ var
|
44737
|
-
/* harmony import */ var
|
44738
|
-
/* harmony import */ var
|
45367
|
+
/* harmony import */ var _set_ref__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./set_ref */ "./src/util/set_ref.js");
|
45368
|
+
/* harmony import */ var _merge_refs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./merge_refs */ "./src/util/merge_refs.js");
|
45369
|
+
/* harmony import */ var _split_props__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./split_props */ "./src/util/split_props.js");
|
45370
|
+
/* harmony import */ var _tooltip_placement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./tooltip_placement */ "./src/util/tooltip_placement.js");
|
45371
|
+
/* harmony import */ var _use_value__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./use_value */ "./src/util/use_value.js");
|
45372
|
+
/* harmony import */ var _virtualized_list__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./virtualized_list */ "./src/util/virtualized_list.js");
|
45373
|
+
/* harmony import */ var _with_user_styles__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./with_user_styles */ "./src/util/with_user_styles.js");
|
44739
45374
|
// LICENSE_CODE ZON
|
44740
45375
|
|
44741
45376
|
|
@@ -44753,6 +45388,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
44753
45388
|
|
44754
45389
|
|
44755
45390
|
|
45391
|
+
|
45392
|
+
|
44756
45393
|
/***/ }),
|
44757
45394
|
|
44758
45395
|
/***/ "./src/util/merge_refs.js":
|
@@ -44790,6 +45427,55 @@ var mergeRefs = function mergeRefs() {
|
|
44790
45427
|
|
44791
45428
|
/***/ }),
|
44792
45429
|
|
45430
|
+
/***/ "./src/util/set_ref.js":
|
45431
|
+
/*!*****************************!*\
|
45432
|
+
!*** ./src/util/set_ref.js ***!
|
45433
|
+
\*****************************/
|
45434
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
45435
|
+
|
45436
|
+
"use strict";
|
45437
|
+
__webpack_require__.r(__webpack_exports__);
|
45438
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
45439
|
+
/* harmony export */ setRef: () => (/* binding */ setRef),
|
45440
|
+
/* harmony export */ setRefs: () => (/* binding */ setRefs),
|
45441
|
+
/* harmony export */ useSetRefsCallback: () => (/* binding */ useSetRefsCallback),
|
45442
|
+
/* harmony export */ useSetRefsEffect: () => (/* binding */ useSetRefsEffect)
|
45443
|
+
/* harmony export */ });
|
45444
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
45445
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
45446
|
+
// LICENSE_CODE ZON
|
45447
|
+
|
45448
|
+
|
45449
|
+
/*jslint react:true*/
|
45450
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
45451
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
45452
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
45453
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
45454
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
45455
|
+
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; }
|
45456
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
45457
|
+
|
45458
|
+
var setRef = function setRef(instance, ref) {
|
45459
|
+
if (typeof ref == 'function') ref(instance);else if (_typeof(ref) == 'object') ref.current = instance;
|
45460
|
+
};
|
45461
|
+
var setRefs = function setRefs(instance, refs) {
|
45462
|
+
return refs.forEach(function (r) {
|
45463
|
+
return setRef(instance, r);
|
45464
|
+
});
|
45465
|
+
};
|
45466
|
+
var useSetRefsEffect = function useSetRefsEffect(instance, refs) {
|
45467
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
45468
|
+
return setRefs(instance, refs);
|
45469
|
+
}, [instance].concat(_toConsumableArray(refs)));
|
45470
|
+
};
|
45471
|
+
var useSetRefsCallback = function useSetRefsCallback(refs) {
|
45472
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (instance) {
|
45473
|
+
return setRefs(instance, refs);
|
45474
|
+
}, refs);
|
45475
|
+
};
|
45476
|
+
|
45477
|
+
/***/ }),
|
45478
|
+
|
44793
45479
|
/***/ "./src/util/split_props.js":
|
44794
45480
|
/*!*********************************!*\
|
44795
45481
|
!*** ./src/util/split_props.js ***!
|
@@ -44847,6 +45533,43 @@ var tooltipPlacement = function () {
|
|
44847
45533
|
|
44848
45534
|
/***/ }),
|
44849
45535
|
|
45536
|
+
/***/ "./src/util/use_value.js":
|
45537
|
+
/*!*******************************!*\
|
45538
|
+
!*** ./src/util/use_value.js ***!
|
45539
|
+
\*******************************/
|
45540
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
45541
|
+
|
45542
|
+
"use strict";
|
45543
|
+
__webpack_require__.r(__webpack_exports__);
|
45544
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
45545
|
+
/* harmony export */ useValue: () => (/* binding */ useValue)
|
45546
|
+
/* harmony export */ });
|
45547
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
45548
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
45549
|
+
// LICENSE_CODE ZON
|
45550
|
+
|
45551
|
+
|
45552
|
+
/*jslint react:true*/
|
45553
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
45554
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
45555
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
45556
|
+
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; }
|
45557
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
45558
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
45559
|
+
|
45560
|
+
var useValue = function useValue(value) {
|
45561
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(value),
|
45562
|
+
_useState2 = _slicedToArray(_useState, 2),
|
45563
|
+
val = _useState2[0],
|
45564
|
+
setVal = _useState2[1];
|
45565
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
45566
|
+
return setVal(value);
|
45567
|
+
}, [value]);
|
45568
|
+
return [val, setVal];
|
45569
|
+
};
|
45570
|
+
|
45571
|
+
/***/ }),
|
45572
|
+
|
44850
45573
|
/***/ "./src/util/virtualized_list.js":
|
44851
45574
|
/*!**************************************!*\
|
44852
45575
|
!*** ./src/util/virtualized_list.js ***!
|