@luminati-io/uikit 3.7.3 → 3.7.5-beta.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -30126,8 +30126,8 @@ ChartContainer.defaultProps = {
|
|
30126
30126
|
variant: 'default'
|
30127
30127
|
};
|
30128
30128
|
ChartContainer.propTypes = {
|
30129
|
-
header: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().
|
30130
|
-
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),
|
30131
30131
|
actions: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
30132
30132
|
width: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
30133
30133
|
height: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number).isRequired,
|
@@ -34414,6 +34414,7 @@ var ClearIndicator = function ClearIndicator(props) {
|
|
34414
34414
|
var ic = _icons__WEBPACK_IMPORTED_MODULE_0__["default"].CloseSmall;
|
34415
34415
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
|
34416
34416
|
ref: innerRef,
|
34417
|
+
"data-testid": "clear-indicator",
|
34417
34418
|
width: "18px",
|
34418
34419
|
height: "18px",
|
34419
34420
|
viewBox: ic.viewBox,
|
@@ -34651,6 +34652,7 @@ var DropdownIndicator = function DropdownIndicator(props) {
|
|
34651
34652
|
var ic = _icons__WEBPACK_IMPORTED_MODULE_0__["default"][selectProps.menuIsOpen ? 'ChevronUp' : 'ChevronDown'];
|
34652
34653
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
|
34653
34654
|
ref: innerRef,
|
34655
|
+
"data-testid": "dropdown-indicator",
|
34654
34656
|
width: "18px",
|
34655
34657
|
height: "18px",
|
34656
34658
|
viewBox: ic.viewBox,
|
@@ -35663,35 +35665,37 @@ UploadItemState.propTypes = {
|
|
35663
35665
|
"use strict";
|
35664
35666
|
__webpack_require__.r(__webpack_exports__);
|
35665
35667
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
35666
|
-
/* harmony export */ Checkbox: () => (/* reexport safe */
|
35668
|
+
/* harmony export */ Checkbox: () => (/* reexport safe */ _checkbox__WEBPACK_IMPORTED_MODULE_6__.Checkbox),
|
35667
35669
|
/* harmony export */ CheckboxList: () => (/* reexport safe */ _checkbox_list__WEBPACK_IMPORTED_MODULE_0__.CheckboxList),
|
35668
|
-
/* harmony export */ CompareTo: () => (/* reexport safe */
|
35669
|
-
/* harmony export */ DatePicker: () => (/* reexport safe */
|
35670
|
-
/* harmony export */ DragDrop: () => (/* reexport safe */
|
35671
|
-
/* harmony export */ Dropdown: () => (/* reexport safe */
|
35672
|
-
/* harmony export */ FILE_STATUS: () => (/* reexport safe */
|
35673
|
-
/* harmony export */ FileUploader: () => (/* reexport safe */
|
35674
|
-
/* harmony export */ Number: () => (/* reexport safe */
|
35675
|
-
/* harmony export */
|
35676
|
-
/* harmony export */
|
35677
|
-
/* harmony export */
|
35678
|
-
/* harmony export */
|
35679
|
-
/* harmony export */
|
35680
|
-
/* 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)
|
35681
35684
|
/* harmony export */ });
|
35682
35685
|
/* harmony import */ var _checkbox_list__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./checkbox_list */ "./src/input/checkbox_list/index.js");
|
35683
|
-
/* harmony import */ var
|
35684
|
-
/* harmony import */ var
|
35685
|
-
/* harmony import */ var
|
35686
|
-
/* harmony import */ var
|
35687
|
-
/* harmony import */ var
|
35688
|
-
/* harmony import */ var
|
35689
|
-
/* harmony import */ var
|
35690
|
-
/* harmony import */ var
|
35691
|
-
/* harmony import */ var
|
35692
|
-
/* harmony import */ var
|
35693
|
-
/* harmony import */ var
|
35694
|
-
/* 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");
|
35695
35699
|
// LICENSE_CODE ZON
|
35696
35700
|
|
35697
35701
|
|
@@ -35710,6 +35714,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
35710
35714
|
|
35711
35715
|
|
35712
35716
|
|
35717
|
+
|
35713
35718
|
/***/ }),
|
35714
35719
|
|
35715
35720
|
/***/ "./src/input/number.js":
|
@@ -35758,20 +35763,20 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
35758
35763
|
|
35759
35764
|
|
35760
35765
|
var color = _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color;
|
35761
|
-
var Number = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (
|
35762
|
-
var onChange =
|
35763
|
-
onBlur =
|
35764
|
-
value =
|
35765
|
-
|
35766
|
-
step =
|
35767
|
-
minValue =
|
35768
|
-
maxValue =
|
35769
|
-
|
35770
|
-
size =
|
35771
|
-
placeholder =
|
35772
|
-
|
35773
|
-
changeOnBlur =
|
35774
|
-
rest = _objectWithoutProperties(
|
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);
|
35775
35780
|
var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
|
35776
35781
|
var v = e.target.value;
|
35777
35782
|
if (v != '') v = +v;
|
@@ -35785,9 +35790,8 @@ var Number = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRe
|
|
35785
35790
|
}, [onChange, onBlur, value, minValue, maxValue, changeOnBlur]);
|
35786
35791
|
var heightCalculationCallback = (0,_shared__WEBPACK_IMPORTED_MODULE_7__.useHeightCalculationCallback)(size);
|
35787
35792
|
var t = (0,_translation__WEBPACK_IMPORTED_MODULE_4__.useTranslate)();
|
35788
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_7__.FieldWrapper, _extends({
|
35789
|
-
ref: ref
|
35790
|
-
}, rest, {
|
35793
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_7__.FieldWrapper, _extends({}, rest, {
|
35794
|
+
ref: ref,
|
35791
35795
|
autoresize: false,
|
35792
35796
|
heightCalculationCallback: heightCalculationCallback,
|
35793
35797
|
inputProps: {
|
@@ -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
|
};
|
@@ -35906,6 +35915,618 @@ 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
|
+
menuPortalTarget = _ref.menuPortalTarget;
|
35997
|
+
var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
35998
|
+
var onInputBlurRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
35999
|
+
var searchInputRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
36000
|
+
var _getCountryValue = useFunOrPropCb('value', getCountryValue);
|
36001
|
+
var _getCountryLabel = useFunOrPropCb('label', getCountryLabel);
|
36002
|
+
var _getCountryCallingCode = useFunOrPropCb('callingCode', getCountryCallingCode);
|
36003
|
+
var _getCountryFlag = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (opt) {
|
36004
|
+
var flag = typeof getCountryFlag == 'function' ? getCountryFlag(opt) : opt.flag;
|
36005
|
+
if (!flag) return null;
|
36006
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(FlagWrapper, null, flag);
|
36007
|
+
}, [getCountryFlag]);
|
36008
|
+
var _filterCountry = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (opt, inputValue) {
|
36009
|
+
if (typeof filterCountry == 'function') return filterCountry(opt, inputValue);
|
36010
|
+
if (!opt) return false;
|
36011
|
+
if (inputValue.startsWith('+')) inputValue = inputValue.slice(1);
|
36012
|
+
var filter = function filter(optValue) {
|
36013
|
+
return compareCountryString(optValue, inputValue);
|
36014
|
+
};
|
36015
|
+
var countryValue = _getCountryValue(opt);
|
36016
|
+
var countryLabel = _getCountryLabel(opt);
|
36017
|
+
var countryCallingCode = _getCountryCallingCode(opt);
|
36018
|
+
return filter(countryLabel) || filter(countryValue) || filter(countryCallingCode);
|
36019
|
+
}, [filterCountry]);
|
36020
|
+
var formatOptionLabel = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (opt, _ref2) {
|
36021
|
+
var context = _ref2.context;
|
36022
|
+
if (!opt) return '';
|
36023
|
+
if (context == 'value') return _getCountryFlag(opt) || '';
|
36024
|
+
var countryCallingCode = _getCountryCallingCode(opt);
|
36025
|
+
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, {
|
36026
|
+
variant: "sm",
|
36027
|
+
color: "gray_11_25",
|
36028
|
+
no_wrap: true
|
36029
|
+
}, _getCountryLabel(opt)), !!countryCallingCode && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_4__.Label, {
|
36030
|
+
variant: "sm",
|
36031
|
+
color: "gray_9"
|
36032
|
+
}, "+", countryCallingCode));
|
36033
|
+
}, [_getCountryLabel, _getCountryCallingCode, _getCountryFlag]);
|
36034
|
+
var filterOption = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (_ref3, inputValue) {
|
36035
|
+
var opt = _ref3.data;
|
36036
|
+
return _filterCountry(opt, inputValue);
|
36037
|
+
}, [_filterCountry]);
|
36038
|
+
var setFocus = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
36039
|
+
return setTimeout(function () {
|
36040
|
+
var _searchInputRef$curre;
|
36041
|
+
return (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.focus();
|
36042
|
+
}, 0);
|
36043
|
+
}, []);
|
36044
|
+
var handleBlur = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (event) {
|
36045
|
+
var _onInputBlurRef$curre;
|
36046
|
+
return (_onInputBlurRef$curre = onInputBlurRef.current) === null || _onInputBlurRef$curre === void 0 ? void 0 : _onInputBlurRef$curre.call(onInputBlurRef, event);
|
36047
|
+
}, []);
|
36048
|
+
var handleClose = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
36049
|
+
setTimeout(function () {
|
36050
|
+
var _inputRef$current;
|
36051
|
+
return (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.blur();
|
36052
|
+
}, 0);
|
36053
|
+
onMenuClose === null || onMenuClose === void 0 || onMenuClose();
|
36054
|
+
}, [onMenuClose]);
|
36055
|
+
var MenuListComponent = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36056
|
+
var MenuListC = function MenuListC(rest) {
|
36057
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuList, _extends({}, rest, {
|
36058
|
+
searchInputRef: searchInputRef,
|
36059
|
+
onInputBlur: handleBlur,
|
36060
|
+
filterOption: filterOption
|
36061
|
+
}));
|
36062
|
+
};
|
36063
|
+
return MenuListC;
|
36064
|
+
}, [handleBlur, filterOption]);
|
36065
|
+
var InputComponent = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36066
|
+
var InputC = function InputC(_ref4) {
|
36067
|
+
var onBlur = _ref4.onBlur,
|
36068
|
+
rest = _objectWithoutProperties(_ref4, _excluded);
|
36069
|
+
(0,_util__WEBPACK_IMPORTED_MODULE_10__.useSetRefsEffect)(onBlur, [onInputBlurRef]);
|
36070
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Input, _extends({}, rest, {
|
36071
|
+
inputRef: inputRef
|
36072
|
+
}));
|
36073
|
+
};
|
36074
|
+
return InputC;
|
36075
|
+
}, []);
|
36076
|
+
var comps = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36077
|
+
return {
|
36078
|
+
IndicatorSeparator: null,
|
36079
|
+
DropdownIndicator: DropdownIndicator,
|
36080
|
+
Input: InputComponent,
|
36081
|
+
MenuList: MenuListComponent
|
36082
|
+
};
|
36083
|
+
}, [InputComponent, MenuListComponent]);
|
36084
|
+
var value = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36085
|
+
return countries.find(function (c) {
|
36086
|
+
return _getCountryValue(c) == country;
|
36087
|
+
});
|
36088
|
+
}, [countries, country, _getCountryValue]);
|
36089
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_select__WEBPACK_IMPORTED_MODULE_11__["default"], {
|
36090
|
+
options: countries,
|
36091
|
+
value: value,
|
36092
|
+
onChange: onChangeCountry,
|
36093
|
+
isDisabled: disabled,
|
36094
|
+
menuPortalTarget: menuPortalTarget,
|
36095
|
+
styles: getStyles(size),
|
36096
|
+
formatOptionLabel: formatOptionLabel,
|
36097
|
+
placeholder: null,
|
36098
|
+
getOptionValue: _getCountryValue,
|
36099
|
+
getOptionLabel: _getCountryLabel,
|
36100
|
+
backspaceRemovesValue: false,
|
36101
|
+
onMenuOpen: setFocus,
|
36102
|
+
onMenuClose: handleClose,
|
36103
|
+
components: comps
|
36104
|
+
});
|
36105
|
+
};
|
36106
|
+
var EventTrap = function EventTrap(_ref5) {
|
36107
|
+
var children = _ref5.children;
|
36108
|
+
var eventTrap = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {
|
36109
|
+
e.preventDefault();
|
36110
|
+
e.stopPropagation();
|
36111
|
+
}, []);
|
36112
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
|
36113
|
+
onMouseDown: eventTrap,
|
36114
|
+
onClick: eventTrap
|
36115
|
+
}, children);
|
36116
|
+
};
|
36117
|
+
var DropdownIndicator = function DropdownIndicator(_ref6) {
|
36118
|
+
var selectProps = _ref6.selectProps,
|
36119
|
+
innerRef = _ref6.innerRef,
|
36120
|
+
innerProps = _ref6.innerProps,
|
36121
|
+
isDisabled = _ref6.isDisabled;
|
36122
|
+
var ic = _icons__WEBPACK_IMPORTED_MODULE_0__["default"][selectProps.menuIsOpen ? 'ChevronUp' : 'ChevronDown'];
|
36123
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
|
36124
|
+
ref: innerRef,
|
36125
|
+
width: "12px",
|
36126
|
+
height: "12px",
|
36127
|
+
viewBox: ic.viewBox,
|
36128
|
+
style: {
|
36129
|
+
color: color.gray_9,
|
36130
|
+
cursor: isDisabled ? 'default' : 'pointer'
|
36131
|
+
}
|
36132
|
+
}, innerProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("use", {
|
36133
|
+
href: "#".concat(ic.id)
|
36134
|
+
}));
|
36135
|
+
};
|
36136
|
+
var Input = function Input(_ref7) {
|
36137
|
+
var inputRef = _ref7.inputRef,
|
36138
|
+
innerRef = _ref7.innerRef,
|
36139
|
+
rest = _objectWithoutProperties(_ref7, _excluded2);
|
36140
|
+
var handleRef = (0,_util__WEBPACK_IMPORTED_MODULE_10__.useSetRefsCallback)([inputRef, innerRef]);
|
36141
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_select__WEBPACK_IMPORTED_MODULE_12__.c.Input, _extends({}, rest, {
|
36142
|
+
innerRef: handleRef,
|
36143
|
+
onBlur: null,
|
36144
|
+
value: "",
|
36145
|
+
readOnly: true
|
36146
|
+
}));
|
36147
|
+
};
|
36148
|
+
var MenuList = function MenuList(_ref8) {
|
36149
|
+
var searchInputRef = _ref8.searchInputRef,
|
36150
|
+
onInputBlur = _ref8.onInputBlur,
|
36151
|
+
children = _ref8.children,
|
36152
|
+
filterOption = _ref8.filterOption,
|
36153
|
+
rest = _objectWithoutProperties(_ref8, _excluded3);
|
36154
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
|
36155
|
+
_useState2 = _slicedToArray(_useState, 2),
|
36156
|
+
value = _useState2[0],
|
36157
|
+
setValue = _useState2[1];
|
36158
|
+
var filteredChildren = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36159
|
+
return Array.isArray(children) ? children.filter(function (i) {
|
36160
|
+
return filterOption(i.props, value);
|
36161
|
+
}) : children;
|
36162
|
+
}, [value, children, filterOption]);
|
36163
|
+
var hasChildren = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36164
|
+
return !Array.isArray(filteredChildren) || filteredChildren.length;
|
36165
|
+
}, [filteredChildren]);
|
36166
|
+
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, {
|
36167
|
+
ref: searchInputRef,
|
36168
|
+
onBlur: onInputBlur,
|
36169
|
+
onChange: setValue
|
36170
|
+
})), hasChildren ? filteredChildren : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(NoOptionsMessage, rest, "No options")));
|
36171
|
+
};
|
36172
|
+
var SearchInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_ref9, ref) {
|
36173
|
+
var size = _ref9.size,
|
36174
|
+
disabled = _ref9.disabled,
|
36175
|
+
value = _ref9.value,
|
36176
|
+
onChange = _ref9.onChange,
|
36177
|
+
rest = _objectWithoutProperties(_ref9, _excluded4);
|
36178
|
+
var _useValue = (0,_util__WEBPACK_IMPORTED_MODULE_10__.useValue)(value),
|
36179
|
+
_useValue2 = _slicedToArray(_useValue, 2),
|
36180
|
+
val = _useValue2[0],
|
36181
|
+
setVal = _useValue2[1];
|
36182
|
+
var changeValue = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (v, e) {
|
36183
|
+
setVal(v);
|
36184
|
+
onChange === null || onChange === void 0 || onChange(v, e);
|
36185
|
+
}, [onChange]);
|
36186
|
+
var reset = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
36187
|
+
return changeValue('');
|
36188
|
+
}, [changeValue]);
|
36189
|
+
var SearchIcon = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36190
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_7__.Icon, {
|
36191
|
+
name: "Search",
|
36192
|
+
color: "gray_9",
|
36193
|
+
size: size == 'lg' ? 'sm' : 'xs'
|
36194
|
+
});
|
36195
|
+
}, [size]);
|
36196
|
+
var ClearButton = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
36197
|
+
return !!val && !disabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_8__.IconButton, {
|
36198
|
+
variant: "ghost",
|
36199
|
+
icon: "Close",
|
36200
|
+
onClick: reset
|
36201
|
+
});
|
36202
|
+
}, [val, disabled, reset]);
|
36203
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_textbox__WEBPACK_IMPORTED_MODULE_9__.Textbox, _extends({}, rest, {
|
36204
|
+
size: size,
|
36205
|
+
disabled: disabled,
|
36206
|
+
fieldRef: ref,
|
36207
|
+
leftInnerContent: SearchIcon,
|
36208
|
+
rightInnerContent: ClearButton,
|
36209
|
+
value: val,
|
36210
|
+
onChange: changeValue
|
36211
|
+
}));
|
36212
|
+
});
|
36213
|
+
SearchInput.displayName = 'SearchInput';
|
36214
|
+
var NoOptionsMessage = function NoOptionsMessage(props) {
|
36215
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_select__WEBPACK_IMPORTED_MODULE_12__.c.NoOptionsMessage, props);
|
36216
|
+
};
|
36217
|
+
var SearchContainer = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
36218
|
+
displayName: "SearchContainer",
|
36219
|
+
componentId: "sc-7zi817-0"
|
36220
|
+
})(["padding:8px;"]);
|
36221
|
+
var Option = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
36222
|
+
displayName: "Option",
|
36223
|
+
componentId: "sc-7zi817-1"
|
36224
|
+
})(["display:flex;flex-direction:row;align-items:center;gap:4px;"]);
|
36225
|
+
var FlagWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
36226
|
+
displayName: "FlagWrapper",
|
36227
|
+
componentId: "sc-7zi817-2"
|
36228
|
+
})(["display:flex;align-items:center;width:18px;height:18px;"]);
|
36229
|
+
var getStyles = function getStyles(size) {
|
36230
|
+
return {
|
36231
|
+
control: function control(baseStyles, _ref10) {
|
36232
|
+
var isDisabled = _ref10.isDisabled;
|
36233
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
36234
|
+
width: '56px',
|
36235
|
+
minHeight: getHeight(size),
|
36236
|
+
padding: "4px 8px 4px 12px",
|
36237
|
+
/* Label/sm */
|
36238
|
+
fontFamily: font_family.sans,
|
36239
|
+
fontStyle: 'normal',
|
36240
|
+
fontWeight: font_weight.regular,
|
36241
|
+
fontSize: font_size.sm,
|
36242
|
+
lineHeight: line_height.none,
|
36243
|
+
color: isDisabled ? color.gray_9 : color.gray_11_50,
|
36244
|
+
backgroundColor: color.gray_2,
|
36245
|
+
borderColor: isDisabled ? color.gray_6 : color.gray_7,
|
36246
|
+
cursor: isDisabled ? 'default' : 'text',
|
36247
|
+
borderRight: '0 none',
|
36248
|
+
borderTopRightRadius: '0',
|
36249
|
+
borderBottomRightRadius: '0',
|
36250
|
+
boxShadow: undefined,
|
36251
|
+
'&:hover': undefined
|
36252
|
+
});
|
36253
|
+
},
|
36254
|
+
valueContainer: function valueContainer(baseStyles) {
|
36255
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
36256
|
+
padding: '0'
|
36257
|
+
});
|
36258
|
+
},
|
36259
|
+
menu: function menu(baseStyles) {
|
36260
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
36261
|
+
padding: 0,
|
36262
|
+
boxSizing: 'border-box',
|
36263
|
+
minWidth: '240px',
|
36264
|
+
width: 'fit-content',
|
36265
|
+
maxWidth: '540px',
|
36266
|
+
backgroundColor: color.white,
|
36267
|
+
borderRadius: '4px',
|
36268
|
+
boxShadow: _theme__WEBPACK_IMPORTED_MODULE_3__["default"].box_shadow.md
|
36269
|
+
});
|
36270
|
+
},
|
36271
|
+
menuPortal: function menuPortal(baseStyles) {
|
36272
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
36273
|
+
zIndex: _constants__WEBPACK_IMPORTED_MODULE_6__.Z_INDEX.dropdown
|
36274
|
+
});
|
36275
|
+
},
|
36276
|
+
option: function option(baseStyles, _ref11) {
|
36277
|
+
var selected = _ref11.selected;
|
36278
|
+
return _objectSpread(_objectSpread({}, baseStyles), {}, {
|
36279
|
+
backgroundColor: selected ? color.blue_3 : baseStyles.backgroundColor
|
36280
|
+
});
|
36281
|
+
}
|
36282
|
+
};
|
36283
|
+
};
|
36284
|
+
var getHeight = function getHeight(size) {
|
36285
|
+
var height = {
|
36286
|
+
sm: 36,
|
36287
|
+
md: 40,
|
36288
|
+
lg: 48
|
36289
|
+
};
|
36290
|
+
return (0,_utils__WEBPACK_IMPORTED_MODULE_5__.toPixel)(height[size] || height.sm);
|
36291
|
+
};
|
36292
|
+
var compareCountryString = function compareCountryString(optValue, inputValue) {
|
36293
|
+
return optValue === null || optValue === void 0 ? void 0 : optValue.toLowerCase().includes(inputValue.toLowerCase());
|
36294
|
+
};
|
36295
|
+
var useFunOrPropCb = function useFunOrPropCb(propName, fun) {
|
36296
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (obj) {
|
36297
|
+
return typeof fun == 'function' ? fun(obj) : obj[propName];
|
36298
|
+
}, [fun]);
|
36299
|
+
};
|
36300
|
+
|
36301
|
+
/***/ }),
|
36302
|
+
|
36303
|
+
/***/ "./src/input/phone/index.js":
|
36304
|
+
/*!**********************************!*\
|
36305
|
+
!*** ./src/input/phone/index.js ***!
|
36306
|
+
\**********************************/
|
36307
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
36308
|
+
|
36309
|
+
"use strict";
|
36310
|
+
__webpack_require__.r(__webpack_exports__);
|
36311
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
36312
|
+
/* harmony export */ Phone: () => (/* reexport safe */ _phone__WEBPACK_IMPORTED_MODULE_0__.Phone)
|
36313
|
+
/* harmony export */ });
|
36314
|
+
/* harmony import */ var _phone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./phone */ "./src/input/phone/phone.js");
|
36315
|
+
// LICENSE_CODE ZON
|
36316
|
+
|
36317
|
+
|
36318
|
+
/*jslint react:true*/
|
36319
|
+
|
36320
|
+
|
36321
|
+
/***/ }),
|
36322
|
+
|
36323
|
+
/***/ "./src/input/phone/phone.js":
|
36324
|
+
/*!**********************************!*\
|
36325
|
+
!*** ./src/input/phone/phone.js ***!
|
36326
|
+
\**********************************/
|
36327
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
36328
|
+
|
36329
|
+
"use strict";
|
36330
|
+
__webpack_require__.r(__webpack_exports__);
|
36331
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
36332
|
+
/* harmony export */ Phone: () => (/* binding */ Phone)
|
36333
|
+
/* harmony export */ });
|
36334
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
36335
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
36336
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types");
|
36337
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
36338
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
|
36339
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
|
36340
|
+
/* harmony import */ var _translation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../translation */ "./src/translation.js");
|
36341
|
+
/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../shared */ "./src/input/shared.js");
|
36342
|
+
/* harmony import */ var _country_select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./country_select */ "./src/input/phone/country_select.js");
|
36343
|
+
// LICENSE_CODE ZON
|
36344
|
+
|
36345
|
+
|
36346
|
+
/*jslint react:true*/
|
36347
|
+
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); }
|
36348
|
+
var _excluded = ["size", "value", "onChange", "placeholder", "countries", "maxLength", "inputProps", "disabled", "defaultCountry", "parsePhoneNumber", "getCountryValue", "getCountryLabel", "getCountryCallingCode", "getCountryFlag", "filterCountry", "menuPortalTarget"],
|
36349
|
+
_excluded2 = ["value", "parsePhoneNumber"];
|
36350
|
+
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); }
|
36351
|
+
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; }
|
36352
|
+
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; }
|
36353
|
+
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; }
|
36354
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
36355
|
+
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); }
|
36356
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
36357
|
+
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."); }
|
36358
|
+
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); }
|
36359
|
+
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; }
|
36360
|
+
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; } }
|
36361
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
36362
|
+
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; }
|
36363
|
+
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; }
|
36364
|
+
|
36365
|
+
|
36366
|
+
|
36367
|
+
|
36368
|
+
|
36369
|
+
|
36370
|
+
var noop = function noop() {};
|
36371
|
+
var Phone = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref, ref) {
|
36372
|
+
var _ref$size = _ref.size,
|
36373
|
+
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
36374
|
+
value = _ref.value,
|
36375
|
+
onChange = _ref.onChange,
|
36376
|
+
placeholder = _ref.placeholder,
|
36377
|
+
_ref$countries = _ref.countries,
|
36378
|
+
countries = _ref$countries === void 0 ? [] : _ref$countries,
|
36379
|
+
_ref$maxLength = _ref.maxLength,
|
36380
|
+
maxLength = _ref$maxLength === void 0 ? 20 : _ref$maxLength,
|
36381
|
+
inputProps = _ref.inputProps,
|
36382
|
+
disabled = _ref.disabled,
|
36383
|
+
_ref$defaultCountry = _ref.defaultCountry,
|
36384
|
+
defaultCountry = _ref$defaultCountry === void 0 ? 'US' : _ref$defaultCountry,
|
36385
|
+
_ref$parsePhoneNumber = _ref.parsePhoneNumber,
|
36386
|
+
parsePhoneNumber = _ref$parsePhoneNumber === void 0 ? noop : _ref$parsePhoneNumber,
|
36387
|
+
getCountryValue = _ref.getCountryValue,
|
36388
|
+
getCountryLabel = _ref.getCountryLabel,
|
36389
|
+
getCountryCallingCode = _ref.getCountryCallingCode,
|
36390
|
+
getCountryFlag = _ref.getCountryFlag,
|
36391
|
+
filterCountry = _ref.filterCountry,
|
36392
|
+
menuPortalTarget = _ref.menuPortalTarget,
|
36393
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
36394
|
+
var fieldRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
36395
|
+
var unmaskNumber = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
36396
|
+
var number = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
36397
|
+
var unmasked = number;
|
36398
|
+
var parsed = parsePhoneNumber(number);
|
36399
|
+
if (parsed) {
|
36400
|
+
var code = "+".concat(parsed.callingCode);
|
36401
|
+
unmasked = "".concat(code).concat(number.replace(code, '').trim());
|
36402
|
+
}
|
36403
|
+
var char2dig = '22233344455566677778889999';
|
36404
|
+
unmasked = unmasked.replace(/[a-z]/ig, function (c) {
|
36405
|
+
return char2dig[c.charCodeAt(0) - 97];
|
36406
|
+
});
|
36407
|
+
return unmasked.replace(/[^+0-9()-\s]/g, '');
|
36408
|
+
}, [parsePhoneNumber]);
|
36409
|
+
var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
|
36410
|
+
var _e$target;
|
36411
|
+
onChange === null || onChange === void 0 || onChange(unmaskNumber((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value), e);
|
36412
|
+
}, [unmaskNumber, onChange]);
|
36413
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultCountry),
|
36414
|
+
_useState2 = _slicedToArray(_useState, 2),
|
36415
|
+
country = _useState2[0],
|
36416
|
+
setCountry = _useState2[1];
|
36417
|
+
var onChangeCountry = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (v) {
|
36418
|
+
if (!v) return setCountry(null);
|
36419
|
+
var number = value || '';
|
36420
|
+
var newCode = typeof getCountryCallingCode == 'function' ? getCountryCallingCode(v) : v.callingCode;
|
36421
|
+
if (newCode && !number.startsWith("+".concat(newCode))) {
|
36422
|
+
var parsed = parsePhoneNumber(number);
|
36423
|
+
var oldCode = parsed === null || parsed === void 0 ? void 0 : parsed.callingCode;
|
36424
|
+
var repl = oldCode ? "+".concat(oldCode) : number.startsWith('+') ? '+' : '';
|
36425
|
+
number = repl ? number.replace(repl, "+".concat(newCode)) : "+".concat(newCode).concat(number);
|
36426
|
+
onChange === null || onChange === void 0 || onChange(number, {});
|
36427
|
+
}
|
36428
|
+
setCountry(v.value);
|
36429
|
+
}, [value, parsePhoneNumber, getCountryCallingCode, onChange]);
|
36430
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
36431
|
+
var _parsePhoneNumber;
|
36432
|
+
if (value) setCountry(((_parsePhoneNumber = parsePhoneNumber(value)) === null || _parsePhoneNumber === void 0 ? void 0 : _parsePhoneNumber.country) || null);
|
36433
|
+
}, [value, parsePhoneNumber]);
|
36434
|
+
var heightCalculationCallback = (0,_shared__WEBPACK_IMPORTED_MODULE_4__.useHeightCalculationCallback)(size);
|
36435
|
+
var t = (0,_translation__WEBPACK_IMPORTED_MODULE_3__.useTranslate)();
|
36436
|
+
var handleMenuClose = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
36437
|
+
var _fieldRef$current;
|
36438
|
+
return (_fieldRef$current = fieldRef.current) === null || _fieldRef$current === void 0 ? void 0 : _fieldRef$current.focus();
|
36439
|
+
}, []);
|
36440
|
+
var selectProps = {
|
36441
|
+
countries: countries,
|
36442
|
+
country: country,
|
36443
|
+
onChangeCountry: onChangeCountry,
|
36444
|
+
size: size,
|
36445
|
+
disabled: disabled,
|
36446
|
+
getCountryValue: getCountryValue,
|
36447
|
+
getCountryLabel: getCountryLabel,
|
36448
|
+
getCountryCallingCode: getCountryCallingCode,
|
36449
|
+
getCountryFlag: getCountryFlag,
|
36450
|
+
filterCountry: filterCountry,
|
36451
|
+
onMenuClose: handleMenuClose,
|
36452
|
+
menuPortalTarget: menuPortalTarget
|
36453
|
+
};
|
36454
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_4__.FieldWrapper, _extends({}, rest, {
|
36455
|
+
ref: ref,
|
36456
|
+
heightCalculationCallback: heightCalculationCallback,
|
36457
|
+
autofocus: false,
|
36458
|
+
autoresize: false,
|
36459
|
+
verticalAlign: "center",
|
36460
|
+
Field: PhoneField,
|
36461
|
+
fieldRef: fieldRef,
|
36462
|
+
disabled: disabled,
|
36463
|
+
value: value,
|
36464
|
+
onChange: handleChange,
|
36465
|
+
placeholder: t(placeholder),
|
36466
|
+
inputProps: _objectSpread(_objectSpread({}, inputProps), {}, {
|
36467
|
+
maxLength: maxLength,
|
36468
|
+
parsePhoneNumber: parsePhoneNumber
|
36469
|
+
}),
|
36470
|
+
leftOuterContent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_country_select__WEBPACK_IMPORTED_MODULE_5__.CountrySelect, selectProps)
|
36471
|
+
}));
|
36472
|
+
});
|
36473
|
+
Phone.displayName = 'Phone';
|
36474
|
+
Phone.propTypes = {
|
36475
|
+
value: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
36476
|
+
onChange: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36477
|
+
onFocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36478
|
+
onBlur: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36479
|
+
placeholder: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
36480
|
+
disabled: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
36481
|
+
required: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
36482
|
+
necessityIndicator: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['asterisk', 'text']),
|
36483
|
+
invalid: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
36484
|
+
leftInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36485
|
+
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36486
|
+
rightInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36487
|
+
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36488
|
+
label: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36489
|
+
labelIcon: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
36490
|
+
labelTooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36491
|
+
helperText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36492
|
+
inputProps: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
|
36493
|
+
size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'sm', 'md', 'lg']),
|
36494
|
+
autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
36495
|
+
maxLength: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
|
36496
|
+
defaultCountry: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
36497
|
+
parsePhoneNumber: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func).isRequired,
|
36498
|
+
getCountryValue: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36499
|
+
getCountryLabel: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36500
|
+
getCountryCallingCode: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36501
|
+
getCountryFlag: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36502
|
+
filterCountry: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
36503
|
+
countries: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().array)
|
36504
|
+
};
|
36505
|
+
var PhoneField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref2, ref) {
|
36506
|
+
var value = _ref2.value,
|
36507
|
+
parsePhoneNumber = _ref2.parsePhoneNumber,
|
36508
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
36509
|
+
var phoneNumber = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
36510
|
+
return parsePhoneNumber(value || '');
|
36511
|
+
}, [value, parsePhoneNumber]);
|
36512
|
+
var formatted = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
36513
|
+
return phoneNumber && phoneNumber.formattedOutput || value;
|
36514
|
+
}, [phoneNumber, value]);
|
36515
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TelInput, _extends({}, rest, {
|
36516
|
+
ref: ref,
|
36517
|
+
value: formatted
|
36518
|
+
}));
|
36519
|
+
});
|
36520
|
+
PhoneField.displayName = 'PhoneField';
|
36521
|
+
var TelInput = styled_components__WEBPACK_IMPORTED_MODULE_2___default().input.attrs({
|
36522
|
+
type: 'tel'
|
36523
|
+
}).withConfig({
|
36524
|
+
displayName: "TelInput",
|
36525
|
+
componentId: "sc-ommqlh-0"
|
36526
|
+
})(["padding:0;outline:none;border:0;width:100%;color:inherit;background:inherit;"]);
|
36527
|
+
|
36528
|
+
/***/ }),
|
36529
|
+
|
35909
36530
|
/***/ "./src/input/radio_group.js":
|
35910
36531
|
/*!**********************************!*\
|
35911
36532
|
!*** ./src/input/radio_group.js ***!
|
@@ -36191,7 +36812,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
36191
36812
|
|
36192
36813
|
/*jslint react:true*/
|
36193
36814
|
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"];
|
36815
|
+
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
36816
|
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
36817
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
36197
36818
|
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 +36848,7 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
|
|
36227
36848
|
rightOuterContent = props.rightOuterContent,
|
36228
36849
|
heightCalculationCallback = props.heightCalculationCallback,
|
36229
36850
|
Field = props.Field,
|
36851
|
+
fieldRef = props.fieldRef,
|
36230
36852
|
onChange = props.onChange,
|
36231
36853
|
onFocus = props.onFocus,
|
36232
36854
|
onBlur = props.onBlur,
|
@@ -36245,6 +36867,7 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
|
|
36245
36867
|
innerWrapper = props.innerWrapper,
|
36246
36868
|
rest = _objectWithoutProperties(props, _excluded);
|
36247
36869
|
var field = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
36870
|
+
var setFieldRefs = (0,_util__WEBPACK_IMPORTED_MODULE_10__.useSetRefsCallback)([fieldRef, field]);
|
36248
36871
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(),
|
36249
36872
|
_useState2 = _slicedToArray(_useState, 2),
|
36250
36873
|
active = _useState2[0],
|
@@ -36295,7 +36918,7 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
|
|
36295
36918
|
$verticalAlign: verticalAlign,
|
36296
36919
|
onClick: onWrapperClick
|
36297
36920
|
}, leftInnerContent, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Field, _extends({}, props.inputProps, {
|
36298
|
-
ref:
|
36921
|
+
ref: setFieldRefs,
|
36299
36922
|
id: id,
|
36300
36923
|
disabled: disabled,
|
36301
36924
|
onChange: onChange,
|
@@ -36309,9 +36932,6 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
|
|
36309
36932
|
}, helperText));
|
36310
36933
|
});
|
36311
36934
|
FieldWrapper.displayName = 'FieldWrapper';
|
36312
|
-
FieldWrapper.defaultProps = {
|
36313
|
-
size: 'md'
|
36314
|
-
};
|
36315
36935
|
FieldWrapper.propTypes = {
|
36316
36936
|
value: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().any),
|
36317
36937
|
onChange: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
@@ -36329,7 +36949,16 @@ FieldWrapper.propTypes = {
|
|
36329
36949
|
labelTooltip: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36330
36950
|
helperText: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36331
36951
|
inputProps: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
36332
|
-
Field: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().elementType)
|
36952
|
+
Field: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().elementType),
|
36953
|
+
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({
|
36954
|
+
current: prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Element)
|
36955
|
+
})]),
|
36956
|
+
required: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
36957
|
+
necessityIndicator: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['asterisk', 'text']),
|
36958
|
+
autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
36959
|
+
heightCalculationCallback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
36960
|
+
autoresize: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
36961
|
+
verticalAlign: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
|
36333
36962
|
};
|
36334
36963
|
FieldWrapper.displayName = 'FieldWrapper';
|
36335
36964
|
var Field = styled_components__WEBPACK_IMPORTED_MODULE_2___default().input.withConfig({
|
@@ -36519,7 +37148,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
36519
37148
|
|
36520
37149
|
|
36521
37150
|
/*jslint react:true*/
|
37151
|
+
var _excluded = ["onChange", "rows", "maxRows", "placeholder"];
|
36522
37152
|
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); }
|
37153
|
+
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; }
|
37154
|
+
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; }
|
36523
37155
|
|
36524
37156
|
|
36525
37157
|
|
@@ -36527,11 +37159,13 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
36527
37159
|
|
36528
37160
|
|
36529
37161
|
|
36530
|
-
var Textarea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (
|
36531
|
-
var onChange =
|
36532
|
-
rows =
|
36533
|
-
|
36534
|
-
|
37162
|
+
var Textarea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_ref, ref) {
|
37163
|
+
var onChange = _ref.onChange,
|
37164
|
+
_ref$rows = _ref.rows,
|
37165
|
+
rows = _ref$rows === void 0 ? 1 : _ref$rows,
|
37166
|
+
maxRows = _ref.maxRows,
|
37167
|
+
placeholder = _ref.placeholder,
|
37168
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
36535
37169
|
var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {
|
36536
37170
|
onChange === null || onChange === void 0 || onChange(e.target.value, e);
|
36537
37171
|
}, [onChange]);
|
@@ -36543,9 +37177,8 @@ var Textarea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forward
|
|
36543
37177
|
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));
|
36544
37178
|
}, [rows, maxRows]);
|
36545
37179
|
var t = (0,_translation__WEBPACK_IMPORTED_MODULE_4__.useTranslate)();
|
36546
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_6__.FieldWrapper, _extends({
|
36547
|
-
ref: ref
|
36548
|
-
}, props, {
|
37180
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_6__.FieldWrapper, _extends({}, rest, {
|
37181
|
+
ref: ref,
|
36549
37182
|
autoresize: true,
|
36550
37183
|
verticalAlign: "flex-start",
|
36551
37184
|
heightCalculationCallback: heightCalculationCallback,
|
@@ -36565,17 +37198,20 @@ Textarea.propTypes = {
|
|
36565
37198
|
necessityIndicator: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['asterisk', 'text']),
|
36566
37199
|
invalid: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
36567
37200
|
leftInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36568
|
-
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().
|
37201
|
+
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36569
37202
|
rightInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36570
|
-
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().
|
37203
|
+
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36571
37204
|
label: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36572
37205
|
labelIcon: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
36573
37206
|
labelTooltip: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36574
37207
|
helperText: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
36575
|
-
|
36576
|
-
|
36577
|
-
|
36578
|
-
|
37208
|
+
inputProps: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
37209
|
+
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({
|
37210
|
+
current: prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Element)
|
37211
|
+
})]),
|
37212
|
+
autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
37213
|
+
rows: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
37214
|
+
maxRows: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
36579
37215
|
};
|
36580
37216
|
Textarea.displayName = 'Textarea';
|
36581
37217
|
var Area = styled_components__WEBPACK_IMPORTED_MODULE_2___default().textarea.withConfig({
|
@@ -36606,21 +37242,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
36606
37242
|
|
36607
37243
|
|
36608
37244
|
/*jslint react:true*/
|
37245
|
+
var _excluded = ["size", "onChange", "placeholder"];
|
36609
37246
|
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); }
|
37247
|
+
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; }
|
37248
|
+
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; }
|
36610
37249
|
|
36611
37250
|
|
36612
37251
|
|
36613
37252
|
|
36614
|
-
var Textbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (
|
36615
|
-
var size =
|
36616
|
-
onChange =
|
36617
|
-
placeholder =
|
37253
|
+
var Textbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref, ref) {
|
37254
|
+
var size = _ref.size,
|
37255
|
+
onChange = _ref.onChange,
|
37256
|
+
placeholder = _ref.placeholder,
|
37257
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
36618
37258
|
var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
|
36619
|
-
onChange === null || onChange === void 0
|
37259
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value, e);
|
36620
37260
|
}, [onChange]);
|
36621
37261
|
var heightCalculationCallback = (0,_shared__WEBPACK_IMPORTED_MODULE_3__.useHeightCalculationCallback)(size);
|
36622
37262
|
var t = (0,_translation__WEBPACK_IMPORTED_MODULE_2__.useTranslate)();
|
36623
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_3__.FieldWrapper, _extends({},
|
37263
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_3__.FieldWrapper, _extends({}, rest, {
|
36624
37264
|
ref: ref,
|
36625
37265
|
heightCalculationCallback: heightCalculationCallback,
|
36626
37266
|
autoresize: false,
|
@@ -36641,18 +37281,19 @@ Textbox.propTypes = {
|
|
36641
37281
|
necessityIndicator: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['asterisk', 'text']),
|
36642
37282
|
invalid: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
36643
37283
|
leftInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36644
|
-
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().
|
37284
|
+
leftOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36645
37285
|
rightInnerContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36646
|
-
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().
|
37286
|
+
rightOuterContent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36647
37287
|
label: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36648
37288
|
labelIcon: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
36649
37289
|
labelTooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
36650
37290
|
helperText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
37291
|
+
inputProps: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
|
36651
37292
|
size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'sm', 'md', 'lg']),
|
36652
|
-
autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool)
|
36653
|
-
|
36654
|
-
|
36655
|
-
|
37293
|
+
autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
37294
|
+
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({
|
37295
|
+
current: prop_types__WEBPACK_IMPORTED_MODULE_1___default().instanceOf(Element)
|
37296
|
+
})])
|
36656
37297
|
};
|
36657
37298
|
Textbox.displayName = 'Textbox';
|
36658
37299
|
|
@@ -40258,7 +40899,7 @@ var TableHeader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forw
|
|
40258
40899
|
}),
|
40259
40900
|
$isLast: hideLastRowBorder && n == headerGroups.length - 1
|
40260
40901
|
}), group.headers.map(function (header, i) {
|
40261
|
-
var isLast = i == group.length - 1;
|
40902
|
+
var isLast = i == group.headers.length - 1;
|
40262
40903
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(HeaderCell, {
|
40263
40904
|
compact: compact,
|
40264
40905
|
isLast: isLast,
|
@@ -44694,7 +45335,7 @@ var getStyleProps = function getStyleProps(props, name, classNamesState) {
|
|
44694
45335
|
__webpack_require__.r(__webpack_exports__);
|
44695
45336
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
44696
45337
|
/* harmony export */ OFFSET: () => (/* reexport safe */ _getters__WEBPACK_IMPORTED_MODULE_6__.OFFSET),
|
44697
|
-
/* harmony export */ VirtualizedListFactory: () => (/* reexport safe */
|
45338
|
+
/* harmony export */ VirtualizedListFactory: () => (/* reexport safe */ _virtualized_list__WEBPACK_IMPORTED_MODULE_12__.VirtualizedListFactory),
|
44698
45339
|
/* harmony export */ classNames: () => (/* reexport safe */ _class_names__WEBPACK_IMPORTED_MODULE_0__.classNames),
|
44699
45340
|
/* harmony export */ firstDefined: () => (/* reexport safe */ _first_defined__WEBPACK_IMPORTED_MODULE_1__.firstDefined),
|
44700
45341
|
/* harmony export */ flexRender: () => (/* reexport safe */ _flex_renderer__WEBPACK_IMPORTED_MODULE_2__.flexRender),
|
@@ -44709,10 +45350,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
44709
45350
|
/* harmony export */ getScrollIndex: () => (/* reexport safe */ _getters__WEBPACK_IMPORTED_MODULE_6__.getScrollIndex),
|
44710
45351
|
/* harmony export */ getStyleProps: () => (/* reexport safe */ _getters__WEBPACK_IMPORTED_MODULE_6__.getStyleProps),
|
44711
45352
|
/* harmony export */ isGroupHeader: () => (/* reexport safe */ _getters__WEBPACK_IMPORTED_MODULE_6__.isGroupHeader),
|
44712
|
-
/* harmony export */ mergeRefs: () => (/* reexport safe */
|
44713
|
-
/* harmony export */
|
44714
|
-
/* harmony export */
|
44715
|
-
/* harmony export */
|
45353
|
+
/* harmony export */ mergeRefs: () => (/* reexport safe */ _merge_refs__WEBPACK_IMPORTED_MODULE_8__.mergeRefs),
|
45354
|
+
/* harmony export */ setRef: () => (/* reexport safe */ _set_ref__WEBPACK_IMPORTED_MODULE_7__.setRef),
|
45355
|
+
/* harmony export */ setRefs: () => (/* reexport safe */ _set_ref__WEBPACK_IMPORTED_MODULE_7__.setRefs),
|
45356
|
+
/* harmony export */ splitProps: () => (/* reexport safe */ _split_props__WEBPACK_IMPORTED_MODULE_9__.splitProps),
|
45357
|
+
/* harmony export */ tooltipPlacement: () => (/* reexport safe */ _tooltip_placement__WEBPACK_IMPORTED_MODULE_10__.tooltipPlacement),
|
45358
|
+
/* harmony export */ useSetRefsCallback: () => (/* reexport safe */ _set_ref__WEBPACK_IMPORTED_MODULE_7__.useSetRefsCallback),
|
45359
|
+
/* harmony export */ useSetRefsEffect: () => (/* reexport safe */ _set_ref__WEBPACK_IMPORTED_MODULE_7__.useSetRefsEffect),
|
45360
|
+
/* harmony export */ useValue: () => (/* reexport safe */ _use_value__WEBPACK_IMPORTED_MODULE_11__.useValue),
|
45361
|
+
/* harmony export */ withUserStyles: () => (/* reexport safe */ _with_user_styles__WEBPACK_IMPORTED_MODULE_13__.withUserStyles)
|
44716
45362
|
/* harmony export */ });
|
44717
45363
|
/* harmony import */ var _class_names__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./class_names */ "./src/util/class_names.js");
|
44718
45364
|
/* harmony import */ var _first_defined__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./first_defined */ "./src/util/first_defined.js");
|
@@ -44721,11 +45367,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
44721
45367
|
/* harmony import */ var _get_button_size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./get_button_size */ "./src/util/get_button_size.js");
|
44722
45368
|
/* harmony import */ var _get_props__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./get_props */ "./src/util/get_props.js");
|
44723
45369
|
/* harmony import */ var _getters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./getters */ "./src/util/getters.js");
|
44724
|
-
/* harmony import */ var
|
44725
|
-
/* harmony import */ var
|
44726
|
-
/* harmony import */ var
|
44727
|
-
/* harmony import */ var
|
44728
|
-
/* harmony import */ var
|
45370
|
+
/* harmony import */ var _set_ref__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./set_ref */ "./src/util/set_ref.js");
|
45371
|
+
/* harmony import */ var _merge_refs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./merge_refs */ "./src/util/merge_refs.js");
|
45372
|
+
/* harmony import */ var _split_props__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./split_props */ "./src/util/split_props.js");
|
45373
|
+
/* harmony import */ var _tooltip_placement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./tooltip_placement */ "./src/util/tooltip_placement.js");
|
45374
|
+
/* harmony import */ var _use_value__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./use_value */ "./src/util/use_value.js");
|
45375
|
+
/* harmony import */ var _virtualized_list__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./virtualized_list */ "./src/util/virtualized_list.js");
|
45376
|
+
/* harmony import */ var _with_user_styles__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./with_user_styles */ "./src/util/with_user_styles.js");
|
44729
45377
|
// LICENSE_CODE ZON
|
44730
45378
|
|
44731
45379
|
|
@@ -44743,6 +45391,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
44743
45391
|
|
44744
45392
|
|
44745
45393
|
|
45394
|
+
|
45395
|
+
|
44746
45396
|
/***/ }),
|
44747
45397
|
|
44748
45398
|
/***/ "./src/util/merge_refs.js":
|
@@ -44780,6 +45430,55 @@ var mergeRefs = function mergeRefs() {
|
|
44780
45430
|
|
44781
45431
|
/***/ }),
|
44782
45432
|
|
45433
|
+
/***/ "./src/util/set_ref.js":
|
45434
|
+
/*!*****************************!*\
|
45435
|
+
!*** ./src/util/set_ref.js ***!
|
45436
|
+
\*****************************/
|
45437
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
45438
|
+
|
45439
|
+
"use strict";
|
45440
|
+
__webpack_require__.r(__webpack_exports__);
|
45441
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
45442
|
+
/* harmony export */ setRef: () => (/* binding */ setRef),
|
45443
|
+
/* harmony export */ setRefs: () => (/* binding */ setRefs),
|
45444
|
+
/* harmony export */ useSetRefsCallback: () => (/* binding */ useSetRefsCallback),
|
45445
|
+
/* harmony export */ useSetRefsEffect: () => (/* binding */ useSetRefsEffect)
|
45446
|
+
/* harmony export */ });
|
45447
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
45448
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
45449
|
+
// LICENSE_CODE ZON
|
45450
|
+
|
45451
|
+
|
45452
|
+
/*jslint react:true*/
|
45453
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
45454
|
+
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."); }
|
45455
|
+
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); }
|
45456
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
45457
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
45458
|
+
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; }
|
45459
|
+
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); }
|
45460
|
+
|
45461
|
+
var setRef = function setRef(instance, ref) {
|
45462
|
+
if (typeof ref == 'function') ref(instance);else if (_typeof(ref) == 'object') ref.current = instance;
|
45463
|
+
};
|
45464
|
+
var setRefs = function setRefs(instance, refs) {
|
45465
|
+
return refs.forEach(function (r) {
|
45466
|
+
return setRef(instance, r);
|
45467
|
+
});
|
45468
|
+
};
|
45469
|
+
var useSetRefsEffect = function useSetRefsEffect(instance, refs) {
|
45470
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
45471
|
+
return setRefs(instance, refs);
|
45472
|
+
}, [instance].concat(_toConsumableArray(refs)));
|
45473
|
+
};
|
45474
|
+
var useSetRefsCallback = function useSetRefsCallback(refs) {
|
45475
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (instance) {
|
45476
|
+
return setRefs(instance, refs);
|
45477
|
+
}, refs);
|
45478
|
+
};
|
45479
|
+
|
45480
|
+
/***/ }),
|
45481
|
+
|
44783
45482
|
/***/ "./src/util/split_props.js":
|
44784
45483
|
/*!*********************************!*\
|
44785
45484
|
!*** ./src/util/split_props.js ***!
|
@@ -44837,6 +45536,43 @@ var tooltipPlacement = function () {
|
|
44837
45536
|
|
44838
45537
|
/***/ }),
|
44839
45538
|
|
45539
|
+
/***/ "./src/util/use_value.js":
|
45540
|
+
/*!*******************************!*\
|
45541
|
+
!*** ./src/util/use_value.js ***!
|
45542
|
+
\*******************************/
|
45543
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
45544
|
+
|
45545
|
+
"use strict";
|
45546
|
+
__webpack_require__.r(__webpack_exports__);
|
45547
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
45548
|
+
/* harmony export */ useValue: () => (/* binding */ useValue)
|
45549
|
+
/* harmony export */ });
|
45550
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
45551
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
45552
|
+
// LICENSE_CODE ZON
|
45553
|
+
|
45554
|
+
|
45555
|
+
/*jslint react:true*/
|
45556
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
45557
|
+
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."); }
|
45558
|
+
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); }
|
45559
|
+
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; }
|
45560
|
+
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; } }
|
45561
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
45562
|
+
|
45563
|
+
var useValue = function useValue(value) {
|
45564
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(value),
|
45565
|
+
_useState2 = _slicedToArray(_useState, 2),
|
45566
|
+
val = _useState2[0],
|
45567
|
+
setVal = _useState2[1];
|
45568
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
45569
|
+
return setVal(value);
|
45570
|
+
}, [value]);
|
45571
|
+
return [val, setVal];
|
45572
|
+
};
|
45573
|
+
|
45574
|
+
/***/ }),
|
45575
|
+
|
44840
45576
|
/***/ "./src/util/virtualized_list.js":
|
44841
45577
|
/*!**************************************!*\
|
44842
45578
|
!*** ./src/util/virtualized_list.js ***!
|