intelicoreact 1.6.20 → 1.6.21
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 +1 -102
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +1 -89
- package/dist/Atomic/FormElements/Calendar/Calendar.js +1 -232
- package/dist/Atomic/FormElements/Calendar/Calendar.props.js +1 -3
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +1 -101
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +1 -70
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +1 -350
- package/dist/Atomic/FormElements/Datepicker/Datepicker.props.js +1 -3
- package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.js +1 -177
- package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.props.js +1 -3
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +1 -561
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +1 -20
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +1 -405
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +1 -94
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +1 -105
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +1 -67
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +1 -247
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +1 -160
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +1 -193
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +1 -135
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.js +1 -116
- package/dist/Atomic/FormElements/Input/Input.js +1 -467
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +1 -161
- package/dist/Atomic/FormElements/InputColor/InputColor.js +1 -64
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +1 -166
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +1 -354
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +1 -71
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +1 -693
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +1 -254
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +1 -32
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +1 -200
- package/dist/Atomic/FormElements/InputLink/InputLink.js +1 -99
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +1 -37
- package/dist/Atomic/FormElements/InputMask/InputMask.js +1 -1214
- package/dist/Atomic/FormElements/InputMask/config.js +1 -15
- package/dist/Atomic/FormElements/InputMask/functions.js +1 -58
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +1 -674
- package/dist/Atomic/FormElements/InputMask2/config.js +1 -15
- package/dist/Atomic/FormElements/InputMask2/functions.js +1 -58
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +1 -766
- package/dist/Atomic/FormElements/InputMask3/config.js +1 -15
- package/dist/Atomic/FormElements/InputMask3/functions.js +1 -58
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +1 -114
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +1 -140
- package/dist/Atomic/FormElements/Label/Label.js +1 -82
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +1 -506
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +1 -45
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +1 -331
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +1 -66
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +1 -80
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +1 -64
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +1 -54
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +1 -183
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +1 -209
- package/dist/Atomic/FormElements/RangeList/RangeList.js +1 -175
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +1 -43
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +1 -443
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +1 -858
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +1 -39
- package/dist/Atomic/FormElements/Switcher/Switcher.js +1 -59
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +1 -50
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +1 -47
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +1 -96
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +1 -40
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +1 -64
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +1 -170
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +1 -202
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +1 -67
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +1 -115
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +1 -826
- package/dist/Atomic/FormElements/Text/Text.js +1 -125
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +1 -45
- package/dist/Atomic/FormElements/Textarea/Textarea.js +1 -80
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +1 -176
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +1 -62
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +1 -127
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +1 -220
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +1 -83
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +1 -82
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +1 -101
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +1 -29
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +1 -113
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +1 -30
- package/dist/Atomic/Layout/Header/Header.js +1 -85
- package/dist/Atomic/Layout/Spinner/Spinner.js +1 -39
- package/dist/Atomic/UI/Accordion/Accordion.js +1 -118
- package/dist/Atomic/UI/Accordion/AccordionItem.js +1 -181
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +1 -238
- package/dist/Atomic/UI/AccordionText/AccordionText.js +1 -69
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +1 -207
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +1 -56
- package/dist/Atomic/UI/Alert/Alert.js +1 -72
- package/dist/Atomic/UI/Arrow/Arrow.js +1 -132
- package/dist/Atomic/UI/Box/Box.js +1 -52
- package/dist/Atomic/UI/Button/Button.js +1 -89
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +1 -72
- package/dist/Atomic/UI/Chart/Chart.js +1 -172
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +1 -95
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +1 -80
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +1 -188
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +1 -335
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +1 -43
- package/dist/Atomic/UI/Chart/partial/utils.js +1 -60
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +1 -109
- package/dist/Atomic/UI/DateTime/DateTime.js +1 -57
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +1 -44
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +1 -15
- package/dist/Atomic/UI/DoubleString/DoubleString.js +1 -102
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +1 -226
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +1 -221
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +1 -106
- package/dist/Atomic/UI/Hint/Hint.js +1 -193
- package/dist/Atomic/UI/Hint/partials/_utils.js +1 -51
- package/dist/Atomic/UI/Modal/Modal.js +1 -188
- package/dist/Atomic/UI/Modal/ModalHOC.js +1 -72
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +1 -46
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +1 -83
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +1 -200
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.js +1 -75
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +1 -80
- package/dist/Atomic/UI/NavLine/NavLine.js +1 -293
- package/dist/Atomic/UI/PageTitle/PageTitle.js +1 -75
- package/dist/Atomic/UI/PieChart/PieChart.js +1 -42
- package/dist/Atomic/UI/Price/Price.js +1 -22
- package/dist/Atomic/UI/PriceRange/PriceRange.js +1 -36
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +1 -71
- package/dist/Atomic/UI/Status/Status.js +1 -59
- package/dist/Atomic/UI/Table/Partials/TdCell.js +1 -87
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +1 -38
- package/dist/Atomic/UI/Table/Partials/TdRow.js +1 -99
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +1 -52
- package/dist/Atomic/UI/Table/Table.js +1 -63
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +1 -80
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +1 -28
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +1 -13
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +1 -53
- package/dist/Atomic/UI/Tag/Tag.js +1 -160
- package/dist/Atomic/UI/TagList/TagList.js +1 -251
- package/dist/Atomic/UI/UserBox/UserBox.js +1 -73
- package/dist/Atomic/UI/WizardStepper/constructor.js +1 -84
- package/dist/Atomic/UI/WizardStepper/index.js +1 -3
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +1 -37
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/index.js +1 -3
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +1 -61
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/index.js +1 -3
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +1 -39
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/index.js +1 -3
- package/dist/Atomic/UI/WizardStepper/ui/icons.js +1 -49
- package/dist/Atomic/UI/WizardStepper/ui/index.js +1 -3
- package/dist/Classes/AbortableFetch.js +1 -454
- package/dist/Classes/AnimatedHandler.js +1 -47
- package/dist/Classes/RESTAPI/index.js +1 -228
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +1 -457
- package/dist/Classes/RESTAPI/partials/ApiBase.js +1 -48
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +1 -112
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +1 -189
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +1 -252
- package/dist/Classes/RESTAPI/partials/Utils.js +1 -92
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +1 -3
- package/dist/Classes/RESTAPI/partials/_utils.js +1 -197
- package/dist/Constants/index.constants.js +1 -78
- package/dist/Functions/Portal.js +1 -22
- package/dist/Functions/customEventListener.js +1 -96
- package/dist/Functions/dateTime.js +1 -149
- package/dist/Functions/fieldValueFormatters.js +1 -405
- package/dist/Functions/guards/assertions.js +1 -66
- package/dist/Functions/guards/safeValue.js +1 -30
- package/dist/Functions/guards/typeGuards.js +1 -116
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +1 -95
- package/dist/Functions/locale/createTranslator.js +1 -32
- package/dist/Functions/operations.js +1 -130
- package/dist/Functions/presets/inputMaskPresets.js +1 -170
- package/dist/Functions/presets/inputPresets.js +1 -60
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +1 -45
- package/dist/Functions/schemas.js +1 -31
- package/dist/Functions/useBodyScrollLock.js +1 -17
- package/dist/Functions/useClickOutside.js +1 -15
- package/dist/Functions/useDebounce.js +1 -17
- package/dist/Functions/useFieldFocus.js +1 -84
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +1 -39
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +1 -159
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +1 -78
- package/dist/Functions/useFormTools/functions/General.js +1 -134
- package/dist/Functions/useFormTools/functions/RenderFields.js +1 -111
- package/dist/Functions/useFormTools/functions/usePrevious.js +1 -12
- package/dist/Functions/useFormTools/index.js +1 -778
- package/dist/Functions/useInputHighlightError.js +1 -67
- package/dist/Functions/useIsMobile/useIsMobile.js +1 -53
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +1 -21
- package/dist/Functions/useKeyPress/useKeyPress.js +1 -75
- package/dist/Functions/useLocalStorage.js +1 -34
- package/dist/Functions/useLocationParams.js +1 -27
- package/dist/Functions/useMediaQuery.js +1 -17
- package/dist/Functions/useMetaInfo.js +1 -43
- package/dist/Functions/useMouseUpOutside.js +1 -16
- package/dist/Functions/useOnlineStatus.js +1 -29
- package/dist/Functions/usePasswordChecker.js +1 -110
- package/dist/Functions/usePrevious.js +1 -12
- package/dist/Functions/useResize.js +1 -31
- package/dist/Functions/useScrollTo.js +1 -17
- package/dist/Functions/useToggle.js +1 -17
- package/dist/Functions/utils.js +1 -522
- package/dist/Langs.js +1 -168
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +1 -21
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +1 -23
- package/dist/Molecular/CustomIcons/components/AppStore.js +1 -29
- package/dist/Molecular/CustomIcons/components/Arrow.js +1 -32
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +1 -17
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +1 -22
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +1 -22
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +1 -17
- package/dist/Molecular/CustomIcons/components/Bell.js +1 -15
- package/dist/Molecular/CustomIcons/components/Button.js +1 -12
- package/dist/Molecular/CustomIcons/components/Campaigns.js +1 -16
- package/dist/Molecular/CustomIcons/components/Check.js +1 -14
- package/dist/Molecular/CustomIcons/components/Check2.js +1 -12
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +1 -12
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +1 -11
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +1 -11
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +1 -11
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +1 -11
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +1 -27
- package/dist/Molecular/CustomIcons/components/Close.js +1 -14
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +1 -17
- package/dist/Molecular/CustomIcons/components/Delete.js +1 -16
- package/dist/Molecular/CustomIcons/components/Edit.js +1 -15
- package/dist/Molecular/CustomIcons/components/Email.js +1 -31
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +1 -18
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +1 -35
- package/dist/Molecular/CustomIcons/components/Flows.js +1 -15
- package/dist/Molecular/CustomIcons/components/Gift.js +1 -25
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +1 -29
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +1 -29
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +1 -19
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +1 -20
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +1 -19
- package/dist/Molecular/CustomIcons/components/Home.js +1 -16
- package/dist/Molecular/CustomIcons/components/Home2.js +1 -22
- package/dist/Molecular/CustomIcons/components/Key.js +1 -23
- package/dist/Molecular/CustomIcons/components/Landers.js +1 -20
- package/dist/Molecular/CustomIcons/components/Lock.js +1 -15
- package/dist/Molecular/CustomIcons/components/Mail.js +1 -26
- package/dist/Molecular/CustomIcons/components/Mastercard.js +1 -73
- package/dist/Molecular/CustomIcons/components/Minus.js +1 -25
- package/dist/Molecular/CustomIcons/components/Offers.js +1 -16
- package/dist/Molecular/CustomIcons/components/Pause.js +1 -28
- package/dist/Molecular/CustomIcons/components/PayPal.js +1 -41
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +1 -28
- package/dist/Molecular/CustomIcons/components/Phone.js +1 -30
- package/dist/Molecular/CustomIcons/components/Play.js +1 -25
- package/dist/Molecular/CustomIcons/components/Plus.js +1 -25
- package/dist/Molecular/CustomIcons/components/Profile.js +1 -16
- package/dist/Molecular/CustomIcons/components/QRCode.js +1 -29
- package/dist/Molecular/CustomIcons/components/Rectangle.js +1 -12
- package/dist/Molecular/CustomIcons/components/Revert.js +1 -13
- package/dist/Molecular/CustomIcons/components/Star.js +1 -14
- package/dist/Molecular/CustomIcons/components/Star2.js +1 -16
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +1 -14
- package/dist/Molecular/CustomIcons/components/Trash.js +1 -15
- package/dist/Molecular/CustomIcons/components/TrashRed.js +1 -15
- package/dist/Molecular/CustomIcons/components/Triggers.js +1 -15
- package/dist/Molecular/CustomIcons/components/User.js +1 -25
- package/dist/Molecular/CustomIcons/components/Visa.js +1 -31
- package/dist/Molecular/CustomIcons/components/X.js +1 -12
- package/dist/Molecular/CustomIcons/index.js +1 -61
- package/dist/Molecular/FormElement/FormElement.js +1 -54
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +1 -184
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +1 -53
- package/dist/Molecular/InputAddress/InputAddress.js +1 -620
- package/dist/Molecular/InputPassword/InputPassword.js +1 -48
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,188 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2
|
-
value: !0
|
|
3
|
-
});
|
|
4
|
-
var e = exports, o = {
|
|
5
|
-
KEY_CODE: function() {
|
|
6
|
-
return m;
|
|
7
|
-
},
|
|
8
|
-
default: function() {
|
|
9
|
-
return y;
|
|
10
|
-
},
|
|
11
|
-
renderModalTitle: function() {
|
|
12
|
-
return b;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
for(var t in o)Object.defineProperty(e, t, {
|
|
16
|
-
enumerable: !0,
|
|
17
|
-
get: o[t]
|
|
18
|
-
});
|
|
19
|
-
var n = require("react/jsx-runtime"), r = u(require("classnames")), l = require("react"), a = u(require("../../../Functions/useKeyPress/useHandleKeyPress")), i = u(require("../Button/Button")), c = u(require("./partials/ModalFooter")), d = u(require("./partials/ModalTitle")), s = u(require("./partials/useMobileModal"));
|
|
20
|
-
function u(e) {
|
|
21
|
-
return e && e.__esModule ? e : {
|
|
22
|
-
default: e
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
require("./Modal.scss"), require("./ModalMobile.scss");
|
|
26
|
-
var f = {}, m = Object.freeze({
|
|
27
|
-
ENTER: 13,
|
|
28
|
-
ESC: 27
|
|
29
|
-
});
|
|
30
|
-
function b(e) {
|
|
31
|
-
var o = e.mode, t = e.title, n = e.onlyTitle;
|
|
32
|
-
return o && 'default' !== o && !n ? "".concat(o[0].toUpperCase()).concat(o.slice(1), " ").concat(t) : t;
|
|
33
|
-
}
|
|
34
|
-
var p = (0, l.forwardRef)(function(e, o) {
|
|
35
|
-
var t, u, m = e.zIndex, p = e.isOpen, y = e.onConfirm, O = e.onDecline, v = e.closeModal, _ = e.children, h = e.className, j = e.title, C = e.variant, x = e.onlyTitle, I = e.mode, g = e.size, E = e.atributesForModalBody, M = e.confirmBtnClassName, B = e.confirmBtnLabel, D = e.confirmBtnVariant, w = e.confirmBtnDisable, N = e.confirmBtnIcon, R = e.isConfirmBtnIconPositionRight, F = e.noConfirmBtn, P = e.noCloseBtn, S = e.noFooter, H = e.noHeader, T = e.closeBtnClassName, k = e.closeBtnText, q = e.closeBtnVariant, A = e.closeBtnDisable, K = e.closeBtnIcon, L = e.forced, z = e.btnClassNames, Y = e.isCloseBtnIconPositionRight, U = e.submitOnEnter, V = e.closeOnEsc, G = e.leftContentOfFooter, J = e.customFooter, Q = e.testId, W = void 0 === Q ? 'modal' : Q, X = e.noHeaderCloseBtn, Z = e.withMobileLogic, $ = e.withFixedFooter, ee = (0, l.useRef)(null), eo = (0, s.default)({
|
|
36
|
-
withMobileLogic: Z,
|
|
37
|
-
withFixedFooter: $,
|
|
38
|
-
isOpen: p
|
|
39
|
-
}), et = eo.modalMobileHeaderRef, en = eo.modalMobileBodyRef, er = eo.modalMobileFooterRef, el = eo.MODALS_LOGIC, ea = eo.renderModal, ei = eo.isMobile, ec = eo.scrollTop, ed = eo.scrollHeight, es = {
|
|
40
|
-
confirm: function() {
|
|
41
|
-
null == y || y();
|
|
42
|
-
},
|
|
43
|
-
decline: function() {
|
|
44
|
-
'function' == typeof O ? O() : null == v || v();
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return ((0, a.default)({
|
|
48
|
-
enterCallback: (void 0 === U || U) && 'function' == typeof y ? function() {
|
|
49
|
-
return es.confirm();
|
|
50
|
-
} : void 0,
|
|
51
|
-
escCallback: (void 0 === V || V) && 'function' == typeof v ? function() {
|
|
52
|
-
return v();
|
|
53
|
-
} : void 0,
|
|
54
|
-
withClamping: !1
|
|
55
|
-
}), p) ? (0, n.jsx)("div", {
|
|
56
|
-
style: {
|
|
57
|
-
zIndex: void 0 === m ? 100 : m
|
|
58
|
-
},
|
|
59
|
-
"data-testid": W,
|
|
60
|
-
className: "modal-box j5",
|
|
61
|
-
role: "dialog",
|
|
62
|
-
"aria-modal": "true",
|
|
63
|
-
"aria-labelledby": "".concat(W, "-title"),
|
|
64
|
-
children: ea((0, n.jsxs)(n.Fragment, {
|
|
65
|
-
children: [
|
|
66
|
-
(0, n.jsx)("div", {
|
|
67
|
-
"data-testid": "".concat(W, "-overlay"),
|
|
68
|
-
className: p ? 'modal-overlay' : 'hidden',
|
|
69
|
-
onClick: v,
|
|
70
|
-
role: "presentation"
|
|
71
|
-
}),
|
|
72
|
-
(0, n.jsxs)("div", {
|
|
73
|
-
ref: o || ee,
|
|
74
|
-
style: {
|
|
75
|
-
width: 'number' == typeof g ? "".concat(g, "px") : "".concat(null == g ? void 0 : g.replace('px', ''), "px")
|
|
76
|
-
},
|
|
77
|
-
className: (0, r.default)(h, {
|
|
78
|
-
modal: p,
|
|
79
|
-
'modal--no-header': p && H,
|
|
80
|
-
'modal-mobile': p && ei,
|
|
81
|
-
hidden: !p
|
|
82
|
-
}),
|
|
83
|
-
children: [
|
|
84
|
-
!H && (0, n.jsx)(d.default, {
|
|
85
|
-
wrapperRef: et,
|
|
86
|
-
className: (0, r.default)({
|
|
87
|
-
'modal__header--hidden': el.IS_HEADER_HIDDEN,
|
|
88
|
-
'modal__header--sticky': !el.IS_HEADER_HIDDEN && el.IS_HEADER_STICKY
|
|
89
|
-
}),
|
|
90
|
-
variant: void 0 === C ? 'primary' : C,
|
|
91
|
-
isForced: L,
|
|
92
|
-
onClose: es.decline,
|
|
93
|
-
noHeaderCloseBtn: X,
|
|
94
|
-
children: (0, n.jsx)("span", {
|
|
95
|
-
id: "".concat(W, "-title"),
|
|
96
|
-
children: b({
|
|
97
|
-
mode: I,
|
|
98
|
-
title: j,
|
|
99
|
-
onlyTitle: x
|
|
100
|
-
})
|
|
101
|
-
})
|
|
102
|
-
}),
|
|
103
|
-
(0, n.jsx)("div", (t = function(e) {
|
|
104
|
-
for(var o = 1; o < arguments.length; o++){
|
|
105
|
-
var t = null != arguments[o] ? arguments[o] : {}, n = Object.keys(t);
|
|
106
|
-
"function" == typeof Object.getOwnPropertySymbols && (n = n.concat(Object.getOwnPropertySymbols(t).filter(function(e) {
|
|
107
|
-
return Object.getOwnPropertyDescriptor(t, e).enumerable;
|
|
108
|
-
}))), n.forEach(function(o) {
|
|
109
|
-
var n;
|
|
110
|
-
n = t[o], o in e ? Object.defineProperty(e, o, {
|
|
111
|
-
value: n,
|
|
112
|
-
enumerable: !0,
|
|
113
|
-
configurable: !0,
|
|
114
|
-
writable: !0
|
|
115
|
-
}) : e[o] = n;
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
return e;
|
|
119
|
-
}({}, void 0 === E ? f : E), u = u = {
|
|
120
|
-
ref: en,
|
|
121
|
-
className: (0, r.default)('modal__body', {
|
|
122
|
-
'modal__body--no-footer': S
|
|
123
|
-
}),
|
|
124
|
-
role: "document",
|
|
125
|
-
children: _
|
|
126
|
-
}, Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(u)) : (function(e, o) {
|
|
127
|
-
var t = Object.keys(e);
|
|
128
|
-
if (Object.getOwnPropertySymbols) {
|
|
129
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
130
|
-
t.push.apply(t, n);
|
|
131
|
-
}
|
|
132
|
-
return t;
|
|
133
|
-
})(Object(u)).forEach(function(e) {
|
|
134
|
-
Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(u, e));
|
|
135
|
-
}), t)),
|
|
136
|
-
(!S || J) && (0, n.jsx)(c.default, {
|
|
137
|
-
wrapperRef: er,
|
|
138
|
-
className: (0, r.default)({
|
|
139
|
-
'modal__footer--hidden': el.IS_FOOTER_HIDDEN,
|
|
140
|
-
'modal__footer--sticky': !el.IS_FOOTER_HIDDEN && el.IS_FOOTER_STICKY && ec !== ed,
|
|
141
|
-
'modal__footer_with-left-content': G
|
|
142
|
-
}),
|
|
143
|
-
children: J || (0, n.jsxs)(n.Fragment, {
|
|
144
|
-
children: [
|
|
145
|
-
G,
|
|
146
|
-
(!P || !F) && (0, n.jsxs)("div", {
|
|
147
|
-
className: "modal__buttons-block",
|
|
148
|
-
children: [
|
|
149
|
-
!P && (0, n.jsx)(i.default, {
|
|
150
|
-
testId: "modal",
|
|
151
|
-
className: (0, r.default)(T, z),
|
|
152
|
-
variant: q || 'dark-outline',
|
|
153
|
-
onClick: function() {
|
|
154
|
-
return es.decline();
|
|
155
|
-
},
|
|
156
|
-
label: k || 'Cancel',
|
|
157
|
-
disabled: A,
|
|
158
|
-
icon: K,
|
|
159
|
-
isIconRight: Y,
|
|
160
|
-
tabIndex: 1,
|
|
161
|
-
"aria-label": "Close modal"
|
|
162
|
-
}),
|
|
163
|
-
!F && (0, n.jsx)(i.default, {
|
|
164
|
-
testId: "modal",
|
|
165
|
-
onClick: function() {
|
|
166
|
-
return es.confirm();
|
|
167
|
-
},
|
|
168
|
-
label: B || I && (null == I ? void 0 : I[0].toUpperCase()) + (null == I ? void 0 : I.slice(1)) || 'Apply',
|
|
169
|
-
className: (0, r.default)('ml5', M, z),
|
|
170
|
-
variant: void 0 === D ? 'primary' : D,
|
|
171
|
-
disabled: w,
|
|
172
|
-
icon: N,
|
|
173
|
-
isIconRight: R,
|
|
174
|
-
"aria-label": "Confirm modal"
|
|
175
|
-
})
|
|
176
|
-
]
|
|
177
|
-
})
|
|
178
|
-
]
|
|
179
|
-
})
|
|
180
|
-
})
|
|
181
|
-
]
|
|
182
|
-
})
|
|
183
|
-
]
|
|
184
|
-
}))
|
|
185
|
-
}) : null;
|
|
186
|
-
});
|
|
187
|
-
p.displayName = 'Modal';
|
|
188
|
-
var y = p;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});var e=exports,o={KEY_CODE:function(){return m},default:function(){return y},renderModalTitle:function(){return b}};for(var t in o)Object.defineProperty(e,t,{enumerable:!0,get:o[t]});var n=require("react/jsx-runtime"),r=u(require("classnames")),l=require("react"),a=u(require("../../../Functions/useKeyPress/useHandleKeyPress")),i=u(require("../Button/Button")),c=u(require("./partials/ModalFooter")),d=u(require("./partials/ModalTitle")),s=u(require("./partials/useMobileModal"));function u(e){return e&&e.__esModule?e:{default:e}}require("./Modal.scss"),require("./ModalMobile.scss");var f={},m=Object.freeze({ENTER:13,ESC:27});function b(e){var o=e.mode,t=e.title,n=e.onlyTitle;return o&&"default"!==o&&!n?"".concat(o[0].toUpperCase()).concat(o.slice(1)," ").concat(t):t}var p=(0,l.forwardRef)(function(e,o){var t,u,m=e.zIndex,p=e.isOpen,y=e.onConfirm,O=e.onDecline,v=e.closeModal,_=e.children,h=e.className,j=e.title,C=e.variant,x=e.onlyTitle,I=e.mode,g=e.size,E=e.atributesForModalBody,M=e.confirmBtnClassName,B=e.confirmBtnLabel,D=e.confirmBtnVariant,w=e.confirmBtnDisable,N=e.confirmBtnIcon,R=e.isConfirmBtnIconPositionRight,F=e.noConfirmBtn,P=e.noCloseBtn,S=e.noFooter,H=e.noHeader,T=e.closeBtnClassName,k=e.closeBtnText,q=e.closeBtnVariant,A=e.closeBtnDisable,K=e.closeBtnIcon,L=e.forced,z=e.btnClassNames,Y=e.isCloseBtnIconPositionRight,U=e.submitOnEnter,V=e.closeOnEsc,G=e.leftContentOfFooter,J=e.customFooter,Q=e.testId,W=void 0===Q?"modal":Q,X=e.noHeaderCloseBtn,Z=e.withMobileLogic,$=e.withFixedFooter,ee=(0,l.useRef)(null),eo=(0,s.default)({withMobileLogic:Z,withFixedFooter:$,isOpen:p}),et=eo.modalMobileHeaderRef,en=eo.modalMobileBodyRef,er=eo.modalMobileFooterRef,el=eo.MODALS_LOGIC,ea=eo.renderModal,ei=eo.isMobile,ec=eo.scrollTop,ed=eo.scrollHeight,es={confirm:function(){null==y||y()},decline:function(){"function"==typeof O?O():null==v||v()}};return((0,a.default)({enterCallback:(void 0===U||U)&&"function"==typeof y?function(){return es.confirm()}:void 0,escCallback:(void 0===V||V)&&"function"==typeof v?function(){return v()}:void 0,withClamping:!1}),p)?(0,n.jsx)("div",{style:{zIndex:void 0===m?100:m},"data-testid":W,className:"modal-box j5",role:"dialog","aria-modal":"true","aria-labelledby":"".concat(W,"-title"),children:ea((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"data-testid":"".concat(W,"-overlay"),className:p?"modal-overlay":"hidden",onClick:v,role:"presentation"}),(0,n.jsxs)("div",{ref:o||ee,style:{width:"number"==typeof g?"".concat(g,"px"):"".concat(null==g?void 0:g.replace("px",""),"px")},className:(0,r.default)(h,{modal:p,"modal--no-header":p&&H,"modal-mobile":p&&ei,hidden:!p}),children:[!H&&(0,n.jsx)(d.default,{wrapperRef:et,className:(0,r.default)({"modal__header--hidden":el.IS_HEADER_HIDDEN,"modal__header--sticky":!el.IS_HEADER_HIDDEN&&el.IS_HEADER_STICKY}),variant:void 0===C?"primary":C,isForced:L,onClose:es.decline,noHeaderCloseBtn:X,children:(0,n.jsx)("span",{id:"".concat(W,"-title"),children:b({mode:I,title:j,onlyTitle:x})})}),(0,n.jsx)("div",(t=function(e){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(o){var n;n=t[o],o in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n})}return e}({},void 0===E?f:E),u=u={ref:en,className:(0,r.default)("modal__body",{"modal__body--no-footer":S}),role:"document",children:_},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(u)):(function(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(u)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(u,e))}),t)),(!S||J)&&(0,n.jsx)(c.default,{wrapperRef:er,className:(0,r.default)({"modal__footer--hidden":el.IS_FOOTER_HIDDEN,"modal__footer--sticky":!el.IS_FOOTER_HIDDEN&&el.IS_FOOTER_STICKY&&ec!==ed,"modal__footer_with-left-content":G}),children:J||(0,n.jsxs)(n.Fragment,{children:[G,(!P||!F)&&(0,n.jsxs)("div",{className:"modal__buttons-block",children:[!P&&(0,n.jsx)(i.default,{testId:"modal",className:(0,r.default)(T,z),variant:q||"dark-outline",onClick:function(){return es.decline()},label:k||"Cancel",disabled:A,icon:K,isIconRight:Y,tabIndex:1,"aria-label":"Close modal"}),!F&&(0,n.jsx)(i.default,{testId:"modal",onClick:function(){return es.confirm()},label:B||I&&(null==I?void 0:I[0].toUpperCase())+(null==I?void 0:I.slice(1))||"Apply",className:(0,r.default)("ml5",M,z),variant:void 0===D?"primary":D,disabled:w,icon:N,isIconRight:R,"aria-label":"Confirm modal"})]})]})})]})]}))}):null});p.displayName="Modal";var y=p;
|
|
@@ -1,72 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2
|
-
value: !0
|
|
3
|
-
}), Object.defineProperty(exports, "default", {
|
|
4
|
-
enumerable: !0,
|
|
5
|
-
get: function() {
|
|
6
|
-
return l;
|
|
7
|
-
}
|
|
8
|
-
});
|
|
9
|
-
var e = require("react/jsx-runtime"), r = o(require("classnames")), t = function(e, r) {
|
|
10
|
-
if (e && e.__esModule) return e;
|
|
11
|
-
if (null === e || (void 0 === e ? "undefined" : e && "undefined" != typeof Symbol && e.constructor === Symbol ? "symbol" : typeof e) != "object" && "function" != typeof e) return {
|
|
12
|
-
default: e
|
|
13
|
-
};
|
|
14
|
-
var t = a(r);
|
|
15
|
-
if (t && t.has(e)) return t.get(e);
|
|
16
|
-
var n = {
|
|
17
|
-
__proto__: null
|
|
18
|
-
}, o = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
19
|
-
for(var l in e)if ("default" !== l && Object.prototype.hasOwnProperty.call(e, l)) {
|
|
20
|
-
var i = o ? Object.getOwnPropertyDescriptor(e, l) : null;
|
|
21
|
-
i && (i.get || i.set) ? Object.defineProperty(n, l, i) : n[l] = e[l];
|
|
22
|
-
}
|
|
23
|
-
return n.default = e, t && t.set(e, n), n;
|
|
24
|
-
}(require("react")), n = o(require("../../../Functions/useKeyPress/useHandleKeyPress"));
|
|
25
|
-
function o(e) {
|
|
26
|
-
return e && e.__esModule ? e : {
|
|
27
|
-
default: e
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function a(e) {
|
|
31
|
-
if ("function" != typeof WeakMap) return null;
|
|
32
|
-
var r = new WeakMap(), t = new WeakMap();
|
|
33
|
-
return (a = function(e) {
|
|
34
|
-
return e ? t : r;
|
|
35
|
-
})(e);
|
|
36
|
-
}
|
|
37
|
-
require("./Modal.scss");
|
|
38
|
-
var l = function(o) {
|
|
39
|
-
var a = o.zIndex, l = o.isOpen, i = o.closeModal, u = o.children, s = o.className, d = o.size, c = o.testId, f = void 0 === c ? 'modal' : c, p = o.closeOnEsc, y = (0, t.useRef)(null);
|
|
40
|
-
return ((0, n.default)({
|
|
41
|
-
escCallback: (void 0 === p || p) && 'function' == typeof i ? function() {
|
|
42
|
-
return null == i ? void 0 : i();
|
|
43
|
-
} : void 0
|
|
44
|
-
}), l) ? (0, e.jsxs)("div", {
|
|
45
|
-
style: {
|
|
46
|
-
zIndex: void 0 === a ? 100 : a
|
|
47
|
-
},
|
|
48
|
-
"data-testid": f,
|
|
49
|
-
className: "modal-box j5",
|
|
50
|
-
role: "presentation",
|
|
51
|
-
children: [
|
|
52
|
-
(0, e.jsx)("div", {
|
|
53
|
-
className: "modal-overlay",
|
|
54
|
-
onClick: i,
|
|
55
|
-
role: "presentation",
|
|
56
|
-
"aria-hidden": "true"
|
|
57
|
-
}),
|
|
58
|
-
(0, e.jsx)("div", {
|
|
59
|
-
ref: y,
|
|
60
|
-
style: {
|
|
61
|
-
width: d
|
|
62
|
-
},
|
|
63
|
-
className: (0, r.default)(s, 'modal'),
|
|
64
|
-
role: "dialog",
|
|
65
|
-
"aria-modal": "true",
|
|
66
|
-
"aria-labelledby": f,
|
|
67
|
-
tabIndex: -1,
|
|
68
|
-
children: u
|
|
69
|
-
})
|
|
70
|
-
]
|
|
71
|
-
}) : null;
|
|
72
|
-
};
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return l}});var e=require("react/jsx-runtime"),r=o(require("classnames")),t=function(e,r){if(e&&e.__esModule)return e;if(null===e||(void 0===e?"undefined":e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)!="object"&&"function"!=typeof e)return{default:e};var t=a(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var i=o?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(n,l,i):n[l]=e[l]}return n.default=e,t&&t.set(e,n),n}(require("react")),n=o(require("../../../Functions/useKeyPress/useHandleKeyPress"));function o(e){return e&&e.__esModule?e:{default:e}}function a(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(a=function(e){return e?t:r})(e)}require("./Modal.scss");var l=function(o){var a=o.zIndex,l=o.isOpen,i=o.closeModal,u=o.children,s=o.className,d=o.size,c=o.testId,f=void 0===c?"modal":c,p=o.closeOnEsc,y=(0,t.useRef)(null);return((0,n.default)({escCallback:(void 0===p||p)&&"function"==typeof i?function(){return null==i?void 0:i()}:void 0}),l)?(0,e.jsxs)("div",{style:{zIndex:void 0===a?100:a},"data-testid":f,className:"modal-box j5",role:"presentation",children:[(0,e.jsx)("div",{className:"modal-overlay",onClick:i,role:"presentation","aria-hidden":"true"}),(0,e.jsx)("div",{ref:y,style:{width:d},className:(0,r.default)(s,"modal"),role:"dialog","aria-modal":"true","aria-labelledby":f,tabIndex:-1,children:u})]}):null};
|
|
@@ -1,46 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2
|
-
value: !0
|
|
3
|
-
}), Object.defineProperty(exports, "default", {
|
|
4
|
-
enumerable: !0,
|
|
5
|
-
get: function() {
|
|
6
|
-
return a;
|
|
7
|
-
}
|
|
8
|
-
});
|
|
9
|
-
var e, r = require("react/jsx-runtime"), t = (e = require("classnames")) && e.__esModule ? e : {
|
|
10
|
-
default: e
|
|
11
|
-
};
|
|
12
|
-
function o(e) {
|
|
13
|
-
if ("function" != typeof WeakMap) return null;
|
|
14
|
-
var r = new WeakMap(), t = new WeakMap();
|
|
15
|
-
return (o = function(e) {
|
|
16
|
-
return e ? t : r;
|
|
17
|
-
})(e);
|
|
18
|
-
}
|
|
19
|
-
var n = (0, function(e, r) {
|
|
20
|
-
if (e && e.__esModule) return e;
|
|
21
|
-
if (null === e || (void 0 === e ? "undefined" : e && "undefined" != typeof Symbol && e.constructor === Symbol ? "symbol" : typeof e) != "object" && "function" != typeof e) return {
|
|
22
|
-
default: e
|
|
23
|
-
};
|
|
24
|
-
var t = o(r);
|
|
25
|
-
if (t && t.has(e)) return t.get(e);
|
|
26
|
-
var n = {
|
|
27
|
-
__proto__: null
|
|
28
|
-
}, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
29
|
-
for(var u in e)if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
|
|
30
|
-
var l = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
31
|
-
l && (l.get || l.set) ? Object.defineProperty(n, u, l) : n[u] = e[u];
|
|
32
|
-
}
|
|
33
|
-
return n.default = e, t && t.set(e, n), n;
|
|
34
|
-
}(require("react")).memo)(function(e) {
|
|
35
|
-
var o = e.className, n = e.children, a = e.wrapperRef, u = e.testId;
|
|
36
|
-
return (0, r.jsx)("footer", {
|
|
37
|
-
"data-testid": void 0 === u ? 'modal-footer' : u,
|
|
38
|
-
ref: a,
|
|
39
|
-
className: (0, t.default)('modal__footer', void 0 === o ? '' : o),
|
|
40
|
-
role: "contentinfo",
|
|
41
|
-
"aria-label": "Modal footer",
|
|
42
|
-
children: n
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
n.displayName = 'ModalFooter';
|
|
46
|
-
var a = n;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return a}});var e,r=require("react/jsx-runtime"),t=(e=require("classnames"))&&e.__esModule?e:{default:e};function o(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(o=function(e){return e?t:r})(e)}var n=(0,function(e,r){if(e&&e.__esModule)return e;if(null===e||(void 0===e?"undefined":e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)!="object"&&"function"!=typeof e)return{default:e};var t=o(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var l=a?Object.getOwnPropertyDescriptor(e,u):null;l&&(l.get||l.set)?Object.defineProperty(n,u,l):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}(require("react")).memo)(function(e){var o=e.className,n=e.children,a=e.wrapperRef,u=e.testId;return(0,r.jsx)("footer",{"data-testid":void 0===u?"modal-footer":u,ref:a,className:(0,t.default)("modal__footer",void 0===o?"":o),role:"contentinfo","aria-label":"Modal footer",children:n})});n.displayName="ModalFooter";var a=n;
|
|
@@ -1,83 +1 @@
|
|
|
1
|
-
function e(e, r, t) {
|
|
2
|
-
return r in e ? Object.defineProperty(e, r, {
|
|
3
|
-
value: t,
|
|
4
|
-
enumerable: !0,
|
|
5
|
-
configurable: !0,
|
|
6
|
-
writable: !0
|
|
7
|
-
}) : e[r] = t, e;
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10
|
-
value: !0
|
|
11
|
-
}), Object.defineProperty(exports, "default", {
|
|
12
|
-
enumerable: !0,
|
|
13
|
-
get: function() {
|
|
14
|
-
return d;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
var r, t = require("react/jsx-runtime"), a = (r = require("classnames")) && r.__esModule ? r : {
|
|
18
|
-
default: r
|
|
19
|
-
}, n = function(e, r) {
|
|
20
|
-
if (e && e.__esModule) return e;
|
|
21
|
-
if (null === e || (void 0 === e ? "undefined" : e && "undefined" != typeof Symbol && e.constructor === Symbol ? "symbol" : typeof e) != "object" && "function" != typeof e) return {
|
|
22
|
-
default: e
|
|
23
|
-
};
|
|
24
|
-
var t = l(r);
|
|
25
|
-
if (t && t.has(e)) return t.get(e);
|
|
26
|
-
var a = {
|
|
27
|
-
__proto__: null
|
|
28
|
-
}, n = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
29
|
-
for(var o in e)if ("default" !== o && Object.prototype.hasOwnProperty.call(e, o)) {
|
|
30
|
-
var i = n ? Object.getOwnPropertyDescriptor(e, o) : null;
|
|
31
|
-
i && (i.get || i.set) ? Object.defineProperty(a, o, i) : a[o] = e[o];
|
|
32
|
-
}
|
|
33
|
-
return a.default = e, t && t.set(e, a), a;
|
|
34
|
-
}(require("react")), o = require("react-feather");
|
|
35
|
-
function l(e) {
|
|
36
|
-
if ("function" != typeof WeakMap) return null;
|
|
37
|
-
var r = new WeakMap(), t = new WeakMap();
|
|
38
|
-
return (l = function(e) {
|
|
39
|
-
return e ? t : r;
|
|
40
|
-
})(e);
|
|
41
|
-
}
|
|
42
|
-
var i = (0, n.memo)(function(r) {
|
|
43
|
-
var l = r.variant, i = void 0 === l ? 'primary' : l, d = r.children, u = r.isForced, c = r.onClose, s = r.noHeaderCloseBtn, f = r.className, p = r.wrapperRef, m = r.testId, b = void 0 === m ? 'modal-title' : m, y = (0, n.useCallback)(function(e) {
|
|
44
|
-
('Enter' === e.key || 'Space' === e.key) && (e.preventDefault(), null == c || c());
|
|
45
|
-
}, [
|
|
46
|
-
c
|
|
47
|
-
]), v = (0, n.useCallback)(function() {
|
|
48
|
-
null == c || c();
|
|
49
|
-
}, [
|
|
50
|
-
c
|
|
51
|
-
]);
|
|
52
|
-
return (0, t.jsxs)("header", {
|
|
53
|
-
"data-testid": b,
|
|
54
|
-
ref: p,
|
|
55
|
-
className: (0, a.default)('modal__header', f, e({}, "modal__header-".concat(i), i)),
|
|
56
|
-
role: "banner",
|
|
57
|
-
"aria-label": "Modal header",
|
|
58
|
-
children: [
|
|
59
|
-
(0, t.jsx)("span", {
|
|
60
|
-
className: (0, a.default)('modal__header-title', e({}, "modal__header-".concat(i, "-title"), i)),
|
|
61
|
-
id: "".concat(b, "-heading"),
|
|
62
|
-
children: d
|
|
63
|
-
}),
|
|
64
|
-
!(void 0 !== u && u) && (0, t.jsx)("button", {
|
|
65
|
-
type: "button",
|
|
66
|
-
onClick: v,
|
|
67
|
-
onKeyDown: y,
|
|
68
|
-
className: (0, a.default)('modal-close-icon-box', {
|
|
69
|
-
'modal-close-icon-box-primary': 'primary' === i
|
|
70
|
-
}),
|
|
71
|
-
"aria-label": "Close modal",
|
|
72
|
-
title: "Close modal",
|
|
73
|
-
children: !(void 0 !== s && s) && (0, t.jsx)(o.X, {
|
|
74
|
-
className: "modal-close-icon",
|
|
75
|
-
role: "img",
|
|
76
|
-
"aria-hidden": "true"
|
|
77
|
-
})
|
|
78
|
-
})
|
|
79
|
-
]
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
i.displayName = 'ModalTitle';
|
|
83
|
-
var d = i;
|
|
1
|
+
function e(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return d}});var r,t=require("react/jsx-runtime"),a=(r=require("classnames"))&&r.__esModule?r:{default:r},n=function(e,r){if(e&&e.__esModule)return e;if(null===e||(void 0===e?"undefined":e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)!="object"&&"function"!=typeof e)return{default:e};var t=l(r);if(t&&t.has(e))return t.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,t&&t.set(e,a),a}(require("react")),o=require("react-feather");function l(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(l=function(e){return e?t:r})(e)}var i=(0,n.memo)(function(r){var l=r.variant,i=void 0===l?"primary":l,d=r.children,u=r.isForced,c=r.onClose,s=r.noHeaderCloseBtn,f=r.className,p=r.wrapperRef,m=r.testId,b=void 0===m?"modal-title":m,y=(0,n.useCallback)(function(e){("Enter"===e.key||"Space"===e.key)&&(e.preventDefault(),null==c||c())},[c]),v=(0,n.useCallback)(function(){null==c||c()},[c]);return(0,t.jsxs)("header",{"data-testid":b,ref:p,className:(0,a.default)("modal__header",f,e({},"modal__header-".concat(i),i)),role:"banner","aria-label":"Modal header",children:[(0,t.jsx)("span",{className:(0,a.default)("modal__header-title",e({},"modal__header-".concat(i,"-title"),i)),id:"".concat(b,"-heading"),children:d}),!(void 0!==u&&u)&&(0,t.jsx)("button",{type:"button",onClick:v,onKeyDown:y,className:(0,a.default)("modal-close-icon-box",{"modal-close-icon-box-primary":"primary"===i}),"aria-label":"Close modal",title:"Close modal",children:!(void 0!==s&&s)&&(0,t.jsx)(o.X,{className:"modal-close-icon",role:"img","aria-hidden":"true"})})]})});i.displayName="ModalTitle";var d=i;
|
|
@@ -1,200 +1 @@
|
|
|
1
|
-
function e(e, t) {
|
|
2
|
-
(null == t || t > e.length) && (t = e.length);
|
|
3
|
-
for(var n = 0, r = Array(t); n < t; n++)r[n] = e[n];
|
|
4
|
-
return r;
|
|
5
|
-
}
|
|
6
|
-
function t(e) {
|
|
7
|
-
for(var t = 1; t < arguments.length; t++){
|
|
8
|
-
var n = null != arguments[t] ? arguments[t] : {}, r = Object.keys(n);
|
|
9
|
-
"function" == typeof Object.getOwnPropertySymbols && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(e) {
|
|
10
|
-
return Object.getOwnPropertyDescriptor(n, e).enumerable;
|
|
11
|
-
}))), r.forEach(function(t) {
|
|
12
|
-
var r;
|
|
13
|
-
r = n[t], t in e ? Object.defineProperty(e, t, {
|
|
14
|
-
value: r,
|
|
15
|
-
enumerable: !0,
|
|
16
|
-
configurable: !0,
|
|
17
|
-
writable: !0
|
|
18
|
-
}) : e[t] = r;
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return e;
|
|
22
|
-
}
|
|
23
|
-
function n(e, t) {
|
|
24
|
-
return t = null != t ? t : {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : (function(e, t) {
|
|
25
|
-
var n = Object.keys(e);
|
|
26
|
-
if (Object.getOwnPropertySymbols) {
|
|
27
|
-
var r = Object.getOwnPropertySymbols(e);
|
|
28
|
-
n.push.apply(n, r);
|
|
29
|
-
}
|
|
30
|
-
return n;
|
|
31
|
-
})(Object(t)).forEach(function(n) {
|
|
32
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
33
|
-
}), e;
|
|
34
|
-
}
|
|
35
|
-
function r(t, n) {
|
|
36
|
-
return function(e) {
|
|
37
|
-
if (Array.isArray(e)) return e;
|
|
38
|
-
}(t) || function(e, t) {
|
|
39
|
-
var n, r, l = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
|
|
40
|
-
if (null != l) {
|
|
41
|
-
var u = [], o = !0, i = !1;
|
|
42
|
-
try {
|
|
43
|
-
for(l = l.call(e); !(o = (n = l.next()).done) && (u.push(n.value), !t || u.length !== t); o = !0);
|
|
44
|
-
} catch (e) {
|
|
45
|
-
i = !0, r = e;
|
|
46
|
-
} finally{
|
|
47
|
-
try {
|
|
48
|
-
o || null == l.return || l.return();
|
|
49
|
-
} finally{
|
|
50
|
-
if (i) throw r;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return u;
|
|
54
|
-
}
|
|
55
|
-
}(t, n) || function(t, n) {
|
|
56
|
-
if (t) {
|
|
57
|
-
if ("string" == typeof t) return e(t, n);
|
|
58
|
-
var r = Object.prototype.toString.call(t).slice(8, -1);
|
|
59
|
-
if ("Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r) return Array.from(r);
|
|
60
|
-
if ("Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return e(t, n);
|
|
61
|
-
}
|
|
62
|
-
}(t, n) || function() {
|
|
63
|
-
throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
64
|
-
}();
|
|
65
|
-
}
|
|
66
|
-
Object.defineProperty(exports, "__esModule", {
|
|
67
|
-
value: !0
|
|
68
|
-
}), Object.defineProperty(exports, "default", {
|
|
69
|
-
enumerable: !0,
|
|
70
|
-
get: function() {
|
|
71
|
-
return a;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
var l, u = require("react/jsx-runtime"), o = require("react"), i = (l = require("../../../../Functions/useIsMobile/useIsMobile")) && l.__esModule ? l : {
|
|
75
|
-
default: l
|
|
76
|
-
}, c = {
|
|
77
|
-
UP: 'up',
|
|
78
|
-
DOWN: 'down'
|
|
79
|
-
};
|
|
80
|
-
function a(e) {
|
|
81
|
-
var l, a, f, d, s = e.modalRef, g = e.withMobileLogic, v = void 0 !== g && g, y = e.withFixedFooter, h = void 0 !== y && y, b = e.isOpen, O = void 0 !== b && b, p = (0, o.useRef)(null), m = (0, o.useRef)(null), S = (0, o.useRef)(null), E = (0, o.useRef)(null), w = (0, i.default)().isMobile, I = r((0, o.useState)(0), 2), R = I[0], _ = I[1], H = r((0, o.useState)({
|
|
82
|
-
IS_HEADER_HIDDEN: !1,
|
|
83
|
-
IS_HEADER_STICKY: !1,
|
|
84
|
-
IS_FOOTER_HIDDEN: !1,
|
|
85
|
-
IS_FOOTER_STICKY: h
|
|
86
|
-
}), 2), D = H[0], j = H[1], C = r((0, o.useState)({
|
|
87
|
-
headerHeight: 0,
|
|
88
|
-
footerHeight: 0
|
|
89
|
-
}), 2), P = C[0], T = C[1], M = r((0, o.useState)(c.UP), 2), A = M[0], L = M[1], N = r((0, o.useState)(0), 2), F = N[0], x = N[1], B = r((0, o.useState)(0), 2), K = B[0], U = B[1], Y = r((0, o.useState)(1), 2), W = Y[0], k = Y[1], q = r((0, o.useState)(1), 2)[1];
|
|
90
|
-
(0, o.useLayoutEffect)(function() {
|
|
91
|
-
var e = null == p ? void 0 : p.current;
|
|
92
|
-
e && e.addEventListener('scroll', function() {
|
|
93
|
-
U(function(t) {
|
|
94
|
-
return t !== e.scrollTop && x(t), e.scrollTop;
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
}, [
|
|
98
|
-
null == p ? void 0 : p.current
|
|
99
|
-
]), (0, o.useEffect)(function() {
|
|
100
|
-
L(function(e) {
|
|
101
|
-
return K < F ? c.UP : K > F ? c.DOWN : e;
|
|
102
|
-
});
|
|
103
|
-
}, [
|
|
104
|
-
K,
|
|
105
|
-
F
|
|
106
|
-
]), (0, o.useLayoutEffect)(function() {
|
|
107
|
-
if (O) {
|
|
108
|
-
var e, t, n, r, l = (null == s ? void 0 : s.current) ? (null == s ? void 0 : s.current.style) || window.getComputedStyle(null == s ? void 0 : s.current) : {}, u = (null == s ? void 0 : s.current) ? R + Number.parseFloat((null == l ? void 0 : l.marginTop) || '0') : 0, o = document.documentElement.clientHeight || window.screen.availHeight || window.screen.height;
|
|
109
|
-
(null == p ? void 0 : p.current) && (u <= o ? (p.current.style.display = 'flex', p.current.style.alignItems = 'flex-end') : (null == (t = p.current) || null == (e = t.style) || e.removeProperty('display'), null == (r = p.current) || null == (n = r.style) || n.removeProperty('align-items')));
|
|
110
|
-
}
|
|
111
|
-
}, [
|
|
112
|
-
P,
|
|
113
|
-
O,
|
|
114
|
-
w,
|
|
115
|
-
R
|
|
116
|
-
]), (0, o.useLayoutEffect)(function() {
|
|
117
|
-
if (w && O) {
|
|
118
|
-
var e, t, n = null == s || null == (t = s.current) || null == (e = t.getBoundingClientRect()) ? void 0 : e.height;
|
|
119
|
-
n && R !== n && _(n);
|
|
120
|
-
}
|
|
121
|
-
}), (0, o.useEffect)(function() {
|
|
122
|
-
if (w && v) {
|
|
123
|
-
var e = P.footerHeight, t = P.headerHeight;
|
|
124
|
-
j(function(n) {
|
|
125
|
-
return {
|
|
126
|
-
IS_HEADER_HIDDEN: A === c.DOWN || 0 === K,
|
|
127
|
-
IS_HEADER_STICKY: A === c.UP && 0 !== K && (K >= t || n.IS_HEADER_STICKY),
|
|
128
|
-
IS_FOOTER_HIDDEN: !h && (A === c.UP || W === Math.round(K)),
|
|
129
|
-
IS_FOOTER_STICKY: h && W > 1 || A === c.DOWN && (W - Math.round(K) >= e || n.IS_FOOTER_STICKY)
|
|
130
|
-
};
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}, [
|
|
134
|
-
K,
|
|
135
|
-
W,
|
|
136
|
-
w,
|
|
137
|
-
v,
|
|
138
|
-
A,
|
|
139
|
-
P,
|
|
140
|
-
R,
|
|
141
|
-
window.innerHeight
|
|
142
|
-
]), (0, o.useLayoutEffect)(function() {
|
|
143
|
-
var e, r;
|
|
144
|
-
(null == m || null == (r = m.current) || null == (e = r.getBoundingClientRect()) ? void 0 : e.height) !== void 0 && T(function(e) {
|
|
145
|
-
var r, l, u;
|
|
146
|
-
return n(t({}, e), {
|
|
147
|
-
headerHeight: null != (u = null == m || null == (l = m.current) || null == (r = l.getBoundingClientRect()) ? void 0 : r.height) ? u : 0
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
}, [
|
|
151
|
-
null == m || null == (a = m.current) || null == (l = a.getBoundingClientRect()) ? void 0 : l.height
|
|
152
|
-
]), (0, o.useLayoutEffect)(function() {
|
|
153
|
-
var e, r;
|
|
154
|
-
(null == S || null == (r = S.current) || null == (e = r.getBoundingClientRect()) ? void 0 : e.height) !== void 0 && T(function(e) {
|
|
155
|
-
var r, l, u;
|
|
156
|
-
return n(t({}, e), {
|
|
157
|
-
footerHeight: null != (u = null == S || null == (l = S.current) || null == (r = l.getBoundingClientRect()) ? void 0 : r.height) ? u : 0
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
}, [
|
|
161
|
-
null == S || null == (d = S.current) || null == (f = d.getBoundingClientRect()) ? void 0 : f.height
|
|
162
|
-
]), (0, o.useEffect)(function() {
|
|
163
|
-
if (null == p ? void 0 : p.current) {
|
|
164
|
-
var e, t;
|
|
165
|
-
q(null == p || null == (e = p.current) ? void 0 : e.scrollHeight), k((null == p || null == (t = p.current) ? void 0 : t.scrollHeight) - window.innerHeight);
|
|
166
|
-
}
|
|
167
|
-
}, [
|
|
168
|
-
K,
|
|
169
|
-
null == p ? void 0 : p.current,
|
|
170
|
-
window.innerHeight
|
|
171
|
-
]), (0, o.useEffect)(function() {
|
|
172
|
-
window.addEventListener('resize', function() {
|
|
173
|
-
q(function(e) {
|
|
174
|
-
return k(e - window.innerHeight), e;
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
-
}, []);
|
|
178
|
-
var z = (0, o.useCallback)(function(e) {
|
|
179
|
-
return w && v ? (0, u.jsx)("div", {
|
|
180
|
-
className: "modal-mobile-container",
|
|
181
|
-
ref: p,
|
|
182
|
-
children: e
|
|
183
|
-
}) : e;
|
|
184
|
-
}, [
|
|
185
|
-
w,
|
|
186
|
-
v
|
|
187
|
-
]);
|
|
188
|
-
return {
|
|
189
|
-
modalMobileContainerRef: p,
|
|
190
|
-
modalMobileHeaderRef: m,
|
|
191
|
-
modalMobileBodyRef: E,
|
|
192
|
-
modalMobileFooterRef: S,
|
|
193
|
-
MODALS_LOGIC: D,
|
|
194
|
-
SCROLL_DIRECTION: c,
|
|
195
|
-
scrollTop: K,
|
|
196
|
-
scrollHeight: W,
|
|
197
|
-
renderModal: z,
|
|
198
|
-
isMobile: w
|
|
199
|
-
};
|
|
200
|
-
}
|
|
1
|
+
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function n(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function r(t,n){return function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,l=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=l){var u=[],o=!0,i=!1;try{for(l=l.call(e);!(o=(n=l.next()).done)&&(u.push(n.value),!t||u.length!==t);o=!0);}catch(e){i=!0,r=e}finally{try{o||null==l.return||l.return()}finally{if(i)throw r}}return u}}(t,n)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}}(t,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return a}});var l,u=require("react/jsx-runtime"),o=require("react"),i=(l=require("../../../../Functions/useIsMobile/useIsMobile"))&&l.__esModule?l:{default:l},c={UP:"up",DOWN:"down"};function a(e){var l,a,f,d,s=e.modalRef,g=e.withMobileLogic,v=void 0!==g&&g,y=e.withFixedFooter,h=void 0!==y&&y,b=e.isOpen,O=void 0!==b&&b,p=(0,o.useRef)(null),m=(0,o.useRef)(null),S=(0,o.useRef)(null),E=(0,o.useRef)(null),w=(0,i.default)().isMobile,I=r((0,o.useState)(0),2),R=I[0],_=I[1],H=r((0,o.useState)({IS_HEADER_HIDDEN:!1,IS_HEADER_STICKY:!1,IS_FOOTER_HIDDEN:!1,IS_FOOTER_STICKY:h}),2),D=H[0],j=H[1],C=r((0,o.useState)({headerHeight:0,footerHeight:0}),2),P=C[0],T=C[1],M=r((0,o.useState)(c.UP),2),A=M[0],L=M[1],N=r((0,o.useState)(0),2),F=N[0],x=N[1],B=r((0,o.useState)(0),2),K=B[0],U=B[1],Y=r((0,o.useState)(1),2),W=Y[0],k=Y[1],q=r((0,o.useState)(1),2)[1];(0,o.useLayoutEffect)(function(){var e=null==p?void 0:p.current;e&&e.addEventListener("scroll",function(){U(function(t){return t!==e.scrollTop&&x(t),e.scrollTop})})},[null==p?void 0:p.current]),(0,o.useEffect)(function(){L(function(e){return K<F?c.UP:K>F?c.DOWN:e})},[K,F]),(0,o.useLayoutEffect)(function(){if(O){var e,t,n,r,l=(null==s?void 0:s.current)?(null==s?void 0:s.current.style)||window.getComputedStyle(null==s?void 0:s.current):{},u=(null==s?void 0:s.current)?R+Number.parseFloat((null==l?void 0:l.marginTop)||"0"):0,o=document.documentElement.clientHeight||window.screen.availHeight||window.screen.height;(null==p?void 0:p.current)&&(u<=o?(p.current.style.display="flex",p.current.style.alignItems="flex-end"):(null==(t=p.current)||null==(e=t.style)||e.removeProperty("display"),null==(r=p.current)||null==(n=r.style)||n.removeProperty("align-items")))}},[P,O,w,R]),(0,o.useLayoutEffect)(function(){if(w&&O){var e,t,n=null==s||null==(t=s.current)||null==(e=t.getBoundingClientRect())?void 0:e.height;n&&R!==n&&_(n)}}),(0,o.useEffect)(function(){if(w&&v){var e=P.footerHeight,t=P.headerHeight;j(function(n){return{IS_HEADER_HIDDEN:A===c.DOWN||0===K,IS_HEADER_STICKY:A===c.UP&&0!==K&&(K>=t||n.IS_HEADER_STICKY),IS_FOOTER_HIDDEN:!h&&(A===c.UP||W===Math.round(K)),IS_FOOTER_STICKY:h&&W>1||A===c.DOWN&&(W-Math.round(K)>=e||n.IS_FOOTER_STICKY)}})}},[K,W,w,v,A,P,R,window.innerHeight]),(0,o.useLayoutEffect)(function(){var e,r;(null==m||null==(r=m.current)||null==(e=r.getBoundingClientRect())?void 0:e.height)!==void 0&&T(function(e){var r,l,u;return n(t({},e),{headerHeight:null!=(u=null==m||null==(l=m.current)||null==(r=l.getBoundingClientRect())?void 0:r.height)?u:0})})},[null==m||null==(a=m.current)||null==(l=a.getBoundingClientRect())?void 0:l.height]),(0,o.useLayoutEffect)(function(){var e,r;(null==S||null==(r=S.current)||null==(e=r.getBoundingClientRect())?void 0:e.height)!==void 0&&T(function(e){var r,l,u;return n(t({},e),{footerHeight:null!=(u=null==S||null==(l=S.current)||null==(r=l.getBoundingClientRect())?void 0:r.height)?u:0})})},[null==S||null==(d=S.current)||null==(f=d.getBoundingClientRect())?void 0:f.height]),(0,o.useEffect)(function(){if(null==p?void 0:p.current){var e,t;q(null==p||null==(e=p.current)?void 0:e.scrollHeight),k((null==p||null==(t=p.current)?void 0:t.scrollHeight)-window.innerHeight)}},[K,null==p?void 0:p.current,window.innerHeight]),(0,o.useEffect)(function(){window.addEventListener("resize",function(){q(function(e){return k(e-window.innerHeight),e})})},[]);var z=(0,o.useCallback)(function(e){return w&&v?(0,u.jsx)("div",{className:"modal-mobile-container",ref:p,children:e}):e},[w,v]);return{modalMobileContainerRef:p,modalMobileHeaderRef:m,modalMobileBodyRef:E,modalMobileFooterRef:S,MODALS_LOGIC:D,SCROLL_DIRECTION:c,scrollTop:K,scrollHeight:W,renderModal:z,isMobile:w}}
|