intelicoreact 1.2.56 → 1.2.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +107 -50
- package/dist/Atomic/FormElements/Dropdown/Dropdown.scss +86 -11
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +2 -2
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +2 -2
- package/dist/Atomic/FormElements/Input/Input.js +2 -2
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +2 -2
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +2 -2
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +3 -3
- package/dist/Atomic/FormElements/InputMask/InputMask.js +3 -2
- package/dist/Atomic/FormElements/InputMask/functions.js +1 -1
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +2 -2
- package/dist/Atomic/FormElements/InputMask2/functions.js +1 -1
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +2 -2
- package/dist/Atomic/FormElements/InputMask3/functions.js +1 -1
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +2 -2
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +2 -2
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +2 -2
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +2 -2
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +2 -2
- package/dist/Atomic/FormElements/RangeList/RangeList.js +2 -2
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +2 -2
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +2 -2
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +86 -17
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.scss +44 -3
- package/dist/Atomic/FormElements/Text/Text.js +2 -2
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +2 -2
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +2 -2
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +2 -2
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +1 -1
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +3 -3
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +3 -3
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +2 -2
- package/dist/Atomic/UI/Chart/partial/utils.js +3 -3
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +2 -2
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +1 -1
- package/dist/Atomic/UI/Modal/Modal.js +7 -4
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +27 -11
- package/dist/Atomic/UI/ModalBackup/Modal.js +1 -1
- package/dist/Atomic/UI/NavLine/NavLine.js +2 -2
- package/dist/Atomic/UI/Table/Partials/TdCell.js +2 -2
- package/dist/Atomic/UI/Table/Partials/TdRow.js +2 -2
- package/dist/Atomic/UI/TagList/TagList.js +2 -2
- package/dist/Classes/AbortableFetch.js +2 -2
- package/dist/Classes/AnimatedHandler.js +4 -4
- package/dist/Classes/RESTAPI/index.js +2 -2
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +2 -2
- package/dist/Classes/RESTAPI/partials/ApiBase.js +3 -1
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +2 -2
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +2 -2
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +2 -2
- package/dist/Classes/RESTAPI/partials/Utils.js +2 -2
- package/dist/Classes/RESTAPI/partials/_utils.js +3 -3
- package/dist/Constants/index.constants.js +1 -1
- package/dist/Functions/fieldValueFormatters.js +2 -1
- package/dist/Functions/locale/createTranslator.js +2 -2
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +1 -1
- package/dist/Functions/useFieldFocus.js +2 -2
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +2 -2
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +2 -2
- package/dist/Functions/useFormTools/functions/General.js +2 -2
- package/dist/Functions/useFormTools/functions/RenderFields.js +2 -2
- package/dist/Functions/useFormTools/index.js +2 -2
- package/dist/Functions/useInputHighlightError.js +1 -1
- package/dist/Functions/useIsMobile.js +2 -2
- package/dist/Functions/useLocationParams.js +2 -2
- package/dist/Functions/useMetaInfo.js +1 -1
- package/dist/Functions/usePasswordChecker.js +2 -2
- package/dist/Functions/utils.js +8 -6
- package/package.json +1 -1
- package/dist/Functions/presets/inputMaskPreset.js +0 -176
|
@@ -9,10 +9,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.default = void 0;
|
|
11
11
|
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
12
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
13
|
|
|
14
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
+
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
|
|
18
18
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
@@ -37,8 +37,6 @@ var _Input = _interopRequireDefault(require("../../../Atomic/FormElements/Input/
|
|
|
37
37
|
|
|
38
38
|
var _RadioInput = _interopRequireDefault(require("../../../Atomic/FormElements/RadioInput/RadioInput"));
|
|
39
39
|
|
|
40
|
-
var _CustomIcons = require("../../../Molecular/CustomIcons");
|
|
41
|
-
|
|
42
40
|
var _DropdownLoader = _interopRequireDefault(require("./components/DropdownLoader"));
|
|
43
41
|
|
|
44
42
|
require("./Dropdown.scss");
|
|
@@ -47,11 +45,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
47
45
|
|
|
48
46
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
49
47
|
|
|
50
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
48
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
51
49
|
|
|
52
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
50
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
53
51
|
|
|
54
52
|
var RC = 'dropdown';
|
|
53
|
+
var MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH = 10;
|
|
55
54
|
|
|
56
55
|
var Dropdown = function Dropdown(_ref) {
|
|
57
56
|
var _options$find, _dropdownListWrapperR4, _dropdownListWrapperR5, _dropdownListRef$curr5, _dropdownListRef$curr6, _filteredOptions$find;
|
|
@@ -80,11 +79,15 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
80
79
|
noOptionsText = _ref$noOptionsText === void 0 ? 'No options available' : _ref$noOptionsText,
|
|
81
80
|
_ref$attributesOfNati = _ref.attributesOfNativeInput,
|
|
82
81
|
attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati,
|
|
83
|
-
isDoNotPullOutListOfMainContainer = _ref.isDoNotPullOutListOfMainContainer
|
|
82
|
+
isDoNotPullOutListOfMainContainer = _ref.isDoNotPullOutListOfMainContainer,
|
|
83
|
+
withMobileLogic = _ref.withMobileLogic,
|
|
84
|
+
_ref$minItemsForShowM = _ref.minItemsForShowMobileSearch,
|
|
85
|
+
minItemsForShowMobileSearch = _ref$minItemsForShowM === void 0 ? MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH : _ref$minItemsForShowM;
|
|
84
86
|
|
|
85
87
|
var _useIsMobile = (0, _useIsMobile2.default)(),
|
|
86
|
-
|
|
88
|
+
isMobileProp = _useIsMobile.isMobile;
|
|
87
89
|
|
|
90
|
+
var isMobile = isMobileProp && withMobileLogic;
|
|
88
91
|
var dropdownId = id || fieldKey;
|
|
89
92
|
|
|
90
93
|
var _useState = (0, _react.useState)(false),
|
|
@@ -114,23 +117,28 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
114
117
|
|
|
115
118
|
var _useState9 = (0, _react.useState)(false),
|
|
116
119
|
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
isSearchInputFocused = _useState10[0],
|
|
121
|
+
setIsSearchInputFocused = _useState10[1];
|
|
119
122
|
|
|
120
|
-
var _useState11 = (0, _react.useState)(
|
|
123
|
+
var _useState11 = (0, _react.useState)(null),
|
|
121
124
|
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
isScrollableList = _useState12[0],
|
|
126
|
+
setIsScrollableList = _useState12[1];
|
|
124
127
|
|
|
125
|
-
var _useState13 = (0, _react.useState)(
|
|
128
|
+
var _useState13 = (0, _react.useState)(false),
|
|
126
129
|
_useState14 = (0, _slicedToArray2.default)(_useState13, 2),
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
isFixedMaxHeight = _useState14[0],
|
|
131
|
+
setIsFixedMaxHeight = _useState14[1];
|
|
129
132
|
|
|
130
|
-
var _useState15 = (0, _react.useState)(
|
|
133
|
+
var _useState15 = (0, _react.useState)(0),
|
|
131
134
|
_useState16 = (0, _slicedToArray2.default)(_useState15, 2),
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
scrollTop = _useState16[0],
|
|
136
|
+
setScrollTop = _useState16[1];
|
|
137
|
+
|
|
138
|
+
var _useState17 = (0, _react.useState)(1),
|
|
139
|
+
_useState18 = (0, _slicedToArray2.default)(_useState17, 2),
|
|
140
|
+
scrollHeight = _useState18[0],
|
|
141
|
+
setScrollHeight = _useState18[1];
|
|
134
142
|
|
|
135
143
|
if (!options) return null;
|
|
136
144
|
|
|
@@ -184,6 +192,16 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
184
192
|
var onChangeHandler = function onChangeHandler(item) {
|
|
185
193
|
setIsOpen(false);
|
|
186
194
|
onChange(item.value);
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
var onKeyDown = function onKeyDown(e) {
|
|
198
|
+
if (![9, 13].includes(e.keyCode)) return false;
|
|
199
|
+
setIsOpen(false);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
var onKeyUp = function onKeyUp(e) {
|
|
203
|
+
if (![9, 13].includes(e.keyCode)) return false;
|
|
204
|
+
setIsOpen(true);
|
|
187
205
|
}; // decorator
|
|
188
206
|
|
|
189
207
|
|
|
@@ -318,7 +336,20 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
318
336
|
var dropdownList = document.createElement('div');
|
|
319
337
|
dropdownList.setAttribute('id', dropdownId);
|
|
320
338
|
dropdownList.classList.add('dropdown__container');
|
|
321
|
-
|
|
339
|
+
|
|
340
|
+
if (isMobile) {
|
|
341
|
+
dropdownList.addEventListener('click', function (e) {
|
|
342
|
+
if (e.target.id === dropdownId) setIsOpen(false);
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
try {
|
|
347
|
+
var _getListContainer2;
|
|
348
|
+
|
|
349
|
+
(_getListContainer2 = getListContainer()) === null || _getListContainer2 === void 0 ? void 0 : _getListContainer2.remove();
|
|
350
|
+
} finally {
|
|
351
|
+
getParentNode().append(dropdownList);
|
|
352
|
+
}
|
|
322
353
|
};
|
|
323
354
|
|
|
324
355
|
var getListContainer = function getListContainer() {
|
|
@@ -388,14 +419,28 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
388
419
|
return newData;
|
|
389
420
|
};
|
|
390
421
|
|
|
422
|
+
var getTotalOptions = (0, _react.useCallback)(function () {
|
|
423
|
+
return options === null || options === void 0 ? void 0 : options.reduce(function (result, item) {
|
|
424
|
+
if (item !== null && item !== void 0 && item.list) {
|
|
425
|
+
var _item$list;
|
|
426
|
+
|
|
427
|
+
result += (item === null || item === void 0 ? void 0 : (_item$list = item.list) === null || _item$list === void 0 ? void 0 : _item$list.length) || 0;
|
|
428
|
+
} else {
|
|
429
|
+
++result;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
return result;
|
|
433
|
+
}, 0);
|
|
434
|
+
}, [options]);
|
|
435
|
+
|
|
391
436
|
var getListMarkUp = function getListMarkUp() {
|
|
392
|
-
var _getSortedOptions;
|
|
437
|
+
var _cn3, _cn4, _getSortedOptions;
|
|
393
438
|
|
|
394
439
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
395
|
-
className: (0, _classnames.default)("".concat(RC, "__list-wrapper"), (0, _defineProperty2.default)(
|
|
440
|
+
className: (0, _classnames.default)("".concat(RC, "__list-wrapper"), (_cn3 = {}, (0, _defineProperty2.default)(_cn3, "".concat(RC, "__list-wrapper--fixed-height"), isFixedMaxHeight), (0, _defineProperty2.default)(_cn3, "".concat(RC, "__list-wrapper--with-bottom-shadow"), isScrollableList && isMobile), (0, _defineProperty2.default)(_cn3, "".concat(RC, "__list-wrapper--with-bottom-shadow-hidden"), scrollTop === scrollHeight), _cn3)),
|
|
396
441
|
ref: dropdownListWrapperRef
|
|
397
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
398
|
-
className: (0, _classnames.default)("".concat(RC, "__list-header"), (0, _defineProperty2.default)(
|
|
442
|
+
}, isMobile && /*#__PURE__*/_react.default.createElement("div", {
|
|
443
|
+
className: (0, _classnames.default)("".concat(RC, "__list-header"), (_cn4 = {}, (0, _defineProperty2.default)(_cn4, "".concat(RC, "__list-header-with-shadow"), isScrollableList && isMobile), (0, _defineProperty2.default)(_cn4, "".concat(RC, "__list-header-with-shadow-hidden"), scrollTop === 0), _cn4))
|
|
399
444
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
400
445
|
className: (0, _classnames.default)("".concat(RC, "__list-header-row"))
|
|
401
446
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -409,9 +454,9 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
409
454
|
onClick: function onClick() {
|
|
410
455
|
return setIsOpen(false);
|
|
411
456
|
}
|
|
412
|
-
}))), isSearchable && /*#__PURE__*/_react.default.createElement("div", {
|
|
457
|
+
}))), (isSearchable || getTotalOptions() > (minItemsForShowMobileSearch || MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH)) && /*#__PURE__*/_react.default.createElement("div", {
|
|
413
458
|
className: (0, _classnames.default)("".concat(RC, "__list-header-row"))
|
|
414
|
-
}, /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
459
|
+
}, /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({
|
|
415
460
|
ref: searchInputRef,
|
|
416
461
|
className: "".concat(RC, "__input"),
|
|
417
462
|
value: searchValue !== null && searchValue !== void 0 ? searchValue : selectedLabel,
|
|
@@ -432,7 +477,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
432
477
|
setIsOpen(true);
|
|
433
478
|
}
|
|
434
479
|
}
|
|
435
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
480
|
+
}, attributesOfNativeInput)))), /*#__PURE__*/_react.default.createElement("div", {
|
|
436
481
|
className: (0, _classnames.default)("".concat(RC, "__list"), (0, _defineProperty2.default)({}, "".concat(RC, "__list-top"), isListTop)),
|
|
437
482
|
ref: dropdownListRef
|
|
438
483
|
}, (_getSortedOptions = getSortedOptions(depend.options)) === null || _getSortedOptions === void 0 ? void 0 : _getSortedOptions.map(function (option) {
|
|
@@ -480,7 +525,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
480
525
|
}
|
|
481
526
|
}, [isDoNotPullOutListOfMainContainer, dropdownRef.current]);
|
|
482
527
|
(0, _react.useLayoutEffect)(function () {
|
|
483
|
-
var
|
|
528
|
+
var _getListContainer3;
|
|
484
529
|
|
|
485
530
|
if (!isMobile) {
|
|
486
531
|
window.addEventListener('resize', setListContainerStyles);
|
|
@@ -494,15 +539,15 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
494
539
|
window.removeEventListener('touchmove', closeList);
|
|
495
540
|
}
|
|
496
541
|
|
|
497
|
-
(
|
|
542
|
+
(_getListContainer3 = getListContainer()) === null || _getListContainer3 === void 0 ? void 0 : _getListContainer3.addEventListener('click', closeList);
|
|
498
543
|
return function () {
|
|
499
|
-
var
|
|
544
|
+
var _getListContainer4;
|
|
500
545
|
|
|
501
546
|
window.removeEventListener('resize', setListContainerStyles);
|
|
502
547
|
window.removeEventListener('mousewheel', closeList);
|
|
503
548
|
window.removeEventListener('scroll', closeList);
|
|
504
549
|
window.removeEventListener('touchmove', closeList);
|
|
505
|
-
(
|
|
550
|
+
(_getListContainer4 = getListContainer()) === null || _getListContainer4 === void 0 ? void 0 : _getListContainer4.removeEventListener('click', closeList);
|
|
506
551
|
};
|
|
507
552
|
}, [getListContainer]);
|
|
508
553
|
(0, _react.useLayoutEffect)(function () {
|
|
@@ -516,7 +561,6 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
516
561
|
}, [value]);
|
|
517
562
|
(0, _react.useEffect)(function () {
|
|
518
563
|
if (!isOpen) {
|
|
519
|
-
setIsFocusedByClick(false);
|
|
520
564
|
setIsSearchChanged(false);
|
|
521
565
|
}
|
|
522
566
|
|
|
@@ -528,17 +572,6 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
528
572
|
if (scrollReactionObj && (0, _typeof2.default)(scrollReactionObj) === 'object') removeEventListener('scroll', doScrollCallback);
|
|
529
573
|
};
|
|
530
574
|
}, [isOpen, dropdownListRef]);
|
|
531
|
-
|
|
532
|
-
var onKeyDown = function onKeyDown(e) {
|
|
533
|
-
if (![9, 13].includes(e.keyCode)) return false;
|
|
534
|
-
setIsOpen(false);
|
|
535
|
-
};
|
|
536
|
-
|
|
537
|
-
var onKeyUp = function onKeyUp(e) {
|
|
538
|
-
if (![9, 13].includes(e.keyCode)) return false;
|
|
539
|
-
setIsOpen(true);
|
|
540
|
-
};
|
|
541
|
-
|
|
542
575
|
(0, _react.useEffect)(function () {
|
|
543
576
|
if (!searchValue && isSearchInputFocused) {
|
|
544
577
|
setSearchValue(selectedLabel);
|
|
@@ -557,13 +590,13 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
557
590
|
if (isOpen && !isSearchInputFocused && searchInputRef !== null && searchInputRef !== void 0 && searchInputRef.current && !isMobile) searchInputRef === null || searchInputRef === void 0 ? void 0 : (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.focus();
|
|
558
591
|
|
|
559
592
|
if (isOpen) {
|
|
560
|
-
var
|
|
593
|
+
var _getListContainer5;
|
|
561
594
|
|
|
562
|
-
(
|
|
595
|
+
(_getListContainer5 = getListContainer()) === null || _getListContainer5 === void 0 ? void 0 : _getListContainer5.classList.add('dropdown__container--opened');
|
|
563
596
|
} else {
|
|
564
|
-
var
|
|
597
|
+
var _getListContainer6;
|
|
565
598
|
|
|
566
|
-
(
|
|
599
|
+
(_getListContainer6 = getListContainer()) === null || _getListContainer6 === void 0 ? void 0 : _getListContainer6.classList.remove('dropdown__container--opened');
|
|
567
600
|
}
|
|
568
601
|
|
|
569
602
|
if (!isOpen && isMobile) {
|
|
@@ -571,7 +604,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
571
604
|
}
|
|
572
605
|
}, [isOpen]);
|
|
573
606
|
(0, _react.useEffect)(function () {
|
|
574
|
-
if (isOpen && isMobile) {
|
|
607
|
+
if (isOpen && isMobile && dropdownListRef !== null && dropdownListRef !== void 0 && dropdownListRef.current) {
|
|
575
608
|
var _dropdownListRef$curr, _dropdownListRef$curr2;
|
|
576
609
|
|
|
577
610
|
setIsScrollableList((dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr = dropdownListRef.current) === null || _dropdownListRef$curr === void 0 ? void 0 : _dropdownListRef$curr.scrollHeight) > (dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr2 = dropdownListRef.current) === null || _dropdownListRef$curr2 === void 0 ? void 0 : _dropdownListRef$curr2.clientHeight));
|
|
@@ -582,7 +615,31 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
582
615
|
setIsFixedMaxHeight((dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr3 = dropdownListRef.current) === null || _dropdownListRef$curr3 === void 0 ? void 0 : _dropdownListRef$curr3.scrollHeight) > (dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr4 = dropdownListRef.current) === null || _dropdownListRef$curr4 === void 0 ? void 0 : _dropdownListRef$curr4.clientHeight));
|
|
583
616
|
}
|
|
584
617
|
}
|
|
585
|
-
}, [isOpen, isMobile, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr5 = dropdownListRef.current) === null || _dropdownListRef$curr5 === void 0 ? void 0 : _dropdownListRef$curr5.scrollHeight, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr6 = dropdownListRef.current) === null || _dropdownListRef$curr6 === void 0 ? void 0 : _dropdownListRef$curr6.clientHeight]);
|
|
618
|
+
}, [isOpen, isMobile, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr5 = dropdownListRef.current) === null || _dropdownListRef$curr5 === void 0 ? void 0 : _dropdownListRef$curr5.scrollHeight, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr6 = dropdownListRef.current) === null || _dropdownListRef$curr6 === void 0 ? void 0 : _dropdownListRef$curr6.clientHeight]);
|
|
619
|
+
(0, _react.useEffect)(function () {
|
|
620
|
+
var setScrollTopValue = function setScrollTopValue(e) {
|
|
621
|
+
setScrollTop(e.target.scrollTop);
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
if (isOpen && isMobile && dropdownListRef !== null && dropdownListRef !== void 0 && dropdownListRef.current) {
|
|
625
|
+
var _dropdownListRef$curr7;
|
|
626
|
+
|
|
627
|
+
dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr7 = dropdownListRef.current) === null || _dropdownListRef$curr7 === void 0 ? void 0 : _dropdownListRef$curr7.addEventListener('scroll', setScrollTopValue);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
return function () {
|
|
631
|
+
var _dropdownListRef$curr8;
|
|
632
|
+
|
|
633
|
+
dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr8 = dropdownListRef.current) === null || _dropdownListRef$curr8 === void 0 ? void 0 : _dropdownListRef$curr8.removeEventListener('scroll', setScrollTopValue);
|
|
634
|
+
};
|
|
635
|
+
}, [isOpen, isMobile, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
|
|
636
|
+
(0, _react.useEffect)(function () {
|
|
637
|
+
if (dropdownListRef !== null && dropdownListRef !== void 0 && dropdownListRef.current) {
|
|
638
|
+
var _dropdownListRef$curr9, _dropdownListRef$curr10;
|
|
639
|
+
|
|
640
|
+
setScrollHeight((dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr9 = dropdownListRef.current) === null || _dropdownListRef$curr9 === void 0 ? void 0 : _dropdownListRef$curr9.scrollHeight) - (dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr10 = dropdownListRef.current) === null || _dropdownListRef$curr10 === void 0 ? void 0 : _dropdownListRef$curr10.clientHeight));
|
|
641
|
+
}
|
|
642
|
+
}, [scrollTop, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
|
|
586
643
|
var postfixText = selectedLabel && ((_filteredOptions$find = filteredOptions.find(function (option) {
|
|
587
644
|
return option.value === value;
|
|
588
645
|
})) === null || _filteredOptions$find === void 0 ? void 0 : _filteredOptions$find.postfix) || null;
|
|
@@ -626,7 +683,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
626
683
|
}, postfixText)), /*#__PURE__*/_react.default.createElement("span", {
|
|
627
684
|
className: (0, _classnames.default)("".concat(RC, "__arrow"), (0, _defineProperty2.default)({}, "".concat(RC, "__arrow_active"), isOpen)),
|
|
628
685
|
onClick: toggleList
|
|
629
|
-
}, isMobile ? /*#__PURE__*/_react.default.createElement(
|
|
686
|
+
}, isMobile ? /*#__PURE__*/_react.default.createElement(_reactFeather.Code, null) : isOpen ? /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronUp, null) : /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronDown, null))), isOpen && renderListContainer());
|
|
630
687
|
};
|
|
631
688
|
|
|
632
689
|
var _default = Dropdown;
|
|
@@ -283,6 +283,22 @@
|
|
|
283
283
|
|
|
284
284
|
@media (max-width: 767px) {
|
|
285
285
|
.dropdown {
|
|
286
|
+
&__arrow {
|
|
287
|
+
top: 50%!important;
|
|
288
|
+
transform: translateY(-50%) rotate(90deg)!important;
|
|
289
|
+
right: $spacing-m!important;
|
|
290
|
+
width: 16px;
|
|
291
|
+
height: 16px;
|
|
292
|
+
text-align: center;
|
|
293
|
+
|
|
294
|
+
svg {
|
|
295
|
+
display: flex;
|
|
296
|
+
position: relative!important;
|
|
297
|
+
top: 5px!important;
|
|
298
|
+
right: unset!important;
|
|
299
|
+
height: 12px;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
286
302
|
&__container {
|
|
287
303
|
overflow: hidden!important;
|
|
288
304
|
|
|
@@ -311,6 +327,23 @@
|
|
|
311
327
|
border-radius: $spacing-l!important;
|
|
312
328
|
overflow: hidden;
|
|
313
329
|
|
|
330
|
+
&--with-bottom-shadow::after {
|
|
331
|
+
content: "";
|
|
332
|
+
width: 100%;
|
|
333
|
+
height: 15px;
|
|
334
|
+
position: absolute;
|
|
335
|
+
bottom: 0;
|
|
336
|
+
background: linear-gradient(180deg, rgba(212, 218, 230, 0.50) 0%, rgba(212, 218, 230, 0.30) 21.35%, rgba(247, 248, 250, 0.00) 100%);
|
|
337
|
+
z-index: 6;
|
|
338
|
+
transform: rotate(180deg);
|
|
339
|
+
opacity: 1;
|
|
340
|
+
transition: all 0.2s;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
&--with-bottom-shadow-hidden::after {
|
|
344
|
+
opacity: 0;
|
|
345
|
+
}
|
|
346
|
+
|
|
314
347
|
&--fixed-height {
|
|
315
348
|
height: 500px!important;
|
|
316
349
|
}
|
|
@@ -348,31 +381,63 @@
|
|
|
348
381
|
background: unset!important;
|
|
349
382
|
}
|
|
350
383
|
}
|
|
351
|
-
}
|
|
352
384
|
|
|
353
|
-
|
|
385
|
+
|
|
386
|
+
.input__close {
|
|
387
|
+
padding: $spacing-xs;
|
|
388
|
+
border-radius: 2px;
|
|
389
|
+
background: var(--bg-gray-box, #F0F1F4);
|
|
390
|
+
width: 24px;
|
|
391
|
+
min-width: 24px;
|
|
392
|
+
height: 24px;
|
|
393
|
+
box-sizing: border-box;
|
|
394
|
+
display: flex;
|
|
395
|
+
align-items: center;
|
|
396
|
+
|
|
397
|
+
&::before,
|
|
354
398
|
&::after {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
height: 15px;
|
|
361
|
-
background: linear-gradient(180deg, rgba(212, 218, 230, 0.50) 0%, rgba(212, 218, 230, 0.30) 21.35%, rgba(247, 248, 250, 0.00) 100%);
|
|
399
|
+
height: 12px;
|
|
400
|
+
top: 50%;
|
|
401
|
+
transform: translateY(-50%) rotate(45deg);
|
|
402
|
+
border-radius: 8px;
|
|
403
|
+
background-color: #171D33;
|
|
362
404
|
}
|
|
405
|
+
&::after {
|
|
406
|
+
transform: translateY(-50%) rotate(-45deg);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
&-with-shadow::after {
|
|
412
|
+
content: "";
|
|
413
|
+
position: absolute;
|
|
414
|
+
left: 0;
|
|
415
|
+
bottom: -15px;
|
|
416
|
+
width: 100%;
|
|
417
|
+
height: 15px;
|
|
418
|
+
background: linear-gradient(180deg, rgba(212, 218, 230, 0.50) 0%, rgba(212, 218, 230, 0.30) 21.35%, rgba(247, 248, 250, 0.00) 100%);
|
|
419
|
+
z-index: 10;
|
|
420
|
+
opacity: 1;
|
|
421
|
+
transition: all 0.2s;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
&-with-shadow-hidden::after {
|
|
425
|
+
opacity: 0;
|
|
363
426
|
}
|
|
364
427
|
}
|
|
365
428
|
|
|
366
429
|
&-close-icon {
|
|
367
430
|
display: flex;
|
|
368
431
|
align-items: center;
|
|
432
|
+
justify-content: center;
|
|
369
433
|
position: absolute;
|
|
370
434
|
top: 0;
|
|
371
435
|
right: 0;
|
|
372
436
|
height: 100%;
|
|
373
437
|
padding: $spacing-m;
|
|
374
|
-
width:
|
|
375
|
-
height:
|
|
438
|
+
width: 50px;
|
|
439
|
+
height: 50px;
|
|
440
|
+
box-sizing: border-box;
|
|
376
441
|
|
|
377
442
|
svg {
|
|
378
443
|
width: 16px;
|
|
@@ -406,6 +471,15 @@
|
|
|
406
471
|
padding: 10px $spacing-s!important;
|
|
407
472
|
line-height: 24px;
|
|
408
473
|
|
|
474
|
+
&-label {
|
|
475
|
+
white-space: wrap!important;
|
|
476
|
+
|
|
477
|
+
span.bg--yellow {
|
|
478
|
+
background-color: unset!important;
|
|
479
|
+
font-weight: 600;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
409
483
|
&_active {
|
|
410
484
|
border-radius: 6px;
|
|
411
485
|
background: var(--bg-gray-box, #F0F1F4)!important;
|
|
@@ -413,3 +487,4 @@
|
|
|
413
487
|
}
|
|
414
488
|
}
|
|
415
489
|
}
|
|
490
|
+
|
|
@@ -29,9 +29,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
29
|
|
|
30
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
31
|
|
|
32
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
32
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
33
|
|
|
34
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
34
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
35
35
|
|
|
36
36
|
var LoadedContent = function LoadedContent(props) {
|
|
37
37
|
var RC = props.RC,
|
|
@@ -33,9 +33,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
33
33
|
|
|
34
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
35
|
|
|
36
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
36
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
37
|
|
|
38
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
38
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
39
|
|
|
40
40
|
var DEFAULT_LABEL_PREFIX = 'Please attach';
|
|
41
41
|
var MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
@@ -35,9 +35,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
35
35
|
|
|
36
36
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
37
|
|
|
38
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
38
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
39
39
|
|
|
40
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
40
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
41
41
|
|
|
42
42
|
var HIDE_SYMBOL = "\u2022";
|
|
43
43
|
/**
|
|
@@ -33,9 +33,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
33
33
|
|
|
34
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
35
|
|
|
36
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
36
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
37
|
|
|
38
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
38
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
39
|
|
|
40
40
|
var checkFormat = function checkFormat(date, format) {
|
|
41
41
|
var momentObj = (0, _momentTimezone.default)(date, format);
|
|
@@ -33,9 +33,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
33
33
|
|
|
34
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
35
|
|
|
36
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
36
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
37
|
|
|
38
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
38
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
39
|
|
|
40
40
|
var classNames = require('classnames');
|
|
41
41
|
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.useToggle = exports.useClickOutside = exports.getIsDateValid = exports.getActualDateRange = exports.MAIN_TIME_FORMAT = exports.MAIN_FORMAT = exports.MAIN_DATE_FORMAT = exports.INTERVALS = exports.CUSTOM_INTERVAL_KEY_TEXT = exports.CUSTOM_INTERVAL_KEY = exports.ALL_TIME_KEY = void 0;
|
|
11
11
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
|
|
@@ -23,9 +23,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
25
|
|
|
26
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
26
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
27
|
|
|
28
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
29
|
|
|
30
30
|
var getIsDateValid = function getIsDateValid(date) {
|
|
31
31
|
return (0, _momentTimezone.default)(date).isValid();
|
|
@@ -43,9 +43,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
43
43
|
|
|
44
44
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
45
45
|
|
|
46
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
46
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
47
47
|
|
|
48
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
48
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
49
49
|
|
|
50
50
|
function InputMask() {
|
|
51
51
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -395,6 +395,7 @@ function InputMask() {
|
|
|
395
395
|
|
|
396
396
|
var charCenterX = charX + charWidth / 2; // If Char X-Coord Out Of Range
|
|
397
397
|
|
|
398
|
+
// If Char X-Coord Out Of Range
|
|
398
399
|
if (!charX || minX > charCenterX || maxX < charCenterX) return resObj;
|
|
399
400
|
if (resObj.index === null || minX <= charCenterX && charCenterX >= maxX && charCenterX < resObj.charX) return {
|
|
400
401
|
index: index,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.voidFn = exports.
|
|
6
|
+
exports.voidFn = exports.selectElementContents = exports.resetSelectionText = exports.isUpperCaseLetter = exports.isLowerCaseLetter = exports.isLetterMaskChar = exports.isLetter = exports.isDigitMaskChar = exports.isDigit = exports.getSelectionText = exports.copyToClipboard = void 0;
|
|
7
7
|
|
|
8
8
|
var _config = require("./config");
|
|
9
9
|
|
|
@@ -43,9 +43,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
43
43
|
|
|
44
44
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
45
45
|
|
|
46
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
46
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
47
47
|
|
|
48
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
48
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
49
49
|
|
|
50
50
|
function InputMask2() {
|
|
51
51
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.voidFn = exports.
|
|
6
|
+
exports.voidFn = exports.selectElementContents = exports.resetSelectionText = exports.isUpperCaseLetter = exports.isLowerCaseLetter = exports.isLetterMaskChar = exports.isLetter = exports.isDigitMaskChar = exports.isDigit = exports.getSelectionText = exports.copyToClipboard = void 0;
|
|
7
7
|
|
|
8
8
|
var _config = require("./config");
|
|
9
9
|
|