intelicoreact 1.3.61 → 1.3.63
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/ActionAlert/ActionAlert.js +9 -1
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +10 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.js +24 -4
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +10 -1
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +14 -2
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +54 -5
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +21 -3
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +145 -52
- package/dist/Atomic/FormElements/Dropdown/Dropdown.scss +1 -1
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +7 -1
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +53 -12
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +15 -3
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +29 -15
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +15 -5
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +26 -6
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +35 -19
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +38 -9
- package/dist/Atomic/FormElements/Input/Input.js +57 -24
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +31 -4
- package/dist/Atomic/FormElements/InputColor/InputColor.js +14 -4
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +27 -6
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +42 -7
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.scss +1 -1
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +21 -3
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +81 -58
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +41 -6
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +8 -1
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +44 -14
- package/dist/Atomic/FormElements/InputLink/InputLink.js +23 -6
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +4 -0
- package/dist/Atomic/FormElements/InputMask/InputMask.js +208 -77
- package/dist/Atomic/FormElements/InputMask/functions.js +28 -2
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +119 -43
- package/dist/Atomic/FormElements/InputMask2/functions.js +28 -2
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +137 -44
- package/dist/Atomic/FormElements/InputMask3/functions.js +28 -2
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +17 -3
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +24 -5
- package/dist/Atomic/FormElements/Label/Label.js +9 -1
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +73 -35
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +15 -3
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +44 -23
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +17 -7
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +14 -3
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +10 -1
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +14 -3
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +23 -3
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +34 -17
- package/dist/Atomic/FormElements/RangeList/RangeList.js +25 -6
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +11 -1
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +72 -14
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +124 -40
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +10 -1
- package/dist/Atomic/FormElements/Switcher/Switcher.js +10 -1
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +13 -1
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +10 -1
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +17 -2
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +17 -3
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +11 -1
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +29 -6
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +3 -2
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +12 -1
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +152 -56
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.scss +1 -1
- package/dist/Atomic/FormElements/Text/Text.js +16 -10
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +9 -1
- package/dist/Atomic/FormElements/Textarea/Textarea.js +16 -3
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +35 -6
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +13 -4
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +21 -7
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +35 -8
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +91 -0
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +18 -5
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +10 -3
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +11 -3
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +2 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +12 -5
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
- package/dist/Atomic/Layout/Header/Header.js +15 -3
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +20 -3
- package/dist/Atomic/Layout/Spinner/Spinner.js +8 -1
- package/dist/Atomic/UI/Accordion/Accordion.js +19 -3
- package/dist/Atomic/UI/Accordion/AccordionItem.js +23 -9
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +32 -7
- package/dist/Atomic/UI/AccordionText/AccordionText.js +15 -3
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +21 -4
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +15 -3
- package/dist/Atomic/UI/Alert/Alert.js +17 -3
- package/dist/Atomic/UI/Arrow/Arrow.js +16 -3
- package/dist/Atomic/UI/Box/Box.js +9 -3
- package/dist/Atomic/UI/Button/Button.js +11 -2
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +10 -1
- package/dist/Atomic/UI/Chart/Chart.js +29 -4
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +19 -11
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +12 -1
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +34 -11
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +56 -82
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +19 -15
- package/dist/Atomic/UI/Chart/partial/utils.js +20 -6
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +13 -3
- package/dist/Atomic/UI/DateTime/DateTime.js +14 -3
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +16 -4
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +11 -3
- package/dist/Atomic/UI/DoubleString/DoubleString.js +17 -5
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +10 -3
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +52 -17
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +29 -1
- package/dist/Atomic/UI/Hint/Hint.js +30 -5
- package/dist/Atomic/UI/Modal/Modal.js +28 -6
- package/dist/Atomic/UI/Modal/ModalHOC.js +9 -1
- package/dist/Atomic/UI/Modal/ModalMobile.scss +1 -1
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +7 -1
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +8 -1
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +49 -32
- package/dist/Atomic/UI/ModalBackup/Modal.js +90 -65
- package/dist/Atomic/UI/ModalBackup/ModalHOC.js +21 -12
- package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +11 -6
- package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +19 -15
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +21 -6
- package/dist/Atomic/UI/NavLine/NavLine.js +55 -26
- package/dist/Atomic/UI/NavLine/Tabs.js +3 -2
- package/dist/Atomic/UI/PageTitle/PageTitle.js +10 -2
- package/dist/Atomic/UI/PieChart/PieChart.js +10 -1
- package/dist/Atomic/UI/Price/Price.js +8 -3
- package/dist/Atomic/UI/PriceRange/PriceRange.js +7 -1
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +16 -1
- package/dist/Atomic/UI/Status/Status.js +8 -1
- package/dist/Atomic/UI/Table/Partials/TdCell.js +29 -5
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +11 -1
- package/dist/Atomic/UI/Table/Partials/TdRow.js +17 -5
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +14 -3
- package/dist/Atomic/UI/Table/Table.js +12 -1
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +18 -2
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +9 -1
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +4 -1
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +13 -1
- package/dist/Atomic/UI/Tag/Tag.js +14 -3
- package/dist/Atomic/UI/TagList/TagList.js +35 -19
- package/dist/Atomic/UI/UserBox/UserBox.js +13 -1
- package/dist/Classes/AbortableFetch.js +93 -36
- package/dist/Classes/AnimatedHandler.js +7 -3
- package/dist/Classes/RESTAPI/index.js +43 -39
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +93 -35
- package/dist/Classes/RESTAPI/partials/ApiBase.js +9 -1
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +19 -7
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +35 -28
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +44 -21
- package/dist/Classes/RESTAPI/partials/Utils.js +19 -6
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +6 -2
- package/dist/Classes/RESTAPI/partials/_utils.js +36 -13
- package/dist/Constants/index.constants.js +15 -8
- package/dist/Functions/Portal.js +16 -5
- package/dist/Functions/customEventListener.js +17 -4
- package/dist/Functions/fieldValueFormatters.js +83 -43
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +26 -23
- package/dist/Functions/locale/createTranslator.js +9 -4
- package/dist/Functions/operations.js +22 -12
- package/dist/Functions/presets/inputMaskPresets.js +11 -9
- package/dist/Functions/presets/inputPresets.js +11 -8
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +9 -7
- package/dist/Functions/schemas.js +13 -6
- package/dist/Functions/useBodyScrollLock.js +6 -1
- package/dist/Functions/useClickOutside.js +4 -0
- package/dist/Functions/useDebounce.js +7 -2
- package/dist/Functions/useFieldFocus.js +18 -6
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +9 -0
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +23 -12
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +15 -6
- package/dist/Functions/useFormTools/functions/General.js +28 -18
- package/dist/Functions/useFormTools/functions/RenderFields.js +11 -2
- package/dist/Functions/useFormTools/functions/usePrevious.js +5 -1
- package/dist/Functions/useFormTools/index.js +144 -85
- package/dist/Functions/useInputHighlightError.js +12 -3
- package/dist/Functions/useIsMobile.js +16 -10
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +7 -1
- package/dist/Functions/useKeyPress/useKeyPress.js +9 -1
- package/dist/Functions/useLocalStorage.js +9 -1
- package/dist/Functions/useLocationParams.js +5 -4
- package/dist/Functions/useMetaInfo.js +10 -3
- package/dist/Functions/useMouseUpOutside.js +3 -0
- package/dist/Functions/useOnlineStatus.js +9 -1
- package/dist/Functions/usePasswordChecker.js +20 -4
- package/dist/Functions/usePrevious.js +5 -1
- package/dist/Functions/useResize.js +10 -2
- package/dist/Functions/useScrollTo.js +7 -2
- package/dist/Functions/useToggle.js +5 -1
- package/dist/Functions/utils.js +128 -49
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +9 -2
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +9 -2
- package/dist/Molecular/CustomIcons/components/AppStore.js +9 -2
- package/dist/Molecular/CustomIcons/components/Arrow.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +9 -2
- package/dist/Molecular/CustomIcons/components/Bell.js +9 -2
- package/dist/Molecular/CustomIcons/components/Button.js +9 -2
- package/dist/Molecular/CustomIcons/components/Campaigns.js +9 -2
- package/dist/Molecular/CustomIcons/components/Check.js +9 -2
- package/dist/Molecular/CustomIcons/components/Check2.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/Close.js +9 -2
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +9 -2
- package/dist/Molecular/CustomIcons/components/Delete.js +9 -2
- package/dist/Molecular/CustomIcons/components/Edit.js +9 -2
- package/dist/Molecular/CustomIcons/components/Email.js +9 -2
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +9 -2
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +9 -2
- package/dist/Molecular/CustomIcons/components/Flows.js +9 -2
- package/dist/Molecular/CustomIcons/components/Gift.js +9 -2
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +9 -2
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +9 -2
- package/dist/Molecular/CustomIcons/components/Home.js +9 -2
- package/dist/Molecular/CustomIcons/components/Home2.js +9 -2
- package/dist/Molecular/CustomIcons/components/Key.js +9 -2
- package/dist/Molecular/CustomIcons/components/Landers.js +9 -2
- package/dist/Molecular/CustomIcons/components/Lock.js +9 -2
- package/dist/Molecular/CustomIcons/components/Mail.js +9 -2
- package/dist/Molecular/CustomIcons/components/Mastercard.js +9 -2
- package/dist/Molecular/CustomIcons/components/Minus.js +9 -2
- package/dist/Molecular/CustomIcons/components/Offers.js +9 -2
- package/dist/Molecular/CustomIcons/components/Pause.js +9 -2
- package/dist/Molecular/CustomIcons/components/PayPal.js +9 -2
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +9 -2
- package/dist/Molecular/CustomIcons/components/Phone.js +9 -2
- package/dist/Molecular/CustomIcons/components/Play.js +9 -2
- package/dist/Molecular/CustomIcons/components/Plus.js +9 -2
- package/dist/Molecular/CustomIcons/components/Profile.js +9 -2
- package/dist/Molecular/CustomIcons/components/QRCode.js +9 -2
- package/dist/Molecular/CustomIcons/components/Rectangle.js +9 -2
- package/dist/Molecular/CustomIcons/components/Revert.js +9 -2
- package/dist/Molecular/CustomIcons/components/Star.js +9 -2
- package/dist/Molecular/CustomIcons/components/Star2.js +9 -2
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +9 -2
- package/dist/Molecular/CustomIcons/components/Trash.js +9 -2
- package/dist/Molecular/CustomIcons/components/TrashRed.js +9 -2
- package/dist/Molecular/CustomIcons/components/Triggers.js +9 -2
- package/dist/Molecular/CustomIcons/components/User.js +9 -2
- package/dist/Molecular/CustomIcons/components/Visa.js +9 -2
- package/dist/Molecular/CustomIcons/components/X.js +9 -2
- package/dist/Molecular/CustomIcons/index.js +122 -0
- package/dist/Molecular/FormElement/FormElement.js +12 -1
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +31 -30
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +12 -9
- package/dist/Molecular/InputAddress/InputAddress.js +114 -65
- package/dist/Molecular/InputAddress/InputAddress.scss +1 -1
- package/dist/Molecular/InputPassword/InputPassword.js +19 -5
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/Functions/utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -13,20 +14,28 @@ exports.transformLocalTimeToUTC = transformLocalTimeToUTC;
|
|
|
13
14
|
exports.transformUTCHoursToLocal = transformUTCHoursToLocal;
|
|
14
15
|
exports.transformUTCTimeToLocal = transformUTCTimeToLocal;
|
|
15
16
|
exports.useOutsideToggle = void 0;
|
|
17
|
+
|
|
16
18
|
var _react = require("react");
|
|
19
|
+
|
|
17
20
|
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
|
21
|
+
|
|
18
22
|
var _index = require("../Constants/index.constants");
|
|
19
|
-
const getIsOnlyAnObject = input => typeof input === "object" && input instanceof Object && !Array.isArray(input);
|
|
20
23
|
|
|
24
|
+
const getIsOnlyAnObject = input => typeof input === "object" && input instanceof Object && !Array.isArray(input);
|
|
21
25
|
/* eslint-disable guard-for-in, no-unused-vars */
|
|
26
|
+
|
|
27
|
+
|
|
22
28
|
exports.getIsOnlyAnObject = getIsOnlyAnObject;
|
|
29
|
+
|
|
23
30
|
const handleObjectChange = (updateObject, updateFunction) => function (data) {
|
|
24
31
|
let prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
25
32
|
let isNumber = arguments.length > 2 ? arguments[2] : undefined;
|
|
26
33
|
let value;
|
|
34
|
+
|
|
27
35
|
if (data !== null && data !== void 0 && data.target) {
|
|
28
36
|
value = data.target.type === "checkbox" ? data.target.checked : data.target.value;
|
|
29
37
|
} else value = data;
|
|
38
|
+
|
|
30
39
|
value = isNumber ? Number(value) : value;
|
|
31
40
|
const props = prop.split(".");
|
|
32
41
|
const currentObject = props.reduce((res, chapter, index) => {
|
|
@@ -36,13 +45,16 @@ const handleObjectChange = (updateObject, updateFunction) => function (data) {
|
|
|
36
45
|
currentObject[props.pop()] = value;
|
|
37
46
|
updateFunction();
|
|
38
47
|
};
|
|
48
|
+
|
|
39
49
|
exports.handleObjectChange = handleObjectChange;
|
|
50
|
+
|
|
40
51
|
const useOutsideToggle = (ref, setOut, open) => {
|
|
41
52
|
function handleClickOutside(event) {
|
|
42
53
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
43
54
|
setOut(open);
|
|
44
55
|
}
|
|
45
56
|
}
|
|
57
|
+
|
|
46
58
|
(0, _react.useEffect)(() => {
|
|
47
59
|
document.addEventListener("mouseup", handleClickOutside);
|
|
48
60
|
return () => {
|
|
@@ -50,37 +62,47 @@ const useOutsideToggle = (ref, setOut, open) => {
|
|
|
50
62
|
document.removeEventListener("mouseup", handleClickOutside);
|
|
51
63
|
};
|
|
52
64
|
}, [ref]);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// export const clone = obj => {
|
|
65
|
+
}; // export const clone = obj => {
|
|
56
66
|
// const data = obj instanceof Array ? [] : {};
|
|
57
67
|
// for (const i in obj) data[i] = typeof obj[i] === 'object' && obj[i] != null ? clone(obj[i]) : obj[i];
|
|
58
68
|
// return data;
|
|
59
69
|
// };
|
|
60
70
|
// ! Этот правильнее
|
|
71
|
+
|
|
72
|
+
|
|
61
73
|
exports.useOutsideToggle = useOutsideToggle;
|
|
74
|
+
|
|
62
75
|
const clone = input => {
|
|
63
76
|
if (input === null || typeof input !== "object") return input;
|
|
64
77
|
const data = input instanceof Array ? [] : {};
|
|
78
|
+
|
|
65
79
|
for (const i in input) data[i] = clone(input[i]);
|
|
80
|
+
|
|
66
81
|
return data;
|
|
67
82
|
};
|
|
83
|
+
|
|
68
84
|
exports.clone = clone;
|
|
69
|
-
const getResponseClone = async res => await (typeof (res === null || res === void 0 ? void 0 : res.clone) === "function" ? res.clone() : clone(res));
|
|
70
85
|
|
|
71
|
-
//TimeUtils
|
|
86
|
+
const getResponseClone = async res => await (typeof (res === null || res === void 0 ? void 0 : res.clone) === "function" ? res.clone() : clone(res)); //TimeUtils
|
|
87
|
+
|
|
88
|
+
|
|
72
89
|
exports.getResponseClone = getResponseClone;
|
|
90
|
+
|
|
73
91
|
function transformUTCTimeToLocal(date) {
|
|
74
92
|
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "YYYY-MM-DD HH:mm:ss";
|
|
75
93
|
if (!date) return;
|
|
94
|
+
|
|
76
95
|
const utcDate = _momentTimezone.default.utc(date).toDate();
|
|
96
|
+
|
|
77
97
|
return (0, _momentTimezone.default)(utcDate, format).local().format(format);
|
|
78
98
|
}
|
|
99
|
+
|
|
79
100
|
function transformLocalTimeToUTC(date) {
|
|
80
101
|
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "YYYY-MM-DD HH:mm:ss";
|
|
81
102
|
if (!date) return;
|
|
82
103
|
return (0, _momentTimezone.default)(date, format).utc().format(format);
|
|
83
104
|
}
|
|
105
|
+
|
|
84
106
|
function transformUTCHoursToLocal(time) {
|
|
85
107
|
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "HH:mm:ss";
|
|
86
108
|
if (!time) return;
|
|
@@ -90,20 +112,24 @@ function transformUTCHoursToLocal(time) {
|
|
|
90
112
|
let mm = Number(splitedTime[1]);
|
|
91
113
|
const ss = splitedTime[2];
|
|
92
114
|
mm = mm + offset;
|
|
115
|
+
|
|
93
116
|
while (mm > 59) {
|
|
94
117
|
mm -= 60;
|
|
95
118
|
HH += 1;
|
|
96
119
|
}
|
|
120
|
+
|
|
97
121
|
if (HH > 23) HH -= 24;
|
|
122
|
+
|
|
98
123
|
while (mm < 0) {
|
|
99
124
|
mm += 60;
|
|
100
125
|
HH -= 1;
|
|
101
126
|
}
|
|
127
|
+
|
|
102
128
|
if (HH < 0) HH += 24;
|
|
103
129
|
return "".concat(HH, ":").concat(mm, ":").concat(ss);
|
|
104
|
-
}
|
|
130
|
+
} //? Намерянно значением по умолчанию назначаю самый информационно-маленький паттерн
|
|
131
|
+
|
|
105
132
|
|
|
106
|
-
//? Намерянно значением по умолчанию назначаю самый информационно-маленький паттерн
|
|
107
133
|
function transformDateOrTimeOrTogetherToFormat(data) {
|
|
108
134
|
let outputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "HH:mm";
|
|
109
135
|
let additional = arguments.length > 2 ? arguments[2] : undefined;
|
|
@@ -113,24 +139,22 @@ function transformDateOrTimeOrTogetherToFormat(data) {
|
|
|
113
139
|
parseFormat,
|
|
114
140
|
isReturnAsMomentInstance
|
|
115
141
|
} = getIsOnlyAnObject(additional) ? additional : {};
|
|
142
|
+
|
|
116
143
|
if (typeof data !== "string" && typeof data !== "number") {
|
|
117
144
|
return isReturnAsMomentInstance ? (0, _momentTimezone.default)("error") : ERROR_MESSGE;
|
|
118
|
-
}
|
|
145
|
+
} //? Игнорируем parseFormat, если data пришла как timestamp или если parseFormat не строка
|
|
119
146
|
|
|
120
|
-
//? Игнорируем parseFormat, если data пришла как timestamp или если parseFormat не строка
|
|
121
|
-
const momentArgs = [data, ...(!Number.isNaN(Number(data)) || typeof parseFormat === "string" ? [] : [parseFormat])];
|
|
122
147
|
|
|
123
|
-
//? Задача получить moment-экземпляр, валидный либо невалидный
|
|
124
|
-
const momentInstance = (() => {
|
|
125
|
-
let instance = (0, _momentTimezone.default)(...momentArgs);
|
|
148
|
+
const momentArgs = [data, ...(!Number.isNaN(Number(data)) || typeof parseFormat === "string" ? [] : [parseFormat])]; //? Задача получить moment-экземпляр, валидный либо невалидный
|
|
126
149
|
|
|
127
|
-
|
|
150
|
+
const momentInstance = (() => {
|
|
151
|
+
let instance = (0, _momentTimezone.default)(...momentArgs); //? Проверяем валидность moment-экземпляр-а путем попытки привести его к выходному формату
|
|
128
152
|
//? Попадем в этот кейс если
|
|
129
153
|
//? - data это timestamp
|
|
130
154
|
//? - data это строка в формате date-time
|
|
131
155
|
//? - data это строка в формате date (в этом случае время выставится 00:00:00)
|
|
132
|
-
|
|
133
|
-
//? Если же приведение не удалось, то предполагаем, что data пришла в формате time
|
|
156
|
+
|
|
157
|
+
if (instance.format(outputFormat) !== ERROR_VALUE) return instance; //? Если же приведение не удалось, то предполагаем, что data пришла в формате time
|
|
134
158
|
//? В этом случае создадим объект от текущей даты, распарсим data и установим время
|
|
135
159
|
//? Корректно обработаются паттерны: 'HH*mm', 'HH*mm*ss', 'HH*mm*ss*любое_количество_ms', где * - любой разделитель
|
|
136
160
|
else if (/^\d\d.\d\d/.test(data)) {
|
|
@@ -141,13 +165,13 @@ function transformDateOrTimeOrTogetherToFormat(data) {
|
|
|
141
165
|
if (acc.group) acc.result.push(acc.group);
|
|
142
166
|
acc.group = "";
|
|
143
167
|
} else acc.group = "".concat(acc.group).concat(symbol);
|
|
168
|
+
|
|
144
169
|
if (idx === symbols.length - 1 && acc.group) acc.result.push(acc.group);
|
|
145
170
|
return acc;
|
|
146
171
|
}, {
|
|
147
172
|
result: [],
|
|
148
173
|
group: ""
|
|
149
|
-
})
|
|
150
|
-
//? reverse используется исключительно для того, чтобы после можно было использовать метод pop, а не shift,
|
|
174
|
+
}) //? reverse используется исключительно для того, чтобы после можно было использовать метод pop, а не shift,
|
|
151
175
|
//? т.к. методы добавления/извлечения относительно конца массива работают быстрее,
|
|
152
176
|
//? чем аналогичные относительно начала массива
|
|
153
177
|
.result.reverse();
|
|
@@ -159,32 +183,34 @@ function transformDateOrTimeOrTogetherToFormat(data) {
|
|
|
159
183
|
|
|
160
184
|
return instance;
|
|
161
185
|
})();
|
|
186
|
+
|
|
162
187
|
if (isReturnAsMomentInstance) return momentInstance;
|
|
163
188
|
const output = momentInstance.format(outputFormat);
|
|
164
189
|
return output === ERROR_VALUE ? ERROR_MESSGE : output;
|
|
165
|
-
}
|
|
190
|
+
} //? Намерянно значением по умолчанию назначаю самый информационно-маленький паттерн
|
|
191
|
+
|
|
166
192
|
|
|
167
|
-
//? Намерянно значением по умолчанию назначаю самый информационно-маленький паттерн
|
|
168
193
|
function transformDateOrTimeOrTogetherToFormattedLocal(data) {
|
|
169
194
|
let outputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "HH:mm";
|
|
170
195
|
let additional = arguments.length > 2 ? arguments[2] : undefined;
|
|
171
196
|
const ERROR_VALUE = "Invalid date";
|
|
172
197
|
const ERROR_MESSGE = "Invalid input data for ".concat(outputFormat, " format");
|
|
198
|
+
|
|
173
199
|
if (additional && !getIsOnlyAnObject(additional)) {
|
|
174
200
|
throw new Error("Bad additional [transformDateOrTimeOrTogetherToFormattedLocal]");
|
|
175
201
|
}
|
|
176
|
-
|
|
177
|
-
|
|
202
|
+
|
|
203
|
+
const compositeAdditional = { ...(additional || {}),
|
|
178
204
|
isReturnAsMomentInstance: true
|
|
179
205
|
};
|
|
180
206
|
const date = transformDateOrTimeOrTogetherToFormat(data, outputFormat, compositeAdditional);
|
|
181
207
|
const dateWithLocale = date.add((0, _momentTimezone.default)().utcOffset(), "minutes");
|
|
182
208
|
const output = dateWithLocale.format(outputFormat);
|
|
183
209
|
return output === ERROR_VALUE ? ERROR_MESSGE : output;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
//принимает обьект и массив ключей обьекта
|
|
210
|
+
} //принимает обьект и массив ключей обьекта
|
|
187
211
|
//возвращает обьект с теми полями, которых нет в массиве ключей
|
|
212
|
+
|
|
213
|
+
|
|
188
214
|
const omitKeys = function () {
|
|
189
215
|
let obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
190
216
|
let keys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
@@ -196,19 +222,25 @@ const omitKeys = function () {
|
|
|
196
222
|
return rest;
|
|
197
223
|
}, obj);
|
|
198
224
|
};
|
|
225
|
+
|
|
199
226
|
exports.omitKeys = omitKeys;
|
|
227
|
+
|
|
200
228
|
const logout = () => {
|
|
201
229
|
window.localStorage.removeItem("accessToken");
|
|
202
230
|
window.localStorage.removeItem("tokenExpires");
|
|
203
231
|
window.location.reload();
|
|
204
232
|
};
|
|
233
|
+
|
|
205
234
|
exports.logout = logout;
|
|
235
|
+
|
|
206
236
|
const getStyles = (el, prop) => {
|
|
207
237
|
if (!el) return null;
|
|
208
238
|
if (!prop) return window.getComputedStyle(el);
|
|
209
239
|
return window.getComputedStyle(el).getPropertyValue(prop);
|
|
210
240
|
};
|
|
241
|
+
|
|
211
242
|
exports.getStyles = getStyles;
|
|
243
|
+
|
|
212
244
|
const getColorById = (id, colors) => {
|
|
213
245
|
if (!id) return "#FF7D00";
|
|
214
246
|
const idToArr = Array.from(id);
|
|
@@ -217,20 +249,26 @@ const getColorById = (id, colors) => {
|
|
|
217
249
|
if (Number(item)) {
|
|
218
250
|
return acc + Number(item);
|
|
219
251
|
}
|
|
252
|
+
|
|
220
253
|
return acc;
|
|
221
254
|
}, 0);
|
|
255
|
+
|
|
222
256
|
while (number >= colorsArr.length) {
|
|
223
257
|
number -= colorsArr.length;
|
|
224
258
|
}
|
|
259
|
+
|
|
225
260
|
return colorsArr[number];
|
|
226
261
|
};
|
|
262
|
+
|
|
227
263
|
exports.getColorById = getColorById;
|
|
264
|
+
|
|
228
265
|
const debounce = (fn, ms) => {
|
|
229
266
|
let id = null;
|
|
230
267
|
return function () {
|
|
231
268
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
232
269
|
args[_key] = arguments[_key];
|
|
233
270
|
}
|
|
271
|
+
|
|
234
272
|
clearTimeout(id);
|
|
235
273
|
id = setTimeout(() => {
|
|
236
274
|
clearTimeout(id);
|
|
@@ -238,7 +276,9 @@ const debounce = (fn, ms) => {
|
|
|
238
276
|
}, ms);
|
|
239
277
|
};
|
|
240
278
|
};
|
|
279
|
+
|
|
241
280
|
exports.debounce = debounce;
|
|
281
|
+
|
|
242
282
|
const throttle = (fn, ms) => {
|
|
243
283
|
let id = null;
|
|
244
284
|
return function () {
|
|
@@ -250,47 +290,57 @@ const throttle = (fn, ms) => {
|
|
|
250
290
|
}, ms);
|
|
251
291
|
};
|
|
252
292
|
};
|
|
293
|
+
|
|
253
294
|
exports.throttle = throttle;
|
|
295
|
+
|
|
254
296
|
const addBitDepthPoints = function (value) {
|
|
255
297
|
let step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
|
|
256
298
|
//содержит ли value точку
|
|
257
|
-
const isFraction = value === null || value === void 0 ? void 0 : value.includes(".");
|
|
299
|
+
const isFraction = value === null || value === void 0 ? void 0 : value.includes("."); //взять строку до точки
|
|
258
300
|
|
|
259
|
-
|
|
260
|
-
const valueBeforeDot = isFraction ? value === null || value === void 0 ? void 0 : value.slice(0, value === null || value === void 0 ? void 0 : value.indexOf(".")) : value;
|
|
301
|
+
const valueBeforeDot = isFraction ? value === null || value === void 0 ? void 0 : value.slice(0, value === null || value === void 0 ? void 0 : value.indexOf(".")) : value; //расстановка запятых после каждой 3й цифры с конца
|
|
261
302
|
|
|
262
|
-
//расстановка запятых после каждой 3й цифры с конца
|
|
263
303
|
const intPart = valueBeforeDot.split("").reverse().reduce((acc, item, idx) => idx % step === 0 && idx !== 0 ? [...acc, ",", item] : [...acc, item], []).reverse().join("");
|
|
264
304
|
return isFraction ? intPart + (value === null || value === void 0 ? void 0 : value.slice(value === null || value === void 0 ? void 0 : value.indexOf("."))) : intPart;
|
|
265
305
|
};
|
|
306
|
+
|
|
266
307
|
exports.addBitDepthPoints = addBitDepthPoints;
|
|
308
|
+
|
|
267
309
|
const changeMeta = function (key) {
|
|
268
310
|
let items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
269
311
|
const defaultMeta = items.find(i => i.key === "default");
|
|
312
|
+
|
|
270
313
|
if (key) {
|
|
271
314
|
var _item$title, _item$description;
|
|
315
|
+
|
|
272
316
|
const item = items.find(i => i.key === key);
|
|
273
317
|
document.title = (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : defaultMeta === null || defaultMeta === void 0 ? void 0 : defaultMeta.title;
|
|
274
318
|
document.querySelector('meta[name="description"]').setAttribute("content", (_item$description = item === null || item === void 0 ? void 0 : item.description) !== null && _item$description !== void 0 ? _item$description : defaultMeta === null || defaultMeta === void 0 ? void 0 : defaultMeta.description);
|
|
275
319
|
}
|
|
276
320
|
};
|
|
321
|
+
|
|
277
322
|
exports.changeMeta = changeMeta;
|
|
323
|
+
|
|
278
324
|
const firstLetterCapital = str => typeof str === "string" ? "".concat(str.charAt(0).toUpperCase()).concat(str.slice(1)) : str;
|
|
325
|
+
|
|
279
326
|
exports.firstLetterCapital = firstLetterCapital;
|
|
280
|
-
const capitalized =
|
|
327
|
+
const capitalized = firstLetterCapital;
|
|
328
|
+
exports.capitalized = capitalized;
|
|
329
|
+
|
|
281
330
|
const checkedRef = ref => ref ? typeof ref === "function" ? node => ref(node) : ref : null;
|
|
331
|
+
|
|
282
332
|
exports.checkedRef = checkedRef;
|
|
333
|
+
|
|
283
334
|
function downloadEmulation(data, filename) {
|
|
284
335
|
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "image/*";
|
|
285
336
|
const file = new Blob([data], {
|
|
286
337
|
type
|
|
287
338
|
});
|
|
288
|
-
if (window.navigator.msSaveOrOpenBlob)
|
|
289
|
-
// IE10+
|
|
339
|
+
if (window.navigator.msSaveOrOpenBlob) // IE10+
|
|
290
340
|
window.navigator.msSaveOrOpenBlob(file, filename);else {
|
|
291
341
|
// Others
|
|
292
342
|
const a = document.createElement("a"),
|
|
293
|
-
|
|
343
|
+
url = URL.createObjectURL(file);
|
|
294
344
|
a.href = url;
|
|
295
345
|
a.download = filename;
|
|
296
346
|
document.body.appendChild(a);
|
|
@@ -301,6 +351,7 @@ function downloadEmulation(data, filename) {
|
|
|
301
351
|
}, 0);
|
|
302
352
|
}
|
|
303
353
|
}
|
|
354
|
+
|
|
304
355
|
const downloadFile = async _ref => {
|
|
305
356
|
let {
|
|
306
357
|
url,
|
|
@@ -313,16 +364,20 @@ const downloadFile = async _ref => {
|
|
|
313
364
|
}));
|
|
314
365
|
downloadEmulation(response.data, name, response.type);
|
|
315
366
|
};
|
|
367
|
+
|
|
316
368
|
exports.downloadFile = downloadFile;
|
|
369
|
+
|
|
317
370
|
const compare = function (a, b) {
|
|
318
371
|
var _a$sort, _b$sort, _Object$entries$sort, _Object$entries, _Object$entries$sort2, _Object$entries2;
|
|
372
|
+
|
|
319
373
|
let keys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
320
|
-
if (Array.isArray(a), Array.isArray(b)) return JSON.stringify(a === null || a === void 0
|
|
374
|
+
if (Array.isArray(a), Array.isArray(b)) return JSON.stringify(a === null || a === void 0 ? void 0 : (_a$sort = a.sort) === null || _a$sort === void 0 ? void 0 : _a$sort.call(a)) === JSON.stringify(b === null || b === void 0 ? void 0 : (_b$sort = b.sort) === null || _b$sort === void 0 ? void 0 : _b$sort.call(b));else if (Array.isArray(a) || Array.isArray(b)) throw new Error("Different types detected!");
|
|
321
375
|
return JSON.stringify((_Object$entries$sort = (_Object$entries = Object.entries(omitKeys(a, keys))).sort) === null || _Object$entries$sort === void 0 ? void 0 : _Object$entries$sort.call(_Object$entries)) === JSON.stringify((_Object$entries$sort2 = (_Object$entries2 = Object.entries(omitKeys(b, keys))).sort) === null || _Object$entries$sort2 === void 0 ? void 0 : _Object$entries$sort2.call(_Object$entries2));
|
|
322
|
-
};
|
|
376
|
+
}; // Set Carret to the End of Input
|
|
377
|
+
|
|
323
378
|
|
|
324
|
-
// Set Carret to the End of Input
|
|
325
379
|
exports.compare = compare;
|
|
380
|
+
|
|
326
381
|
const setCarretToEnd = input => {
|
|
327
382
|
setTimeout(() => {
|
|
328
383
|
const tmp = input.value;
|
|
@@ -330,35 +385,47 @@ const setCarretToEnd = input => {
|
|
|
330
385
|
input.value = tmp;
|
|
331
386
|
}, 10);
|
|
332
387
|
};
|
|
388
|
+
|
|
333
389
|
exports.setCarretToEnd = setCarretToEnd;
|
|
390
|
+
|
|
334
391
|
const compareAlphabetical = function (a, b) {
|
|
335
392
|
var _item, _item2;
|
|
393
|
+
|
|
336
394
|
let key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "label";
|
|
337
395
|
let item1 = a === null || a === void 0 ? void 0 : a[key];
|
|
338
396
|
let item2 = b === null || b === void 0 ? void 0 : b[key];
|
|
339
397
|
if (typeof item1 !== "string" || typeof item2 !== "string") return 0;
|
|
340
398
|
item1 = (_item = item1) === null || _item === void 0 ? void 0 : _item.toLowerCase();
|
|
341
399
|
item2 = (_item2 = item2) === null || _item2 === void 0 ? void 0 : _item2.toLowerCase();
|
|
400
|
+
|
|
342
401
|
if (item1 < item2) {
|
|
343
402
|
return -1;
|
|
344
403
|
}
|
|
404
|
+
|
|
345
405
|
if (item1 > item2) {
|
|
346
406
|
return 1;
|
|
347
407
|
}
|
|
408
|
+
|
|
348
409
|
return 0;
|
|
349
410
|
};
|
|
411
|
+
|
|
350
412
|
exports.compareAlphabetical = compareAlphabetical;
|
|
413
|
+
|
|
351
414
|
const getBase64 = file => {
|
|
352
415
|
if (file) {
|
|
353
416
|
return new Promise(function (resolve, reject) {
|
|
354
417
|
const reader = new FileReader();
|
|
355
418
|
reader.readAsDataURL(file);
|
|
419
|
+
|
|
356
420
|
reader.onload = () => resolve(reader.result);
|
|
421
|
+
|
|
357
422
|
reader.onerror = error => reject("Error: ", error);
|
|
358
423
|
});
|
|
359
424
|
}
|
|
360
425
|
};
|
|
426
|
+
|
|
361
427
|
exports.getBase64 = getBase64;
|
|
428
|
+
|
|
362
429
|
const renderFileSize = function (bytes) {
|
|
363
430
|
let decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
364
431
|
if (!Number(bytes)) return "0 Bytes";
|
|
@@ -368,26 +435,30 @@ const renderFileSize = function (bytes) {
|
|
|
368
435
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
369
436
|
return "".concat(parseFloat((bytes / Math.pow(k, i)).toFixed(dm)), " ").concat(sizes[i]);
|
|
370
437
|
};
|
|
438
|
+
|
|
371
439
|
exports.renderFileSize = renderFileSize;
|
|
440
|
+
|
|
372
441
|
const getUniqueFileExtensions = extListString => {
|
|
373
442
|
// Split the extensions list into an array
|
|
374
|
-
const extArray = extListString === null || extListString === void 0 ? void 0 : extListString.split(",").map(ext => ext.trim().toUpperCase());
|
|
443
|
+
const extArray = extListString === null || extListString === void 0 ? void 0 : extListString.split(",").map(ext => ext.trim().toUpperCase()); // Remove duplicates using a Set
|
|
375
444
|
|
|
376
|
-
//
|
|
377
|
-
const uniqueExts = [...new Set(extArray)];
|
|
445
|
+
const uniqueExts = [...new Set(extArray)]; // Join the unique extensions into a string
|
|
378
446
|
|
|
379
|
-
// Join the unique extensions into a string
|
|
380
447
|
return uniqueExts.join(", ");
|
|
381
448
|
};
|
|
449
|
+
|
|
382
450
|
exports.getUniqueFileExtensions = getUniqueFileExtensions;
|
|
451
|
+
|
|
383
452
|
const getOS = () => {
|
|
384
|
-
var _window$navigator;
|
|
453
|
+
var _window$navigator, _window$navigator$use;
|
|
454
|
+
|
|
385
455
|
let userAgent = window.navigator.userAgent,
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
456
|
+
platform = ((_window$navigator = window.navigator) === null || _window$navigator === void 0 ? void 0 : (_window$navigator$use = _window$navigator.userAgentData) === null || _window$navigator$use === void 0 ? void 0 : _window$navigator$use.platform) || window.navigator.platform,
|
|
457
|
+
macosPlatforms = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"],
|
|
458
|
+
windowsPlatforms = ["Win32", "Win64", "Windows", "WinCE"],
|
|
459
|
+
iosPlatforms = ["iPhone", "iPad", "iPod"],
|
|
460
|
+
os = _index.OS.Unknown;
|
|
461
|
+
|
|
391
462
|
if (macosPlatforms.indexOf(platform) !== -1) {
|
|
392
463
|
os = _index.OS.MacOS;
|
|
393
464
|
} else if (iosPlatforms.indexOf(platform) !== -1) {
|
|
@@ -399,20 +470,27 @@ const getOS = () => {
|
|
|
399
470
|
} else if (/Linux/.test(platform)) {
|
|
400
471
|
os = _index.OS.Linux;
|
|
401
472
|
}
|
|
473
|
+
|
|
402
474
|
return os;
|
|
403
475
|
};
|
|
476
|
+
|
|
404
477
|
exports.getOS = getOS;
|
|
478
|
+
|
|
405
479
|
const disableDefaultBehavior = e => {
|
|
406
|
-
e === null || e === void 0
|
|
407
|
-
e === null || e === void 0
|
|
480
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
481
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
408
482
|
};
|
|
483
|
+
|
|
409
484
|
exports.disableDefaultBehavior = disableDefaultBehavior;
|
|
485
|
+
|
|
410
486
|
String.prototype.longerThan = function (compareWith) {
|
|
411
487
|
return (this === null || this === void 0 ? void 0 : this.length) > (compareWith === null || compareWith === void 0 ? void 0 : compareWith.length);
|
|
412
488
|
};
|
|
489
|
+
|
|
413
490
|
String.prototype.lastIndexEqualsTo = function (index) {
|
|
414
491
|
return (this === null || this === void 0 ? void 0 : this.length) - 1 === index;
|
|
415
492
|
};
|
|
493
|
+
|
|
416
494
|
const getCorrectTestId = _ref2 => {
|
|
417
495
|
let {
|
|
418
496
|
testId = "",
|
|
@@ -420,4 +498,5 @@ const getCorrectTestId = _ref2 => {
|
|
|
420
498
|
} = _ref2;
|
|
421
499
|
return testId && testId !== undefined ? "".concat(withTier ? "-" : "").concat(testId) : "";
|
|
422
500
|
};
|
|
501
|
+
|
|
423
502
|
exports.getCorrectTestId = getCorrectTestId;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.AffiliateNetworks = void 0;
|
|
9
|
+
|
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
9
12
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
|
|
11
|
-
function
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
12
18
|
const AffiliateNetworks = props => /*#__PURE__*/React.createElement("svg", (0, _extends2.default)({
|
|
13
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
20
|
xmlSpace: "preserve",
|
|
@@ -28,4 +34,5 @@ const AffiliateNetworks = props => /*#__PURE__*/React.createElement("svg", (0, _
|
|
|
28
34
|
stroke: "#9AA0B9",
|
|
29
35
|
d: "M23 21v-2c0-1.8-1.2-3.4-3-3.9M16 3.1c2.1.5 3.4 2.7 2.9 4.9-.4 1.4-1.5 2.5-2.9 2.9"
|
|
30
36
|
}));
|
|
37
|
+
|
|
31
38
|
exports.AffiliateNetworks = AffiliateNetworks;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.AlertCircle = void 0;
|
|
9
|
+
|
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
9
12
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
|
|
11
|
-
function
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
12
18
|
const AlertCircle = props => /*#__PURE__*/React.createElement("svg", (0, _extends2.default)({
|
|
13
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
20
|
xmlSpace: "preserve",
|
|
@@ -28,4 +34,5 @@ const AlertCircle = props => /*#__PURE__*/React.createElement("svg", (0, _extend
|
|
|
28
34
|
d: "M12 8v4M12 16",
|
|
29
35
|
className: "st0"
|
|
30
36
|
}));
|
|
37
|
+
|
|
31
38
|
exports.AlertCircle = AlertCircle;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.AppStore = void 0;
|
|
9
|
+
|
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
9
12
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
|
|
11
|
-
function
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
12
18
|
const AppStore = props => /*#__PURE__*/React.createElement("svg", (0, _extends2.default)({
|
|
13
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
20
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
@@ -32,4 +38,5 @@ const AppStore = props => /*#__PURE__*/React.createElement("svg", (0, _extends2.
|
|
|
32
38
|
width: 260,
|
|
33
39
|
height: 90
|
|
34
40
|
})));
|
|
41
|
+
|
|
35
42
|
exports.AppStore = AppStore;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.Arrow = void 0;
|
|
9
|
+
|
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
9
12
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
|
|
11
|
-
function
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
12
18
|
const Arrow = props => /*#__PURE__*/React.createElement("svg", (0, _extends2.default)({
|
|
13
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
20
|
width: 16,
|
|
@@ -38,4 +44,5 @@ const Arrow = props => /*#__PURE__*/React.createElement("svg", (0, _extends2.def
|
|
|
38
44
|
fill: "#fff",
|
|
39
45
|
d: "M-533-86H491v424H-533z"
|
|
40
46
|
}))));
|
|
47
|
+
|
|
41
48
|
exports.Arrow = Arrow;
|