funda-ui 4.7.624 → 4.7.625
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/README.md +2 -116
- package/package.json +1 -591
- package/.gitattributes +0 -2
- package/README_PUBLISH.md +0 -328
- package/logo.png +0 -0
- package/preview.png +0 -0
- package/publish/LICENSE +0 -21
- package/publish/README.md +0 -328
- package/publish/lib/cjs/Accordion/index.d.ts +0 -2
- package/publish/lib/cjs/Accordion/index.js +0 -667
- package/publish/lib/cjs/BackToTop/index.d.ts +0 -17
- package/publish/lib/cjs/BackToTop/index.js +0 -904
- package/publish/lib/cjs/CascadingSelect/index.d.ts +0 -80
- package/publish/lib/cjs/CascadingSelect/index.js +0 -3383
- package/publish/lib/cjs/CascadingSelectE2E/index.d.ts +0 -91
- package/publish/lib/cjs/CascadingSelectE2E/index.js +0 -3988
- package/publish/lib/cjs/Chatbox/index.d.ts +0 -101
- package/publish/lib/cjs/Chatbox/index.js +0 -7037
- package/publish/lib/cjs/Checkbox/index.d.ts +0 -28
- package/publish/lib/cjs/Checkbox/index.js +0 -673
- package/publish/lib/cjs/ColorPicker/index.d.ts +0 -27
- package/publish/lib/cjs/ColorPicker/index.js +0 -662
- package/publish/lib/cjs/Date/index.d.ts +0 -70
- package/publish/lib/cjs/Date/index.js +0 -6368
- package/publish/lib/cjs/DigitalClock/index.d.ts +0 -7
- package/publish/lib/cjs/DigitalClock/index.js +0 -402
- package/publish/lib/cjs/DragDropList/index.d.ts +0 -45
- package/publish/lib/cjs/DragDropList/index.js +0 -1586
- package/publish/lib/cjs/DropdownMenu/index.d.ts +0 -38
- package/publish/lib/cjs/DropdownMenu/index.js +0 -1507
- package/publish/lib/cjs/DynamicFields/index.d.ts +0 -40
- package/publish/lib/cjs/DynamicFields/index.js +0 -818
- package/publish/lib/cjs/EventCalendar/index.d.ts +0 -61
- package/publish/lib/cjs/EventCalendar/index.js +0 -3789
- package/publish/lib/cjs/EventCalendarTimeline/index.d.ts +0 -100
- package/publish/lib/cjs/EventCalendarTimeline/index.js +0 -6141
- package/publish/lib/cjs/File/index.d.ts +0 -40
- package/publish/lib/cjs/File/index.js +0 -1751
- package/publish/lib/cjs/HorizontalScrollContent/index.d.ts +0 -14
- package/publish/lib/cjs/HorizontalScrollContent/index.js +0 -426
- package/publish/lib/cjs/Input/index.d.ts +0 -59
- package/publish/lib/cjs/Input/index.js +0 -1486
- package/publish/lib/cjs/LiveSearch/index.d.ts +0 -70
- package/publish/lib/cjs/LiveSearch/index.js +0 -4180
- package/publish/lib/cjs/MasonryLayout/index.d.ts +0 -14
- package/publish/lib/cjs/MasonryLayout/index.js +0 -689
- package/publish/lib/cjs/ModalDialog/index.d.ts +0 -83
- package/publish/lib/cjs/ModalDialog/index.js +0 -1719
- package/publish/lib/cjs/ModeSwitch/index.d.ts +0 -17
- package/publish/lib/cjs/ModeSwitch/index.js +0 -202
- package/publish/lib/cjs/MultilevelDropdownMenu/index.d.ts +0 -20
- package/publish/lib/cjs/MultilevelDropdownMenu/index.js +0 -930
- package/publish/lib/cjs/MultipleCheckboxes/index.d.ts +0 -66
- package/publish/lib/cjs/MultipleCheckboxes/index.js +0 -2337
- package/publish/lib/cjs/MultipleSelect/index.d.ts +0 -65
- package/publish/lib/cjs/MultipleSelect/index.js +0 -4197
- package/publish/lib/cjs/NativeSelect/index.d.ts +0 -37
- package/publish/lib/cjs/NativeSelect/index.js +0 -2052
- package/publish/lib/cjs/NumberInput/index.d.ts +0 -40
- package/publish/lib/cjs/NumberInput/index.js +0 -1191
- package/publish/lib/cjs/Pagination/index.d.ts +0 -51
- package/publish/lib/cjs/Pagination/index.js +0 -612
- package/publish/lib/cjs/Radio/index.d.ts +0 -45
- package/publish/lib/cjs/Radio/index.js +0 -1838
- package/publish/lib/cjs/RangeSlider/index.d.ts +0 -22
- package/publish/lib/cjs/RangeSlider/index.js +0 -2696
- package/publish/lib/cjs/Refresher/index.d.ts +0 -22
- package/publish/lib/cjs/Refresher/index.js +0 -564
- package/publish/lib/cjs/RootPortal/index.d.ts +0 -9
- package/publish/lib/cjs/RootPortal/index.js +0 -148
- package/publish/lib/cjs/ScrollReveal/index.d.ts +0 -21
- package/publish/lib/cjs/ScrollReveal/index.js +0 -401
- package/publish/lib/cjs/Scrollbar/index.d.ts +0 -17
- package/publish/lib/cjs/Scrollbar/index.js +0 -1107
- package/publish/lib/cjs/SearchBar/index.d.ts +0 -41
- package/publish/lib/cjs/SearchBar/index.js +0 -701
- package/publish/lib/cjs/Select/index.d.ts +0 -107
- package/publish/lib/cjs/Select/index.js +0 -6540
- package/publish/lib/cjs/ShowMoreLess/index.d.ts +0 -36
- package/publish/lib/cjs/ShowMoreLess/index.js +0 -387
- package/publish/lib/cjs/SplitterPanel/index.d.ts +0 -20
- package/publish/lib/cjs/SplitterPanel/index.js +0 -800
- package/publish/lib/cjs/Stepper/index.d.ts +0 -26
- package/publish/lib/cjs/Stepper/index.js +0 -568
- package/publish/lib/cjs/Switch/index.d.ts +0 -25
- package/publish/lib/cjs/Switch/index.js +0 -630
- package/publish/lib/cjs/Table/index.d.ts +0 -12
- package/publish/lib/cjs/Table/index.js +0 -2311
- package/publish/lib/cjs/Tabs/index.d.ts +0 -3
- package/publish/lib/cjs/Tabs/index.js +0 -771
- package/publish/lib/cjs/TagInput/index.d.ts +0 -37
- package/publish/lib/cjs/TagInput/index.js +0 -1227
- package/publish/lib/cjs/Textarea/index.d.ts +0 -50
- package/publish/lib/cjs/Textarea/index.js +0 -1795
- package/publish/lib/cjs/Toast/index.d.ts +0 -3
- package/publish/lib/cjs/Toast/index.js +0 -1345
- package/publish/lib/cjs/Tooltip/index.d.ts +0 -38
- package/publish/lib/cjs/Tooltip/index.js +0 -1778
- package/publish/lib/cjs/Tree/index.d.ts +0 -78
- package/publish/lib/cjs/Tree/index.js +0 -2330
- package/publish/lib/cjs/Utils/anim.d.ts +0 -11
- package/publish/lib/cjs/Utils/anim.js +0 -846
- package/publish/lib/cjs/Utils/bodyScrollLock.d.ts +0 -8
- package/publish/lib/cjs/Utils/bodyScrollLock.js +0 -311
- package/publish/lib/cjs/Utils/buffer.d.ts +0 -67
- package/publish/lib/cjs/Utils/buffer.js +0 -343
- package/publish/lib/cjs/Utils/cls.d.ts +0 -15
- package/publish/lib/cjs/Utils/cls.js +0 -124
- package/publish/lib/cjs/Utils/convert.d.ts +0 -25
- package/publish/lib/cjs/Utils/convert.js +0 -109
- package/publish/lib/cjs/Utils/date.d.ts +0 -227
- package/publish/lib/cjs/Utils/date.js +0 -587
- package/publish/lib/cjs/Utils/dom.d.ts +0 -13
- package/publish/lib/cjs/Utils/dom.js +0 -215
- package/publish/lib/cjs/Utils/easing.d.ts +0 -29
- package/publish/lib/cjs/Utils/easing.js +0 -221
- package/publish/lib/cjs/Utils/extract.d.ts +0 -66
- package/publish/lib/cjs/Utils/extract.js +0 -195
- package/publish/lib/cjs/Utils/format-string.d.ts +0 -65
- package/publish/lib/cjs/Utils/format-string.js +0 -167
- package/publish/lib/cjs/Utils/formdata.d.ts +0 -13
- package/publish/lib/cjs/Utils/formdata.js +0 -131
- package/publish/lib/cjs/Utils/getElementProperty.d.ts +0 -52
- package/publish/lib/cjs/Utils/getElementProperty.js +0 -189
- package/publish/lib/cjs/Utils/guid.d.ts +0 -7
- package/publish/lib/cjs/Utils/guid.js +0 -67
- package/publish/lib/cjs/Utils/initDefaultOptions.d.ts +0 -10
- package/publish/lib/cjs/Utils/initDefaultOptions.js +0 -607
- package/publish/lib/cjs/Utils/inputsCalculation.d.ts +0 -28
- package/publish/lib/cjs/Utils/inputsCalculation.js +0 -188
- package/publish/lib/cjs/Utils/math.d.ts +0 -77
- package/publish/lib/cjs/Utils/math.js +0 -305
- package/publish/lib/cjs/Utils/object.d.ts +0 -18
- package/publish/lib/cjs/Utils/object.js +0 -120
- package/publish/lib/cjs/Utils/os.d.ts +0 -2
- package/publish/lib/cjs/Utils/os.js +0 -104
- package/publish/lib/cjs/Utils/performance.d.ts +0 -3
- package/publish/lib/cjs/Utils/performance.js +0 -94
- package/publish/lib/cjs/Utils/sanitize.d.ts +0 -14
- package/publish/lib/cjs/Utils/sanitize.js +0 -87
- package/publish/lib/cjs/Utils/time.d.ts +0 -40
- package/publish/lib/cjs/Utils/time.js +0 -177
- package/publish/lib/cjs/Utils/tree.d.ts +0 -40
- package/publish/lib/cjs/Utils/tree.js +0 -195
- package/publish/lib/cjs/Utils/useAutosizeTextArea.d.ts +0 -10
- package/publish/lib/cjs/Utils/useAutosizeTextArea.js +0 -231
- package/publish/lib/cjs/Utils/useBoundedDrag.d.ts +0 -125
- package/publish/lib/cjs/Utils/useBoundedDrag.js +0 -380
- package/publish/lib/cjs/Utils/useClickOutside.d.ts +0 -33
- package/publish/lib/cjs/Utils/useClickOutside.js +0 -166
- package/publish/lib/cjs/Utils/useComId.d.ts +0 -6
- package/publish/lib/cjs/Utils/useComId.js +0 -114
- package/publish/lib/cjs/Utils/useDebounce.d.ts +0 -20
- package/publish/lib/cjs/Utils/useDebounce.js +0 -138
- package/publish/lib/cjs/Utils/useDragDropPosition.d.ts +0 -166
- package/publish/lib/cjs/Utils/useDragDropPosition.js +0 -453
- package/publish/lib/cjs/Utils/useDraggable.d.ts +0 -62
- package/publish/lib/cjs/Utils/useDraggable.js +0 -348
- package/publish/lib/cjs/Utils/useHistoryTracker.d.ts +0 -166
- package/publish/lib/cjs/Utils/useHistoryTracker.js +0 -649
- package/publish/lib/cjs/Utils/useInterval.d.ts +0 -5
- package/publish/lib/cjs/Utils/useInterval.js +0 -168
- package/publish/lib/cjs/Utils/useIsMobile.d.ts +0 -2
- package/publish/lib/cjs/Utils/useIsMobile.js +0 -232
- package/publish/lib/cjs/Utils/useKeyPress.d.ts +0 -44
- package/publish/lib/cjs/Utils/useKeyPress.js +0 -200
- package/publish/lib/cjs/Utils/useSessionStorageListener.d.ts +0 -2
- package/publish/lib/cjs/Utils/useSessionStorageListener.js +0 -157
- package/publish/lib/cjs/Utils/useStreamController.d.ts +0 -71
- package/publish/lib/cjs/Utils/useStreamController.js +0 -494
- package/publish/lib/cjs/Utils/useThrottle.d.ts +0 -2
- package/publish/lib/cjs/Utils/useThrottle.js +0 -136
- package/publish/lib/cjs/Utils/useWindowScroll.d.ts +0 -12
- package/publish/lib/cjs/Utils/useWindowScroll.js +0 -217
- package/publish/lib/cjs/Utils/validate.d.ts +0 -53
- package/publish/lib/cjs/Utils/validate.js +0 -536
- package/publish/lib/cjs/Utils/viewport.d.ts +0 -7
- package/publish/lib/cjs/Utils/viewport.js +0 -64
- package/publish/lib/cjs/index.d.ts +0 -49
- package/publish/lib/cjs/index.js +0 -50
- package/publish/lib/css/BackToTop/index.css +0 -34
- package/publish/lib/css/CascadingSelect/index.css +0 -245
- package/publish/lib/css/CascadingSelectE2E/index.css +0 -245
- package/publish/lib/css/Chatbox/index.css +0 -774
- package/publish/lib/css/ColorPicker/index.css +0 -58
- package/publish/lib/css/Date/index.css +0 -434
- package/publish/lib/css/DragDropList/index.css +0 -188
- package/publish/lib/css/DropdownMenu/index.css +0 -151
- package/publish/lib/css/EventCalendar/index.css +0 -300
- package/publish/lib/css/EventCalendarTimeline/index.css +0 -694
- package/publish/lib/css/HorizontalScrollContent/index.css +0 -70
- package/publish/lib/css/LiveSearch/index.css +0 -88
- package/publish/lib/css/MultilevelDropdownMenu/index.css +0 -38
- package/publish/lib/css/MultipleSelect/index.css +0 -313
- package/publish/lib/css/RangeSlider/index.css +0 -150
- package/publish/lib/css/Scrollbar/index.css +0 -176
- package/publish/lib/css/Select/index.css +0 -434
- package/publish/lib/css/ShowMoreLess/index.css +0 -23
- package/publish/lib/css/SplitterPanel/index.css +0 -63
- package/publish/lib/css/Stepper/index.css +0 -250
- package/publish/lib/css/Table/index.css +0 -584
- package/publish/lib/css/TagInput/index.css +0 -91
- package/publish/lib/css/Toast/index.css +0 -149
- package/publish/lib/css/Tooltip/index.css +0 -198
- package/publish/lib/css/Tree/index.css +0 -237
- package/publish/lib/esm/Accordion/Accordion.tsx +0 -185
- package/publish/lib/esm/Accordion/AccordionItem.tsx +0 -248
- package/publish/lib/esm/Accordion/index.tsx +0 -2
- package/publish/lib/esm/BackToTop/index.scss +0 -47
- package/publish/lib/esm/BackToTop/index.tsx +0 -177
- package/publish/lib/esm/CascadingSelect/Group.tsx +0 -83
- package/publish/lib/esm/CascadingSelect/index.scss +0 -330
- package/publish/lib/esm/CascadingSelect/index.tsx +0 -1397
- package/publish/lib/esm/CascadingSelectE2E/Group.tsx +0 -87
- package/publish/lib/esm/CascadingSelectE2E/index.scss +0 -333
- package/publish/lib/esm/CascadingSelectE2E/index.tsx +0 -1684
- package/publish/lib/esm/Chatbox/PureLoader.tsx +0 -47
- package/publish/lib/esm/Chatbox/TypingEffect.tsx +0 -56
- package/publish/lib/esm/Chatbox/index.scss +0 -966
- package/publish/lib/esm/Chatbox/index.tsx +0 -1742
- package/publish/lib/esm/Chatbox/utils/func.ts +0 -180
- package/publish/lib/esm/Checkbox/index.tsx +0 -206
- package/publish/lib/esm/ColorPicker/index.scss +0 -91
- package/publish/lib/esm/ColorPicker/index.tsx +0 -204
- package/publish/lib/esm/Date/Calendar.tsx +0 -723
- package/publish/lib/esm/Date/index.scss +0 -567
- package/publish/lib/esm/Date/index.tsx +0 -1797
- package/publish/lib/esm/Date/localization/en_US.js +0 -13
- package/publish/lib/esm/Date/localization/zh_CN.js +0 -12
- package/publish/lib/esm/DigitalClock/index.tsx +0 -74
- package/publish/lib/esm/DragDropList/index.scss +0 -245
- package/publish/lib/esm/DragDropList/index.tsx +0 -504
- package/publish/lib/esm/DropdownMenu/Option.tsx +0 -55
- package/publish/lib/esm/DropdownMenu/index.scss +0 -205
- package/publish/lib/esm/DropdownMenu/index.tsx +0 -378
- package/publish/lib/esm/DynamicFields/index.tsx +0 -409
- package/publish/lib/esm/EventCalendar/index.scss +0 -407
- package/publish/lib/esm/EventCalendar/index.tsx +0 -1005
- package/publish/lib/esm/EventCalendarTimeline/index.scss +0 -926
- package/publish/lib/esm/EventCalendarTimeline/index.tsx +0 -2686
- package/publish/lib/esm/File/index.tsx +0 -477
- package/publish/lib/esm/HorizontalScrollContent/index.scss +0 -87
- package/publish/lib/esm/HorizontalScrollContent/index.tsx +0 -171
- package/publish/lib/esm/Input/index.tsx +0 -641
- package/publish/lib/esm/LiveSearch/index.scss +0 -129
- package/publish/lib/esm/LiveSearch/index.tsx +0 -1058
- package/publish/lib/esm/MasonryLayout/index.tsx +0 -326
- package/publish/lib/esm/ModalDialog/index.tsx +0 -572
- package/publish/lib/esm/ModeSwitch/index.tsx +0 -82
- package/publish/lib/esm/MultilevelDropdownMenu/ItemList.tsx +0 -265
- package/publish/lib/esm/MultilevelDropdownMenu/index.scss +0 -79
- package/publish/lib/esm/MultilevelDropdownMenu/index.tsx +0 -77
- package/publish/lib/esm/MultipleCheckboxes/index.tsx +0 -849
- package/publish/lib/esm/MultipleSelect/index.scss +0 -398
- package/publish/lib/esm/MultipleSelect/index.tsx +0 -769
- package/publish/lib/esm/MultipleSelect/utils/func.ts +0 -63
- package/publish/lib/esm/NativeSelect/index.tsx +0 -396
- package/publish/lib/esm/NativeSelect/utils/func.ts +0 -51
- package/publish/lib/esm/NumberInput/index.tsx +0 -425
- package/publish/lib/esm/Pagination/index.tsx +0 -286
- package/publish/lib/esm/Pagination/pagination-navigators.tsx +0 -60
- package/publish/lib/esm/Radio/index.tsx +0 -694
- package/publish/lib/esm/RangeSlider/index.scss +0 -186
- package/publish/lib/esm/RangeSlider/index.tsx +0 -241
- package/publish/lib/esm/Refresher/index.tsx +0 -121
- package/publish/lib/esm/RootPortal/index.tsx +0 -59
- package/publish/lib/esm/ScrollReveal/index.tsx +0 -148
- package/publish/lib/esm/Scrollbar/index.scss +0 -221
- package/publish/lib/esm/Scrollbar/index.tsx +0 -561
- package/publish/lib/esm/SearchBar/index.tsx +0 -252
- package/publish/lib/esm/Select/index.scss +0 -639
- package/publish/lib/esm/Select/index.tsx +0 -3104
- package/publish/lib/esm/Select/utils/func.ts +0 -98
- package/publish/lib/esm/ShowMoreLess/index.scss +0 -27
- package/publish/lib/esm/ShowMoreLess/index.tsx +0 -145
- package/publish/lib/esm/SplitterPanel/index.scss +0 -82
- package/publish/lib/esm/SplitterPanel/index.tsx +0 -174
- package/publish/lib/esm/Stepper/index.scss +0 -315
- package/publish/lib/esm/Stepper/index.tsx +0 -325
- package/publish/lib/esm/Switch/index.tsx +0 -149
- package/publish/lib/esm/Table/Table.tsx +0 -351
- package/publish/lib/esm/Table/TableBody.tsx +0 -41
- package/publish/lib/esm/Table/TableCaption.tsx +0 -34
- package/publish/lib/esm/Table/TableCell.tsx +0 -126
- package/publish/lib/esm/Table/TableColgroup.tsx +0 -38
- package/publish/lib/esm/Table/TableContext.tsx +0 -26
- package/publish/lib/esm/Table/TableFoot.tsx +0 -28
- package/publish/lib/esm/Table/TableHead.tsx +0 -28
- package/publish/lib/esm/Table/TableRow.tsx +0 -76
- package/publish/lib/esm/Table/index.scss +0 -418
- package/publish/lib/esm/Table/index.tsx +0 -14
- package/publish/lib/esm/Table/utils/DragHandleSprite.tsx +0 -46
- package/publish/lib/esm/Table/utils/SortSprite.tsx +0 -63
- package/publish/lib/esm/Table/utils/TableFilter.tsx +0 -56
- package/publish/lib/esm/Table/utils/ToggleSelection.tsx +0 -255
- package/publish/lib/esm/Table/utils/func.ts +0 -182
- package/publish/lib/esm/Table/utils/hooks/useTableDraggable.tsx +0 -342
- package/publish/lib/esm/Table/utils/hooks/useTableKeyPress.tsx +0 -255
- package/publish/lib/esm/Table/utils/hooks/useTableResponsive.tsx +0 -92
- package/publish/lib/esm/Table/utils/hooks/useTableSort.tsx +0 -187
- package/publish/lib/esm/Tabs/TabList.tsx +0 -50
- package/publish/lib/esm/Tabs/TabPanel.tsx +0 -44
- package/publish/lib/esm/Tabs/Tabs.tsx +0 -282
- package/publish/lib/esm/Tabs/index.tsx +0 -3
- package/publish/lib/esm/TagInput/index.scss +0 -126
- package/publish/lib/esm/TagInput/index.tsx +0 -379
- package/publish/lib/esm/Textarea/index.tsx +0 -621
- package/publish/lib/esm/Toast/Item.tsx +0 -165
- package/publish/lib/esm/Toast/Toast.tsx +0 -391
- package/publish/lib/esm/Toast/ToastContext.tsx +0 -104
- package/publish/lib/esm/Toast/__toast.vanilla.js +0 -422
- package/publish/lib/esm/Toast/index.scss +0 -197
- package/publish/lib/esm/Toast/index.tsx +0 -3
- package/publish/lib/esm/Toast/types.ts +0 -60
- package/publish/lib/esm/Toast/useToast.tsx +0 -72
- package/publish/lib/esm/Tooltip/index.scss +0 -272
- package/publish/lib/esm/Tooltip/index.tsx +0 -416
- package/publish/lib/esm/Tree/TreeList.tsx +0 -600
- package/publish/lib/esm/Tree/index.scss +0 -384
- package/publish/lib/esm/Tree/index.tsx +0 -661
- package/publish/lib/esm/Tree/init-height.tsx +0 -40
- package/publish/lib/esm/Tree/utils/func.ts +0 -15
- package/publish/lib/esm/Utils/hooks/useAutosizeTextArea.tsx +0 -131
- package/publish/lib/esm/Utils/hooks/useBoundedDrag.tsx +0 -301
- package/publish/lib/esm/Utils/hooks/useClickOutside.tsx +0 -69
- package/publish/lib/esm/Utils/hooks/useComId.tsx +0 -13
- package/publish/lib/esm/Utils/hooks/useDebounce.tsx +0 -40
- package/publish/lib/esm/Utils/hooks/useDragDropPosition.tsx +0 -417
- package/publish/lib/esm/Utils/hooks/useDraggable.tsx +0 -265
- package/publish/lib/esm/Utils/hooks/useHistoryTracker.tsx +0 -554
- package/publish/lib/esm/Utils/hooks/useInterval.tsx +0 -74
- package/publish/lib/esm/Utils/hooks/useIsMobile.tsx +0 -139
- package/publish/lib/esm/Utils/hooks/useKeyPress.tsx +0 -104
- package/publish/lib/esm/Utils/hooks/useSessionStorageListener.tsx +0 -45
- package/publish/lib/esm/Utils/hooks/useStreamController.tsx +0 -277
- package/publish/lib/esm/Utils/hooks/useThrottle.tsx +0 -39
- package/publish/lib/esm/Utils/hooks/useWindowScroll.tsx +0 -83
- package/publish/lib/esm/Utils/libs/anim.ts +0 -96
- package/publish/lib/esm/Utils/libs/buffer.ts +0 -262
- package/publish/lib/esm/Utils/libs/cls.ts +0 -64
- package/publish/lib/esm/Utils/libs/convert.ts +0 -59
- package/publish/lib/esm/Utils/libs/date.ts +0 -598
- package/publish/lib/esm/Utils/libs/dom.ts +0 -150
- package/publish/lib/esm/Utils/libs/easing.ts +0 -201
- package/publish/lib/esm/Utils/libs/extract.ts +0 -160
- package/publish/lib/esm/Utils/libs/format-string.ts +0 -116
- package/publish/lib/esm/Utils/libs/formdata.ts +0 -93
- package/publish/lib/esm/Utils/libs/getElementProperty.ts +0 -150
- package/publish/lib/esm/Utils/libs/guid.ts +0 -16
- package/publish/lib/esm/Utils/libs/initDefaultOptions.ts +0 -43
- package/publish/lib/esm/Utils/libs/inputsCalculation.ts +0 -160
- package/publish/lib/esm/Utils/libs/math.ts +0 -276
- package/publish/lib/esm/Utils/libs/object.ts +0 -68
- package/publish/lib/esm/Utils/libs/os.ts +0 -63
- package/publish/lib/esm/Utils/libs/performance.ts +0 -47
- package/publish/lib/esm/Utils/libs/sanitize.ts +0 -55
- package/publish/lib/esm/Utils/libs/time.ts +0 -139
- package/publish/lib/esm/Utils/libs/tree.ts +0 -119
- package/publish/lib/esm/Utils/libs/validate.ts +0 -434
- package/publish/lib/esm/Utils/libs/viewport.ts +0 -20
- package/publish/lib/esm/Utils/plugins/bodyScrollLock.ts +0 -286
- package/publish/lib/esm/index.js +0 -47
- package/publish/package.json +0 -1
- /package/{publish/Accordion → Accordion}/index.d.ts +0 -0
- /package/{publish/Accordion → Accordion}/index.js +0 -0
- /package/{publish/BackToTop → BackToTop}/index.css +0 -0
- /package/{publish/BackToTop → BackToTop}/index.d.ts +0 -0
- /package/{publish/BackToTop → BackToTop}/index.js +0 -0
- /package/{publish/CascadingSelect → CascadingSelect}/index.css +0 -0
- /package/{publish/CascadingSelect → CascadingSelect}/index.d.ts +0 -0
- /package/{publish/CascadingSelect → CascadingSelect}/index.js +0 -0
- /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.css +0 -0
- /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.d.ts +0 -0
- /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.js +0 -0
- /package/{publish/Chatbox → Chatbox}/index.css +0 -0
- /package/{publish/Chatbox → Chatbox}/index.d.ts +0 -0
- /package/{publish/Chatbox → Chatbox}/index.js +0 -0
- /package/{publish/Checkbox → Checkbox}/index.d.ts +0 -0
- /package/{publish/Checkbox → Checkbox}/index.js +0 -0
- /package/{publish/ColorPicker → ColorPicker}/index.css +0 -0
- /package/{publish/ColorPicker → ColorPicker}/index.d.ts +0 -0
- /package/{publish/ColorPicker → ColorPicker}/index.js +0 -0
- /package/{publish/Date → Date}/index.css +0 -0
- /package/{publish/Date → Date}/index.d.ts +0 -0
- /package/{publish/Date → Date}/index.js +0 -0
- /package/{publish/DigitalClock → DigitalClock}/index.d.ts +0 -0
- /package/{publish/DigitalClock → DigitalClock}/index.js +0 -0
- /package/{publish/DragDropList → DragDropList}/index.css +0 -0
- /package/{publish/DragDropList → DragDropList}/index.d.ts +0 -0
- /package/{publish/DragDropList → DragDropList}/index.js +0 -0
- /package/{publish/DropdownMenu → DropdownMenu}/index.css +0 -0
- /package/{publish/DropdownMenu → DropdownMenu}/index.d.ts +0 -0
- /package/{publish/DropdownMenu → DropdownMenu}/index.js +0 -0
- /package/{publish/DynamicFields → DynamicFields}/index.d.ts +0 -0
- /package/{publish/DynamicFields → DynamicFields}/index.js +0 -0
- /package/{publish/EventCalendar → EventCalendar}/index.css +0 -0
- /package/{publish/EventCalendar → EventCalendar}/index.d.ts +0 -0
- /package/{publish/EventCalendar → EventCalendar}/index.js +0 -0
- /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.css +0 -0
- /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.d.ts +0 -0
- /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.js +0 -0
- /package/{publish/File → File}/index.d.ts +0 -0
- /package/{publish/File → File}/index.js +0 -0
- /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.css +0 -0
- /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.d.ts +0 -0
- /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.js +0 -0
- /package/{publish/Input → Input}/index.d.ts +0 -0
- /package/{publish/Input → Input}/index.js +0 -0
- /package/{publish/LiveSearch → LiveSearch}/index.css +0 -0
- /package/{publish/LiveSearch → LiveSearch}/index.d.ts +0 -0
- /package/{publish/LiveSearch → LiveSearch}/index.js +0 -0
- /package/{publish/MasonryLayout → MasonryLayout}/index.d.ts +0 -0
- /package/{publish/MasonryLayout → MasonryLayout}/index.js +0 -0
- /package/{publish/ModalDialog → ModalDialog}/index.d.ts +0 -0
- /package/{publish/ModalDialog → ModalDialog}/index.js +0 -0
- /package/{publish/ModeSwitch → ModeSwitch}/index.d.ts +0 -0
- /package/{publish/ModeSwitch → ModeSwitch}/index.js +0 -0
- /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.css +0 -0
- /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.d.ts +0 -0
- /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.js +0 -0
- /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.d.ts +0 -0
- /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.js +0 -0
- /package/{publish/MultipleSelect → MultipleSelect}/index.css +0 -0
- /package/{publish/MultipleSelect → MultipleSelect}/index.d.ts +0 -0
- /package/{publish/MultipleSelect → MultipleSelect}/index.js +0 -0
- /package/{publish/NativeSelect → NativeSelect}/index.d.ts +0 -0
- /package/{publish/NativeSelect → NativeSelect}/index.js +0 -0
- /package/{publish/NumberInput → NumberInput}/index.d.ts +0 -0
- /package/{publish/NumberInput → NumberInput}/index.js +0 -0
- /package/{publish/Pagination → Pagination}/index.d.ts +0 -0
- /package/{publish/Pagination → Pagination}/index.js +0 -0
- /package/{publish/Radio → Radio}/index.d.ts +0 -0
- /package/{publish/Radio → Radio}/index.js +0 -0
- /package/{publish/RangeSlider → RangeSlider}/index.css +0 -0
- /package/{publish/RangeSlider → RangeSlider}/index.d.ts +0 -0
- /package/{publish/RangeSlider → RangeSlider}/index.js +0 -0
- /package/{publish/Refresher → Refresher}/index.d.ts +0 -0
- /package/{publish/Refresher → Refresher}/index.js +0 -0
- /package/{publish/RootPortal → RootPortal}/index.d.ts +0 -0
- /package/{publish/RootPortal → RootPortal}/index.js +0 -0
- /package/{publish/ScrollReveal → ScrollReveal}/index.d.ts +0 -0
- /package/{publish/ScrollReveal → ScrollReveal}/index.js +0 -0
- /package/{publish/Scrollbar → Scrollbar}/index.css +0 -0
- /package/{publish/Scrollbar → Scrollbar}/index.d.ts +0 -0
- /package/{publish/Scrollbar → Scrollbar}/index.js +0 -0
- /package/{publish/SearchBar → SearchBar}/index.d.ts +0 -0
- /package/{publish/SearchBar → SearchBar}/index.js +0 -0
- /package/{publish/Select → Select}/index.css +0 -0
- /package/{publish/Select → Select}/index.d.ts +0 -0
- /package/{publish/Select → Select}/index.js +0 -0
- /package/{publish/ShowMoreLess → ShowMoreLess}/index.css +0 -0
- /package/{publish/ShowMoreLess → ShowMoreLess}/index.d.ts +0 -0
- /package/{publish/ShowMoreLess → ShowMoreLess}/index.js +0 -0
- /package/{publish/SplitterPanel → SplitterPanel}/index.css +0 -0
- /package/{publish/SplitterPanel → SplitterPanel}/index.d.ts +0 -0
- /package/{publish/SplitterPanel → SplitterPanel}/index.js +0 -0
- /package/{publish/Stepper → Stepper}/index.css +0 -0
- /package/{publish/Stepper → Stepper}/index.d.ts +0 -0
- /package/{publish/Stepper → Stepper}/index.js +0 -0
- /package/{publish/Switch → Switch}/index.d.ts +0 -0
- /package/{publish/Switch → Switch}/index.js +0 -0
- /package/{publish/Table → Table}/index.css +0 -0
- /package/{publish/Table → Table}/index.d.ts +0 -0
- /package/{publish/Table → Table}/index.js +0 -0
- /package/{publish/Tabs → Tabs}/index.d.ts +0 -0
- /package/{publish/Tabs → Tabs}/index.js +0 -0
- /package/{publish/TagInput → TagInput}/index.css +0 -0
- /package/{publish/TagInput → TagInput}/index.d.ts +0 -0
- /package/{publish/TagInput → TagInput}/index.js +0 -0
- /package/{publish/Textarea → Textarea}/index.d.ts +0 -0
- /package/{publish/Textarea → Textarea}/index.js +0 -0
- /package/{publish/Toast → Toast}/index.css +0 -0
- /package/{publish/Toast → Toast}/index.d.ts +0 -0
- /package/{publish/Toast → Toast}/index.js +0 -0
- /package/{publish/Tooltip → Tooltip}/index.css +0 -0
- /package/{publish/Tooltip → Tooltip}/index.d.ts +0 -0
- /package/{publish/Tooltip → Tooltip}/index.js +0 -0
- /package/{publish/Tree → Tree}/index.css +0 -0
- /package/{publish/Tree → Tree}/index.d.ts +0 -0
- /package/{publish/Tree → Tree}/index.js +0 -0
- /package/{publish/Utils → Utils}/anim.d.ts +0 -0
- /package/{publish/Utils → Utils}/anim.js +0 -0
- /package/{publish/Utils → Utils}/bodyScrollLock.d.ts +0 -0
- /package/{publish/Utils → Utils}/bodyScrollLock.js +0 -0
- /package/{publish/Utils → Utils}/buffer.d.ts +0 -0
- /package/{publish/Utils → Utils}/buffer.js +0 -0
- /package/{publish/Utils → Utils}/cls.d.ts +0 -0
- /package/{publish/Utils → Utils}/cls.js +0 -0
- /package/{publish/Utils → Utils}/convert.d.ts +0 -0
- /package/{publish/Utils → Utils}/convert.js +0 -0
- /package/{publish/Utils → Utils}/date.d.ts +0 -0
- /package/{publish/Utils → Utils}/date.js +0 -0
- /package/{publish/Utils → Utils}/dom.d.ts +0 -0
- /package/{publish/Utils → Utils}/dom.js +0 -0
- /package/{publish/Utils → Utils}/easing.d.ts +0 -0
- /package/{publish/Utils → Utils}/easing.js +0 -0
- /package/{publish/Utils → Utils}/extract.d.ts +0 -0
- /package/{publish/Utils → Utils}/extract.js +0 -0
- /package/{publish/Utils → Utils}/format-string.d.ts +0 -0
- /package/{publish/Utils → Utils}/format-string.js +0 -0
- /package/{publish/Utils → Utils}/formdata.d.ts +0 -0
- /package/{publish/Utils → Utils}/formdata.js +0 -0
- /package/{publish/Utils → Utils}/getElementProperty.d.ts +0 -0
- /package/{publish/Utils → Utils}/getElementProperty.js +0 -0
- /package/{publish/Utils → Utils}/guid.d.ts +0 -0
- /package/{publish/Utils → Utils}/guid.js +0 -0
- /package/{publish/Utils → Utils}/initDefaultOptions.d.ts +0 -0
- /package/{publish/Utils → Utils}/initDefaultOptions.js +0 -0
- /package/{publish/Utils → Utils}/inputsCalculation.d.ts +0 -0
- /package/{publish/Utils → Utils}/inputsCalculation.js +0 -0
- /package/{publish/Utils → Utils}/math.d.ts +0 -0
- /package/{publish/Utils → Utils}/math.js +0 -0
- /package/{publish/Utils → Utils}/object.d.ts +0 -0
- /package/{publish/Utils → Utils}/object.js +0 -0
- /package/{publish/Utils → Utils}/os.d.ts +0 -0
- /package/{publish/Utils → Utils}/os.js +0 -0
- /package/{publish/Utils → Utils}/performance.d.ts +0 -0
- /package/{publish/Utils → Utils}/performance.js +0 -0
- /package/{publish/Utils → Utils}/sanitize.d.ts +0 -0
- /package/{publish/Utils → Utils}/sanitize.js +0 -0
- /package/{publish/Utils → Utils}/time.d.ts +0 -0
- /package/{publish/Utils → Utils}/time.js +0 -0
- /package/{publish/Utils → Utils}/tree.d.ts +0 -0
- /package/{publish/Utils → Utils}/tree.js +0 -0
- /package/{publish/Utils → Utils}/useAutosizeTextArea.d.ts +0 -0
- /package/{publish/Utils → Utils}/useAutosizeTextArea.js +0 -0
- /package/{publish/Utils → Utils}/useBoundedDrag.d.ts +0 -0
- /package/{publish/Utils → Utils}/useBoundedDrag.js +0 -0
- /package/{publish/Utils → Utils}/useClickOutside.d.ts +0 -0
- /package/{publish/Utils → Utils}/useClickOutside.js +0 -0
- /package/{publish/Utils → Utils}/useComId.d.ts +0 -0
- /package/{publish/Utils → Utils}/useComId.js +0 -0
- /package/{publish/Utils → Utils}/useDebounce.d.ts +0 -0
- /package/{publish/Utils → Utils}/useDebounce.js +0 -0
- /package/{publish/Utils → Utils}/useDragDropPosition.d.ts +0 -0
- /package/{publish/Utils → Utils}/useDragDropPosition.js +0 -0
- /package/{publish/Utils → Utils}/useDraggable.d.ts +0 -0
- /package/{publish/Utils → Utils}/useDraggable.js +0 -0
- /package/{publish/Utils → Utils}/useHistoryTracker.d.ts +0 -0
- /package/{publish/Utils → Utils}/useHistoryTracker.js +0 -0
- /package/{publish/Utils → Utils}/useInterval.d.ts +0 -0
- /package/{publish/Utils → Utils}/useInterval.js +0 -0
- /package/{publish/Utils → Utils}/useIsMobile.d.ts +0 -0
- /package/{publish/Utils → Utils}/useIsMobile.js +0 -0
- /package/{publish/Utils → Utils}/useKeyPress.d.ts +0 -0
- /package/{publish/Utils → Utils}/useKeyPress.js +0 -0
- /package/{publish/Utils → Utils}/useSessionStorageListener.d.ts +0 -0
- /package/{publish/Utils → Utils}/useSessionStorageListener.js +0 -0
- /package/{publish/Utils → Utils}/useStreamController.d.ts +0 -0
- /package/{publish/Utils → Utils}/useStreamController.js +0 -0
- /package/{publish/Utils → Utils}/useThrottle.d.ts +0 -0
- /package/{publish/Utils → Utils}/useThrottle.js +0 -0
- /package/{publish/Utils → Utils}/useWindowScroll.d.ts +0 -0
- /package/{publish/Utils → Utils}/useWindowScroll.js +0 -0
- /package/{publish/Utils → Utils}/validate.d.ts +0 -0
- /package/{publish/Utils → Utils}/validate.js +0 -0
- /package/{publish/Utils → Utils}/viewport.d.ts +0 -0
- /package/{publish/Utils → Utils}/viewport.js +0 -0
- /package/{publish/all.d.ts → all.d.ts} +0 -0
- /package/{publish/all.js → all.js} +0 -0
|
@@ -1,3789 +0,0 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(require("react"), require("react-dom"));
|
|
4
|
-
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define(["react", "react-dom"], factory);
|
|
6
|
-
else if(typeof exports === 'object')
|
|
7
|
-
exports["RPB"] = factory(require("react"), require("react-dom"));
|
|
8
|
-
else
|
|
9
|
-
root["RPB"] = factory(root["React"], root["ReactDOM"]);
|
|
10
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) => {
|
|
11
|
-
return /******/ (() => { // webpackBootstrap
|
|
12
|
-
/******/ var __webpack_modules__ = ({
|
|
13
|
-
|
|
14
|
-
/***/ 483:
|
|
15
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
16
|
-
|
|
17
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
18
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof2(obj); }
|
|
19
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
20
|
-
if (( false ? 0 : _typeof2(exports)) === 'object' && ( false ? 0 : _typeof2(module)) === 'object') module.exports = factory(__webpack_require__(787), __webpack_require__(156));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787), __webpack_require__(156)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
21
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
22
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
23
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
24
|
-
})(this, function (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) {
|
|
25
|
-
return (/******/function () {
|
|
26
|
-
// webpackBootstrap
|
|
27
|
-
/******/
|
|
28
|
-
var __webpack_modules__ = {
|
|
29
|
-
/***/909: /***/function _(module, exports, __nested_webpack_require_1189__) {
|
|
30
|
-
/* module decorator */module = __nested_webpack_require_1189__.nmd(module);
|
|
31
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
32
|
-
function _typeof(obj) {
|
|
33
|
-
"@babel/helpers - typeof";
|
|
34
|
-
|
|
35
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
36
|
-
return typeof obj;
|
|
37
|
-
} : function (obj) {
|
|
38
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
39
|
-
}, _typeof(obj);
|
|
40
|
-
}
|
|
41
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
42
|
-
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_1189__(787), __nested_webpack_require_1189__(156));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_1189__(787), __nested_webpack_require_1189__(156)], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
43
|
-
})(this, function (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) {
|
|
44
|
-
return (/******/function () {
|
|
45
|
-
// webpackBootstrap
|
|
46
|
-
/******/
|
|
47
|
-
"use strict";
|
|
48
|
-
|
|
49
|
-
/******/
|
|
50
|
-
var __webpack_modules__ = {
|
|
51
|
-
/***/787: /***/function _(module) {
|
|
52
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
53
|
-
|
|
54
|
-
/***/
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
/***/156: /***/function _(module) {
|
|
58
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
|
|
59
|
-
|
|
60
|
-
/***/
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/******/
|
|
64
|
-
};
|
|
65
|
-
/************************************************************************/
|
|
66
|
-
/******/ // The module cache
|
|
67
|
-
/******/
|
|
68
|
-
var __webpack_module_cache__ = {};
|
|
69
|
-
/******/
|
|
70
|
-
/******/ // The require function
|
|
71
|
-
/******/
|
|
72
|
-
function __nested_webpack_require_1708__(moduleId) {
|
|
73
|
-
/******/ // Check if module is in cache
|
|
74
|
-
/******/var cachedModule = __webpack_module_cache__[moduleId];
|
|
75
|
-
/******/
|
|
76
|
-
if (cachedModule !== undefined) {
|
|
77
|
-
/******/return cachedModule.exports;
|
|
78
|
-
/******/
|
|
79
|
-
}
|
|
80
|
-
/******/ // Create a new module (and put it into the cache)
|
|
81
|
-
/******/
|
|
82
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
83
|
-
/******/ // no module.id needed
|
|
84
|
-
/******/ // no module.loaded needed
|
|
85
|
-
/******/exports: {}
|
|
86
|
-
/******/
|
|
87
|
-
};
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // Execute the module function
|
|
90
|
-
/******/
|
|
91
|
-
__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1708__);
|
|
92
|
-
/******/
|
|
93
|
-
/******/ // Return the exports of the module
|
|
94
|
-
/******/
|
|
95
|
-
return module.exports;
|
|
96
|
-
/******/
|
|
97
|
-
}
|
|
98
|
-
/******/
|
|
99
|
-
/************************************************************************/
|
|
100
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
101
|
-
/******/
|
|
102
|
-
(function () {
|
|
103
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
104
|
-
/******/__nested_webpack_require_1708__.n = function (module) {
|
|
105
|
-
/******/var getter = module && module.__esModule ? /******/function () {
|
|
106
|
-
return module['default'];
|
|
107
|
-
} : /******/function () {
|
|
108
|
-
return module;
|
|
109
|
-
};
|
|
110
|
-
/******/
|
|
111
|
-
__nested_webpack_require_1708__.d(getter, {
|
|
112
|
-
a: getter
|
|
113
|
-
});
|
|
114
|
-
/******/
|
|
115
|
-
return getter;
|
|
116
|
-
/******/
|
|
117
|
-
};
|
|
118
|
-
/******/
|
|
119
|
-
})();
|
|
120
|
-
/******/
|
|
121
|
-
/******/ /* webpack/runtime/define property getters */
|
|
122
|
-
/******/
|
|
123
|
-
(function () {
|
|
124
|
-
/******/ // define getter functions for harmony exports
|
|
125
|
-
/******/__nested_webpack_require_1708__.d = function (exports, definition) {
|
|
126
|
-
/******/for (var key in definition) {
|
|
127
|
-
/******/if (__nested_webpack_require_1708__.o(definition, key) && !__nested_webpack_require_1708__.o(exports, key)) {
|
|
128
|
-
/******/Object.defineProperty(exports, key, {
|
|
129
|
-
enumerable: true,
|
|
130
|
-
get: definition[key]
|
|
131
|
-
});
|
|
132
|
-
/******/
|
|
133
|
-
}
|
|
134
|
-
/******/
|
|
135
|
-
}
|
|
136
|
-
/******/
|
|
137
|
-
};
|
|
138
|
-
/******/
|
|
139
|
-
})();
|
|
140
|
-
/******/
|
|
141
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
142
|
-
/******/
|
|
143
|
-
(function () {
|
|
144
|
-
/******/__nested_webpack_require_1708__.o = function (obj, prop) {
|
|
145
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
146
|
-
};
|
|
147
|
-
/******/
|
|
148
|
-
})();
|
|
149
|
-
/******/
|
|
150
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
151
|
-
/******/
|
|
152
|
-
(function () {
|
|
153
|
-
/******/ // define __esModule on exports
|
|
154
|
-
/******/__nested_webpack_require_1708__.r = function (exports) {
|
|
155
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
156
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
157
|
-
value: 'Module'
|
|
158
|
-
});
|
|
159
|
-
/******/
|
|
160
|
-
}
|
|
161
|
-
/******/
|
|
162
|
-
Object.defineProperty(exports, '__esModule', {
|
|
163
|
-
value: true
|
|
164
|
-
});
|
|
165
|
-
/******/
|
|
166
|
-
};
|
|
167
|
-
/******/
|
|
168
|
-
})();
|
|
169
|
-
/******/
|
|
170
|
-
/************************************************************************/
|
|
171
|
-
var __webpack_exports__ = {};
|
|
172
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
173
|
-
(function () {
|
|
174
|
-
__nested_webpack_require_1708__.r(__webpack_exports__);
|
|
175
|
-
/* harmony export */
|
|
176
|
-
__nested_webpack_require_1708__.d(__webpack_exports__, {
|
|
177
|
-
/* harmony export */"default": function _default() {
|
|
178
|
-
return __WEBPACK_DEFAULT_EXPORT__;
|
|
179
|
-
}
|
|
180
|
-
/* harmony export */
|
|
181
|
-
});
|
|
182
|
-
/* harmony import */
|
|
183
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1708__(787);
|
|
184
|
-
/* harmony import */
|
|
185
|
-
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1708__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
186
|
-
/* harmony import */
|
|
187
|
-
var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_1708__(156);
|
|
188
|
-
/* harmony import */
|
|
189
|
-
var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_1708__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
190
|
-
var RootPortal = function RootPortal(props) {
|
|
191
|
-
var containerClassName = props.containerClassName,
|
|
192
|
-
show = props.show,
|
|
193
|
-
children = props.children,
|
|
194
|
-
_props$usePortal = props.usePortal,
|
|
195
|
-
usePortal = _props$usePortal === void 0 ? true : _props$usePortal;
|
|
196
|
-
var containerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
197
|
-
|
|
198
|
-
// Move HTML templates to tag end body </body>
|
|
199
|
-
// render() don't use "Fragment", in order to avoid error "Failed to execute 'insertBefore' on 'Node'"
|
|
200
|
-
// prevent "transform", "filter", "perspective" attribute destruction fixed viewport orientation
|
|
201
|
-
// ###
|
|
202
|
-
// ###
|
|
203
|
-
// Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
|
|
204
|
-
|
|
205
|
-
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
206
|
-
if (usePortal) {
|
|
207
|
-
containerRef.current = document.createElement('div');
|
|
208
|
-
containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
|
|
209
|
-
document.body.appendChild(containerRef.current);
|
|
210
|
-
}
|
|
211
|
-
return function () {
|
|
212
|
-
if (usePortal && containerRef.current) {
|
|
213
|
-
containerRef.current.remove();
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
}, [usePortal]);
|
|
217
|
-
if (!usePortal) {
|
|
218
|
-
return show ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, children) : null;
|
|
219
|
-
}
|
|
220
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, containerRef.current && show && /*#__PURE__*/(0, react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, containerRef.current));
|
|
221
|
-
};
|
|
222
|
-
/* harmony default export */
|
|
223
|
-
var __WEBPACK_DEFAULT_EXPORT__ = RootPortal;
|
|
224
|
-
})();
|
|
225
|
-
|
|
226
|
-
/******/
|
|
227
|
-
return __webpack_exports__;
|
|
228
|
-
/******/
|
|
229
|
-
}()
|
|
230
|
-
);
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
/***/
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
/***/70: /***/function _(module, exports, __nested_webpack_require_11781__) {
|
|
237
|
-
/* module decorator */module = __nested_webpack_require_11781__.nmd(module);
|
|
238
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
239
|
-
function _typeof(obj) {
|
|
240
|
-
"@babel/helpers - typeof";
|
|
241
|
-
|
|
242
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
243
|
-
return typeof obj;
|
|
244
|
-
} : function (obj) {
|
|
245
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
246
|
-
}, _typeof(obj);
|
|
247
|
-
}
|
|
248
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
249
|
-
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
250
|
-
})(this, function () {
|
|
251
|
-
return (/******/function () {
|
|
252
|
-
// webpackBootstrap
|
|
253
|
-
/******/
|
|
254
|
-
"use strict";
|
|
255
|
-
|
|
256
|
-
/******/ // The require scope
|
|
257
|
-
/******/
|
|
258
|
-
var __nested_webpack_require_987__ = {};
|
|
259
|
-
/******/
|
|
260
|
-
/************************************************************************/
|
|
261
|
-
/******/ /* webpack/runtime/define property getters */
|
|
262
|
-
/******/
|
|
263
|
-
(function () {
|
|
264
|
-
/******/ // define getter functions for harmony exports
|
|
265
|
-
/******/__nested_webpack_require_987__.d = function (exports, definition) {
|
|
266
|
-
/******/for (var key in definition) {
|
|
267
|
-
/******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
|
|
268
|
-
/******/Object.defineProperty(exports, key, {
|
|
269
|
-
enumerable: true,
|
|
270
|
-
get: definition[key]
|
|
271
|
-
});
|
|
272
|
-
/******/
|
|
273
|
-
}
|
|
274
|
-
/******/
|
|
275
|
-
}
|
|
276
|
-
/******/
|
|
277
|
-
};
|
|
278
|
-
/******/
|
|
279
|
-
})();
|
|
280
|
-
/******/
|
|
281
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
282
|
-
/******/
|
|
283
|
-
(function () {
|
|
284
|
-
/******/__nested_webpack_require_987__.o = function (obj, prop) {
|
|
285
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
286
|
-
};
|
|
287
|
-
/******/
|
|
288
|
-
})();
|
|
289
|
-
/******/
|
|
290
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
291
|
-
/******/
|
|
292
|
-
(function () {
|
|
293
|
-
/******/ // define __esModule on exports
|
|
294
|
-
/******/__nested_webpack_require_987__.r = function (exports) {
|
|
295
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
296
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
297
|
-
value: 'Module'
|
|
298
|
-
});
|
|
299
|
-
/******/
|
|
300
|
-
}
|
|
301
|
-
/******/
|
|
302
|
-
Object.defineProperty(exports, '__esModule', {
|
|
303
|
-
value: true
|
|
304
|
-
});
|
|
305
|
-
/******/
|
|
306
|
-
};
|
|
307
|
-
/******/
|
|
308
|
-
})();
|
|
309
|
-
/******/
|
|
310
|
-
/************************************************************************/
|
|
311
|
-
var __webpack_exports__ = {};
|
|
312
|
-
__nested_webpack_require_987__.r(__webpack_exports__);
|
|
313
|
-
/* harmony export */
|
|
314
|
-
__nested_webpack_require_987__.d(__webpack_exports__, {
|
|
315
|
-
/* harmony export */"clearAllBodyScrollLocks": function clearAllBodyScrollLocks() {
|
|
316
|
-
return (/* binding */_clearAllBodyScrollLocks
|
|
317
|
-
);
|
|
318
|
-
},
|
|
319
|
-
/* harmony export */"disableBodyScroll": function disableBodyScroll() {
|
|
320
|
-
return (/* binding */_disableBodyScroll
|
|
321
|
-
);
|
|
322
|
-
},
|
|
323
|
-
/* harmony export */"enableBodyScroll": function enableBodyScroll() {
|
|
324
|
-
return (/* binding */_enableBodyScroll
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
/* harmony export */
|
|
328
|
-
});
|
|
329
|
-
|
|
330
|
-
function _toConsumableArray(arr) {
|
|
331
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
332
|
-
}
|
|
333
|
-
function _nonIterableSpread() {
|
|
334
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
335
|
-
}
|
|
336
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
337
|
-
if (!o) return;
|
|
338
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
339
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
340
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
341
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
342
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
343
|
-
}
|
|
344
|
-
function _iterableToArray(iter) {
|
|
345
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
346
|
-
}
|
|
347
|
-
function _arrayWithoutHoles(arr) {
|
|
348
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
349
|
-
}
|
|
350
|
-
function _arrayLikeToArray(arr, len) {
|
|
351
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
352
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
353
|
-
return arr2;
|
|
354
|
-
}
|
|
355
|
-
// =================================================================
|
|
356
|
-
// based on https://github.com/willmcpo/body-scroll-lock
|
|
357
|
-
// =================================================================
|
|
358
|
-
|
|
359
|
-
// @flow
|
|
360
|
-
// Adopted and modified solution from Bohdan Didukh (2017)
|
|
361
|
-
// https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi
|
|
362
|
-
|
|
363
|
-
// Older browsers don't support event options, feature detect it.
|
|
364
|
-
var hasPassiveEvents = false;
|
|
365
|
-
if (typeof window !== 'undefined') {
|
|
366
|
-
var passiveTestOptions = {
|
|
367
|
-
get passive() {
|
|
368
|
-
hasPassiveEvents = true;
|
|
369
|
-
return undefined;
|
|
370
|
-
}
|
|
371
|
-
};
|
|
372
|
-
window.addEventListener('testPassive', null, passiveTestOptions);
|
|
373
|
-
window.removeEventListener('testPassive', null, passiveTestOptions);
|
|
374
|
-
}
|
|
375
|
-
var isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);
|
|
376
|
-
var locks = [];
|
|
377
|
-
var documentListenerAdded = false;
|
|
378
|
-
var initialClientY = -1;
|
|
379
|
-
var previousBodyOverflowSetting;
|
|
380
|
-
var previousBodyPosition;
|
|
381
|
-
var previousBodyPaddingRight;
|
|
382
|
-
|
|
383
|
-
// returns true if `el` should be allowed to receive touchmove events.
|
|
384
|
-
var allowTouchMove = function allowTouchMove(el) {
|
|
385
|
-
return locks.some(function (lock) {
|
|
386
|
-
if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {
|
|
387
|
-
return true;
|
|
388
|
-
}
|
|
389
|
-
return false;
|
|
390
|
-
});
|
|
391
|
-
};
|
|
392
|
-
var preventDefault = function preventDefault(rawEvent) {
|
|
393
|
-
var e = rawEvent || window.event;
|
|
394
|
-
|
|
395
|
-
// For the case whereby consumers adds a touchmove event listener to document.
|
|
396
|
-
// Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })
|
|
397
|
-
// in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then
|
|
398
|
-
// the touchmove event on document will break.
|
|
399
|
-
if (allowTouchMove(e.target)) {
|
|
400
|
-
return true;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
// Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).
|
|
404
|
-
if (e.touches.length > 1) return true;
|
|
405
|
-
if (e.preventDefault) e.preventDefault();
|
|
406
|
-
return false;
|
|
407
|
-
};
|
|
408
|
-
var setOverflowHidden = function setOverflowHidden(options) {
|
|
409
|
-
// If previousBodyPaddingRight is already set, don't set it again.
|
|
410
|
-
if (previousBodyPaddingRight === undefined) {
|
|
411
|
-
var reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;
|
|
412
|
-
var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;
|
|
413
|
-
if (reserveScrollBarGap && scrollBarGap > 0) {
|
|
414
|
-
var computedBodyPaddingRight = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'), 10);
|
|
415
|
-
previousBodyPaddingRight = document.body.style.paddingRight;
|
|
416
|
-
document.body.style.paddingRight = "".concat(computedBodyPaddingRight + scrollBarGap, "px");
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
// If previousBodyOverflowSetting is already set, don't set it again.
|
|
421
|
-
if (previousBodyOverflowSetting === undefined) {
|
|
422
|
-
previousBodyOverflowSetting = document.body.style.overflow;
|
|
423
|
-
document.body.style.overflow = 'hidden';
|
|
424
|
-
}
|
|
425
|
-
};
|
|
426
|
-
var restoreOverflowSetting = function restoreOverflowSetting() {
|
|
427
|
-
if (previousBodyPaddingRight !== undefined) {
|
|
428
|
-
document.body.style.paddingRight = previousBodyPaddingRight;
|
|
429
|
-
|
|
430
|
-
// Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it
|
|
431
|
-
// can be set again.
|
|
432
|
-
previousBodyPaddingRight = undefined;
|
|
433
|
-
}
|
|
434
|
-
if (previousBodyOverflowSetting !== undefined) {
|
|
435
|
-
document.body.style.overflow = previousBodyOverflowSetting;
|
|
436
|
-
|
|
437
|
-
// Restore previousBodyOverflowSetting to undefined
|
|
438
|
-
// so setOverflowHidden knows it can be set again.
|
|
439
|
-
previousBodyOverflowSetting = undefined;
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
var setPositionFixed = function setPositionFixed() {
|
|
443
|
-
return window.requestAnimationFrame(function () {
|
|
444
|
-
// If previousBodyPosition is already set, don't set it again.
|
|
445
|
-
if (previousBodyPosition === undefined) {
|
|
446
|
-
previousBodyPosition = {
|
|
447
|
-
position: document.body.style.position,
|
|
448
|
-
top: document.body.style.top,
|
|
449
|
-
left: document.body.style.left
|
|
450
|
-
};
|
|
451
|
-
|
|
452
|
-
// Update the dom inside an animation frame
|
|
453
|
-
var _window = window,
|
|
454
|
-
scrollY = _window.scrollY,
|
|
455
|
-
scrollX = _window.scrollX,
|
|
456
|
-
innerHeight = _window.innerHeight;
|
|
457
|
-
document.body.style.position = 'fixed';
|
|
458
|
-
document.body.style.top = "".concat(-scrollY, "px");
|
|
459
|
-
document.body.style.left = "".concat(-scrollX, "px");
|
|
460
|
-
setTimeout(function () {
|
|
461
|
-
return window.requestAnimationFrame(function () {
|
|
462
|
-
// Attempt to check if the bottom bar appeared due to the position change
|
|
463
|
-
var bottomBarHeight = innerHeight - window.innerHeight;
|
|
464
|
-
if (bottomBarHeight && scrollY >= innerHeight) {
|
|
465
|
-
// Move the content further up so that the bottom bar doesn't hide it
|
|
466
|
-
document.body.style.top = "".concat(-(scrollY + bottomBarHeight));
|
|
467
|
-
}
|
|
468
|
-
});
|
|
469
|
-
}, 300);
|
|
470
|
-
}
|
|
471
|
-
});
|
|
472
|
-
};
|
|
473
|
-
var restorePositionSetting = function restorePositionSetting() {
|
|
474
|
-
if (previousBodyPosition !== undefined) {
|
|
475
|
-
// Convert the position from "px" to Int
|
|
476
|
-
var y = -parseInt(document.body.style.top, 10);
|
|
477
|
-
var x = -parseInt(document.body.style.left, 10);
|
|
478
|
-
|
|
479
|
-
// Restore styles
|
|
480
|
-
document.body.style.position = previousBodyPosition.position;
|
|
481
|
-
document.body.style.top = previousBodyPosition.top;
|
|
482
|
-
document.body.style.left = previousBodyPosition.left;
|
|
483
|
-
|
|
484
|
-
// Restore scroll
|
|
485
|
-
window.scrollTo(x, y);
|
|
486
|
-
previousBodyPosition = undefined;
|
|
487
|
-
}
|
|
488
|
-
};
|
|
489
|
-
|
|
490
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions
|
|
491
|
-
var isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {
|
|
492
|
-
return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;
|
|
493
|
-
};
|
|
494
|
-
var handleScroll = function handleScroll(event, targetElement) {
|
|
495
|
-
var clientY = event.targetTouches[0].clientY - initialClientY;
|
|
496
|
-
if (allowTouchMove(event.target)) {
|
|
497
|
-
return false;
|
|
498
|
-
}
|
|
499
|
-
if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {
|
|
500
|
-
// element is at the top of its scroll.
|
|
501
|
-
return preventDefault(event);
|
|
502
|
-
}
|
|
503
|
-
if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {
|
|
504
|
-
// element is at the bottom of its scroll.
|
|
505
|
-
return preventDefault(event);
|
|
506
|
-
}
|
|
507
|
-
event.stopPropagation();
|
|
508
|
-
return true;
|
|
509
|
-
};
|
|
510
|
-
var _disableBodyScroll = function disableBodyScroll(targetElement, options) {
|
|
511
|
-
// targetElement must be provided
|
|
512
|
-
if (!targetElement) {
|
|
513
|
-
// eslint-disable-next-line no-console
|
|
514
|
-
console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');
|
|
515
|
-
return;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
// disableBodyScroll must not have been called on this targetElement before
|
|
519
|
-
if (locks.some(function (lock) {
|
|
520
|
-
return lock.targetElement === targetElement;
|
|
521
|
-
})) {
|
|
522
|
-
return;
|
|
523
|
-
}
|
|
524
|
-
var lock = {
|
|
525
|
-
targetElement: targetElement,
|
|
526
|
-
options: options || {}
|
|
527
|
-
};
|
|
528
|
-
locks = [].concat(_toConsumableArray(locks), [lock]);
|
|
529
|
-
if (isIosDevice) {
|
|
530
|
-
setPositionFixed();
|
|
531
|
-
} else {
|
|
532
|
-
setOverflowHidden(options);
|
|
533
|
-
}
|
|
534
|
-
if (isIosDevice) {
|
|
535
|
-
targetElement.ontouchstart = function (event) {
|
|
536
|
-
if (event.targetTouches.length === 1) {
|
|
537
|
-
// detect single touch.
|
|
538
|
-
initialClientY = event.targetTouches[0].clientY;
|
|
539
|
-
}
|
|
540
|
-
};
|
|
541
|
-
targetElement.ontouchmove = function (event) {
|
|
542
|
-
if (event.targetTouches.length === 1) {
|
|
543
|
-
// detect single touch.
|
|
544
|
-
handleScroll(event, targetElement);
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
if (!documentListenerAdded) {
|
|
548
|
-
document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? {
|
|
549
|
-
passive: false
|
|
550
|
-
} : undefined);
|
|
551
|
-
documentListenerAdded = true;
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
var _clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {
|
|
556
|
-
if (isIosDevice) {
|
|
557
|
-
// Clear all locks ontouchstart/ontouchmove handlers, and the references.
|
|
558
|
-
locks.forEach(function (lock) {
|
|
559
|
-
lock.targetElement.ontouchstart = null;
|
|
560
|
-
lock.targetElement.ontouchmove = null;
|
|
561
|
-
});
|
|
562
|
-
if (documentListenerAdded) {
|
|
563
|
-
document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? {
|
|
564
|
-
passive: false
|
|
565
|
-
} : undefined);
|
|
566
|
-
documentListenerAdded = false;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
// Reset initial clientY.
|
|
570
|
-
initialClientY = -1;
|
|
571
|
-
}
|
|
572
|
-
if (isIosDevice) {
|
|
573
|
-
restorePositionSetting();
|
|
574
|
-
} else {
|
|
575
|
-
restoreOverflowSetting();
|
|
576
|
-
}
|
|
577
|
-
locks = [];
|
|
578
|
-
};
|
|
579
|
-
var _enableBodyScroll = function enableBodyScroll(targetElement) {
|
|
580
|
-
if (!targetElement) {
|
|
581
|
-
// eslint-disable-next-line no-console
|
|
582
|
-
console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');
|
|
583
|
-
return;
|
|
584
|
-
}
|
|
585
|
-
locks = locks.filter(function (lock) {
|
|
586
|
-
return lock.targetElement !== targetElement;
|
|
587
|
-
});
|
|
588
|
-
if (isIosDevice) {
|
|
589
|
-
targetElement.ontouchstart = null;
|
|
590
|
-
targetElement.ontouchmove = null;
|
|
591
|
-
if (documentListenerAdded && locks.length === 0) {
|
|
592
|
-
document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? {
|
|
593
|
-
passive: false
|
|
594
|
-
} : undefined);
|
|
595
|
-
documentListenerAdded = false;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
if (isIosDevice) {
|
|
599
|
-
restorePositionSetting();
|
|
600
|
-
} else {
|
|
601
|
-
restoreOverflowSetting();
|
|
602
|
-
}
|
|
603
|
-
};
|
|
604
|
-
/******/
|
|
605
|
-
return __webpack_exports__;
|
|
606
|
-
/******/
|
|
607
|
-
}()
|
|
608
|
-
);
|
|
609
|
-
});
|
|
610
|
-
|
|
611
|
-
/***/
|
|
612
|
-
},
|
|
613
|
-
|
|
614
|
-
/***/85: /***/function _(module, exports, __nested_webpack_require_31357__) {
|
|
615
|
-
/* module decorator */module = __nested_webpack_require_31357__.nmd(module);
|
|
616
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
617
|
-
function _typeof(obj) {
|
|
618
|
-
"@babel/helpers - typeof";
|
|
619
|
-
|
|
620
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
621
|
-
return typeof obj;
|
|
622
|
-
} : function (obj) {
|
|
623
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
624
|
-
}, _typeof(obj);
|
|
625
|
-
}
|
|
626
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
627
|
-
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_31357__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_31357__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
628
|
-
})(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
|
|
629
|
-
return (/******/function () {
|
|
630
|
-
// webpackBootstrap
|
|
631
|
-
/******/
|
|
632
|
-
"use strict";
|
|
633
|
-
|
|
634
|
-
/******/
|
|
635
|
-
var __webpack_modules__ = {
|
|
636
|
-
/***/787: /***/function _(module) {
|
|
637
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
638
|
-
|
|
639
|
-
/***/
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
/******/
|
|
643
|
-
};
|
|
644
|
-
/************************************************************************/
|
|
645
|
-
/******/ // The module cache
|
|
646
|
-
/******/
|
|
647
|
-
var __webpack_module_cache__ = {};
|
|
648
|
-
/******/
|
|
649
|
-
/******/ // The require function
|
|
650
|
-
/******/
|
|
651
|
-
function __nested_webpack_require_1465__(moduleId) {
|
|
652
|
-
/******/ // Check if module is in cache
|
|
653
|
-
/******/var cachedModule = __webpack_module_cache__[moduleId];
|
|
654
|
-
/******/
|
|
655
|
-
if (cachedModule !== undefined) {
|
|
656
|
-
/******/return cachedModule.exports;
|
|
657
|
-
/******/
|
|
658
|
-
}
|
|
659
|
-
/******/ // Create a new module (and put it into the cache)
|
|
660
|
-
/******/
|
|
661
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
662
|
-
/******/ // no module.id needed
|
|
663
|
-
/******/ // no module.loaded needed
|
|
664
|
-
/******/exports: {}
|
|
665
|
-
/******/
|
|
666
|
-
};
|
|
667
|
-
/******/
|
|
668
|
-
/******/ // Execute the module function
|
|
669
|
-
/******/
|
|
670
|
-
__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
|
|
671
|
-
/******/
|
|
672
|
-
/******/ // Return the exports of the module
|
|
673
|
-
/******/
|
|
674
|
-
return module.exports;
|
|
675
|
-
/******/
|
|
676
|
-
}
|
|
677
|
-
/******/
|
|
678
|
-
/************************************************************************/
|
|
679
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
680
|
-
/******/
|
|
681
|
-
(function () {
|
|
682
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
683
|
-
/******/__nested_webpack_require_1465__.n = function (module) {
|
|
684
|
-
/******/var getter = module && module.__esModule ? /******/function () {
|
|
685
|
-
return module['default'];
|
|
686
|
-
} : /******/function () {
|
|
687
|
-
return module;
|
|
688
|
-
};
|
|
689
|
-
/******/
|
|
690
|
-
__nested_webpack_require_1465__.d(getter, {
|
|
691
|
-
a: getter
|
|
692
|
-
});
|
|
693
|
-
/******/
|
|
694
|
-
return getter;
|
|
695
|
-
/******/
|
|
696
|
-
};
|
|
697
|
-
/******/
|
|
698
|
-
})();
|
|
699
|
-
/******/
|
|
700
|
-
/******/ /* webpack/runtime/define property getters */
|
|
701
|
-
/******/
|
|
702
|
-
(function () {
|
|
703
|
-
/******/ // define getter functions for harmony exports
|
|
704
|
-
/******/__nested_webpack_require_1465__.d = function (exports, definition) {
|
|
705
|
-
/******/for (var key in definition) {
|
|
706
|
-
/******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
|
|
707
|
-
/******/Object.defineProperty(exports, key, {
|
|
708
|
-
enumerable: true,
|
|
709
|
-
get: definition[key]
|
|
710
|
-
});
|
|
711
|
-
/******/
|
|
712
|
-
}
|
|
713
|
-
/******/
|
|
714
|
-
}
|
|
715
|
-
/******/
|
|
716
|
-
};
|
|
717
|
-
/******/
|
|
718
|
-
})();
|
|
719
|
-
/******/
|
|
720
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
721
|
-
/******/
|
|
722
|
-
(function () {
|
|
723
|
-
/******/__nested_webpack_require_1465__.o = function (obj, prop) {
|
|
724
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
725
|
-
};
|
|
726
|
-
/******/
|
|
727
|
-
})();
|
|
728
|
-
/******/
|
|
729
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
730
|
-
/******/
|
|
731
|
-
(function () {
|
|
732
|
-
/******/ // define __esModule on exports
|
|
733
|
-
/******/__nested_webpack_require_1465__.r = function (exports) {
|
|
734
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
735
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
736
|
-
value: 'Module'
|
|
737
|
-
});
|
|
738
|
-
/******/
|
|
739
|
-
}
|
|
740
|
-
/******/
|
|
741
|
-
Object.defineProperty(exports, '__esModule', {
|
|
742
|
-
value: true
|
|
743
|
-
});
|
|
744
|
-
/******/
|
|
745
|
-
};
|
|
746
|
-
/******/
|
|
747
|
-
})();
|
|
748
|
-
/******/
|
|
749
|
-
/************************************************************************/
|
|
750
|
-
var __webpack_exports__ = {};
|
|
751
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
752
|
-
(function () {
|
|
753
|
-
__nested_webpack_require_1465__.r(__webpack_exports__);
|
|
754
|
-
/* harmony export */
|
|
755
|
-
__nested_webpack_require_1465__.d(__webpack_exports__, {
|
|
756
|
-
/* harmony export */"default": function _default() {
|
|
757
|
-
return __WEBPACK_DEFAULT_EXPORT__;
|
|
758
|
-
}
|
|
759
|
-
/* harmony export */
|
|
760
|
-
});
|
|
761
|
-
/* harmony import */
|
|
762
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
|
|
763
|
-
/* harmony import */
|
|
764
|
-
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
765
|
-
/**
|
|
766
|
-
* Create an available ID
|
|
767
|
-
*
|
|
768
|
-
*/
|
|
769
|
-
|
|
770
|
-
var useComId = function useComId() {
|
|
771
|
-
return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
|
|
772
|
-
};
|
|
773
|
-
/* harmony default export */
|
|
774
|
-
var __WEBPACK_DEFAULT_EXPORT__ = useComId;
|
|
775
|
-
})();
|
|
776
|
-
|
|
777
|
-
/******/
|
|
778
|
-
return __webpack_exports__;
|
|
779
|
-
/******/
|
|
780
|
-
}()
|
|
781
|
-
);
|
|
782
|
-
});
|
|
783
|
-
|
|
784
|
-
/***/
|
|
785
|
-
},
|
|
786
|
-
|
|
787
|
-
/***/771: /***/function _(module, exports, __nested_webpack_require_39445__) {
|
|
788
|
-
/* module decorator */module = __nested_webpack_require_39445__.nmd(module);
|
|
789
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
790
|
-
function _typeof(obj) {
|
|
791
|
-
"@babel/helpers - typeof";
|
|
792
|
-
|
|
793
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
794
|
-
return typeof obj;
|
|
795
|
-
} : function (obj) {
|
|
796
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
797
|
-
}, _typeof(obj);
|
|
798
|
-
}
|
|
799
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
800
|
-
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_39445__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_39445__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
801
|
-
})(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
|
|
802
|
-
return (/******/function () {
|
|
803
|
-
// webpackBootstrap
|
|
804
|
-
/******/
|
|
805
|
-
"use strict";
|
|
806
|
-
|
|
807
|
-
/******/
|
|
808
|
-
var __webpack_modules__ = {
|
|
809
|
-
/***/787: /***/function _(module) {
|
|
810
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
811
|
-
|
|
812
|
-
/***/
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
/******/
|
|
816
|
-
};
|
|
817
|
-
/************************************************************************/
|
|
818
|
-
/******/ // The module cache
|
|
819
|
-
/******/
|
|
820
|
-
var __webpack_module_cache__ = {};
|
|
821
|
-
/******/
|
|
822
|
-
/******/ // The require function
|
|
823
|
-
/******/
|
|
824
|
-
function __nested_webpack_require_1465__(moduleId) {
|
|
825
|
-
/******/ // Check if module is in cache
|
|
826
|
-
/******/var cachedModule = __webpack_module_cache__[moduleId];
|
|
827
|
-
/******/
|
|
828
|
-
if (cachedModule !== undefined) {
|
|
829
|
-
/******/return cachedModule.exports;
|
|
830
|
-
/******/
|
|
831
|
-
}
|
|
832
|
-
/******/ // Create a new module (and put it into the cache)
|
|
833
|
-
/******/
|
|
834
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
835
|
-
/******/ // no module.id needed
|
|
836
|
-
/******/ // no module.loaded needed
|
|
837
|
-
/******/exports: {}
|
|
838
|
-
/******/
|
|
839
|
-
};
|
|
840
|
-
/******/
|
|
841
|
-
/******/ // Execute the module function
|
|
842
|
-
/******/
|
|
843
|
-
__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
|
|
844
|
-
/******/
|
|
845
|
-
/******/ // Return the exports of the module
|
|
846
|
-
/******/
|
|
847
|
-
return module.exports;
|
|
848
|
-
/******/
|
|
849
|
-
}
|
|
850
|
-
/******/
|
|
851
|
-
/************************************************************************/
|
|
852
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
853
|
-
/******/
|
|
854
|
-
(function () {
|
|
855
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
856
|
-
/******/__nested_webpack_require_1465__.n = function (module) {
|
|
857
|
-
/******/var getter = module && module.__esModule ? /******/function () {
|
|
858
|
-
return module['default'];
|
|
859
|
-
} : /******/function () {
|
|
860
|
-
return module;
|
|
861
|
-
};
|
|
862
|
-
/******/
|
|
863
|
-
__nested_webpack_require_1465__.d(getter, {
|
|
864
|
-
a: getter
|
|
865
|
-
});
|
|
866
|
-
/******/
|
|
867
|
-
return getter;
|
|
868
|
-
/******/
|
|
869
|
-
};
|
|
870
|
-
/******/
|
|
871
|
-
})();
|
|
872
|
-
/******/
|
|
873
|
-
/******/ /* webpack/runtime/define property getters */
|
|
874
|
-
/******/
|
|
875
|
-
(function () {
|
|
876
|
-
/******/ // define getter functions for harmony exports
|
|
877
|
-
/******/__nested_webpack_require_1465__.d = function (exports, definition) {
|
|
878
|
-
/******/for (var key in definition) {
|
|
879
|
-
/******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
|
|
880
|
-
/******/Object.defineProperty(exports, key, {
|
|
881
|
-
enumerable: true,
|
|
882
|
-
get: definition[key]
|
|
883
|
-
});
|
|
884
|
-
/******/
|
|
885
|
-
}
|
|
886
|
-
/******/
|
|
887
|
-
}
|
|
888
|
-
/******/
|
|
889
|
-
};
|
|
890
|
-
/******/
|
|
891
|
-
})();
|
|
892
|
-
/******/
|
|
893
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
894
|
-
/******/
|
|
895
|
-
(function () {
|
|
896
|
-
/******/__nested_webpack_require_1465__.o = function (obj, prop) {
|
|
897
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
898
|
-
};
|
|
899
|
-
/******/
|
|
900
|
-
})();
|
|
901
|
-
/******/
|
|
902
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
903
|
-
/******/
|
|
904
|
-
(function () {
|
|
905
|
-
/******/ // define __esModule on exports
|
|
906
|
-
/******/__nested_webpack_require_1465__.r = function (exports) {
|
|
907
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
908
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
909
|
-
value: 'Module'
|
|
910
|
-
});
|
|
911
|
-
/******/
|
|
912
|
-
}
|
|
913
|
-
/******/
|
|
914
|
-
Object.defineProperty(exports, '__esModule', {
|
|
915
|
-
value: true
|
|
916
|
-
});
|
|
917
|
-
/******/
|
|
918
|
-
};
|
|
919
|
-
/******/
|
|
920
|
-
})();
|
|
921
|
-
/******/
|
|
922
|
-
/************************************************************************/
|
|
923
|
-
var __webpack_exports__ = {};
|
|
924
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
925
|
-
(function () {
|
|
926
|
-
__nested_webpack_require_1465__.r(__webpack_exports__);
|
|
927
|
-
/* harmony export */
|
|
928
|
-
__nested_webpack_require_1465__.d(__webpack_exports__, {
|
|
929
|
-
/* harmony export */"default": function _default() {
|
|
930
|
-
return __WEBPACK_DEFAULT_EXPORT__;
|
|
931
|
-
}
|
|
932
|
-
/* harmony export */
|
|
933
|
-
});
|
|
934
|
-
/* harmony import */
|
|
935
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
|
|
936
|
-
/* harmony import */
|
|
937
|
-
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
938
|
-
function _slicedToArray(arr, i) {
|
|
939
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
940
|
-
}
|
|
941
|
-
function _nonIterableRest() {
|
|
942
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
943
|
-
}
|
|
944
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
945
|
-
if (!o) return;
|
|
946
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
947
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
948
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
949
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
950
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
951
|
-
}
|
|
952
|
-
function _arrayLikeToArray(arr, len) {
|
|
953
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
954
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
955
|
-
return arr2;
|
|
956
|
-
}
|
|
957
|
-
function _iterableToArrayLimit(arr, i) {
|
|
958
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
959
|
-
if (null != _i) {
|
|
960
|
-
var _s,
|
|
961
|
-
_e,
|
|
962
|
-
_x,
|
|
963
|
-
_r,
|
|
964
|
-
_arr = [],
|
|
965
|
-
_n = !0,
|
|
966
|
-
_d = !1;
|
|
967
|
-
try {
|
|
968
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
969
|
-
if (Object(_i) !== _i) return;
|
|
970
|
-
_n = !1;
|
|
971
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
972
|
-
} catch (err) {
|
|
973
|
-
_d = !0, _e = err;
|
|
974
|
-
} finally {
|
|
975
|
-
try {
|
|
976
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
977
|
-
} finally {
|
|
978
|
-
if (_d) throw _e;
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
return _arr;
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
function _arrayWithHoles(arr) {
|
|
985
|
-
if (Array.isArray(arr)) return arr;
|
|
986
|
-
}
|
|
987
|
-
/**
|
|
988
|
-
* Drag & Drop Element
|
|
989
|
-
*
|
|
990
|
-
* @usage:
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
const App = () => {
|
|
994
|
-
const {
|
|
995
|
-
dragContentHandle,
|
|
996
|
-
dragHandle,
|
|
997
|
-
resetPosition
|
|
998
|
-
}: any = useDraggable({
|
|
999
|
-
enabled: true, // if `false`, drag and drop is disabled
|
|
1000
|
-
preventOutsideScreen: {
|
|
1001
|
-
xAxis: true,
|
|
1002
|
-
yAxis: true
|
|
1003
|
-
},
|
|
1004
|
-
onStart: (coordinates: Record<string, number>, handleEl: HTMLElement | null, contentEl: HTMLElement | null) => {
|
|
1005
|
-
|
|
1006
|
-
},
|
|
1007
|
-
onDrag: (coordinates: Record<string, number>, handleEl: HTMLElement | null, contentEl: HTMLElement | null) => {
|
|
1008
|
-
console.log(coordinates); // {dx: -164, dy: -37}
|
|
1009
|
-
|
|
1010
|
-
},
|
|
1011
|
-
onStop: (coordinates: Record<string, number>, handleEl: HTMLElement | null, contentEl: HTMLElement | null) => {
|
|
1012
|
-
|
|
1013
|
-
}
|
|
1014
|
-
});
|
|
1015
|
-
|
|
1016
|
-
const resetModal = () => {
|
|
1017
|
-
resetPosition?.();
|
|
1018
|
-
};
|
|
1019
|
-
|
|
1020
|
-
return (
|
|
1021
|
-
<div className="container" ref={dragContentHandle}>
|
|
1022
|
-
<div ref={dragHandle} className="handle">Drag me</div>
|
|
1023
|
-
<div className="content">
|
|
1024
|
-
content...
|
|
1025
|
-
</div>
|
|
1026
|
-
</div>
|
|
1027
|
-
);
|
|
1028
|
-
};
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
*/
|
|
1032
|
-
|
|
1033
|
-
var useDraggable = function useDraggable(_ref) {
|
|
1034
|
-
var enabled = _ref.enabled,
|
|
1035
|
-
preventOutsideScreen = _ref.preventOutsideScreen,
|
|
1036
|
-
onStart = _ref.onStart,
|
|
1037
|
-
onStop = _ref.onStop,
|
|
1038
|
-
onDrag = _ref.onDrag;
|
|
1039
|
-
var DRAG_DISABLED = typeof enabled === "undefined" || enabled === false;
|
|
1040
|
-
var dragging = false; // DO NOT USE 'useState()'
|
|
1041
|
-
var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
|
1042
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1043
|
-
node = _useState2[0],
|
|
1044
|
-
setNode = _useState2[1];
|
|
1045
|
-
var _useState3 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
|
1046
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
1047
|
-
targetNode = _useState4[0],
|
|
1048
|
-
setTargetNode = _useState4[1];
|
|
1049
|
-
var _useState5 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
|
1050
|
-
dx: 0,
|
|
1051
|
-
dy: 0
|
|
1052
|
-
}),
|
|
1053
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
1054
|
-
_useState6$ = _useState6[0],
|
|
1055
|
-
dx = _useState6$.dx,
|
|
1056
|
-
dy = _useState6$.dy,
|
|
1057
|
-
setOffset = _useState6[1];
|
|
1058
|
-
var ref = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (nodeEle) {
|
|
1059
|
-
setNode(nodeEle);
|
|
1060
|
-
}, []);
|
|
1061
|
-
var targetRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (nodeEle) {
|
|
1062
|
-
setTargetNode(nodeEle);
|
|
1063
|
-
}, []);
|
|
1064
|
-
var withoutViewport = function withoutViewport(startPos, e, targetEl) {
|
|
1065
|
-
if (!targetEl || typeof preventOutsideScreen === 'undefined') return null;
|
|
1066
|
-
|
|
1067
|
-
// latest mouse coordinates
|
|
1068
|
-
var mouseX = e.clientX;
|
|
1069
|
-
var mouseY = e.clientY;
|
|
1070
|
-
|
|
1071
|
-
// the size of the parent element
|
|
1072
|
-
var parentWidth = window.innerWidth;
|
|
1073
|
-
var parentHeight = window.innerHeight;
|
|
1074
|
-
|
|
1075
|
-
// the size of the child element
|
|
1076
|
-
var childrenWidth = targetEl.clientWidth;
|
|
1077
|
-
var childrenHight = targetEl.clientHeight;
|
|
1078
|
-
var minLeft = -(parentWidth - childrenWidth) / 2;
|
|
1079
|
-
var maxLeft = (parentWidth - childrenWidth) / 2;
|
|
1080
|
-
var minTop = -(parentHeight - childrenHight) / 2;
|
|
1081
|
-
var maxTop = (parentHeight - childrenHight) / 2;
|
|
1082
|
-
|
|
1083
|
-
// calculates the left and top offsets after the move
|
|
1084
|
-
var nLeft = mouseX - startPos.x;
|
|
1085
|
-
var nTop = mouseY - startPos.y;
|
|
1086
|
-
|
|
1087
|
-
// Determine whether the left or right distance is out of bounds
|
|
1088
|
-
if (preventOutsideScreen.xAxis) {
|
|
1089
|
-
nLeft = nLeft <= minLeft ? minLeft : nLeft;
|
|
1090
|
-
nLeft = nLeft >= maxLeft ? maxLeft : nLeft;
|
|
1091
|
-
}
|
|
1092
|
-
if (preventOutsideScreen.yAxis) {
|
|
1093
|
-
nTop = nTop <= minTop ? minTop : nTop;
|
|
1094
|
-
nTop = nTop >= maxTop ? maxTop : nTop;
|
|
1095
|
-
}
|
|
1096
|
-
return [nLeft, nTop];
|
|
1097
|
-
};
|
|
1098
|
-
var handleMouseDown = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
|
|
1099
|
-
dragging = true;
|
|
1100
|
-
onStart === null || onStart === void 0 ? void 0 : onStart({
|
|
1101
|
-
dx: dx,
|
|
1102
|
-
dy: dy
|
|
1103
|
-
}, targetNode, node);
|
|
1104
|
-
var startPos = {
|
|
1105
|
-
x: e.clientX - dx,
|
|
1106
|
-
y: e.clientY - dy
|
|
1107
|
-
};
|
|
1108
|
-
var handleMouseMove = function handleMouseMove(e) {
|
|
1109
|
-
if (!dragging) return;
|
|
1110
|
-
var dx = e.clientX - startPos.x;
|
|
1111
|
-
var dy = e.clientY - startPos.y;
|
|
1112
|
-
|
|
1113
|
-
// prevent dragged item to be dragged outside of screen
|
|
1114
|
-
if (preventOutsideScreen && node) {
|
|
1115
|
-
var _data = withoutViewport(startPos, e, node);
|
|
1116
|
-
if (_data !== null) {
|
|
1117
|
-
dx = _data[0];
|
|
1118
|
-
dy = _data[1];
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
setOffset({
|
|
1122
|
-
dx: dx,
|
|
1123
|
-
dy: dy
|
|
1124
|
-
});
|
|
1125
|
-
onDrag === null || onDrag === void 0 ? void 0 : onDrag({
|
|
1126
|
-
dx: dx,
|
|
1127
|
-
dy: dy
|
|
1128
|
-
}, targetNode, node);
|
|
1129
|
-
e.stopPropagation();
|
|
1130
|
-
e.preventDefault();
|
|
1131
|
-
};
|
|
1132
|
-
var handleMouseUp = function handleMouseUp() {
|
|
1133
|
-
dragging = false;
|
|
1134
|
-
onStop === null || onStop === void 0 ? void 0 : onStop({
|
|
1135
|
-
dx: dx,
|
|
1136
|
-
dy: dy
|
|
1137
|
-
}, targetNode, node);
|
|
1138
|
-
document.removeEventListener('mousemove', handleMouseMove);
|
|
1139
|
-
document.removeEventListener('mouseup', handleMouseUp);
|
|
1140
|
-
};
|
|
1141
|
-
document.addEventListener('mousemove', handleMouseMove);
|
|
1142
|
-
document.addEventListener('mouseup', handleMouseUp);
|
|
1143
|
-
}, [dx, dy, node]);
|
|
1144
|
-
var handleTouchStart = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
|
|
1145
|
-
dragging = true;
|
|
1146
|
-
onStart === null || onStart === void 0 ? void 0 : onStart({
|
|
1147
|
-
dx: dx,
|
|
1148
|
-
dy: dy
|
|
1149
|
-
}, targetNode, node);
|
|
1150
|
-
var touch = e.touches[0];
|
|
1151
|
-
var startPos = {
|
|
1152
|
-
x: touch.clientX - dx,
|
|
1153
|
-
y: touch.clientY - dy
|
|
1154
|
-
};
|
|
1155
|
-
var handleTouchMove = function handleTouchMove(e) {
|
|
1156
|
-
if (!dragging) return;
|
|
1157
|
-
var touch = e.touches[0];
|
|
1158
|
-
var dx = touch.clientX - startPos.x;
|
|
1159
|
-
var dy = touch.clientY - startPos.y;
|
|
1160
|
-
|
|
1161
|
-
// prevent dragged item to be dragged outside of screen
|
|
1162
|
-
if (preventOutsideScreen && node) {
|
|
1163
|
-
var _data = withoutViewport(startPos, touch, node);
|
|
1164
|
-
if (_data !== null) {
|
|
1165
|
-
dx = _data[0];
|
|
1166
|
-
dy = _data[1];
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
setOffset({
|
|
1170
|
-
dx: dx,
|
|
1171
|
-
dy: dy
|
|
1172
|
-
});
|
|
1173
|
-
onDrag === null || onDrag === void 0 ? void 0 : onDrag({
|
|
1174
|
-
dx: dx,
|
|
1175
|
-
dy: dy
|
|
1176
|
-
}, targetNode, node);
|
|
1177
|
-
e.stopPropagation();
|
|
1178
|
-
e.preventDefault();
|
|
1179
|
-
};
|
|
1180
|
-
var handleTouchEnd = function handleTouchEnd() {
|
|
1181
|
-
dragging = false;
|
|
1182
|
-
onStop === null || onStop === void 0 ? void 0 : onStop({
|
|
1183
|
-
dx: dx,
|
|
1184
|
-
dy: dy
|
|
1185
|
-
}, targetNode, node);
|
|
1186
|
-
document.removeEventListener('touchmove', handleTouchMove);
|
|
1187
|
-
document.removeEventListener('touchend', handleTouchEnd);
|
|
1188
|
-
};
|
|
1189
|
-
document.addEventListener('touchmove', handleTouchMove);
|
|
1190
|
-
document.addEventListener('touchend', handleTouchEnd);
|
|
1191
|
-
}, [dx, dy, node]);
|
|
1192
|
-
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1193
|
-
if (node) {
|
|
1194
|
-
node.style.transform = "translate3d(".concat(dx, "px, ").concat(dy, "px, 0)");
|
|
1195
|
-
}
|
|
1196
|
-
}, [node, dx, dy]);
|
|
1197
|
-
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1198
|
-
if (DRAG_DISABLED) {
|
|
1199
|
-
return;
|
|
1200
|
-
}
|
|
1201
|
-
if (!targetNode) {
|
|
1202
|
-
return;
|
|
1203
|
-
}
|
|
1204
|
-
targetNode.addEventListener("mousedown", handleMouseDown);
|
|
1205
|
-
targetNode.addEventListener("touchstart", handleTouchStart);
|
|
1206
|
-
return function () {
|
|
1207
|
-
targetNode.removeEventListener("mousedown", handleMouseDown);
|
|
1208
|
-
targetNode.removeEventListener("touchstart", handleTouchStart);
|
|
1209
|
-
};
|
|
1210
|
-
}, [targetNode, dx, dy]);
|
|
1211
|
-
return {
|
|
1212
|
-
dragContentHandle: ref,
|
|
1213
|
-
dragHandle: targetRef,
|
|
1214
|
-
resetPosition: function resetPosition() {
|
|
1215
|
-
// reset position
|
|
1216
|
-
setOffset({
|
|
1217
|
-
dx: 0,
|
|
1218
|
-
dy: 0
|
|
1219
|
-
});
|
|
1220
|
-
}
|
|
1221
|
-
};
|
|
1222
|
-
};
|
|
1223
|
-
/* harmony default export */
|
|
1224
|
-
var __WEBPACK_DEFAULT_EXPORT__ = useDraggable;
|
|
1225
|
-
})();
|
|
1226
|
-
|
|
1227
|
-
/******/
|
|
1228
|
-
return __webpack_exports__;
|
|
1229
|
-
/******/
|
|
1230
|
-
}()
|
|
1231
|
-
);
|
|
1232
|
-
});
|
|
1233
|
-
|
|
1234
|
-
/***/
|
|
1235
|
-
},
|
|
1236
|
-
|
|
1237
|
-
/***/787: /***/function _(module) {
|
|
1238
|
-
"use strict";
|
|
1239
|
-
|
|
1240
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
1241
|
-
|
|
1242
|
-
/***/
|
|
1243
|
-
},
|
|
1244
|
-
|
|
1245
|
-
/***/156: /***/function _(module) {
|
|
1246
|
-
"use strict";
|
|
1247
|
-
|
|
1248
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
|
|
1249
|
-
|
|
1250
|
-
/***/
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
/******/
|
|
1254
|
-
};
|
|
1255
|
-
/************************************************************************/
|
|
1256
|
-
/******/ // The module cache
|
|
1257
|
-
/******/
|
|
1258
|
-
var __webpack_module_cache__ = {};
|
|
1259
|
-
/******/
|
|
1260
|
-
/******/ // The require function
|
|
1261
|
-
/******/
|
|
1262
|
-
function __nested_webpack_require_61961__(moduleId) {
|
|
1263
|
-
/******/ // Check if module is in cache
|
|
1264
|
-
/******/var cachedModule = __webpack_module_cache__[moduleId];
|
|
1265
|
-
/******/
|
|
1266
|
-
if (cachedModule !== undefined) {
|
|
1267
|
-
/******/return cachedModule.exports;
|
|
1268
|
-
/******/
|
|
1269
|
-
}
|
|
1270
|
-
/******/ // Create a new module (and put it into the cache)
|
|
1271
|
-
/******/
|
|
1272
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
1273
|
-
/******/id: moduleId,
|
|
1274
|
-
/******/loaded: false,
|
|
1275
|
-
/******/exports: {}
|
|
1276
|
-
/******/
|
|
1277
|
-
};
|
|
1278
|
-
/******/
|
|
1279
|
-
/******/ // Execute the module function
|
|
1280
|
-
/******/
|
|
1281
|
-
__webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_61961__);
|
|
1282
|
-
/******/
|
|
1283
|
-
/******/ // Flag the module as loaded
|
|
1284
|
-
/******/
|
|
1285
|
-
module.loaded = true;
|
|
1286
|
-
/******/
|
|
1287
|
-
/******/ // Return the exports of the module
|
|
1288
|
-
/******/
|
|
1289
|
-
return module.exports;
|
|
1290
|
-
/******/
|
|
1291
|
-
}
|
|
1292
|
-
/******/
|
|
1293
|
-
/************************************************************************/
|
|
1294
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
1295
|
-
/******/
|
|
1296
|
-
(function () {
|
|
1297
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
1298
|
-
/******/__nested_webpack_require_61961__.n = function (module) {
|
|
1299
|
-
/******/var getter = module && module.__esModule ? /******/function () {
|
|
1300
|
-
return module['default'];
|
|
1301
|
-
} : /******/function () {
|
|
1302
|
-
return module;
|
|
1303
|
-
};
|
|
1304
|
-
/******/
|
|
1305
|
-
__nested_webpack_require_61961__.d(getter, {
|
|
1306
|
-
a: getter
|
|
1307
|
-
});
|
|
1308
|
-
/******/
|
|
1309
|
-
return getter;
|
|
1310
|
-
/******/
|
|
1311
|
-
};
|
|
1312
|
-
/******/
|
|
1313
|
-
})();
|
|
1314
|
-
/******/
|
|
1315
|
-
/******/ /* webpack/runtime/define property getters */
|
|
1316
|
-
/******/
|
|
1317
|
-
(function () {
|
|
1318
|
-
/******/ // define getter functions for harmony exports
|
|
1319
|
-
/******/__nested_webpack_require_61961__.d = function (exports, definition) {
|
|
1320
|
-
/******/for (var key in definition) {
|
|
1321
|
-
/******/if (__nested_webpack_require_61961__.o(definition, key) && !__nested_webpack_require_61961__.o(exports, key)) {
|
|
1322
|
-
/******/Object.defineProperty(exports, key, {
|
|
1323
|
-
enumerable: true,
|
|
1324
|
-
get: definition[key]
|
|
1325
|
-
});
|
|
1326
|
-
/******/
|
|
1327
|
-
}
|
|
1328
|
-
/******/
|
|
1329
|
-
}
|
|
1330
|
-
/******/
|
|
1331
|
-
};
|
|
1332
|
-
/******/
|
|
1333
|
-
})();
|
|
1334
|
-
/******/
|
|
1335
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1336
|
-
/******/
|
|
1337
|
-
(function () {
|
|
1338
|
-
/******/__nested_webpack_require_61961__.o = function (obj, prop) {
|
|
1339
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
1340
|
-
};
|
|
1341
|
-
/******/
|
|
1342
|
-
})();
|
|
1343
|
-
/******/
|
|
1344
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
1345
|
-
/******/
|
|
1346
|
-
(function () {
|
|
1347
|
-
/******/ // define __esModule on exports
|
|
1348
|
-
/******/__nested_webpack_require_61961__.r = function (exports) {
|
|
1349
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
1350
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
1351
|
-
value: 'Module'
|
|
1352
|
-
});
|
|
1353
|
-
/******/
|
|
1354
|
-
}
|
|
1355
|
-
/******/
|
|
1356
|
-
Object.defineProperty(exports, '__esModule', {
|
|
1357
|
-
value: true
|
|
1358
|
-
});
|
|
1359
|
-
/******/
|
|
1360
|
-
};
|
|
1361
|
-
/******/
|
|
1362
|
-
})();
|
|
1363
|
-
/******/
|
|
1364
|
-
/******/ /* webpack/runtime/node module decorator */
|
|
1365
|
-
/******/
|
|
1366
|
-
(function () {
|
|
1367
|
-
/******/__nested_webpack_require_61961__.nmd = function (module) {
|
|
1368
|
-
/******/module.paths = [];
|
|
1369
|
-
/******/
|
|
1370
|
-
if (!module.children) module.children = [];
|
|
1371
|
-
/******/
|
|
1372
|
-
return module;
|
|
1373
|
-
/******/
|
|
1374
|
-
};
|
|
1375
|
-
/******/
|
|
1376
|
-
})();
|
|
1377
|
-
/******/
|
|
1378
|
-
/************************************************************************/
|
|
1379
|
-
var __webpack_exports__ = {};
|
|
1380
|
-
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
1381
|
-
(function () {
|
|
1382
|
-
"use strict";
|
|
1383
|
-
|
|
1384
|
-
__nested_webpack_require_61961__.r(__webpack_exports__);
|
|
1385
|
-
/* harmony export */
|
|
1386
|
-
__nested_webpack_require_61961__.d(__webpack_exports__, {
|
|
1387
|
-
/* harmony export */"default": function _default() {
|
|
1388
|
-
return __WEBPACK_DEFAULT_EXPORT__;
|
|
1389
|
-
}
|
|
1390
|
-
/* harmony export */
|
|
1391
|
-
});
|
|
1392
|
-
/* harmony import */
|
|
1393
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_61961__(787);
|
|
1394
|
-
/* harmony import */
|
|
1395
|
-
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_61961__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1396
|
-
/* harmony import */
|
|
1397
|
-
var funda_root_portal__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_61961__(909);
|
|
1398
|
-
/* harmony import */
|
|
1399
|
-
var funda_root_portal__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_61961__.n(funda_root_portal__WEBPACK_IMPORTED_MODULE_1__);
|
|
1400
|
-
/* harmony import */
|
|
1401
|
-
var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2__ = __nested_webpack_require_61961__(85);
|
|
1402
|
-
/* harmony import */
|
|
1403
|
-
var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nested_webpack_require_61961__.n(funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2__);
|
|
1404
|
-
/* harmony import */
|
|
1405
|
-
var funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3__ = __nested_webpack_require_61961__(771);
|
|
1406
|
-
/* harmony import */
|
|
1407
|
-
var funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nested_webpack_require_61961__.n(funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3__);
|
|
1408
|
-
/* harmony import */
|
|
1409
|
-
var funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__ = __nested_webpack_require_61961__(70);
|
|
1410
|
-
/* harmony import */
|
|
1411
|
-
var funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__nested_webpack_require_61961__.n(funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__);
|
|
1412
|
-
function _slicedToArray(arr, i) {
|
|
1413
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
1414
|
-
}
|
|
1415
|
-
function _nonIterableRest() {
|
|
1416
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1417
|
-
}
|
|
1418
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1419
|
-
if (!o) return;
|
|
1420
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1421
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1422
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1423
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1424
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1425
|
-
}
|
|
1426
|
-
function _arrayLikeToArray(arr, len) {
|
|
1427
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1428
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1429
|
-
return arr2;
|
|
1430
|
-
}
|
|
1431
|
-
function _iterableToArrayLimit(arr, i) {
|
|
1432
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1433
|
-
if (null != _i) {
|
|
1434
|
-
var _s,
|
|
1435
|
-
_e,
|
|
1436
|
-
_x,
|
|
1437
|
-
_r,
|
|
1438
|
-
_arr = [],
|
|
1439
|
-
_n = !0,
|
|
1440
|
-
_d = !1;
|
|
1441
|
-
try {
|
|
1442
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
1443
|
-
if (Object(_i) !== _i) return;
|
|
1444
|
-
_n = !1;
|
|
1445
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
1446
|
-
} catch (err) {
|
|
1447
|
-
_d = !0, _e = err;
|
|
1448
|
-
} finally {
|
|
1449
|
-
try {
|
|
1450
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
1451
|
-
} finally {
|
|
1452
|
-
if (_d) throw _e;
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
return _arr;
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
function _arrayWithHoles(arr) {
|
|
1459
|
-
if (Array.isArray(arr)) return arr;
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
// Destroys body scroll locking
|
|
1463
|
-
|
|
1464
|
-
var ModalDialog = /*#__PURE__*/(0, react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
|
|
1465
|
-
var modalContentClassName = props.modalContentClassName,
|
|
1466
|
-
modalHeaderClassName = props.modalHeaderClassName,
|
|
1467
|
-
modalTitleClassName = props.modalTitleClassName,
|
|
1468
|
-
modalBodyClassName = props.modalBodyClassName,
|
|
1469
|
-
modalFooterClassName = props.modalFooterClassName,
|
|
1470
|
-
modalFooterExpandedContentClassName = props.modalFooterExpandedContentClassName,
|
|
1471
|
-
lockBodyScroll = props.lockBodyScroll,
|
|
1472
|
-
draggable = props.draggable,
|
|
1473
|
-
draggedPreventOutsideScreen = props.draggedPreventOutsideScreen,
|
|
1474
|
-
depth = props.depth,
|
|
1475
|
-
show = props.show,
|
|
1476
|
-
maxWidth = props.maxWidth,
|
|
1477
|
-
minHeight = props.minHeight,
|
|
1478
|
-
fullscreen = props.fullscreen,
|
|
1479
|
-
enableVideo = props.enableVideo,
|
|
1480
|
-
heading = props.heading,
|
|
1481
|
-
footerExpandedContent = props.footerExpandedContent,
|
|
1482
|
-
triggerClassName = props.triggerClassName,
|
|
1483
|
-
triggerContent = props.triggerContent,
|
|
1484
|
-
closeBtnClassName = props.closeBtnClassName,
|
|
1485
|
-
closeBtnLabel = props.closeBtnLabel,
|
|
1486
|
-
submitBtnClassName = props.submitBtnClassName,
|
|
1487
|
-
submitBtnLabel = props.submitBtnLabel,
|
|
1488
|
-
autoClose = props.autoClose,
|
|
1489
|
-
maskDisabled = props.maskDisabled,
|
|
1490
|
-
maskOpacity = props.maskOpacity,
|
|
1491
|
-
closeOnlyBtn = props.closeOnlyBtn,
|
|
1492
|
-
closeDisabled = props.closeDisabled,
|
|
1493
|
-
data = props.data,
|
|
1494
|
-
onLoad = props.onLoad,
|
|
1495
|
-
onOpen = props.onOpen,
|
|
1496
|
-
onClose = props.onClose,
|
|
1497
|
-
onSubmit = props.onSubmit,
|
|
1498
|
-
id = props.id,
|
|
1499
|
-
children = props.children,
|
|
1500
|
-
onPressEnter = props.onPressEnter;
|
|
1501
|
-
var DEPTH = depth || 1055; // the default value same as bootstrap
|
|
1502
|
-
var M_WIDTH = fullscreen ? undefined : typeof maxWidth === 'function' ? maxWidth() : maxWidth ? maxWidth : undefined;
|
|
1503
|
-
var M_HEIGHT = typeof minHeight === 'function' ? minHeight() : minHeight ? minHeight : undefined;
|
|
1504
|
-
var LOCK_BODY_SCROLL = typeof lockBodyScroll === 'undefined' ? false : lockBodyScroll;
|
|
1505
|
-
var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2___default()();
|
|
1506
|
-
var modalRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1507
|
-
var triggerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1508
|
-
var idRes = id || uniqueID;
|
|
1509
|
-
var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
1510
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1511
|
-
modalShow = _useState2[0],
|
|
1512
|
-
setModalShow = _useState2[1];
|
|
1513
|
-
var _useState3 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
|
1514
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
1515
|
-
incomingData = _useState4[0],
|
|
1516
|
-
setIncomingData = _useState4[1];
|
|
1517
|
-
|
|
1518
|
-
// drag and drop
|
|
1519
|
-
var _useState5 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
1520
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
1521
|
-
isDragging = _useState6[0],
|
|
1522
|
-
setIsDragging = _useState6[1];
|
|
1523
|
-
var _useDraggable = funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3___default()({
|
|
1524
|
-
enabled: draggable,
|
|
1525
|
-
preventOutsideScreen: draggedPreventOutsideScreen,
|
|
1526
|
-
onStart: function onStart(coordinates, handleEl, contentEl) {
|
|
1527
|
-
setIsDragging(true);
|
|
1528
|
-
},
|
|
1529
|
-
onDrag: function onDrag(coordinates, handleEl, contentEl) {},
|
|
1530
|
-
onStop: function onStop(coordinates, handleEl, contentEl) {
|
|
1531
|
-
setIsDragging(false);
|
|
1532
|
-
}
|
|
1533
|
-
}),
|
|
1534
|
-
dragContentHandle = _useDraggable.dragContentHandle,
|
|
1535
|
-
dragHandle = _useDraggable.dragHandle,
|
|
1536
|
-
resetPosition = _useDraggable.resetPosition;
|
|
1537
|
-
|
|
1538
|
-
// exposes the following methods
|
|
1539
|
-
(0, react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(externalRef, function () {
|
|
1540
|
-
return {
|
|
1541
|
-
open: function open() {
|
|
1542
|
-
handleOpenWin(null);
|
|
1543
|
-
},
|
|
1544
|
-
close: function close() {
|
|
1545
|
-
handleCloseWin(null);
|
|
1546
|
-
}
|
|
1547
|
-
};
|
|
1548
|
-
}, [externalRef]);
|
|
1549
|
-
|
|
1550
|
-
//
|
|
1551
|
-
function handleCloseWin(e) {
|
|
1552
|
-
if (typeof e !== 'undefined' && e !== null) {
|
|
1553
|
-
e.preventDefault();
|
|
1554
|
-
|
|
1555
|
-
// Prevent click events of parent nested Modal
|
|
1556
|
-
e.stopPropagation();
|
|
1557
|
-
}
|
|
1558
|
-
closeAction();
|
|
1559
|
-
|
|
1560
|
-
// reset modal coordinates
|
|
1561
|
-
setTimeout(function () {
|
|
1562
|
-
resetPosition === null || resetPosition === void 0 ? void 0 : resetPosition();
|
|
1563
|
-
}, 300);
|
|
1564
|
-
|
|
1565
|
-
//
|
|
1566
|
-
onClose === null || onClose === void 0 ? void 0 : onClose(e);
|
|
1567
|
-
}
|
|
1568
|
-
function handleOpenWin(e) {
|
|
1569
|
-
if (typeof e !== 'undefined' && e !== null) {
|
|
1570
|
-
e.preventDefault();
|
|
1571
|
-
|
|
1572
|
-
// Prevent click events of parent nested Modal
|
|
1573
|
-
e.stopPropagation();
|
|
1574
|
-
}
|
|
1575
|
-
openAction();
|
|
1576
|
-
|
|
1577
|
-
//
|
|
1578
|
-
var callback = function callback() {
|
|
1579
|
-
handleCloseWin(e);
|
|
1580
|
-
};
|
|
1581
|
-
onOpen === null || onOpen === void 0 ? void 0 : onOpen(e, callback);
|
|
1582
|
-
}
|
|
1583
|
-
function closeAction() {
|
|
1584
|
-
// pause video without controls
|
|
1585
|
-
//------------------------------------------
|
|
1586
|
-
if (window.curVideo !== null && typeof window.curVideo !== 'undefined') window.curVideo.pause();
|
|
1587
|
-
|
|
1588
|
-
// close Modal Dialog
|
|
1589
|
-
//------------------------------------------
|
|
1590
|
-
var $mask = document.querySelector("#mask-".concat(idRes, " > .modal-backdrop"));
|
|
1591
|
-
setModalShow(false);
|
|
1592
|
-
if ($mask !== null) $mask.classList.remove('show');
|
|
1593
|
-
setTimeout(function () {
|
|
1594
|
-
if (modalRef.current !== null) modalRef.current.style.display = 'none';
|
|
1595
|
-
if ($mask !== null) $mask.style.display = 'none';
|
|
1596
|
-
}, 300);
|
|
1597
|
-
|
|
1598
|
-
// Unlocks the page
|
|
1599
|
-
//------------------------------------------
|
|
1600
|
-
if (LOCK_BODY_SCROLL) (0, funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__.enableBodyScroll)(document.querySelector('body'));
|
|
1601
|
-
|
|
1602
|
-
// Cancels a timeout previously established by calling setTimeout().
|
|
1603
|
-
//------------------------------------------
|
|
1604
|
-
clearTimeout(window.setCloseModalDialog);
|
|
1605
|
-
}
|
|
1606
|
-
function openAction() {
|
|
1607
|
-
if (modalRef.current === null) return;
|
|
1608
|
-
|
|
1609
|
-
// Video PopUp Interaction
|
|
1610
|
-
//------------------------------------------
|
|
1611
|
-
var hasVideo = modalRef.current.classList.contains('is-video') ? true : false;
|
|
1612
|
-
if (hasVideo) {
|
|
1613
|
-
var windowWidth = window.innerWidth;
|
|
1614
|
-
var windowHeight = window.innerHeight;
|
|
1615
|
-
var $videoWrapper = modalRef.current.querySelector('.modal-dialog__video');
|
|
1616
|
-
var isIframe = $videoWrapper.getElementsByTagName('iframe').length > 0 ? true : false;
|
|
1617
|
-
var $video = isIframe ? $videoWrapper.getElementsByTagName('iframe')[0] : $videoWrapper.getElementsByTagName('video')[0];
|
|
1618
|
-
|
|
1619
|
-
//
|
|
1620
|
-
var setVideo = function setVideo(currentWidth, currentHeight, obj) {
|
|
1621
|
-
var newMaxW = windowWidth - 80,
|
|
1622
|
-
newMaxH = windowHeight - 80;
|
|
1623
|
-
var newW = currentWidth,
|
|
1624
|
-
newH = currentHeight;
|
|
1625
|
-
if (currentHeight > newMaxH) {
|
|
1626
|
-
newH = newMaxH;
|
|
1627
|
-
|
|
1628
|
-
//Scaled/Proportional Content
|
|
1629
|
-
newW = currentWidth * (newH / currentHeight);
|
|
1630
|
-
}
|
|
1631
|
-
if (newW > newMaxW) {
|
|
1632
|
-
newW = newMaxW;
|
|
1633
|
-
|
|
1634
|
-
//Scaled/Proportional Content
|
|
1635
|
-
newH = currentHeight * (newW / currentWidth);
|
|
1636
|
-
}
|
|
1637
|
-
obj.height = newH + 'px';
|
|
1638
|
-
obj.width = newW + 'px';
|
|
1639
|
-
|
|
1640
|
-
//
|
|
1641
|
-
modalRef.current.querySelector('.modal-dialog').style.width = newW + 'px';
|
|
1642
|
-
};
|
|
1643
|
-
if (isIframe) {
|
|
1644
|
-
var _w = parseFloat(modalRef.current.querySelector('.modal-dialog').style.maxWidth);
|
|
1645
|
-
if (isNaN(_w)) _w = 500;
|
|
1646
|
-
var _h = _w * 0.5625;
|
|
1647
|
-
setVideo(_w, _h, $video);
|
|
1648
|
-
} else {
|
|
1649
|
-
var _sources = $video.getElementsByTagName('source');
|
|
1650
|
-
var _src = _sources.length > 0 ? _sources[0].src : $video.src;
|
|
1651
|
-
getVideoDimensions(_src).then(function (res) {
|
|
1652
|
-
setVideo(res.width, res.height, $video);
|
|
1653
|
-
});
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
//Set current video when the tag is <video>
|
|
1657
|
-
window.curVideo = $video.tagName === 'VIDEO' ? $video : null;
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
// fire Modal Dialog
|
|
1661
|
-
//------------------------------------------
|
|
1662
|
-
var $mask = document.querySelector("#mask-".concat(idRes, " > .modal-backdrop"));
|
|
1663
|
-
modalRef.current.style.display = 'block';
|
|
1664
|
-
if ($mask !== null) $mask.style.display = 'block';
|
|
1665
|
-
setTimeout(function () {
|
|
1666
|
-
setModalShow(true);
|
|
1667
|
-
if ($mask !== null) $mask.classList.add('show');
|
|
1668
|
-
}, 0);
|
|
1669
|
-
|
|
1670
|
-
// Locks the page
|
|
1671
|
-
//------------------------------------------
|
|
1672
|
-
//
|
|
1673
|
-
// Get a target element that you want to persist scrolling for (such as a modal/lightbox/flyout/nav).
|
|
1674
|
-
// Specifically, the target element is the one we would like to allow scroll on (NOT a parent of that element).
|
|
1675
|
-
// This is also the element to apply the CSS '-webkit-overflow-scrolling: touch;' if desired.
|
|
1676
|
-
if (LOCK_BODY_SCROLL) (0, funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__.disableBodyScroll)(document.querySelector('body'));
|
|
1677
|
-
|
|
1678
|
-
//auto close
|
|
1679
|
-
//------------------------------------------
|
|
1680
|
-
if (autoClose && !isNaN(autoClose)) {
|
|
1681
|
-
//
|
|
1682
|
-
window.setCloseModalDialog = setTimeout(function () {
|
|
1683
|
-
closeAction();
|
|
1684
|
-
//
|
|
1685
|
-
onClose === null || onClose === void 0 ? void 0 : onClose(null);
|
|
1686
|
-
}, autoClose);
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
|
|
1690
|
-
//Returns the dimensions of a video asynchrounsly.
|
|
1691
|
-
function getVideoDimensions(url) {
|
|
1692
|
-
return new Promise(function (resolve) {
|
|
1693
|
-
// create the video element
|
|
1694
|
-
var video = document.createElement('video');
|
|
1695
|
-
|
|
1696
|
-
// place a listener on it
|
|
1697
|
-
video.addEventListener("loadedmetadata", function () {
|
|
1698
|
-
// retrieve dimensions
|
|
1699
|
-
var height = this.videoHeight;
|
|
1700
|
-
var width = this.videoWidth;
|
|
1701
|
-
// send back result
|
|
1702
|
-
resolve({
|
|
1703
|
-
height: height,
|
|
1704
|
-
width: width
|
|
1705
|
-
});
|
|
1706
|
-
}, false);
|
|
1707
|
-
|
|
1708
|
-
// start download meta-datas
|
|
1709
|
-
video.src = url;
|
|
1710
|
-
});
|
|
1711
|
-
}
|
|
1712
|
-
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1713
|
-
// update incoming data
|
|
1714
|
-
//--------------
|
|
1715
|
-
setIncomingData(data);
|
|
1716
|
-
|
|
1717
|
-
// show (ONLY, DO NOT USE `if ... else ...`)
|
|
1718
|
-
//--------------
|
|
1719
|
-
if (show) {
|
|
1720
|
-
handleOpenWin(null);
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
// Pass the function to be called
|
|
1724
|
-
//--------------
|
|
1725
|
-
onLoad === null || onLoad === void 0 ? void 0 : onLoad(function () {
|
|
1726
|
-
return handleOpenWin;
|
|
1727
|
-
}, function () {
|
|
1728
|
-
return handleCloseWin;
|
|
1729
|
-
});
|
|
1730
|
-
|
|
1731
|
-
// Remove the global list of events, especially as scroll and interval.
|
|
1732
|
-
//--------------
|
|
1733
|
-
return function () {
|
|
1734
|
-
if (LOCK_BODY_SCROLL) (0, funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__.clearAllBodyScrollLocks)();
|
|
1735
|
-
|
|
1736
|
-
// Cancels a timeout previously established by calling setTimeout().
|
|
1737
|
-
clearTimeout(window.setCloseModalDialog);
|
|
1738
|
-
};
|
|
1739
|
-
}, [show, data, modalRef.current]); // When show`` defaults to true, `modalRef.current` will be null
|
|
1740
|
-
|
|
1741
|
-
// 监听回车键
|
|
1742
|
-
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1743
|
-
if (!modalShow || !onPressEnter) return;
|
|
1744
|
-
var handleKeyDown = function handleKeyDown(e) {
|
|
1745
|
-
if (e.key === 'Enter' || e.key === 'NumpadEnter') {
|
|
1746
|
-
var _callback = function _callback() {
|
|
1747
|
-
handleCloseWin(null);
|
|
1748
|
-
};
|
|
1749
|
-
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(_callback);
|
|
1750
|
-
}
|
|
1751
|
-
};
|
|
1752
|
-
window.addEventListener('keydown', handleKeyDown);
|
|
1753
|
-
return function () {
|
|
1754
|
-
window.removeEventListener('keydown', handleKeyDown);
|
|
1755
|
-
};
|
|
1756
|
-
}, [modalShow, onPressEnter]);
|
|
1757
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, triggerContent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1758
|
-
className: triggerClassName ? triggerClassName : 'd-inline w-auto',
|
|
1759
|
-
ref: triggerRef,
|
|
1760
|
-
onClick: handleOpenWin
|
|
1761
|
-
}, triggerContent)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(funda_root_portal__WEBPACK_IMPORTED_MODULE_1___default(), {
|
|
1762
|
-
show: true,
|
|
1763
|
-
containerClassName: "ModalDialog"
|
|
1764
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1765
|
-
ref: modalRef,
|
|
1766
|
-
className: enableVideo ? "modal fade is-video ".concat(modalShow ? 'show' : '') : "modal fade ".concat(modalShow ? 'show' : ''),
|
|
1767
|
-
tabIndex: -1,
|
|
1768
|
-
"aria-hidden": "true",
|
|
1769
|
-
style: {
|
|
1770
|
-
pointerEvents: 'none',
|
|
1771
|
-
zIndex: DEPTH
|
|
1772
|
-
},
|
|
1773
|
-
"data-mask": "mask-".concat(idRes)
|
|
1774
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1775
|
-
className: "modal-dialog modal-dialog-centered modal-dialog-scrollable ".concat(fullscreen ? 'modal-fullscreen' : ''),
|
|
1776
|
-
style: M_WIDTH ? {
|
|
1777
|
-
maxWidth: "".concat(M_WIDTH)
|
|
1778
|
-
} : {}
|
|
1779
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1780
|
-
ref: dragContentHandle,
|
|
1781
|
-
className: "".concat(enableVideo ? 'modal-content bg-transparent shadow-none border-0' : 'modal-content', " ").concat(modalContentClassName || '', " ").concat(isDragging ? 'dragging' : ''),
|
|
1782
|
-
style: {
|
|
1783
|
-
overflow: 'inherit',
|
|
1784
|
-
minHeight: M_HEIGHT ? M_HEIGHT : 'auto'
|
|
1785
|
-
}
|
|
1786
|
-
}, (!heading || heading === '') && closeDisabled ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1787
|
-
ref: dragHandle,
|
|
1788
|
-
className: "".concat(enableVideo ? 'modal-header border-0 px-0' : 'modal-header', " ").concat(modalHeaderClassName || ''),
|
|
1789
|
-
style: {
|
|
1790
|
-
cursor: draggable ? 'move' : 'default'
|
|
1791
|
-
}
|
|
1792
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h5", {
|
|
1793
|
-
className: "modal-title ".concat(modalTitleClassName || '')
|
|
1794
|
-
}, heading || ''), !closeDisabled ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
1795
|
-
type: "button",
|
|
1796
|
-
className: enableVideo ? 'btn-close btn-close-white' : 'btn-close',
|
|
1797
|
-
"data-close": "1",
|
|
1798
|
-
onClick: function onClick(e) {
|
|
1799
|
-
return handleCloseWin(e);
|
|
1800
|
-
}
|
|
1801
|
-
}) : null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1802
|
-
className: "".concat(enableVideo ? 'modal-body m-0 p-0' : 'modal-body', " ").concat(modalBodyClassName || '')
|
|
1803
|
-
}, enableVideo ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1804
|
-
className: "modal-dialog__video"
|
|
1805
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1806
|
-
className: "ratio ratio-16x9"
|
|
1807
|
-
}, children))) : children), footerExpandedContent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1808
|
-
className: "modal-footer modal-expanded-footer ".concat(modalFooterExpandedContentClassName || '')
|
|
1809
|
-
}, footerExpandedContent)) : null, closeBtnLabel || submitBtnLabel ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1810
|
-
className: "modal-footer ".concat(modalFooterClassName || '')
|
|
1811
|
-
}, !closeDisabled ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, closeBtnLabel ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
1812
|
-
"data-close": "1",
|
|
1813
|
-
onClick: function onClick(e) {
|
|
1814
|
-
return handleCloseWin(e);
|
|
1815
|
-
},
|
|
1816
|
-
type: "button",
|
|
1817
|
-
className: closeBtnClassName ? closeBtnClassName : 'btn btn-secondary'
|
|
1818
|
-
}, closeBtnLabel) : null) : null, submitBtnLabel ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
1819
|
-
"data-confirm": "1",
|
|
1820
|
-
"data-incoming-data": "".concat(incomingData),
|
|
1821
|
-
onClick: function onClick(e) {
|
|
1822
|
-
var callback = function callback() {
|
|
1823
|
-
handleCloseWin(e);
|
|
1824
|
-
};
|
|
1825
|
-
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e, callback, incomingData);
|
|
1826
|
-
},
|
|
1827
|
-
type: "button",
|
|
1828
|
-
className: submitBtnClassName ? submitBtnClassName : 'btn btn-primary'
|
|
1829
|
-
}, submitBtnLabel) : null)) : null))), !maskDisabled ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1830
|
-
id: "mask-".concat(idRes)
|
|
1831
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1832
|
-
id: "mask-".concat(idRes),
|
|
1833
|
-
className: modalShow ? 'modal-backdrop fade show' : 'modal-backdrop fade',
|
|
1834
|
-
style: maskOpacity ? {
|
|
1835
|
-
display: modalShow ? 'block' : 'none',
|
|
1836
|
-
opacity: maskOpacity,
|
|
1837
|
-
zIndex: DEPTH - 5
|
|
1838
|
-
} : {
|
|
1839
|
-
display: modalShow ? 'block' : 'none',
|
|
1840
|
-
zIndex: DEPTH - 5
|
|
1841
|
-
},
|
|
1842
|
-
onClick: function onClick(e) {
|
|
1843
|
-
if ((typeof closeDisabled === 'undefined' || closeDisabled === false) && (typeof closeOnlyBtn === 'undefined' || closeOnlyBtn === false)) {
|
|
1844
|
-
handleCloseWin(null);
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
})) : null));
|
|
1848
|
-
});
|
|
1849
|
-
/* harmony default export */
|
|
1850
|
-
var __WEBPACK_DEFAULT_EXPORT__ = ModalDialog;
|
|
1851
|
-
})();
|
|
1852
|
-
|
|
1853
|
-
/******/
|
|
1854
|
-
return __webpack_exports__;
|
|
1855
|
-
/******/
|
|
1856
|
-
}()
|
|
1857
|
-
);
|
|
1858
|
-
});
|
|
1859
|
-
|
|
1860
|
-
/***/ }),
|
|
1861
|
-
|
|
1862
|
-
/***/ 188:
|
|
1863
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1864
|
-
|
|
1865
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
1866
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof2(obj); }
|
|
1867
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
1868
|
-
if (( false ? 0 : _typeof2(exports)) === 'object' && ( false ? 0 : _typeof2(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
1869
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
1870
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
1871
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
1872
|
-
})(this, function () {
|
|
1873
|
-
return (/******/function () {
|
|
1874
|
-
// webpackBootstrap
|
|
1875
|
-
/******/
|
|
1876
|
-
"use strict";
|
|
1877
|
-
|
|
1878
|
-
/******/ // The require scope
|
|
1879
|
-
/******/
|
|
1880
|
-
var __nested_webpack_require_993__ = {};
|
|
1881
|
-
/******/
|
|
1882
|
-
/************************************************************************/
|
|
1883
|
-
/******/ /* webpack/runtime/define property getters */
|
|
1884
|
-
/******/
|
|
1885
|
-
(function () {
|
|
1886
|
-
/******/ // define getter functions for harmony exports
|
|
1887
|
-
/******/__nested_webpack_require_993__.d = function (exports, definition) {
|
|
1888
|
-
/******/for (var key in definition) {
|
|
1889
|
-
/******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
|
|
1890
|
-
/******/Object.defineProperty(exports, key, {
|
|
1891
|
-
enumerable: true,
|
|
1892
|
-
get: definition[key]
|
|
1893
|
-
});
|
|
1894
|
-
/******/
|
|
1895
|
-
}
|
|
1896
|
-
/******/
|
|
1897
|
-
}
|
|
1898
|
-
/******/
|
|
1899
|
-
};
|
|
1900
|
-
/******/
|
|
1901
|
-
})();
|
|
1902
|
-
/******/
|
|
1903
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1904
|
-
/******/
|
|
1905
|
-
(function () {
|
|
1906
|
-
/******/__nested_webpack_require_993__.o = function (obj, prop) {
|
|
1907
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
1908
|
-
};
|
|
1909
|
-
/******/
|
|
1910
|
-
})();
|
|
1911
|
-
/******/
|
|
1912
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
1913
|
-
/******/
|
|
1914
|
-
(function () {
|
|
1915
|
-
/******/ // define __esModule on exports
|
|
1916
|
-
/******/__nested_webpack_require_993__.r = function (exports) {
|
|
1917
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
1918
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
1919
|
-
value: 'Module'
|
|
1920
|
-
});
|
|
1921
|
-
/******/
|
|
1922
|
-
}
|
|
1923
|
-
/******/
|
|
1924
|
-
Object.defineProperty(exports, '__esModule', {
|
|
1925
|
-
value: true
|
|
1926
|
-
});
|
|
1927
|
-
/******/
|
|
1928
|
-
};
|
|
1929
|
-
/******/
|
|
1930
|
-
})();
|
|
1931
|
-
/******/
|
|
1932
|
-
/************************************************************************/
|
|
1933
|
-
var __webpack_exports__ = {};
|
|
1934
|
-
__nested_webpack_require_993__.r(__webpack_exports__);
|
|
1935
|
-
/* harmony export */
|
|
1936
|
-
__nested_webpack_require_993__.d(__webpack_exports__, {
|
|
1937
|
-
/* harmony export */"clsWrite": function clsWrite() {
|
|
1938
|
-
return (/* binding */_clsWrite
|
|
1939
|
-
);
|
|
1940
|
-
},
|
|
1941
|
-
/* harmony export */"combinedCls": function combinedCls() {
|
|
1942
|
-
return (/* binding */_combinedCls
|
|
1943
|
-
);
|
|
1944
|
-
}
|
|
1945
|
-
/* harmony export */
|
|
1946
|
-
});
|
|
1947
|
-
function _slicedToArray(arr, i) {
|
|
1948
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
1949
|
-
}
|
|
1950
|
-
function _nonIterableRest() {
|
|
1951
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1952
|
-
}
|
|
1953
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1954
|
-
if (!o) return;
|
|
1955
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1956
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1957
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1958
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1959
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1960
|
-
}
|
|
1961
|
-
function _arrayLikeToArray(arr, len) {
|
|
1962
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1963
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1964
|
-
return arr2;
|
|
1965
|
-
}
|
|
1966
|
-
function _iterableToArrayLimit(arr, i) {
|
|
1967
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1968
|
-
if (null != _i) {
|
|
1969
|
-
var _s,
|
|
1970
|
-
_e,
|
|
1971
|
-
_x,
|
|
1972
|
-
_r,
|
|
1973
|
-
_arr = [],
|
|
1974
|
-
_n = !0,
|
|
1975
|
-
_d = !1;
|
|
1976
|
-
try {
|
|
1977
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
1978
|
-
if (Object(_i) !== _i) return;
|
|
1979
|
-
_n = !1;
|
|
1980
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
1981
|
-
} catch (err) {
|
|
1982
|
-
_d = !0, _e = err;
|
|
1983
|
-
} finally {
|
|
1984
|
-
try {
|
|
1985
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
1986
|
-
} finally {
|
|
1987
|
-
if (_d) throw _e;
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
return _arr;
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
function _arrayWithHoles(arr) {
|
|
1994
|
-
if (Array.isArray(arr)) return arr;
|
|
1995
|
-
}
|
|
1996
|
-
function _typeof(obj) {
|
|
1997
|
-
"@babel/helpers - typeof";
|
|
1998
|
-
|
|
1999
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
2000
|
-
return typeof obj;
|
|
2001
|
-
} : function (obj) {
|
|
2002
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2003
|
-
}, _typeof(obj);
|
|
2004
|
-
}
|
|
2005
|
-
/**
|
|
2006
|
-
* Output of class name
|
|
2007
|
-
* @param {*} s - Any
|
|
2008
|
-
* @param {String} defaultCls - Default string
|
|
2009
|
-
* @param {?*} targetCls - Any
|
|
2010
|
-
* @returns {*}
|
|
2011
|
-
*/
|
|
2012
|
-
function _clsWrite(s, defaultCls) {
|
|
2013
|
-
var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
2014
|
-
return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
|
-
/**
|
|
2018
|
-
* Combined classnames
|
|
2019
|
-
* @param {*} args
|
|
2020
|
-
* @returns {String|undefined}
|
|
2021
|
-
*/
|
|
2022
|
-
/* Usage:
|
|
2023
|
-
|
|
2024
|
-
console.log(combinedCls('a-1', 'a-2', 'a-3', {
|
|
2025
|
-
'p-1': null,
|
|
2026
|
-
'p-2': undefined,
|
|
2027
|
-
'p-3': true,
|
|
2028
|
-
'p-4': false,
|
|
2029
|
-
'p-5': 'kkk',
|
|
2030
|
-
'p-6': 0,
|
|
2031
|
-
'p-7': 1,
|
|
2032
|
-
'p-8': '',
|
|
2033
|
-
undefined
|
|
2034
|
-
})); // a-1 a-2 a-3 p-3 p-5 p-7
|
|
2035
|
-
*/
|
|
2036
|
-
function _combinedCls() {
|
|
2037
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2038
|
-
args[_key] = arguments[_key];
|
|
2039
|
-
}
|
|
2040
|
-
if (args) {
|
|
2041
|
-
var classes = [];
|
|
2042
|
-
for (var i = 0; i < args.length; i++) {
|
|
2043
|
-
var className = args[i];
|
|
2044
|
-
if (!className) {
|
|
2045
|
-
continue;
|
|
2046
|
-
}
|
|
2047
|
-
var type = _typeof(className);
|
|
2048
|
-
if (type === 'string' || type === 'number') {
|
|
2049
|
-
classes.push(className);
|
|
2050
|
-
} else if (type === 'object') {
|
|
2051
|
-
var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
|
|
2052
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
2053
|
-
key = _ref2[0],
|
|
2054
|
-
value = _ref2[1];
|
|
2055
|
-
return value ? key : null;
|
|
2056
|
-
});
|
|
2057
|
-
classes = _classes.length ? classes.concat(_classes.filter(function (c) {
|
|
2058
|
-
return !!c;
|
|
2059
|
-
})) : classes;
|
|
2060
|
-
}
|
|
2061
|
-
}
|
|
2062
|
-
return classes.join(' ').trim();
|
|
2063
|
-
}
|
|
2064
|
-
return undefined;
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
/******/
|
|
2068
|
-
return __webpack_exports__;
|
|
2069
|
-
/******/
|
|
2070
|
-
}()
|
|
2071
|
-
);
|
|
2072
|
-
});
|
|
2073
|
-
|
|
2074
|
-
/***/ }),
|
|
2075
|
-
|
|
2076
|
-
/***/ 322:
|
|
2077
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2078
|
-
|
|
2079
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
2080
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2081
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2082
|
-
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
2083
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
2084
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
2085
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
2086
|
-
})(this, function () {
|
|
2087
|
-
return (/******/function () {
|
|
2088
|
-
// webpackBootstrap
|
|
2089
|
-
/******/
|
|
2090
|
-
"use strict";
|
|
2091
|
-
|
|
2092
|
-
/******/ // The require scope
|
|
2093
|
-
/******/
|
|
2094
|
-
var __nested_webpack_require_987__ = {};
|
|
2095
|
-
/******/
|
|
2096
|
-
/************************************************************************/
|
|
2097
|
-
/******/ /* webpack/runtime/define property getters */
|
|
2098
|
-
/******/
|
|
2099
|
-
(function () {
|
|
2100
|
-
/******/ // define getter functions for harmony exports
|
|
2101
|
-
/******/__nested_webpack_require_987__.d = function (exports, definition) {
|
|
2102
|
-
/******/for (var key in definition) {
|
|
2103
|
-
/******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
|
|
2104
|
-
/******/Object.defineProperty(exports, key, {
|
|
2105
|
-
enumerable: true,
|
|
2106
|
-
get: definition[key]
|
|
2107
|
-
});
|
|
2108
|
-
/******/
|
|
2109
|
-
}
|
|
2110
|
-
/******/
|
|
2111
|
-
}
|
|
2112
|
-
/******/
|
|
2113
|
-
};
|
|
2114
|
-
/******/
|
|
2115
|
-
})();
|
|
2116
|
-
/******/
|
|
2117
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2118
|
-
/******/
|
|
2119
|
-
(function () {
|
|
2120
|
-
/******/__nested_webpack_require_987__.o = function (obj, prop) {
|
|
2121
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2122
|
-
};
|
|
2123
|
-
/******/
|
|
2124
|
-
})();
|
|
2125
|
-
/******/
|
|
2126
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
2127
|
-
/******/
|
|
2128
|
-
(function () {
|
|
2129
|
-
/******/ // define __esModule on exports
|
|
2130
|
-
/******/__nested_webpack_require_987__.r = function (exports) {
|
|
2131
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2132
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
2133
|
-
value: 'Module'
|
|
2134
|
-
});
|
|
2135
|
-
/******/
|
|
2136
|
-
}
|
|
2137
|
-
/******/
|
|
2138
|
-
Object.defineProperty(exports, '__esModule', {
|
|
2139
|
-
value: true
|
|
2140
|
-
});
|
|
2141
|
-
/******/
|
|
2142
|
-
};
|
|
2143
|
-
/******/
|
|
2144
|
-
})();
|
|
2145
|
-
/******/
|
|
2146
|
-
/************************************************************************/
|
|
2147
|
-
var __webpack_exports__ = {};
|
|
2148
|
-
__nested_webpack_require_987__.r(__webpack_exports__);
|
|
2149
|
-
/* harmony export */
|
|
2150
|
-
__nested_webpack_require_987__.d(__webpack_exports__, {
|
|
2151
|
-
/* harmony export */"dateFormat": function dateFormat() {
|
|
2152
|
-
return (/* binding */_dateFormat
|
|
2153
|
-
);
|
|
2154
|
-
},
|
|
2155
|
-
/* harmony export */"getCalendarDate": function getCalendarDate() {
|
|
2156
|
-
return (/* binding */_getCalendarDate
|
|
2157
|
-
);
|
|
2158
|
-
},
|
|
2159
|
-
/* harmony export */"getCurrentDate": function getCurrentDate() {
|
|
2160
|
-
return (/* binding */_getCurrentDate
|
|
2161
|
-
);
|
|
2162
|
-
},
|
|
2163
|
-
/* harmony export */"getCurrentDay": function getCurrentDay() {
|
|
2164
|
-
return (/* binding */_getCurrentDay
|
|
2165
|
-
);
|
|
2166
|
-
},
|
|
2167
|
-
/* harmony export */"getCurrentMonth": function getCurrentMonth() {
|
|
2168
|
-
return (/* binding */_getCurrentMonth
|
|
2169
|
-
);
|
|
2170
|
-
},
|
|
2171
|
-
/* harmony export */"getCurrentYear": function getCurrentYear() {
|
|
2172
|
-
return (/* binding */_getCurrentYear
|
|
2173
|
-
);
|
|
2174
|
-
},
|
|
2175
|
-
/* harmony export */"getDateDetails": function getDateDetails() {
|
|
2176
|
-
return (/* binding */_getDateDetails
|
|
2177
|
-
);
|
|
2178
|
-
},
|
|
2179
|
-
/* harmony export */"getDaysInLastMonths": function getDaysInLastMonths() {
|
|
2180
|
-
return (/* binding */_getDaysInLastMonths
|
|
2181
|
-
);
|
|
2182
|
-
},
|
|
2183
|
-
/* harmony export */"getFirstAndLastMonthDay": function getFirstAndLastMonthDay() {
|
|
2184
|
-
return (/* binding */_getFirstAndLastMonthDay
|
|
2185
|
-
);
|
|
2186
|
-
},
|
|
2187
|
-
/* harmony export */"getFullTime": function getFullTime() {
|
|
2188
|
-
return (/* binding */_getFullTime
|
|
2189
|
-
);
|
|
2190
|
-
},
|
|
2191
|
-
/* harmony export */"getLastDayInMonth": function getLastDayInMonth() {
|
|
2192
|
-
return (/* binding */_getLastDayInMonth
|
|
2193
|
-
);
|
|
2194
|
-
},
|
|
2195
|
-
/* harmony export */"getMonthDates": function getMonthDates() {
|
|
2196
|
-
return (/* binding */_getMonthDates
|
|
2197
|
-
);
|
|
2198
|
-
},
|
|
2199
|
-
/* harmony export */"getNextMonthDate": function getNextMonthDate() {
|
|
2200
|
-
return (/* binding */_getNextMonthDate
|
|
2201
|
-
);
|
|
2202
|
-
},
|
|
2203
|
-
/* harmony export */"getNextYearDate": function getNextYearDate() {
|
|
2204
|
-
return (/* binding */_getNextYearDate
|
|
2205
|
-
);
|
|
2206
|
-
},
|
|
2207
|
-
/* harmony export */"getNow": function getNow() {
|
|
2208
|
-
return (/* binding */_getNow
|
|
2209
|
-
);
|
|
2210
|
-
},
|
|
2211
|
-
/* harmony export */"getPrevMonthDate": function getPrevMonthDate() {
|
|
2212
|
-
return (/* binding */_getPrevMonthDate
|
|
2213
|
-
);
|
|
2214
|
-
},
|
|
2215
|
-
/* harmony export */"getPrevYearDate": function getPrevYearDate() {
|
|
2216
|
-
return (/* binding */_getPrevYearDate
|
|
2217
|
-
);
|
|
2218
|
-
},
|
|
2219
|
-
/* harmony export */"getSpecifiedDate": function getSpecifiedDate() {
|
|
2220
|
-
return (/* binding */_getSpecifiedDate
|
|
2221
|
-
);
|
|
2222
|
-
},
|
|
2223
|
-
/* harmony export */"getTodayDate": function getTodayDate() {
|
|
2224
|
-
return (/* binding */_getTodayDate
|
|
2225
|
-
);
|
|
2226
|
-
},
|
|
2227
|
-
/* harmony export */"getTomorrowDate": function getTomorrowDate() {
|
|
2228
|
-
return (/* binding */_getTomorrowDate
|
|
2229
|
-
);
|
|
2230
|
-
},
|
|
2231
|
-
/* harmony export */"getWeekDatesFromMon": function getWeekDatesFromMon() {
|
|
2232
|
-
return (/* binding */_getWeekDatesFromMon
|
|
2233
|
-
);
|
|
2234
|
-
},
|
|
2235
|
-
/* harmony export */"getWeekDatesFromSun": function getWeekDatesFromSun() {
|
|
2236
|
-
return (/* binding */_getWeekDatesFromSun
|
|
2237
|
-
);
|
|
2238
|
-
},
|
|
2239
|
-
/* harmony export */"getYesterdayDate": function getYesterdayDate() {
|
|
2240
|
-
return (/* binding */_getYesterdayDate
|
|
2241
|
-
);
|
|
2242
|
-
},
|
|
2243
|
-
/* harmony export */"isTimeString": function isTimeString() {
|
|
2244
|
-
return (/* binding */_isTimeString
|
|
2245
|
-
);
|
|
2246
|
-
},
|
|
2247
|
-
/* harmony export */"isValidDate": function isValidDate() {
|
|
2248
|
-
return (/* binding */_isValidDate
|
|
2249
|
-
);
|
|
2250
|
-
},
|
|
2251
|
-
/* harmony export */"isValidDay": function isValidDay() {
|
|
2252
|
-
return (/* binding */_isValidDay
|
|
2253
|
-
);
|
|
2254
|
-
},
|
|
2255
|
-
/* harmony export */"isValidHours": function isValidHours() {
|
|
2256
|
-
return (/* binding */_isValidHours
|
|
2257
|
-
);
|
|
2258
|
-
},
|
|
2259
|
-
/* harmony export */"isValidMinutesAndSeconds": function isValidMinutesAndSeconds() {
|
|
2260
|
-
return (/* binding */_isValidMinutesAndSeconds
|
|
2261
|
-
);
|
|
2262
|
-
},
|
|
2263
|
-
/* harmony export */"isValidMonth": function isValidMonth() {
|
|
2264
|
-
return (/* binding */_isValidMonth
|
|
2265
|
-
);
|
|
2266
|
-
},
|
|
2267
|
-
/* harmony export */"isValidYear": function isValidYear() {
|
|
2268
|
-
return (/* binding */_isValidYear
|
|
2269
|
-
);
|
|
2270
|
-
},
|
|
2271
|
-
/* harmony export */"padZero": function padZero() {
|
|
2272
|
-
return (/* binding */_padZero
|
|
2273
|
-
);
|
|
2274
|
-
},
|
|
2275
|
-
/* harmony export */"setDateDays": function setDateDays() {
|
|
2276
|
-
return (/* binding */_setDateDays
|
|
2277
|
-
);
|
|
2278
|
-
},
|
|
2279
|
-
/* harmony export */"setDateHours": function setDateHours() {
|
|
2280
|
-
return (/* binding */_setDateHours
|
|
2281
|
-
);
|
|
2282
|
-
},
|
|
2283
|
-
/* harmony export */"setDateMinutes": function setDateMinutes() {
|
|
2284
|
-
return (/* binding */_setDateMinutes
|
|
2285
|
-
);
|
|
2286
|
-
},
|
|
2287
|
-
/* harmony export */"timestampToDate": function timestampToDate() {
|
|
2288
|
-
return (/* binding */_timestampToDate
|
|
2289
|
-
);
|
|
2290
|
-
}
|
|
2291
|
-
/* harmony export */
|
|
2292
|
-
});
|
|
2293
|
-
/**
|
|
2294
|
-
* The check string contains only hours, minutes, and seconds
|
|
2295
|
-
* @returns {Boolean}
|
|
2296
|
-
*/
|
|
2297
|
-
function _isTimeString(str) {
|
|
2298
|
-
// match "HH:mm:ss"
|
|
2299
|
-
var timePattern = /^([01]\d|2[0-3]):([0-5]\d):([0-5]\d)$/;
|
|
2300
|
-
return timePattern.test(str);
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
/**
|
|
2304
|
-
* Get now
|
|
2305
|
-
* @returns {Date} // Wed Apr 17 2024 14:31:36 GMT+0800 (China Standard Time)
|
|
2306
|
-
*/
|
|
2307
|
-
var _getNow = function getNow() {
|
|
2308
|
-
return new Date(Date.now());
|
|
2309
|
-
};
|
|
2310
|
-
|
|
2311
|
-
/**
|
|
2312
|
-
* Zero Padding
|
|
2313
|
-
* @param {Number} num
|
|
2314
|
-
* @param {Boolean} padZeroEnabled
|
|
2315
|
-
* @returns {String} '01', '05', '12'
|
|
2316
|
-
*/
|
|
2317
|
-
var _padZero = function padZero(num) {
|
|
2318
|
-
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2319
|
-
if (padZeroEnabled) {
|
|
2320
|
-
return num < 10 ? '0' + num : num.toString();
|
|
2321
|
-
} else {
|
|
2322
|
-
return num.toString();
|
|
2323
|
-
}
|
|
2324
|
-
};
|
|
2325
|
-
|
|
2326
|
-
/**
|
|
2327
|
-
* Hours validation
|
|
2328
|
-
* @param {*} v
|
|
2329
|
-
* @returns {Boolean}
|
|
2330
|
-
*/
|
|
2331
|
-
var _isValidHours = function isValidHours(v) {
|
|
2332
|
-
return /^([01]?[0-9]|2[0-3])$/.test(v); // 0~23, 00~23
|
|
2333
|
-
};
|
|
2334
|
-
|
|
2335
|
-
/**
|
|
2336
|
-
* Minutes and Seconds validation
|
|
2337
|
-
* @param {*} v
|
|
2338
|
-
* @returns {Boolean}
|
|
2339
|
-
*/
|
|
2340
|
-
var _isValidMinutesAndSeconds = function isValidMinutesAndSeconds(v) {
|
|
2341
|
-
return /^([01]?[0-9]|[0-5][0-9])$/.test(v); // 0~59, 00~59
|
|
2342
|
-
};
|
|
2343
|
-
|
|
2344
|
-
/**
|
|
2345
|
-
* Year validation
|
|
2346
|
-
* @param {*} v
|
|
2347
|
-
* @returns {Boolean}
|
|
2348
|
-
*/
|
|
2349
|
-
var _isValidYear = function isValidYear(v) {
|
|
2350
|
-
return /^([1-9][0-9])\d{2}$/.test(v); // 1000 ~ 9999
|
|
2351
|
-
};
|
|
2352
|
-
|
|
2353
|
-
/**
|
|
2354
|
-
* Month validation
|
|
2355
|
-
* @param {*} v
|
|
2356
|
-
* @returns {Boolean}
|
|
2357
|
-
*/
|
|
2358
|
-
var _isValidMonth = function isValidMonth(v) {
|
|
2359
|
-
return /^(0?[1-9]|1[0-2])$/.test(v); // 01~12, 1~12
|
|
2360
|
-
};
|
|
2361
|
-
|
|
2362
|
-
/**
|
|
2363
|
-
* Day validation
|
|
2364
|
-
* @param {*} v
|
|
2365
|
-
* @returns {Boolean}
|
|
2366
|
-
*/
|
|
2367
|
-
var _isValidDay = function isValidDay(v) {
|
|
2368
|
-
return /^(0?[1-9]|[1-2][0-9]|3[0-1])$/.test(v); // 01~31, 1~31
|
|
2369
|
-
};
|
|
2370
|
-
|
|
2371
|
-
/**
|
|
2372
|
-
* Check if the string is legitimate
|
|
2373
|
-
* @param {String} v
|
|
2374
|
-
* @returns {Boolean}
|
|
2375
|
-
*/
|
|
2376
|
-
var _isValidDate = function isValidDate(v) {
|
|
2377
|
-
return !(String(new Date(v)).toLowerCase() === 'invalid date');
|
|
2378
|
-
};
|
|
2379
|
-
|
|
2380
|
-
/**
|
|
2381
|
-
* Get calendar date
|
|
2382
|
-
* @param {Date | String} v
|
|
2383
|
-
* @returns {Date | String} yyyy-MM-dd
|
|
2384
|
-
*/
|
|
2385
|
-
function _dateFormat(v) {
|
|
2386
|
-
var date = typeof v === 'string' ? new Date(v.replace(/-/g, "/")) : v; // fix "Invalid date in safari"
|
|
2387
|
-
return date;
|
|
2388
|
-
}
|
|
2389
|
-
|
|
2390
|
-
/**
|
|
2391
|
-
* Get date details
|
|
2392
|
-
* @param {Date | String} v
|
|
2393
|
-
* @param {Boolean} padZeroEnabled
|
|
2394
|
-
* @typedef {Object} JSON
|
|
2395
|
-
*/
|
|
2396
|
-
function _getDateDetails(v) {
|
|
2397
|
-
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2398
|
-
var date = _dateFormat(v);
|
|
2399
|
-
var year = date.getFullYear();
|
|
2400
|
-
var month = _padZero(date.getMonth() + 1, padZeroEnabled);
|
|
2401
|
-
var day = _padZero(date.getDate(), padZeroEnabled);
|
|
2402
|
-
var hours = _padZero(date.getHours(), padZeroEnabled);
|
|
2403
|
-
var minutes = _padZero(date.getMinutes(), padZeroEnabled);
|
|
2404
|
-
var seconds = _padZero(date.getSeconds(), padZeroEnabled);
|
|
2405
|
-
return {
|
|
2406
|
-
year: String(year),
|
|
2407
|
-
month: month,
|
|
2408
|
-
day: day,
|
|
2409
|
-
hours: hours,
|
|
2410
|
-
minutes: minutes,
|
|
2411
|
-
seconds: seconds
|
|
2412
|
-
};
|
|
2413
|
-
}
|
|
2414
|
-
|
|
2415
|
-
/**
|
|
2416
|
-
* Get calendar date
|
|
2417
|
-
* @param {Date | String} v
|
|
2418
|
-
* @param {Boolean} padZeroEnabled
|
|
2419
|
-
* @returns {String} yyyy-MM-dd
|
|
2420
|
-
*/
|
|
2421
|
-
function _getCalendarDate(v) {
|
|
2422
|
-
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2423
|
-
var date = _dateFormat(v);
|
|
2424
|
-
var year = date.getFullYear();
|
|
2425
|
-
var month = _padZero(date.getMonth() + 1, padZeroEnabled);
|
|
2426
|
-
var day = _padZero(date.getDate(), padZeroEnabled);
|
|
2427
|
-
var hours = _padZero(date.getHours(), padZeroEnabled);
|
|
2428
|
-
var minutes = _padZero(date.getMinutes(), padZeroEnabled);
|
|
2429
|
-
var seconds = _padZero(date.getSeconds(), padZeroEnabled);
|
|
2430
|
-
var res = "".concat(year, "-").concat(month, "-").concat(day);
|
|
2431
|
-
return res;
|
|
2432
|
-
}
|
|
2433
|
-
|
|
2434
|
-
/**
|
|
2435
|
-
* Get today date
|
|
2436
|
-
* @returns {String} yyyy-MM-dd
|
|
2437
|
-
*/
|
|
2438
|
-
function _getTodayDate() {
|
|
2439
|
-
return _getCalendarDate(new Date());
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
/**
|
|
2443
|
-
* Get tomorrow date
|
|
2444
|
-
* @param {Date | String} v
|
|
2445
|
-
* @returns {String} yyyy-MM-dd
|
|
2446
|
-
*/
|
|
2447
|
-
function _getTomorrowDate(v) {
|
|
2448
|
-
var today = _dateFormat(v);
|
|
2449
|
-
var _tomorrow = today;
|
|
2450
|
-
_tomorrow.setDate(_tomorrow.getDate() + 1);
|
|
2451
|
-
var tomorrow = _getCalendarDate(_tomorrow);
|
|
2452
|
-
return tomorrow;
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
/**
|
|
2456
|
-
* Get yesterday date
|
|
2457
|
-
* @param {Date | String} v
|
|
2458
|
-
* @returns {String} yyyy-MM-dd
|
|
2459
|
-
*/
|
|
2460
|
-
function _getYesterdayDate(v) {
|
|
2461
|
-
var today = _dateFormat(v);
|
|
2462
|
-
var _yesterday = today;
|
|
2463
|
-
_yesterday.setDate(_yesterday.getDate() - 1);
|
|
2464
|
-
var yesterday = _getCalendarDate(_yesterday);
|
|
2465
|
-
return yesterday;
|
|
2466
|
-
}
|
|
2467
|
-
|
|
2468
|
-
/**
|
|
2469
|
-
* Get specified date
|
|
2470
|
-
* @param {Date | String} v
|
|
2471
|
-
* @param {Number} days The number of days forward or backward, which can be a negative number
|
|
2472
|
-
* @returns {String} yyyy-MM-dd
|
|
2473
|
-
*/
|
|
2474
|
-
/* console.log(getSpecifiedDate(getTodayDate(), -180)); // 2023-08-27 (180 days before February 23, 202) */
|
|
2475
|
-
function _getSpecifiedDate(v, days) {
|
|
2476
|
-
var today = _dateFormat(v);
|
|
2477
|
-
var _specifiedDay = today;
|
|
2478
|
-
_specifiedDay.setDate(_specifiedDay.getDate() + days);
|
|
2479
|
-
var specifiedDay = _getCalendarDate(_specifiedDay);
|
|
2480
|
-
return specifiedDay;
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
|
-
/**
|
|
2484
|
-
* Calculates the total number of days from today going back a specified number of months.
|
|
2485
|
-
*
|
|
2486
|
-
* @param {number} monthsAgo - The number of months to go back (e.g., 3 means the past 3 months).
|
|
2487
|
-
* @returns {number} The total number of days between the calculated past date and today.
|
|
2488
|
-
*
|
|
2489
|
-
* @example
|
|
2490
|
-
* getDaysInLastMonths(3); // Returns number of days in the past 3 months
|
|
2491
|
-
*/
|
|
2492
|
-
function _getDaysInLastMonths() {
|
|
2493
|
-
var monthsAgo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3;
|
|
2494
|
-
var today = new Date();
|
|
2495
|
-
var pastDate = new Date();
|
|
2496
|
-
pastDate.setMonth(today.getMonth() - monthsAgo);
|
|
2497
|
-
var diffInMs = today.getTime() - pastDate.getTime();
|
|
2498
|
-
var diffInDays = Math.round(diffInMs / (1000 * 60 * 60 * 24));
|
|
2499
|
-
return diffInDays;
|
|
2500
|
-
}
|
|
2501
|
-
|
|
2502
|
-
/**
|
|
2503
|
-
* Get next month date
|
|
2504
|
-
* @param {Date | String} v
|
|
2505
|
-
* @returns {String} yyyy-MM-dd
|
|
2506
|
-
*/
|
|
2507
|
-
function _getNextMonthDate(v) {
|
|
2508
|
-
var today = _dateFormat(v);
|
|
2509
|
-
today.setMonth(today.getMonth() + 1);
|
|
2510
|
-
return _getCalendarDate(today);
|
|
2511
|
-
}
|
|
2512
|
-
|
|
2513
|
-
/**
|
|
2514
|
-
* Get previous month date
|
|
2515
|
-
* @param {Date | String} v
|
|
2516
|
-
* @returns {String} yyyy-MM-dd
|
|
2517
|
-
*/
|
|
2518
|
-
function _getPrevMonthDate(v) {
|
|
2519
|
-
var today = _dateFormat(v);
|
|
2520
|
-
today.setMonth(today.getMonth() - 1);
|
|
2521
|
-
return _getCalendarDate(today);
|
|
2522
|
-
}
|
|
2523
|
-
|
|
2524
|
-
/**
|
|
2525
|
-
* Get next year date
|
|
2526
|
-
* @param {Date | String} v
|
|
2527
|
-
* @returns {String} yyyy-MM-dd
|
|
2528
|
-
*/
|
|
2529
|
-
function _getNextYearDate(v) {
|
|
2530
|
-
var today = _dateFormat(v);
|
|
2531
|
-
var current = new Date(today);
|
|
2532
|
-
current.setFullYear(current.getFullYear() + 1);
|
|
2533
|
-
return _getCalendarDate(current);
|
|
2534
|
-
}
|
|
2535
|
-
|
|
2536
|
-
/**
|
|
2537
|
-
* Get previous year date
|
|
2538
|
-
* @param {Date | String} v
|
|
2539
|
-
* @returns {String} yyyy-MM-dd
|
|
2540
|
-
*/
|
|
2541
|
-
function _getPrevYearDate(v) {
|
|
2542
|
-
var today = _dateFormat(v);
|
|
2543
|
-
var current = new Date(today);
|
|
2544
|
-
current.setFullYear(current.getFullYear() - 1);
|
|
2545
|
-
return _getCalendarDate(current);
|
|
2546
|
-
}
|
|
2547
|
-
|
|
2548
|
-
/**
|
|
2549
|
-
* Get last day in month
|
|
2550
|
-
* @param {Date | String} v
|
|
2551
|
-
* @param {?Number} targetMonth
|
|
2552
|
-
* @returns {String | Number} yyyy-MM-dd
|
|
2553
|
-
*/
|
|
2554
|
-
/*
|
|
2555
|
-
Example: Get last day in next month
|
|
2556
|
-
|
|
2557
|
-
const _day = '2024-01-01';
|
|
2558
|
-
const y = new Date(getNextMonthDate(_day)).getFullYear();
|
|
2559
|
-
const m = String(new Date(getNextMonthDate(_day)).getMonth() + 1).padStart(2, '0');
|
|
2560
|
-
const d = getLastDayInMonth(getNextMonthDate(_day), new Date(getNextMonthDate(_day)).getMonth() + 1);
|
|
2561
|
-
|
|
2562
|
-
const lastDayOfNextMonth = `${y}-${m}-${d}`; // 2024-02-29
|
|
2563
|
-
|
|
2564
|
-
*/
|
|
2565
|
-
function _getLastDayInMonth(v) {
|
|
2566
|
-
var targetMonth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
2567
|
-
var date = _dateFormat(v);
|
|
2568
|
-
return new Date(date.getFullYear(), typeof targetMonth !== 'undefined' ? targetMonth : date.getMonth() - 1, 0).getDate();
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
|
-
/**
|
|
2572
|
-
* Get current year
|
|
2573
|
-
* @returns {Number}
|
|
2574
|
-
*/
|
|
2575
|
-
function _getCurrentYear() {
|
|
2576
|
-
return new Date().getFullYear();
|
|
2577
|
-
}
|
|
2578
|
-
|
|
2579
|
-
/**
|
|
2580
|
-
* Get current month
|
|
2581
|
-
* @param {Boolean} padZeroEnabled
|
|
2582
|
-
* @returns {Number|String}
|
|
2583
|
-
*/
|
|
2584
|
-
function _getCurrentMonth() {
|
|
2585
|
-
var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
2586
|
-
var m = new Date().getMonth() + 1;
|
|
2587
|
-
return padZeroEnabled ? String(m).padStart(2, '0') : m;
|
|
2588
|
-
}
|
|
2589
|
-
|
|
2590
|
-
/**
|
|
2591
|
-
* Get current day
|
|
2592
|
-
* @param {Boolean} padZeroEnabled
|
|
2593
|
-
* @returns {Number|String}
|
|
2594
|
-
*/
|
|
2595
|
-
function _getCurrentDay() {
|
|
2596
|
-
var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
2597
|
-
var d = new Date().getDate();
|
|
2598
|
-
return padZeroEnabled ? String(d).padStart(2, '0') : d;
|
|
2599
|
-
}
|
|
2600
|
-
|
|
2601
|
-
/**
|
|
2602
|
-
* Get first and last month day
|
|
2603
|
-
* @param {Number} v
|
|
2604
|
-
* @param {Boolean} padZeroEnabled
|
|
2605
|
-
* @returns {Array}
|
|
2606
|
-
*/
|
|
2607
|
-
function _getFirstAndLastMonthDay(year) {
|
|
2608
|
-
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2609
|
-
var theFirst = new Date(year, 0, 1).getDate();
|
|
2610
|
-
var theLast = new Date(year, 11, 31).getDate();
|
|
2611
|
-
var padZero = function padZero(num) {
|
|
2612
|
-
if (padZeroEnabled) {
|
|
2613
|
-
return num < 10 ? '0' + num : num.toString();
|
|
2614
|
-
} else {
|
|
2615
|
-
return num.toString();
|
|
2616
|
-
}
|
|
2617
|
-
};
|
|
2618
|
-
return [padZero(theFirst), padZero(theLast)];
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2621
|
-
/**
|
|
2622
|
-
* Get current date
|
|
2623
|
-
* @param {Boolean} padZeroEnabled
|
|
2624
|
-
* @typedef {String} JSON
|
|
2625
|
-
*/
|
|
2626
|
-
function _getCurrentDate() {
|
|
2627
|
-
var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
2628
|
-
var date = new Date();
|
|
2629
|
-
var padZero = function padZero(num) {
|
|
2630
|
-
if (padZeroEnabled) {
|
|
2631
|
-
return num < 10 ? '0' + num : num.toString();
|
|
2632
|
-
} else {
|
|
2633
|
-
return num.toString();
|
|
2634
|
-
}
|
|
2635
|
-
};
|
|
2636
|
-
var year = date.getFullYear();
|
|
2637
|
-
var month = padZero(date.getMonth() + 1);
|
|
2638
|
-
var day = padZero(date.getDate());
|
|
2639
|
-
var hours = padZero(date.getHours());
|
|
2640
|
-
var minutes = padZero(date.getMinutes());
|
|
2641
|
-
return {
|
|
2642
|
-
today: "".concat(year, "-").concat(month, "-").concat(day),
|
|
2643
|
-
yearStart: "".concat(year, "-01-01"),
|
|
2644
|
-
yearEnd: "".concat(year, "-12-").concat(_getLastDayInMonth(date, 12))
|
|
2645
|
-
};
|
|
2646
|
-
}
|
|
2647
|
-
|
|
2648
|
-
/**
|
|
2649
|
-
* Get full time
|
|
2650
|
-
* @param {Date | String} v
|
|
2651
|
-
* @param {Boolean} padZeroEnabled
|
|
2652
|
-
* @param {Boolean} hasSeconds
|
|
2653
|
-
* @returns {String} yyyy-MM-dd HH:mm:ss
|
|
2654
|
-
*/
|
|
2655
|
-
function _getFullTime(v) {
|
|
2656
|
-
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2657
|
-
var hasSeconds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
2658
|
-
var date = _dateFormat(v);
|
|
2659
|
-
var padZero = function padZero(num) {
|
|
2660
|
-
if (padZeroEnabled) {
|
|
2661
|
-
return num < 10 ? '0' + num : num.toString();
|
|
2662
|
-
} else {
|
|
2663
|
-
return num.toString();
|
|
2664
|
-
}
|
|
2665
|
-
};
|
|
2666
|
-
var year = date.getFullYear();
|
|
2667
|
-
var month = padZero(date.getMonth() + 1);
|
|
2668
|
-
var day = padZero(date.getDate());
|
|
2669
|
-
var hours = padZero(date.getHours());
|
|
2670
|
-
var minutes = padZero(date.getMinutes());
|
|
2671
|
-
var seconds = padZero(date.getSeconds());
|
|
2672
|
-
var res = "".concat(year, "-").concat(month, "-").concat(day, " ").concat(hours, ":").concat(minutes, ":").concat(seconds);
|
|
2673
|
-
var res2 = "".concat(year, "-").concat(month, "-").concat(day, " ").concat(hours, ":").concat(minutes);
|
|
2674
|
-
return hasSeconds ? res : res2;
|
|
2675
|
-
}
|
|
2676
|
-
|
|
2677
|
-
/**
|
|
2678
|
-
* Add hours
|
|
2679
|
-
* @param {Date | String} v
|
|
2680
|
-
* @param {Number} offset
|
|
2681
|
-
* @param {Boolean} padZeroEnabled
|
|
2682
|
-
* @returns {String} yyyy-MM-dd HH:mm:ss
|
|
2683
|
-
*/
|
|
2684
|
-
function _setDateHours(v, offset) {
|
|
2685
|
-
var padZeroEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
2686
|
-
var date = _dateFormat(v);
|
|
2687
|
-
var _cur = new Date(date).setTime(new Date(date).getTime() + offset * 60 * 60 * 1000);
|
|
2688
|
-
return _getFullTime(new Date(_cur), padZeroEnabled);
|
|
2689
|
-
}
|
|
2690
|
-
|
|
2691
|
-
/**
|
|
2692
|
-
* Add minutes
|
|
2693
|
-
* @param {Date | String} v
|
|
2694
|
-
* @param {Number} offset
|
|
2695
|
-
* @param {Boolean} padZeroEnabled
|
|
2696
|
-
* @returns {String} yyyy-MM-dd HH:mm:ss
|
|
2697
|
-
*/
|
|
2698
|
-
function _setDateMinutes(v, offset) {
|
|
2699
|
-
var padZeroEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
2700
|
-
var date = _dateFormat(v);
|
|
2701
|
-
var _cur = new Date(date).setTime(new Date(date).getTime() + offset * 60 * 1000);
|
|
2702
|
-
return _getFullTime(new Date(_cur), padZeroEnabled);
|
|
2703
|
-
}
|
|
2704
|
-
/**
|
|
2705
|
-
* Add days
|
|
2706
|
-
* @param {Date | String} v
|
|
2707
|
-
* @param {Number} offset
|
|
2708
|
-
* @param {Boolean} padZeroEnabled
|
|
2709
|
-
* @returns {String} yyyy-MM-dd HH:mm:ss
|
|
2710
|
-
*/
|
|
2711
|
-
function _setDateDays(v, offset) {
|
|
2712
|
-
var padZeroEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
2713
|
-
var date = _dateFormat(v);
|
|
2714
|
-
var _cur = new Date(date).setTime(new Date(date).getTime() + offset * 24 * 60 * 60 * 1000);
|
|
2715
|
-
return _getFullTime(new Date(_cur), padZeroEnabled);
|
|
2716
|
-
}
|
|
2717
|
-
|
|
2718
|
-
/**
|
|
2719
|
-
* Convert timestamp to date
|
|
2720
|
-
* @param {Number} v
|
|
2721
|
-
* @param {Boolean} padZeroEnabled
|
|
2722
|
-
* @returns {String} yyyy-MM-dd HH:mm:ss
|
|
2723
|
-
*/
|
|
2724
|
-
function _timestampToDate(v) {
|
|
2725
|
-
var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2726
|
-
return _getFullTime(new Date(v), padZeroEnabled);
|
|
2727
|
-
}
|
|
2728
|
-
|
|
2729
|
-
/**
|
|
2730
|
-
* Get the date of the specified month
|
|
2731
|
-
* @param {Number} year
|
|
2732
|
-
* @param {Number} month
|
|
2733
|
-
* @returns {Array<string>}
|
|
2734
|
-
*/
|
|
2735
|
-
function _getMonthDates(year, month) {
|
|
2736
|
-
var dates = [];
|
|
2737
|
-
|
|
2738
|
-
// Get the total number of days in the month
|
|
2739
|
-
var daysInMonth = new Date(year, month, 0).getDate();
|
|
2740
|
-
for (var day = 1; day <= daysInMonth; day++) {
|
|
2741
|
-
dates.push("".concat(year, "-").concat(String(month).padStart(2, '0'), "-").concat(String(day).padStart(2, '0'))); // 'YYYY-MM-DD'
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
|
-
return dates;
|
|
2745
|
-
}
|
|
2746
|
-
|
|
2747
|
-
/**
|
|
2748
|
-
* Get the date of the specified week (From Sunday)
|
|
2749
|
-
* @param {Number} weekOffset
|
|
2750
|
-
* @returns {Array<Date>}
|
|
2751
|
-
*/
|
|
2752
|
-
function _getWeekDatesFromSun(weekOffset) {
|
|
2753
|
-
var dates = [];
|
|
2754
|
-
var currentDate = new Date();
|
|
2755
|
-
|
|
2756
|
-
// Calculate the date of Sunday
|
|
2757
|
-
var dayOfWeek = currentDate.getDay(); // 0 is Sunday
|
|
2758
|
-
currentDate.setDate(currentDate.getDate() - dayOfWeek + weekOffset * 7);
|
|
2759
|
-
|
|
2760
|
-
// Get the date of the week
|
|
2761
|
-
for (var i = 0; i < 7; i++) {
|
|
2762
|
-
var date = new Date(currentDate);
|
|
2763
|
-
date.setDate(currentDate.getDate() + i);
|
|
2764
|
-
dates.push(date);
|
|
2765
|
-
}
|
|
2766
|
-
return dates;
|
|
2767
|
-
}
|
|
2768
|
-
|
|
2769
|
-
/**
|
|
2770
|
-
* Get the date of the specified week (From Monday)
|
|
2771
|
-
* @param {Number} weekOffset
|
|
2772
|
-
* @returns {Array<Date>}
|
|
2773
|
-
*/
|
|
2774
|
-
function _getWeekDatesFromMon(weekOffset) {
|
|
2775
|
-
var dates = [];
|
|
2776
|
-
var currentDate = new Date();
|
|
2777
|
-
|
|
2778
|
-
// Set the date to Monday
|
|
2779
|
-
var dayOfWeek = currentDate.getDay();
|
|
2780
|
-
var diffToMonday = dayOfWeek === 0 ? -6 : 1 - dayOfWeek;
|
|
2781
|
-
currentDate.setDate(currentDate.getDate() + diffToMonday + weekOffset * 7);
|
|
2782
|
-
|
|
2783
|
-
// Get the date of the week
|
|
2784
|
-
for (var i = 0; i < 7; i++) {
|
|
2785
|
-
var date = new Date(currentDate);
|
|
2786
|
-
date.setDate(currentDate.getDate() + i);
|
|
2787
|
-
dates.push(date);
|
|
2788
|
-
}
|
|
2789
|
-
return dates;
|
|
2790
|
-
}
|
|
2791
|
-
|
|
2792
|
-
/******/
|
|
2793
|
-
return __webpack_exports__;
|
|
2794
|
-
/******/
|
|
2795
|
-
}()
|
|
2796
|
-
);
|
|
2797
|
-
});
|
|
2798
|
-
|
|
2799
|
-
/***/ }),
|
|
2800
|
-
|
|
2801
|
-
/***/ 787:
|
|
2802
|
-
/***/ ((module) => {
|
|
2803
|
-
|
|
2804
|
-
"use strict";
|
|
2805
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
2806
|
-
|
|
2807
|
-
/***/ }),
|
|
2808
|
-
|
|
2809
|
-
/***/ 156:
|
|
2810
|
-
/***/ ((module) => {
|
|
2811
|
-
|
|
2812
|
-
"use strict";
|
|
2813
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
|
|
2814
|
-
|
|
2815
|
-
/***/ })
|
|
2816
|
-
|
|
2817
|
-
/******/ });
|
|
2818
|
-
/************************************************************************/
|
|
2819
|
-
/******/ // The module cache
|
|
2820
|
-
/******/ var __webpack_module_cache__ = {};
|
|
2821
|
-
/******/
|
|
2822
|
-
/******/ // The require function
|
|
2823
|
-
/******/ function __webpack_require__(moduleId) {
|
|
2824
|
-
/******/ // Check if module is in cache
|
|
2825
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
2826
|
-
/******/ if (cachedModule !== undefined) {
|
|
2827
|
-
/******/ return cachedModule.exports;
|
|
2828
|
-
/******/ }
|
|
2829
|
-
/******/ // Create a new module (and put it into the cache)
|
|
2830
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
2831
|
-
/******/ id: moduleId,
|
|
2832
|
-
/******/ loaded: false,
|
|
2833
|
-
/******/ exports: {}
|
|
2834
|
-
/******/ };
|
|
2835
|
-
/******/
|
|
2836
|
-
/******/ // Execute the module function
|
|
2837
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
2838
|
-
/******/
|
|
2839
|
-
/******/ // Flag the module as loaded
|
|
2840
|
-
/******/ module.loaded = true;
|
|
2841
|
-
/******/
|
|
2842
|
-
/******/ // Return the exports of the module
|
|
2843
|
-
/******/ return module.exports;
|
|
2844
|
-
/******/ }
|
|
2845
|
-
/******/
|
|
2846
|
-
/************************************************************************/
|
|
2847
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
2848
|
-
/******/ (() => {
|
|
2849
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
2850
|
-
/******/ __webpack_require__.n = (module) => {
|
|
2851
|
-
/******/ var getter = module && module.__esModule ?
|
|
2852
|
-
/******/ () => (module['default']) :
|
|
2853
|
-
/******/ () => (module);
|
|
2854
|
-
/******/ __webpack_require__.d(getter, { a: getter });
|
|
2855
|
-
/******/ return getter;
|
|
2856
|
-
/******/ };
|
|
2857
|
-
/******/ })();
|
|
2858
|
-
/******/
|
|
2859
|
-
/******/ /* webpack/runtime/define property getters */
|
|
2860
|
-
/******/ (() => {
|
|
2861
|
-
/******/ // define getter functions for harmony exports
|
|
2862
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
2863
|
-
/******/ for(var key in definition) {
|
|
2864
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
2865
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
2866
|
-
/******/ }
|
|
2867
|
-
/******/ }
|
|
2868
|
-
/******/ };
|
|
2869
|
-
/******/ })();
|
|
2870
|
-
/******/
|
|
2871
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2872
|
-
/******/ (() => {
|
|
2873
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2874
|
-
/******/ })();
|
|
2875
|
-
/******/
|
|
2876
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
2877
|
-
/******/ (() => {
|
|
2878
|
-
/******/ // define __esModule on exports
|
|
2879
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
2880
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2881
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2882
|
-
/******/ }
|
|
2883
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
2884
|
-
/******/ };
|
|
2885
|
-
/******/ })();
|
|
2886
|
-
/******/
|
|
2887
|
-
/******/ /* webpack/runtime/node module decorator */
|
|
2888
|
-
/******/ (() => {
|
|
2889
|
-
/******/ __webpack_require__.nmd = (module) => {
|
|
2890
|
-
/******/ module.paths = [];
|
|
2891
|
-
/******/ if (!module.children) module.children = [];
|
|
2892
|
-
/******/ return module;
|
|
2893
|
-
/******/ };
|
|
2894
|
-
/******/ })();
|
|
2895
|
-
/******/
|
|
2896
|
-
/************************************************************************/
|
|
2897
|
-
var __webpack_exports__ = {};
|
|
2898
|
-
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
2899
|
-
(() => {
|
|
2900
|
-
"use strict";
|
|
2901
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2902
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2903
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2904
|
-
/* harmony export */ });
|
|
2905
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(787);
|
|
2906
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2907
|
-
/* harmony import */ var funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(322);
|
|
2908
|
-
/* harmony import */ var funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__);
|
|
2909
|
-
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(188);
|
|
2910
|
-
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__);
|
|
2911
|
-
/* harmony import */ var funda_modaldialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(483);
|
|
2912
|
-
/* harmony import */ var funda_modaldialog__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(funda_modaldialog__WEBPACK_IMPORTED_MODULE_3__);
|
|
2913
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2914
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
2915
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2916
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
2917
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2918
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2919
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2920
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
2921
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
2922
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2923
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2924
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
2925
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
2926
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2927
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2928
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
2929
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
2930
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
2931
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
var EventCalendar = function EventCalendar(props) {
|
|
2937
|
-
var contentRef = props.contentRef,
|
|
2938
|
-
calendarWrapperClassName = props.calendarWrapperClassName,
|
|
2939
|
-
customTodayDate = props.customTodayDate,
|
|
2940
|
-
eventsValue = props.eventsValue,
|
|
2941
|
-
langWeek = props.langWeek,
|
|
2942
|
-
langWeekFull = props.langWeekFull,
|
|
2943
|
-
langMonths = props.langMonths,
|
|
2944
|
-
langMonthsFull = props.langMonthsFull,
|
|
2945
|
-
langToday = props.langToday,
|
|
2946
|
-
onChangeDate = props.onChangeDate,
|
|
2947
|
-
onChangeMonth = props.onChangeMonth,
|
|
2948
|
-
onChangeYear = props.onChangeYear,
|
|
2949
|
-
onChangeToday = props.onChangeToday,
|
|
2950
|
-
onListRenderComplete = props.onListRenderComplete,
|
|
2951
|
-
iconRemove = props.iconRemove,
|
|
2952
|
-
iconAdd = props.iconAdd,
|
|
2953
|
-
cellCloseBtnClassName = props.cellCloseBtnClassName,
|
|
2954
|
-
cellCloseBtnLabel = props.cellCloseBtnLabel,
|
|
2955
|
-
cellAddBtnClassName = props.cellAddBtnClassName,
|
|
2956
|
-
cellAddBtnLabel = props.cellAddBtnLabel,
|
|
2957
|
-
modalMaskOpacity = props.modalMaskOpacity,
|
|
2958
|
-
modalMaxWidth = props.modalMaxWidth,
|
|
2959
|
-
modalMinHeight = props.modalMinHeight,
|
|
2960
|
-
modalHeading = props.modalHeading,
|
|
2961
|
-
modalContent = props.modalContent,
|
|
2962
|
-
modalDeleteContent = props.modalDeleteContent,
|
|
2963
|
-
modalCloseBtnClassName = props.modalCloseBtnClassName,
|
|
2964
|
-
modalCloseBtnLabel = props.modalCloseBtnLabel,
|
|
2965
|
-
modalSubmitBtnClassName = props.modalSubmitBtnClassName,
|
|
2966
|
-
modalSubmitBtnLabel = props.modalSubmitBtnLabel,
|
|
2967
|
-
modalSubmitDeleteBtnClassName = props.modalSubmitDeleteBtnClassName,
|
|
2968
|
-
modalSubmitDeleteBtnLabel = props.modalSubmitDeleteBtnLabel,
|
|
2969
|
-
onModalEditOpen = props.onModalEditOpen,
|
|
2970
|
-
onModalEditClose = props.onModalEditClose,
|
|
2971
|
-
onModalDeleteOpen = props.onModalDeleteOpen,
|
|
2972
|
-
onModalDeleteClose = props.onModalDeleteClose,
|
|
2973
|
-
onModalEditEvent = props.onModalEditEvent,
|
|
2974
|
-
onModalDeleteEvent = props.onModalDeleteEvent,
|
|
2975
|
-
onCellMouseEnter = props.onCellMouseEnter,
|
|
2976
|
-
onCellMouseLeave = props.onCellMouseLeave,
|
|
2977
|
-
onCellClick = props.onCellClick,
|
|
2978
|
-
onCellDoubleClick = props.onCellDoubleClick,
|
|
2979
|
-
onCellMouseUp = props.onCellMouseUp,
|
|
2980
|
-
onKeyPressed = props.onKeyPressed;
|
|
2981
|
-
var DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
2982
|
-
var DAYS_LEAP = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
2983
|
-
var WEEK = langWeek || ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN'];
|
|
2984
|
-
var WEEK_FULL = langWeekFull || ['MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY'];
|
|
2985
|
-
var MONTHS = langMonths || ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'];
|
|
2986
|
-
var MONTHS_FULL = langMonthsFull || ['January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
2987
|
-
var START_WEEK_ON = 1; // represents "Monday/1" in JavaScript
|
|
2988
|
-
|
|
2989
|
-
// orginal data
|
|
2990
|
-
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
|
2991
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
2992
|
-
orginalData = _useState2[0],
|
|
2993
|
-
setOrginalData = _useState2[1];
|
|
2994
|
-
var now = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
2995
|
-
return new Date();
|
|
2996
|
-
}, []);
|
|
2997
|
-
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(now),
|
|
2998
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
2999
|
-
date = _useState4[0],
|
|
3000
|
-
setDate = _useState4[1];
|
|
3001
|
-
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(date.getDate()),
|
|
3002
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
3003
|
-
day = _useState6[0],
|
|
3004
|
-
setDay = _useState6[1];
|
|
3005
|
-
var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(date.getMonth()),
|
|
3006
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
3007
|
-
month = _useState8[0],
|
|
3008
|
-
setMonth = _useState8[1];
|
|
3009
|
-
var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(date.getFullYear()),
|
|
3010
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
3011
|
-
year = _useState10[0],
|
|
3012
|
-
setYear = _useState10[1];
|
|
3013
|
-
var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(getStartDayOfMonth(date)),
|
|
3014
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
3015
|
-
startDay = _useState12[0],
|
|
3016
|
-
setStartDay = _useState12[1];
|
|
3017
|
-
|
|
3018
|
-
// selection tab
|
|
3019
|
-
// gets the today date time object
|
|
3020
|
-
var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(now.getMonth()),
|
|
3021
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
3022
|
-
selectedMonth = _useState14[0],
|
|
3023
|
-
setSelectedMonth = _useState14[1];
|
|
3024
|
-
var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(now.getFullYear()),
|
|
3025
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
3026
|
-
selectedYear = _useState16[0],
|
|
3027
|
-
setSelectedYear = _useState16[1];
|
|
3028
|
-
var _useState17 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
|
3029
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
3030
|
-
yearsArray = _useState18[0],
|
|
3031
|
-
setYearsCollection = _useState18[1];
|
|
3032
|
-
|
|
3033
|
-
//
|
|
3034
|
-
var _useState19 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
3035
|
-
_useState20 = _slicedToArray(_useState19, 2),
|
|
3036
|
-
winYear = _useState20[0],
|
|
3037
|
-
setWinYear = _useState20[1];
|
|
3038
|
-
var _useState21 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
3039
|
-
_useState22 = _slicedToArray(_useState21, 2),
|
|
3040
|
-
winMonth = _useState22[0],
|
|
3041
|
-
setWinMonth = _useState22[1];
|
|
3042
|
-
|
|
3043
|
-
// modal dialog
|
|
3044
|
-
var modalEditHandleRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
3045
|
-
var modalDeleteHandleRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
3046
|
-
var EVENTS_ENABLED = typeof modalContent !== 'undefined';
|
|
3047
|
-
var EVENTS_DELETE_ENABLED = typeof modalDeleteContent !== 'undefined';
|
|
3048
|
-
var _useState23 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
3049
|
-
_useState24 = _slicedToArray(_useState23, 2),
|
|
3050
|
-
showEdit = _useState24[0],
|
|
3051
|
-
setShowEdit = _useState24[1];
|
|
3052
|
-
var _useState25 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
3053
|
-
_useState26 = _slicedToArray(_useState25, 2),
|
|
3054
|
-
showDelete = _useState26[0],
|
|
3055
|
-
setShowDelete = _useState26[1];
|
|
3056
|
-
|
|
3057
|
-
// Open temporary storage for pop-ups
|
|
3058
|
-
var _useState27 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(-1),
|
|
3059
|
-
_useState28 = _slicedToArray(_useState27, 2),
|
|
3060
|
-
tableCellId = _useState28[0],
|
|
3061
|
-
setTableCellId = _useState28[1];
|
|
3062
|
-
var findMondayAndTruncate = function findMondayAndTruncate(dates) {
|
|
3063
|
-
var _res = dates.map(function (s) {
|
|
3064
|
-
return new Date(s);
|
|
3065
|
-
});
|
|
3066
|
-
// Find the first Monday in the sequence
|
|
3067
|
-
for (var i = 0; i < _res.length; i++) {
|
|
3068
|
-
var _date2 = _res[i];
|
|
3069
|
-
if (_date2.getDay() === START_WEEK_ON) {
|
|
3070
|
-
// Return dates starting from Monday onwards
|
|
3071
|
-
return dates.slice(i);
|
|
3072
|
-
}
|
|
3073
|
-
}
|
|
3074
|
-
return []; // Return empty array if no Monday found
|
|
3075
|
-
};
|
|
3076
|
-
|
|
3077
|
-
// exposes the following methods
|
|
3078
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
|
|
3079
|
-
return {
|
|
3080
|
-
today: function today() {
|
|
3081
|
-
handleTodayChange();
|
|
3082
|
-
},
|
|
3083
|
-
next: function next() {
|
|
3084
|
-
handleNextChange();
|
|
3085
|
-
},
|
|
3086
|
-
prev: function prev() {
|
|
3087
|
-
handlePrevChange();
|
|
3088
|
-
},
|
|
3089
|
-
closeModal: function closeModal() {
|
|
3090
|
-
if (modalEditHandleRef.current) modalEditHandleRef.current.close();
|
|
3091
|
-
if (modalDeleteHandleRef.current) modalDeleteHandleRef.current.close();
|
|
3092
|
-
}
|
|
3093
|
-
};
|
|
3094
|
-
}, [contentRef]);
|
|
3095
|
-
|
|
3096
|
-
// helper buttons
|
|
3097
|
-
var _delBtn = function _delBtn() {
|
|
3098
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconRemove ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconRemove) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3099
|
-
width: "20px",
|
|
3100
|
-
height: "20px",
|
|
3101
|
-
viewBox: "0 0 24 24",
|
|
3102
|
-
fill: "none"
|
|
3103
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
3104
|
-
fillRule: "evenodd",
|
|
3105
|
-
clipRule: "evenodd",
|
|
3106
|
-
d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10ZM8 11a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2H8Z",
|
|
3107
|
-
fill: "#000"
|
|
3108
|
-
}))), cellCloseBtnLabel || '');
|
|
3109
|
-
};
|
|
3110
|
-
var _addBtn = function _addBtn() {
|
|
3111
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconAdd ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconAdd) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3112
|
-
width: "20px",
|
|
3113
|
-
height: "20px",
|
|
3114
|
-
viewBox: "0 0 32 32"
|
|
3115
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
|
|
3116
|
-
stroke: "none",
|
|
3117
|
-
strokeWidth: "1",
|
|
3118
|
-
fill: "none",
|
|
3119
|
-
fillRule: "evenodd"
|
|
3120
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
|
|
3121
|
-
transform: "translate(-102.000000, -1037.000000)",
|
|
3122
|
-
fill: "#000000"
|
|
3123
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
3124
|
-
d: "M124,1054 L119,1054 L119,1059 C119,1059.55 118.552,1060 118,1060 C117.448,1060 117,1059.55 117,1059 L117,1054 L112,1054 C111.448,1054 111,1053.55 111,1053 C111,1052.45 111.448,1052 112,1052 L117,1052 L117,1047 C117,1046.45 117.448,1046 118,1046 C118.552,1046 119,1046.45 119,1047 L119,1052 L124,1052 C124.552,1052 125,1052.45 125,1053 C125,1053.55 124.552,1054 124,1054 L124,1054 Z M130,1037 L106,1037 C103.791,1037 102,1038.79 102,1041 L102,1065 C102,1067.21 103.791,1069 106,1069 L130,1069 C132.209,1069 134,1067.21 134,1065 L134,1041 C134,1038.79 132.209,1037 130,1037 L130,1037 Z"
|
|
3125
|
-
}))))), cellAddBtnLabel || '');
|
|
3126
|
-
};
|
|
3127
|
-
var queryItemObj = function queryItemObj() {
|
|
3128
|
-
var _perData = orginalData.filter(function (item) {
|
|
3129
|
-
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(item.date) === (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(day));
|
|
3130
|
-
});
|
|
3131
|
-
var _currentData = undefined;
|
|
3132
|
-
if (_perData[0]) {
|
|
3133
|
-
var _items = _perData[0].list;
|
|
3134
|
-
if (tableCellId === -1) {
|
|
3135
|
-
// add new
|
|
3136
|
-
_currentData = {
|
|
3137
|
-
id: 0,
|
|
3138
|
-
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(day))
|
|
3139
|
-
};
|
|
3140
|
-
} else {
|
|
3141
|
-
// edit or delete
|
|
3142
|
-
_currentData = _items.filter(function (item) {
|
|
3143
|
-
return item.id == tableCellId;
|
|
3144
|
-
})[0];
|
|
3145
|
-
}
|
|
3146
|
-
}
|
|
3147
|
-
return _perData[0] ? _currentData : {
|
|
3148
|
-
id: 0,
|
|
3149
|
-
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(day))
|
|
3150
|
-
};
|
|
3151
|
-
};
|
|
3152
|
-
|
|
3153
|
-
// cell
|
|
3154
|
-
var getCells = function getCells() {
|
|
3155
|
-
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'none';
|
|
3156
|
-
var currentMonth = month;
|
|
3157
|
-
var currentStartDay = startDay;
|
|
3158
|
-
|
|
3159
|
-
// previous month
|
|
3160
|
-
if (type === 'forward') {
|
|
3161
|
-
var _date = new Date(year, currentMonth - 1, day);
|
|
3162
|
-
currentMonth = _date.getMonth();
|
|
3163
|
-
currentStartDay = getStartDayOfMonth(_date);
|
|
3164
|
-
}
|
|
3165
|
-
|
|
3166
|
-
// next month
|
|
3167
|
-
if (type === 'back') {
|
|
3168
|
-
var _date3 = new Date(year, currentMonth + 1, day);
|
|
3169
|
-
currentMonth = _date3.getMonth();
|
|
3170
|
-
currentStartDay = getStartDayOfMonth(_date3);
|
|
3171
|
-
}
|
|
3172
|
-
|
|
3173
|
-
//
|
|
3174
|
-
var allDays = Array(days[currentMonth] + (currentStartDay - 1)).fill(null).map(function (_, i) {
|
|
3175
|
-
return i;
|
|
3176
|
-
}); // [0,1,..,30,31]
|
|
3177
|
-
var rows = Math.ceil(allDays.length / 7); // 5
|
|
3178
|
-
|
|
3179
|
-
//
|
|
3180
|
-
var _tempCells = Array.from({
|
|
3181
|
-
length: rows
|
|
3182
|
-
}).fill(null);
|
|
3183
|
-
var _getForwardFill = function _getForwardFill(_year, _month) {
|
|
3184
|
-
// Get the last day of the previous month
|
|
3185
|
-
var lastDayOfLastMonth = new Date(_year, _month - 1, 0);
|
|
3186
|
-
var last7Days = [];
|
|
3187
|
-
|
|
3188
|
-
// Rewind 7 days forward from the last day
|
|
3189
|
-
for (var i = 0; i < 7; i++) {
|
|
3190
|
-
last7Days.unshift(new Date(lastDayOfLastMonth));
|
|
3191
|
-
lastDayOfLastMonth.setDate(lastDayOfLastMonth.getDate() - 1);
|
|
3192
|
-
}
|
|
3193
|
-
return last7Days.map(function (v) {
|
|
3194
|
-
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(v);
|
|
3195
|
-
});
|
|
3196
|
-
};
|
|
3197
|
-
var _getBackFill = function _getBackFill(_year, _month) {
|
|
3198
|
-
// Get the first day of the next month
|
|
3199
|
-
var firstDayOfNextMonth = new Date(_year, _month, 1);
|
|
3200
|
-
var first7Days = [];
|
|
3201
|
-
|
|
3202
|
-
// Rewind 7 days forward from the first day of the next month
|
|
3203
|
-
for (var i = 0; i < 7; i++) {
|
|
3204
|
-
first7Days.push(new Date(firstDayOfNextMonth));
|
|
3205
|
-
firstDayOfNextMonth.setDate(firstDayOfNextMonth.getDate() + 1);
|
|
3206
|
-
}
|
|
3207
|
-
return first7Days.map(function (v) {
|
|
3208
|
-
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(v);
|
|
3209
|
-
});
|
|
3210
|
-
};
|
|
3211
|
-
|
|
3212
|
-
// The remaining date of the previous month
|
|
3213
|
-
// If the number is 7, the calendar does not include the date of the previous month
|
|
3214
|
-
var remainPrevDate = findMondayAndTruncate(_getForwardFill(year, month + 1));
|
|
3215
|
-
var remainPrevDateTotal = remainPrevDate.length === 7 ? 0 : remainPrevDate.length;
|
|
3216
|
-
return {
|
|
3217
|
-
rowsTotal: orginalData.length,
|
|
3218
|
-
colsTotal: allDays.length,
|
|
3219
|
-
forwardFillTotal: remainPrevDateTotal,
|
|
3220
|
-
list: _tempCells.map(function (_, j) {
|
|
3221
|
-
var _col = allDays.slice(j * 7, (j + 1) * 7);
|
|
3222
|
-
|
|
3223
|
-
// back fill
|
|
3224
|
-
var backFillArr = [];
|
|
3225
|
-
for (var k = 0; k < 7 - _col.length; k++) {
|
|
3226
|
-
backFillArr.push(null);
|
|
3227
|
-
}
|
|
3228
|
-
_col.splice.apply(_col, [_col.length, 0].concat(_toConsumableArray(backFillArr)));
|
|
3229
|
-
|
|
3230
|
-
//
|
|
3231
|
-
var isFirstGroup = j === 0;
|
|
3232
|
-
var isLastGroup = j === _tempCells.length - 1;
|
|
3233
|
-
|
|
3234
|
-
// forward fill
|
|
3235
|
-
var __forwardFillDate = _getForwardFill(year, month + 1);
|
|
3236
|
-
|
|
3237
|
-
// back fill
|
|
3238
|
-
var __backFillDate = _getBackFill(year, month + 1);
|
|
3239
|
-
var _getDateShow = function _getDateShow(_dayIndex, _m, _startDay, _month) {
|
|
3240
|
-
var currentDay = typeof _dayIndex === 'number' ? _dayIndex - (_startDay - 2) : 0; // ..., -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, ...
|
|
3241
|
-
|
|
3242
|
-
// date
|
|
3243
|
-
var _dateShow = currentDay > 0 ? "".concat(year, "-").concat(_month + 1, "-").concat(currentDay) : '';
|
|
3244
|
-
|
|
3245
|
-
// forward & back
|
|
3246
|
-
if (isFirstGroup && _dateShow === '') {
|
|
3247
|
-
_dateShow = __forwardFillDate.at(currentDay - 1);
|
|
3248
|
-
}
|
|
3249
|
-
if (isLastGroup && _dateShow === '') {
|
|
3250
|
-
_dateShow = __backFillDate.at(_m);
|
|
3251
|
-
}
|
|
3252
|
-
return {
|
|
3253
|
-
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(_dateShow),
|
|
3254
|
-
firstGroup: isFirstGroup,
|
|
3255
|
-
lastGroup: isLastGroup,
|
|
3256
|
-
validDisplayDate: currentDay > 0 && currentDay <= days[month]
|
|
3257
|
-
};
|
|
3258
|
-
};
|
|
3259
|
-
|
|
3260
|
-
//
|
|
3261
|
-
return {
|
|
3262
|
-
month: currentMonth,
|
|
3263
|
-
startDay: currentStartDay,
|
|
3264
|
-
row: j,
|
|
3265
|
-
col: _col,
|
|
3266
|
-
dateInfo: _col.map(function (k, m) {
|
|
3267
|
-
var _lastWeekDays = _col.filter(Boolean).length;
|
|
3268
|
-
return _getDateShow(k, m - _lastWeekDays, currentStartDay, currentMonth);
|
|
3269
|
-
}),
|
|
3270
|
-
weekDisplay: _col.map(function (k, m) {
|
|
3271
|
-
return WEEK[m];
|
|
3272
|
-
}),
|
|
3273
|
-
week: _col.map(function (k, m) {
|
|
3274
|
-
return m;
|
|
3275
|
-
})
|
|
3276
|
-
};
|
|
3277
|
-
})
|
|
3278
|
-
};
|
|
3279
|
-
};
|
|
3280
|
-
function updateTodayDate(inputDate) {
|
|
3281
|
-
setDay(inputDate.getDate());
|
|
3282
|
-
setMonth(inputDate.getMonth());
|
|
3283
|
-
setYear(inputDate.getFullYear());
|
|
3284
|
-
setStartDay(getStartDayOfMonth(inputDate));
|
|
3285
|
-
|
|
3286
|
-
// update selector
|
|
3287
|
-
setSelectedMonth(inputDate.getMonth());
|
|
3288
|
-
setSelectedYear(inputDate.getFullYear());
|
|
3289
|
-
}
|
|
3290
|
-
function getStartDayOfMonth(date) {
|
|
3291
|
-
var startDate = new Date(date.getFullYear(), date.getMonth(), 1).getDay();
|
|
3292
|
-
return startDate === 0 ? 7 : startDate;
|
|
3293
|
-
}
|
|
3294
|
-
function isLeapYear(year) {
|
|
3295
|
-
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
|
|
3296
|
-
}
|
|
3297
|
-
var days = isLeapYear(year) ? DAYS_LEAP : DAYS;
|
|
3298
|
-
function handlePrevChange() {
|
|
3299
|
-
setDate(function (prevState) {
|
|
3300
|
-
var _date = new Date(year, month - 1, day);
|
|
3301
|
-
|
|
3302
|
-
// update
|
|
3303
|
-
setSelectedMonth(_date.getMonth());
|
|
3304
|
-
setSelectedYear(_date.getFullYear());
|
|
3305
|
-
|
|
3306
|
-
//
|
|
3307
|
-
onChangeMonth === null || onChangeMonth === void 0 ? void 0 : onChangeMonth({
|
|
3308
|
-
day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(day),
|
|
3309
|
-
month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(_date.getMonth() + 1),
|
|
3310
|
-
year: _date.getFullYear().toString()
|
|
3311
|
-
});
|
|
3312
|
-
return _date;
|
|
3313
|
-
});
|
|
3314
|
-
}
|
|
3315
|
-
function handleNextChange() {
|
|
3316
|
-
setDate(function (prevState) {
|
|
3317
|
-
var _date = new Date(year, month + 1, day);
|
|
3318
|
-
|
|
3319
|
-
// update
|
|
3320
|
-
setSelectedMonth(_date.getMonth());
|
|
3321
|
-
setSelectedYear(_date.getFullYear());
|
|
3322
|
-
|
|
3323
|
-
//
|
|
3324
|
-
onChangeMonth === null || onChangeMonth === void 0 ? void 0 : onChangeMonth({
|
|
3325
|
-
day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(day),
|
|
3326
|
-
month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(_date.getMonth() + 1),
|
|
3327
|
-
year: _date.getFullYear().toString()
|
|
3328
|
-
});
|
|
3329
|
-
return _date;
|
|
3330
|
-
});
|
|
3331
|
-
}
|
|
3332
|
-
function handleDayChange(e, currentDay) {
|
|
3333
|
-
setDate(new Date(year, month, currentDay));
|
|
3334
|
-
}
|
|
3335
|
-
function handleYearChange(currentValue) {
|
|
3336
|
-
setSelectedYear(currentValue);
|
|
3337
|
-
setYear(currentValue);
|
|
3338
|
-
setDate(new Date(currentValue, month, day));
|
|
3339
|
-
|
|
3340
|
-
// close win
|
|
3341
|
-
setWinYear(false);
|
|
3342
|
-
}
|
|
3343
|
-
function handleMonthChange(currentIndex) {
|
|
3344
|
-
setSelectedMonth(currentIndex);
|
|
3345
|
-
setMonth(currentIndex);
|
|
3346
|
-
setDate(new Date(year, currentIndex, day));
|
|
3347
|
-
|
|
3348
|
-
// close win
|
|
3349
|
-
setWinMonth(false);
|
|
3350
|
-
|
|
3351
|
-
//
|
|
3352
|
-
onChangeMonth === null || onChangeMonth === void 0 ? void 0 : onChangeMonth({
|
|
3353
|
-
day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(day),
|
|
3354
|
-
month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(currentIndex + 1),
|
|
3355
|
-
year: year.toString()
|
|
3356
|
-
});
|
|
3357
|
-
}
|
|
3358
|
-
function handleTodayChange() {
|
|
3359
|
-
setSelectedMonth(now.getMonth());
|
|
3360
|
-
setSelectedYear(now.getFullYear());
|
|
3361
|
-
updateTodayDate(now);
|
|
3362
|
-
|
|
3363
|
-
//
|
|
3364
|
-
var _now = (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getTodayDate)().split('-');
|
|
3365
|
-
onChangeToday === null || onChangeToday === void 0 ? void 0 : onChangeToday({
|
|
3366
|
-
day: _now[2],
|
|
3367
|
-
month: _now[1],
|
|
3368
|
-
year: _now[0]
|
|
3369
|
-
});
|
|
3370
|
-
}
|
|
3371
|
-
function handleShowWinYear() {
|
|
3372
|
-
setWinYear(function (prevState) {
|
|
3373
|
-
return !prevState;
|
|
3374
|
-
});
|
|
3375
|
-
}
|
|
3376
|
-
function handleShowWinMonth() {
|
|
3377
|
-
setWinMonth(function (prevState) {
|
|
3378
|
-
return !prevState;
|
|
3379
|
-
});
|
|
3380
|
-
}
|
|
3381
|
-
|
|
3382
|
-
//if user change the selectedYear, then udate the years array that is displayed on year tab view
|
|
3383
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
3384
|
-
var years = [];
|
|
3385
|
-
for (var y = selectedYear - 10; y < selectedYear + 10; y++) {
|
|
3386
|
-
years.push(y);
|
|
3387
|
-
}
|
|
3388
|
-
setYearsCollection(years);
|
|
3389
|
-
}, [selectedYear]);
|
|
3390
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
3391
|
-
// Guaranteed year change triggered by the front and rear buttons
|
|
3392
|
-
onChangeYear === null || onChangeYear === void 0 ? void 0 : onChangeYear({
|
|
3393
|
-
day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(day),
|
|
3394
|
-
month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(month + 1),
|
|
3395
|
-
year: year.toString()
|
|
3396
|
-
});
|
|
3397
|
-
}, [year]);
|
|
3398
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
3399
|
-
updateTodayDate(date);
|
|
3400
|
-
}, [date]);
|
|
3401
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
3402
|
-
// update events value
|
|
3403
|
-
if (Array.isArray(eventsValue)) setOrginalData(eventsValue);
|
|
3404
|
-
|
|
3405
|
-
// update current today
|
|
3406
|
-
if (typeof customTodayDate === 'string' && customTodayDate !== '' && (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.isValidDate)(customTodayDate)) {
|
|
3407
|
-
var _customNow = new Date(customTodayDate);
|
|
3408
|
-
updateTodayDate(_customNow);
|
|
3409
|
-
}
|
|
3410
|
-
|
|
3411
|
-
// Call a function when the list has been rendered completely
|
|
3412
|
-
onListRenderComplete === null || onListRenderComplete === void 0 ? void 0 : onListRenderComplete();
|
|
3413
|
-
}, [eventsValue, customTodayDate]);
|
|
3414
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3415
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("custom-event-cal__wrapper", calendarWrapperClassName),
|
|
3416
|
-
onKeyDown: function onKeyDown(e) {
|
|
3417
|
-
onKeyPressed === null || onKeyPressed === void 0 ? void 0 : onKeyPressed(e);
|
|
3418
|
-
},
|
|
3419
|
-
tabIndex: -1
|
|
3420
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3421
|
-
className: "custom-event-cal__header bg-body-tertiary"
|
|
3422
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3423
|
-
tabIndex: -1,
|
|
3424
|
-
type: "button",
|
|
3425
|
-
className: "custom-event-cal__btn custom-event-cal__btn--prev",
|
|
3426
|
-
onClick: handlePrevChange
|
|
3427
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3428
|
-
width: "20px",
|
|
3429
|
-
height: "20px",
|
|
3430
|
-
viewBox: "0 0 24 24",
|
|
3431
|
-
fill: "none"
|
|
3432
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
3433
|
-
d: "M14.2893 5.70708C13.8988 5.31655 13.2657 5.31655 12.8751 5.70708L7.98768 10.5993C7.20729 11.3805 7.2076 12.6463 7.98837 13.427L12.8787 18.3174C13.2693 18.7079 13.9024 18.7079 14.293 18.3174C14.6835 17.9269 14.6835 17.2937 14.293 16.9032L10.1073 12.7175C9.71678 12.327 9.71678 11.6939 10.1073 11.3033L14.2893 7.12129C14.6799 6.73077 14.6799 6.0976 14.2893 5.70708Z",
|
|
3434
|
-
fill: "#000"
|
|
3435
|
-
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3436
|
-
className: "custom-event-cal__header__btns"
|
|
3437
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3438
|
-
tabIndex: -1,
|
|
3439
|
-
type: "button",
|
|
3440
|
-
className: "custom-event-cal__btn ".concat(winMonth ? 'active' : ''),
|
|
3441
|
-
onClick: handleShowWinMonth
|
|
3442
|
-
}, MONTHS[month], /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3443
|
-
width: "12px",
|
|
3444
|
-
height: "12px",
|
|
3445
|
-
viewBox: "0 0 24 24"
|
|
3446
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
3447
|
-
d: "M11.178 19.569a.998.998 0 0 0 1.644 0l9-13A.999.999 0 0 0 21 5H3a1.002 1.002 0 0 0-.822 1.569l9 13z",
|
|
3448
|
-
fill: "#000000"
|
|
3449
|
-
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3450
|
-
tabIndex: -1,
|
|
3451
|
-
type: "button",
|
|
3452
|
-
className: "custom-event-cal__btn ".concat(winYear ? 'active' : ''),
|
|
3453
|
-
onClick: handleShowWinYear
|
|
3454
|
-
}, year, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3455
|
-
width: "12px",
|
|
3456
|
-
height: "12px",
|
|
3457
|
-
viewBox: "0 0 24 24"
|
|
3458
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
3459
|
-
d: "M11.178 19.569a.998.998 0 0 0 1.644 0l9-13A.999.999 0 0 0 21 5H3a1.002 1.002 0 0 0-.822 1.569l9 13z",
|
|
3460
|
-
fill: "#000000"
|
|
3461
|
-
})))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3462
|
-
tabIndex: -1,
|
|
3463
|
-
type: "button",
|
|
3464
|
-
className: "custom-event-cal__btn custom-event-cal__btn--next",
|
|
3465
|
-
onClick: handleNextChange
|
|
3466
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
3467
|
-
width: "20px",
|
|
3468
|
-
height: "20px",
|
|
3469
|
-
viewBox: "0 0 24 24",
|
|
3470
|
-
fill: "none"
|
|
3471
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
3472
|
-
d: "M9.71069 18.2929C10.1012 18.6834 10.7344 18.6834 11.1249 18.2929L16.0123 13.4006C16.7927 12.6195 16.7924 11.3537 16.0117 10.5729L11.1213 5.68254C10.7308 5.29202 10.0976 5.29202 9.70708 5.68254C9.31655 6.07307 9.31655 6.70623 9.70708 7.09676L13.8927 11.2824C14.2833 11.6729 14.2833 12.3061 13.8927 12.6966L9.71069 16.8787C9.32016 17.2692 9.32016 17.9023 9.71069 18.2929Z",
|
|
3473
|
-
fill: "#000"
|
|
3474
|
-
})))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3475
|
-
className: "custom-event-cal__body"
|
|
3476
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3477
|
-
className: "custom-event-cal__row"
|
|
3478
|
-
}, WEEK.map(function (s, i) {
|
|
3479
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3480
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('custom-event-cal__cell custom-event-cal__day custom-event-cal__day--week custom-event-cal__day--disabled bg-secondary-subtle empty', {
|
|
3481
|
-
'last-cell': i === WEEK.length - 1
|
|
3482
|
-
}),
|
|
3483
|
-
key: i,
|
|
3484
|
-
"data-week": i,
|
|
3485
|
-
dangerouslySetInnerHTML: {
|
|
3486
|
-
__html: s
|
|
3487
|
-
}
|
|
3488
|
-
});
|
|
3489
|
-
})), getCells().list.map(function (item, j) {
|
|
3490
|
-
var isLastRow = j === getCells().list.length - 1;
|
|
3491
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3492
|
-
key: 'row' + item.row,
|
|
3493
|
-
className: "custom-event-cal__row"
|
|
3494
|
-
}, item.col.map(function (dayIndex, i) {
|
|
3495
|
-
var isLastCell = i === item.col.length - 1;
|
|
3496
|
-
|
|
3497
|
-
// date
|
|
3498
|
-
var _dateShow = item.dateInfo[i].date;
|
|
3499
|
-
var _dateDayShow = _dateShow.split('-').at(-1);
|
|
3500
|
-
|
|
3501
|
-
// week day
|
|
3502
|
-
var weekDay = item.week[i];
|
|
3503
|
-
|
|
3504
|
-
// helper
|
|
3505
|
-
var d = parseFloat(_dateDayShow);
|
|
3506
|
-
var _currentData = orginalData.filter(function (item) {
|
|
3507
|
-
return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(item.date) === _dateShow;
|
|
3508
|
-
});
|
|
3509
|
-
var isInteractive = item.dateInfo[i].validDisplayDate; // The date on which the user interaction can occur, e.g. click, modify
|
|
3510
|
-
var isForward = item.dateInfo[i].firstGroup && !isInteractive;
|
|
3511
|
-
var isBack = item.dateInfo[i].lastGroup && !isInteractive;
|
|
3512
|
-
var _eventContent = function _eventContent() {
|
|
3513
|
-
if (_currentData.length === 0 || !Array.isArray(_currentData) || typeof _currentData[0].list === 'undefined') {
|
|
3514
|
-
return null;
|
|
3515
|
-
}
|
|
3516
|
-
|
|
3517
|
-
//
|
|
3518
|
-
var _items = _currentData[0].list;
|
|
3519
|
-
return _items.map(function (cellItem, cellItemIndex) {
|
|
3520
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3521
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("custom-event-cal__cell-item custom-event-cal__cell-item-".concat(cellItemIndex), {
|
|
3522
|
-
'first': cellItemIndex === 0,
|
|
3523
|
-
'last': cellItemIndex === _items.length - 1
|
|
3524
|
-
}),
|
|
3525
|
-
key: "cell-item-".concat(cellItemIndex, "}"),
|
|
3526
|
-
"data-date": _dateShow,
|
|
3527
|
-
"data-day": _dateDayShow,
|
|
3528
|
-
"data-week": weekDay,
|
|
3529
|
-
onClick: function onClick(e) {
|
|
3530
|
-
var _cellItem$callback;
|
|
3531
|
-
e.stopPropagation();
|
|
3532
|
-
|
|
3533
|
-
// update cell data
|
|
3534
|
-
setTableCellId(cellItem.id);
|
|
3535
|
-
|
|
3536
|
-
// Callback
|
|
3537
|
-
(_cellItem$callback = cellItem.callback) === null || _cellItem$callback === void 0 ? void 0 : _cellItem$callback.call(cellItem);
|
|
3538
|
-
if (isInteractive) {
|
|
3539
|
-
handleDayChange(e, d); // update current day
|
|
3540
|
-
|
|
3541
|
-
//
|
|
3542
|
-
var _now = cellItem.date.split('-');
|
|
3543
|
-
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, _objectSpread(_objectSpread({}, cellItem), {}, {
|
|
3544
|
-
day: _now[2],
|
|
3545
|
-
month: _now[1],
|
|
3546
|
-
year: _now[0]
|
|
3547
|
-
}));
|
|
3548
|
-
if (EVENTS_ENABLED) {
|
|
3549
|
-
onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(cellItem, function () {
|
|
3550
|
-
return setShowEdit(true);
|
|
3551
|
-
}, 'normal');
|
|
3552
|
-
}
|
|
3553
|
-
}
|
|
3554
|
-
}
|
|
3555
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3556
|
-
className: "custom-event-cal__day__event",
|
|
3557
|
-
style: typeof cellItem !== 'undefined' && cellItem.eventStyles !== 'undefined' ? cellItem.eventStyles : {},
|
|
3558
|
-
dangerouslySetInnerHTML: typeof cellItem.data === 'string' ? {
|
|
3559
|
-
__html: cellItem.data
|
|
3560
|
-
} : undefined
|
|
3561
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement(cellItem.data) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, cellItem.data) : null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3562
|
-
className: "custom-event-cal__day__eventdel ".concat(cellCloseBtnClassName || '')
|
|
3563
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
3564
|
-
href: "#",
|
|
3565
|
-
tabIndex: -1,
|
|
3566
|
-
className: "align-middle",
|
|
3567
|
-
"data-date": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(_dateShow),
|
|
3568
|
-
"data-day": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(d),
|
|
3569
|
-
"data-week": i,
|
|
3570
|
-
onClick: function onClick(e) {
|
|
3571
|
-
e.preventDefault();
|
|
3572
|
-
e.stopPropagation();
|
|
3573
|
-
|
|
3574
|
-
// update cell data
|
|
3575
|
-
setTableCellId(cellItem.id);
|
|
3576
|
-
var _existsContent = cellItem;
|
|
3577
|
-
|
|
3578
|
-
//
|
|
3579
|
-
if (isInteractive) {
|
|
3580
|
-
handleDayChange(e, d); // update current day
|
|
3581
|
-
|
|
3582
|
-
//
|
|
3583
|
-
var _now = (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d)).split('-');
|
|
3584
|
-
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, {
|
|
3585
|
-
id: 0,
|
|
3586
|
-
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d)),
|
|
3587
|
-
day: _now[2],
|
|
3588
|
-
month: _now[1],
|
|
3589
|
-
year: _now[0]
|
|
3590
|
-
});
|
|
3591
|
-
if (EVENTS_DELETE_ENABLED) {
|
|
3592
|
-
onModalDeleteOpen === null || onModalDeleteOpen === void 0 ? void 0 : onModalDeleteOpen(_existsContent, function () {
|
|
3593
|
-
return setShowDelete(true);
|
|
3594
|
-
});
|
|
3595
|
-
}
|
|
3596
|
-
}
|
|
3597
|
-
}
|
|
3598
|
-
}, _delBtn())));
|
|
3599
|
-
});
|
|
3600
|
-
};
|
|
3601
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3602
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('custom-event-cal__cell custom-event-cal__day', {
|
|
3603
|
-
'empty': !isInteractive,
|
|
3604
|
-
'today': d === now.getDate(),
|
|
3605
|
-
'selected': d === day && isInteractive,
|
|
3606
|
-
'last-cell': isLastCell,
|
|
3607
|
-
'last-row': isLastRow,
|
|
3608
|
-
'disabled': !isInteractive,
|
|
3609
|
-
'has-events': _eventContent() !== null
|
|
3610
|
-
}),
|
|
3611
|
-
key: "col" + i,
|
|
3612
|
-
"data-date": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(_dateShow),
|
|
3613
|
-
"data-day": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(d),
|
|
3614
|
-
"data-week": i,
|
|
3615
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
3616
|
-
onCellMouseEnter === null || onCellMouseEnter === void 0 ? void 0 : onCellMouseEnter(e);
|
|
3617
|
-
},
|
|
3618
|
-
onMouseDown: function onMouseDown(e) {
|
|
3619
|
-
//
|
|
3620
|
-
onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(e);
|
|
3621
|
-
if (isInteractive) {
|
|
3622
|
-
handleDayChange(e, d); // update current day
|
|
3623
|
-
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, null);
|
|
3624
|
-
}
|
|
3625
|
-
},
|
|
3626
|
-
onDoubleClick: function onDoubleClick(e) {
|
|
3627
|
-
//
|
|
3628
|
-
onCellDoubleClick === null || onCellDoubleClick === void 0 ? void 0 : onCellDoubleClick(e);
|
|
3629
|
-
},
|
|
3630
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
3631
|
-
onCellMouseLeave === null || onCellMouseLeave === void 0 ? void 0 : onCellMouseLeave(e);
|
|
3632
|
-
},
|
|
3633
|
-
onMouseUp: function onMouseUp(e) {
|
|
3634
|
-
onCellMouseUp === null || onCellMouseUp === void 0 ? void 0 : onCellMouseUp(e);
|
|
3635
|
-
}
|
|
3636
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
|
|
3637
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)({
|
|
3638
|
-
'disabled': !isInteractive
|
|
3639
|
-
})
|
|
3640
|
-
}, d), _eventContent(), isForward || isBack ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3641
|
-
className: "custom-event-cal__day__eventadd ".concat(cellAddBtnClassName || '')
|
|
3642
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
3643
|
-
href: "#",
|
|
3644
|
-
tabIndex: -1,
|
|
3645
|
-
className: "align-middle",
|
|
3646
|
-
"data-date": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(_dateShow),
|
|
3647
|
-
"data-day": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(d),
|
|
3648
|
-
"data-week": i,
|
|
3649
|
-
onClick: function onClick(e) {
|
|
3650
|
-
e.preventDefault();
|
|
3651
|
-
e.stopPropagation();
|
|
3652
|
-
|
|
3653
|
-
// update cell data
|
|
3654
|
-
setTableCellId(-1);
|
|
3655
|
-
|
|
3656
|
-
//
|
|
3657
|
-
if (isInteractive) {
|
|
3658
|
-
handleDayChange(e, d); // update current day
|
|
3659
|
-
|
|
3660
|
-
//
|
|
3661
|
-
var _now = (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d)).split('-');
|
|
3662
|
-
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, {
|
|
3663
|
-
id: 0,
|
|
3664
|
-
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d)),
|
|
3665
|
-
day: _now[2],
|
|
3666
|
-
month: _now[1],
|
|
3667
|
-
year: _now[0]
|
|
3668
|
-
});
|
|
3669
|
-
if (EVENTS_ENABLED) {
|
|
3670
|
-
onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen({
|
|
3671
|
-
id: 0,
|
|
3672
|
-
date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d))
|
|
3673
|
-
}, function () {
|
|
3674
|
-
return setShowEdit(true);
|
|
3675
|
-
}, 'new');
|
|
3676
|
-
}
|
|
3677
|
-
}
|
|
3678
|
-
}
|
|
3679
|
-
}, _addBtn()))));
|
|
3680
|
-
}));
|
|
3681
|
-
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3682
|
-
className: "custom-event-cal__month-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winMonth ? 'active' : '')
|
|
3683
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3684
|
-
className: "custom-event-cal__month-container"
|
|
3685
|
-
}, MONTHS_FULL.map(function (month, index) {
|
|
3686
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3687
|
-
"data-month": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(index + 1),
|
|
3688
|
-
className: "custom-event-cal__month ".concat(selectedMonth === index ? ' selected' : ''),
|
|
3689
|
-
key: month + index,
|
|
3690
|
-
onClick: function onClick() {
|
|
3691
|
-
handleMonthChange(index);
|
|
3692
|
-
}
|
|
3693
|
-
}, month);
|
|
3694
|
-
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3695
|
-
className: "custom-event-cal__year-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winYear ? 'active' : '')
|
|
3696
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3697
|
-
className: "custom-event-cal__year-container bg-body-tertiary"
|
|
3698
|
-
}, yearsArray.map(function (year, index) {
|
|
3699
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3700
|
-
"data-year": year,
|
|
3701
|
-
className: "custom-event-cal__year ".concat(selectedYear === year ? ' selected' : ''),
|
|
3702
|
-
key: year + index,
|
|
3703
|
-
onClick: function onClick() {
|
|
3704
|
-
handleYearChange(year);
|
|
3705
|
-
}
|
|
3706
|
-
}, year);
|
|
3707
|
-
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
3708
|
-
className: "custom-event-cal__today-wrapper p-2 bg-body-tertiary"
|
|
3709
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
3710
|
-
tabIndex: -1,
|
|
3711
|
-
type: "button",
|
|
3712
|
-
className: "custom-event-cal__btn custom-event-cal__btn--today",
|
|
3713
|
-
onClick: handleTodayChange
|
|
3714
|
-
}, langToday || 'Today'))), EVENTS_ENABLED ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_3___default()), {
|
|
3715
|
-
ref: modalDeleteHandleRef,
|
|
3716
|
-
show: showDelete,
|
|
3717
|
-
maskOpacity: modalMaskOpacity,
|
|
3718
|
-
triggerClassName: "",
|
|
3719
|
-
triggerContent: "",
|
|
3720
|
-
closeBtnClassName: modalCloseBtnClassName || 'btn btn-secondary',
|
|
3721
|
-
closeBtnLabel: modalCloseBtnLabel || 'Close',
|
|
3722
|
-
submitBtnClassName: modalSubmitDeleteBtnClassName || 'btn btn-danger',
|
|
3723
|
-
submitBtnLabel: modalSubmitDeleteBtnLabel || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, "Delete"),
|
|
3724
|
-
onClose: function onClose(e) {
|
|
3725
|
-
setTimeout(function () {
|
|
3726
|
-
setShowDelete(false);
|
|
3727
|
-
onModalDeleteClose === null || onModalDeleteClose === void 0 ? void 0 : onModalDeleteClose(queryItemObj());
|
|
3728
|
-
}, 350);
|
|
3729
|
-
},
|
|
3730
|
-
onSubmit: /*#__PURE__*/function () {
|
|
3731
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e, closewin, data) {
|
|
3732
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3733
|
-
while (1) switch (_context.prev = _context.next) {
|
|
3734
|
-
case 0:
|
|
3735
|
-
onModalDeleteEvent === null || onModalDeleteEvent === void 0 ? void 0 : onModalDeleteEvent(queryItemObj(), closewin);
|
|
3736
|
-
case 1:
|
|
3737
|
-
case "end":
|
|
3738
|
-
return _context.stop();
|
|
3739
|
-
}
|
|
3740
|
-
}, _callee);
|
|
3741
|
-
}));
|
|
3742
|
-
return function (_x2, _x3, _x4) {
|
|
3743
|
-
return _ref.apply(this, arguments);
|
|
3744
|
-
};
|
|
3745
|
-
}()
|
|
3746
|
-
}, modalDeleteContent || 'Are you sure?'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_3___default()), {
|
|
3747
|
-
ref: modalEditHandleRef,
|
|
3748
|
-
show: showEdit,
|
|
3749
|
-
maskOpacity: modalMaskOpacity,
|
|
3750
|
-
heading: modalHeading,
|
|
3751
|
-
maxWidth: modalMaxWidth,
|
|
3752
|
-
minHeight: modalMinHeight,
|
|
3753
|
-
triggerClassName: "",
|
|
3754
|
-
triggerContent: "",
|
|
3755
|
-
closeBtnClassName: modalCloseBtnClassName || 'btn btn-secondary',
|
|
3756
|
-
closeBtnLabel: modalCloseBtnLabel || 'Close',
|
|
3757
|
-
submitBtnClassName: modalSubmitBtnClassName || 'btn btn-primary',
|
|
3758
|
-
submitBtnLabel: modalSubmitBtnLabel || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, "Save"),
|
|
3759
|
-
onClose: function onClose(e) {
|
|
3760
|
-
setTimeout(function () {
|
|
3761
|
-
setShowEdit(false);
|
|
3762
|
-
onModalEditClose === null || onModalEditClose === void 0 ? void 0 : onModalEditClose(queryItemObj());
|
|
3763
|
-
}, 350);
|
|
3764
|
-
},
|
|
3765
|
-
onSubmit: /*#__PURE__*/function () {
|
|
3766
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e, closewin, data) {
|
|
3767
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
3768
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
3769
|
-
case 0:
|
|
3770
|
-
onModalEditEvent === null || onModalEditEvent === void 0 ? void 0 : onModalEditEvent(queryItemObj(), closewin);
|
|
3771
|
-
case 1:
|
|
3772
|
-
case "end":
|
|
3773
|
-
return _context2.stop();
|
|
3774
|
-
}
|
|
3775
|
-
}, _callee2);
|
|
3776
|
-
}));
|
|
3777
|
-
return function (_x5, _x6, _x7) {
|
|
3778
|
-
return _ref2.apply(this, arguments);
|
|
3779
|
-
};
|
|
3780
|
-
}()
|
|
3781
|
-
}, modalContent)) : null);
|
|
3782
|
-
};
|
|
3783
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EventCalendar);
|
|
3784
|
-
})();
|
|
3785
|
-
|
|
3786
|
-
/******/ return __webpack_exports__;
|
|
3787
|
-
/******/ })()
|
|
3788
|
-
;
|
|
3789
|
-
});
|