funda-ui 4.5.712 → 4.5.766
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/Chatbox/index.d.ts +54 -0
- package/{publish/lib/cjs/Date → Chatbox}/index.js +2465 -3802
- package/README.md +4 -105
- package/Utils/useStreamController.d.ts +71 -0
- package/Utils/useStreamController.js +494 -0
- package/{publish/all.d.ts → all.d.ts} +1 -0
- package/{publish/all.js → all.js} +1 -0
- package/lib/cjs/Chatbox/index.d.ts +54 -0
- package/lib/cjs/Chatbox/index.js +4863 -0
- package/lib/cjs/Utils/useStreamController.d.ts +71 -0
- package/lib/cjs/Utils/useStreamController.js +494 -0
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/esm/Chatbox/PureLoader.tsx +45 -0
- package/lib/esm/Chatbox/TypingEffect.tsx +32 -0
- package/lib/esm/Chatbox/index.scss +502 -0
- package/lib/esm/Chatbox/index.tsx +1171 -0
- package/lib/esm/Chatbox/useStreamController.tsx +277 -0
- package/lib/esm/Chatbox/utils/func.ts +107 -0
- package/lib/esm/Textarea/index.tsx +1 -0
- package/lib/esm/Utils/hooks/useStreamController.tsx +277 -0
- package/lib/esm/index.js +1 -0
- package/package.json +44 -41
- package/.gitattributes +0 -2
- package/README_PUBLISH.md +0 -126
- package/logo.png +0 -0
- package/preview.png +0 -0
- package/publish/LICENSE +0 -21
- package/publish/README.md +0 -126
- package/publish/lib/cjs/Accordion/index.d.ts +0 -2
- package/publish/lib/cjs/Accordion/index.js +0 -1035
- 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 -60
- package/publish/lib/cjs/CascadingSelect/index.js +0 -2943
- package/publish/lib/cjs/CascadingSelectE2E/index.d.ts +0 -71
- package/publish/lib/cjs/CascadingSelectE2E/index.js +0 -3540
- package/publish/lib/cjs/Checkbox/index.d.ts +0 -28
- package/publish/lib/cjs/Checkbox/index.js +0 -662
- 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/DigitalClock/index.d.ts +0 -7
- package/publish/lib/cjs/DigitalClock/index.js +0 -402
- package/publish/lib/cjs/DragDropList/index.d.ts +0 -44
- package/publish/lib/cjs/DragDropList/index.js +0 -1587
- package/publish/lib/cjs/DropdownMenu/index.d.ts +0 -38
- package/publish/lib/cjs/DropdownMenu/index.js +0 -1498
- package/publish/lib/cjs/DynamicFields/index.d.ts +0 -40
- package/publish/lib/cjs/DynamicFields/index.js +0 -810
- package/publish/lib/cjs/EventCalendar/index.d.ts +0 -61
- package/publish/lib/cjs/EventCalendar/index.js +0 -3740
- package/publish/lib/cjs/EventCalendarTimeline/index.d.ts +0 -100
- package/publish/lib/cjs/EventCalendarTimeline/index.js +0 -6084
- 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 -1455
- package/publish/lib/cjs/LiveSearch/index.d.ts +0 -69
- package/publish/lib/cjs/LiveSearch/index.js +0 -3626
- 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 -79
- package/publish/lib/cjs/ModalDialog/index.js +0 -1695
- 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 -41
- package/publish/lib/cjs/MultipleCheckboxes/index.js +0 -1717
- package/publish/lib/cjs/MultipleSelect/index.d.ts +0 -65
- package/publish/lib/cjs/MultipleSelect/index.js +0 -3704
- package/publish/lib/cjs/NativeSelect/index.d.ts +0 -37
- package/publish/lib/cjs/NativeSelect/index.js +0 -1631
- package/publish/lib/cjs/NumberInput/index.d.ts +0 -40
- package/publish/lib/cjs/NumberInput/index.js +0 -1188
- 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 -1391
- package/publish/lib/cjs/RangeSlider/index.d.ts +0 -22
- package/publish/lib/cjs/RangeSlider/index.js +0 -2665
- package/publish/lib/cjs/RootPortal/index.d.ts +0 -8
- package/publish/lib/cjs/RootPortal/index.js +0 -141
- 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 -99
- package/publish/lib/cjs/Select/index.js +0 -5697
- package/publish/lib/cjs/ShowMoreLess/index.d.ts +0 -36
- package/publish/lib/cjs/ShowMoreLess/index.js +0 -387
- package/publish/lib/cjs/Switch/index.d.ts +0 -25
- package/publish/lib/cjs/Switch/index.js +0 -628
- package/publish/lib/cjs/Table/index.d.ts +0 -12
- package/publish/lib/cjs/Table/index.js +0 -2062
- 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 -31
- package/publish/lib/cjs/TagInput/index.js +0 -1144
- package/publish/lib/cjs/Textarea/index.d.ts +0 -50
- package/publish/lib/cjs/Textarea/index.js +0 -1784
- package/publish/lib/cjs/Toast/index.d.ts +0 -34
- package/publish/lib/cjs/Toast/index.js +0 -861
- package/publish/lib/cjs/Tooltip/index.d.ts +0 -23
- package/publish/lib/cjs/Tooltip/index.js +0 -1674
- package/publish/lib/cjs/Tree/index.d.ts +0 -62
- package/publish/lib/cjs/Tree/index.js +0 -1960
- package/publish/lib/cjs/Utils/anim.d.ts +0 -11
- package/publish/lib/cjs/Utils/anim.js +0 -400
- 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 -217
- package/publish/lib/cjs/Utils/date.js +0 -567
- 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 -28
- package/publish/lib/cjs/Utils/extract.js +0 -130
- 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 -21
- package/publish/lib/cjs/Utils/initDefaultOptions.js +0 -131
- 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/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 -227
- 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 -169
- package/publish/lib/cjs/Utils/useDragDropPosition.js +0 -456
- package/publish/lib/cjs/Utils/useDraggable.d.ts +0 -62
- package/publish/lib/cjs/Utils/useDraggable.js +0 -348
- 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 -168
- package/publish/lib/cjs/Utils/useKeyPress.d.ts +0 -44
- package/publish/lib/cjs/Utils/useKeyPress.js +0 -200
- 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/viewport.d.ts +0 -7
- package/publish/lib/cjs/Utils/viewport.js +0 -64
- package/publish/lib/cjs/index.d.ts +0 -45
- package/publish/lib/cjs/index.js +0 -46
- package/publish/lib/css/BackToTop/index.css +0 -34
- package/publish/lib/css/CascadingSelect/index.css +0 -216
- package/publish/lib/css/CascadingSelectE2E/index.css +0 -216
- 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 -55
- 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 -368
- package/publish/lib/css/ShowMoreLess/index.css +0 -23
- 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 -201
- package/publish/lib/css/Tooltip/index.css +0 -197
- package/publish/lib/css/Tree/index.css +0 -232
- package/publish/lib/esm/Accordion/Accordion.tsx +0 -184
- package/publish/lib/esm/Accordion/AccordionItem.tsx +0 -143
- 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 -82
- package/publish/lib/esm/CascadingSelect/index.scss +0 -291
- package/publish/lib/esm/CascadingSelect/index.tsx +0 -1203
- package/publish/lib/esm/CascadingSelectE2E/Group.tsx +0 -83
- package/publish/lib/esm/CascadingSelectE2E/index.scss +0 -293
- package/publish/lib/esm/CascadingSelectE2E/index.tsx +0 -1471
- package/publish/lib/esm/Checkbox/index.tsx +0 -193
- 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 -1683
- 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 -494
- 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 -377
- package/publish/lib/esm/DynamicFields/index.tsx +0 -404
- package/publish/lib/esm/EventCalendar/index.scss +0 -407
- package/publish/lib/esm/EventCalendar/index.tsx +0 -1004
- package/publish/lib/esm/EventCalendarTimeline/index.scss +0 -926
- package/publish/lib/esm/EventCalendarTimeline/index.tsx +0 -2683
- 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 -614
- package/publish/lib/esm/LiveSearch/index.scss +0 -82
- package/publish/lib/esm/LiveSearch/index.tsx +0 -960
- package/publish/lib/esm/MasonryLayout/index.tsx +0 -326
- package/publish/lib/esm/ModalDialog/index.tsx +0 -552
- 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 -669
- package/publish/lib/esm/MultipleSelect/index.scss +0 -398
- package/publish/lib/esm/MultipleSelect/index.tsx +0 -766
- package/publish/lib/esm/MultipleSelect/utils/func.ts +0 -61
- package/publish/lib/esm/NativeSelect/index.tsx +0 -396
- package/publish/lib/esm/NativeSelect/utils/func.ts +0 -49
- package/publish/lib/esm/NumberInput/index.tsx +0 -385
- 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 -670
- package/publish/lib/esm/RangeSlider/index.scss +0 -186
- package/publish/lib/esm/RangeSlider/index.tsx +0 -241
- package/publish/lib/esm/RootPortal/index.tsx +0 -53
- 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 -253
- package/publish/lib/esm/Select/index.scss +0 -553
- package/publish/lib/esm/Select/index.tsx +0 -2816
- package/publish/lib/esm/Select/utils/func.ts +0 -106
- package/publish/lib/esm/ShowMoreLess/index.scss +0 -27
- package/publish/lib/esm/ShowMoreLess/index.tsx +0 -145
- package/publish/lib/esm/Switch/index.tsx +0 -147
- package/publish/lib/esm/Table/Table.tsx +0 -257
- 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 -123
- 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 -57
- package/publish/lib/esm/Table/utils/TableFilter.tsx +0 -56
- package/publish/lib/esm/Table/utils/ToggleSelection.tsx +0 -225
- package/publish/lib/esm/Table/utils/func.ts +0 -171
- package/publish/lib/esm/Table/utils/hooks/useTableDraggable.tsx +0 -342
- package/publish/lib/esm/Table/utils/hooks/useTableKeyPress.tsx +0 -154
- package/publish/lib/esm/Table/utils/hooks/useTableResponsive.tsx +0 -92
- package/publish/lib/esm/Table/utils/hooks/useTableSort.tsx +0 -143
- 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 -352
- package/publish/lib/esm/Textarea/index.tsx +0 -608
- package/publish/lib/esm/Toast/Item.tsx +0 -124
- package/publish/lib/esm/Toast/index.scss +0 -269
- package/publish/lib/esm/Toast/index.tsx +0 -374
- package/publish/lib/esm/Tooltip/index.scss +0 -269
- package/publish/lib/esm/Tooltip/index.tsx +0 -312
- package/publish/lib/esm/Tree/TreeList.tsx +0 -616
- package/publish/lib/esm/Tree/index.scss +0 -386
- package/publish/lib/esm/Tree/index.tsx +0 -396
- package/publish/lib/esm/Tree/init-height.tsx +0 -27
- package/publish/lib/esm/Tree/utils/func.ts +0 -15
- package/publish/lib/esm/Utils/hooks/useAutosizeTextArea.tsx +0 -125
- 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 -420
- package/publish/lib/esm/Utils/hooks/useDraggable.tsx +0 -265
- package/publish/lib/esm/Utils/hooks/useInterval.tsx +0 -74
- package/publish/lib/esm/Utils/hooks/useIsMobile.tsx +0 -56
- package/publish/lib/esm/Utils/hooks/useKeyPress.tsx +0 -104
- 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 -578
- 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 -86
- 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 -104
- 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/tree.ts +0 -119
- 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 -43
- 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/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/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/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}/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}/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}/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}/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}/viewport.d.ts +0 -0
- /package/{publish/Utils → Utils}/viewport.js +0 -0
|
@@ -1,3704 +0,0 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(require("react"));
|
|
4
|
-
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define(["react"], factory);
|
|
6
|
-
else if(typeof exports === 'object')
|
|
7
|
-
exports["RPB"] = factory(require("react"));
|
|
8
|
-
else
|
|
9
|
-
root["RPB"] = factory(root["React"]);
|
|
10
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__787__) => {
|
|
11
|
-
return /******/ (() => { // webpackBootstrap
|
|
12
|
-
/******/ var __webpack_modules__ = ({
|
|
13
|
-
|
|
14
|
-
/***/ 954:
|
|
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 _typeof3(obj) { "@babel/helpers - typeof"; return _typeof3 = "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; }, _typeof3(obj); }
|
|
19
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
20
|
-
if (( false ? 0 : _typeof3(exports)) === 'object' && ( false ? 0 : _typeof3(module)) === 'object') module.exports = factory(__webpack_require__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787)], __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__) {
|
|
25
|
-
return (/******/function () {
|
|
26
|
-
// webpackBootstrap
|
|
27
|
-
/******/
|
|
28
|
-
var __webpack_modules__ = {
|
|
29
|
-
/***/188: /***/function _(module, exports, __nested_webpack_require_1080__) {
|
|
30
|
-
/* module decorator */module = __nested_webpack_require_1080__.nmd(module);
|
|
31
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
32
|
-
function _typeof2(obj) {
|
|
33
|
-
"@babel/helpers - typeof";
|
|
34
|
-
|
|
35
|
-
return _typeof2 = "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
|
-
}, _typeof2(obj);
|
|
40
|
-
}
|
|
41
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
42
|
-
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, __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 () {
|
|
44
|
-
return (/******/function () {
|
|
45
|
-
// webpackBootstrap
|
|
46
|
-
/******/
|
|
47
|
-
"use strict";
|
|
48
|
-
|
|
49
|
-
/******/ // The require scope
|
|
50
|
-
/******/
|
|
51
|
-
var __nested_webpack_require_993__ = {};
|
|
52
|
-
/******/
|
|
53
|
-
/************************************************************************/
|
|
54
|
-
/******/ /* webpack/runtime/define property getters */
|
|
55
|
-
/******/
|
|
56
|
-
(function () {
|
|
57
|
-
/******/ // define getter functions for harmony exports
|
|
58
|
-
/******/__nested_webpack_require_993__.d = function (exports, definition) {
|
|
59
|
-
/******/for (var key in definition) {
|
|
60
|
-
/******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
|
|
61
|
-
/******/Object.defineProperty(exports, key, {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: definition[key]
|
|
64
|
-
});
|
|
65
|
-
/******/
|
|
66
|
-
}
|
|
67
|
-
/******/
|
|
68
|
-
}
|
|
69
|
-
/******/
|
|
70
|
-
};
|
|
71
|
-
/******/
|
|
72
|
-
})();
|
|
73
|
-
/******/
|
|
74
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
75
|
-
/******/
|
|
76
|
-
(function () {
|
|
77
|
-
/******/__nested_webpack_require_993__.o = function (obj, prop) {
|
|
78
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
79
|
-
};
|
|
80
|
-
/******/
|
|
81
|
-
})();
|
|
82
|
-
/******/
|
|
83
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
84
|
-
/******/
|
|
85
|
-
(function () {
|
|
86
|
-
/******/ // define __esModule on exports
|
|
87
|
-
/******/__nested_webpack_require_993__.r = function (exports) {
|
|
88
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
89
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
90
|
-
value: 'Module'
|
|
91
|
-
});
|
|
92
|
-
/******/
|
|
93
|
-
}
|
|
94
|
-
/******/
|
|
95
|
-
Object.defineProperty(exports, '__esModule', {
|
|
96
|
-
value: true
|
|
97
|
-
});
|
|
98
|
-
/******/
|
|
99
|
-
};
|
|
100
|
-
/******/
|
|
101
|
-
})();
|
|
102
|
-
/******/
|
|
103
|
-
/************************************************************************/
|
|
104
|
-
var __webpack_exports__ = {};
|
|
105
|
-
__nested_webpack_require_993__.r(__webpack_exports__);
|
|
106
|
-
/* harmony export */
|
|
107
|
-
__nested_webpack_require_993__.d(__webpack_exports__, {
|
|
108
|
-
/* harmony export */"clsWrite": function clsWrite() {
|
|
109
|
-
return (/* binding */_clsWrite
|
|
110
|
-
);
|
|
111
|
-
},
|
|
112
|
-
/* harmony export */"combinedCls": function combinedCls() {
|
|
113
|
-
return (/* binding */_combinedCls
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
/* harmony export */
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
function _slicedToArray(arr, i) {
|
|
120
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
121
|
-
}
|
|
122
|
-
function _nonIterableRest() {
|
|
123
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
124
|
-
}
|
|
125
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
126
|
-
if (!o) return;
|
|
127
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
128
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
129
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
130
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
131
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
132
|
-
}
|
|
133
|
-
function _arrayLikeToArray(arr, len) {
|
|
134
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
135
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
136
|
-
return arr2;
|
|
137
|
-
}
|
|
138
|
-
function _iterableToArrayLimit(arr, i) {
|
|
139
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
140
|
-
if (null != _i) {
|
|
141
|
-
var _s,
|
|
142
|
-
_e,
|
|
143
|
-
_x,
|
|
144
|
-
_r,
|
|
145
|
-
_arr = [],
|
|
146
|
-
_n = !0,
|
|
147
|
-
_d = !1;
|
|
148
|
-
try {
|
|
149
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
150
|
-
if (Object(_i) !== _i) return;
|
|
151
|
-
_n = !1;
|
|
152
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
153
|
-
} catch (err) {
|
|
154
|
-
_d = !0, _e = err;
|
|
155
|
-
} finally {
|
|
156
|
-
try {
|
|
157
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
158
|
-
} finally {
|
|
159
|
-
if (_d) throw _e;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return _arr;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
function _arrayWithHoles(arr) {
|
|
166
|
-
if (Array.isArray(arr)) return arr;
|
|
167
|
-
}
|
|
168
|
-
function _typeof(obj) {
|
|
169
|
-
"@babel/helpers - typeof";
|
|
170
|
-
|
|
171
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
172
|
-
return typeof obj;
|
|
173
|
-
} : function (obj) {
|
|
174
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
175
|
-
}, _typeof(obj);
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Output of class name
|
|
179
|
-
* @param {*} s - Any
|
|
180
|
-
* @param {String} defaultCls - Default string
|
|
181
|
-
* @param {?*} targetCls - Any
|
|
182
|
-
* @returns {*}
|
|
183
|
-
*/
|
|
184
|
-
function _clsWrite(s, defaultCls) {
|
|
185
|
-
var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
186
|
-
return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Combined classnames
|
|
191
|
-
* @param {*} args
|
|
192
|
-
* @returns {String|undefined}
|
|
193
|
-
*/
|
|
194
|
-
/* Usage:
|
|
195
|
-
|
|
196
|
-
console.log(combinedCls('a-1', 'a-2', 'a-3', {
|
|
197
|
-
'p-1': null,
|
|
198
|
-
'p-2': undefined,
|
|
199
|
-
'p-3': true,
|
|
200
|
-
'p-4': false,
|
|
201
|
-
'p-5': 'kkk',
|
|
202
|
-
'p-6': 0,
|
|
203
|
-
'p-7': 1,
|
|
204
|
-
'p-8': '',
|
|
205
|
-
undefined
|
|
206
|
-
})); // a-1 a-2 a-3 p-3 p-5 p-7
|
|
207
|
-
*/
|
|
208
|
-
function _combinedCls() {
|
|
209
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
210
|
-
args[_key] = arguments[_key];
|
|
211
|
-
}
|
|
212
|
-
if (args) {
|
|
213
|
-
var classes = [];
|
|
214
|
-
for (var i = 0; i < args.length; i++) {
|
|
215
|
-
var className = args[i];
|
|
216
|
-
if (!className) {
|
|
217
|
-
continue;
|
|
218
|
-
}
|
|
219
|
-
var type = _typeof(className);
|
|
220
|
-
if (type === 'string' || type === 'number') {
|
|
221
|
-
classes.push(className);
|
|
222
|
-
} else if (type === 'object') {
|
|
223
|
-
var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
|
|
224
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
225
|
-
key = _ref2[0],
|
|
226
|
-
value = _ref2[1];
|
|
227
|
-
return value ? key : null;
|
|
228
|
-
});
|
|
229
|
-
classes = _classes.length ? classes.concat(_classes.filter(function (c) {
|
|
230
|
-
return !!c;
|
|
231
|
-
})) : classes;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
return classes.join(' ').trim();
|
|
235
|
-
}
|
|
236
|
-
return undefined;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/******/
|
|
240
|
-
return __webpack_exports__;
|
|
241
|
-
/******/
|
|
242
|
-
}()
|
|
243
|
-
);
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
/***/
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
/***/438: /***/function _(module, exports, __nested_webpack_require_11464__) {
|
|
250
|
-
/* module decorator */module = __nested_webpack_require_11464__.nmd(module);
|
|
251
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
252
|
-
function _typeof2(obj) {
|
|
253
|
-
"@babel/helpers - typeof";
|
|
254
|
-
|
|
255
|
-
return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
256
|
-
return typeof obj;
|
|
257
|
-
} : function (obj) {
|
|
258
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
259
|
-
}, _typeof2(obj);
|
|
260
|
-
}
|
|
261
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
262
|
-
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, __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 {}
|
|
263
|
-
})(this, function () {
|
|
264
|
-
return (/******/function () {
|
|
265
|
-
// webpackBootstrap
|
|
266
|
-
/******/
|
|
267
|
-
"use strict";
|
|
268
|
-
|
|
269
|
-
/******/ // The require scope
|
|
270
|
-
/******/
|
|
271
|
-
var __nested_webpack_require_993__ = {};
|
|
272
|
-
/******/
|
|
273
|
-
/************************************************************************/
|
|
274
|
-
/******/ /* webpack/runtime/define property getters */
|
|
275
|
-
/******/
|
|
276
|
-
(function () {
|
|
277
|
-
/******/ // define getter functions for harmony exports
|
|
278
|
-
/******/__nested_webpack_require_993__.d = function (exports, definition) {
|
|
279
|
-
/******/for (var key in definition) {
|
|
280
|
-
/******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
|
|
281
|
-
/******/Object.defineProperty(exports, key, {
|
|
282
|
-
enumerable: true,
|
|
283
|
-
get: definition[key]
|
|
284
|
-
});
|
|
285
|
-
/******/
|
|
286
|
-
}
|
|
287
|
-
/******/
|
|
288
|
-
}
|
|
289
|
-
/******/
|
|
290
|
-
};
|
|
291
|
-
/******/
|
|
292
|
-
})();
|
|
293
|
-
/******/
|
|
294
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
295
|
-
/******/
|
|
296
|
-
(function () {
|
|
297
|
-
/******/__nested_webpack_require_993__.o = function (obj, prop) {
|
|
298
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
299
|
-
};
|
|
300
|
-
/******/
|
|
301
|
-
})();
|
|
302
|
-
/******/
|
|
303
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
304
|
-
/******/
|
|
305
|
-
(function () {
|
|
306
|
-
/******/ // define __esModule on exports
|
|
307
|
-
/******/__nested_webpack_require_993__.r = function (exports) {
|
|
308
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
309
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
310
|
-
value: 'Module'
|
|
311
|
-
});
|
|
312
|
-
/******/
|
|
313
|
-
}
|
|
314
|
-
/******/
|
|
315
|
-
Object.defineProperty(exports, '__esModule', {
|
|
316
|
-
value: true
|
|
317
|
-
});
|
|
318
|
-
/******/
|
|
319
|
-
};
|
|
320
|
-
/******/
|
|
321
|
-
})();
|
|
322
|
-
/******/
|
|
323
|
-
/************************************************************************/
|
|
324
|
-
var __webpack_exports__ = {};
|
|
325
|
-
__nested_webpack_require_993__.r(__webpack_exports__);
|
|
326
|
-
/* harmony export */
|
|
327
|
-
__nested_webpack_require_993__.d(__webpack_exports__, {
|
|
328
|
-
/* harmony export */"addTreeDepth": function addTreeDepth() {
|
|
329
|
-
return (/* binding */_addTreeDepth
|
|
330
|
-
);
|
|
331
|
-
},
|
|
332
|
-
/* harmony export */"addTreeIndent": function addTreeIndent() {
|
|
333
|
-
return (/* binding */_addTreeIndent
|
|
334
|
-
);
|
|
335
|
-
},
|
|
336
|
-
/* harmony export */"convertTree": function convertTree() {
|
|
337
|
-
return (/* binding */_convertTree
|
|
338
|
-
);
|
|
339
|
-
},
|
|
340
|
-
/* harmony export */"flatTree": function flatTree() {
|
|
341
|
-
return (/* binding */_flatTree
|
|
342
|
-
);
|
|
343
|
-
},
|
|
344
|
-
/* harmony export */"getAllDepth": function getAllDepth() {
|
|
345
|
-
return (/* binding */_getAllDepth
|
|
346
|
-
);
|
|
347
|
-
}
|
|
348
|
-
/* harmony export */
|
|
349
|
-
});
|
|
350
|
-
|
|
351
|
-
function _typeof(obj) {
|
|
352
|
-
"@babel/helpers - typeof";
|
|
353
|
-
|
|
354
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
355
|
-
return typeof obj;
|
|
356
|
-
} : function (obj) {
|
|
357
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
358
|
-
}, _typeof(obj);
|
|
359
|
-
}
|
|
360
|
-
var _excluded = ["children"];
|
|
361
|
-
function _objectWithoutProperties(source, excluded) {
|
|
362
|
-
if (source == null) return {};
|
|
363
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
364
|
-
var key, i;
|
|
365
|
-
if (Object.getOwnPropertySymbols) {
|
|
366
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
367
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
368
|
-
key = sourceSymbolKeys[i];
|
|
369
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
370
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
371
|
-
target[key] = source[key];
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
return target;
|
|
375
|
-
}
|
|
376
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
377
|
-
if (source == null) return {};
|
|
378
|
-
var target = {};
|
|
379
|
-
var sourceKeys = Object.keys(source);
|
|
380
|
-
var key, i;
|
|
381
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
382
|
-
key = sourceKeys[i];
|
|
383
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
384
|
-
target[key] = source[key];
|
|
385
|
-
}
|
|
386
|
-
return target;
|
|
387
|
-
}
|
|
388
|
-
function ownKeys(object, enumerableOnly) {
|
|
389
|
-
var keys = Object.keys(object);
|
|
390
|
-
if (Object.getOwnPropertySymbols) {
|
|
391
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
392
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
393
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
394
|
-
})), keys.push.apply(keys, symbols);
|
|
395
|
-
}
|
|
396
|
-
return keys;
|
|
397
|
-
}
|
|
398
|
-
function _objectSpread(target) {
|
|
399
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
400
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
401
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
402
|
-
_defineProperty(target, key, source[key]);
|
|
403
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
404
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
return target;
|
|
408
|
-
}
|
|
409
|
-
function _defineProperty(obj, key, value) {
|
|
410
|
-
key = _toPropertyKey(key);
|
|
411
|
-
if (key in obj) {
|
|
412
|
-
Object.defineProperty(obj, key, {
|
|
413
|
-
value: value,
|
|
414
|
-
enumerable: true,
|
|
415
|
-
configurable: true,
|
|
416
|
-
writable: true
|
|
417
|
-
});
|
|
418
|
-
} else {
|
|
419
|
-
obj[key] = value;
|
|
420
|
-
}
|
|
421
|
-
return obj;
|
|
422
|
-
}
|
|
423
|
-
function _toPropertyKey(arg) {
|
|
424
|
-
var key = _toPrimitive(arg, "string");
|
|
425
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
426
|
-
}
|
|
427
|
-
function _toPrimitive(input, hint) {
|
|
428
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
429
|
-
var prim = input[Symbol.toPrimitive];
|
|
430
|
-
if (prim !== undefined) {
|
|
431
|
-
var res = prim.call(input, hint || "default");
|
|
432
|
-
if (_typeof(res) !== "object") return res;
|
|
433
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
434
|
-
}
|
|
435
|
-
return (hint === "string" ? String : Number)(input);
|
|
436
|
-
}
|
|
437
|
-
function _toConsumableArray(arr) {
|
|
438
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
439
|
-
}
|
|
440
|
-
function _nonIterableSpread() {
|
|
441
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
442
|
-
}
|
|
443
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
444
|
-
if (!o) return;
|
|
445
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
446
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
447
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
448
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
449
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
450
|
-
}
|
|
451
|
-
function _iterableToArray(iter) {
|
|
452
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
453
|
-
}
|
|
454
|
-
function _arrayWithoutHoles(arr) {
|
|
455
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
456
|
-
}
|
|
457
|
-
function _arrayLikeToArray(arr, len) {
|
|
458
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
459
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
460
|
-
return arr2;
|
|
461
|
-
}
|
|
462
|
-
function _objectDestructuringEmpty(obj) {
|
|
463
|
-
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
464
|
-
}
|
|
465
|
-
function _extends() {
|
|
466
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
467
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
468
|
-
var source = arguments[i];
|
|
469
|
-
for (var key in source) {
|
|
470
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
471
|
-
target[key] = source[key];
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
return target;
|
|
476
|
-
};
|
|
477
|
-
return _extends.apply(this, arguments);
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* Convert Tree
|
|
481
|
-
* @param {Array} arr - Flat array
|
|
482
|
-
* @param {?string | ?number} parentId - Parent id
|
|
483
|
-
* @param {?string} keyId - Key value of id.
|
|
484
|
-
* @param {?string} keyParentId - Key value of parent id.
|
|
485
|
-
* @returns Array
|
|
486
|
-
*/
|
|
487
|
-
function _convertTree(arr) {
|
|
488
|
-
var parentId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
489
|
-
var keyId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'id';
|
|
490
|
-
var keyParentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'parent_id';
|
|
491
|
-
if (!parentId) {
|
|
492
|
-
// If there is no parent id (when recursing for the first time), all parents will be queried
|
|
493
|
-
return arr.filter(function (item) {
|
|
494
|
-
return !item[keyParentId];
|
|
495
|
-
}).map(function (item) {
|
|
496
|
-
// Query all child nodes by parent node ID
|
|
497
|
-
item.children = _convertTree(arr, item[keyId], keyId, keyParentId);
|
|
498
|
-
return item;
|
|
499
|
-
});
|
|
500
|
-
} else {
|
|
501
|
-
return arr.filter(function (item) {
|
|
502
|
-
return item[keyParentId] === parentId;
|
|
503
|
-
}).map(function (item) {
|
|
504
|
-
// Query all child nodes by parent node ID
|
|
505
|
-
item.children = _convertTree(arr, item[keyId], keyId, keyParentId);
|
|
506
|
-
return item;
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Flat tree
|
|
513
|
-
* @param {Array} arr - Hierarchical array
|
|
514
|
-
* @returns Array
|
|
515
|
-
*/
|
|
516
|
-
function _flatTree(arr) {
|
|
517
|
-
var flatData = function flatData(_ref) {
|
|
518
|
-
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
519
|
-
var _rest$children = rest.children,
|
|
520
|
-
children = _rest$children === void 0 ? [] : _rest$children;
|
|
521
|
-
return [_objectSpread({}, rest)].concat(_toConsumableArray(children.flatMap(flatData)));
|
|
522
|
-
};
|
|
523
|
-
var result = arr.flatMap(flatData);
|
|
524
|
-
|
|
525
|
-
//remove children from item
|
|
526
|
-
result = result.map(function (item) {
|
|
527
|
-
delete item.children;
|
|
528
|
-
return item;
|
|
529
|
-
});
|
|
530
|
-
return result;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Get all depth
|
|
535
|
-
* @param {Object} node
|
|
536
|
-
* @returns Number
|
|
537
|
-
*/
|
|
538
|
-
function _getAllDepth(arr) {
|
|
539
|
-
var count = function count(children) {
|
|
540
|
-
return children.reduce(function (depth, child) {
|
|
541
|
-
return Math.max(depth, 1 + count(child.children)); // increment depth of children by 1, and compare it with accumulated depth of other children within the same element
|
|
542
|
-
}, 0); //default value 0 that's returned if there are no children
|
|
543
|
-
};
|
|
544
|
-
|
|
545
|
-
return count(arr);
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
/**
|
|
549
|
-
* Add depth to each item in the tree
|
|
550
|
-
* @param {Array} arr - Hierarchical array
|
|
551
|
-
* @param {?string} keyId - Key value of id.
|
|
552
|
-
* @param {?string} keyParentId - Key value of parent id.
|
|
553
|
-
* @param {?number} depth - Depth of the item.
|
|
554
|
-
* @returns Number
|
|
555
|
-
*/
|
|
556
|
-
function _addTreeDepth(arr) {
|
|
557
|
-
var keyId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'id';
|
|
558
|
-
var parentItem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
559
|
-
var depth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
560
|
-
return arr.reduce(function (acc, el) {
|
|
561
|
-
var children = el.children,
|
|
562
|
-
otherProps = _objectWithoutProperties(el, _excluded);
|
|
563
|
-
acc.push(_objectSpread(_objectSpread({}, otherProps), {}, {
|
|
564
|
-
parentItem: parentItem,
|
|
565
|
-
depth: depth
|
|
566
|
-
}));
|
|
567
|
-
if (children) {
|
|
568
|
-
return acc.concat(_addTreeDepth(children, keyId, el[keyId], depth + 1));
|
|
569
|
-
}
|
|
570
|
-
return acc;
|
|
571
|
-
}, []);
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* Add indent placeholder
|
|
576
|
-
* @param {Array} arr - Flat array
|
|
577
|
-
* @param {?string} placeholder - String of placeholder
|
|
578
|
-
* @param {?string} lastPlaceholder - Last String of placeholder
|
|
579
|
-
* @param {?string} keyName - Key value of name.
|
|
580
|
-
* @returns Array
|
|
581
|
-
*/
|
|
582
|
-
function _addTreeIndent(arr) {
|
|
583
|
-
var placeholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
|
|
584
|
-
var lastPlaceholder = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
585
|
-
var keyName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'label';
|
|
586
|
-
arr.forEach(function (item) {
|
|
587
|
-
var indent = '';
|
|
588
|
-
if (item.depth) {
|
|
589
|
-
Array(item.depth).fill(0).forEach(function (k, i) {
|
|
590
|
-
indent += placeholder;
|
|
591
|
-
if (i === item.depth - 1) {
|
|
592
|
-
item[keyName] = indent + lastPlaceholder + item[keyName];
|
|
593
|
-
}
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
|
-
});
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
/******/
|
|
600
|
-
return __webpack_exports__;
|
|
601
|
-
/******/
|
|
602
|
-
}()
|
|
603
|
-
);
|
|
604
|
-
});
|
|
605
|
-
|
|
606
|
-
/***/
|
|
607
|
-
},
|
|
608
|
-
|
|
609
|
-
/***/759: /***/function _(module, exports, __nested_webpack_require_29526__) {
|
|
610
|
-
/* module decorator */module = __nested_webpack_require_29526__.nmd(module);
|
|
611
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
612
|
-
function _typeof(obj) {
|
|
613
|
-
"@babel/helpers - typeof";
|
|
614
|
-
|
|
615
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
616
|
-
return typeof obj;
|
|
617
|
-
} : function (obj) {
|
|
618
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
619
|
-
}, _typeof(obj);
|
|
620
|
-
}
|
|
621
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
622
|
-
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_29526__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_29526__(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 {}
|
|
623
|
-
})(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
|
|
624
|
-
return (/******/function () {
|
|
625
|
-
// webpackBootstrap
|
|
626
|
-
/******/
|
|
627
|
-
"use strict";
|
|
628
|
-
|
|
629
|
-
/******/
|
|
630
|
-
var __webpack_modules__ = {
|
|
631
|
-
/***/787: /***/function _(module) {
|
|
632
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
633
|
-
|
|
634
|
-
/***/
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
/******/
|
|
638
|
-
};
|
|
639
|
-
/************************************************************************/
|
|
640
|
-
/******/ // The module cache
|
|
641
|
-
/******/
|
|
642
|
-
var __webpack_module_cache__ = {};
|
|
643
|
-
/******/
|
|
644
|
-
/******/ // The require function
|
|
645
|
-
/******/
|
|
646
|
-
function __nested_webpack_require_1465__(moduleId) {
|
|
647
|
-
/******/ // Check if module is in cache
|
|
648
|
-
/******/var cachedModule = __webpack_module_cache__[moduleId];
|
|
649
|
-
/******/
|
|
650
|
-
if (cachedModule !== undefined) {
|
|
651
|
-
/******/return cachedModule.exports;
|
|
652
|
-
/******/
|
|
653
|
-
}
|
|
654
|
-
/******/ // Create a new module (and put it into the cache)
|
|
655
|
-
/******/
|
|
656
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
657
|
-
/******/ // no module.id needed
|
|
658
|
-
/******/ // no module.loaded needed
|
|
659
|
-
/******/exports: {}
|
|
660
|
-
/******/
|
|
661
|
-
};
|
|
662
|
-
/******/
|
|
663
|
-
/******/ // Execute the module function
|
|
664
|
-
/******/
|
|
665
|
-
__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
|
|
666
|
-
/******/
|
|
667
|
-
/******/ // Return the exports of the module
|
|
668
|
-
/******/
|
|
669
|
-
return module.exports;
|
|
670
|
-
/******/
|
|
671
|
-
}
|
|
672
|
-
/******/
|
|
673
|
-
/************************************************************************/
|
|
674
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
675
|
-
/******/
|
|
676
|
-
(function () {
|
|
677
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
678
|
-
/******/__nested_webpack_require_1465__.n = function (module) {
|
|
679
|
-
/******/var getter = module && module.__esModule ? /******/function () {
|
|
680
|
-
return module['default'];
|
|
681
|
-
} : /******/function () {
|
|
682
|
-
return module;
|
|
683
|
-
};
|
|
684
|
-
/******/
|
|
685
|
-
__nested_webpack_require_1465__.d(getter, {
|
|
686
|
-
a: getter
|
|
687
|
-
});
|
|
688
|
-
/******/
|
|
689
|
-
return getter;
|
|
690
|
-
/******/
|
|
691
|
-
};
|
|
692
|
-
/******/
|
|
693
|
-
})();
|
|
694
|
-
/******/
|
|
695
|
-
/******/ /* webpack/runtime/define property getters */
|
|
696
|
-
/******/
|
|
697
|
-
(function () {
|
|
698
|
-
/******/ // define getter functions for harmony exports
|
|
699
|
-
/******/__nested_webpack_require_1465__.d = function (exports, definition) {
|
|
700
|
-
/******/for (var key in definition) {
|
|
701
|
-
/******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
|
|
702
|
-
/******/Object.defineProperty(exports, key, {
|
|
703
|
-
enumerable: true,
|
|
704
|
-
get: definition[key]
|
|
705
|
-
});
|
|
706
|
-
/******/
|
|
707
|
-
}
|
|
708
|
-
/******/
|
|
709
|
-
}
|
|
710
|
-
/******/
|
|
711
|
-
};
|
|
712
|
-
/******/
|
|
713
|
-
})();
|
|
714
|
-
/******/
|
|
715
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
716
|
-
/******/
|
|
717
|
-
(function () {
|
|
718
|
-
/******/__nested_webpack_require_1465__.o = function (obj, prop) {
|
|
719
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
720
|
-
};
|
|
721
|
-
/******/
|
|
722
|
-
})();
|
|
723
|
-
/******/
|
|
724
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
725
|
-
/******/
|
|
726
|
-
(function () {
|
|
727
|
-
/******/ // define __esModule on exports
|
|
728
|
-
/******/__nested_webpack_require_1465__.r = function (exports) {
|
|
729
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
730
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
731
|
-
value: 'Module'
|
|
732
|
-
});
|
|
733
|
-
/******/
|
|
734
|
-
}
|
|
735
|
-
/******/
|
|
736
|
-
Object.defineProperty(exports, '__esModule', {
|
|
737
|
-
value: true
|
|
738
|
-
});
|
|
739
|
-
/******/
|
|
740
|
-
};
|
|
741
|
-
/******/
|
|
742
|
-
})();
|
|
743
|
-
/******/
|
|
744
|
-
/************************************************************************/
|
|
745
|
-
var __webpack_exports__ = {};
|
|
746
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
747
|
-
(function () {
|
|
748
|
-
__nested_webpack_require_1465__.r(__webpack_exports__);
|
|
749
|
-
/* harmony export */
|
|
750
|
-
__nested_webpack_require_1465__.d(__webpack_exports__, {
|
|
751
|
-
/* harmony export */"default": function _default() {
|
|
752
|
-
return __WEBPACK_DEFAULT_EXPORT__;
|
|
753
|
-
},
|
|
754
|
-
/* harmony export */"useBoundedDrag": function useBoundedDrag() {
|
|
755
|
-
return (/* binding */_useBoundedDrag
|
|
756
|
-
);
|
|
757
|
-
}
|
|
758
|
-
/* harmony export */
|
|
759
|
-
});
|
|
760
|
-
/* harmony import */
|
|
761
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
|
|
762
|
-
/* harmony import */
|
|
763
|
-
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
764
|
-
function _slicedToArray(arr, i) {
|
|
765
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
766
|
-
}
|
|
767
|
-
function _nonIterableRest() {
|
|
768
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
769
|
-
}
|
|
770
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
771
|
-
if (!o) return;
|
|
772
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
773
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
774
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
775
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
776
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
777
|
-
}
|
|
778
|
-
function _arrayLikeToArray(arr, len) {
|
|
779
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
780
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
781
|
-
return arr2;
|
|
782
|
-
}
|
|
783
|
-
function _iterableToArrayLimit(arr, i) {
|
|
784
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
785
|
-
if (null != _i) {
|
|
786
|
-
var _s,
|
|
787
|
-
_e,
|
|
788
|
-
_x,
|
|
789
|
-
_r,
|
|
790
|
-
_arr = [],
|
|
791
|
-
_n = !0,
|
|
792
|
-
_d = !1;
|
|
793
|
-
try {
|
|
794
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
795
|
-
if (Object(_i) !== _i) return;
|
|
796
|
-
_n = !1;
|
|
797
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
798
|
-
} catch (err) {
|
|
799
|
-
_d = !0, _e = err;
|
|
800
|
-
} finally {
|
|
801
|
-
try {
|
|
802
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
803
|
-
} finally {
|
|
804
|
-
if (_d) throw _e;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
return _arr;
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
function _arrayWithHoles(arr) {
|
|
811
|
-
if (Array.isArray(arr)) return arr;
|
|
812
|
-
}
|
|
813
|
-
/**
|
|
814
|
-
* Bounded Drag
|
|
815
|
-
*
|
|
816
|
-
* @usage:
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
const App = () => {
|
|
820
|
-
const [items, setItems] = useState<ListItem[]>([]);
|
|
821
|
-
// ... other states and refs
|
|
822
|
-
|
|
823
|
-
const deepCloneWithReactNode = (obj: any): any => {
|
|
824
|
-
if (obj === null || typeof obj !== 'object') {
|
|
825
|
-
return obj;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
// Handle array
|
|
829
|
-
if (Array.isArray(obj)) {
|
|
830
|
-
return obj.map(item => deepCloneWithReactNode(item));
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
// Handle object
|
|
834
|
-
const clonedObj: any = {};
|
|
835
|
-
for (const key in obj) {
|
|
836
|
-
if (key === 'appendControl') {
|
|
837
|
-
clonedObj[key] = obj[key];
|
|
838
|
-
} else {
|
|
839
|
-
clonedObj[key] = deepCloneWithReactNode(obj[key]);
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
return clonedObj;
|
|
843
|
-
};
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
const getItemWithChildrenIndices = (items: ListItem[], startIndex: number): number[] => {
|
|
847
|
-
const indices = [startIndex];
|
|
848
|
-
const startItem = items[startIndex];
|
|
849
|
-
const startDepth = startItem.depth || 0;
|
|
850
|
-
|
|
851
|
-
// Check if subsequent items are child items
|
|
852
|
-
for (let i = startIndex + 1; i < items.length; i++) {
|
|
853
|
-
const currentItem = items[i];
|
|
854
|
-
const currentDepth = currentItem.depth || 0;
|
|
855
|
-
if (currentDepth > startDepth) {
|
|
856
|
-
indices.push(i);
|
|
857
|
-
} else {
|
|
858
|
-
break;
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
return indices;
|
|
863
|
-
};
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
const { isDragging, dragHandlers } = useBoundedDrag({
|
|
867
|
-
dragMode,
|
|
868
|
-
boundarySelector: '.custom-draggable-list',
|
|
869
|
-
itemSelector:'.custom-draggable-list__item',
|
|
870
|
-
dragHandleSelector: '.custom-draggable-list__handle',
|
|
871
|
-
onDragStart: (index: number) => {
|
|
872
|
-
// Additional drag start logic if needed
|
|
873
|
-
},
|
|
874
|
-
onDragOver: (dragIndex: number | null, dropIndex: number | null) => {
|
|
875
|
-
// Additional drag over logic if needed
|
|
876
|
-
},
|
|
877
|
-
onDragEnd: (dragIndex: number | null, dropIndex: number | null) => {
|
|
878
|
-
if (dragIndex !== null && dropIndex !== null && dragIndex !== dropIndex) {
|
|
879
|
-
// Handle item movement
|
|
880
|
-
const newItems = deepCloneWithReactNode(items);
|
|
881
|
-
const itemsToMove = getItemWithChildrenIndices(newItems, dragIndex);
|
|
882
|
-
const itemsBeingMoved = itemsToMove.map(index => newItems[index]);
|
|
883
|
-
|
|
884
|
-
// ... rest of your existing drag end logic ...
|
|
885
|
-
|
|
886
|
-
setItems(updatedItems);
|
|
887
|
-
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
});
|
|
891
|
-
|
|
892
|
-
// Update your JSX to use the new handlers
|
|
893
|
-
return (
|
|
894
|
-
<ul className="custom-draggable-list">
|
|
895
|
-
{items.map((item: any, index: number) => (
|
|
896
|
-
<li
|
|
897
|
-
// ... other props
|
|
898
|
-
draggable={!draggable ? undefined : editingItem !== item.id && "true"}
|
|
899
|
-
onDragStart={!draggable ? undefined : (e) => dragHandlers.handleDragStart(e, index)}
|
|
900
|
-
onDragOver={!draggable ? undefined : dragHandlers.handleDragOver}
|
|
901
|
-
onDragEnd={!draggable ? undefined : dragHandlers.handleDragEnd}
|
|
902
|
-
onTouchStart={!draggable ? undefined : (e) => dragHandlers.handleDragStart(e, index)}
|
|
903
|
-
onTouchMove={!draggable ? undefined : dragHandlers.handleDragOver}
|
|
904
|
-
onTouchEnd={!draggable ? undefined : dragHandlers.handleDragEnd}
|
|
905
|
-
>
|
|
906
|
-
<li className="custom-draggable-list__item">
|
|
907
|
-
<span className="custom-draggable-list__handle">☰</span>
|
|
908
|
-
<i>content {indec}<i>
|
|
909
|
-
</li>
|
|
910
|
-
</li>
|
|
911
|
-
))}
|
|
912
|
-
</ul>
|
|
913
|
-
);
|
|
914
|
-
|
|
915
|
-
*/
|
|
916
|
-
|
|
917
|
-
var _useBoundedDrag = function useBoundedDrag() {
|
|
918
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
919
|
-
var _options$dragMode = options.dragMode,
|
|
920
|
-
dragMode = _options$dragMode === void 0 ? 'handle' : _options$dragMode,
|
|
921
|
-
_options$boundarySele = options.boundarySelector,
|
|
922
|
-
boundarySelector = _options$boundarySele === void 0 ? '.custom-draggable-list' : _options$boundarySele,
|
|
923
|
-
_options$itemSelector = options.itemSelector,
|
|
924
|
-
itemSelector = _options$itemSelector === void 0 ? '.custom-draggable-list__item' : _options$itemSelector,
|
|
925
|
-
_options$dragHandleSe = options.dragHandleSelector,
|
|
926
|
-
dragHandleSelector = _options$dragHandleSe === void 0 ? '.custom-draggable-list__handle' : _options$dragHandleSe,
|
|
927
|
-
onDragStart = options.onDragStart,
|
|
928
|
-
onDragOver = options.onDragOver,
|
|
929
|
-
onDragEnd = options.onDragEnd;
|
|
930
|
-
var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
931
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
932
|
-
isDragging = _useState2[0],
|
|
933
|
-
setIsDragging = _useState2[1];
|
|
934
|
-
var dragItem = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
935
|
-
var dragOverItem = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
936
|
-
var dragNode = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
937
|
-
var touchOffset = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)({
|
|
938
|
-
x: 0,
|
|
939
|
-
y: 0
|
|
940
|
-
});
|
|
941
|
-
var currentHoverItem = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
942
|
-
var handleDragStart = function handleDragStart(e, position) {
|
|
943
|
-
var isTouch = ('touches' in e);
|
|
944
|
-
var target = e.target;
|
|
945
|
-
|
|
946
|
-
// For block mode or handle mode check
|
|
947
|
-
if (dragMode === 'handle') {
|
|
948
|
-
var handle = target.closest(dragHandleSelector);
|
|
949
|
-
if (!handle) {
|
|
950
|
-
if (!isTouch) e.preventDefault();
|
|
951
|
-
return false;
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
// Find the draggable item
|
|
956
|
-
var listItem = target.closest(itemSelector);
|
|
957
|
-
if (!listItem) return;
|
|
958
|
-
|
|
959
|
-
// Check boundary
|
|
960
|
-
var boundary = listItem.closest(boundarySelector);
|
|
961
|
-
if (!boundary) return;
|
|
962
|
-
dragItem.current = position;
|
|
963
|
-
onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart(position);
|
|
964
|
-
if (isTouch) {
|
|
965
|
-
e.preventDefault(); // Prevent scrolling
|
|
966
|
-
var touch = e.touches[0];
|
|
967
|
-
var rect = listItem.getBoundingClientRect();
|
|
968
|
-
var boundaryRect = boundary.getBoundingClientRect();
|
|
969
|
-
|
|
970
|
-
// Calculate offset relative to the boundary
|
|
971
|
-
touchOffset.current = {
|
|
972
|
-
x: touch.clientX - rect.left,
|
|
973
|
-
y: touch.clientY - rect.top
|
|
974
|
-
};
|
|
975
|
-
|
|
976
|
-
// Clone the item for dragging
|
|
977
|
-
dragNode.current = listItem.cloneNode(true);
|
|
978
|
-
dragNode.current.classList.add('dragging');
|
|
979
|
-
|
|
980
|
-
// Style the clone
|
|
981
|
-
Object.assign(dragNode.current.style, {
|
|
982
|
-
position: 'fixed',
|
|
983
|
-
width: "".concat(rect.width, "px"),
|
|
984
|
-
height: "".concat(rect.height, "px"),
|
|
985
|
-
left: "".concat(rect.left, "px"),
|
|
986
|
-
top: "".concat(rect.top, "px"),
|
|
987
|
-
zIndex: '1000',
|
|
988
|
-
pointerEvents: 'none',
|
|
989
|
-
transform: 'scale(1.05)',
|
|
990
|
-
transition: 'transform 0.1s',
|
|
991
|
-
opacity: '0.9'
|
|
992
|
-
});
|
|
993
|
-
document.body.appendChild(dragNode.current);
|
|
994
|
-
setIsDragging(true);
|
|
995
|
-
listItem.classList.add('dragging-placeholder');
|
|
996
|
-
} else {
|
|
997
|
-
// ... desktop drag logic remains the same ...
|
|
998
|
-
}
|
|
999
|
-
};
|
|
1000
|
-
var handleDragOver = function handleDragOver(e) {
|
|
1001
|
-
e.preventDefault();
|
|
1002
|
-
var isTouch = ('touches' in e);
|
|
1003
|
-
if (!isTouch) {
|
|
1004
|
-
e.dataTransfer.dropEffect = 'move';
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
// Get the current pointer/touch position
|
|
1008
|
-
var point = isTouch ? e.touches[0] : {
|
|
1009
|
-
clientX: e.clientX,
|
|
1010
|
-
clientY: e.clientY
|
|
1011
|
-
};
|
|
1012
|
-
|
|
1013
|
-
// Update dragged element position for touch events
|
|
1014
|
-
if (isTouch && isDragging && dragNode.current) {
|
|
1015
|
-
dragNode.current.style.left = "".concat(point.clientX - touchOffset.current.x, "px");
|
|
1016
|
-
dragNode.current.style.top = "".concat(point.clientY - touchOffset.current.y, "px");
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
// Find the element below the pointer/touch
|
|
1020
|
-
var elemBelow = document.elementFromPoint(point.clientX, point.clientY);
|
|
1021
|
-
if (!elemBelow) return;
|
|
1022
|
-
|
|
1023
|
-
// Find the closest list item
|
|
1024
|
-
var listItem = elemBelow.closest(itemSelector);
|
|
1025
|
-
if (!listItem || listItem === currentHoverItem.current) return;
|
|
1026
|
-
|
|
1027
|
-
// Check boundary
|
|
1028
|
-
var boundary = listItem.closest(boundarySelector);
|
|
1029
|
-
if (!boundary) return;
|
|
1030
|
-
|
|
1031
|
-
// Update hover states
|
|
1032
|
-
if (currentHoverItem.current) {
|
|
1033
|
-
currentHoverItem.current.classList.remove('drag-over', 'drag-over-top', 'drag-over-bottom');
|
|
1034
|
-
}
|
|
1035
|
-
currentHoverItem.current = listItem;
|
|
1036
|
-
listItem.classList.add('drag-over');
|
|
1037
|
-
|
|
1038
|
-
// Calculate position in list
|
|
1039
|
-
var position = Array.from(listItem.parentNode.children).indexOf(listItem);
|
|
1040
|
-
dragOverItem.current = position;
|
|
1041
|
-
|
|
1042
|
-
// Determine drop position (top/bottom)
|
|
1043
|
-
var rect = listItem.getBoundingClientRect();
|
|
1044
|
-
var middleY = rect.top + rect.height / 2;
|
|
1045
|
-
if (point.clientY < middleY) {
|
|
1046
|
-
listItem.classList.add('drag-over-top');
|
|
1047
|
-
} else {
|
|
1048
|
-
listItem.classList.add('drag-over-bottom');
|
|
1049
|
-
}
|
|
1050
|
-
onDragOver === null || onDragOver === void 0 ? void 0 : onDragOver(dragItem.current, dragOverItem.current);
|
|
1051
|
-
};
|
|
1052
|
-
var handleDragEnd = function handleDragEnd(e) {
|
|
1053
|
-
var isTouch = ('touches' in e);
|
|
1054
|
-
if (isTouch && !isDragging) return;
|
|
1055
|
-
onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(dragItem.current, dragOverItem.current);
|
|
1056
|
-
|
|
1057
|
-
// Cleanup
|
|
1058
|
-
if (dragNode.current) {
|
|
1059
|
-
dragNode.current.remove();
|
|
1060
|
-
dragNode.current = null;
|
|
1061
|
-
}
|
|
1062
|
-
document.querySelectorAll(itemSelector).forEach(function (item) {
|
|
1063
|
-
item.style.opacity = '1';
|
|
1064
|
-
item.classList.remove('dragging', 'dragging-placeholder', 'drag-over', 'drag-over-top', 'drag-over-bottom');
|
|
1065
|
-
});
|
|
1066
|
-
setIsDragging(false);
|
|
1067
|
-
currentHoverItem.current = null;
|
|
1068
|
-
dragItem.current = null;
|
|
1069
|
-
dragOverItem.current = null;
|
|
1070
|
-
};
|
|
1071
|
-
return {
|
|
1072
|
-
isDragging: isDragging,
|
|
1073
|
-
dragHandlers: {
|
|
1074
|
-
handleDragStart: handleDragStart,
|
|
1075
|
-
handleDragOver: handleDragOver,
|
|
1076
|
-
handleDragEnd: handleDragEnd
|
|
1077
|
-
}
|
|
1078
|
-
};
|
|
1079
|
-
};
|
|
1080
|
-
/* harmony default export */
|
|
1081
|
-
var __WEBPACK_DEFAULT_EXPORT__ = _useBoundedDrag;
|
|
1082
|
-
})();
|
|
1083
|
-
|
|
1084
|
-
/******/
|
|
1085
|
-
return __webpack_exports__;
|
|
1086
|
-
/******/
|
|
1087
|
-
}()
|
|
1088
|
-
);
|
|
1089
|
-
});
|
|
1090
|
-
|
|
1091
|
-
/***/
|
|
1092
|
-
},
|
|
1093
|
-
|
|
1094
|
-
/***/787: /***/function _(module) {
|
|
1095
|
-
"use strict";
|
|
1096
|
-
|
|
1097
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
1098
|
-
|
|
1099
|
-
/***/
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
/******/
|
|
1103
|
-
};
|
|
1104
|
-
/************************************************************************/
|
|
1105
|
-
/******/ // The module cache
|
|
1106
|
-
/******/
|
|
1107
|
-
var __webpack_module_cache__ = {};
|
|
1108
|
-
/******/
|
|
1109
|
-
/******/ // The require function
|
|
1110
|
-
/******/
|
|
1111
|
-
function __nested_webpack_require_54634__(moduleId) {
|
|
1112
|
-
/******/ // Check if module is in cache
|
|
1113
|
-
/******/var cachedModule = __webpack_module_cache__[moduleId];
|
|
1114
|
-
/******/
|
|
1115
|
-
if (cachedModule !== undefined) {
|
|
1116
|
-
/******/return cachedModule.exports;
|
|
1117
|
-
/******/
|
|
1118
|
-
}
|
|
1119
|
-
/******/ // Create a new module (and put it into the cache)
|
|
1120
|
-
/******/
|
|
1121
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
1122
|
-
/******/id: moduleId,
|
|
1123
|
-
/******/loaded: false,
|
|
1124
|
-
/******/exports: {}
|
|
1125
|
-
/******/
|
|
1126
|
-
};
|
|
1127
|
-
/******/
|
|
1128
|
-
/******/ // Execute the module function
|
|
1129
|
-
/******/
|
|
1130
|
-
__webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_54634__);
|
|
1131
|
-
/******/
|
|
1132
|
-
/******/ // Flag the module as loaded
|
|
1133
|
-
/******/
|
|
1134
|
-
module.loaded = true;
|
|
1135
|
-
/******/
|
|
1136
|
-
/******/ // Return the exports of the module
|
|
1137
|
-
/******/
|
|
1138
|
-
return module.exports;
|
|
1139
|
-
/******/
|
|
1140
|
-
}
|
|
1141
|
-
/******/
|
|
1142
|
-
/************************************************************************/
|
|
1143
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
1144
|
-
/******/
|
|
1145
|
-
(function () {
|
|
1146
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
1147
|
-
/******/__nested_webpack_require_54634__.n = function (module) {
|
|
1148
|
-
/******/var getter = module && module.__esModule ? /******/function () {
|
|
1149
|
-
return module['default'];
|
|
1150
|
-
} : /******/function () {
|
|
1151
|
-
return module;
|
|
1152
|
-
};
|
|
1153
|
-
/******/
|
|
1154
|
-
__nested_webpack_require_54634__.d(getter, {
|
|
1155
|
-
a: getter
|
|
1156
|
-
});
|
|
1157
|
-
/******/
|
|
1158
|
-
return getter;
|
|
1159
|
-
/******/
|
|
1160
|
-
};
|
|
1161
|
-
/******/
|
|
1162
|
-
})();
|
|
1163
|
-
/******/
|
|
1164
|
-
/******/ /* webpack/runtime/define property getters */
|
|
1165
|
-
/******/
|
|
1166
|
-
(function () {
|
|
1167
|
-
/******/ // define getter functions for harmony exports
|
|
1168
|
-
/******/__nested_webpack_require_54634__.d = function (exports, definition) {
|
|
1169
|
-
/******/for (var key in definition) {
|
|
1170
|
-
/******/if (__nested_webpack_require_54634__.o(definition, key) && !__nested_webpack_require_54634__.o(exports, key)) {
|
|
1171
|
-
/******/Object.defineProperty(exports, key, {
|
|
1172
|
-
enumerable: true,
|
|
1173
|
-
get: definition[key]
|
|
1174
|
-
});
|
|
1175
|
-
/******/
|
|
1176
|
-
}
|
|
1177
|
-
/******/
|
|
1178
|
-
}
|
|
1179
|
-
/******/
|
|
1180
|
-
};
|
|
1181
|
-
/******/
|
|
1182
|
-
})();
|
|
1183
|
-
/******/
|
|
1184
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1185
|
-
/******/
|
|
1186
|
-
(function () {
|
|
1187
|
-
/******/__nested_webpack_require_54634__.o = function (obj, prop) {
|
|
1188
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
1189
|
-
};
|
|
1190
|
-
/******/
|
|
1191
|
-
})();
|
|
1192
|
-
/******/
|
|
1193
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
1194
|
-
/******/
|
|
1195
|
-
(function () {
|
|
1196
|
-
/******/ // define __esModule on exports
|
|
1197
|
-
/******/__nested_webpack_require_54634__.r = function (exports) {
|
|
1198
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
1199
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
1200
|
-
value: 'Module'
|
|
1201
|
-
});
|
|
1202
|
-
/******/
|
|
1203
|
-
}
|
|
1204
|
-
/******/
|
|
1205
|
-
Object.defineProperty(exports, '__esModule', {
|
|
1206
|
-
value: true
|
|
1207
|
-
});
|
|
1208
|
-
/******/
|
|
1209
|
-
};
|
|
1210
|
-
/******/
|
|
1211
|
-
})();
|
|
1212
|
-
/******/
|
|
1213
|
-
/******/ /* webpack/runtime/node module decorator */
|
|
1214
|
-
/******/
|
|
1215
|
-
(function () {
|
|
1216
|
-
/******/__nested_webpack_require_54634__.nmd = function (module) {
|
|
1217
|
-
/******/module.paths = [];
|
|
1218
|
-
/******/
|
|
1219
|
-
if (!module.children) module.children = [];
|
|
1220
|
-
/******/
|
|
1221
|
-
return module;
|
|
1222
|
-
/******/
|
|
1223
|
-
};
|
|
1224
|
-
/******/
|
|
1225
|
-
})();
|
|
1226
|
-
/******/
|
|
1227
|
-
/************************************************************************/
|
|
1228
|
-
var __webpack_exports__ = {};
|
|
1229
|
-
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
1230
|
-
(function () {
|
|
1231
|
-
"use strict";
|
|
1232
|
-
|
|
1233
|
-
__nested_webpack_require_54634__.r(__webpack_exports__);
|
|
1234
|
-
/* harmony export */
|
|
1235
|
-
__nested_webpack_require_54634__.d(__webpack_exports__, {
|
|
1236
|
-
/* harmony export */"default": function _default() {
|
|
1237
|
-
return __WEBPACK_DEFAULT_EXPORT__;
|
|
1238
|
-
}
|
|
1239
|
-
/* harmony export */
|
|
1240
|
-
});
|
|
1241
|
-
/* harmony import */
|
|
1242
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_54634__(787);
|
|
1243
|
-
/* harmony import */
|
|
1244
|
-
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_54634__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1245
|
-
/* harmony import */
|
|
1246
|
-
var funda_utils_dist_cjs_tree__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_54634__(438);
|
|
1247
|
-
/* harmony import */
|
|
1248
|
-
var funda_utils_dist_cjs_tree__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_54634__.n(funda_utils_dist_cjs_tree__WEBPACK_IMPORTED_MODULE_1__);
|
|
1249
|
-
/* harmony import */
|
|
1250
|
-
var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__ = __nested_webpack_require_54634__(188);
|
|
1251
|
-
/* harmony import */
|
|
1252
|
-
var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nested_webpack_require_54634__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__);
|
|
1253
|
-
/* harmony import */
|
|
1254
|
-
var funda_utils_dist_cjs_useBoundedDrag__WEBPACK_IMPORTED_MODULE_3__ = __nested_webpack_require_54634__(759);
|
|
1255
|
-
/* harmony import */
|
|
1256
|
-
var funda_utils_dist_cjs_useBoundedDrag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nested_webpack_require_54634__.n(funda_utils_dist_cjs_useBoundedDrag__WEBPACK_IMPORTED_MODULE_3__);
|
|
1257
|
-
var _excluded = ["wrapperClassName", "prefix", "data", "draggable", "handleHide", "handleIcon", "handlePos", "dragMode", "editable", "itemStyle", "hierarchical", "indentation", "doubleIndent", "alternateCollapse", "arrow", "onUpdate"];
|
|
1258
|
-
function _extends() {
|
|
1259
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1260
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1261
|
-
var source = arguments[i];
|
|
1262
|
-
for (var key in source) {
|
|
1263
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1264
|
-
target[key] = source[key];
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
return target;
|
|
1269
|
-
};
|
|
1270
|
-
return _extends.apply(this, arguments);
|
|
1271
|
-
}
|
|
1272
|
-
function ownKeys(object, enumerableOnly) {
|
|
1273
|
-
var keys = Object.keys(object);
|
|
1274
|
-
if (Object.getOwnPropertySymbols) {
|
|
1275
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
1276
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
1277
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1278
|
-
})), keys.push.apply(keys, symbols);
|
|
1279
|
-
}
|
|
1280
|
-
return keys;
|
|
1281
|
-
}
|
|
1282
|
-
function _objectSpread(target) {
|
|
1283
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1284
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
1285
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
1286
|
-
_defineProperty(target, key, source[key]);
|
|
1287
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
1288
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1289
|
-
});
|
|
1290
|
-
}
|
|
1291
|
-
return target;
|
|
1292
|
-
}
|
|
1293
|
-
function _defineProperty(obj, key, value) {
|
|
1294
|
-
key = _toPropertyKey(key);
|
|
1295
|
-
if (key in obj) {
|
|
1296
|
-
Object.defineProperty(obj, key, {
|
|
1297
|
-
value: value,
|
|
1298
|
-
enumerable: true,
|
|
1299
|
-
configurable: true,
|
|
1300
|
-
writable: true
|
|
1301
|
-
});
|
|
1302
|
-
} else {
|
|
1303
|
-
obj[key] = value;
|
|
1304
|
-
}
|
|
1305
|
-
return obj;
|
|
1306
|
-
}
|
|
1307
|
-
function _toPropertyKey(arg) {
|
|
1308
|
-
var key = _toPrimitive(arg, "string");
|
|
1309
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
1310
|
-
}
|
|
1311
|
-
function _toPrimitive(input, hint) {
|
|
1312
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
1313
|
-
var prim = input[Symbol.toPrimitive];
|
|
1314
|
-
if (prim !== undefined) {
|
|
1315
|
-
var res = prim.call(input, hint || "default");
|
|
1316
|
-
if (_typeof(res) !== "object") return res;
|
|
1317
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1318
|
-
}
|
|
1319
|
-
return (hint === "string" ? String : Number)(input);
|
|
1320
|
-
}
|
|
1321
|
-
function _toConsumableArray(arr) {
|
|
1322
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1323
|
-
}
|
|
1324
|
-
function _nonIterableSpread() {
|
|
1325
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1326
|
-
}
|
|
1327
|
-
function _iterableToArray(iter) {
|
|
1328
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1329
|
-
}
|
|
1330
|
-
function _arrayWithoutHoles(arr) {
|
|
1331
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1332
|
-
}
|
|
1333
|
-
function _typeof(obj) {
|
|
1334
|
-
"@babel/helpers - typeof";
|
|
1335
|
-
|
|
1336
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1337
|
-
return typeof obj;
|
|
1338
|
-
} : function (obj) {
|
|
1339
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1340
|
-
}, _typeof(obj);
|
|
1341
|
-
}
|
|
1342
|
-
function _slicedToArray(arr, i) {
|
|
1343
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
1344
|
-
}
|
|
1345
|
-
function _nonIterableRest() {
|
|
1346
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1347
|
-
}
|
|
1348
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1349
|
-
if (!o) return;
|
|
1350
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1351
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1352
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1353
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1354
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1355
|
-
}
|
|
1356
|
-
function _arrayLikeToArray(arr, len) {
|
|
1357
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1358
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1359
|
-
return arr2;
|
|
1360
|
-
}
|
|
1361
|
-
function _iterableToArrayLimit(arr, i) {
|
|
1362
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1363
|
-
if (null != _i) {
|
|
1364
|
-
var _s,
|
|
1365
|
-
_e,
|
|
1366
|
-
_x,
|
|
1367
|
-
_r,
|
|
1368
|
-
_arr = [],
|
|
1369
|
-
_n = !0,
|
|
1370
|
-
_d = !1;
|
|
1371
|
-
try {
|
|
1372
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
1373
|
-
if (Object(_i) !== _i) return;
|
|
1374
|
-
_n = !1;
|
|
1375
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
1376
|
-
} catch (err) {
|
|
1377
|
-
_d = !0, _e = err;
|
|
1378
|
-
} finally {
|
|
1379
|
-
try {
|
|
1380
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
1381
|
-
} finally {
|
|
1382
|
-
if (_d) throw _e;
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
return _arr;
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
function _arrayWithHoles(arr) {
|
|
1389
|
-
if (Array.isArray(arr)) return arr;
|
|
1390
|
-
}
|
|
1391
|
-
function _objectWithoutProperties(source, excluded) {
|
|
1392
|
-
if (source == null) return {};
|
|
1393
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
1394
|
-
var key, i;
|
|
1395
|
-
if (Object.getOwnPropertySymbols) {
|
|
1396
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1397
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
1398
|
-
key = sourceSymbolKeys[i];
|
|
1399
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1400
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1401
|
-
target[key] = source[key];
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
return target;
|
|
1405
|
-
}
|
|
1406
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1407
|
-
if (source == null) return {};
|
|
1408
|
-
var target = {};
|
|
1409
|
-
var sourceKeys = Object.keys(source);
|
|
1410
|
-
var key, i;
|
|
1411
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1412
|
-
key = sourceKeys[i];
|
|
1413
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1414
|
-
target[key] = source[key];
|
|
1415
|
-
}
|
|
1416
|
-
return target;
|
|
1417
|
-
}
|
|
1418
|
-
var DragDropList = /*#__PURE__*/(0, react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
|
|
1419
|
-
var wrapperClassName = props.wrapperClassName,
|
|
1420
|
-
_props$prefix = props.prefix,
|
|
1421
|
-
prefix = _props$prefix === void 0 ? 'custom' : _props$prefix,
|
|
1422
|
-
data = props.data,
|
|
1423
|
-
_props$draggable = props.draggable,
|
|
1424
|
-
draggable = _props$draggable === void 0 ? true : _props$draggable,
|
|
1425
|
-
_props$handleHide = props.handleHide,
|
|
1426
|
-
handleHide = _props$handleHide === void 0 ? false : _props$handleHide,
|
|
1427
|
-
_props$handleIcon = props.handleIcon,
|
|
1428
|
-
handleIcon = _props$handleIcon === void 0 ? '☰' : _props$handleIcon,
|
|
1429
|
-
_props$handlePos = props.handlePos,
|
|
1430
|
-
handlePos = _props$handlePos === void 0 ? 'left' : _props$handlePos,
|
|
1431
|
-
_props$dragMode = props.dragMode,
|
|
1432
|
-
dragMode = _props$dragMode === void 0 ? 'handle' : _props$dragMode,
|
|
1433
|
-
_props$editable = props.editable,
|
|
1434
|
-
editable = _props$editable === void 0 ? false : _props$editable,
|
|
1435
|
-
itemStyle = props.itemStyle,
|
|
1436
|
-
_props$hierarchical = props.hierarchical,
|
|
1437
|
-
hierarchical = _props$hierarchical === void 0 ? true : _props$hierarchical,
|
|
1438
|
-
indentation = props.indentation,
|
|
1439
|
-
doubleIndent = props.doubleIndent,
|
|
1440
|
-
alternateCollapse = props.alternateCollapse,
|
|
1441
|
-
_props$arrow = props.arrow,
|
|
1442
|
-
arrow = _props$arrow === void 0 ? /*#__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", {
|
|
1443
|
-
viewBox: "0 0 22 22",
|
|
1444
|
-
width: "8px"
|
|
1445
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
1446
|
-
d: "m345.44 248.29l-194.29 194.28c-12.359 12.365-32.397 12.365-44.75 0-12.354-12.354-12.354-32.391 0-44.744l171.91-171.91-171.91-171.9c-12.354-12.359-12.354-32.394 0-44.748 12.354-12.359 32.391-12.359 44.75 0l194.29 194.28c6.177 6.18 9.262 14.271 9.262 22.366 0 8.099-3.091 16.196-9.267 22.373",
|
|
1447
|
-
transform: "matrix(.03541-.00013.00013.03541 2.98 3.02)",
|
|
1448
|
-
fill: "#a5a5a5"
|
|
1449
|
-
}))) : _props$arrow,
|
|
1450
|
-
onUpdate = props.onUpdate,
|
|
1451
|
-
attributes = _objectWithoutProperties(props, _excluded);
|
|
1452
|
-
var INDENT_PLACEHOLDER = doubleIndent ? " " : " ";
|
|
1453
|
-
var INDENT_LAST_PLACEHOLDER = "".concat(typeof indentation !== 'undefined' && indentation !== '' ? "".concat(indentation, " ") : '');
|
|
1454
|
-
var rootRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1455
|
-
var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
|
1456
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1457
|
-
items = _useState2[0],
|
|
1458
|
-
setItems = _useState2[1];
|
|
1459
|
-
var _useState3 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
|
1460
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
1461
|
-
editingItem = _useState4[0],
|
|
1462
|
-
setEditingItem = _useState4[1];
|
|
1463
|
-
var dragHandle = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1464
|
-
|
|
1465
|
-
// Edit
|
|
1466
|
-
var _useState5 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)({}),
|
|
1467
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
1468
|
-
editValue = _useState6[0],
|
|
1469
|
-
setEditValue = _useState6[1];
|
|
1470
|
-
|
|
1471
|
-
// Collapse/Expand
|
|
1472
|
-
var _useState7 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(new Set()),
|
|
1473
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
1474
|
-
collapsedItems = _useState8[0],
|
|
1475
|
-
setCollapsedItems = _useState8[1];
|
|
1476
|
-
|
|
1477
|
-
// Get editable field list
|
|
1478
|
-
var getEditableFields = function getEditableFields(item) {
|
|
1479
|
-
// Exclude fields that don't need to be edited
|
|
1480
|
-
var excludeFields = ['id', 'parentId', 'depth', 'children', 'disabled', 'appendControl', 'parentItem'];
|
|
1481
|
-
return Object.keys(item).filter(function (key) {
|
|
1482
|
-
return !excludeFields.includes(key);
|
|
1483
|
-
});
|
|
1484
|
-
};
|
|
1485
|
-
|
|
1486
|
-
// ================================================================
|
|
1487
|
-
// General
|
|
1488
|
-
// ================================================================
|
|
1489
|
-
var deepCloneWithReactNode = function deepCloneWithReactNode(obj) {
|
|
1490
|
-
if (obj === null || _typeof(obj) !== 'object') {
|
|
1491
|
-
return obj;
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
// Handle array
|
|
1495
|
-
if (Array.isArray(obj)) {
|
|
1496
|
-
return obj.map(function (item) {
|
|
1497
|
-
return deepCloneWithReactNode(item);
|
|
1498
|
-
});
|
|
1499
|
-
}
|
|
1500
|
-
|
|
1501
|
-
// Handle object
|
|
1502
|
-
var clonedObj = {};
|
|
1503
|
-
for (var _key in obj) {
|
|
1504
|
-
if (_key === 'appendControl') {
|
|
1505
|
-
clonedObj[_key] = obj[_key];
|
|
1506
|
-
} else {
|
|
1507
|
-
clonedObj[_key] = deepCloneWithReactNode(obj[_key]);
|
|
1508
|
-
}
|
|
1509
|
-
}
|
|
1510
|
-
return clonedObj;
|
|
1511
|
-
};
|
|
1512
|
-
var getItemWithChildrenIndices = function getItemWithChildrenIndices(items, startIndex) {
|
|
1513
|
-
var indices = [startIndex];
|
|
1514
|
-
var startItem = items[startIndex];
|
|
1515
|
-
var startDepth = startItem.depth || 0;
|
|
1516
|
-
|
|
1517
|
-
// Check if subsequent items are child items
|
|
1518
|
-
for (var i = startIndex + 1; i < items.length; i++) {
|
|
1519
|
-
var currentItem = items[i];
|
|
1520
|
-
var currentDepth = currentItem.depth || 0;
|
|
1521
|
-
if (currentDepth > startDepth) {
|
|
1522
|
-
indices.push(i);
|
|
1523
|
-
} else {
|
|
1524
|
-
break;
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
return indices;
|
|
1528
|
-
};
|
|
1529
|
-
var getIndentStr = function getIndentStr(item) {
|
|
1530
|
-
// Add indent placeholder
|
|
1531
|
-
var indent = '';
|
|
1532
|
-
var depthData = item.depth;
|
|
1533
|
-
if (depthData) {
|
|
1534
|
-
Array(depthData).fill(0).forEach(function (k, i) {
|
|
1535
|
-
indent += INDENT_PLACEHOLDER;
|
|
1536
|
-
if (i === depthData - 1) {
|
|
1537
|
-
indent += INDENT_LAST_PLACEHOLDER;
|
|
1538
|
-
}
|
|
1539
|
-
});
|
|
1540
|
-
}
|
|
1541
|
-
return indent;
|
|
1542
|
-
};
|
|
1543
|
-
|
|
1544
|
-
// ================================================================
|
|
1545
|
-
// Collapse/Expand
|
|
1546
|
-
// ================================================================
|
|
1547
|
-
// Add collapse/expand handler function
|
|
1548
|
-
var handleCollapse = function handleCollapse(itemId, e) {
|
|
1549
|
-
e.preventDefault();
|
|
1550
|
-
e.stopPropagation();
|
|
1551
|
-
setCollapsedItems(function (prev) {
|
|
1552
|
-
var newCollapsed = new Set(prev);
|
|
1553
|
-
if (newCollapsed.has(itemId)) {
|
|
1554
|
-
newCollapsed["delete"](itemId);
|
|
1555
|
-
} else {
|
|
1556
|
-
newCollapsed.add(itemId);
|
|
1557
|
-
}
|
|
1558
|
-
return newCollapsed;
|
|
1559
|
-
});
|
|
1560
|
-
};
|
|
1561
|
-
|
|
1562
|
-
// Helper function to determine if an item should be displayed
|
|
1563
|
-
var shouldShowItem = function shouldShowItem(item) {
|
|
1564
|
-
if (!alternateCollapse) return true;
|
|
1565
|
-
var currentId = item.parentId;
|
|
1566
|
-
while (currentId) {
|
|
1567
|
-
if (collapsedItems.has(currentId)) {
|
|
1568
|
-
return false;
|
|
1569
|
-
}
|
|
1570
|
-
var parentItem = items.find(function (i) {
|
|
1571
|
-
return i.id === currentId;
|
|
1572
|
-
});
|
|
1573
|
-
currentId = parentItem === null || parentItem === void 0 ? void 0 : parentItem.parentId;
|
|
1574
|
-
}
|
|
1575
|
-
return true;
|
|
1576
|
-
};
|
|
1577
|
-
var hasChildren = function hasChildren(itemId) {
|
|
1578
|
-
return items.some(function (item) {
|
|
1579
|
-
return item.parentId === itemId;
|
|
1580
|
-
});
|
|
1581
|
-
};
|
|
1582
|
-
|
|
1583
|
-
// ================================================================
|
|
1584
|
-
// Drag & Drop Handlers (Desktop & Touch)
|
|
1585
|
-
// ================================================================
|
|
1586
|
-
var _useBoundedDrag = funda_utils_dist_cjs_useBoundedDrag__WEBPACK_IMPORTED_MODULE_3___default()({
|
|
1587
|
-
dragMode: dragMode,
|
|
1588
|
-
boundarySelector: ".".concat(prefix, "-draggable-list"),
|
|
1589
|
-
itemSelector: ".".concat(prefix, "-draggable-list__item"),
|
|
1590
|
-
dragHandleSelector: ".".concat(prefix, "-draggable-list__handle"),
|
|
1591
|
-
onDragStart: function onDragStart(index) {
|
|
1592
|
-
// Additional drag start logic if needed
|
|
1593
|
-
},
|
|
1594
|
-
onDragOver: function onDragOver(dragIndex, dropIndex) {
|
|
1595
|
-
// Additional drag over logic if needed
|
|
1596
|
-
},
|
|
1597
|
-
onDragEnd: function onDragEnd(dragIndex, dropIndex) {
|
|
1598
|
-
if (dragIndex !== null && dropIndex !== null && dragIndex !== dropIndex) {
|
|
1599
|
-
var _newItems$dragIndex, _newItems$dragIndex2, _newItems$dropIndex;
|
|
1600
|
-
// Handle item movement
|
|
1601
|
-
var newItems = deepCloneWithReactNode(items);
|
|
1602
|
-
var itemsToMove = getItemWithChildrenIndices(newItems, dragIndex);
|
|
1603
|
-
var itemsBeingMoved = itemsToMove.map(function (index) {
|
|
1604
|
-
return newItems[index];
|
|
1605
|
-
});
|
|
1606
|
-
|
|
1607
|
-
// ... rest of your existing drag end logic ...
|
|
1608
|
-
|
|
1609
|
-
var _targetId = (_newItems$dragIndex = newItems[dragIndex]) === null || _newItems$dragIndex === void 0 ? void 0 : _newItems$dragIndex.id;
|
|
1610
|
-
|
|
1611
|
-
// Calculate depth difference
|
|
1612
|
-
var draggedDepth = ((_newItems$dragIndex2 = newItems[dragIndex]) === null || _newItems$dragIndex2 === void 0 ? void 0 : _newItems$dragIndex2.depth) || 0;
|
|
1613
|
-
var dropDepth = ((_newItems$dropIndex = newItems[dropIndex]) === null || _newItems$dropIndex === void 0 ? void 0 : _newItems$dropIndex.depth) || 0;
|
|
1614
|
-
var depthDiff = dropDepth - draggedDepth;
|
|
1615
|
-
|
|
1616
|
-
// Adjust depth for all moving items
|
|
1617
|
-
itemsBeingMoved.forEach(function (item) {
|
|
1618
|
-
if (item.depth !== undefined) {
|
|
1619
|
-
item.depth += depthDiff;
|
|
1620
|
-
}
|
|
1621
|
-
});
|
|
1622
|
-
|
|
1623
|
-
// Remove all items from their original location (from back to front to keep indexing correct)
|
|
1624
|
-
itemsToMove.reverse().forEach(function (index) {
|
|
1625
|
-
newItems.splice(index, 1);
|
|
1626
|
-
});
|
|
1627
|
-
|
|
1628
|
-
// Calculate new insert position
|
|
1629
|
-
var insertIndex = dropIndex;
|
|
1630
|
-
if (dropIndex > dragIndex) {
|
|
1631
|
-
insertIndex -= itemsToMove.length;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
// Insert all items
|
|
1635
|
-
newItems.splice.apply(newItems, [insertIndex, 0].concat(_toConsumableArray(itemsBeingMoved)));
|
|
1636
|
-
|
|
1637
|
-
// Rebuild tree structure
|
|
1638
|
-
var tree = hierarchical ? (0, funda_utils_dist_cjs_tree__WEBPACK_IMPORTED_MODULE_1__.convertTree)(newItems, '', 'id', 'parentId') : newItems;
|
|
1639
|
-
var updatedItems = hierarchical ? (0, funda_utils_dist_cjs_tree__WEBPACK_IMPORTED_MODULE_1__.addTreeDepth)(tree) : tree;
|
|
1640
|
-
setItems(updatedItems);
|
|
1641
|
-
onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(updatedItems, _targetId);
|
|
1642
|
-
}
|
|
1643
|
-
}
|
|
1644
|
-
}),
|
|
1645
|
-
isDragging = _useBoundedDrag.isDragging,
|
|
1646
|
-
dragHandlers = _useBoundedDrag.dragHandlers;
|
|
1647
|
-
|
|
1648
|
-
// ================================================================
|
|
1649
|
-
// Editable
|
|
1650
|
-
// ================================================================
|
|
1651
|
-
|
|
1652
|
-
var handleDoubleClick = function handleDoubleClick(item) {
|
|
1653
|
-
if (!editable) return;
|
|
1654
|
-
setEditingItem(item.id);
|
|
1655
|
-
// Only editable fields are copied
|
|
1656
|
-
var editableFields = getEditableFields(item);
|
|
1657
|
-
var editableValues = editableFields.reduce(function (acc, field) {
|
|
1658
|
-
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, field, item[field]));
|
|
1659
|
-
}, {});
|
|
1660
|
-
setEditValue(editableValues);
|
|
1661
|
-
};
|
|
1662
|
-
var handleEditCancel = function handleEditCancel() {
|
|
1663
|
-
setEditingItem(null);
|
|
1664
|
-
setEditValue({});
|
|
1665
|
-
};
|
|
1666
|
-
var handleEditSave = function handleEditSave(itemId) {
|
|
1667
|
-
var newItems = items.map(function (item) {
|
|
1668
|
-
if (item.id === itemId) {
|
|
1669
|
-
return _objectSpread(_objectSpread({}, item), editValue);
|
|
1670
|
-
}
|
|
1671
|
-
return item;
|
|
1672
|
-
});
|
|
1673
|
-
setItems(newItems);
|
|
1674
|
-
onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(newItems, itemId);
|
|
1675
|
-
setEditingItem(null);
|
|
1676
|
-
setEditValue({});
|
|
1677
|
-
};
|
|
1678
|
-
var handleInputChange = function handleInputChange(field, value) {
|
|
1679
|
-
setEditValue(function (prev) {
|
|
1680
|
-
return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, field, value));
|
|
1681
|
-
});
|
|
1682
|
-
};
|
|
1683
|
-
var handleKeyDown = function handleKeyDown(e, itemId) {
|
|
1684
|
-
if (e.key === 'Enter') {
|
|
1685
|
-
handleEditSave(itemId);
|
|
1686
|
-
} else if (e.key === 'Escape') {
|
|
1687
|
-
handleEditCancel();
|
|
1688
|
-
}
|
|
1689
|
-
};
|
|
1690
|
-
var renderEditForm = function renderEditForm(item) {
|
|
1691
|
-
var editableFields = getEditableFields(item);
|
|
1692
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1693
|
-
className: "".concat(prefix, "-draggable-list__edit-form")
|
|
1694
|
-
}, editableFields.map(function (field) {
|
|
1695
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1696
|
-
key: field,
|
|
1697
|
-
className: "".concat(prefix, "-draggable-list__edit-field")
|
|
1698
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", null, field, ":"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", {
|
|
1699
|
-
type: "text",
|
|
1700
|
-
value: editValue[field] || '',
|
|
1701
|
-
onChange: function onChange(e) {
|
|
1702
|
-
return handleInputChange(field, e.target.value);
|
|
1703
|
-
},
|
|
1704
|
-
onKeyDown: function onKeyDown(e) {
|
|
1705
|
-
return handleKeyDown(e, item.id);
|
|
1706
|
-
},
|
|
1707
|
-
placeholder: field,
|
|
1708
|
-
autoFocus: field === editableFields[0]
|
|
1709
|
-
}));
|
|
1710
|
-
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1711
|
-
className: "".concat(prefix, "-draggable-list__edit-buttons")
|
|
1712
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
1713
|
-
onClick: function onClick() {
|
|
1714
|
-
return handleEditSave(item.id);
|
|
1715
|
-
}
|
|
1716
|
-
}, "\u2713"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
1717
|
-
onClick: handleEditCancel
|
|
1718
|
-
}, "\u2715")));
|
|
1719
|
-
};
|
|
1720
|
-
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1721
|
-
// data init
|
|
1722
|
-
//--------------
|
|
1723
|
-
if (typeof data !== 'undefined' && Array.isArray(data)) {
|
|
1724
|
-
var tree = hierarchical ? (0, funda_utils_dist_cjs_tree__WEBPACK_IMPORTED_MODULE_1__.convertTree)(data, '', 'id', 'parentId') : data;
|
|
1725
|
-
var _ORGIN_DATA = hierarchical ? (0, funda_utils_dist_cjs_tree__WEBPACK_IMPORTED_MODULE_1__.addTreeDepth)(tree) : tree;
|
|
1726
|
-
setItems(_ORGIN_DATA);
|
|
1727
|
-
}
|
|
1728
|
-
}, [data]);
|
|
1729
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", _extends({}, attributes, {
|
|
1730
|
-
ref: function ref(node) {
|
|
1731
|
-
rootRef.current = node;
|
|
1732
|
-
if (typeof externalRef === 'function') {
|
|
1733
|
-
externalRef(node);
|
|
1734
|
-
} else if (externalRef) {
|
|
1735
|
-
externalRef.current = node;
|
|
1736
|
-
}
|
|
1737
|
-
},
|
|
1738
|
-
className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("".concat(prefix, "-draggable-list"), (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(wrapperClassName, 'mb-3'), (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(dragMode, 'handle'), "handle-pos-".concat(handlePos !== null && handlePos !== void 0 ? handlePos : 'left'), {
|
|
1739
|
-
'draggable': draggable,
|
|
1740
|
-
'icon-hide': handleHide,
|
|
1741
|
-
'alternate-collapse': alternateCollapse
|
|
1742
|
-
})
|
|
1743
|
-
}), items.map(function (item, index) {
|
|
1744
|
-
// If the item should be hidden, the rendering is skipped
|
|
1745
|
-
if (!shouldShowItem(item)) return null;
|
|
1746
|
-
|
|
1747
|
-
// collapse
|
|
1748
|
-
var hasChildItems = hasChildren(item.id);
|
|
1749
|
-
var isCollapsed = collapsedItems.has(item.id);
|
|
1750
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", {
|
|
1751
|
-
key: item.id,
|
|
1752
|
-
"data-index": index,
|
|
1753
|
-
"data-id": item.id,
|
|
1754
|
-
"data-parent-id": item.parentId,
|
|
1755
|
-
"data-value": item.value,
|
|
1756
|
-
"data-label": item.label,
|
|
1757
|
-
"data-listitemlabel": item.listItemLabel,
|
|
1758
|
-
className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("".concat(prefix, "-draggable-list__item"), (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(dragMode, 'handle'), {
|
|
1759
|
-
'disabled': item.disabled,
|
|
1760
|
-
'draggable': draggable,
|
|
1761
|
-
'editing': editingItem === item.id,
|
|
1762
|
-
// collapse
|
|
1763
|
-
'has-children': hasChildItems,
|
|
1764
|
-
'collapsed': isCollapsed
|
|
1765
|
-
}),
|
|
1766
|
-
draggable: !draggable ? undefined : editingItem !== item.id && "true",
|
|
1767
|
-
onDragStart: !draggable ? undefined : function (e) {
|
|
1768
|
-
return dragHandlers.handleDragStart(e, index);
|
|
1769
|
-
},
|
|
1770
|
-
onDragOver: !draggable ? undefined : dragHandlers.handleDragOver,
|
|
1771
|
-
onDragEnd: !draggable ? undefined : dragHandlers.handleDragEnd,
|
|
1772
|
-
onTouchStart: !draggable ? undefined : function (e) {
|
|
1773
|
-
return dragHandlers.handleDragStart(e, index);
|
|
1774
|
-
},
|
|
1775
|
-
onTouchMove: !draggable ? undefined : dragHandlers.handleDragOver,
|
|
1776
|
-
onTouchEnd: !draggable ? undefined : dragHandlers.handleDragEnd,
|
|
1777
|
-
style: itemStyle,
|
|
1778
|
-
onDoubleClick: function onDoubleClick() {
|
|
1779
|
-
return handleDoubleClick(item);
|
|
1780
|
-
}
|
|
1781
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1782
|
-
className: "".concat(prefix, "-draggable-list__itemcontent")
|
|
1783
|
-
}, draggable && !handleHide ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
|
|
1784
|
-
ref: dragHandle,
|
|
1785
|
-
className: "".concat(prefix, "-draggable-list__handle ").concat(handlePos !== null && handlePos !== void 0 ? handlePos : 'left'),
|
|
1786
|
-
draggable: dragMode === 'handle',
|
|
1787
|
-
dangerouslySetInnerHTML: {
|
|
1788
|
-
__html: "".concat(handleIcon)
|
|
1789
|
-
}
|
|
1790
|
-
}) : null, editingItem === item.id ? renderEditForm(item) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1791
|
-
className: "".concat(prefix, "-draggable-list__itemcontent-inner")
|
|
1792
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1793
|
-
className: "".concat(prefix, "-draggable-list__itemlabel")
|
|
1794
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
|
|
1795
|
-
dangerouslySetInnerHTML: {
|
|
1796
|
-
__html: "".concat(getIndentStr(item)).concat(typeof item.listItemLabel === 'undefined' ? item.label : item.listItemLabel)
|
|
1797
|
-
}
|
|
1798
|
-
}), alternateCollapse && hasChildItems && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
|
|
1799
|
-
className: "".concat(prefix, "-draggable-list__collapse-arrow"),
|
|
1800
|
-
onClick: function onClick(e) {
|
|
1801
|
-
return handleCollapse(item.id, e);
|
|
1802
|
-
}
|
|
1803
|
-
}, arrow || (isCollapsed ? '▶' : '▼'))), item.appendControl ? /*#__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: "".concat(prefix, "-draggable-list__itemext"),
|
|
1805
|
-
id: "".concat(prefix, "-draggable-list__itemext-").concat(item.value)
|
|
1806
|
-
}, item.appendControl)) : null)));
|
|
1807
|
-
}));
|
|
1808
|
-
});
|
|
1809
|
-
/* harmony default export */
|
|
1810
|
-
var __WEBPACK_DEFAULT_EXPORT__ = DragDropList;
|
|
1811
|
-
})();
|
|
1812
|
-
|
|
1813
|
-
/******/
|
|
1814
|
-
return __webpack_exports__;
|
|
1815
|
-
/******/
|
|
1816
|
-
}()
|
|
1817
|
-
);
|
|
1818
|
-
});
|
|
1819
|
-
|
|
1820
|
-
/***/ }),
|
|
1821
|
-
|
|
1822
|
-
/***/ 188:
|
|
1823
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1824
|
-
|
|
1825
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
1826
|
-
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); }
|
|
1827
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
1828
|
-
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),
|
|
1829
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
1830
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
1831
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
1832
|
-
})(this, function () {
|
|
1833
|
-
return (/******/function () {
|
|
1834
|
-
// webpackBootstrap
|
|
1835
|
-
/******/
|
|
1836
|
-
"use strict";
|
|
1837
|
-
|
|
1838
|
-
/******/ // The require scope
|
|
1839
|
-
/******/
|
|
1840
|
-
var __nested_webpack_require_993__ = {};
|
|
1841
|
-
/******/
|
|
1842
|
-
/************************************************************************/
|
|
1843
|
-
/******/ /* webpack/runtime/define property getters */
|
|
1844
|
-
/******/
|
|
1845
|
-
(function () {
|
|
1846
|
-
/******/ // define getter functions for harmony exports
|
|
1847
|
-
/******/__nested_webpack_require_993__.d = function (exports, definition) {
|
|
1848
|
-
/******/for (var key in definition) {
|
|
1849
|
-
/******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
|
|
1850
|
-
/******/Object.defineProperty(exports, key, {
|
|
1851
|
-
enumerable: true,
|
|
1852
|
-
get: definition[key]
|
|
1853
|
-
});
|
|
1854
|
-
/******/
|
|
1855
|
-
}
|
|
1856
|
-
/******/
|
|
1857
|
-
}
|
|
1858
|
-
/******/
|
|
1859
|
-
};
|
|
1860
|
-
/******/
|
|
1861
|
-
})();
|
|
1862
|
-
/******/
|
|
1863
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1864
|
-
/******/
|
|
1865
|
-
(function () {
|
|
1866
|
-
/******/__nested_webpack_require_993__.o = function (obj, prop) {
|
|
1867
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
1868
|
-
};
|
|
1869
|
-
/******/
|
|
1870
|
-
})();
|
|
1871
|
-
/******/
|
|
1872
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
1873
|
-
/******/
|
|
1874
|
-
(function () {
|
|
1875
|
-
/******/ // define __esModule on exports
|
|
1876
|
-
/******/__nested_webpack_require_993__.r = function (exports) {
|
|
1877
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
1878
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
1879
|
-
value: 'Module'
|
|
1880
|
-
});
|
|
1881
|
-
/******/
|
|
1882
|
-
}
|
|
1883
|
-
/******/
|
|
1884
|
-
Object.defineProperty(exports, '__esModule', {
|
|
1885
|
-
value: true
|
|
1886
|
-
});
|
|
1887
|
-
/******/
|
|
1888
|
-
};
|
|
1889
|
-
/******/
|
|
1890
|
-
})();
|
|
1891
|
-
/******/
|
|
1892
|
-
/************************************************************************/
|
|
1893
|
-
var __webpack_exports__ = {};
|
|
1894
|
-
__nested_webpack_require_993__.r(__webpack_exports__);
|
|
1895
|
-
/* harmony export */
|
|
1896
|
-
__nested_webpack_require_993__.d(__webpack_exports__, {
|
|
1897
|
-
/* harmony export */"clsWrite": function clsWrite() {
|
|
1898
|
-
return (/* binding */_clsWrite
|
|
1899
|
-
);
|
|
1900
|
-
},
|
|
1901
|
-
/* harmony export */"combinedCls": function combinedCls() {
|
|
1902
|
-
return (/* binding */_combinedCls
|
|
1903
|
-
);
|
|
1904
|
-
}
|
|
1905
|
-
/* harmony export */
|
|
1906
|
-
});
|
|
1907
|
-
function _slicedToArray(arr, i) {
|
|
1908
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
1909
|
-
}
|
|
1910
|
-
function _nonIterableRest() {
|
|
1911
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1912
|
-
}
|
|
1913
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1914
|
-
if (!o) return;
|
|
1915
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1916
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1917
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1918
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1919
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1920
|
-
}
|
|
1921
|
-
function _arrayLikeToArray(arr, len) {
|
|
1922
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1923
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1924
|
-
return arr2;
|
|
1925
|
-
}
|
|
1926
|
-
function _iterableToArrayLimit(arr, i) {
|
|
1927
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1928
|
-
if (null != _i) {
|
|
1929
|
-
var _s,
|
|
1930
|
-
_e,
|
|
1931
|
-
_x,
|
|
1932
|
-
_r,
|
|
1933
|
-
_arr = [],
|
|
1934
|
-
_n = !0,
|
|
1935
|
-
_d = !1;
|
|
1936
|
-
try {
|
|
1937
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
1938
|
-
if (Object(_i) !== _i) return;
|
|
1939
|
-
_n = !1;
|
|
1940
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
1941
|
-
} catch (err) {
|
|
1942
|
-
_d = !0, _e = err;
|
|
1943
|
-
} finally {
|
|
1944
|
-
try {
|
|
1945
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
1946
|
-
} finally {
|
|
1947
|
-
if (_d) throw _e;
|
|
1948
|
-
}
|
|
1949
|
-
}
|
|
1950
|
-
return _arr;
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
function _arrayWithHoles(arr) {
|
|
1954
|
-
if (Array.isArray(arr)) return arr;
|
|
1955
|
-
}
|
|
1956
|
-
function _typeof(obj) {
|
|
1957
|
-
"@babel/helpers - typeof";
|
|
1958
|
-
|
|
1959
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1960
|
-
return typeof obj;
|
|
1961
|
-
} : function (obj) {
|
|
1962
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1963
|
-
}, _typeof(obj);
|
|
1964
|
-
}
|
|
1965
|
-
/**
|
|
1966
|
-
* Output of class name
|
|
1967
|
-
* @param {*} s - Any
|
|
1968
|
-
* @param {String} defaultCls - Default string
|
|
1969
|
-
* @param {?*} targetCls - Any
|
|
1970
|
-
* @returns {*}
|
|
1971
|
-
*/
|
|
1972
|
-
function _clsWrite(s, defaultCls) {
|
|
1973
|
-
var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
1974
|
-
return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1977
|
-
/**
|
|
1978
|
-
* Combined classnames
|
|
1979
|
-
* @param {*} args
|
|
1980
|
-
* @returns {String|undefined}
|
|
1981
|
-
*/
|
|
1982
|
-
/* Usage:
|
|
1983
|
-
|
|
1984
|
-
console.log(combinedCls('a-1', 'a-2', 'a-3', {
|
|
1985
|
-
'p-1': null,
|
|
1986
|
-
'p-2': undefined,
|
|
1987
|
-
'p-3': true,
|
|
1988
|
-
'p-4': false,
|
|
1989
|
-
'p-5': 'kkk',
|
|
1990
|
-
'p-6': 0,
|
|
1991
|
-
'p-7': 1,
|
|
1992
|
-
'p-8': '',
|
|
1993
|
-
undefined
|
|
1994
|
-
})); // a-1 a-2 a-3 p-3 p-5 p-7
|
|
1995
|
-
*/
|
|
1996
|
-
function _combinedCls() {
|
|
1997
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1998
|
-
args[_key] = arguments[_key];
|
|
1999
|
-
}
|
|
2000
|
-
if (args) {
|
|
2001
|
-
var classes = [];
|
|
2002
|
-
for (var i = 0; i < args.length; i++) {
|
|
2003
|
-
var className = args[i];
|
|
2004
|
-
if (!className) {
|
|
2005
|
-
continue;
|
|
2006
|
-
}
|
|
2007
|
-
var type = _typeof(className);
|
|
2008
|
-
if (type === 'string' || type === 'number') {
|
|
2009
|
-
classes.push(className);
|
|
2010
|
-
} else if (type === 'object') {
|
|
2011
|
-
var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
|
|
2012
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
2013
|
-
key = _ref2[0],
|
|
2014
|
-
value = _ref2[1];
|
|
2015
|
-
return value ? key : null;
|
|
2016
|
-
});
|
|
2017
|
-
classes = _classes.length ? classes.concat(_classes.filter(function (c) {
|
|
2018
|
-
return !!c;
|
|
2019
|
-
})) : classes;
|
|
2020
|
-
}
|
|
2021
|
-
}
|
|
2022
|
-
return classes.join(' ').trim();
|
|
2023
|
-
}
|
|
2024
|
-
return undefined;
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
/******/
|
|
2028
|
-
return __webpack_exports__;
|
|
2029
|
-
/******/
|
|
2030
|
-
}()
|
|
2031
|
-
);
|
|
2032
|
-
});
|
|
2033
|
-
|
|
2034
|
-
/***/ }),
|
|
2035
|
-
|
|
2036
|
-
/***/ 79:
|
|
2037
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2038
|
-
|
|
2039
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
2040
|
-
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); }
|
|
2041
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2042
|
-
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),
|
|
2043
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
2044
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
2045
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
2046
|
-
})(this, function () {
|
|
2047
|
-
return (/******/function () {
|
|
2048
|
-
// webpackBootstrap
|
|
2049
|
-
/******/
|
|
2050
|
-
"use strict";
|
|
2051
|
-
|
|
2052
|
-
/******/ // The require scope
|
|
2053
|
-
/******/
|
|
2054
|
-
var __nested_webpack_require_987__ = {};
|
|
2055
|
-
/******/
|
|
2056
|
-
/************************************************************************/
|
|
2057
|
-
/******/ /* webpack/runtime/define property getters */
|
|
2058
|
-
/******/
|
|
2059
|
-
(function () {
|
|
2060
|
-
/******/ // define getter functions for harmony exports
|
|
2061
|
-
/******/__nested_webpack_require_987__.d = function (exports, definition) {
|
|
2062
|
-
/******/for (var key in definition) {
|
|
2063
|
-
/******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
|
|
2064
|
-
/******/Object.defineProperty(exports, key, {
|
|
2065
|
-
enumerable: true,
|
|
2066
|
-
get: definition[key]
|
|
2067
|
-
});
|
|
2068
|
-
/******/
|
|
2069
|
-
}
|
|
2070
|
-
/******/
|
|
2071
|
-
}
|
|
2072
|
-
/******/
|
|
2073
|
-
};
|
|
2074
|
-
/******/
|
|
2075
|
-
})();
|
|
2076
|
-
/******/
|
|
2077
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2078
|
-
/******/
|
|
2079
|
-
(function () {
|
|
2080
|
-
/******/__nested_webpack_require_987__.o = function (obj, prop) {
|
|
2081
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2082
|
-
};
|
|
2083
|
-
/******/
|
|
2084
|
-
})();
|
|
2085
|
-
/******/
|
|
2086
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
2087
|
-
/******/
|
|
2088
|
-
(function () {
|
|
2089
|
-
/******/ // define __esModule on exports
|
|
2090
|
-
/******/__nested_webpack_require_987__.r = function (exports) {
|
|
2091
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2092
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
2093
|
-
value: 'Module'
|
|
2094
|
-
});
|
|
2095
|
-
/******/
|
|
2096
|
-
}
|
|
2097
|
-
/******/
|
|
2098
|
-
Object.defineProperty(exports, '__esModule', {
|
|
2099
|
-
value: true
|
|
2100
|
-
});
|
|
2101
|
-
/******/
|
|
2102
|
-
};
|
|
2103
|
-
/******/
|
|
2104
|
-
})();
|
|
2105
|
-
/******/
|
|
2106
|
-
/************************************************************************/
|
|
2107
|
-
var __webpack_exports__ = {};
|
|
2108
|
-
__nested_webpack_require_987__.r(__webpack_exports__);
|
|
2109
|
-
/* harmony export */
|
|
2110
|
-
__nested_webpack_require_987__.d(__webpack_exports__, {
|
|
2111
|
-
/* harmony export */"convertArrToValByBraces": function convertArrToValByBraces() {
|
|
2112
|
-
return (/* binding */_convertArrToValByBraces
|
|
2113
|
-
);
|
|
2114
|
-
},
|
|
2115
|
-
/* harmony export */"convertArrToValByBrackets": function convertArrToValByBrackets() {
|
|
2116
|
-
return (/* binding */_convertArrToValByBrackets
|
|
2117
|
-
);
|
|
2118
|
-
},
|
|
2119
|
-
/* harmony export */"convertStringByCommaToValByBraces": function convertStringByCommaToValByBraces() {
|
|
2120
|
-
return (/* binding */_convertStringByCommaToValByBraces
|
|
2121
|
-
);
|
|
2122
|
-
},
|
|
2123
|
-
/* harmony export */"convertStringByCommaToValByBrackets": function convertStringByCommaToValByBrackets() {
|
|
2124
|
-
return (/* binding */_convertStringByCommaToValByBrackets
|
|
2125
|
-
);
|
|
2126
|
-
}
|
|
2127
|
-
/* harmony export */
|
|
2128
|
-
});
|
|
2129
|
-
/**
|
|
2130
|
-
* Convert value to string separated by square brackets
|
|
2131
|
-
* @param {String} str such as: 1,2,3
|
|
2132
|
-
* @returns {String} such as: [1][2][3]
|
|
2133
|
-
*/
|
|
2134
|
-
function _convertStringByCommaToValByBrackets(str) {
|
|
2135
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
2136
|
-
return '';
|
|
2137
|
-
}
|
|
2138
|
-
return str.split(',').map(function (v) {
|
|
2139
|
-
return v.toString().includes('[') && v.toString().includes(']') ? "".concat(v) : "[".concat(v, "]");
|
|
2140
|
-
}).join('');
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
/**
|
|
2144
|
-
* Convert array value to string separated by square brackets
|
|
2145
|
-
* @param {String[]} arr such as: ['1','2','3']
|
|
2146
|
-
* @returns {String} such as: [1][2][3]
|
|
2147
|
-
*/
|
|
2148
|
-
function _convertArrToValByBrackets(arr) {
|
|
2149
|
-
if (!Array.isArray(arr)) return '';
|
|
2150
|
-
return arr.map(function (v) {
|
|
2151
|
-
return v.toString().includes('[') && v.toString().includes(']') ? "".concat(v) : "[".concat(v, "]");
|
|
2152
|
-
}).join('');
|
|
2153
|
-
}
|
|
2154
|
-
|
|
2155
|
-
/**
|
|
2156
|
-
* Convert value to string separated by curly braces
|
|
2157
|
-
* @param {String} str such as: 1,2,3
|
|
2158
|
-
* @returns {String} such as: {1}{2}{3}
|
|
2159
|
-
*/
|
|
2160
|
-
function _convertStringByCommaToValByBraces(str) {
|
|
2161
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
2162
|
-
return '';
|
|
2163
|
-
}
|
|
2164
|
-
return str.split(',').map(function (v) {
|
|
2165
|
-
return v.toString().includes('{') && v.toString().includes('}') ? "".concat(v) : "{".concat(v, "}");
|
|
2166
|
-
}).join('');
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
/**
|
|
2170
|
-
* Convert array value to string separated by curly braces
|
|
2171
|
-
* @param {String[]} arr such as: ['1','2','3']
|
|
2172
|
-
* @returns {String} such as: {1}{2}{3}
|
|
2173
|
-
*/
|
|
2174
|
-
function _convertArrToValByBraces(arr) {
|
|
2175
|
-
if (!Array.isArray(arr)) return '';
|
|
2176
|
-
return arr.map(function (v) {
|
|
2177
|
-
return v.toString().includes('{') && v.toString().includes('}') ? "".concat(v) : "{".concat(v, "}");
|
|
2178
|
-
}).join('');
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
|
-
/******/
|
|
2182
|
-
return __webpack_exports__;
|
|
2183
|
-
/******/
|
|
2184
|
-
}()
|
|
2185
|
-
);
|
|
2186
|
-
});
|
|
2187
|
-
|
|
2188
|
-
/***/ }),
|
|
2189
|
-
|
|
2190
|
-
/***/ 135:
|
|
2191
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2192
|
-
|
|
2193
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
2194
|
-
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); }
|
|
2195
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2196
|
-
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),
|
|
2197
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
2198
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
2199
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
2200
|
-
})(this, function () {
|
|
2201
|
-
return (/******/function () {
|
|
2202
|
-
// webpackBootstrap
|
|
2203
|
-
/******/
|
|
2204
|
-
"use strict";
|
|
2205
|
-
|
|
2206
|
-
/******/ // The require scope
|
|
2207
|
-
/******/
|
|
2208
|
-
var __nested_webpack_require_987__ = {};
|
|
2209
|
-
/******/
|
|
2210
|
-
/************************************************************************/
|
|
2211
|
-
/******/ /* webpack/runtime/define property getters */
|
|
2212
|
-
/******/
|
|
2213
|
-
(function () {
|
|
2214
|
-
/******/ // define getter functions for harmony exports
|
|
2215
|
-
/******/__nested_webpack_require_987__.d = function (exports, definition) {
|
|
2216
|
-
/******/for (var key in definition) {
|
|
2217
|
-
/******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
|
|
2218
|
-
/******/Object.defineProperty(exports, key, {
|
|
2219
|
-
enumerable: true,
|
|
2220
|
-
get: definition[key]
|
|
2221
|
-
});
|
|
2222
|
-
/******/
|
|
2223
|
-
}
|
|
2224
|
-
/******/
|
|
2225
|
-
}
|
|
2226
|
-
/******/
|
|
2227
|
-
};
|
|
2228
|
-
/******/
|
|
2229
|
-
})();
|
|
2230
|
-
/******/
|
|
2231
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2232
|
-
/******/
|
|
2233
|
-
(function () {
|
|
2234
|
-
/******/__nested_webpack_require_987__.o = function (obj, prop) {
|
|
2235
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2236
|
-
};
|
|
2237
|
-
/******/
|
|
2238
|
-
})();
|
|
2239
|
-
/******/
|
|
2240
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
2241
|
-
/******/
|
|
2242
|
-
(function () {
|
|
2243
|
-
/******/ // define __esModule on exports
|
|
2244
|
-
/******/__nested_webpack_require_987__.r = function (exports) {
|
|
2245
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2246
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
2247
|
-
value: 'Module'
|
|
2248
|
-
});
|
|
2249
|
-
/******/
|
|
2250
|
-
}
|
|
2251
|
-
/******/
|
|
2252
|
-
Object.defineProperty(exports, '__esModule', {
|
|
2253
|
-
value: true
|
|
2254
|
-
});
|
|
2255
|
-
/******/
|
|
2256
|
-
};
|
|
2257
|
-
/******/
|
|
2258
|
-
})();
|
|
2259
|
-
/******/
|
|
2260
|
-
/************************************************************************/
|
|
2261
|
-
var __webpack_exports__ = {};
|
|
2262
|
-
__nested_webpack_require_987__.r(__webpack_exports__);
|
|
2263
|
-
/* harmony export */
|
|
2264
|
-
__nested_webpack_require_987__.d(__webpack_exports__, {
|
|
2265
|
-
/* harmony export */"extractContentsOfBraces": function extractContentsOfBraces() {
|
|
2266
|
-
return (/* binding */_extractContentsOfBraces
|
|
2267
|
-
);
|
|
2268
|
-
},
|
|
2269
|
-
/* harmony export */"extractContentsOfBrackets": function extractContentsOfBrackets() {
|
|
2270
|
-
return (/* binding */_extractContentsOfBrackets
|
|
2271
|
-
);
|
|
2272
|
-
},
|
|
2273
|
-
/* harmony export */"extractContentsOfParentheses": function extractContentsOfParentheses() {
|
|
2274
|
-
return (/* binding */_extractContentsOfParentheses
|
|
2275
|
-
);
|
|
2276
|
-
},
|
|
2277
|
-
/* harmony export */"extractorExist": function extractorExist() {
|
|
2278
|
-
return (/* binding */_extractorExist
|
|
2279
|
-
);
|
|
2280
|
-
}
|
|
2281
|
-
/* harmony export */
|
|
2282
|
-
});
|
|
2283
|
-
/**
|
|
2284
|
-
* Determine whether an extractor is included
|
|
2285
|
-
* @param {String} str => input string. such as 'a[1], b[2]', '{a[1]}'
|
|
2286
|
-
* @returns {Boolean}
|
|
2287
|
-
*/
|
|
2288
|
-
function _extractorExist(str) {
|
|
2289
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
2290
|
-
return false;
|
|
2291
|
-
}
|
|
2292
|
-
var res = false;
|
|
2293
|
-
if (str !== null && str !== void 0 && str.match(/(\[.*?\])/gi)) {
|
|
2294
|
-
res = true;
|
|
2295
|
-
}
|
|
2296
|
-
return res;
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
/**
|
|
2300
|
-
* Extract the contents of square brackets
|
|
2301
|
-
* @param {String} str => input string. such as '[1,2] [f][c]'
|
|
2302
|
-
* @param {Boolean} commaSeparated => flag to determine if the result should be comma separated or not
|
|
2303
|
-
* @returns {Array<string>|string} such as: ['1,2','f','c']
|
|
2304
|
-
*/
|
|
2305
|
-
function _extractContentsOfBrackets(str) {
|
|
2306
|
-
var commaSeparated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2307
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
2308
|
-
return !commaSeparated ? [] : '';
|
|
2309
|
-
}
|
|
2310
|
-
var res = str.match(/[^\[]+(?=(\[ \])|\])/g);
|
|
2311
|
-
if (commaSeparated) {
|
|
2312
|
-
return res === null ? '' : res.join(',').replace(/\,+$/, '');
|
|
2313
|
-
} else {
|
|
2314
|
-
return res === null ? '' : res;
|
|
2315
|
-
}
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
/**
|
|
2319
|
-
* Extract the contents of curly braces
|
|
2320
|
-
* @param {String} str => input string. such as '{1,2} {f}{c}'
|
|
2321
|
-
* @param {Boolean} commaSeparated => flag to determine if the result should be comma separated or not
|
|
2322
|
-
* @returns {Array<string>|string} such as: ['1,2','f','c']
|
|
2323
|
-
*/
|
|
2324
|
-
function _extractContentsOfBraces(str) {
|
|
2325
|
-
var commaSeparated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2326
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
2327
|
-
return !commaSeparated ? [] : '';
|
|
2328
|
-
}
|
|
2329
|
-
var res = str.match(/[^\{]+(?=(\{ \})|\})/g);
|
|
2330
|
-
if (commaSeparated) {
|
|
2331
|
-
return res === null ? '' : res.join(',').replace(/\,+$/, '');
|
|
2332
|
-
} else {
|
|
2333
|
-
return res === null ? '' : res;
|
|
2334
|
-
}
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
/**
|
|
2338
|
-
* Extract the contents of parentheses
|
|
2339
|
-
* @param {String} str => input string. such as '(1,2) (f)(c)'
|
|
2340
|
-
* @param {Boolean} commaSeparated => flag to determine if the result should be comma separated or not
|
|
2341
|
-
* @returns {Array<string>|string} such as: ['1,2','f','c']
|
|
2342
|
-
*/
|
|
2343
|
-
function _extractContentsOfParentheses(str) {
|
|
2344
|
-
var commaSeparated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2345
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
2346
|
-
return !commaSeparated ? [] : '';
|
|
2347
|
-
}
|
|
2348
|
-
var res = str.match(/[^\(]+(?=(\( \))|\))/g);
|
|
2349
|
-
if (commaSeparated) {
|
|
2350
|
-
return res === null ? '' : res.join(',').replace(/\,+$/, '');
|
|
2351
|
-
} else {
|
|
2352
|
-
return res === null ? '' : res;
|
|
2353
|
-
}
|
|
2354
|
-
}
|
|
2355
|
-
|
|
2356
|
-
/******/
|
|
2357
|
-
return __webpack_exports__;
|
|
2358
|
-
/******/
|
|
2359
|
-
}()
|
|
2360
|
-
);
|
|
2361
|
-
});
|
|
2362
|
-
|
|
2363
|
-
/***/ }),
|
|
2364
|
-
|
|
2365
|
-
/***/ 186:
|
|
2366
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2367
|
-
|
|
2368
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
2369
|
-
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); }
|
|
2370
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2371
|
-
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),
|
|
2372
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
2373
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
2374
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
2375
|
-
})(this, function () {
|
|
2376
|
-
return (/******/function () {
|
|
2377
|
-
// webpackBootstrap
|
|
2378
|
-
/******/
|
|
2379
|
-
"use strict";
|
|
2380
|
-
|
|
2381
|
-
/******/ // The require scope
|
|
2382
|
-
/******/
|
|
2383
|
-
var __nested_webpack_require_993__ = {};
|
|
2384
|
-
/******/
|
|
2385
|
-
/************************************************************************/
|
|
2386
|
-
/******/ /* webpack/runtime/define property getters */
|
|
2387
|
-
/******/
|
|
2388
|
-
(function () {
|
|
2389
|
-
/******/ // define getter functions for harmony exports
|
|
2390
|
-
/******/__nested_webpack_require_993__.d = function (exports, definition) {
|
|
2391
|
-
/******/for (var key in definition) {
|
|
2392
|
-
/******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
|
|
2393
|
-
/******/Object.defineProperty(exports, key, {
|
|
2394
|
-
enumerable: true,
|
|
2395
|
-
get: definition[key]
|
|
2396
|
-
});
|
|
2397
|
-
/******/
|
|
2398
|
-
}
|
|
2399
|
-
/******/
|
|
2400
|
-
}
|
|
2401
|
-
/******/
|
|
2402
|
-
};
|
|
2403
|
-
/******/
|
|
2404
|
-
})();
|
|
2405
|
-
/******/
|
|
2406
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2407
|
-
/******/
|
|
2408
|
-
(function () {
|
|
2409
|
-
/******/__nested_webpack_require_993__.o = function (obj, prop) {
|
|
2410
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2411
|
-
};
|
|
2412
|
-
/******/
|
|
2413
|
-
})();
|
|
2414
|
-
/******/
|
|
2415
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
2416
|
-
/******/
|
|
2417
|
-
(function () {
|
|
2418
|
-
/******/ // define __esModule on exports
|
|
2419
|
-
/******/__nested_webpack_require_993__.r = function (exports) {
|
|
2420
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2421
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
2422
|
-
value: 'Module'
|
|
2423
|
-
});
|
|
2424
|
-
/******/
|
|
2425
|
-
}
|
|
2426
|
-
/******/
|
|
2427
|
-
Object.defineProperty(exports, '__esModule', {
|
|
2428
|
-
value: true
|
|
2429
|
-
});
|
|
2430
|
-
/******/
|
|
2431
|
-
};
|
|
2432
|
-
/******/
|
|
2433
|
-
})();
|
|
2434
|
-
/******/
|
|
2435
|
-
/************************************************************************/
|
|
2436
|
-
var __webpack_exports__ = {};
|
|
2437
|
-
__nested_webpack_require_993__.r(__webpack_exports__);
|
|
2438
|
-
/* harmony export */
|
|
2439
|
-
__nested_webpack_require_993__.d(__webpack_exports__, {
|
|
2440
|
-
/* harmony export */"isJSON": function isJSON() {
|
|
2441
|
-
return (/* binding */_isJSON
|
|
2442
|
-
);
|
|
2443
|
-
},
|
|
2444
|
-
/* harmony export */"isValidNumeric": function isValidNumeric() {
|
|
2445
|
-
return (/* binding */_isValidNumeric
|
|
2446
|
-
);
|
|
2447
|
-
},
|
|
2448
|
-
/* harmony export */"setDefaultOptions": function setDefaultOptions() {
|
|
2449
|
-
return (/* binding */_setDefaultOptions
|
|
2450
|
-
);
|
|
2451
|
-
}
|
|
2452
|
-
/* harmony export */
|
|
2453
|
-
});
|
|
2454
|
-
function _typeof(obj) {
|
|
2455
|
-
"@babel/helpers - typeof";
|
|
2456
|
-
|
|
2457
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
2458
|
-
return typeof obj;
|
|
2459
|
-
} : function (obj) {
|
|
2460
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2461
|
-
}, _typeof(obj);
|
|
2462
|
-
}
|
|
2463
|
-
/**
|
|
2464
|
-
* Set a default JSON format configuration
|
|
2465
|
-
*
|
|
2466
|
-
* @param {*} props - Set some default keys and values.
|
|
2467
|
-
* @param {*} options - A JSON variable passed in from outside, including key and value.
|
|
2468
|
-
* @return {JSON} - Merge the new and old values.
|
|
2469
|
-
*/
|
|
2470
|
-
function _setDefaultOptions(props, options) {
|
|
2471
|
-
if (_typeof(options) === ( true ? "undefined" : 0) || options === null || options === false) options = {};
|
|
2472
|
-
//Set a default configuration
|
|
2473
|
-
if (_isJSON(props)) {
|
|
2474
|
-
var defaultConfigValues = Object.values(props);
|
|
2475
|
-
Object.keys(props).forEach(function (prop, index) {
|
|
2476
|
-
// Well-formed string type
|
|
2477
|
-
Object.keys(options).forEach(function (prop2, index2) {
|
|
2478
|
-
if (prop2 === prop) {
|
|
2479
|
-
var _v = options[prop2];
|
|
2480
|
-
if (_v == 'true') _v = true;
|
|
2481
|
-
if (_v == 'false') _v = false;
|
|
2482
|
-
if (_isValidNumeric(_v)) _v = parseFloat(_v);
|
|
2483
|
-
if (_isJSON(_v)) _v = Object.prototype.toString.call(_v) === '[object Object]' ? _v : JSON.parse(_v);
|
|
2484
|
-
options[prop2] = _v;
|
|
2485
|
-
}
|
|
2486
|
-
});
|
|
2487
|
-
|
|
2488
|
-
//
|
|
2489
|
-
if (_typeof(options[prop]) === ( true ? "undefined" : 0) || options[prop] === null) options[prop] = defaultConfigValues[index];
|
|
2490
|
-
});
|
|
2491
|
-
}
|
|
2492
|
-
return options;
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
|
-
/**
|
|
2496
|
-
* Check if a string is a valid number
|
|
2497
|
-
* @param {*} str
|
|
2498
|
-
* @returns
|
|
2499
|
-
*/
|
|
2500
|
-
function _isValidNumeric(str) {
|
|
2501
|
-
if (typeof str != "string") return false; // we only process strings!
|
|
2502
|
-
if (!isNaN(Number(str)) &&
|
|
2503
|
-
// use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)
|
|
2504
|
-
!isNaN(parseFloat(str)) // ensure strings of whitespace fail
|
|
2505
|
-
) {
|
|
2506
|
-
return true;
|
|
2507
|
-
} else {
|
|
2508
|
-
return false;
|
|
2509
|
-
}
|
|
2510
|
-
}
|
|
2511
|
-
|
|
2512
|
-
/**
|
|
2513
|
-
* Determine whether it is in JSON format
|
|
2514
|
-
* @param {*} str
|
|
2515
|
-
* @returns
|
|
2516
|
-
*/
|
|
2517
|
-
function _isJSON(str) {
|
|
2518
|
-
if (typeof str === 'string' && str.length > 0) {
|
|
2519
|
-
if (str.replace(/\"\"/g, '').replace(/\,/g, '') == '[{}]') {
|
|
2520
|
-
return false;
|
|
2521
|
-
} else {
|
|
2522
|
-
if (/^[\],:{}\s]*$/.test(str.replace(/\\["\\\/bfnrtu]/g, '@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
|
|
2523
|
-
return true;
|
|
2524
|
-
} else {
|
|
2525
|
-
return false;
|
|
2526
|
-
}
|
|
2527
|
-
}
|
|
2528
|
-
} else {
|
|
2529
|
-
if (_typeof(str) === 'object' && Object.prototype.toString.call(str) === '[object Object]' && !str.length) {
|
|
2530
|
-
return true;
|
|
2531
|
-
} else {
|
|
2532
|
-
return false;
|
|
2533
|
-
}
|
|
2534
|
-
}
|
|
2535
|
-
}
|
|
2536
|
-
|
|
2537
|
-
/******/
|
|
2538
|
-
return __webpack_exports__;
|
|
2539
|
-
/******/
|
|
2540
|
-
}()
|
|
2541
|
-
);
|
|
2542
|
-
});
|
|
2543
|
-
|
|
2544
|
-
/***/ }),
|
|
2545
|
-
|
|
2546
|
-
/***/ 575:
|
|
2547
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2548
|
-
|
|
2549
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
2550
|
-
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); }
|
|
2551
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2552
|
-
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),
|
|
2553
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
2554
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
2555
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
2556
|
-
})(this, function () {
|
|
2557
|
-
return (/******/function () {
|
|
2558
|
-
// webpackBootstrap
|
|
2559
|
-
/******/
|
|
2560
|
-
"use strict";
|
|
2561
|
-
|
|
2562
|
-
/******/ // The require scope
|
|
2563
|
-
/******/
|
|
2564
|
-
var __nested_webpack_require_993__ = {};
|
|
2565
|
-
/******/
|
|
2566
|
-
/************************************************************************/
|
|
2567
|
-
/******/ /* webpack/runtime/define property getters */
|
|
2568
|
-
/******/
|
|
2569
|
-
(function () {
|
|
2570
|
-
/******/ // define getter functions for harmony exports
|
|
2571
|
-
/******/__nested_webpack_require_993__.d = function (exports, definition) {
|
|
2572
|
-
/******/for (var key in definition) {
|
|
2573
|
-
/******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
|
|
2574
|
-
/******/Object.defineProperty(exports, key, {
|
|
2575
|
-
enumerable: true,
|
|
2576
|
-
get: definition[key]
|
|
2577
|
-
});
|
|
2578
|
-
/******/
|
|
2579
|
-
}
|
|
2580
|
-
/******/
|
|
2581
|
-
}
|
|
2582
|
-
/******/
|
|
2583
|
-
};
|
|
2584
|
-
/******/
|
|
2585
|
-
})();
|
|
2586
|
-
/******/
|
|
2587
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2588
|
-
/******/
|
|
2589
|
-
(function () {
|
|
2590
|
-
/******/__nested_webpack_require_993__.o = function (obj, prop) {
|
|
2591
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2592
|
-
};
|
|
2593
|
-
/******/
|
|
2594
|
-
})();
|
|
2595
|
-
/******/
|
|
2596
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
2597
|
-
/******/
|
|
2598
|
-
(function () {
|
|
2599
|
-
/******/ // define __esModule on exports
|
|
2600
|
-
/******/__nested_webpack_require_993__.r = function (exports) {
|
|
2601
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2602
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
2603
|
-
value: 'Module'
|
|
2604
|
-
});
|
|
2605
|
-
/******/
|
|
2606
|
-
}
|
|
2607
|
-
/******/
|
|
2608
|
-
Object.defineProperty(exports, '__esModule', {
|
|
2609
|
-
value: true
|
|
2610
|
-
});
|
|
2611
|
-
/******/
|
|
2612
|
-
};
|
|
2613
|
-
/******/
|
|
2614
|
-
})();
|
|
2615
|
-
/******/
|
|
2616
|
-
/************************************************************************/
|
|
2617
|
-
var __webpack_exports__ = {};
|
|
2618
|
-
__nested_webpack_require_993__.r(__webpack_exports__);
|
|
2619
|
-
/* harmony export */
|
|
2620
|
-
__nested_webpack_require_993__.d(__webpack_exports__, {
|
|
2621
|
-
/* harmony export */"deepClone": function deepClone() {
|
|
2622
|
-
return (/* binding */_deepClone
|
|
2623
|
-
);
|
|
2624
|
-
},
|
|
2625
|
-
/* harmony export */"flatData": function flatData() {
|
|
2626
|
-
return (/* binding */_flatData
|
|
2627
|
-
);
|
|
2628
|
-
},
|
|
2629
|
-
/* harmony export */"removeArrDuplicateItems": function removeArrDuplicateItems() {
|
|
2630
|
-
return (/* binding */_removeArrDuplicateItems
|
|
2631
|
-
);
|
|
2632
|
-
}
|
|
2633
|
-
/* harmony export */
|
|
2634
|
-
});
|
|
2635
|
-
function _typeof(obj) {
|
|
2636
|
-
"@babel/helpers - typeof";
|
|
2637
|
-
|
|
2638
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
2639
|
-
return typeof obj;
|
|
2640
|
-
} : function (obj) {
|
|
2641
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2642
|
-
}, _typeof(obj);
|
|
2643
|
-
}
|
|
2644
|
-
/**
|
|
2645
|
-
* Remove Duplicate objects from JSON Array
|
|
2646
|
-
* @param {Array} obj
|
|
2647
|
-
* @param {String} fieldName
|
|
2648
|
-
*/
|
|
2649
|
-
function _removeArrDuplicateItems(obj, fieldName) {
|
|
2650
|
-
if (!Array.isArray(obj)) return [];
|
|
2651
|
-
var clean = obj.filter(function (item, index, self) {
|
|
2652
|
-
return index === self.findIndex(function (t) {
|
|
2653
|
-
return t[fieldName] === item[fieldName];
|
|
2654
|
-
});
|
|
2655
|
-
});
|
|
2656
|
-
return clean;
|
|
2657
|
-
}
|
|
2658
|
-
;
|
|
2659
|
-
|
|
2660
|
-
/**
|
|
2661
|
-
* Deep clone
|
|
2662
|
-
* @param {*} obj
|
|
2663
|
-
*/
|
|
2664
|
-
function _deepClone(obj) {
|
|
2665
|
-
if (Array.isArray(obj)) {
|
|
2666
|
-
return obj.map(function (item) {
|
|
2667
|
-
return _deepClone(item);
|
|
2668
|
-
});
|
|
2669
|
-
} else if (_typeof(obj) === 'object' && obj !== null) {
|
|
2670
|
-
var clone = {};
|
|
2671
|
-
for (var key in obj) {
|
|
2672
|
-
if (obj.hasOwnProperty(key)) {
|
|
2673
|
-
clone[key] = _deepClone(obj[key]);
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
return clone;
|
|
2677
|
-
} else {
|
|
2678
|
-
return obj;
|
|
2679
|
-
}
|
|
2680
|
-
}
|
|
2681
|
-
|
|
2682
|
-
/**
|
|
2683
|
-
* Flat Data
|
|
2684
|
-
* @param {*} data
|
|
2685
|
-
* @returns
|
|
2686
|
-
*/
|
|
2687
|
-
function _flatData(data) {
|
|
2688
|
-
var result = [];
|
|
2689
|
-
var iterate = function iterate(obj) {
|
|
2690
|
-
if (!obj) {
|
|
2691
|
-
return;
|
|
2692
|
-
}
|
|
2693
|
-
obj.forEach(function (item) {
|
|
2694
|
-
result.push(item);
|
|
2695
|
-
if (item.children) {
|
|
2696
|
-
iterate(item.children);
|
|
2697
|
-
}
|
|
2698
|
-
|
|
2699
|
-
// delete current item children
|
|
2700
|
-
delete item.children;
|
|
2701
|
-
});
|
|
2702
|
-
};
|
|
2703
|
-
iterate(data);
|
|
2704
|
-
return result;
|
|
2705
|
-
}
|
|
2706
|
-
|
|
2707
|
-
/******/
|
|
2708
|
-
return __webpack_exports__;
|
|
2709
|
-
/******/
|
|
2710
|
-
}()
|
|
2711
|
-
);
|
|
2712
|
-
});
|
|
2713
|
-
|
|
2714
|
-
/***/ }),
|
|
2715
|
-
|
|
2716
|
-
/***/ 85:
|
|
2717
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2718
|
-
|
|
2719
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
2720
|
-
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); }
|
|
2721
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2722
|
-
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__webpack_require__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
2723
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
2724
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
2725
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
2726
|
-
})(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
|
|
2727
|
-
return (/******/function () {
|
|
2728
|
-
// webpackBootstrap
|
|
2729
|
-
/******/
|
|
2730
|
-
"use strict";
|
|
2731
|
-
|
|
2732
|
-
/******/
|
|
2733
|
-
var __webpack_modules__ = {
|
|
2734
|
-
/***/787: /***/function _(module) {
|
|
2735
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
2736
|
-
|
|
2737
|
-
/***/
|
|
2738
|
-
}
|
|
2739
|
-
|
|
2740
|
-
/******/
|
|
2741
|
-
};
|
|
2742
|
-
/************************************************************************/
|
|
2743
|
-
/******/ // The module cache
|
|
2744
|
-
/******/
|
|
2745
|
-
var __webpack_module_cache__ = {};
|
|
2746
|
-
/******/
|
|
2747
|
-
/******/ // The require function
|
|
2748
|
-
/******/
|
|
2749
|
-
function __nested_webpack_require_1465__(moduleId) {
|
|
2750
|
-
/******/ // Check if module is in cache
|
|
2751
|
-
/******/var cachedModule = __webpack_module_cache__[moduleId];
|
|
2752
|
-
/******/
|
|
2753
|
-
if (cachedModule !== undefined) {
|
|
2754
|
-
/******/return cachedModule.exports;
|
|
2755
|
-
/******/
|
|
2756
|
-
}
|
|
2757
|
-
/******/ // Create a new module (and put it into the cache)
|
|
2758
|
-
/******/
|
|
2759
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
2760
|
-
/******/ // no module.id needed
|
|
2761
|
-
/******/ // no module.loaded needed
|
|
2762
|
-
/******/exports: {}
|
|
2763
|
-
/******/
|
|
2764
|
-
};
|
|
2765
|
-
/******/
|
|
2766
|
-
/******/ // Execute the module function
|
|
2767
|
-
/******/
|
|
2768
|
-
__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
|
|
2769
|
-
/******/
|
|
2770
|
-
/******/ // Return the exports of the module
|
|
2771
|
-
/******/
|
|
2772
|
-
return module.exports;
|
|
2773
|
-
/******/
|
|
2774
|
-
}
|
|
2775
|
-
/******/
|
|
2776
|
-
/************************************************************************/
|
|
2777
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
2778
|
-
/******/
|
|
2779
|
-
(function () {
|
|
2780
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
2781
|
-
/******/__nested_webpack_require_1465__.n = function (module) {
|
|
2782
|
-
/******/var getter = module && module.__esModule ? /******/function () {
|
|
2783
|
-
return module['default'];
|
|
2784
|
-
} : /******/function () {
|
|
2785
|
-
return module;
|
|
2786
|
-
};
|
|
2787
|
-
/******/
|
|
2788
|
-
__nested_webpack_require_1465__.d(getter, {
|
|
2789
|
-
a: getter
|
|
2790
|
-
});
|
|
2791
|
-
/******/
|
|
2792
|
-
return getter;
|
|
2793
|
-
/******/
|
|
2794
|
-
};
|
|
2795
|
-
/******/
|
|
2796
|
-
})();
|
|
2797
|
-
/******/
|
|
2798
|
-
/******/ /* webpack/runtime/define property getters */
|
|
2799
|
-
/******/
|
|
2800
|
-
(function () {
|
|
2801
|
-
/******/ // define getter functions for harmony exports
|
|
2802
|
-
/******/__nested_webpack_require_1465__.d = function (exports, definition) {
|
|
2803
|
-
/******/for (var key in definition) {
|
|
2804
|
-
/******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
|
|
2805
|
-
/******/Object.defineProperty(exports, key, {
|
|
2806
|
-
enumerable: true,
|
|
2807
|
-
get: definition[key]
|
|
2808
|
-
});
|
|
2809
|
-
/******/
|
|
2810
|
-
}
|
|
2811
|
-
/******/
|
|
2812
|
-
}
|
|
2813
|
-
/******/
|
|
2814
|
-
};
|
|
2815
|
-
/******/
|
|
2816
|
-
})();
|
|
2817
|
-
/******/
|
|
2818
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2819
|
-
/******/
|
|
2820
|
-
(function () {
|
|
2821
|
-
/******/__nested_webpack_require_1465__.o = function (obj, prop) {
|
|
2822
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2823
|
-
};
|
|
2824
|
-
/******/
|
|
2825
|
-
})();
|
|
2826
|
-
/******/
|
|
2827
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
2828
|
-
/******/
|
|
2829
|
-
(function () {
|
|
2830
|
-
/******/ // define __esModule on exports
|
|
2831
|
-
/******/__nested_webpack_require_1465__.r = function (exports) {
|
|
2832
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2833
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
2834
|
-
value: 'Module'
|
|
2835
|
-
});
|
|
2836
|
-
/******/
|
|
2837
|
-
}
|
|
2838
|
-
/******/
|
|
2839
|
-
Object.defineProperty(exports, '__esModule', {
|
|
2840
|
-
value: true
|
|
2841
|
-
});
|
|
2842
|
-
/******/
|
|
2843
|
-
};
|
|
2844
|
-
/******/
|
|
2845
|
-
})();
|
|
2846
|
-
/******/
|
|
2847
|
-
/************************************************************************/
|
|
2848
|
-
var __webpack_exports__ = {};
|
|
2849
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
2850
|
-
(function () {
|
|
2851
|
-
__nested_webpack_require_1465__.r(__webpack_exports__);
|
|
2852
|
-
/* harmony export */
|
|
2853
|
-
__nested_webpack_require_1465__.d(__webpack_exports__, {
|
|
2854
|
-
/* harmony export */"default": function _default() {
|
|
2855
|
-
return __WEBPACK_DEFAULT_EXPORT__;
|
|
2856
|
-
}
|
|
2857
|
-
/* harmony export */
|
|
2858
|
-
});
|
|
2859
|
-
/* harmony import */
|
|
2860
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
|
|
2861
|
-
/* harmony import */
|
|
2862
|
-
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2863
|
-
/**
|
|
2864
|
-
* Create an available ID
|
|
2865
|
-
*
|
|
2866
|
-
*/
|
|
2867
|
-
|
|
2868
|
-
var useComId = function useComId() {
|
|
2869
|
-
return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
|
|
2870
|
-
};
|
|
2871
|
-
/* harmony default export */
|
|
2872
|
-
var __WEBPACK_DEFAULT_EXPORT__ = useComId;
|
|
2873
|
-
})();
|
|
2874
|
-
|
|
2875
|
-
/******/
|
|
2876
|
-
return __webpack_exports__;
|
|
2877
|
-
/******/
|
|
2878
|
-
}()
|
|
2879
|
-
);
|
|
2880
|
-
});
|
|
2881
|
-
|
|
2882
|
-
/***/ }),
|
|
2883
|
-
|
|
2884
|
-
/***/ 787:
|
|
2885
|
-
/***/ ((module) => {
|
|
2886
|
-
|
|
2887
|
-
"use strict";
|
|
2888
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
2889
|
-
|
|
2890
|
-
/***/ })
|
|
2891
|
-
|
|
2892
|
-
/******/ });
|
|
2893
|
-
/************************************************************************/
|
|
2894
|
-
/******/ // The module cache
|
|
2895
|
-
/******/ var __webpack_module_cache__ = {};
|
|
2896
|
-
/******/
|
|
2897
|
-
/******/ // The require function
|
|
2898
|
-
/******/ function __webpack_require__(moduleId) {
|
|
2899
|
-
/******/ // Check if module is in cache
|
|
2900
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
2901
|
-
/******/ if (cachedModule !== undefined) {
|
|
2902
|
-
/******/ return cachedModule.exports;
|
|
2903
|
-
/******/ }
|
|
2904
|
-
/******/ // Create a new module (and put it into the cache)
|
|
2905
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
2906
|
-
/******/ id: moduleId,
|
|
2907
|
-
/******/ loaded: false,
|
|
2908
|
-
/******/ exports: {}
|
|
2909
|
-
/******/ };
|
|
2910
|
-
/******/
|
|
2911
|
-
/******/ // Execute the module function
|
|
2912
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
2913
|
-
/******/
|
|
2914
|
-
/******/ // Flag the module as loaded
|
|
2915
|
-
/******/ module.loaded = true;
|
|
2916
|
-
/******/
|
|
2917
|
-
/******/ // Return the exports of the module
|
|
2918
|
-
/******/ return module.exports;
|
|
2919
|
-
/******/ }
|
|
2920
|
-
/******/
|
|
2921
|
-
/************************************************************************/
|
|
2922
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
2923
|
-
/******/ (() => {
|
|
2924
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
2925
|
-
/******/ __webpack_require__.n = (module) => {
|
|
2926
|
-
/******/ var getter = module && module.__esModule ?
|
|
2927
|
-
/******/ () => (module['default']) :
|
|
2928
|
-
/******/ () => (module);
|
|
2929
|
-
/******/ __webpack_require__.d(getter, { a: getter });
|
|
2930
|
-
/******/ return getter;
|
|
2931
|
-
/******/ };
|
|
2932
|
-
/******/ })();
|
|
2933
|
-
/******/
|
|
2934
|
-
/******/ /* webpack/runtime/define property getters */
|
|
2935
|
-
/******/ (() => {
|
|
2936
|
-
/******/ // define getter functions for harmony exports
|
|
2937
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
2938
|
-
/******/ for(var key in definition) {
|
|
2939
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
2940
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
2941
|
-
/******/ }
|
|
2942
|
-
/******/ }
|
|
2943
|
-
/******/ };
|
|
2944
|
-
/******/ })();
|
|
2945
|
-
/******/
|
|
2946
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2947
|
-
/******/ (() => {
|
|
2948
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2949
|
-
/******/ })();
|
|
2950
|
-
/******/
|
|
2951
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
2952
|
-
/******/ (() => {
|
|
2953
|
-
/******/ // define __esModule on exports
|
|
2954
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
2955
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2956
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2957
|
-
/******/ }
|
|
2958
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
2959
|
-
/******/ };
|
|
2960
|
-
/******/ })();
|
|
2961
|
-
/******/
|
|
2962
|
-
/******/ /* webpack/runtime/node module decorator */
|
|
2963
|
-
/******/ (() => {
|
|
2964
|
-
/******/ __webpack_require__.nmd = (module) => {
|
|
2965
|
-
/******/ module.paths = [];
|
|
2966
|
-
/******/ if (!module.children) module.children = [];
|
|
2967
|
-
/******/ return module;
|
|
2968
|
-
/******/ };
|
|
2969
|
-
/******/ })();
|
|
2970
|
-
/******/
|
|
2971
|
-
/************************************************************************/
|
|
2972
|
-
var __webpack_exports__ = {};
|
|
2973
|
-
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
2974
|
-
(() => {
|
|
2975
|
-
"use strict";
|
|
2976
|
-
// ESM COMPAT FLAG
|
|
2977
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2978
|
-
|
|
2979
|
-
// EXPORTS
|
|
2980
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
2981
|
-
"default": () => (/* binding */ src)
|
|
2982
|
-
});
|
|
2983
|
-
|
|
2984
|
-
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
|
|
2985
|
-
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
|
|
2986
|
-
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
|
|
2987
|
-
// EXTERNAL MODULE: ../DragDropList/dist/cjs/index.js
|
|
2988
|
-
var cjs = __webpack_require__(954);
|
|
2989
|
-
var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);
|
|
2990
|
-
// EXTERNAL MODULE: ../Utils/dist/cjs/useComId.js
|
|
2991
|
-
var useComId = __webpack_require__(85);
|
|
2992
|
-
var useComId_default = /*#__PURE__*/__webpack_require__.n(useComId);
|
|
2993
|
-
// EXTERNAL MODULE: ../Utils/dist/cjs/initDefaultOptions.js
|
|
2994
|
-
var initDefaultOptions = __webpack_require__(186);
|
|
2995
|
-
// EXTERNAL MODULE: ../Utils/dist/cjs/extract.js
|
|
2996
|
-
var extract = __webpack_require__(135);
|
|
2997
|
-
// EXTERNAL MODULE: ../Utils/dist/cjs/convert.js
|
|
2998
|
-
var convert = __webpack_require__(79);
|
|
2999
|
-
// EXTERNAL MODULE: ../Utils/dist/cjs/object.js
|
|
3000
|
-
var object = __webpack_require__(575);
|
|
3001
|
-
// EXTERNAL MODULE: ../Utils/dist/cjs/cls.js
|
|
3002
|
-
var cls = __webpack_require__(188);
|
|
3003
|
-
;// CONCATENATED MODULE: ./src/utils/func.ts
|
|
3004
|
-
/**
|
|
3005
|
-
* Format indent value
|
|
3006
|
-
* @param {String|Array} inputData
|
|
3007
|
-
* @param {String} placeholder
|
|
3008
|
-
* @returns {String|Array}
|
|
3009
|
-
*/
|
|
3010
|
-
function formatIndentVal(inputData, placeholder) {
|
|
3011
|
-
var reVar = new RegExp(placeholder, 'g');
|
|
3012
|
-
if (Array.isArray(inputData)) {
|
|
3013
|
-
return inputData.map(function (s) {
|
|
3014
|
-
return String(s).replace(reVar, '').replace(/\ /ig, '');
|
|
3015
|
-
});
|
|
3016
|
-
} else {
|
|
3017
|
-
var _txt = typeof inputData === 'string' ? inputData : inputData.toString();
|
|
3018
|
-
return _txt.replace(reVar, '').replace(/\ /ig, '');
|
|
3019
|
-
}
|
|
3020
|
-
}
|
|
3021
|
-
|
|
3022
|
-
/**
|
|
3023
|
-
* Determine whether the option exists
|
|
3024
|
-
* @param val
|
|
3025
|
-
* @returns
|
|
3026
|
-
*/
|
|
3027
|
-
function multiSelControlOptionExist(arr, val) {
|
|
3028
|
-
var _data = arr.filter(Boolean);
|
|
3029
|
-
return _data.map(function (v) {
|
|
3030
|
-
return v.toString();
|
|
3031
|
-
}).includes(val.toString());
|
|
3032
|
-
}
|
|
3033
|
-
|
|
3034
|
-
/**
|
|
3035
|
-
* Remove Duplicate objects from JSON Array
|
|
3036
|
-
* @param {Array} arr
|
|
3037
|
-
* @returns
|
|
3038
|
-
*/
|
|
3039
|
-
function uniqueArr(arr) {
|
|
3040
|
-
return arr.filter(function (item, index, self) {
|
|
3041
|
-
return index === self.findIndex(function (t) {
|
|
3042
|
-
return t.id == item.id;
|
|
3043
|
-
});
|
|
3044
|
-
});
|
|
3045
|
-
}
|
|
3046
|
-
|
|
3047
|
-
/**
|
|
3048
|
-
* Remove Duplicate objects from Options
|
|
3049
|
-
* @param {Array} arr
|
|
3050
|
-
* @returns
|
|
3051
|
-
*/
|
|
3052
|
-
function uniqueOpt(arr) {
|
|
3053
|
-
return arr.flat().filter(function (item, index, self) {
|
|
3054
|
-
return index === self.findIndex(function (t) {
|
|
3055
|
-
return t.id === item.id;
|
|
3056
|
-
});
|
|
3057
|
-
});
|
|
3058
|
-
}
|
|
3059
|
-
|
|
3060
|
-
/**
|
|
3061
|
-
* Sort JSON arrays according to the order of the numeric arrays
|
|
3062
|
-
* @param {Array<Number>|Array<String>} orderArray
|
|
3063
|
-
* @param {Array<*>} arr
|
|
3064
|
-
* @param {String} field
|
|
3065
|
-
* @returns
|
|
3066
|
-
*/
|
|
3067
|
-
function sortedJsonArray(orderArray, arr) {
|
|
3068
|
-
var field = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'value';
|
|
3069
|
-
return orderArray.map(function (orderId) {
|
|
3070
|
-
return arr.find(function (item) {
|
|
3071
|
-
return item[field] === orderId;
|
|
3072
|
-
});
|
|
3073
|
-
});
|
|
3074
|
-
}
|
|
3075
|
-
;// CONCATENATED MODULE: ./src/index.tsx
|
|
3076
|
-
var _excluded = ["contentRef", "wrapperClassName", "childClassName", "wrapperMinHeight", "wrapperMinWidth", "availableHeaderTitle", "selectedHeaderTitle", "selectedHeaderNote", "selectedResultReverse", "removeAllBtnLabel", "addAllBtnLabel", "iconAdd", "iconRemove", "unattachedSelect", "options", "disabled", "required", "defaultValue", "value", "label", "name", "id", "draggable", "handleHide", "handleIcon", "handlePos", "dragMode", "indentation", "doubleIndent", "alternateCollapse", "arrow", "extractValueByBrackets", "style", "data", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onAddAll", "onRemoveAll", "onChange"];
|
|
3077
|
-
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; }
|
|
3078
|
-
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); }
|
|
3079
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3080
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3081
|
-
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."); }
|
|
3082
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
3083
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
3084
|
-
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); } }
|
|
3085
|
-
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); }); }; }
|
|
3086
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3087
|
-
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."); }
|
|
3088
|
-
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); }
|
|
3089
|
-
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; }
|
|
3090
|
-
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; } }
|
|
3091
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3092
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
3093
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
var MultipleSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, externalRef) {
|
|
3104
|
-
var contentRef = props.contentRef,
|
|
3105
|
-
wrapperClassName = props.wrapperClassName,
|
|
3106
|
-
childClassName = props.childClassName,
|
|
3107
|
-
wrapperMinHeight = props.wrapperMinHeight,
|
|
3108
|
-
wrapperMinWidth = props.wrapperMinWidth,
|
|
3109
|
-
availableHeaderTitle = props.availableHeaderTitle,
|
|
3110
|
-
selectedHeaderTitle = props.selectedHeaderTitle,
|
|
3111
|
-
selectedHeaderNote = props.selectedHeaderNote,
|
|
3112
|
-
_props$selectedResult = props.selectedResultReverse,
|
|
3113
|
-
selectedResultReverse = _props$selectedResult === void 0 ? false : _props$selectedResult,
|
|
3114
|
-
removeAllBtnLabel = props.removeAllBtnLabel,
|
|
3115
|
-
addAllBtnLabel = props.addAllBtnLabel,
|
|
3116
|
-
iconAdd = props.iconAdd,
|
|
3117
|
-
iconRemove = props.iconRemove,
|
|
3118
|
-
unattachedSelect = props.unattachedSelect,
|
|
3119
|
-
options = props.options,
|
|
3120
|
-
disabled = props.disabled,
|
|
3121
|
-
required = props.required,
|
|
3122
|
-
defaultValue = props.defaultValue,
|
|
3123
|
-
value = props.value,
|
|
3124
|
-
label = props.label,
|
|
3125
|
-
name = props.name,
|
|
3126
|
-
id = props.id,
|
|
3127
|
-
_props$draggable = props.draggable,
|
|
3128
|
-
draggable = _props$draggable === void 0 ? true : _props$draggable,
|
|
3129
|
-
_props$handleHide = props.handleHide,
|
|
3130
|
-
handleHide = _props$handleHide === void 0 ? false : _props$handleHide,
|
|
3131
|
-
_props$handleIcon = props.handleIcon,
|
|
3132
|
-
handleIcon = _props$handleIcon === void 0 ? '☰' : _props$handleIcon,
|
|
3133
|
-
_props$handlePos = props.handlePos,
|
|
3134
|
-
handlePos = _props$handlePos === void 0 ? 'left' : _props$handlePos,
|
|
3135
|
-
_props$dragMode = props.dragMode,
|
|
3136
|
-
dragMode = _props$dragMode === void 0 ? 'handle' : _props$dragMode,
|
|
3137
|
-
indentation = props.indentation,
|
|
3138
|
-
doubleIndent = props.doubleIndent,
|
|
3139
|
-
alternateCollapse = props.alternateCollapse,
|
|
3140
|
-
_props$arrow = props.arrow,
|
|
3141
|
-
arrow = _props$arrow === void 0 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
3142
|
-
viewBox: "0 0 22 22",
|
|
3143
|
-
width: "8px"
|
|
3144
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
|
|
3145
|
-
d: "m345.44 248.29l-194.29 194.28c-12.359 12.365-32.397 12.365-44.75 0-12.354-12.354-12.354-32.391 0-44.744l171.91-171.91-171.91-171.9c-12.354-12.359-12.354-32.394 0-44.748 12.354-12.359 32.391-12.359 44.75 0l194.29 194.28c6.177 6.18 9.262 14.271 9.262 22.366 0 8.099-3.091 16.196-9.267 22.373",
|
|
3146
|
-
transform: "matrix(.03541-.00013.00013.03541 2.98 3.02)",
|
|
3147
|
-
fill: "#a5a5a5"
|
|
3148
|
-
}))) : _props$arrow,
|
|
3149
|
-
extractValueByBrackets = props.extractValueByBrackets,
|
|
3150
|
-
style = props.style,
|
|
3151
|
-
data = props.data,
|
|
3152
|
-
fetchFuncAsync = props.fetchFuncAsync,
|
|
3153
|
-
fetchFuncMethod = props.fetchFuncMethod,
|
|
3154
|
-
fetchFuncMethodParams = props.fetchFuncMethodParams,
|
|
3155
|
-
fetchCallback = props.fetchCallback,
|
|
3156
|
-
onFetch = props.onFetch,
|
|
3157
|
-
onAddAll = props.onAddAll,
|
|
3158
|
-
onRemoveAll = props.onRemoveAll,
|
|
3159
|
-
onChange = props.onChange,
|
|
3160
|
-
attributes = _objectWithoutProperties(props, _excluded);
|
|
3161
|
-
var UNATTACHED_SELECT = typeof unattachedSelect === 'undefined' || unattachedSelect === false ? false : true;
|
|
3162
|
-
var WRAPPER_MIN_H = typeof wrapperMinHeight === 'undefined' ? '' : wrapperMinHeight;
|
|
3163
|
-
var WRAPPER_MIN_W = typeof wrapperMinWidth === 'undefined' ? '' : wrapperMinWidth;
|
|
3164
|
-
var VALUE_BY_BRACKETS = typeof extractValueByBrackets === 'undefined' ? true : extractValueByBrackets;
|
|
3165
|
-
var uniqueID = useComId_default()();
|
|
3166
|
-
var idRes = id || uniqueID;
|
|
3167
|
-
var rootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
3168
|
-
var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
3169
|
-
var availableListRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
3170
|
-
var optionsRes = options ? (0,initDefaultOptions.isJSON)(options) ? JSON.parse(options) : options : [];
|
|
3171
|
-
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
|
|
3172
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
3173
|
-
valSelectedData = _useState2[0],
|
|
3174
|
-
setValSelectedData = _useState2[1];
|
|
3175
|
-
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
|
|
3176
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
3177
|
-
valSelected = _useState4[0],
|
|
3178
|
-
setValSelected = _useState4[1];
|
|
3179
|
-
|
|
3180
|
-
// temp default value
|
|
3181
|
-
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(undefined),
|
|
3182
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
3183
|
-
tempDefaultValue = _useState6[0],
|
|
3184
|
-
setTempDefaultValue = _useState6[1];
|
|
3185
|
-
|
|
3186
|
-
// return a array of options
|
|
3187
|
-
var optionsDataInit = optionsRes;
|
|
3188
|
-
|
|
3189
|
-
//
|
|
3190
|
-
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
|
|
3191
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
3192
|
-
changedSearchVal = _useState8[0],
|
|
3193
|
-
setChangedSearchVal = _useState8[1];
|
|
3194
|
-
|
|
3195
|
-
//
|
|
3196
|
-
var _useState9 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(optionsDataInit),
|
|
3197
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
3198
|
-
dataInit = _useState10[0],
|
|
3199
|
-
setDataInit = _useState10[1];
|
|
3200
|
-
var _useState11 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
3201
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
3202
|
-
hasErr = _useState12[0],
|
|
3203
|
-
setHasErr = _useState12[1];
|
|
3204
|
-
|
|
3205
|
-
// exposes the following methods
|
|
3206
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(contentRef, function () {
|
|
3207
|
-
return {
|
|
3208
|
-
clear: function clear(cb) {
|
|
3209
|
-
var _params = fetchFuncMethodParams || [];
|
|
3210
|
-
fetchData(_params.join(','), '');
|
|
3211
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
3212
|
-
},
|
|
3213
|
-
set: function set(inputData, cb) {
|
|
3214
|
-
if (!Array.isArray(inputData)) return;
|
|
3215
|
-
var _params = fetchFuncMethodParams || [];
|
|
3216
|
-
fetchData(_params.join(','), inputData.map(function (v) {
|
|
3217
|
-
return "[".concat(v.value, "]");
|
|
3218
|
-
}).join(''));
|
|
3219
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
3220
|
-
}
|
|
3221
|
-
};
|
|
3222
|
-
}, [contentRef]);
|
|
3223
|
-
var getExtControll = function getExtControll(index, id, value, extendedContent, defaultValue) {
|
|
3224
|
-
var forceItemSelected = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : undefined;
|
|
3225
|
-
var itemSelected = false;
|
|
3226
|
-
if (typeof defaultValue !== 'undefined' && defaultValue !== '') {
|
|
3227
|
-
var _val = VALUE_BY_BRACKETS ? (0,extract.extractContentsOfBrackets)(defaultValue) : defaultValue.trim().replace(/^\,|\,$/g, '').split(',');
|
|
3228
|
-
if (Array.isArray(_val) && _val.includes(String(value))) {
|
|
3229
|
-
itemSelected = true;
|
|
3230
|
-
}
|
|
3231
|
-
}
|
|
3232
|
-
if (typeof forceItemSelected !== 'undefined') itemSelected = forceItemSelected;
|
|
3233
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3234
|
-
style: {
|
|
3235
|
-
paddingLeft: '1rem',
|
|
3236
|
-
width: '100%',
|
|
3237
|
-
display: 'flex',
|
|
3238
|
-
alignItems: 'center',
|
|
3239
|
-
justifyContent: 'end'
|
|
3240
|
-
}
|
|
3241
|
-
}, extendedContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
3242
|
-
className: "m-select-v2__ext",
|
|
3243
|
-
id: "m-select-v2__ext-".concat(id).concat(itemSelected ? '-selected' : '')
|
|
3244
|
-
}, extendedContent)) : null, itemSelected ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
|
|
3245
|
-
href: "#",
|
|
3246
|
-
onClick: function onClick(e) {
|
|
3247
|
-
e.preventDefault();
|
|
3248
|
-
e.stopPropagation();
|
|
3249
|
-
|
|
3250
|
-
// remove
|
|
3251
|
-
removeItem(id);
|
|
3252
|
-
}
|
|
3253
|
-
}, iconRemove ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, iconRemove) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
3254
|
-
width: "15px",
|
|
3255
|
-
height: "15px",
|
|
3256
|
-
viewBox: "0 0 24 24",
|
|
3257
|
-
fill: "none"
|
|
3258
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
|
|
3259
|
-
fillRule: "evenodd",
|
|
3260
|
-
clipRule: "evenodd",
|
|
3261
|
-
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",
|
|
3262
|
-
fill: "#000"
|
|
3263
|
-
}))))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
|
|
3264
|
-
href: "#",
|
|
3265
|
-
onClick: function onClick(e) {
|
|
3266
|
-
e.preventDefault();
|
|
3267
|
-
e.stopPropagation();
|
|
3268
|
-
|
|
3269
|
-
// add
|
|
3270
|
-
selectItem(id);
|
|
3271
|
-
}
|
|
3272
|
-
}, iconAdd ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, iconAdd) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
3273
|
-
width: "15px",
|
|
3274
|
-
height: "15px",
|
|
3275
|
-
viewBox: "0 0 24 24",
|
|
3276
|
-
fill: "none"
|
|
3277
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
|
|
3278
|
-
d: "M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16 12.75H12.75V16C12.75 16.41 12.41 16.75 12 16.75C11.59 16.75 11.25 16.41 11.25 16V12.75H8C7.59 12.75 7.25 12.41 7.25 12C7.25 11.59 7.59 11.25 8 11.25H11.25V8C11.25 7.59 11.59 7.25 12 7.25C12.41 7.25 12.75 7.59 12.75 8V11.25H16C16.41 11.25 16.75 11.59 16.75 12C16.75 12.41 16.41 12.75 16 12.75Z",
|
|
3279
|
-
fill: "#000"
|
|
3280
|
-
})))))));
|
|
3281
|
-
};
|
|
3282
|
-
var dragdropListDataInit = function dragdropListDataInit(data) {
|
|
3283
|
-
// Add appendControl to list
|
|
3284
|
-
data.forEach(function (item, index) {
|
|
3285
|
-
item.appendControl = getExtControll(index, item.id, item.value, item.extendedContent, tempDefaultValue);
|
|
3286
|
-
});
|
|
3287
|
-
return data;
|
|
3288
|
-
};
|
|
3289
|
-
var dragdropListDefaultDataInit = function dragdropListDefaultDataInit(data) {
|
|
3290
|
-
// Update appendControl to list
|
|
3291
|
-
data.forEach(function (item, index) {
|
|
3292
|
-
item.appendControl = getExtControll(index, item.id, item.value, item.extendedContent, tempDefaultValue, false);
|
|
3293
|
-
});
|
|
3294
|
-
return data;
|
|
3295
|
-
};
|
|
3296
|
-
function fetchData(_x2, _x3) {
|
|
3297
|
-
return _fetchData.apply(this, arguments);
|
|
3298
|
-
}
|
|
3299
|
-
function _fetchData() {
|
|
3300
|
-
_fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, inputDefault) {
|
|
3301
|
-
var response, _ORGIN_DATA;
|
|
3302
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3303
|
-
while (1) switch (_context.prev = _context.next) {
|
|
3304
|
-
case 0:
|
|
3305
|
-
// set default value
|
|
3306
|
-
if (typeof inputDefault !== 'undefined' && inputDefault !== '') inputRef.current.dataset.value = inputDefault;
|
|
3307
|
-
|
|
3308
|
-
//
|
|
3309
|
-
if (!(_typeof(fetchFuncAsync) === 'object')) {
|
|
3310
|
-
_context.next = 16;
|
|
3311
|
-
break;
|
|
3312
|
-
}
|
|
3313
|
-
_context.next = 4;
|
|
3314
|
-
return fetchFuncAsync["".concat(fetchFuncMethod)].apply(fetchFuncAsync, _toConsumableArray(params.split(',')));
|
|
3315
|
-
case 4:
|
|
3316
|
-
response = _context.sent;
|
|
3317
|
-
_ORGIN_DATA = response.data; // reset data structure
|
|
3318
|
-
if (typeof fetchCallback === 'function') {
|
|
3319
|
-
_ORGIN_DATA = fetchCallback(_ORGIN_DATA);
|
|
3320
|
-
}
|
|
3321
|
-
|
|
3322
|
-
// Determine whether the data structure matches
|
|
3323
|
-
if (_ORGIN_DATA.length > 0 && typeof _ORGIN_DATA[0].value === 'undefined') {
|
|
3324
|
-
console.warn('The data structure does not match, please refer to the example in the component documentation.');
|
|
3325
|
-
setHasErr(true);
|
|
3326
|
-
_ORGIN_DATA = [];
|
|
3327
|
-
}
|
|
3328
|
-
|
|
3329
|
-
// remove Duplicate objects from JSON Array
|
|
3330
|
-
_ORGIN_DATA = (0,object.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
|
|
3331
|
-
|
|
3332
|
-
// save temporary default value
|
|
3333
|
-
setTempDefaultValue(inputDefault);
|
|
3334
|
-
|
|
3335
|
-
//
|
|
3336
|
-
setDataInit(_ORGIN_DATA); // data must be initialized
|
|
3337
|
-
|
|
3338
|
-
//
|
|
3339
|
-
initDefaultValue(inputDefault, _ORGIN_DATA); // value must be initialized
|
|
3340
|
-
|
|
3341
|
-
//
|
|
3342
|
-
onFetch === null || onFetch === void 0 ? void 0 : onFetch(_ORGIN_DATA);
|
|
3343
|
-
return _context.abrupt("return", _ORGIN_DATA);
|
|
3344
|
-
case 16:
|
|
3345
|
-
// remove Duplicate objects from JSON Array
|
|
3346
|
-
optionsDataInit = (0,object.removeArrDuplicateItems)(optionsDataInit, 'value');
|
|
3347
|
-
|
|
3348
|
-
// save temporary default value
|
|
3349
|
-
setTempDefaultValue(inputDefault);
|
|
3350
|
-
|
|
3351
|
-
//
|
|
3352
|
-
setDataInit(optionsDataInit); // data must be initialized
|
|
3353
|
-
|
|
3354
|
-
//
|
|
3355
|
-
initDefaultValue(inputDefault, optionsDataInit); // value must be initialized
|
|
3356
|
-
|
|
3357
|
-
//
|
|
3358
|
-
onFetch === null || onFetch === void 0 ? void 0 : onFetch(optionsDataInit);
|
|
3359
|
-
return _context.abrupt("return", optionsDataInit);
|
|
3360
|
-
case 22:
|
|
3361
|
-
case "end":
|
|
3362
|
-
return _context.stop();
|
|
3363
|
-
}
|
|
3364
|
-
}, _callee);
|
|
3365
|
-
}));
|
|
3366
|
-
return _fetchData.apply(this, arguments);
|
|
3367
|
-
}
|
|
3368
|
-
function initDefaultValue(defaultValue, options) {
|
|
3369
|
-
// change the value to trigger component rendering
|
|
3370
|
-
if (typeof defaultValue === 'undefined' || defaultValue === '') {
|
|
3371
|
-
setValSelected([]);
|
|
3372
|
-
setValSelectedData([]);
|
|
3373
|
-
} else {
|
|
3374
|
-
var _val = VALUE_BY_BRACKETS ? (0,extract.extractContentsOfBrackets)(defaultValue) : defaultValue.trim().replace(/^\,|\,$/g, '').split(',');
|
|
3375
|
-
if (Array.isArray(_val)) {
|
|
3376
|
-
var _initVal = _val.filter(function (v) {
|
|
3377
|
-
return v !== '';
|
|
3378
|
-
});
|
|
3379
|
-
setValSelected(_initVal);
|
|
3380
|
-
|
|
3381
|
-
// Initialize selected options
|
|
3382
|
-
if (UNATTACHED_SELECT) {
|
|
3383
|
-
setValSelectedData(function (prevState) {
|
|
3384
|
-
var _data = [].concat(_toConsumableArray(prevState), _toConsumableArray(options.filter(function (item) {
|
|
3385
|
-
return multiSelControlOptionExist(_initVal, item.value);
|
|
3386
|
-
})));
|
|
3387
|
-
return uniqueArr(_data);
|
|
3388
|
-
});
|
|
3389
|
-
} else {
|
|
3390
|
-
setValSelectedData(options.filter(function (item) {
|
|
3391
|
-
return multiSelControlOptionExist(_initVal, item.value);
|
|
3392
|
-
}));
|
|
3393
|
-
}
|
|
3394
|
-
|
|
3395
|
-
// Initialize default options
|
|
3396
|
-
setDataInit(options.filter(function (item) {
|
|
3397
|
-
return !multiSelControlOptionExist(_initVal, item.value);
|
|
3398
|
-
}));
|
|
3399
|
-
} else {
|
|
3400
|
-
setValSelected([]);
|
|
3401
|
-
setValSelectedData([]);
|
|
3402
|
-
}
|
|
3403
|
-
}
|
|
3404
|
-
}
|
|
3405
|
-
function selectItem(curId) {
|
|
3406
|
-
// update default options
|
|
3407
|
-
setDataInit(function (prevState) {
|
|
3408
|
-
var newDefaultData = prevState.filter(function (item) {
|
|
3409
|
-
return item.id != curId;
|
|
3410
|
-
});
|
|
3411
|
-
var targetData = prevState.find(function (v) {
|
|
3412
|
-
return v.id == curId;
|
|
3413
|
-
}); // !!!from old "dataInit"
|
|
3414
|
-
var _data = typeof targetData !== 'undefined' ? targetData : {};
|
|
3415
|
-
|
|
3416
|
-
// update selected data
|
|
3417
|
-
setValSelectedData(function (prevState2) {
|
|
3418
|
-
var newSelectedData = dragdropListDataInit([].concat(_toConsumableArray(prevState2), [_data]));
|
|
3419
|
-
|
|
3420
|
-
// update selected items
|
|
3421
|
-
setValSelected(function (prevState3) {
|
|
3422
|
-
var newValueData = newSelectedData.map(function (v) {
|
|
3423
|
-
return v.value;
|
|
3424
|
-
});
|
|
3425
|
-
var newValueStr = VALUE_BY_BRACKETS ? (0,convert.convertArrToValByBrackets)(newValueData) : newValueData.join(',');
|
|
3426
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(document.querySelector("[data-id=\"".concat(curId, "\"]")), newValueData, newValueStr, _data, 'add', newSelectedData);
|
|
3427
|
-
|
|
3428
|
-
// update temporary default value
|
|
3429
|
-
setTempDefaultValue(newValueStr);
|
|
3430
|
-
return newValueData;
|
|
3431
|
-
});
|
|
3432
|
-
return uniqueArr(newSelectedData);
|
|
3433
|
-
});
|
|
3434
|
-
return uniqueArr(newDefaultData);
|
|
3435
|
-
});
|
|
3436
|
-
}
|
|
3437
|
-
function removeItem(curId) {
|
|
3438
|
-
// update selected data
|
|
3439
|
-
setValSelectedData(function (prevState) {
|
|
3440
|
-
var newSelectedData = prevState.filter(function (item) {
|
|
3441
|
-
return item.id != curId;
|
|
3442
|
-
});
|
|
3443
|
-
var targetData = prevState.find(function (v) {
|
|
3444
|
-
return v.id == curId;
|
|
3445
|
-
}); // !!!from old "valSelectedData"
|
|
3446
|
-
var _data = typeof targetData !== 'undefined' ? targetData : {};
|
|
3447
|
-
|
|
3448
|
-
// update default options
|
|
3449
|
-
setDataInit(function (prevState2) {
|
|
3450
|
-
var newDefaultData = dragdropListDefaultDataInit([].concat(_toConsumableArray(prevState2), [_data]));
|
|
3451
|
-
return uniqueArr(newDefaultData);
|
|
3452
|
-
});
|
|
3453
|
-
|
|
3454
|
-
// update selected items
|
|
3455
|
-
setValSelected(function (prevState3) {
|
|
3456
|
-
var newValueData = newSelectedData.map(function (v) {
|
|
3457
|
-
return v.value;
|
|
3458
|
-
});
|
|
3459
|
-
var newValueStr = VALUE_BY_BRACKETS ? (0,convert.convertArrToValByBrackets)(newValueData) : newValueData.join(',');
|
|
3460
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(document.querySelector("[data-id=\"".concat(curId, "\"]")), newValueData, newValueStr, _data, 'remove', newSelectedData);
|
|
3461
|
-
|
|
3462
|
-
// update temporary default value
|
|
3463
|
-
setTempDefaultValue(newValueStr);
|
|
3464
|
-
return newValueData;
|
|
3465
|
-
});
|
|
3466
|
-
return uniqueArr(newSelectedData);
|
|
3467
|
-
});
|
|
3468
|
-
}
|
|
3469
|
-
function handleSelectAll(event) {
|
|
3470
|
-
event.preventDefault();
|
|
3471
|
-
event.stopPropagation();
|
|
3472
|
-
|
|
3473
|
-
// update default options
|
|
3474
|
-
setDataInit(function (prevState) {
|
|
3475
|
-
var newDefaultData = [];
|
|
3476
|
-
|
|
3477
|
-
// filter the "disabled" option
|
|
3478
|
-
var disabledData = prevState.filter(function (v) {
|
|
3479
|
-
return v.disabled === true;
|
|
3480
|
-
}); // !!!from old "dataInit"
|
|
3481
|
-
var targetData = prevState.filter(function (v) {
|
|
3482
|
-
return typeof v.disabled === 'undefined' || v.disabled === false;
|
|
3483
|
-
}); // !!!from old "dataInit"
|
|
3484
|
-
|
|
3485
|
-
// update selected data
|
|
3486
|
-
setValSelectedData(function (prevState2) {
|
|
3487
|
-
var newSelectedData = dragdropListDataInit([].concat(_toConsumableArray(prevState2), _toConsumableArray(targetData)));
|
|
3488
|
-
|
|
3489
|
-
// update selected items
|
|
3490
|
-
setValSelected(function (prevState3) {
|
|
3491
|
-
var newValueData = newSelectedData.map(function (v) {
|
|
3492
|
-
return v.value;
|
|
3493
|
-
});
|
|
3494
|
-
var newValueStr = VALUE_BY_BRACKETS ? (0,convert.convertArrToValByBrackets)(newValueData) : newValueData.join(',');
|
|
3495
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(null, newValueData, newValueStr, null, 'add-all', newSelectedData);
|
|
3496
|
-
|
|
3497
|
-
// update temporary default value
|
|
3498
|
-
setTempDefaultValue(newValueStr);
|
|
3499
|
-
return newValueData;
|
|
3500
|
-
});
|
|
3501
|
-
return uniqueArr(newSelectedData);
|
|
3502
|
-
});
|
|
3503
|
-
return uniqueArr([].concat(newDefaultData, _toConsumableArray(disabledData)));
|
|
3504
|
-
});
|
|
3505
|
-
}
|
|
3506
|
-
function handleRemoveAll(event) {
|
|
3507
|
-
event.preventDefault();
|
|
3508
|
-
event.stopPropagation();
|
|
3509
|
-
|
|
3510
|
-
// update selected data
|
|
3511
|
-
setValSelectedData(function (prevState) {
|
|
3512
|
-
var newSelectedData = [];
|
|
3513
|
-
var targetData = prevState; // !!!from old "valSelectedData"
|
|
3514
|
-
|
|
3515
|
-
// update default options
|
|
3516
|
-
setDataInit(function (prevState2) {
|
|
3517
|
-
var newDefaultData = dragdropListDefaultDataInit([].concat(_toConsumableArray(prevState2), _toConsumableArray(targetData)));
|
|
3518
|
-
return uniqueArr(newDefaultData);
|
|
3519
|
-
});
|
|
3520
|
-
|
|
3521
|
-
// update selected items
|
|
3522
|
-
setValSelected(function (prevState3) {
|
|
3523
|
-
var newValueData = newSelectedData.map(function (v) {
|
|
3524
|
-
return v.value;
|
|
3525
|
-
});
|
|
3526
|
-
var newValueStr = VALUE_BY_BRACKETS ? (0,convert.convertArrToValByBrackets)(newValueData) : newValueData.join(',');
|
|
3527
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(null, newValueData, newValueStr, null, 'remove-all', newSelectedData);
|
|
3528
|
-
onRemoveAll === null || onRemoveAll === void 0 ? void 0 : onRemoveAll(event, newValueData, newValueStr, newSelectedData);
|
|
3529
|
-
|
|
3530
|
-
// update temporary default value
|
|
3531
|
-
setTempDefaultValue(newValueStr);
|
|
3532
|
-
return newValueData;
|
|
3533
|
-
});
|
|
3534
|
-
return uniqueArr(newSelectedData);
|
|
3535
|
-
});
|
|
3536
|
-
}
|
|
3537
|
-
function handleChangeSearch(event) {
|
|
3538
|
-
var inputVal = event.target.value;
|
|
3539
|
-
if (availableListRef.current === null) return;
|
|
3540
|
-
setChangedSearchVal(inputVal);
|
|
3541
|
-
var items = [].slice.call(availableListRef.current.querySelectorAll('li[data-value]'));
|
|
3542
|
-
items.forEach(function (item) {
|
|
3543
|
-
// Avoid fatal errors causing page crashes
|
|
3544
|
-
var _label = typeof item.dataset.label !== 'undefined' && item.dataset.label !== null ? item.dataset.label : '';
|
|
3545
|
-
var _queryString = typeof item.dataset.querystring !== 'undefined' && item.dataset.querystring !== null ? item.dataset.querystring : '';
|
|
3546
|
-
if ((_queryString.split(',').some(function (l) {
|
|
3547
|
-
return l.charAt(0) === inputVal.toLowerCase();
|
|
3548
|
-
}) || _queryString.split(',').some(function (l) {
|
|
3549
|
-
return l.replace(/ /g, '').indexOf(inputVal.toLowerCase()) >= 0;
|
|
3550
|
-
}) || _label.toLowerCase().indexOf(inputVal.toLowerCase()) >= 0) && inputVal != '') {
|
|
3551
|
-
item.classList.remove('hide');
|
|
3552
|
-
} else {
|
|
3553
|
-
item.classList.add('hide');
|
|
3554
|
-
}
|
|
3555
|
-
});
|
|
3556
|
-
items.forEach(function (item) {
|
|
3557
|
-
if (inputVal === '') {
|
|
3558
|
-
item.classList.remove('hide');
|
|
3559
|
-
}
|
|
3560
|
-
});
|
|
3561
|
-
}
|
|
3562
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
3563
|
-
// data init
|
|
3564
|
-
//--------------
|
|
3565
|
-
var _params = fetchFuncMethodParams || [];
|
|
3566
|
-
fetchData(_params.join(','), value);
|
|
3567
|
-
}, [value, options, data]);
|
|
3568
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
3569
|
-
// update default value (It does not re-render the component because the incoming value changes.)
|
|
3570
|
-
//--------------
|
|
3571
|
-
if (typeof defaultValue !== 'undefined') {
|
|
3572
|
-
//REQUIRED
|
|
3573
|
-
var _params = fetchFuncMethodParams || [];
|
|
3574
|
-
fetchData(_params.join(','), defaultValue);
|
|
3575
|
-
}
|
|
3576
|
-
}, []);
|
|
3577
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3578
|
-
className: (0,cls.combinedCls)('m-select-v2__wrapper', (0,cls.clsWrite)(wrapperClassName, 'mb-3')),
|
|
3579
|
-
ref: rootRef,
|
|
3580
|
-
style: {
|
|
3581
|
-
minWidth: WRAPPER_MIN_W === '' ? 'var(--m-select-v2-wrapper-min-w)' : WRAPPER_MIN_W,
|
|
3582
|
-
minHeight: WRAPPER_MIN_H === '' ? 'var(--m-select-v2-wrapper-min-h)' : WRAPPER_MIN_H
|
|
3583
|
-
}
|
|
3584
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3585
|
-
className: "m-select-v2-diving-line"
|
|
3586
|
-
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", _extends({
|
|
3587
|
-
ref: function ref(node) {
|
|
3588
|
-
inputRef.current = node;
|
|
3589
|
-
if (typeof externalRef === 'function') {
|
|
3590
|
-
externalRef(node);
|
|
3591
|
-
} else if (externalRef) {
|
|
3592
|
-
externalRef.current = node;
|
|
3593
|
-
}
|
|
3594
|
-
},
|
|
3595
|
-
tabIndex: -1,
|
|
3596
|
-
type: "hidden",
|
|
3597
|
-
id: idRes,
|
|
3598
|
-
name: name,
|
|
3599
|
-
value: VALUE_BY_BRACKETS ? (0,convert.convertArrToValByBrackets)(valSelected) : valSelected.join(',') // do not use `defaultValue`
|
|
3600
|
-
,
|
|
3601
|
-
onChange: function onChange() {
|
|
3602
|
-
return void 0;
|
|
3603
|
-
},
|
|
3604
|
-
required: required || null
|
|
3605
|
-
}, attributes)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3606
|
-
className: "m-select-v2-inner"
|
|
3607
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3608
|
-
className: "m-select-v2__available__container"
|
|
3609
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3610
|
-
className: "m-select-v2__m-select-v2__item-actions m-select-v2__header"
|
|
3611
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3612
|
-
className: "m-select-v2__search__container"
|
|
3613
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
|
|
3614
|
-
type: "text",
|
|
3615
|
-
value: changedSearchVal,
|
|
3616
|
-
className: "m-select-v2__search",
|
|
3617
|
-
onChange: handleChangeSearch
|
|
3618
|
-
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("i", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
3619
|
-
width: "0.8em",
|
|
3620
|
-
height: "0.8em",
|
|
3621
|
-
fill: "#ddd",
|
|
3622
|
-
viewBox: "0 0 16 16"
|
|
3623
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
|
|
3624
|
-
d: "M12.027 9.92L16 13.95 14 16l-4.075-3.976A6.465 6.465 0 0 1 6.5 13C2.91 13 0 10.083 0 6.5 0 2.91 2.917 0 6.5 0 10.09 0 13 2.917 13 6.5a6.463 6.463 0 0 1-.973 3.42zM1.997 6.452c0 2.48 2.014 4.5 4.5 4.5 2.48 0 4.5-2.015 4.5-4.5 0-2.48-2.015-4.5-4.5-4.5-2.48 0-4.5 2.014-4.5 4.5z",
|
|
3625
|
-
fillRule: "evenodd"
|
|
3626
|
-
})))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
3627
|
-
className: "m-select-v2__title",
|
|
3628
|
-
dangerouslySetInnerHTML: {
|
|
3629
|
-
__html: "".concat(availableHeaderTitle || '')
|
|
3630
|
-
}
|
|
3631
|
-
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
|
|
3632
|
-
href: "#",
|
|
3633
|
-
className: "m-select-v2__btn--add-all",
|
|
3634
|
-
onClick: handleSelectAll
|
|
3635
|
-
}, addAllBtnLabel || 'Add all')), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((cjs_default()), {
|
|
3636
|
-
data: dragdropListDefaultDataInit(dataInit),
|
|
3637
|
-
wrapperClassName: "",
|
|
3638
|
-
ref: availableListRef,
|
|
3639
|
-
prefix: "m-select-v2",
|
|
3640
|
-
draggable: false,
|
|
3641
|
-
handleHide: handleHide,
|
|
3642
|
-
handleIcon: handleIcon,
|
|
3643
|
-
handlePos: handlePos,
|
|
3644
|
-
dragMode: dragMode,
|
|
3645
|
-
indentation: indentation,
|
|
3646
|
-
doubleIndent: doubleIndent,
|
|
3647
|
-
alternateCollapse: alternateCollapse,
|
|
3648
|
-
arrow: arrow
|
|
3649
|
-
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3650
|
-
className: "m-select-v2__selected__container"
|
|
3651
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3652
|
-
className: "m-select-v2__m-select-v2__item-actions m-select-v2__header"
|
|
3653
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
3654
|
-
className: "m-select-v2__count",
|
|
3655
|
-
dangerouslySetInnerHTML: {
|
|
3656
|
-
__html: "".concat(typeof selectedHeaderNote !== 'undefined' ? selectedHeaderNote.replace('{items_num}', valSelectedData.length) : '')
|
|
3657
|
-
}
|
|
3658
|
-
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
3659
|
-
className: "m-select-v2__title",
|
|
3660
|
-
dangerouslySetInnerHTML: {
|
|
3661
|
-
__html: "".concat(selectedHeaderTitle || '')
|
|
3662
|
-
}
|
|
3663
|
-
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
|
|
3664
|
-
href: "#",
|
|
3665
|
-
className: "m-select-v2__btn--remove-all",
|
|
3666
|
-
onClick: handleRemoveAll
|
|
3667
|
-
}, removeAllBtnLabel || 'Remove all')), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((cjs_default()), {
|
|
3668
|
-
data: dragdropListDataInit(selectedResultReverse ? valSelectedData.reverse() : valSelectedData),
|
|
3669
|
-
onUpdate: function onUpdate(newData, curId) {
|
|
3670
|
-
setValSelectedData(newData);
|
|
3671
|
-
var newValueData = newData.map(function (v) {
|
|
3672
|
-
return v.value;
|
|
3673
|
-
});
|
|
3674
|
-
var newValueStr = VALUE_BY_BRACKETS ? (0,convert.convertArrToValByBrackets)(newValueData) : newValueData.join(',');
|
|
3675
|
-
var targetData = newData.find(function (v) {
|
|
3676
|
-
return v.id == curId;
|
|
3677
|
-
}); // !!!from old "dataInit"
|
|
3678
|
-
var _data = typeof targetData !== 'undefined' ? targetData : {};
|
|
3679
|
-
setValSelected(newData.map(function (v) {
|
|
3680
|
-
return v.value;
|
|
3681
|
-
}));
|
|
3682
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(document.querySelector("[data-id=\"".concat(curId, "\"]")), newValueData, newValueStr, _data, 'update', newData);
|
|
3683
|
-
},
|
|
3684
|
-
wrapperClassName: "",
|
|
3685
|
-
prefix: "m-select-v2",
|
|
3686
|
-
draggable: draggable,
|
|
3687
|
-
handleHide: handleHide,
|
|
3688
|
-
handleIcon: handleIcon,
|
|
3689
|
-
handlePos: handlePos,
|
|
3690
|
-
dragMode: dragMode,
|
|
3691
|
-
indentation: indentation,
|
|
3692
|
-
doubleIndent: doubleIndent,
|
|
3693
|
-
alternateCollapse: false,
|
|
3694
|
-
arrow: arrow,
|
|
3695
|
-
hierarchical: false
|
|
3696
|
-
})))));
|
|
3697
|
-
});
|
|
3698
|
-
/* harmony default export */ const src = (MultipleSelect);
|
|
3699
|
-
})();
|
|
3700
|
-
|
|
3701
|
-
/******/ return __webpack_exports__;
|
|
3702
|
-
/******/ })()
|
|
3703
|
-
;
|
|
3704
|
-
});
|