funda-ui 4.7.624 → 4.7.701
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/{publish/CascadingSelect → CascadingSelect}/index.js +2 -2
- package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.js +2 -2
- package/{publish/Chatbox → Chatbox}/index.js +3 -17
- package/{publish/lib/cjs/Checkbox → Checkbox}/index.js +3 -3
- package/{publish/lib/cjs/ColorPicker → ColorPicker}/index.js +3 -18
- package/{publish/lib/cjs/Date → Date}/index.js +3 -18
- package/{publish/lib/cjs/EventCalendarTimeline → EventCalendarTimeline}/index.d.ts +1 -1
- package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.js +11 -1
- package/{publish/File → File}/index.d.ts +9 -0
- package/{publish/lib/cjs/File → File}/index.js +245 -93
- package/{publish/lib/cjs/Input → Input}/index.js +3 -18
- package/{publish/lib/cjs/LiveSearch → LiveSearch}/index.js +3 -18
- package/{publish/NativeSelect → NativeSelect}/index.js +3 -3
- package/{publish/NumberInput → NumberInput}/index.js +3 -18
- package/{publish/lib/css/Tooltip → Popover}/index.css +69 -69
- package/Popover/index.d.ts +4 -0
- package/{publish/lib/cjs/Tooltip → Popover}/index.js +301 -271
- package/README.md +3 -116
- package/{publish/lib/cjs/Radio → Radio}/index.js +3 -3
- package/{publish/lib/cjs/RangeSlider → RangeSlider}/index.js +3 -18
- package/{publish/SearchBar → SearchBar}/index.js +3 -18
- package/{publish/Select → Select}/index.js +3 -2
- package/{publish/Switch → Switch}/index.js +3 -3
- package/TagInput/index.css +91 -0
- package/{publish/lib/cjs/TagInput → TagInput}/index.js +12 -23
- package/{publish/lib/cjs/Textarea → Textarea}/index.js +3 -17
- package/Utils/useSSE.d.ts +9 -0
- package/{publish/lib/cjs/Utils/useKeyPress.js → Utils/useSSE.js} +88 -77
- package/{publish/all.d.ts → all.d.ts} +1 -0
- package/{publish/all.js → all.js} +1 -0
- package/lib/cjs/CascadingSelect/index.js +2 -2
- package/lib/cjs/CascadingSelectE2E/index.js +2 -2
- package/lib/cjs/Chatbox/index.js +3 -17
- package/lib/cjs/Checkbox/index.js +3 -3
- package/lib/cjs/ColorPicker/index.js +3 -18
- package/lib/cjs/Date/index.js +3 -18
- package/lib/cjs/EventCalendarTimeline/index.d.ts +1 -1
- package/lib/cjs/EventCalendarTimeline/index.js +11 -1
- package/lib/cjs/File/index.d.ts +9 -0
- package/lib/cjs/File/index.js +245 -93
- package/lib/cjs/Input/index.js +3 -18
- package/lib/cjs/LiveSearch/index.js +3 -18
- package/lib/cjs/NativeSelect/index.js +3 -3
- package/lib/cjs/NumberInput/index.js +3 -18
- package/lib/cjs/Popover/index.d.ts +4 -0
- package/{publish/lib/cjs/DropdownMenu → lib/cjs/Popover}/index.js +553 -252
- package/lib/cjs/Radio/index.js +3 -3
- package/lib/cjs/RangeSlider/index.js +3 -18
- package/lib/cjs/SearchBar/index.js +3 -18
- package/lib/cjs/Select/index.js +3 -2
- package/lib/cjs/Switch/index.js +3 -3
- package/lib/cjs/TagInput/index.js +12 -23
- package/lib/cjs/Textarea/index.js +3 -17
- package/lib/cjs/Utils/useSSE.d.ts +9 -0
- package/{publish/lib/cjs/Utils/useAutosizeTextArea.js → lib/cjs/Utils/useSSE.js} +90 -110
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/css/Popover/index.css +198 -0
- package/lib/css/TagInput/index.css +31 -31
- package/lib/esm/CascadingSelect/index.tsx +2 -2
- package/lib/esm/CascadingSelectE2E/index.tsx +2 -2
- package/lib/esm/Checkbox/index.tsx +3 -3
- package/lib/esm/ColorPicker/index.tsx +4 -15
- package/lib/esm/EventCalendarTimeline/index.tsx +11 -2
- package/lib/esm/File/index.tsx +148 -23
- package/lib/esm/Input/index.tsx +6 -17
- package/lib/esm/NativeSelect/index.tsx +3 -3
- package/lib/esm/NumberInput/index.tsx +7 -15
- package/lib/esm/Popover/Popover.tsx +251 -0
- package/lib/esm/Popover/PopoverClose.tsx +51 -0
- package/lib/esm/Popover/PopoverContent.tsx +72 -0
- package/lib/esm/Popover/PopoverTrigger.tsx +62 -0
- package/{publish/lib/esm/Tooltip → lib/esm/Popover}/index.scss +61 -61
- package/lib/esm/Popover/index.tsx +4 -0
- package/lib/esm/Radio/index.tsx +3 -3
- package/lib/esm/SearchBar/index.tsx +8 -12
- package/lib/esm/Select/index.tsx +2 -2
- package/lib/esm/Switch/index.tsx +3 -3
- package/lib/esm/TagInput/index.scss +24 -24
- package/lib/esm/TagInput/index.tsx +13 -20
- package/lib/esm/Textarea/index.tsx +6 -14
- package/lib/esm/Utils/hooks/useSSE.tsx +109 -0
- package/lib/esm/index.js +1 -0
- package/package.json +1 -591
- package/.gitattributes +0 -2
- package/README_PUBLISH.md +0 -328
- package/logo.png +0 -0
- package/preview.png +0 -0
- package/publish/Checkbox/index.js +0 -673
- package/publish/ColorPicker/index.js +0 -662
- package/publish/Date/index.js +0 -6368
- package/publish/EventCalendarTimeline/index.d.ts +0 -100
- package/publish/File/index.js +0 -1751
- package/publish/Input/index.js +0 -1486
- package/publish/LICENSE +0 -21
- package/publish/LiveSearch/index.js +0 -4180
- package/publish/README.md +0 -328
- package/publish/Radio/index.js +0 -1838
- package/publish/RangeSlider/index.js +0 -2696
- package/publish/TagInput/index.css +0 -91
- package/publish/TagInput/index.js +0 -1227
- package/publish/Textarea/index.js +0 -1795
- package/publish/lib/cjs/Accordion/index.d.ts +0 -2
- package/publish/lib/cjs/Accordion/index.js +0 -667
- package/publish/lib/cjs/BackToTop/index.d.ts +0 -17
- package/publish/lib/cjs/BackToTop/index.js +0 -904
- package/publish/lib/cjs/CascadingSelect/index.d.ts +0 -80
- package/publish/lib/cjs/CascadingSelect/index.js +0 -3383
- package/publish/lib/cjs/CascadingSelectE2E/index.d.ts +0 -91
- package/publish/lib/cjs/CascadingSelectE2E/index.js +0 -3988
- package/publish/lib/cjs/Chatbox/index.d.ts +0 -101
- package/publish/lib/cjs/Chatbox/index.js +0 -7037
- package/publish/lib/cjs/Checkbox/index.d.ts +0 -28
- package/publish/lib/cjs/ColorPicker/index.d.ts +0 -27
- 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 -45
- package/publish/lib/cjs/DragDropList/index.js +0 -1586
- package/publish/lib/cjs/DropdownMenu/index.d.ts +0 -38
- package/publish/lib/cjs/DynamicFields/index.d.ts +0 -40
- package/publish/lib/cjs/DynamicFields/index.js +0 -818
- package/publish/lib/cjs/EventCalendar/index.d.ts +0 -61
- package/publish/lib/cjs/EventCalendar/index.js +0 -3789
- package/publish/lib/cjs/EventCalendarTimeline/index.js +0 -6141
- package/publish/lib/cjs/File/index.d.ts +0 -40
- 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/LiveSearch/index.d.ts +0 -70
- package/publish/lib/cjs/MasonryLayout/index.d.ts +0 -14
- package/publish/lib/cjs/MasonryLayout/index.js +0 -689
- package/publish/lib/cjs/ModalDialog/index.d.ts +0 -83
- package/publish/lib/cjs/ModalDialog/index.js +0 -1719
- package/publish/lib/cjs/ModeSwitch/index.d.ts +0 -17
- package/publish/lib/cjs/ModeSwitch/index.js +0 -202
- package/publish/lib/cjs/MultilevelDropdownMenu/index.d.ts +0 -20
- package/publish/lib/cjs/MultilevelDropdownMenu/index.js +0 -930
- package/publish/lib/cjs/MultipleCheckboxes/index.d.ts +0 -66
- package/publish/lib/cjs/MultipleCheckboxes/index.js +0 -2337
- package/publish/lib/cjs/MultipleSelect/index.d.ts +0 -65
- package/publish/lib/cjs/MultipleSelect/index.js +0 -4197
- package/publish/lib/cjs/NativeSelect/index.d.ts +0 -37
- package/publish/lib/cjs/NativeSelect/index.js +0 -2052
- package/publish/lib/cjs/NumberInput/index.d.ts +0 -40
- package/publish/lib/cjs/NumberInput/index.js +0 -1191
- package/publish/lib/cjs/Pagination/index.d.ts +0 -51
- package/publish/lib/cjs/Pagination/index.js +0 -612
- package/publish/lib/cjs/Radio/index.d.ts +0 -45
- package/publish/lib/cjs/RangeSlider/index.d.ts +0 -22
- package/publish/lib/cjs/Refresher/index.d.ts +0 -22
- package/publish/lib/cjs/Refresher/index.js +0 -564
- package/publish/lib/cjs/RootPortal/index.d.ts +0 -9
- package/publish/lib/cjs/RootPortal/index.js +0 -148
- package/publish/lib/cjs/ScrollReveal/index.d.ts +0 -21
- package/publish/lib/cjs/ScrollReveal/index.js +0 -401
- package/publish/lib/cjs/Scrollbar/index.d.ts +0 -17
- package/publish/lib/cjs/Scrollbar/index.js +0 -1107
- package/publish/lib/cjs/SearchBar/index.d.ts +0 -41
- package/publish/lib/cjs/SearchBar/index.js +0 -701
- package/publish/lib/cjs/Select/index.d.ts +0 -107
- package/publish/lib/cjs/Select/index.js +0 -6540
- package/publish/lib/cjs/ShowMoreLess/index.d.ts +0 -36
- package/publish/lib/cjs/ShowMoreLess/index.js +0 -387
- package/publish/lib/cjs/SplitterPanel/index.d.ts +0 -20
- package/publish/lib/cjs/SplitterPanel/index.js +0 -800
- package/publish/lib/cjs/Stepper/index.d.ts +0 -26
- package/publish/lib/cjs/Stepper/index.js +0 -568
- package/publish/lib/cjs/Switch/index.d.ts +0 -25
- package/publish/lib/cjs/Switch/index.js +0 -630
- package/publish/lib/cjs/Table/index.d.ts +0 -12
- package/publish/lib/cjs/Table/index.js +0 -2311
- package/publish/lib/cjs/Tabs/index.d.ts +0 -3
- package/publish/lib/cjs/Tabs/index.js +0 -771
- package/publish/lib/cjs/TagInput/index.d.ts +0 -37
- package/publish/lib/cjs/Textarea/index.d.ts +0 -50
- package/publish/lib/cjs/Toast/index.d.ts +0 -3
- package/publish/lib/cjs/Toast/index.js +0 -1345
- package/publish/lib/cjs/Tooltip/index.d.ts +0 -38
- package/publish/lib/cjs/Tree/index.d.ts +0 -78
- package/publish/lib/cjs/Tree/index.js +0 -2330
- package/publish/lib/cjs/Utils/anim.d.ts +0 -11
- package/publish/lib/cjs/Utils/anim.js +0 -846
- package/publish/lib/cjs/Utils/bodyScrollLock.d.ts +0 -8
- package/publish/lib/cjs/Utils/bodyScrollLock.js +0 -311
- package/publish/lib/cjs/Utils/buffer.d.ts +0 -67
- package/publish/lib/cjs/Utils/buffer.js +0 -343
- package/publish/lib/cjs/Utils/cls.d.ts +0 -15
- package/publish/lib/cjs/Utils/cls.js +0 -124
- package/publish/lib/cjs/Utils/convert.d.ts +0 -25
- package/publish/lib/cjs/Utils/convert.js +0 -109
- package/publish/lib/cjs/Utils/date.d.ts +0 -227
- package/publish/lib/cjs/Utils/date.js +0 -587
- package/publish/lib/cjs/Utils/dom.d.ts +0 -13
- package/publish/lib/cjs/Utils/dom.js +0 -215
- package/publish/lib/cjs/Utils/easing.d.ts +0 -29
- package/publish/lib/cjs/Utils/easing.js +0 -221
- package/publish/lib/cjs/Utils/extract.d.ts +0 -66
- package/publish/lib/cjs/Utils/extract.js +0 -195
- package/publish/lib/cjs/Utils/format-string.d.ts +0 -65
- package/publish/lib/cjs/Utils/format-string.js +0 -167
- package/publish/lib/cjs/Utils/formdata.d.ts +0 -13
- package/publish/lib/cjs/Utils/formdata.js +0 -131
- package/publish/lib/cjs/Utils/getElementProperty.d.ts +0 -52
- package/publish/lib/cjs/Utils/getElementProperty.js +0 -189
- package/publish/lib/cjs/Utils/guid.d.ts +0 -7
- package/publish/lib/cjs/Utils/guid.js +0 -67
- package/publish/lib/cjs/Utils/initDefaultOptions.d.ts +0 -10
- package/publish/lib/cjs/Utils/initDefaultOptions.js +0 -607
- package/publish/lib/cjs/Utils/inputsCalculation.d.ts +0 -28
- package/publish/lib/cjs/Utils/inputsCalculation.js +0 -188
- package/publish/lib/cjs/Utils/math.d.ts +0 -77
- package/publish/lib/cjs/Utils/math.js +0 -305
- package/publish/lib/cjs/Utils/object.d.ts +0 -18
- package/publish/lib/cjs/Utils/object.js +0 -120
- package/publish/lib/cjs/Utils/os.d.ts +0 -2
- package/publish/lib/cjs/Utils/os.js +0 -104
- package/publish/lib/cjs/Utils/performance.d.ts +0 -3
- package/publish/lib/cjs/Utils/performance.js +0 -94
- package/publish/lib/cjs/Utils/sanitize.d.ts +0 -14
- package/publish/lib/cjs/Utils/sanitize.js +0 -87
- package/publish/lib/cjs/Utils/time.d.ts +0 -40
- package/publish/lib/cjs/Utils/time.js +0 -177
- package/publish/lib/cjs/Utils/tree.d.ts +0 -40
- package/publish/lib/cjs/Utils/tree.js +0 -195
- package/publish/lib/cjs/Utils/useAutosizeTextArea.d.ts +0 -10
- package/publish/lib/cjs/Utils/useBoundedDrag.d.ts +0 -125
- package/publish/lib/cjs/Utils/useBoundedDrag.js +0 -380
- package/publish/lib/cjs/Utils/useClickOutside.d.ts +0 -33
- package/publish/lib/cjs/Utils/useClickOutside.js +0 -166
- package/publish/lib/cjs/Utils/useComId.d.ts +0 -6
- package/publish/lib/cjs/Utils/useComId.js +0 -114
- package/publish/lib/cjs/Utils/useDebounce.d.ts +0 -20
- package/publish/lib/cjs/Utils/useDebounce.js +0 -138
- package/publish/lib/cjs/Utils/useDragDropPosition.d.ts +0 -166
- package/publish/lib/cjs/Utils/useDragDropPosition.js +0 -453
- package/publish/lib/cjs/Utils/useDraggable.d.ts +0 -62
- package/publish/lib/cjs/Utils/useDraggable.js +0 -348
- package/publish/lib/cjs/Utils/useHistoryTracker.d.ts +0 -166
- package/publish/lib/cjs/Utils/useHistoryTracker.js +0 -649
- package/publish/lib/cjs/Utils/useInterval.d.ts +0 -5
- package/publish/lib/cjs/Utils/useInterval.js +0 -168
- package/publish/lib/cjs/Utils/useIsMobile.d.ts +0 -2
- package/publish/lib/cjs/Utils/useIsMobile.js +0 -232
- package/publish/lib/cjs/Utils/useKeyPress.d.ts +0 -44
- package/publish/lib/cjs/Utils/useSessionStorageListener.d.ts +0 -2
- package/publish/lib/cjs/Utils/useSessionStorageListener.js +0 -157
- package/publish/lib/cjs/Utils/useStreamController.d.ts +0 -71
- package/publish/lib/cjs/Utils/useStreamController.js +0 -494
- package/publish/lib/cjs/Utils/useThrottle.d.ts +0 -2
- package/publish/lib/cjs/Utils/useThrottle.js +0 -136
- package/publish/lib/cjs/Utils/useWindowScroll.d.ts +0 -12
- package/publish/lib/cjs/Utils/useWindowScroll.js +0 -217
- package/publish/lib/cjs/Utils/validate.d.ts +0 -53
- package/publish/lib/cjs/Utils/validate.js +0 -536
- package/publish/lib/cjs/Utils/viewport.d.ts +0 -7
- package/publish/lib/cjs/Utils/viewport.js +0 -64
- package/publish/lib/cjs/index.d.ts +0 -49
- package/publish/lib/cjs/index.js +0 -50
- package/publish/lib/css/BackToTop/index.css +0 -34
- package/publish/lib/css/CascadingSelect/index.css +0 -245
- package/publish/lib/css/CascadingSelectE2E/index.css +0 -245
- package/publish/lib/css/Chatbox/index.css +0 -774
- package/publish/lib/css/ColorPicker/index.css +0 -58
- package/publish/lib/css/Date/index.css +0 -434
- package/publish/lib/css/DragDropList/index.css +0 -188
- package/publish/lib/css/DropdownMenu/index.css +0 -151
- package/publish/lib/css/EventCalendar/index.css +0 -300
- package/publish/lib/css/EventCalendarTimeline/index.css +0 -694
- package/publish/lib/css/HorizontalScrollContent/index.css +0 -70
- package/publish/lib/css/LiveSearch/index.css +0 -88
- package/publish/lib/css/MultilevelDropdownMenu/index.css +0 -38
- package/publish/lib/css/MultipleSelect/index.css +0 -313
- package/publish/lib/css/RangeSlider/index.css +0 -150
- package/publish/lib/css/Scrollbar/index.css +0 -176
- package/publish/lib/css/Select/index.css +0 -434
- package/publish/lib/css/ShowMoreLess/index.css +0 -23
- package/publish/lib/css/SplitterPanel/index.css +0 -63
- package/publish/lib/css/Stepper/index.css +0 -250
- package/publish/lib/css/Table/index.css +0 -584
- package/publish/lib/css/TagInput/index.css +0 -91
- package/publish/lib/css/Toast/index.css +0 -149
- package/publish/lib/css/Tree/index.css +0 -237
- package/publish/lib/esm/Accordion/Accordion.tsx +0 -185
- package/publish/lib/esm/Accordion/AccordionItem.tsx +0 -248
- package/publish/lib/esm/Accordion/index.tsx +0 -2
- package/publish/lib/esm/BackToTop/index.scss +0 -47
- package/publish/lib/esm/BackToTop/index.tsx +0 -177
- package/publish/lib/esm/CascadingSelect/Group.tsx +0 -83
- package/publish/lib/esm/CascadingSelect/index.scss +0 -330
- package/publish/lib/esm/CascadingSelect/index.tsx +0 -1397
- package/publish/lib/esm/CascadingSelectE2E/Group.tsx +0 -87
- package/publish/lib/esm/CascadingSelectE2E/index.scss +0 -333
- package/publish/lib/esm/CascadingSelectE2E/index.tsx +0 -1684
- package/publish/lib/esm/Chatbox/PureLoader.tsx +0 -47
- package/publish/lib/esm/Chatbox/TypingEffect.tsx +0 -56
- package/publish/lib/esm/Chatbox/index.scss +0 -966
- package/publish/lib/esm/Chatbox/index.tsx +0 -1742
- package/publish/lib/esm/Chatbox/utils/func.ts +0 -180
- package/publish/lib/esm/Checkbox/index.tsx +0 -206
- package/publish/lib/esm/ColorPicker/index.scss +0 -91
- package/publish/lib/esm/ColorPicker/index.tsx +0 -204
- package/publish/lib/esm/Date/Calendar.tsx +0 -723
- package/publish/lib/esm/Date/index.scss +0 -567
- package/publish/lib/esm/Date/index.tsx +0 -1797
- package/publish/lib/esm/Date/localization/en_US.js +0 -13
- package/publish/lib/esm/Date/localization/zh_CN.js +0 -12
- package/publish/lib/esm/DigitalClock/index.tsx +0 -74
- package/publish/lib/esm/DragDropList/index.scss +0 -245
- package/publish/lib/esm/DragDropList/index.tsx +0 -504
- package/publish/lib/esm/DropdownMenu/Option.tsx +0 -55
- package/publish/lib/esm/DropdownMenu/index.scss +0 -205
- package/publish/lib/esm/DropdownMenu/index.tsx +0 -378
- package/publish/lib/esm/DynamicFields/index.tsx +0 -409
- package/publish/lib/esm/EventCalendar/index.scss +0 -407
- package/publish/lib/esm/EventCalendar/index.tsx +0 -1005
- package/publish/lib/esm/EventCalendarTimeline/index.scss +0 -926
- package/publish/lib/esm/EventCalendarTimeline/index.tsx +0 -2686
- package/publish/lib/esm/File/index.tsx +0 -477
- package/publish/lib/esm/HorizontalScrollContent/index.scss +0 -87
- package/publish/lib/esm/HorizontalScrollContent/index.tsx +0 -171
- package/publish/lib/esm/Input/index.tsx +0 -641
- package/publish/lib/esm/LiveSearch/index.scss +0 -129
- package/publish/lib/esm/LiveSearch/index.tsx +0 -1058
- package/publish/lib/esm/MasonryLayout/index.tsx +0 -326
- package/publish/lib/esm/ModalDialog/index.tsx +0 -572
- package/publish/lib/esm/ModeSwitch/index.tsx +0 -82
- package/publish/lib/esm/MultilevelDropdownMenu/ItemList.tsx +0 -265
- package/publish/lib/esm/MultilevelDropdownMenu/index.scss +0 -79
- package/publish/lib/esm/MultilevelDropdownMenu/index.tsx +0 -77
- package/publish/lib/esm/MultipleCheckboxes/index.tsx +0 -849
- package/publish/lib/esm/MultipleSelect/index.scss +0 -398
- package/publish/lib/esm/MultipleSelect/index.tsx +0 -769
- package/publish/lib/esm/MultipleSelect/utils/func.ts +0 -63
- package/publish/lib/esm/NativeSelect/index.tsx +0 -396
- package/publish/lib/esm/NativeSelect/utils/func.ts +0 -51
- package/publish/lib/esm/NumberInput/index.tsx +0 -425
- package/publish/lib/esm/Pagination/index.tsx +0 -286
- package/publish/lib/esm/Pagination/pagination-navigators.tsx +0 -60
- package/publish/lib/esm/Radio/index.tsx +0 -694
- package/publish/lib/esm/RangeSlider/index.scss +0 -186
- package/publish/lib/esm/RangeSlider/index.tsx +0 -241
- package/publish/lib/esm/Refresher/index.tsx +0 -121
- package/publish/lib/esm/RootPortal/index.tsx +0 -59
- package/publish/lib/esm/ScrollReveal/index.tsx +0 -148
- package/publish/lib/esm/Scrollbar/index.scss +0 -221
- package/publish/lib/esm/Scrollbar/index.tsx +0 -561
- package/publish/lib/esm/SearchBar/index.tsx +0 -252
- package/publish/lib/esm/Select/index.scss +0 -639
- package/publish/lib/esm/Select/index.tsx +0 -3104
- package/publish/lib/esm/Select/utils/func.ts +0 -98
- package/publish/lib/esm/ShowMoreLess/index.scss +0 -27
- package/publish/lib/esm/ShowMoreLess/index.tsx +0 -145
- package/publish/lib/esm/SplitterPanel/index.scss +0 -82
- package/publish/lib/esm/SplitterPanel/index.tsx +0 -174
- package/publish/lib/esm/Stepper/index.scss +0 -315
- package/publish/lib/esm/Stepper/index.tsx +0 -325
- package/publish/lib/esm/Switch/index.tsx +0 -149
- package/publish/lib/esm/Table/Table.tsx +0 -351
- package/publish/lib/esm/Table/TableBody.tsx +0 -41
- package/publish/lib/esm/Table/TableCaption.tsx +0 -34
- package/publish/lib/esm/Table/TableCell.tsx +0 -126
- package/publish/lib/esm/Table/TableColgroup.tsx +0 -38
- package/publish/lib/esm/Table/TableContext.tsx +0 -26
- package/publish/lib/esm/Table/TableFoot.tsx +0 -28
- package/publish/lib/esm/Table/TableHead.tsx +0 -28
- package/publish/lib/esm/Table/TableRow.tsx +0 -76
- package/publish/lib/esm/Table/index.scss +0 -418
- package/publish/lib/esm/Table/index.tsx +0 -14
- package/publish/lib/esm/Table/utils/DragHandleSprite.tsx +0 -46
- package/publish/lib/esm/Table/utils/SortSprite.tsx +0 -63
- package/publish/lib/esm/Table/utils/TableFilter.tsx +0 -56
- package/publish/lib/esm/Table/utils/ToggleSelection.tsx +0 -255
- package/publish/lib/esm/Table/utils/func.ts +0 -182
- package/publish/lib/esm/Table/utils/hooks/useTableDraggable.tsx +0 -342
- package/publish/lib/esm/Table/utils/hooks/useTableKeyPress.tsx +0 -255
- package/publish/lib/esm/Table/utils/hooks/useTableResponsive.tsx +0 -92
- package/publish/lib/esm/Table/utils/hooks/useTableSort.tsx +0 -187
- package/publish/lib/esm/Tabs/TabList.tsx +0 -50
- package/publish/lib/esm/Tabs/TabPanel.tsx +0 -44
- package/publish/lib/esm/Tabs/Tabs.tsx +0 -282
- package/publish/lib/esm/Tabs/index.tsx +0 -3
- package/publish/lib/esm/TagInput/index.scss +0 -126
- package/publish/lib/esm/TagInput/index.tsx +0 -379
- package/publish/lib/esm/Textarea/index.tsx +0 -621
- package/publish/lib/esm/Toast/Item.tsx +0 -165
- package/publish/lib/esm/Toast/Toast.tsx +0 -391
- package/publish/lib/esm/Toast/ToastContext.tsx +0 -104
- package/publish/lib/esm/Toast/__toast.vanilla.js +0 -422
- package/publish/lib/esm/Toast/index.scss +0 -197
- package/publish/lib/esm/Toast/index.tsx +0 -3
- package/publish/lib/esm/Toast/types.ts +0 -60
- package/publish/lib/esm/Toast/useToast.tsx +0 -72
- package/publish/lib/esm/Tooltip/index.tsx +0 -416
- package/publish/lib/esm/Tree/TreeList.tsx +0 -600
- package/publish/lib/esm/Tree/index.scss +0 -384
- package/publish/lib/esm/Tree/index.tsx +0 -661
- package/publish/lib/esm/Tree/init-height.tsx +0 -40
- package/publish/lib/esm/Tree/utils/func.ts +0 -15
- package/publish/lib/esm/Utils/hooks/useAutosizeTextArea.tsx +0 -131
- package/publish/lib/esm/Utils/hooks/useBoundedDrag.tsx +0 -301
- package/publish/lib/esm/Utils/hooks/useClickOutside.tsx +0 -69
- package/publish/lib/esm/Utils/hooks/useComId.tsx +0 -13
- package/publish/lib/esm/Utils/hooks/useDebounce.tsx +0 -40
- package/publish/lib/esm/Utils/hooks/useDragDropPosition.tsx +0 -417
- package/publish/lib/esm/Utils/hooks/useDraggable.tsx +0 -265
- package/publish/lib/esm/Utils/hooks/useHistoryTracker.tsx +0 -554
- package/publish/lib/esm/Utils/hooks/useInterval.tsx +0 -74
- package/publish/lib/esm/Utils/hooks/useIsMobile.tsx +0 -139
- package/publish/lib/esm/Utils/hooks/useKeyPress.tsx +0 -104
- package/publish/lib/esm/Utils/hooks/useSessionStorageListener.tsx +0 -45
- package/publish/lib/esm/Utils/hooks/useStreamController.tsx +0 -277
- package/publish/lib/esm/Utils/hooks/useThrottle.tsx +0 -39
- package/publish/lib/esm/Utils/hooks/useWindowScroll.tsx +0 -83
- package/publish/lib/esm/Utils/libs/anim.ts +0 -96
- package/publish/lib/esm/Utils/libs/buffer.ts +0 -262
- package/publish/lib/esm/Utils/libs/cls.ts +0 -64
- package/publish/lib/esm/Utils/libs/convert.ts +0 -59
- package/publish/lib/esm/Utils/libs/date.ts +0 -598
- package/publish/lib/esm/Utils/libs/dom.ts +0 -150
- package/publish/lib/esm/Utils/libs/easing.ts +0 -201
- package/publish/lib/esm/Utils/libs/extract.ts +0 -160
- package/publish/lib/esm/Utils/libs/format-string.ts +0 -116
- package/publish/lib/esm/Utils/libs/formdata.ts +0 -93
- package/publish/lib/esm/Utils/libs/getElementProperty.ts +0 -150
- package/publish/lib/esm/Utils/libs/guid.ts +0 -16
- package/publish/lib/esm/Utils/libs/initDefaultOptions.ts +0 -43
- package/publish/lib/esm/Utils/libs/inputsCalculation.ts +0 -160
- package/publish/lib/esm/Utils/libs/math.ts +0 -276
- package/publish/lib/esm/Utils/libs/object.ts +0 -68
- package/publish/lib/esm/Utils/libs/os.ts +0 -63
- package/publish/lib/esm/Utils/libs/performance.ts +0 -47
- package/publish/lib/esm/Utils/libs/sanitize.ts +0 -55
- package/publish/lib/esm/Utils/libs/time.ts +0 -139
- package/publish/lib/esm/Utils/libs/tree.ts +0 -119
- package/publish/lib/esm/Utils/libs/validate.ts +0 -434
- package/publish/lib/esm/Utils/libs/viewport.ts +0 -20
- package/publish/lib/esm/Utils/plugins/bodyScrollLock.ts +0 -286
- package/publish/lib/esm/index.js +0 -47
- package/publish/package.json +0 -1
- /package/{publish/Accordion → Accordion}/index.d.ts +0 -0
- /package/{publish/Accordion → Accordion}/index.js +0 -0
- /package/{publish/BackToTop → BackToTop}/index.css +0 -0
- /package/{publish/BackToTop → BackToTop}/index.d.ts +0 -0
- /package/{publish/BackToTop → BackToTop}/index.js +0 -0
- /package/{publish/CascadingSelect → CascadingSelect}/index.css +0 -0
- /package/{publish/CascadingSelect → CascadingSelect}/index.d.ts +0 -0
- /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.css +0 -0
- /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.d.ts +0 -0
- /package/{publish/Chatbox → Chatbox}/index.css +0 -0
- /package/{publish/Chatbox → Chatbox}/index.d.ts +0 -0
- /package/{publish/Checkbox → Checkbox}/index.d.ts +0 -0
- /package/{publish/ColorPicker → ColorPicker}/index.css +0 -0
- /package/{publish/ColorPicker → ColorPicker}/index.d.ts +0 -0
- /package/{publish/Date → Date}/index.css +0 -0
- /package/{publish/Date → Date}/index.d.ts +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/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/LiveSearch → LiveSearch}/index.css +0 -0
- /package/{publish/LiveSearch → LiveSearch}/index.d.ts +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/NumberInput → NumberInput}/index.d.ts +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/RangeSlider → RangeSlider}/index.css +0 -0
- /package/{publish/RangeSlider → RangeSlider}/index.d.ts +0 -0
- /package/{publish/Refresher → Refresher}/index.d.ts +0 -0
- /package/{publish/Refresher → Refresher}/index.js +0 -0
- /package/{publish/RootPortal → RootPortal}/index.d.ts +0 -0
- /package/{publish/RootPortal → RootPortal}/index.js +0 -0
- /package/{publish/ScrollReveal → ScrollReveal}/index.d.ts +0 -0
- /package/{publish/ScrollReveal → ScrollReveal}/index.js +0 -0
- /package/{publish/Scrollbar → Scrollbar}/index.css +0 -0
- /package/{publish/Scrollbar → Scrollbar}/index.d.ts +0 -0
- /package/{publish/Scrollbar → Scrollbar}/index.js +0 -0
- /package/{publish/SearchBar → SearchBar}/index.d.ts +0 -0
- /package/{publish/Select → Select}/index.css +0 -0
- /package/{publish/Select → Select}/index.d.ts +0 -0
- /package/{publish/ShowMoreLess → ShowMoreLess}/index.css +0 -0
- /package/{publish/ShowMoreLess → ShowMoreLess}/index.d.ts +0 -0
- /package/{publish/ShowMoreLess → ShowMoreLess}/index.js +0 -0
- /package/{publish/SplitterPanel → SplitterPanel}/index.css +0 -0
- /package/{publish/SplitterPanel → SplitterPanel}/index.d.ts +0 -0
- /package/{publish/SplitterPanel → SplitterPanel}/index.js +0 -0
- /package/{publish/Stepper → Stepper}/index.css +0 -0
- /package/{publish/Stepper → Stepper}/index.d.ts +0 -0
- /package/{publish/Stepper → Stepper}/index.js +0 -0
- /package/{publish/Switch → Switch}/index.d.ts +0 -0
- /package/{publish/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.d.ts +0 -0
- /package/{publish/Textarea → Textarea}/index.d.ts +0 -0
- /package/{publish/Toast → Toast}/index.css +0 -0
- /package/{publish/Toast → Toast}/index.d.ts +0 -0
- /package/{publish/Toast → Toast}/index.js +0 -0
- /package/{publish/Tooltip → Tooltip}/index.css +0 -0
- /package/{publish/Tooltip → Tooltip}/index.d.ts +0 -0
- /package/{publish/Tooltip → Tooltip}/index.js +0 -0
- /package/{publish/Tree → Tree}/index.css +0 -0
- /package/{publish/Tree → Tree}/index.d.ts +0 -0
- /package/{publish/Tree → Tree}/index.js +0 -0
- /package/{publish/Utils → Utils}/anim.d.ts +0 -0
- /package/{publish/Utils → Utils}/anim.js +0 -0
- /package/{publish/Utils → Utils}/bodyScrollLock.d.ts +0 -0
- /package/{publish/Utils → Utils}/bodyScrollLock.js +0 -0
- /package/{publish/Utils → Utils}/buffer.d.ts +0 -0
- /package/{publish/Utils → Utils}/buffer.js +0 -0
- /package/{publish/Utils → Utils}/cls.d.ts +0 -0
- /package/{publish/Utils → Utils}/cls.js +0 -0
- /package/{publish/Utils → Utils}/convert.d.ts +0 -0
- /package/{publish/Utils → Utils}/convert.js +0 -0
- /package/{publish/Utils → Utils}/date.d.ts +0 -0
- /package/{publish/Utils → Utils}/date.js +0 -0
- /package/{publish/Utils → Utils}/dom.d.ts +0 -0
- /package/{publish/Utils → Utils}/dom.js +0 -0
- /package/{publish/Utils → Utils}/easing.d.ts +0 -0
- /package/{publish/Utils → Utils}/easing.js +0 -0
- /package/{publish/Utils → Utils}/extract.d.ts +0 -0
- /package/{publish/Utils → Utils}/extract.js +0 -0
- /package/{publish/Utils → Utils}/format-string.d.ts +0 -0
- /package/{publish/Utils → Utils}/format-string.js +0 -0
- /package/{publish/Utils → Utils}/formdata.d.ts +0 -0
- /package/{publish/Utils → Utils}/formdata.js +0 -0
- /package/{publish/Utils → Utils}/getElementProperty.d.ts +0 -0
- /package/{publish/Utils → Utils}/getElementProperty.js +0 -0
- /package/{publish/Utils → Utils}/guid.d.ts +0 -0
- /package/{publish/Utils → Utils}/guid.js +0 -0
- /package/{publish/Utils → Utils}/initDefaultOptions.d.ts +0 -0
- /package/{publish/Utils → Utils}/initDefaultOptions.js +0 -0
- /package/{publish/Utils → Utils}/inputsCalculation.d.ts +0 -0
- /package/{publish/Utils → Utils}/inputsCalculation.js +0 -0
- /package/{publish/Utils → Utils}/math.d.ts +0 -0
- /package/{publish/Utils → Utils}/math.js +0 -0
- /package/{publish/Utils → Utils}/object.d.ts +0 -0
- /package/{publish/Utils → Utils}/object.js +0 -0
- /package/{publish/Utils → Utils}/os.d.ts +0 -0
- /package/{publish/Utils → Utils}/os.js +0 -0
- /package/{publish/Utils → Utils}/performance.d.ts +0 -0
- /package/{publish/Utils → Utils}/performance.js +0 -0
- /package/{publish/Utils → Utils}/sanitize.d.ts +0 -0
- /package/{publish/Utils → Utils}/sanitize.js +0 -0
- /package/{publish/Utils → Utils}/time.d.ts +0 -0
- /package/{publish/Utils → Utils}/time.js +0 -0
- /package/{publish/Utils → Utils}/tree.d.ts +0 -0
- /package/{publish/Utils → Utils}/tree.js +0 -0
- /package/{publish/Utils → Utils}/useAutosizeTextArea.d.ts +0 -0
- /package/{publish/Utils → Utils}/useAutosizeTextArea.js +0 -0
- /package/{publish/Utils → Utils}/useBoundedDrag.d.ts +0 -0
- /package/{publish/Utils → Utils}/useBoundedDrag.js +0 -0
- /package/{publish/Utils → Utils}/useClickOutside.d.ts +0 -0
- /package/{publish/Utils → Utils}/useClickOutside.js +0 -0
- /package/{publish/Utils → Utils}/useComId.d.ts +0 -0
- /package/{publish/Utils → Utils}/useComId.js +0 -0
- /package/{publish/Utils → Utils}/useDebounce.d.ts +0 -0
- /package/{publish/Utils → Utils}/useDebounce.js +0 -0
- /package/{publish/Utils → Utils}/useDragDropPosition.d.ts +0 -0
- /package/{publish/Utils → Utils}/useDragDropPosition.js +0 -0
- /package/{publish/Utils → Utils}/useDraggable.d.ts +0 -0
- /package/{publish/Utils → Utils}/useDraggable.js +0 -0
- /package/{publish/Utils → Utils}/useHistoryTracker.d.ts +0 -0
- /package/{publish/Utils → Utils}/useHistoryTracker.js +0 -0
- /package/{publish/Utils → Utils}/useInterval.d.ts +0 -0
- /package/{publish/Utils → Utils}/useInterval.js +0 -0
- /package/{publish/Utils → Utils}/useIsMobile.d.ts +0 -0
- /package/{publish/Utils → Utils}/useIsMobile.js +0 -0
- /package/{publish/Utils → Utils}/useKeyPress.d.ts +0 -0
- /package/{publish/Utils → Utils}/useKeyPress.js +0 -0
- /package/{publish/Utils → Utils}/useSessionStorageListener.d.ts +0 -0
- /package/{publish/Utils → Utils}/useSessionStorageListener.js +0 -0
- /package/{publish/Utils → Utils}/useStreamController.d.ts +0 -0
- /package/{publish/Utils → Utils}/useStreamController.js +0 -0
- /package/{publish/Utils → Utils}/useThrottle.d.ts +0 -0
- /package/{publish/Utils → Utils}/useThrottle.js +0 -0
- /package/{publish/Utils → Utils}/useWindowScroll.d.ts +0 -0
- /package/{publish/Utils → Utils}/useWindowScroll.js +0 -0
- /package/{publish/Utils → Utils}/validate.d.ts +0 -0
- /package/{publish/Utils → Utils}/validate.js +0 -0
- /package/{publish/Utils → Utils}/viewport.d.ts +0 -0
- /package/{publish/Utils → Utils}/viewport.js +0 -0
|
@@ -1,2337 +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
|
-
/***/ 188:
|
|
15
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
16
|
-
|
|
17
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
18
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof2(obj); }
|
|
19
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
20
|
-
if (( false ? 0 : _typeof2(exports)) === 'object' && ( false ? 0 : _typeof2(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __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 () {
|
|
25
|
-
return (/******/function () {
|
|
26
|
-
// webpackBootstrap
|
|
27
|
-
/******/
|
|
28
|
-
"use strict";
|
|
29
|
-
|
|
30
|
-
/******/ // The require scope
|
|
31
|
-
/******/
|
|
32
|
-
var __nested_webpack_require_993__ = {};
|
|
33
|
-
/******/
|
|
34
|
-
/************************************************************************/
|
|
35
|
-
/******/ /* webpack/runtime/define property getters */
|
|
36
|
-
/******/
|
|
37
|
-
(function () {
|
|
38
|
-
/******/ // define getter functions for harmony exports
|
|
39
|
-
/******/__nested_webpack_require_993__.d = function (exports, definition) {
|
|
40
|
-
/******/for (var key in definition) {
|
|
41
|
-
/******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
|
|
42
|
-
/******/Object.defineProperty(exports, key, {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: definition[key]
|
|
45
|
-
});
|
|
46
|
-
/******/
|
|
47
|
-
}
|
|
48
|
-
/******/
|
|
49
|
-
}
|
|
50
|
-
/******/
|
|
51
|
-
};
|
|
52
|
-
/******/
|
|
53
|
-
})();
|
|
54
|
-
/******/
|
|
55
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
56
|
-
/******/
|
|
57
|
-
(function () {
|
|
58
|
-
/******/__nested_webpack_require_993__.o = function (obj, prop) {
|
|
59
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
60
|
-
};
|
|
61
|
-
/******/
|
|
62
|
-
})();
|
|
63
|
-
/******/
|
|
64
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
65
|
-
/******/
|
|
66
|
-
(function () {
|
|
67
|
-
/******/ // define __esModule on exports
|
|
68
|
-
/******/__nested_webpack_require_993__.r = function (exports) {
|
|
69
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
70
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
71
|
-
value: 'Module'
|
|
72
|
-
});
|
|
73
|
-
/******/
|
|
74
|
-
}
|
|
75
|
-
/******/
|
|
76
|
-
Object.defineProperty(exports, '__esModule', {
|
|
77
|
-
value: true
|
|
78
|
-
});
|
|
79
|
-
/******/
|
|
80
|
-
};
|
|
81
|
-
/******/
|
|
82
|
-
})();
|
|
83
|
-
/******/
|
|
84
|
-
/************************************************************************/
|
|
85
|
-
var __webpack_exports__ = {};
|
|
86
|
-
__nested_webpack_require_993__.r(__webpack_exports__);
|
|
87
|
-
/* harmony export */
|
|
88
|
-
__nested_webpack_require_993__.d(__webpack_exports__, {
|
|
89
|
-
/* harmony export */"clsWrite": function clsWrite() {
|
|
90
|
-
return (/* binding */_clsWrite
|
|
91
|
-
);
|
|
92
|
-
},
|
|
93
|
-
/* harmony export */"combinedCls": function combinedCls() {
|
|
94
|
-
return (/* binding */_combinedCls
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
/* harmony export */
|
|
98
|
-
});
|
|
99
|
-
function _slicedToArray(arr, i) {
|
|
100
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
101
|
-
}
|
|
102
|
-
function _nonIterableRest() {
|
|
103
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
104
|
-
}
|
|
105
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
106
|
-
if (!o) return;
|
|
107
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
108
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
109
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
110
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
111
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
112
|
-
}
|
|
113
|
-
function _arrayLikeToArray(arr, len) {
|
|
114
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
115
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
116
|
-
return arr2;
|
|
117
|
-
}
|
|
118
|
-
function _iterableToArrayLimit(arr, i) {
|
|
119
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
120
|
-
if (null != _i) {
|
|
121
|
-
var _s,
|
|
122
|
-
_e,
|
|
123
|
-
_x,
|
|
124
|
-
_r,
|
|
125
|
-
_arr = [],
|
|
126
|
-
_n = !0,
|
|
127
|
-
_d = !1;
|
|
128
|
-
try {
|
|
129
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
130
|
-
if (Object(_i) !== _i) return;
|
|
131
|
-
_n = !1;
|
|
132
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
133
|
-
} catch (err) {
|
|
134
|
-
_d = !0, _e = err;
|
|
135
|
-
} finally {
|
|
136
|
-
try {
|
|
137
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
138
|
-
} finally {
|
|
139
|
-
if (_d) throw _e;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return _arr;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
function _arrayWithHoles(arr) {
|
|
146
|
-
if (Array.isArray(arr)) return arr;
|
|
147
|
-
}
|
|
148
|
-
function _typeof(obj) {
|
|
149
|
-
"@babel/helpers - typeof";
|
|
150
|
-
|
|
151
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
152
|
-
return typeof obj;
|
|
153
|
-
} : function (obj) {
|
|
154
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
155
|
-
}, _typeof(obj);
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Output of class name
|
|
159
|
-
* @param {*} s - Any
|
|
160
|
-
* @param {String} defaultCls - Default string
|
|
161
|
-
* @param {?*} targetCls - Any
|
|
162
|
-
* @returns {*}
|
|
163
|
-
*/
|
|
164
|
-
function _clsWrite(s, defaultCls) {
|
|
165
|
-
var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
166
|
-
return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Combined classnames
|
|
171
|
-
* @param {*} args
|
|
172
|
-
* @returns {String|undefined}
|
|
173
|
-
*/
|
|
174
|
-
/* Usage:
|
|
175
|
-
|
|
176
|
-
console.log(combinedCls('a-1', 'a-2', 'a-3', {
|
|
177
|
-
'p-1': null,
|
|
178
|
-
'p-2': undefined,
|
|
179
|
-
'p-3': true,
|
|
180
|
-
'p-4': false,
|
|
181
|
-
'p-5': 'kkk',
|
|
182
|
-
'p-6': 0,
|
|
183
|
-
'p-7': 1,
|
|
184
|
-
'p-8': '',
|
|
185
|
-
undefined
|
|
186
|
-
})); // a-1 a-2 a-3 p-3 p-5 p-7
|
|
187
|
-
*/
|
|
188
|
-
function _combinedCls() {
|
|
189
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
190
|
-
args[_key] = arguments[_key];
|
|
191
|
-
}
|
|
192
|
-
if (args) {
|
|
193
|
-
var classes = [];
|
|
194
|
-
for (var i = 0; i < args.length; i++) {
|
|
195
|
-
var className = args[i];
|
|
196
|
-
if (!className) {
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
var type = _typeof(className);
|
|
200
|
-
if (type === 'string' || type === 'number') {
|
|
201
|
-
classes.push(className);
|
|
202
|
-
} else if (type === 'object') {
|
|
203
|
-
var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
|
|
204
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
205
|
-
key = _ref2[0],
|
|
206
|
-
value = _ref2[1];
|
|
207
|
-
return value ? key : null;
|
|
208
|
-
});
|
|
209
|
-
classes = _classes.length ? classes.concat(_classes.filter(function (c) {
|
|
210
|
-
return !!c;
|
|
211
|
-
})) : classes;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
return classes.join(' ').trim();
|
|
215
|
-
}
|
|
216
|
-
return undefined;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/******/
|
|
220
|
-
return __webpack_exports__;
|
|
221
|
-
/******/
|
|
222
|
-
}()
|
|
223
|
-
);
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
/***/ }),
|
|
227
|
-
|
|
228
|
-
/***/ 79:
|
|
229
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
230
|
-
|
|
231
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
232
|
-
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); }
|
|
233
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
234
|
-
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),
|
|
235
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
236
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
237
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
238
|
-
})(this, function () {
|
|
239
|
-
return (/******/function () {
|
|
240
|
-
// webpackBootstrap
|
|
241
|
-
/******/
|
|
242
|
-
"use strict";
|
|
243
|
-
|
|
244
|
-
/******/ // The require scope
|
|
245
|
-
/******/
|
|
246
|
-
var __nested_webpack_require_987__ = {};
|
|
247
|
-
/******/
|
|
248
|
-
/************************************************************************/
|
|
249
|
-
/******/ /* webpack/runtime/define property getters */
|
|
250
|
-
/******/
|
|
251
|
-
(function () {
|
|
252
|
-
/******/ // define getter functions for harmony exports
|
|
253
|
-
/******/__nested_webpack_require_987__.d = function (exports, definition) {
|
|
254
|
-
/******/for (var key in definition) {
|
|
255
|
-
/******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
|
|
256
|
-
/******/Object.defineProperty(exports, key, {
|
|
257
|
-
enumerable: true,
|
|
258
|
-
get: definition[key]
|
|
259
|
-
});
|
|
260
|
-
/******/
|
|
261
|
-
}
|
|
262
|
-
/******/
|
|
263
|
-
}
|
|
264
|
-
/******/
|
|
265
|
-
};
|
|
266
|
-
/******/
|
|
267
|
-
})();
|
|
268
|
-
/******/
|
|
269
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
270
|
-
/******/
|
|
271
|
-
(function () {
|
|
272
|
-
/******/__nested_webpack_require_987__.o = function (obj, prop) {
|
|
273
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
274
|
-
};
|
|
275
|
-
/******/
|
|
276
|
-
})();
|
|
277
|
-
/******/
|
|
278
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
279
|
-
/******/
|
|
280
|
-
(function () {
|
|
281
|
-
/******/ // define __esModule on exports
|
|
282
|
-
/******/__nested_webpack_require_987__.r = function (exports) {
|
|
283
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
284
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
285
|
-
value: 'Module'
|
|
286
|
-
});
|
|
287
|
-
/******/
|
|
288
|
-
}
|
|
289
|
-
/******/
|
|
290
|
-
Object.defineProperty(exports, '__esModule', {
|
|
291
|
-
value: true
|
|
292
|
-
});
|
|
293
|
-
/******/
|
|
294
|
-
};
|
|
295
|
-
/******/
|
|
296
|
-
})();
|
|
297
|
-
/******/
|
|
298
|
-
/************************************************************************/
|
|
299
|
-
var __webpack_exports__ = {};
|
|
300
|
-
__nested_webpack_require_987__.r(__webpack_exports__);
|
|
301
|
-
/* harmony export */
|
|
302
|
-
__nested_webpack_require_987__.d(__webpack_exports__, {
|
|
303
|
-
/* harmony export */"convertArrToValByBraces": function convertArrToValByBraces() {
|
|
304
|
-
return (/* binding */_convertArrToValByBraces
|
|
305
|
-
);
|
|
306
|
-
},
|
|
307
|
-
/* harmony export */"convertArrToValByBrackets": function convertArrToValByBrackets() {
|
|
308
|
-
return (/* binding */_convertArrToValByBrackets
|
|
309
|
-
);
|
|
310
|
-
},
|
|
311
|
-
/* harmony export */"convertStringByCommaToValByBraces": function convertStringByCommaToValByBraces() {
|
|
312
|
-
return (/* binding */_convertStringByCommaToValByBraces
|
|
313
|
-
);
|
|
314
|
-
},
|
|
315
|
-
/* harmony export */"convertStringByCommaToValByBrackets": function convertStringByCommaToValByBrackets() {
|
|
316
|
-
return (/* binding */_convertStringByCommaToValByBrackets
|
|
317
|
-
);
|
|
318
|
-
}
|
|
319
|
-
/* harmony export */
|
|
320
|
-
});
|
|
321
|
-
/**
|
|
322
|
-
* Convert value to string separated by square brackets
|
|
323
|
-
* @param {String} str such as: 1,2,3
|
|
324
|
-
* @returns {String} such as: [1][2][3]
|
|
325
|
-
*/
|
|
326
|
-
function _convertStringByCommaToValByBrackets(str) {
|
|
327
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
328
|
-
return '';
|
|
329
|
-
}
|
|
330
|
-
return str.split(',').map(function (v) {
|
|
331
|
-
return v.toString().includes('[') && v.toString().includes(']') ? "".concat(v) : "[".concat(v, "]");
|
|
332
|
-
}).join('');
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Convert array value to string separated by square brackets
|
|
337
|
-
* @param {String[]} arr such as: ['1','2','3']
|
|
338
|
-
* @returns {String} such as: [1][2][3]
|
|
339
|
-
*/
|
|
340
|
-
function _convertArrToValByBrackets(arr) {
|
|
341
|
-
if (!Array.isArray(arr)) return '';
|
|
342
|
-
return arr.map(function (v) {
|
|
343
|
-
return v.toString().includes('[') && v.toString().includes(']') ? "".concat(v) : "[".concat(v, "]");
|
|
344
|
-
}).join('');
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Convert value to string separated by curly braces
|
|
349
|
-
* @param {String} str such as: 1,2,3
|
|
350
|
-
* @returns {String} such as: {1}{2}{3}
|
|
351
|
-
*/
|
|
352
|
-
function _convertStringByCommaToValByBraces(str) {
|
|
353
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
354
|
-
return '';
|
|
355
|
-
}
|
|
356
|
-
return str.split(',').map(function (v) {
|
|
357
|
-
return v.toString().includes('{') && v.toString().includes('}') ? "".concat(v) : "{".concat(v, "}");
|
|
358
|
-
}).join('');
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Convert array value to string separated by curly braces
|
|
363
|
-
* @param {String[]} arr such as: ['1','2','3']
|
|
364
|
-
* @returns {String} such as: {1}{2}{3}
|
|
365
|
-
*/
|
|
366
|
-
function _convertArrToValByBraces(arr) {
|
|
367
|
-
if (!Array.isArray(arr)) return '';
|
|
368
|
-
return arr.map(function (v) {
|
|
369
|
-
return v.toString().includes('{') && v.toString().includes('}') ? "".concat(v) : "{".concat(v, "}");
|
|
370
|
-
}).join('');
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
/******/
|
|
374
|
-
return __webpack_exports__;
|
|
375
|
-
/******/
|
|
376
|
-
}()
|
|
377
|
-
);
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
/***/ }),
|
|
381
|
-
|
|
382
|
-
/***/ 135:
|
|
383
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
384
|
-
|
|
385
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
386
|
-
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); }
|
|
387
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
388
|
-
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),
|
|
389
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
390
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
391
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
392
|
-
})(this, function () {
|
|
393
|
-
return (/******/function () {
|
|
394
|
-
// webpackBootstrap
|
|
395
|
-
/******/
|
|
396
|
-
"use strict";
|
|
397
|
-
|
|
398
|
-
/******/ // The require scope
|
|
399
|
-
/******/
|
|
400
|
-
var __nested_webpack_require_987__ = {};
|
|
401
|
-
/******/
|
|
402
|
-
/************************************************************************/
|
|
403
|
-
/******/ /* webpack/runtime/define property getters */
|
|
404
|
-
/******/
|
|
405
|
-
(function () {
|
|
406
|
-
/******/ // define getter functions for harmony exports
|
|
407
|
-
/******/__nested_webpack_require_987__.d = function (exports, definition) {
|
|
408
|
-
/******/for (var key in definition) {
|
|
409
|
-
/******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
|
|
410
|
-
/******/Object.defineProperty(exports, key, {
|
|
411
|
-
enumerable: true,
|
|
412
|
-
get: definition[key]
|
|
413
|
-
});
|
|
414
|
-
/******/
|
|
415
|
-
}
|
|
416
|
-
/******/
|
|
417
|
-
}
|
|
418
|
-
/******/
|
|
419
|
-
};
|
|
420
|
-
/******/
|
|
421
|
-
})();
|
|
422
|
-
/******/
|
|
423
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
424
|
-
/******/
|
|
425
|
-
(function () {
|
|
426
|
-
/******/__nested_webpack_require_987__.o = function (obj, prop) {
|
|
427
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
428
|
-
};
|
|
429
|
-
/******/
|
|
430
|
-
})();
|
|
431
|
-
/******/
|
|
432
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
433
|
-
/******/
|
|
434
|
-
(function () {
|
|
435
|
-
/******/ // define __esModule on exports
|
|
436
|
-
/******/__nested_webpack_require_987__.r = function (exports) {
|
|
437
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
438
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
439
|
-
value: 'Module'
|
|
440
|
-
});
|
|
441
|
-
/******/
|
|
442
|
-
}
|
|
443
|
-
/******/
|
|
444
|
-
Object.defineProperty(exports, '__esModule', {
|
|
445
|
-
value: true
|
|
446
|
-
});
|
|
447
|
-
/******/
|
|
448
|
-
};
|
|
449
|
-
/******/
|
|
450
|
-
})();
|
|
451
|
-
/******/
|
|
452
|
-
/************************************************************************/
|
|
453
|
-
var __webpack_exports__ = {};
|
|
454
|
-
__nested_webpack_require_987__.r(__webpack_exports__);
|
|
455
|
-
/* harmony export */
|
|
456
|
-
__nested_webpack_require_987__.d(__webpack_exports__, {
|
|
457
|
-
/* harmony export */"extractContentsOfBraces": function extractContentsOfBraces() {
|
|
458
|
-
return (/* binding */_extractContentsOfBraces
|
|
459
|
-
);
|
|
460
|
-
},
|
|
461
|
-
/* harmony export */"extractContentsOfBrackets": function extractContentsOfBrackets() {
|
|
462
|
-
return (/* binding */_extractContentsOfBrackets
|
|
463
|
-
);
|
|
464
|
-
},
|
|
465
|
-
/* harmony export */"extractContentsOfMixedCharactersWithBraces": function extractContentsOfMixedCharactersWithBraces() {
|
|
466
|
-
return (/* binding */_extractContentsOfMixedCharactersWithBraces
|
|
467
|
-
);
|
|
468
|
-
},
|
|
469
|
-
/* harmony export */"extractContentsOfMixedCharactersWithComma": function extractContentsOfMixedCharactersWithComma() {
|
|
470
|
-
return (/* binding */_extractContentsOfMixedCharactersWithComma
|
|
471
|
-
);
|
|
472
|
-
},
|
|
473
|
-
/* harmony export */"extractContentsOfParentheses": function extractContentsOfParentheses() {
|
|
474
|
-
return (/* binding */_extractContentsOfParentheses
|
|
475
|
-
);
|
|
476
|
-
},
|
|
477
|
-
/* harmony export */"extractorExist": function extractorExist() {
|
|
478
|
-
return (/* binding */_extractorExist
|
|
479
|
-
);
|
|
480
|
-
}
|
|
481
|
-
/* harmony export */
|
|
482
|
-
});
|
|
483
|
-
/**
|
|
484
|
-
* Determine whether an extractor is included
|
|
485
|
-
* @param {String} str => input string. such as 'a[1], b[2]', '{a[1]}'
|
|
486
|
-
* @returns {Boolean}
|
|
487
|
-
*/
|
|
488
|
-
function _extractorExist(str) {
|
|
489
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
490
|
-
return false;
|
|
491
|
-
}
|
|
492
|
-
var res = false;
|
|
493
|
-
if (str !== null && str !== void 0 && str.match(/(\[.*?\])/gi)) {
|
|
494
|
-
res = true;
|
|
495
|
-
}
|
|
496
|
-
return res;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Extract the contents of square brackets
|
|
501
|
-
* @param {String} str => input string. such as '[1,2] [f][c]'
|
|
502
|
-
* @param {Boolean} commaSeparated => flag to determine if the result should be comma separated or not
|
|
503
|
-
* @returns {Array<string>|string} such as: ['1,2','f','c']
|
|
504
|
-
*/
|
|
505
|
-
function _extractContentsOfBrackets(str) {
|
|
506
|
-
var commaSeparated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
507
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
508
|
-
return !commaSeparated ? [] : '';
|
|
509
|
-
}
|
|
510
|
-
var res = str.match(/[^\[]+(?=(\[ \])|\])/g);
|
|
511
|
-
if (commaSeparated) {
|
|
512
|
-
return res === null ? '' : res.join(',').replace(/\,+$/, '');
|
|
513
|
-
} else {
|
|
514
|
-
return res === null ? '' : res;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
/**
|
|
519
|
-
* Extract the contents of curly braces
|
|
520
|
-
* @param {String} str => input string. such as '{1,2} {f}{c}'
|
|
521
|
-
* @param {Boolean} commaSeparated => flag to determine if the result should be comma separated or not
|
|
522
|
-
* @returns {Array<string>|string} such as: ['1,2','f','c']
|
|
523
|
-
*/
|
|
524
|
-
function _extractContentsOfBraces(str) {
|
|
525
|
-
var commaSeparated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
526
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
527
|
-
return !commaSeparated ? [] : '';
|
|
528
|
-
}
|
|
529
|
-
var res = str.match(/[^\{]+(?=(\{ \})|\})/g);
|
|
530
|
-
if (commaSeparated) {
|
|
531
|
-
return res === null ? '' : res.join(',').replace(/\,+$/, '');
|
|
532
|
-
} else {
|
|
533
|
-
return res === null ? '' : res;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
* Extract the contents of parentheses
|
|
539
|
-
* @param {String} str => input string. such as '(1,2) (f)(c)'
|
|
540
|
-
* @param {Boolean} commaSeparated => flag to determine if the result should be comma separated or not
|
|
541
|
-
* @returns {Array<string>|string} such as: ['1,2','f','c']
|
|
542
|
-
*/
|
|
543
|
-
function _extractContentsOfParentheses(str) {
|
|
544
|
-
var commaSeparated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
545
|
-
if (typeof str === 'undefined' || str === null || str === '') {
|
|
546
|
-
return !commaSeparated ? [] : '';
|
|
547
|
-
}
|
|
548
|
-
var res = str.match(/[^\(]+(?=(\( \))|\))/g);
|
|
549
|
-
if (commaSeparated) {
|
|
550
|
-
return res === null ? '' : res.join(',').replace(/\,+$/, '');
|
|
551
|
-
} else {
|
|
552
|
-
return res === null ? '' : res;
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
/**
|
|
557
|
-
* Parses a braces-separated string of `{label[value]}` pairs into an array of objects.
|
|
558
|
-
*
|
|
559
|
-
* Example:
|
|
560
|
-
* Input: "{Poor[c]}{Sub-option 4[c-2]}{Empty[]}"
|
|
561
|
-
* Input: "{{Poor[c]}{Sub-option 4[c-2]}{Empty[]}[]}"
|
|
562
|
-
*
|
|
563
|
-
* Output: [
|
|
564
|
-
* { label: "Poor", value: "c" },
|
|
565
|
-
* { label: "Sub-option 4", value: "c-2" },
|
|
566
|
-
* { label: "Empty", value: "" }
|
|
567
|
-
* ]
|
|
568
|
-
*
|
|
569
|
-
* @param {string} str - The input string containing one or more `{label[value]}` segments.
|
|
570
|
-
* @returns {Array<{label: string, value: string}>} - An array of extracted label-value objects.
|
|
571
|
-
*/
|
|
572
|
-
function _extractContentsOfMixedCharactersWithBraces(str) {
|
|
573
|
-
// Fix the extra '{' at the beginning
|
|
574
|
-
var cleaned = str.replace(/^{{/, '{');
|
|
575
|
-
|
|
576
|
-
// Remove empty {} or {[]} tail
|
|
577
|
-
var trimmed = cleaned.replace(/\{\[\]\}$/, '');
|
|
578
|
-
|
|
579
|
-
// The match is like {label[value]}
|
|
580
|
-
var pattern = /\{(.*?)\[(.*?)\]\}/g;
|
|
581
|
-
var matches = Array.from(trimmed.matchAll(pattern));
|
|
582
|
-
return matches.map(function (match) {
|
|
583
|
-
return {
|
|
584
|
-
label: match[1],
|
|
585
|
-
value: match[2]
|
|
586
|
-
};
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
/**
|
|
591
|
-
* Parses a comma-separated string of `label[value]` pairs into an array of objects.
|
|
592
|
-
*
|
|
593
|
-
* Example:
|
|
594
|
-
* Input: "Poor[c],Sub-option 4[c-2],Empty[]"
|
|
595
|
-
* Output: [
|
|
596
|
-
* { label: "Poor", value: "c" },
|
|
597
|
-
* { label: "Sub-option 4", value: "c-2" },
|
|
598
|
-
* { label: "Empty", value: "" }
|
|
599
|
-
* ]
|
|
600
|
-
*
|
|
601
|
-
* @param {string} str - A string containing label-value pairs in the format `label[value]`, separated by commas.
|
|
602
|
-
* @returns {Array<{ label: string, value: string }>} - An array of parsed objects.
|
|
603
|
-
*/
|
|
604
|
-
function _extractContentsOfMixedCharactersWithComma(str) {
|
|
605
|
-
return str.split(",").map(function (item) {
|
|
606
|
-
return item.trim();
|
|
607
|
-
}).map(function (item) {
|
|
608
|
-
var match = item.match(/^(.*?)\[(.*?)\]$/);
|
|
609
|
-
if (match) {
|
|
610
|
-
return {
|
|
611
|
-
label: match[1],
|
|
612
|
-
value: match[2]
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
|
-
return null;
|
|
616
|
-
}).filter(Boolean);
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
/******/
|
|
620
|
-
return __webpack_exports__;
|
|
621
|
-
/******/
|
|
622
|
-
}()
|
|
623
|
-
);
|
|
624
|
-
});
|
|
625
|
-
|
|
626
|
-
/***/ }),
|
|
627
|
-
|
|
628
|
-
/***/ 575:
|
|
629
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
630
|
-
|
|
631
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
632
|
-
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); }
|
|
633
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
634
|
-
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),
|
|
635
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
636
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
637
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
638
|
-
})(this, function () {
|
|
639
|
-
return (/******/function () {
|
|
640
|
-
// webpackBootstrap
|
|
641
|
-
/******/
|
|
642
|
-
"use strict";
|
|
643
|
-
|
|
644
|
-
/******/ // The require scope
|
|
645
|
-
/******/
|
|
646
|
-
var __nested_webpack_require_993__ = {};
|
|
647
|
-
/******/
|
|
648
|
-
/************************************************************************/
|
|
649
|
-
/******/ /* webpack/runtime/define property getters */
|
|
650
|
-
/******/
|
|
651
|
-
(function () {
|
|
652
|
-
/******/ // define getter functions for harmony exports
|
|
653
|
-
/******/__nested_webpack_require_993__.d = function (exports, definition) {
|
|
654
|
-
/******/for (var key in definition) {
|
|
655
|
-
/******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
|
|
656
|
-
/******/Object.defineProperty(exports, key, {
|
|
657
|
-
enumerable: true,
|
|
658
|
-
get: definition[key]
|
|
659
|
-
});
|
|
660
|
-
/******/
|
|
661
|
-
}
|
|
662
|
-
/******/
|
|
663
|
-
}
|
|
664
|
-
/******/
|
|
665
|
-
};
|
|
666
|
-
/******/
|
|
667
|
-
})();
|
|
668
|
-
/******/
|
|
669
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
670
|
-
/******/
|
|
671
|
-
(function () {
|
|
672
|
-
/******/__nested_webpack_require_993__.o = function (obj, prop) {
|
|
673
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
674
|
-
};
|
|
675
|
-
/******/
|
|
676
|
-
})();
|
|
677
|
-
/******/
|
|
678
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
679
|
-
/******/
|
|
680
|
-
(function () {
|
|
681
|
-
/******/ // define __esModule on exports
|
|
682
|
-
/******/__nested_webpack_require_993__.r = function (exports) {
|
|
683
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
684
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
685
|
-
value: 'Module'
|
|
686
|
-
});
|
|
687
|
-
/******/
|
|
688
|
-
}
|
|
689
|
-
/******/
|
|
690
|
-
Object.defineProperty(exports, '__esModule', {
|
|
691
|
-
value: true
|
|
692
|
-
});
|
|
693
|
-
/******/
|
|
694
|
-
};
|
|
695
|
-
/******/
|
|
696
|
-
})();
|
|
697
|
-
/******/
|
|
698
|
-
/************************************************************************/
|
|
699
|
-
var __webpack_exports__ = {};
|
|
700
|
-
__nested_webpack_require_993__.r(__webpack_exports__);
|
|
701
|
-
/* harmony export */
|
|
702
|
-
__nested_webpack_require_993__.d(__webpack_exports__, {
|
|
703
|
-
/* harmony export */"deepClone": function deepClone() {
|
|
704
|
-
return (/* binding */_deepClone
|
|
705
|
-
);
|
|
706
|
-
},
|
|
707
|
-
/* harmony export */"flatData": function flatData() {
|
|
708
|
-
return (/* binding */_flatData
|
|
709
|
-
);
|
|
710
|
-
},
|
|
711
|
-
/* harmony export */"removeArrDuplicateItems": function removeArrDuplicateItems() {
|
|
712
|
-
return (/* binding */_removeArrDuplicateItems
|
|
713
|
-
);
|
|
714
|
-
}
|
|
715
|
-
/* harmony export */
|
|
716
|
-
});
|
|
717
|
-
function _typeof(obj) {
|
|
718
|
-
"@babel/helpers - typeof";
|
|
719
|
-
|
|
720
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
721
|
-
return typeof obj;
|
|
722
|
-
} : function (obj) {
|
|
723
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
724
|
-
}, _typeof(obj);
|
|
725
|
-
}
|
|
726
|
-
/**
|
|
727
|
-
* Remove Duplicate objects from JSON Array
|
|
728
|
-
* @param {Array} obj
|
|
729
|
-
* @param {String} fieldName
|
|
730
|
-
*/
|
|
731
|
-
function _removeArrDuplicateItems(obj, fieldName) {
|
|
732
|
-
if (!Array.isArray(obj)) return [];
|
|
733
|
-
var clean = obj.filter(function (item, index, self) {
|
|
734
|
-
return index === self.findIndex(function (t) {
|
|
735
|
-
return t[fieldName] === item[fieldName];
|
|
736
|
-
});
|
|
737
|
-
});
|
|
738
|
-
return clean;
|
|
739
|
-
}
|
|
740
|
-
;
|
|
741
|
-
|
|
742
|
-
/**
|
|
743
|
-
* Deep clone
|
|
744
|
-
* @param {*} obj
|
|
745
|
-
*/
|
|
746
|
-
function _deepClone(obj) {
|
|
747
|
-
if (Array.isArray(obj)) {
|
|
748
|
-
return obj.map(function (item) {
|
|
749
|
-
return _deepClone(item);
|
|
750
|
-
});
|
|
751
|
-
} else if (_typeof(obj) === 'object' && obj !== null) {
|
|
752
|
-
var clone = {};
|
|
753
|
-
for (var key in obj) {
|
|
754
|
-
if (obj.hasOwnProperty(key)) {
|
|
755
|
-
clone[key] = _deepClone(obj[key]);
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
return clone;
|
|
759
|
-
} else {
|
|
760
|
-
return obj;
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
/**
|
|
765
|
-
* Flat Data
|
|
766
|
-
* @param {*} data
|
|
767
|
-
* @returns
|
|
768
|
-
*/
|
|
769
|
-
function _flatData(data) {
|
|
770
|
-
var result = [];
|
|
771
|
-
var iterate = function iterate(obj) {
|
|
772
|
-
if (!obj) {
|
|
773
|
-
return;
|
|
774
|
-
}
|
|
775
|
-
obj.forEach(function (item) {
|
|
776
|
-
result.push(item);
|
|
777
|
-
if (item.children) {
|
|
778
|
-
iterate(item.children);
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
// delete current item children
|
|
782
|
-
delete item.children;
|
|
783
|
-
});
|
|
784
|
-
};
|
|
785
|
-
iterate(data);
|
|
786
|
-
return result;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
/******/
|
|
790
|
-
return __webpack_exports__;
|
|
791
|
-
/******/
|
|
792
|
-
}()
|
|
793
|
-
);
|
|
794
|
-
});
|
|
795
|
-
|
|
796
|
-
/***/ }),
|
|
797
|
-
|
|
798
|
-
/***/ 85:
|
|
799
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
800
|
-
|
|
801
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
802
|
-
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); }
|
|
803
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
804
|
-
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),
|
|
805
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
806
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
807
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
808
|
-
})(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
|
|
809
|
-
return (/******/function () {
|
|
810
|
-
// webpackBootstrap
|
|
811
|
-
/******/
|
|
812
|
-
"use strict";
|
|
813
|
-
|
|
814
|
-
/******/
|
|
815
|
-
var __webpack_modules__ = {
|
|
816
|
-
/***/787: /***/function _(module) {
|
|
817
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
818
|
-
|
|
819
|
-
/***/
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
/******/
|
|
823
|
-
};
|
|
824
|
-
/************************************************************************/
|
|
825
|
-
/******/ // The module cache
|
|
826
|
-
/******/
|
|
827
|
-
var __webpack_module_cache__ = {};
|
|
828
|
-
/******/
|
|
829
|
-
/******/ // The require function
|
|
830
|
-
/******/
|
|
831
|
-
function __nested_webpack_require_1465__(moduleId) {
|
|
832
|
-
/******/ // Check if module is in cache
|
|
833
|
-
/******/var cachedModule = __webpack_module_cache__[moduleId];
|
|
834
|
-
/******/
|
|
835
|
-
if (cachedModule !== undefined) {
|
|
836
|
-
/******/return cachedModule.exports;
|
|
837
|
-
/******/
|
|
838
|
-
}
|
|
839
|
-
/******/ // Create a new module (and put it into the cache)
|
|
840
|
-
/******/
|
|
841
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
842
|
-
/******/ // no module.id needed
|
|
843
|
-
/******/ // no module.loaded needed
|
|
844
|
-
/******/exports: {}
|
|
845
|
-
/******/
|
|
846
|
-
};
|
|
847
|
-
/******/
|
|
848
|
-
/******/ // Execute the module function
|
|
849
|
-
/******/
|
|
850
|
-
__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
|
|
851
|
-
/******/
|
|
852
|
-
/******/ // Return the exports of the module
|
|
853
|
-
/******/
|
|
854
|
-
return module.exports;
|
|
855
|
-
/******/
|
|
856
|
-
}
|
|
857
|
-
/******/
|
|
858
|
-
/************************************************************************/
|
|
859
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
860
|
-
/******/
|
|
861
|
-
(function () {
|
|
862
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
863
|
-
/******/__nested_webpack_require_1465__.n = function (module) {
|
|
864
|
-
/******/var getter = module && module.__esModule ? /******/function () {
|
|
865
|
-
return module['default'];
|
|
866
|
-
} : /******/function () {
|
|
867
|
-
return module;
|
|
868
|
-
};
|
|
869
|
-
/******/
|
|
870
|
-
__nested_webpack_require_1465__.d(getter, {
|
|
871
|
-
a: getter
|
|
872
|
-
});
|
|
873
|
-
/******/
|
|
874
|
-
return getter;
|
|
875
|
-
/******/
|
|
876
|
-
};
|
|
877
|
-
/******/
|
|
878
|
-
})();
|
|
879
|
-
/******/
|
|
880
|
-
/******/ /* webpack/runtime/define property getters */
|
|
881
|
-
/******/
|
|
882
|
-
(function () {
|
|
883
|
-
/******/ // define getter functions for harmony exports
|
|
884
|
-
/******/__nested_webpack_require_1465__.d = function (exports, definition) {
|
|
885
|
-
/******/for (var key in definition) {
|
|
886
|
-
/******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
|
|
887
|
-
/******/Object.defineProperty(exports, key, {
|
|
888
|
-
enumerable: true,
|
|
889
|
-
get: definition[key]
|
|
890
|
-
});
|
|
891
|
-
/******/
|
|
892
|
-
}
|
|
893
|
-
/******/
|
|
894
|
-
}
|
|
895
|
-
/******/
|
|
896
|
-
};
|
|
897
|
-
/******/
|
|
898
|
-
})();
|
|
899
|
-
/******/
|
|
900
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
901
|
-
/******/
|
|
902
|
-
(function () {
|
|
903
|
-
/******/__nested_webpack_require_1465__.o = function (obj, prop) {
|
|
904
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
905
|
-
};
|
|
906
|
-
/******/
|
|
907
|
-
})();
|
|
908
|
-
/******/
|
|
909
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
910
|
-
/******/
|
|
911
|
-
(function () {
|
|
912
|
-
/******/ // define __esModule on exports
|
|
913
|
-
/******/__nested_webpack_require_1465__.r = function (exports) {
|
|
914
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
915
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
916
|
-
value: 'Module'
|
|
917
|
-
});
|
|
918
|
-
/******/
|
|
919
|
-
}
|
|
920
|
-
/******/
|
|
921
|
-
Object.defineProperty(exports, '__esModule', {
|
|
922
|
-
value: true
|
|
923
|
-
});
|
|
924
|
-
/******/
|
|
925
|
-
};
|
|
926
|
-
/******/
|
|
927
|
-
})();
|
|
928
|
-
/******/
|
|
929
|
-
/************************************************************************/
|
|
930
|
-
var __webpack_exports__ = {};
|
|
931
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
932
|
-
(function () {
|
|
933
|
-
__nested_webpack_require_1465__.r(__webpack_exports__);
|
|
934
|
-
/* harmony export */
|
|
935
|
-
__nested_webpack_require_1465__.d(__webpack_exports__, {
|
|
936
|
-
/* harmony export */"default": function _default() {
|
|
937
|
-
return __WEBPACK_DEFAULT_EXPORT__;
|
|
938
|
-
}
|
|
939
|
-
/* harmony export */
|
|
940
|
-
});
|
|
941
|
-
/* harmony import */
|
|
942
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
|
|
943
|
-
/* harmony import */
|
|
944
|
-
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
945
|
-
/**
|
|
946
|
-
* Create an available ID
|
|
947
|
-
*
|
|
948
|
-
*/
|
|
949
|
-
|
|
950
|
-
var useComId = function useComId() {
|
|
951
|
-
return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
|
|
952
|
-
};
|
|
953
|
-
/* harmony default export */
|
|
954
|
-
var __WEBPACK_DEFAULT_EXPORT__ = useComId;
|
|
955
|
-
})();
|
|
956
|
-
|
|
957
|
-
/******/
|
|
958
|
-
return __webpack_exports__;
|
|
959
|
-
/******/
|
|
960
|
-
}()
|
|
961
|
-
);
|
|
962
|
-
});
|
|
963
|
-
|
|
964
|
-
/***/ }),
|
|
965
|
-
|
|
966
|
-
/***/ 455:
|
|
967
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
968
|
-
|
|
969
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
970
|
-
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); }
|
|
971
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
972
|
-
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),
|
|
973
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
974
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
975
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
976
|
-
})(this, function () {
|
|
977
|
-
return (/******/function () {
|
|
978
|
-
// webpackBootstrap
|
|
979
|
-
/******/
|
|
980
|
-
"use strict";
|
|
981
|
-
|
|
982
|
-
/******/ // The require scope
|
|
983
|
-
/******/
|
|
984
|
-
var __nested_webpack_require_993__ = {};
|
|
985
|
-
/******/
|
|
986
|
-
/************************************************************************/
|
|
987
|
-
/******/ /* webpack/runtime/define property getters */
|
|
988
|
-
/******/
|
|
989
|
-
(function () {
|
|
990
|
-
/******/ // define getter functions for harmony exports
|
|
991
|
-
/******/__nested_webpack_require_993__.d = function (exports, definition) {
|
|
992
|
-
/******/for (var key in definition) {
|
|
993
|
-
/******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
|
|
994
|
-
/******/Object.defineProperty(exports, key, {
|
|
995
|
-
enumerable: true,
|
|
996
|
-
get: definition[key]
|
|
997
|
-
});
|
|
998
|
-
/******/
|
|
999
|
-
}
|
|
1000
|
-
/******/
|
|
1001
|
-
}
|
|
1002
|
-
/******/
|
|
1003
|
-
};
|
|
1004
|
-
/******/
|
|
1005
|
-
})();
|
|
1006
|
-
/******/
|
|
1007
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1008
|
-
/******/
|
|
1009
|
-
(function () {
|
|
1010
|
-
/******/__nested_webpack_require_993__.o = function (obj, prop) {
|
|
1011
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
1012
|
-
};
|
|
1013
|
-
/******/
|
|
1014
|
-
})();
|
|
1015
|
-
/******/
|
|
1016
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
1017
|
-
/******/
|
|
1018
|
-
(function () {
|
|
1019
|
-
/******/ // define __esModule on exports
|
|
1020
|
-
/******/__nested_webpack_require_993__.r = function (exports) {
|
|
1021
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
1022
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
1023
|
-
value: 'Module'
|
|
1024
|
-
});
|
|
1025
|
-
/******/
|
|
1026
|
-
}
|
|
1027
|
-
/******/
|
|
1028
|
-
Object.defineProperty(exports, '__esModule', {
|
|
1029
|
-
value: true
|
|
1030
|
-
});
|
|
1031
|
-
/******/
|
|
1032
|
-
};
|
|
1033
|
-
/******/
|
|
1034
|
-
})();
|
|
1035
|
-
/******/
|
|
1036
|
-
/************************************************************************/
|
|
1037
|
-
var __webpack_exports__ = {};
|
|
1038
|
-
__nested_webpack_require_993__.r(__webpack_exports__);
|
|
1039
|
-
/* harmony export */
|
|
1040
|
-
__nested_webpack_require_993__.d(__webpack_exports__, {
|
|
1041
|
-
/* harmony export */"isEmail": function isEmail() {
|
|
1042
|
-
return (/* binding */_isEmail
|
|
1043
|
-
);
|
|
1044
|
-
},
|
|
1045
|
-
/* harmony export */"isEmpty": function isEmpty() {
|
|
1046
|
-
return (/* binding */_isEmpty
|
|
1047
|
-
);
|
|
1048
|
-
},
|
|
1049
|
-
/* harmony export */"isInt": function isInt() {
|
|
1050
|
-
return (/* binding */_isInt
|
|
1051
|
-
);
|
|
1052
|
-
},
|
|
1053
|
-
/* harmony export */"isJSON": function isJSON() {
|
|
1054
|
-
return (/* binding */_isJSON
|
|
1055
|
-
);
|
|
1056
|
-
},
|
|
1057
|
-
/* harmony export */"isMobile": function isMobile() {
|
|
1058
|
-
return (/* binding */_isMobile
|
|
1059
|
-
);
|
|
1060
|
-
},
|
|
1061
|
-
/* harmony export */"isNumber": function isNumber() {
|
|
1062
|
-
return (/* binding */_isNumber
|
|
1063
|
-
);
|
|
1064
|
-
},
|
|
1065
|
-
/* harmony export */"isTel": function isTel() {
|
|
1066
|
-
return (/* binding */_isTel
|
|
1067
|
-
);
|
|
1068
|
-
},
|
|
1069
|
-
/* harmony export */"isValidNumeric": function isValidNumeric() {
|
|
1070
|
-
return (/* binding */_isValidNumeric
|
|
1071
|
-
);
|
|
1072
|
-
}
|
|
1073
|
-
/* harmony export */
|
|
1074
|
-
});
|
|
1075
|
-
function _typeof(obj) {
|
|
1076
|
-
"@babel/helpers - typeof";
|
|
1077
|
-
|
|
1078
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1079
|
-
return typeof obj;
|
|
1080
|
-
} : function (obj) {
|
|
1081
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1082
|
-
}, _typeof(obj);
|
|
1083
|
-
}
|
|
1084
|
-
/**
|
|
1085
|
-
* Fix And Parse JSON (Support for handling complex escape JSON strings)
|
|
1086
|
-
* @desc recursively fix top-level key/value (recursively handles when encountering top-level values that are objects/arrays)
|
|
1087
|
-
* @private
|
|
1088
|
-
*/
|
|
1089
|
-
/*
|
|
1090
|
-
- Still prioritize JSON.parse first;
|
|
1091
|
-
- After parse fails, do unescaping (\\" → ");
|
|
1092
|
-
- Then process the outermost layer (object or array) key by key, value by value;
|
|
1093
|
-
- If a top-level value is an unquoted object or array (e.g., messages: [ {...} ]), recursively treat that value as a new outermost layer for fixing;
|
|
1094
|
-
- For strings wrapped in quotes ('...' or "..."), only extract the outer layer and re-encode with JSON.stringify (ensuring internal single/double quotes won't be mistakenly changed);
|
|
1095
|
-
- Set MAX_DEPTH to prevent infinite recursion.
|
|
1096
|
-
*/
|
|
1097
|
-
/*
|
|
1098
|
-
@Examples:
|
|
1099
|
-
|
|
1100
|
-
// ✅ Valid JSON (contains svg and single quote content)
|
|
1101
|
-
const okJson = `{
|
|
1102
|
-
"label":"<svg width='16' height='16'><path fill='currentColor' d='M19 13h-6'/></svg> 新建会话",
|
|
1103
|
-
"value":"new",
|
|
1104
|
-
"onClick":"method.setVal(''); method.clearData();"
|
|
1105
|
-
}`;
|
|
1106
|
-
|
|
1107
|
-
const okJson2 = `{
|
|
1108
|
-
label:"<svg width='16' height='16'><path fill='currentColor' d='M19 13h-6'/></svg> 新建会话",
|
|
1109
|
-
value:"new",
|
|
1110
|
-
onClick:"method.setVal(''); method.clearData();"
|
|
1111
|
-
}`;
|
|
1112
|
-
|
|
1113
|
-
// ⚠️ Single quote JSON
|
|
1114
|
-
const badJson = "{'model':'{model}','messages':[{'role':'user','content':'{message}'}],'stream': true}";
|
|
1115
|
-
|
|
1116
|
-
// ⚠️ Escaped JSON
|
|
1117
|
-
const badJson2 = "{\\\"label\\\":\\\"<svg width='16' height='16' viewBox='0 0 24 24'><path fill='currentColor' d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'/></svg> 新建会话\\\",\\\"value\\\":\\\"new\\\",\\\"onClick\\\":\\\"method.setVal(''); method.clearData();\\\"}";
|
|
1118
|
-
|
|
1119
|
-
const badJson3 = "{\"label\":\"<svg width='16' height='16' viewBox='0 0 24 24'><path fill='currentColor' d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'/></svg> 新建会话\",\"value\":\"new\",\"onClick\":\"method.setVal(''); method.clearData();\"}";
|
|
1120
|
-
|
|
1121
|
-
const badJson4 = "[{\"label\":\"<svg fill='currentColor' width='12' height='12' viewBox='0 0 24 24'><path d='M20.5 9a3.49 3.49 0 0 0-3.45 3h-1.1a2.49 2.49 0 0 0-4.396-1.052L8.878 9.731l3.143-4.225a2.458 2.458 0 0 0 2.98-.019L17.339 8H16v1h3V6h-1v1.243l-2.336-2.512A2.473 2.473 0 0 0 16 3.5a2.5 2.5 0 0 0-5 0 2.474 2.474 0 0 0 .343 1.243L7.947 9.308 4.955 7.947a2.404 2.404 0 0 0-.161-1.438l3.704-1.385-.44 1.371.942.333L10 4 7.172 3l-.334.943 1.01.357-3.659 1.368a2.498 2.498 0 1 0-.682 4.117l2.085 2.688-2.053 2.76a2.5 2.5 0 1 0 .87 3.864l3.484 1.587-1.055.373.334.943L10 21l-1-2.828-.943.333.435 1.354-3.608-1.645A2.471 2.471 0 0 0 5 17.5a2.5 2.5 0 0 0-.058-.527l3.053-1.405 3.476 4.48a2.498 2.498 0 1 0 4.113.075L18 17.707V19h1v-3h-3v1h1.293l-2.416 2.416a2.466 2.466 0 0 0-2.667-.047l-3.283-4.23 2.554-1.176A2.494 2.494 0 0 0 15.95 13h1.1a3.493 3.493 0 1 0 3.45-4zm-7-7A1.5 1.5 0 1 1 12 3.5 1.502 1.502 0 0 1 13.5 2zm0 18a1.5 1.5 0 1 1-1.5 1.5 1.502 1.502 0 0 1 1.5-1.5zM1 7.5a1.5 1.5 0 1 1 2.457 1.145l-.144.112A1.496 1.496 0 0 1 1 7.5zm3.32 1.703a2.507 2.507 0 0 0 .264-.326l2.752 1.251-1.124 1.512zM2.5 19A1.5 1.5 0 1 1 4 17.5 1.502 1.502 0 0 1 2.5 19zm2.037-2.941a2.518 2.518 0 0 0-.193-.234l1.885-2.532 1.136 1.464zm3.76-1.731L6.849 12.46l1.42-1.908L11.1 11.84a2.29 2.29 0 0 0-.033 1.213zM13.5 14a1.5 1.5 0 1 1 1.5-1.5 1.502 1.502 0 0 1-1.5 1.5zm7 1a2.5 2.5 0 1 1 2.5-2.5 2.502 2.502 0 0 1-2.5 2.5zm1.5-2.5a1.5 1.5 0 1 1-1.5-1.5 1.502 1.502 0 0 1 1.5 1.5z'/><path fill='none' d='M0 0h24v24H0z'/></svg> 深度思考\",\"value\":\"brief\",\"onClick\":\"if(isActive){method.executeCustomMethod('changeModel', true)}else{method.executeCustomMethod('changeModel', false)}\"},{\"label\":\"<svg fill='currentColor' width='12' height='12' viewBox='0 0 24 24'><path d='M19 2H5c-1.103 0-2 .897-2 2v12c0 1.103.897 2 2 2h3.586L12 21.414 15.414 18H19c1.103 0 2-.897 2-2V4c0-1.103-.897-2-2-2zm0 14h-4.414L12 18.586 9.414 16H5V4h14v12z'/></svg> 精简回答\",\"value\":\"brief\",\"onClick\":\"if(isActive){method.setContextData({systemPrompt:'请精简回答,字数控制在150个字左右, 思考过程请简洁简短',mergedText:method.getContextData().mergedText,analyzeMetrics:method.getContextData().analyzeMetrics});}else{method.setContextData({mergedText:method.getContextData().mergedText,analyzeMetrics:method.getContextData().analyzeMetrics});}\"},{\"label\":\"<svg fill='none' width='12' height='12' viewBox='0 0 16 16'><path d='M7 0.0618896V9H15.9381C15.446 12.9463 12.0796 16 8 16C3.58172 16 0 12.4183 0 8C0 3.92038 3.05369 0.553988 7 0.0618896Z' fill='currentColor'/><path d='M9 0.0618897V7H15.9381C15.4869 3.38128 12.6187 0.513137 9 0.0618897Z' fill='currentColor'/></svg> 指标分析\",\"value\":\"lab\",\"onClick\":\"return method.executeCustomMethod('getLibList')\",\"isSelect\":true,\"dynamicOptions\":true}]";
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
// ❌ Invalid JSON with missing } or ]
|
|
1125
|
-
const errorJson001 = "{'model':'qwen-plus','base_url':'https://dashscope.aliyuncs.com/compatible-mode/v1/','api_key':'sk-0989fb9baab8450682af4d000f5b7cba','message':'{message}','stream':'true','chatId': '{chatId}', 'token': '{token}'";
|
|
1126
|
-
|
|
1127
|
-
const errorJson002 = "[{'model':'qwen-plus','base_url':'https://dashscope.aliyuncs.com/compatible-mode/v1/','api_key':'sk-0989fb9baab8450682af4d000f5b7cba','message':'{message}','stream':'true','chatId': '{chatId}', 'token': '{token}'}";
|
|
1128
|
-
|
|
1129
|
-
// ❌ Invalid JSON with missing quotes
|
|
1130
|
-
const errorJson003 = "{'model':'qwen-plus','base_url':'https://dashscope.aliyuncs.com/compatible-mode/v1/','api_key':'sk-0989fb9baab8450682af4d000f5b7cba','message':'{message}','stream':'true','chatId': {chatId}', 'token': '{token}'}";
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
console.log('okJson =>', fixAndParseJSON(okJson)); // Can parse normally success = true
|
|
1135
|
-
console.log('okJson =>', fixAndParseJSON(okJson2)); // Can parse normally success = true
|
|
1136
|
-
console.log('badJson =>', fixAndParseJSON(badJson)); // Can parse after fixing success = true
|
|
1137
|
-
console.log('badJson =>', fixAndParseJSON(badJson2)); // Can parse after fixing success = true
|
|
1138
|
-
console.log('badJson =>', fixAndParseJSON(badJson3)); // Can parse after fixing success = true
|
|
1139
|
-
console.log('badJson =>', fixAndParseJSON(badJson4)); // Can parse after fixing success = true
|
|
1140
|
-
console.log('errorJson =>', fixAndParseJSON(errorJson001)); // {success: false, error: 'Invalid JSON format', details: 'Invalid object: mismatched braces'}
|
|
1141
|
-
console.log('errorJson =>', fixAndParseJSON(errorJson002)); // {success: false, error: 'Invalid JSON format', details: "Expected property name or '}' in JSON at position 2 (line 1 column 3)"}
|
|
1142
|
-
console.log('errorJson =>', fixAndParseJSON(errorJson003)); // {success: false, error: 'Invalid JSON format', details: 'Invalid object: mismatched braces'}
|
|
1143
|
-
|
|
1144
|
-
*/
|
|
1145
|
-
|
|
1146
|
-
// Type definitions
|
|
1147
|
-
|
|
1148
|
-
function fixAndParseJSON(input) {
|
|
1149
|
-
var MAX_DEPTH = 6;
|
|
1150
|
-
|
|
1151
|
-
// 1. Quick attempt
|
|
1152
|
-
try {
|
|
1153
|
-
return {
|
|
1154
|
-
success: true,
|
|
1155
|
-
data: JSON.parse(input)
|
|
1156
|
-
};
|
|
1157
|
-
} catch (e) {
|
|
1158
|
-
// Continue with fixing
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
// 2. Simple unescaping of escaped \" (common case from pasted JS literals)
|
|
1162
|
-
var s = input;
|
|
1163
|
-
if (s.includes('\\"')) s = s.replace(/\\"/g, '"');
|
|
1164
|
-
s = s.trim();
|
|
1165
|
-
try {
|
|
1166
|
-
if (s.startsWith('{')) {
|
|
1167
|
-
s = processTopObject(s, 0, MAX_DEPTH);
|
|
1168
|
-
} else if (s.startsWith('[')) {
|
|
1169
|
-
s = processTopArray(s, 0, MAX_DEPTH);
|
|
1170
|
-
} else {
|
|
1171
|
-
throw new Error('Input is not an object or array');
|
|
1172
|
-
}
|
|
1173
|
-
return {
|
|
1174
|
-
success: true,
|
|
1175
|
-
data: JSON.parse(s)
|
|
1176
|
-
};
|
|
1177
|
-
} catch (err) {
|
|
1178
|
-
var error = err instanceof Error ? err : new Error('Unknown error');
|
|
1179
|
-
return {
|
|
1180
|
-
success: false,
|
|
1181
|
-
error: 'Invalid JSON format',
|
|
1182
|
-
details: error.message
|
|
1183
|
-
};
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
/* ---------- Helper (Recursive) Functions ---------- */
|
|
1188
|
-
|
|
1189
|
-
function processTopObject(str, depth, MAX_DEPTH) {
|
|
1190
|
-
if (depth > MAX_DEPTH) return str;
|
|
1191
|
-
str = str.trim();
|
|
1192
|
-
|
|
1193
|
-
// First check if braces match
|
|
1194
|
-
var braceCount = 0;
|
|
1195
|
-
var inString = false;
|
|
1196
|
-
var escapeNext = false;
|
|
1197
|
-
for (var i = 0; i < str.length; i++) {
|
|
1198
|
-
var ch = str[i];
|
|
1199
|
-
if (escapeNext) {
|
|
1200
|
-
escapeNext = false;
|
|
1201
|
-
continue;
|
|
1202
|
-
}
|
|
1203
|
-
if (ch === '\\') {
|
|
1204
|
-
escapeNext = true;
|
|
1205
|
-
continue;
|
|
1206
|
-
}
|
|
1207
|
-
if ((ch === '"' || ch === "'") && !escapeNext) {
|
|
1208
|
-
inString = !inString;
|
|
1209
|
-
continue;
|
|
1210
|
-
}
|
|
1211
|
-
if (!inString) {
|
|
1212
|
-
if (ch === '{') braceCount++;else if (ch === '}') braceCount--;
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
if (braceCount !== 0) {
|
|
1216
|
-
throw new Error('Invalid object: mismatched braces');
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
// Ensure both ends are { ... }
|
|
1220
|
-
if (!(str.startsWith('{') && str.endsWith('}'))) {
|
|
1221
|
-
var f = str.indexOf('{'),
|
|
1222
|
-
l = str.lastIndexOf('}');
|
|
1223
|
-
if (f === -1 || l === -1 || l <= f) {
|
|
1224
|
-
throw new Error('Invalid object format: missing or mismatched braces');
|
|
1225
|
-
}
|
|
1226
|
-
str = str.slice(f, l + 1);
|
|
1227
|
-
}
|
|
1228
|
-
var inner = str.slice(1, -1);
|
|
1229
|
-
var pairs = splitTopLevel(inner);
|
|
1230
|
-
var repairedPairs = pairs.map(function (pair) {
|
|
1231
|
-
if (!pair || pair.trim() === '') return '';
|
|
1232
|
-
var idx = findTopLevelColon(pair);
|
|
1233
|
-
if (idx === -1) {
|
|
1234
|
-
return pair; // Non key:value fragment, keep as is (rare case)
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
var rawKey = pair.slice(0, idx).trim();
|
|
1238
|
-
var rawVal = pair.slice(idx + 1);
|
|
1239
|
-
var keyContent = extractKeyContent(rawKey);
|
|
1240
|
-
var keyJson = JSON.stringify(keyContent);
|
|
1241
|
-
var repairedValue = repairPossiblyQuotedValue(rawVal, depth + 1, MAX_DEPTH);
|
|
1242
|
-
return keyJson + ':' + repairedValue;
|
|
1243
|
-
});
|
|
1244
|
-
return '{' + repairedPairs.join(',') + '}';
|
|
1245
|
-
}
|
|
1246
|
-
function processTopArray(str, depth, MAX_DEPTH) {
|
|
1247
|
-
if (depth > MAX_DEPTH) return str;
|
|
1248
|
-
str = str.trim();
|
|
1249
|
-
if (!(str.startsWith('[') && str.endsWith(']'))) {
|
|
1250
|
-
var f = str.indexOf('['),
|
|
1251
|
-
l = str.lastIndexOf(']');
|
|
1252
|
-
if (f === -1 || l === -1 || l <= f) return str;
|
|
1253
|
-
str = str.slice(f, l + 1);
|
|
1254
|
-
}
|
|
1255
|
-
var inner = str.slice(1, -1);
|
|
1256
|
-
var elements = splitTopLevel(inner);
|
|
1257
|
-
var processed = elements.map(function (el) {
|
|
1258
|
-
var t = el.trim();
|
|
1259
|
-
if (t === '') return '';
|
|
1260
|
-
if (t.startsWith('{')) return processTopObject(t, depth + 1, MAX_DEPTH);
|
|
1261
|
-
if (t.startsWith('[')) return processTopArray(t, depth + 1, MAX_DEPTH);
|
|
1262
|
-
return repairPossiblyQuotedValue(t, depth + 1, MAX_DEPTH);
|
|
1263
|
-
});
|
|
1264
|
-
return '[' + processed.join(',') + ']';
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
// If it's a string wrapped in quotes, extract the inner content and JSON.stringify (safe escaping)
|
|
1268
|
-
// If it's an object/array literal (not wrapped in quotes), recursively process (treat as new outermost layer)
|
|
1269
|
-
// Otherwise return the original fragment directly (numbers/true/false/null or JS expressions)
|
|
1270
|
-
function repairPossiblyQuotedValue(rawVal, depth, MAX_DEPTH) {
|
|
1271
|
-
var v = rawVal.trim();
|
|
1272
|
-
if (v === '') return v;
|
|
1273
|
-
if (v[0] === '"' || v[0] === "'") {
|
|
1274
|
-
var quote = v[0];
|
|
1275
|
-
// Find the last unescaped same quote
|
|
1276
|
-
var lastPos = -1;
|
|
1277
|
-
for (var i = v.length - 1; i >= 0; i--) {
|
|
1278
|
-
if (v[i] === quote) {
|
|
1279
|
-
// check escaped
|
|
1280
|
-
var bs = 0,
|
|
1281
|
-
k = i - 1;
|
|
1282
|
-
while (k >= 0 && v[k] === '\\') {
|
|
1283
|
-
bs++;
|
|
1284
|
-
k--;
|
|
1285
|
-
}
|
|
1286
|
-
if (bs % 2 === 0) {
|
|
1287
|
-
lastPos = i;
|
|
1288
|
-
break;
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
var inner = lastPos > 0 ? v.slice(1, lastPos) : v.slice(1);
|
|
1293
|
-
return JSON.stringify(inner); // Use JSON.stringify to generate valid JSON string (automatically escape internal quotes, etc.)
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
// If it's an object or array literal (not wrapped in quotes) -> recursively treat as new outermost layer
|
|
1297
|
-
if (v.startsWith('{')) {
|
|
1298
|
-
return processTopObject(v, depth, MAX_DEPTH);
|
|
1299
|
-
}
|
|
1300
|
-
if (v.startsWith('[')) {
|
|
1301
|
-
return processTopArray(v, depth, MAX_DEPTH);
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
|
-
// Others (numbers, boolean, null, or JS expressions): return as-is
|
|
1305
|
-
return v;
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
/* --------- Utilities: Split by top-level commas, find top-level colon, extract key --------- */
|
|
1309
|
-
|
|
1310
|
-
// Split by top-level commas (ignore strings, sub-objects, sub-arrays, commas inside parentheses)
|
|
1311
|
-
function splitTopLevel(str) {
|
|
1312
|
-
var parts = [];
|
|
1313
|
-
var buf = '';
|
|
1314
|
-
var depthCurly = 0,
|
|
1315
|
-
depthSquare = 0,
|
|
1316
|
-
depthParen = 0;
|
|
1317
|
-
var inSingle = false,
|
|
1318
|
-
inDouble = false,
|
|
1319
|
-
esc = false;
|
|
1320
|
-
for (var i = 0; i < str.length; i++) {
|
|
1321
|
-
var ch = str[i];
|
|
1322
|
-
if (esc) {
|
|
1323
|
-
buf += ch;
|
|
1324
|
-
esc = false;
|
|
1325
|
-
continue;
|
|
1326
|
-
}
|
|
1327
|
-
if (ch === '\\') {
|
|
1328
|
-
buf += ch;
|
|
1329
|
-
esc = true;
|
|
1330
|
-
continue;
|
|
1331
|
-
}
|
|
1332
|
-
if (ch === "'" && !inDouble) {
|
|
1333
|
-
inSingle = !inSingle;
|
|
1334
|
-
buf += ch;
|
|
1335
|
-
continue;
|
|
1336
|
-
}
|
|
1337
|
-
if (ch === '"' && !inSingle) {
|
|
1338
|
-
inDouble = !inDouble;
|
|
1339
|
-
buf += ch;
|
|
1340
|
-
continue;
|
|
1341
|
-
}
|
|
1342
|
-
if (!inSingle && !inDouble) {
|
|
1343
|
-
if (ch === '{') {
|
|
1344
|
-
depthCurly++;
|
|
1345
|
-
buf += ch;
|
|
1346
|
-
continue;
|
|
1347
|
-
}
|
|
1348
|
-
if (ch === '}') {
|
|
1349
|
-
depthCurly--;
|
|
1350
|
-
buf += ch;
|
|
1351
|
-
continue;
|
|
1352
|
-
}
|
|
1353
|
-
if (ch === '[') {
|
|
1354
|
-
depthSquare++;
|
|
1355
|
-
buf += ch;
|
|
1356
|
-
continue;
|
|
1357
|
-
}
|
|
1358
|
-
if (ch === ']') {
|
|
1359
|
-
depthSquare--;
|
|
1360
|
-
buf += ch;
|
|
1361
|
-
continue;
|
|
1362
|
-
}
|
|
1363
|
-
if (ch === '(') {
|
|
1364
|
-
depthParen++;
|
|
1365
|
-
buf += ch;
|
|
1366
|
-
continue;
|
|
1367
|
-
}
|
|
1368
|
-
if (ch === ')') {
|
|
1369
|
-
depthParen--;
|
|
1370
|
-
buf += ch;
|
|
1371
|
-
continue;
|
|
1372
|
-
}
|
|
1373
|
-
if (ch === ',' && depthCurly === 0 && depthSquare === 0 && depthParen === 0) {
|
|
1374
|
-
parts.push(buf);
|
|
1375
|
-
buf = '';
|
|
1376
|
-
continue;
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
buf += ch;
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
// Check for unclosed brackets or quotes
|
|
1383
|
-
if (depthCurly !== 0 || depthSquare !== 0 || depthParen !== 0 || inSingle || inDouble) {
|
|
1384
|
-
throw new Error('Invalid JSON: unclosed brackets or quotes');
|
|
1385
|
-
}
|
|
1386
|
-
if (buf.trim() !== '') parts.push(buf);
|
|
1387
|
-
return parts;
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
// Find the first "top-level" colon index (ignore inside strings & sub-levels)
|
|
1391
|
-
function findTopLevelColon(str) {
|
|
1392
|
-
var inSingle = false,
|
|
1393
|
-
inDouble = false,
|
|
1394
|
-
esc = false;
|
|
1395
|
-
var depthCurly = 0,
|
|
1396
|
-
depthSquare = 0,
|
|
1397
|
-
depthParen = 0;
|
|
1398
|
-
for (var i = 0; i < str.length; i++) {
|
|
1399
|
-
var ch = str[i];
|
|
1400
|
-
if (esc) {
|
|
1401
|
-
esc = false;
|
|
1402
|
-
continue;
|
|
1403
|
-
}
|
|
1404
|
-
if (ch === '\\') {
|
|
1405
|
-
esc = true;
|
|
1406
|
-
continue;
|
|
1407
|
-
}
|
|
1408
|
-
if (ch === "'" && !inDouble) {
|
|
1409
|
-
inSingle = !inSingle;
|
|
1410
|
-
continue;
|
|
1411
|
-
}
|
|
1412
|
-
if (ch === '"' && !inSingle) {
|
|
1413
|
-
inDouble = !inDouble;
|
|
1414
|
-
continue;
|
|
1415
|
-
}
|
|
1416
|
-
if (!inSingle && !inDouble) {
|
|
1417
|
-
if (ch === '{') {
|
|
1418
|
-
depthCurly++;
|
|
1419
|
-
continue;
|
|
1420
|
-
}
|
|
1421
|
-
if (ch === '}') {
|
|
1422
|
-
depthCurly--;
|
|
1423
|
-
continue;
|
|
1424
|
-
}
|
|
1425
|
-
if (ch === '[') {
|
|
1426
|
-
depthSquare++;
|
|
1427
|
-
continue;
|
|
1428
|
-
}
|
|
1429
|
-
if (ch === ']') {
|
|
1430
|
-
depthSquare--;
|
|
1431
|
-
continue;
|
|
1432
|
-
}
|
|
1433
|
-
if (ch === '(') {
|
|
1434
|
-
depthParen++;
|
|
1435
|
-
continue;
|
|
1436
|
-
}
|
|
1437
|
-
if (ch === ')') {
|
|
1438
|
-
depthParen--;
|
|
1439
|
-
continue;
|
|
1440
|
-
}
|
|
1441
|
-
if (ch === ':' && depthCurly === 0 && depthSquare === 0 && depthParen === 0) {
|
|
1442
|
-
return i;
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
return -1;
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
// Extract key content (supports "key", 'key', key), returns pure key string
|
|
1450
|
-
function extractKeyContent(rawKey) {
|
|
1451
|
-
var r = rawKey.trim();
|
|
1452
|
-
if (r.startsWith('"') && r.endsWith('"') || r.startsWith("'") && r.endsWith("'")) {
|
|
1453
|
-
var inner = r.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'");
|
|
1454
|
-
return inner;
|
|
1455
|
-
}
|
|
1456
|
-
return r;
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
/**
|
|
1460
|
-
* Determine whether it is in JSON format
|
|
1461
|
-
* @private
|
|
1462
|
-
*/
|
|
1463
|
-
function _isJSON(input) {
|
|
1464
|
-
if (typeof input === 'string' && input.length > 0) {
|
|
1465
|
-
return fixAndParseJSON(input).success;
|
|
1466
|
-
} else {
|
|
1467
|
-
if (_typeof(input) === 'object' && Object.prototype.toString.call(input) === '[object Object]' && !input.length) {
|
|
1468
|
-
return true;
|
|
1469
|
-
} else {
|
|
1470
|
-
return false;
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
/**
|
|
1476
|
-
* Check if a string is a valid number
|
|
1477
|
-
* @param str - The string to check
|
|
1478
|
-
* @returns boolean indicating if the string is a valid number
|
|
1479
|
-
*/
|
|
1480
|
-
function _isValidNumeric(str) {
|
|
1481
|
-
if (typeof str !== "string") return false; // we only process strings!
|
|
1482
|
-
if (!isNaN(Number(str)) &&
|
|
1483
|
-
// use type coercion to parse the _entirety_ of the string
|
|
1484
|
-
!isNaN(parseFloat(str)) // ensure strings of whitespace fail
|
|
1485
|
-
) {
|
|
1486
|
-
return true;
|
|
1487
|
-
}
|
|
1488
|
-
return false;
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
/**
|
|
1492
|
-
* Check if input is empty
|
|
1493
|
-
* @param input - The input to check (string or array of strings)
|
|
1494
|
-
* @returns boolean indicating if the input is empty
|
|
1495
|
-
*/
|
|
1496
|
-
function _isEmpty(input) {
|
|
1497
|
-
if (Array.isArray(input)) {
|
|
1498
|
-
return input.some(function (str) {
|
|
1499
|
-
return !str.replace(/\s/g, '').length === true;
|
|
1500
|
-
});
|
|
1501
|
-
}
|
|
1502
|
-
return !input.replace(/\s/g, '').length === true;
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
/**
|
|
1506
|
-
* Check if input is a valid number
|
|
1507
|
-
* @param input - The input to check
|
|
1508
|
-
* @returns boolean indicating if the input is a valid number
|
|
1509
|
-
*/
|
|
1510
|
-
function _isNumber(input) {
|
|
1511
|
-
var reg = /^[\d|\.|,]+$/;
|
|
1512
|
-
return reg.test(input);
|
|
1513
|
-
}
|
|
1514
|
-
|
|
1515
|
-
/**
|
|
1516
|
-
* Check if input is a valid integer
|
|
1517
|
-
* @param input - The input to check
|
|
1518
|
-
* @returns boolean indicating if the input is a valid integer
|
|
1519
|
-
*/
|
|
1520
|
-
function _isInt(input) {
|
|
1521
|
-
if (input === "") {
|
|
1522
|
-
return false;
|
|
1523
|
-
}
|
|
1524
|
-
var reg = /\D+/;
|
|
1525
|
-
return !reg.test(input);
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
/**
|
|
1529
|
-
* Check if input is a valid email address
|
|
1530
|
-
* @param input - The input to check
|
|
1531
|
-
* @returns boolean indicating if the input is a valid email
|
|
1532
|
-
*/
|
|
1533
|
-
function _isEmail(input) {
|
|
1534
|
-
var reg = /^\s*([A-Za-z0-9_-]+(\.\w+)*@(\w+\.)+\w{2,3})\s*$/;
|
|
1535
|
-
return reg.test(input);
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
/**
|
|
1539
|
-
* Check if input is a valid telephone number
|
|
1540
|
-
* @param input - The input to check
|
|
1541
|
-
* @returns boolean indicating if the input is a valid telephone number
|
|
1542
|
-
*/
|
|
1543
|
-
function _isTel(input) {
|
|
1544
|
-
var reg = /^[0-9- ]{7,20}$/;
|
|
1545
|
-
return reg.test(input);
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
/**
|
|
1549
|
-
* Check if input is a valid mobile number
|
|
1550
|
-
* @param input - The input to check
|
|
1551
|
-
* @returns boolean indicating if the input is a valid mobile number
|
|
1552
|
-
*/
|
|
1553
|
-
function _isMobile(input) {
|
|
1554
|
-
var reg = /^1[0-9]{10}$/;
|
|
1555
|
-
return reg.test(input);
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
/******/
|
|
1559
|
-
return __webpack_exports__;
|
|
1560
|
-
/******/
|
|
1561
|
-
}()
|
|
1562
|
-
);
|
|
1563
|
-
});
|
|
1564
|
-
|
|
1565
|
-
/***/ }),
|
|
1566
|
-
|
|
1567
|
-
/***/ 787:
|
|
1568
|
-
/***/ ((module) => {
|
|
1569
|
-
|
|
1570
|
-
"use strict";
|
|
1571
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
1572
|
-
|
|
1573
|
-
/***/ })
|
|
1574
|
-
|
|
1575
|
-
/******/ });
|
|
1576
|
-
/************************************************************************/
|
|
1577
|
-
/******/ // The module cache
|
|
1578
|
-
/******/ var __webpack_module_cache__ = {};
|
|
1579
|
-
/******/
|
|
1580
|
-
/******/ // The require function
|
|
1581
|
-
/******/ function __webpack_require__(moduleId) {
|
|
1582
|
-
/******/ // Check if module is in cache
|
|
1583
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
1584
|
-
/******/ if (cachedModule !== undefined) {
|
|
1585
|
-
/******/ return cachedModule.exports;
|
|
1586
|
-
/******/ }
|
|
1587
|
-
/******/ // Create a new module (and put it into the cache)
|
|
1588
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
1589
|
-
/******/ id: moduleId,
|
|
1590
|
-
/******/ loaded: false,
|
|
1591
|
-
/******/ exports: {}
|
|
1592
|
-
/******/ };
|
|
1593
|
-
/******/
|
|
1594
|
-
/******/ // Execute the module function
|
|
1595
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
1596
|
-
/******/
|
|
1597
|
-
/******/ // Flag the module as loaded
|
|
1598
|
-
/******/ module.loaded = true;
|
|
1599
|
-
/******/
|
|
1600
|
-
/******/ // Return the exports of the module
|
|
1601
|
-
/******/ return module.exports;
|
|
1602
|
-
/******/ }
|
|
1603
|
-
/******/
|
|
1604
|
-
/************************************************************************/
|
|
1605
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
1606
|
-
/******/ (() => {
|
|
1607
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
1608
|
-
/******/ __webpack_require__.n = (module) => {
|
|
1609
|
-
/******/ var getter = module && module.__esModule ?
|
|
1610
|
-
/******/ () => (module['default']) :
|
|
1611
|
-
/******/ () => (module);
|
|
1612
|
-
/******/ __webpack_require__.d(getter, { a: getter });
|
|
1613
|
-
/******/ return getter;
|
|
1614
|
-
/******/ };
|
|
1615
|
-
/******/ })();
|
|
1616
|
-
/******/
|
|
1617
|
-
/******/ /* webpack/runtime/define property getters */
|
|
1618
|
-
/******/ (() => {
|
|
1619
|
-
/******/ // define getter functions for harmony exports
|
|
1620
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
1621
|
-
/******/ for(var key in definition) {
|
|
1622
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
1623
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
1624
|
-
/******/ }
|
|
1625
|
-
/******/ }
|
|
1626
|
-
/******/ };
|
|
1627
|
-
/******/ })();
|
|
1628
|
-
/******/
|
|
1629
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1630
|
-
/******/ (() => {
|
|
1631
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
1632
|
-
/******/ })();
|
|
1633
|
-
/******/
|
|
1634
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
1635
|
-
/******/ (() => {
|
|
1636
|
-
/******/ // define __esModule on exports
|
|
1637
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
1638
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
1639
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1640
|
-
/******/ }
|
|
1641
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
1642
|
-
/******/ };
|
|
1643
|
-
/******/ })();
|
|
1644
|
-
/******/
|
|
1645
|
-
/******/ /* webpack/runtime/node module decorator */
|
|
1646
|
-
/******/ (() => {
|
|
1647
|
-
/******/ __webpack_require__.nmd = (module) => {
|
|
1648
|
-
/******/ module.paths = [];
|
|
1649
|
-
/******/ if (!module.children) module.children = [];
|
|
1650
|
-
/******/ return module;
|
|
1651
|
-
/******/ };
|
|
1652
|
-
/******/ })();
|
|
1653
|
-
/******/
|
|
1654
|
-
/************************************************************************/
|
|
1655
|
-
var __webpack_exports__ = {};
|
|
1656
|
-
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
1657
|
-
(() => {
|
|
1658
|
-
"use strict";
|
|
1659
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1660
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1661
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1662
|
-
/* harmony export */ });
|
|
1663
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(787);
|
|
1664
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1665
|
-
/* harmony import */ var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85);
|
|
1666
|
-
/* harmony import */ var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__);
|
|
1667
|
-
/* harmony import */ var funda_utils_dist_cjs_validate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(455);
|
|
1668
|
-
/* harmony import */ var funda_utils_dist_cjs_validate__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_validate__WEBPACK_IMPORTED_MODULE_2__);
|
|
1669
|
-
/* harmony import */ var funda_utils_dist_cjs_extract__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(135);
|
|
1670
|
-
/* harmony import */ var funda_utils_dist_cjs_extract__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_extract__WEBPACK_IMPORTED_MODULE_3__);
|
|
1671
|
-
/* harmony import */ var funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(79);
|
|
1672
|
-
/* harmony import */ var funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__);
|
|
1673
|
-
/* harmony import */ var funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(575);
|
|
1674
|
-
/* harmony import */ var funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5__);
|
|
1675
|
-
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(188);
|
|
1676
|
-
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__);
|
|
1677
|
-
var _excluded = ["contentRef", "wrapperClassName", "controlClassName", "tableLayout", "tableLayoutClassName", "tableLayoutCellClassName", "groupWrapperClassName", "groupLabelClassName", "inline", "options", "disabled", "required", "defaultValue", "value", "label", "name", "id", "showSelectAll", "selectAllLabel", "singleSelect", "extractValueByBrackets", "style", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onLoad", "onChange", "onCallbackListItem"];
|
|
1678
|
-
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; }
|
|
1679
|
-
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); }
|
|
1680
|
-
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); }
|
|
1681
|
-
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); } }
|
|
1682
|
-
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); }); }; }
|
|
1683
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
1684
|
-
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."); }
|
|
1685
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
1686
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
1687
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
1688
|
-
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."); }
|
|
1689
|
-
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); }
|
|
1690
|
-
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; }
|
|
1691
|
-
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; } }
|
|
1692
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1693
|
-
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; }
|
|
1694
|
-
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; }
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
var MultipleCheckboxes = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
|
|
1703
|
-
var contentRef = props.contentRef,
|
|
1704
|
-
wrapperClassName = props.wrapperClassName,
|
|
1705
|
-
controlClassName = props.controlClassName,
|
|
1706
|
-
tableLayout = props.tableLayout,
|
|
1707
|
-
tableLayoutClassName = props.tableLayoutClassName,
|
|
1708
|
-
tableLayoutCellClassName = props.tableLayoutCellClassName,
|
|
1709
|
-
groupWrapperClassName = props.groupWrapperClassName,
|
|
1710
|
-
groupLabelClassName = props.groupLabelClassName,
|
|
1711
|
-
inline = props.inline,
|
|
1712
|
-
options = props.options,
|
|
1713
|
-
disabled = props.disabled,
|
|
1714
|
-
required = props.required,
|
|
1715
|
-
defaultValue = props.defaultValue,
|
|
1716
|
-
value = props.value,
|
|
1717
|
-
label = props.label,
|
|
1718
|
-
name = props.name,
|
|
1719
|
-
id = props.id,
|
|
1720
|
-
_props$showSelectAll = props.showSelectAll,
|
|
1721
|
-
showSelectAll = _props$showSelectAll === void 0 ? false : _props$showSelectAll,
|
|
1722
|
-
_props$selectAllLabel = props.selectAllLabel,
|
|
1723
|
-
selectAllLabel = _props$selectAllLabel === void 0 ? 'Select all' : _props$selectAllLabel,
|
|
1724
|
-
_props$singleSelect = props.singleSelect,
|
|
1725
|
-
singleSelect = _props$singleSelect === void 0 ? false : _props$singleSelect,
|
|
1726
|
-
extractValueByBrackets = props.extractValueByBrackets,
|
|
1727
|
-
style = props.style,
|
|
1728
|
-
fetchFuncAsync = props.fetchFuncAsync,
|
|
1729
|
-
fetchFuncMethod = props.fetchFuncMethod,
|
|
1730
|
-
fetchFuncMethodParams = props.fetchFuncMethodParams,
|
|
1731
|
-
fetchCallback = props.fetchCallback,
|
|
1732
|
-
onFetch = props.onFetch,
|
|
1733
|
-
onLoad = props.onLoad,
|
|
1734
|
-
_onChange = props.onChange,
|
|
1735
|
-
onCallbackListItem = props.onCallbackListItem,
|
|
1736
|
-
attributes = _objectWithoutProperties(props, _excluded);
|
|
1737
|
-
var VALUE_BY_BRACKETS = typeof extractValueByBrackets === 'undefined' ? true : extractValueByBrackets;
|
|
1738
|
-
var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default()();
|
|
1739
|
-
var idRes = id || uniqueID;
|
|
1740
|
-
var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1741
|
-
var optionsRes = options ? (0,funda_utils_dist_cjs_validate__WEBPACK_IMPORTED_MODULE_2__.isJSON)(options) ? JSON.parse(options) : options : [];
|
|
1742
|
-
var _inline = typeof inline === 'undefined' ? true : inline;
|
|
1743
|
-
|
|
1744
|
-
// return a array of options
|
|
1745
|
-
var optionsDataInit = optionsRes;
|
|
1746
|
-
|
|
1747
|
-
//
|
|
1748
|
-
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(new Set()),
|
|
1749
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1750
|
-
selectedItems = _useState2[0],
|
|
1751
|
-
setSelectedItems = _useState2[1];
|
|
1752
|
-
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(optionsDataInit),
|
|
1753
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
1754
|
-
dataInit = _useState4[0],
|
|
1755
|
-
setDataInit = _useState4[1];
|
|
1756
|
-
var optionsFormatGroupOpt = function optionsFormatGroupOpt(allData) {
|
|
1757
|
-
allData.forEach(function (item) {
|
|
1758
|
-
if (typeof item.optgroup !== 'undefined') {
|
|
1759
|
-
item.value = String(Math.random());
|
|
1760
|
-
}
|
|
1761
|
-
});
|
|
1762
|
-
};
|
|
1763
|
-
var optionsFlat = function optionsFlat(allData) {
|
|
1764
|
-
var flatItems = [];
|
|
1765
|
-
allData.forEach(function (item) {
|
|
1766
|
-
if (typeof item.optgroup !== 'undefined') {
|
|
1767
|
-
item.optgroup.forEach(function (opt) {
|
|
1768
|
-
flatItems.push(opt);
|
|
1769
|
-
});
|
|
1770
|
-
} else {
|
|
1771
|
-
flatItems.push(item);
|
|
1772
|
-
}
|
|
1773
|
-
});
|
|
1774
|
-
return flatItems;
|
|
1775
|
-
};
|
|
1776
|
-
var labelRes = function labelRes(label, id) {
|
|
1777
|
-
return label ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, typeof label === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
|
|
1778
|
-
htmlFor: id,
|
|
1779
|
-
className: "form-check-label",
|
|
1780
|
-
dangerouslySetInnerHTML: {
|
|
1781
|
-
__html: "".concat(label)
|
|
1782
|
-
}
|
|
1783
|
-
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
|
|
1784
|
-
htmlFor: id,
|
|
1785
|
-
className: "form-check-label"
|
|
1786
|
-
}, label)) : null;
|
|
1787
|
-
};
|
|
1788
|
-
var getAllControls = function getAllControls() {
|
|
1789
|
-
return [].slice.call(rootRef.current.querySelectorAll("[type=\"checkbox\"]"));
|
|
1790
|
-
};
|
|
1791
|
-
var _isAllSelected = function isAllSelected() {
|
|
1792
|
-
var allOptions = optionsFlat(dataInit);
|
|
1793
|
-
var enabledOptions = allOptions.filter(function (option) {
|
|
1794
|
-
return !(disabled || (typeof option.disabled !== 'undefined' ? option.disabled : false));
|
|
1795
|
-
});
|
|
1796
|
-
return enabledOptions.length > 0 && enabledOptions.every(function (option) {
|
|
1797
|
-
return selectedItems.has(option.value);
|
|
1798
|
-
});
|
|
1799
|
-
};
|
|
1800
|
-
var handleSelectAll = function handleSelectAll() {
|
|
1801
|
-
var allOptions = optionsFlat(dataInit);
|
|
1802
|
-
var enabledOptions = allOptions.filter(function (option) {
|
|
1803
|
-
return !(disabled || (typeof option.disabled !== 'undefined' ? option.disabled : false));
|
|
1804
|
-
});
|
|
1805
|
-
var newSelectedItems = new Set(selectedItems);
|
|
1806
|
-
if (_isAllSelected()) {
|
|
1807
|
-
enabledOptions.forEach(function (option) {
|
|
1808
|
-
return newSelectedItems["delete"](option.value);
|
|
1809
|
-
});
|
|
1810
|
-
} else {
|
|
1811
|
-
enabledOptions.forEach(function (option) {
|
|
1812
|
-
return newSelectedItems.add(option.value);
|
|
1813
|
-
});
|
|
1814
|
-
}
|
|
1815
|
-
setSelectedItems(newSelectedItems);
|
|
1816
|
-
|
|
1817
|
-
//
|
|
1818
|
-
var _res = valRes(newSelectedItems);
|
|
1819
|
-
var _resLabel = allOptions.filter(function (v) {
|
|
1820
|
-
return _res.includes(v.value);
|
|
1821
|
-
}).map(function (k) {
|
|
1822
|
-
return k.label;
|
|
1823
|
-
});
|
|
1824
|
-
var _resDataCollection = allOptions.filter(function (v) {
|
|
1825
|
-
return _res.includes(v.value);
|
|
1826
|
-
}).map(function (k) {
|
|
1827
|
-
return k;
|
|
1828
|
-
});
|
|
1829
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, _res, VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets)(_res) : _res.join(','), _resLabel, VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets)(_resLabel) : _resLabel.join(','), null, _resDataCollection);
|
|
1830
|
-
};
|
|
1831
|
-
|
|
1832
|
-
// exposes the following methods
|
|
1833
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
|
|
1834
|
-
return {
|
|
1835
|
-
control: function control() {
|
|
1836
|
-
return getAllControls();
|
|
1837
|
-
},
|
|
1838
|
-
getLatestVal: function getLatestVal() {
|
|
1839
|
-
return VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets)(valRes(selectedItems)) : valRes(selectedItems).join(',');
|
|
1840
|
-
},
|
|
1841
|
-
clear: function clear(cb) {
|
|
1842
|
-
initDefaultValue('', dataInit);
|
|
1843
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
1844
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, null, '', null, '', null, []);
|
|
1845
|
-
},
|
|
1846
|
-
set: function set(value, cb) {
|
|
1847
|
-
initDefaultValue(value, dataInit);
|
|
1848
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
1849
|
-
if (Array.isArray(value)) {
|
|
1850
|
-
var _resDataCollection = value;
|
|
1851
|
-
var _value = value.map(function (k) {
|
|
1852
|
-
return k.value;
|
|
1853
|
-
});
|
|
1854
|
-
var _valueStr = VALUE_BY_BRACKETS ? value.map(function (k) {
|
|
1855
|
-
return "[".concat(k.value, "]");
|
|
1856
|
-
}).join('') : value.map(function (k) {
|
|
1857
|
-
return k.value;
|
|
1858
|
-
}).join(',');
|
|
1859
|
-
var _label = value.map(function (k) {
|
|
1860
|
-
return k.label;
|
|
1861
|
-
});
|
|
1862
|
-
var _labelStr = VALUE_BY_BRACKETS ? value.map(function (k) {
|
|
1863
|
-
return "[".concat(k.label, "]");
|
|
1864
|
-
}).join('') : value.map(function (k) {
|
|
1865
|
-
return k.label;
|
|
1866
|
-
}).join(',');
|
|
1867
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, _value, _valueStr, _label, _labelStr, null, _resDataCollection);
|
|
1868
|
-
} else {
|
|
1869
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, null, value !== null && value !== void 0 ? value : '', null, '', null, []);
|
|
1870
|
-
}
|
|
1871
|
-
},
|
|
1872
|
-
selectAll: function selectAll() {
|
|
1873
|
-
var allOptions = optionsFlat(dataInit);
|
|
1874
|
-
var enabledOptions = allOptions.filter(function (option) {
|
|
1875
|
-
return !(disabled || (typeof option.disabled !== 'undefined' ? option.disabled : false));
|
|
1876
|
-
});
|
|
1877
|
-
var newSelectedItems = new Set([].concat(_toConsumableArray(Array.from(selectedItems)), _toConsumableArray(enabledOptions.map(function (option) {
|
|
1878
|
-
return option.value;
|
|
1879
|
-
}))));
|
|
1880
|
-
setSelectedItems(newSelectedItems);
|
|
1881
|
-
|
|
1882
|
-
//
|
|
1883
|
-
var _res = valRes(newSelectedItems);
|
|
1884
|
-
var _resLabel = allOptions.filter(function (v) {
|
|
1885
|
-
return _res.includes(v.value);
|
|
1886
|
-
}).map(function (k) {
|
|
1887
|
-
return k.label;
|
|
1888
|
-
});
|
|
1889
|
-
var _resDataCollection = allOptions.filter(function (v) {
|
|
1890
|
-
return _res.includes(v.value);
|
|
1891
|
-
}).map(function (k) {
|
|
1892
|
-
return k;
|
|
1893
|
-
});
|
|
1894
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, _res, VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets)(_res) : _res.join(','), _resLabel, VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets)(_resLabel) : _resLabel.join(','), null, _resDataCollection);
|
|
1895
|
-
},
|
|
1896
|
-
deselectAll: function deselectAll() {
|
|
1897
|
-
setSelectedItems(new Set());
|
|
1898
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(null, [], '', [], '', null, []);
|
|
1899
|
-
},
|
|
1900
|
-
isAllSelected: function isAllSelected() {
|
|
1901
|
-
return _isAllSelected();
|
|
1902
|
-
}
|
|
1903
|
-
};
|
|
1904
|
-
}, [dataInit, contentRef, selectedItems]);
|
|
1905
|
-
function handleCheckboxChange(itemKey) {
|
|
1906
|
-
// first, make a copy of the original set rather than mutating the original
|
|
1907
|
-
var newSelectedItems = new Set(selectedItems);
|
|
1908
|
-
if (singleSelect) {
|
|
1909
|
-
// If singleSelect is true, clear all selections first
|
|
1910
|
-
newSelectedItems.clear();
|
|
1911
|
-
// Only add the new selection if it wasn't already selected
|
|
1912
|
-
if (!selectedItems.has(itemKey)) {
|
|
1913
|
-
newSelectedItems.add(itemKey);
|
|
1914
|
-
}
|
|
1915
|
-
} else {
|
|
1916
|
-
// Original multi-select behavior
|
|
1917
|
-
if (!newSelectedItems.has(itemKey)) {
|
|
1918
|
-
newSelectedItems.add(itemKey);
|
|
1919
|
-
} else {
|
|
1920
|
-
newSelectedItems["delete"](itemKey);
|
|
1921
|
-
}
|
|
1922
|
-
}
|
|
1923
|
-
setSelectedItems(newSelectedItems);
|
|
1924
|
-
return newSelectedItems;
|
|
1925
|
-
}
|
|
1926
|
-
function fetchData(_x2, _x3) {
|
|
1927
|
-
return _fetchData.apply(this, arguments);
|
|
1928
|
-
}
|
|
1929
|
-
function _fetchData() {
|
|
1930
|
-
_fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, inputDefault) {
|
|
1931
|
-
var response, _ORGIN_DATA;
|
|
1932
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1933
|
-
while (1) switch (_context.prev = _context.next) {
|
|
1934
|
-
case 0:
|
|
1935
|
-
// set default value
|
|
1936
|
-
if (typeof inputDefault !== 'undefined' && inputDefault !== '') rootRef.current.dataset.value = inputDefault;
|
|
1937
|
-
|
|
1938
|
-
//
|
|
1939
|
-
if (!(_typeof(fetchFuncAsync) === 'object')) {
|
|
1940
|
-
_context.next = 16;
|
|
1941
|
-
break;
|
|
1942
|
-
}
|
|
1943
|
-
_context.next = 4;
|
|
1944
|
-
return fetchFuncAsync["".concat(fetchFuncMethod)].apply(fetchFuncAsync, _toConsumableArray(params.split(',')));
|
|
1945
|
-
case 4:
|
|
1946
|
-
response = _context.sent;
|
|
1947
|
-
_ORGIN_DATA = response.data; // reset data structure
|
|
1948
|
-
if (typeof fetchCallback === 'function') {
|
|
1949
|
-
_ORGIN_DATA = fetchCallback(_ORGIN_DATA);
|
|
1950
|
-
}
|
|
1951
|
-
|
|
1952
|
-
// Determine whether the data structure matches
|
|
1953
|
-
if (_ORGIN_DATA.length > 0 && typeof _ORGIN_DATA[0].value === 'undefined') {
|
|
1954
|
-
console.warn('The data structure does not match, please refer to the example in the component documentation.');
|
|
1955
|
-
_ORGIN_DATA = [];
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
// remove Duplicate objects from JSON Array
|
|
1959
|
-
optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
|
|
1960
|
-
_ORGIN_DATA = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5__.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
|
|
1961
|
-
|
|
1962
|
-
//
|
|
1963
|
-
initDefaultValue(inputDefault, _ORGIN_DATA); // value must be initialized
|
|
1964
|
-
|
|
1965
|
-
//
|
|
1966
|
-
setDataInit(_ORGIN_DATA); // data must be initialized
|
|
1967
|
-
|
|
1968
|
-
//
|
|
1969
|
-
onFetch === null || onFetch === void 0 ? void 0 : onFetch(_ORGIN_DATA);
|
|
1970
|
-
return _context.abrupt("return", _ORGIN_DATA);
|
|
1971
|
-
case 16:
|
|
1972
|
-
// remove Duplicate objects from JSON Array
|
|
1973
|
-
optionsFormatGroupOpt(optionsDataInit); // prevent the value from being filtered out
|
|
1974
|
-
optionsDataInit = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_5__.removeArrDuplicateItems)(optionsDataInit, 'value');
|
|
1975
|
-
|
|
1976
|
-
//
|
|
1977
|
-
initDefaultValue(inputDefault, optionsDataInit); // value must be initialized
|
|
1978
|
-
|
|
1979
|
-
//
|
|
1980
|
-
setDataInit(optionsDataInit); // data must be initialized
|
|
1981
|
-
|
|
1982
|
-
//
|
|
1983
|
-
onFetch === null || onFetch === void 0 ? void 0 : onFetch(optionsDataInit);
|
|
1984
|
-
return _context.abrupt("return", optionsDataInit);
|
|
1985
|
-
case 22:
|
|
1986
|
-
case "end":
|
|
1987
|
-
return _context.stop();
|
|
1988
|
-
}
|
|
1989
|
-
}, _callee);
|
|
1990
|
-
}));
|
|
1991
|
-
return _fetchData.apply(this, arguments);
|
|
1992
|
-
}
|
|
1993
|
-
function initDefaultValue(defaultValue, latestData) {
|
|
1994
|
-
var newSelectedItems = new Set();
|
|
1995
|
-
|
|
1996
|
-
// change the value to trigger component rendering
|
|
1997
|
-
if (typeof defaultValue === 'undefined' || defaultValue === '') {
|
|
1998
|
-
setSelectedItems(newSelectedItems);
|
|
1999
|
-
|
|
2000
|
-
//
|
|
2001
|
-
onLoad === null || onLoad === void 0 ? void 0 : onLoad(latestData, defaultValue, rootRef.current);
|
|
2002
|
-
} else {
|
|
2003
|
-
var _val = VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_extract__WEBPACK_IMPORTED_MODULE_3__.extractContentsOfBrackets)(defaultValue) : defaultValue.trim().replace(/^\,|\,$/g, '').split(',');
|
|
2004
|
-
if (Array.isArray(_val)) {
|
|
2005
|
-
// If the default value is label, match value
|
|
2006
|
-
var _realValue = _val.filter(function (v) {
|
|
2007
|
-
return v !== '';
|
|
2008
|
-
});
|
|
2009
|
-
var filterRes = [];
|
|
2010
|
-
var filterResQueryValue = latestData.filter(function (item) {
|
|
2011
|
-
return _val.includes(item.value);
|
|
2012
|
-
});
|
|
2013
|
-
var filterResQueryLabel = latestData.filter(function (item) {
|
|
2014
|
-
return _val.includes(item.label);
|
|
2015
|
-
});
|
|
2016
|
-
if (filterResQueryValue.length === 0 && filterResQueryLabel.length > 0) {
|
|
2017
|
-
filterRes = filterResQueryValue;
|
|
2018
|
-
if (filterResQueryValue.length === 0) filterRes = filterResQueryLabel;
|
|
2019
|
-
if (filterRes.length > 0 && filterResQueryLabel.length) _realValue = filterRes.filter(function (v) {
|
|
2020
|
-
return v.value !== '';
|
|
2021
|
-
}).map(function (k) {
|
|
2022
|
-
return k.value;
|
|
2023
|
-
});
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
//
|
|
2027
|
-
_realValue.forEach(function (v) {
|
|
2028
|
-
newSelectedItems.add(v);
|
|
2029
|
-
});
|
|
2030
|
-
setSelectedItems(newSelectedItems);
|
|
2031
|
-
|
|
2032
|
-
//
|
|
2033
|
-
onLoad === null || onLoad === void 0 ? void 0 : onLoad(latestData, _realValue, rootRef.current);
|
|
2034
|
-
} else {
|
|
2035
|
-
setSelectedItems(newSelectedItems);
|
|
2036
|
-
|
|
2037
|
-
//
|
|
2038
|
-
onLoad === null || onLoad === void 0 ? void 0 : onLoad(latestData, defaultValue, rootRef.current);
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
}
|
|
2042
|
-
function valRes(setData) {
|
|
2043
|
-
var res = [];
|
|
2044
|
-
var s = setData;
|
|
2045
|
-
for (var it = s.values(), val = null; val = it.next().value;) {
|
|
2046
|
-
res.push(val);
|
|
2047
|
-
}
|
|
2048
|
-
return res;
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
|
-
// Generate custom list of options
|
|
2052
|
-
var itemsList = function itemsList(fn) {
|
|
2053
|
-
if (typeof fn === 'function') {
|
|
2054
|
-
var params = {
|
|
2055
|
-
name: name,
|
|
2056
|
-
groupLabelClassName: groupLabelClassName,
|
|
2057
|
-
groupWrapperClassName: groupWrapperClassName,
|
|
2058
|
-
tableLayoutCellClassName: tableLayoutCellClassName,
|
|
2059
|
-
tableLayout: tableLayout,
|
|
2060
|
-
dataInit: dataInit,
|
|
2061
|
-
inline: _inline,
|
|
2062
|
-
selectedItems: selectedItems,
|
|
2063
|
-
uniqueID: uniqueID,
|
|
2064
|
-
valueBrackets: VALUE_BY_BRACKETS,
|
|
2065
|
-
disabled: disabled,
|
|
2066
|
-
labelRes: labelRes,
|
|
2067
|
-
valRes: valRes,
|
|
2068
|
-
handleCheckboxChange: handleCheckboxChange,
|
|
2069
|
-
convertArrToValByBrackets: funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets,
|
|
2070
|
-
isAllSelected: _isAllSelected(),
|
|
2071
|
-
handleSelectAll: handleSelectAll,
|
|
2072
|
-
onChange: _onChange,
|
|
2073
|
-
attributes: attributes
|
|
2074
|
-
};
|
|
2075
|
-
return fn === null || fn === void 0 ? void 0 : fn(params);
|
|
2076
|
-
}
|
|
2077
|
-
var allOptions = optionsFlat(dataInit);
|
|
2078
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, showSelectAll && allOptions.length > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
2079
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.combinedCls)('multiple-checkboxes__control form-check pe-3', {
|
|
2080
|
-
'd-inline-block': _inline
|
|
2081
|
-
})
|
|
2082
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", {
|
|
2083
|
-
type: "checkbox",
|
|
2084
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.clsWrite)(controlClassName, 'form-check-input'),
|
|
2085
|
-
name: "".concat(name, "-select-all"),
|
|
2086
|
-
id: "multiple-checkboxes__select-all-".concat(idRes),
|
|
2087
|
-
checked: _isAllSelected(),
|
|
2088
|
-
onChange: handleSelectAll,
|
|
2089
|
-
disabled: disabled
|
|
2090
|
-
}), labelRes(selectAllLabel, "multiple-checkboxes__select-all-".concat(idRes))), Array.isArray(dataInit) ? dataInit.map(function (item, index) {
|
|
2091
|
-
var _optiondata = {};
|
|
2092
|
-
Object.entries(item).forEach(function (_ref) {
|
|
2093
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
2094
|
-
key = _ref2[0],
|
|
2095
|
-
value = _ref2[1];
|
|
2096
|
-
if (key !== 'extends') {
|
|
2097
|
-
_optiondata[key] = value;
|
|
2098
|
-
}
|
|
2099
|
-
});
|
|
2100
|
-
var _groupEl = function _groupEl() {
|
|
2101
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
2102
|
-
className: "rmultiple-checkboxes-group__label ".concat(groupLabelClassName || '')
|
|
2103
|
-
}, item.label), Array.isArray(item.optgroup) && item.optgroup.map(function (opt, optIndex) {
|
|
2104
|
-
var _optiondata2 = {};
|
|
2105
|
-
Object.entries(item).forEach(function (_ref3) {
|
|
2106
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
2107
|
-
key = _ref4[0],
|
|
2108
|
-
value = _ref4[1];
|
|
2109
|
-
if (key !== 'extends') {
|
|
2110
|
-
_optiondata2[key] = value;
|
|
2111
|
-
}
|
|
2112
|
-
});
|
|
2113
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
2114
|
-
key: 'checkbox' + optIndex,
|
|
2115
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.combinedCls)('multiple-checkboxes__control form-check pe-3', {
|
|
2116
|
-
'd-inline-block': _inline
|
|
2117
|
-
}),
|
|
2118
|
-
"data-index": "".concat(index, "-").concat(optIndex),
|
|
2119
|
-
"data-label": opt.label,
|
|
2120
|
-
"data-list-item-label": "".concat(typeof opt.listItemLabel === 'undefined' ? '' : opt.listItemLabel),
|
|
2121
|
-
"data-value": opt.value,
|
|
2122
|
-
"data-disabled": disabled || (typeof opt.disabled !== 'undefined' ? "".concat(opt.disabled) : 'false')
|
|
2123
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
|
|
2124
|
-
ref: function ref(node) {
|
|
2125
|
-
if (externalRef) externalRef.current = getAllControls();
|
|
2126
|
-
},
|
|
2127
|
-
type: "checkbox",
|
|
2128
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.clsWrite)(controlClassName, 'form-check-input'),
|
|
2129
|
-
name: "".concat(name, "-checkbox-item"),
|
|
2130
|
-
id: "multiple-checkboxes__control-label-".concat(index, "-").concat(optIndex, "-").concat(idRes),
|
|
2131
|
-
"data-index": "".concat(index, "-").concat(optIndex),
|
|
2132
|
-
"data-label": opt.label,
|
|
2133
|
-
"data-list-item-label": "".concat(typeof opt.listItemLabel === 'undefined' ? '' : opt.listItemLabel),
|
|
2134
|
-
"data-value": opt.value,
|
|
2135
|
-
"data-disabled": disabled || (typeof opt.disabled !== 'undefined' ? "".concat(opt.disabled) : 'false'),
|
|
2136
|
-
"data-optiondata": JSON.stringify(_optiondata2),
|
|
2137
|
-
value: opt.value,
|
|
2138
|
-
disabled: disabled || (typeof opt.disabled !== 'undefined' ? opt.disabled : null),
|
|
2139
|
-
checked: selectedItems.has(opt.value),
|
|
2140
|
-
onChange: function onChange(e) {
|
|
2141
|
-
var _newSelectedItems = handleCheckboxChange(opt.value);
|
|
2142
|
-
|
|
2143
|
-
//
|
|
2144
|
-
var _res = valRes(_newSelectedItems);
|
|
2145
|
-
var _resLabel = optionsFlat(dataInit).filter(function (v) {
|
|
2146
|
-
return _res.includes(v.value);
|
|
2147
|
-
}).map(function (k) {
|
|
2148
|
-
return k.label;
|
|
2149
|
-
});
|
|
2150
|
-
var _resDataCollection = optionsFlat(dataInit).filter(function (v) {
|
|
2151
|
-
return _res.includes(v.value);
|
|
2152
|
-
}).map(function (k) {
|
|
2153
|
-
return k;
|
|
2154
|
-
});
|
|
2155
|
-
|
|
2156
|
-
//
|
|
2157
|
-
var curData;
|
|
2158
|
-
|
|
2159
|
-
// if group
|
|
2160
|
-
if (typeof item.optgroup !== 'undefined') {
|
|
2161
|
-
var groupItemIndex = optIndex;
|
|
2162
|
-
var groupOpts = item.optgroup;
|
|
2163
|
-
curData = groupOpts[groupItemIndex];
|
|
2164
|
-
} else {
|
|
2165
|
-
curData = item;
|
|
2166
|
-
}
|
|
2167
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(e.target, _res, VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets)(_res) : _res.join(','), _resLabel, VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets)(_resLabel) : _resLabel.join(','), curData, _resDataCollection);
|
|
2168
|
-
}
|
|
2169
|
-
}, attributes)), labelRes(typeof opt.listItemLabel === 'undefined' ? opt.label : opt.listItemLabel, "multiple-checkboxes__control-label-".concat(index, "-").concat(optIndex, "-").concat(idRes)), typeof opt["extends"] !== 'undefined' ? /*#__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", {
|
|
2170
|
-
className: "d-inline-block"
|
|
2171
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
2172
|
-
className: "form-control-extends__wrapper"
|
|
2173
|
-
}, opt["extends"]))) : null);
|
|
2174
|
-
}));
|
|
2175
|
-
};
|
|
2176
|
-
var _normalEl = function _normalEl() {
|
|
2177
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
|
|
2178
|
-
ref: function ref(node) {
|
|
2179
|
-
if (externalRef) externalRef.current = getAllControls();
|
|
2180
|
-
},
|
|
2181
|
-
type: "checkbox",
|
|
2182
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.clsWrite)(controlClassName, 'form-check-input'),
|
|
2183
|
-
name: "".concat(name, "-checkbox-item"),
|
|
2184
|
-
id: "multiple-checkboxes__control-label-".concat(index, "-").concat(idRes),
|
|
2185
|
-
"data-index": index,
|
|
2186
|
-
"data-label": item.label,
|
|
2187
|
-
"data-list-item-label": "".concat(typeof item.listItemLabel === 'undefined' ? '' : item.listItemLabel),
|
|
2188
|
-
"data-value": item.value,
|
|
2189
|
-
"data-disabled": disabled || (typeof item.disabled !== 'undefined' ? "".concat(item.disabled) : 'false'),
|
|
2190
|
-
"data-optiondata": JSON.stringify(_optiondata),
|
|
2191
|
-
value: item.value,
|
|
2192
|
-
disabled: disabled || (typeof item.disabled !== 'undefined' ? item.disabled : null),
|
|
2193
|
-
checked: selectedItems.has(item.value),
|
|
2194
|
-
onChange: function onChange(e) {
|
|
2195
|
-
var _newSelectedItems = handleCheckboxChange(item.value);
|
|
2196
|
-
|
|
2197
|
-
//
|
|
2198
|
-
var _res = valRes(_newSelectedItems);
|
|
2199
|
-
var _resLabel = dataInit.filter(function (v) {
|
|
2200
|
-
return _res.includes(v.value);
|
|
2201
|
-
}).map(function (k) {
|
|
2202
|
-
return k.label;
|
|
2203
|
-
});
|
|
2204
|
-
var _resDataCollection = optionsFlat(dataInit).filter(function (v) {
|
|
2205
|
-
return _res.includes(v.value);
|
|
2206
|
-
}).map(function (k) {
|
|
2207
|
-
return k;
|
|
2208
|
-
});
|
|
2209
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(e.target, _res, VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets)(_res) : _res.join(','), _resLabel, VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets)(_resLabel) : _resLabel.join(','), item, _resDataCollection);
|
|
2210
|
-
}
|
|
2211
|
-
}, attributes)), labelRes(typeof item.listItemLabel === 'undefined' ? item.label : item.listItemLabel, "multiple-checkboxes__control-label-".concat(index, "-").concat(idRes)), typeof item["extends"] !== 'undefined' ? /*#__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", {
|
|
2212
|
-
className: "d-inline-block"
|
|
2213
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
2214
|
-
className: "form-control-extends__wrapper"
|
|
2215
|
-
}, item["extends"]))) : null);
|
|
2216
|
-
};
|
|
2217
|
-
if (tableLayout) {
|
|
2218
|
-
/* TABLE LAYOUT */
|
|
2219
|
-
if (typeof item.optgroup !== 'undefined') {
|
|
2220
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
2221
|
-
colSpan: 1,
|
|
2222
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.combinedCls)('multiple-checkboxes-group__wrapper', groupWrapperClassName, tableLayoutCellClassName),
|
|
2223
|
-
key: 'optgroup-' + index
|
|
2224
|
-
}, _groupEl());
|
|
2225
|
-
} else {
|
|
2226
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
2227
|
-
colSpan: 1,
|
|
2228
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.combinedCls)('multiple-checkboxes__control form-check pe-3', tableLayoutCellClassName, {
|
|
2229
|
-
'd-inline-block': _inline
|
|
2230
|
-
}),
|
|
2231
|
-
"data-index": index,
|
|
2232
|
-
"data-label": item.label,
|
|
2233
|
-
"data-list-item-label": "".concat(typeof item.listItemLabel === 'undefined' ? '' : item.listItemLabel),
|
|
2234
|
-
"data-value": item.value,
|
|
2235
|
-
"data-disabled": disabled || (typeof item.disabled !== 'undefined' ? "".concat(item.disabled) : 'false'),
|
|
2236
|
-
key: 'checkbox' + index,
|
|
2237
|
-
"data-optiondata": JSON.stringify(_optiondata)
|
|
2238
|
-
}, _normalEl());
|
|
2239
|
-
}
|
|
2240
|
-
/* /TABLE LAYOUT */
|
|
2241
|
-
} else {
|
|
2242
|
-
if (typeof item.optgroup !== 'undefined') {
|
|
2243
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
2244
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.combinedCls)('multiple-checkboxes-group__wrapper', groupWrapperClassName),
|
|
2245
|
-
key: 'optgroup-' + index
|
|
2246
|
-
}, _groupEl());
|
|
2247
|
-
} else {
|
|
2248
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
2249
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.combinedCls)('multiple-checkboxes__control form-check pe-3', {
|
|
2250
|
-
'd-inline-block': _inline
|
|
2251
|
-
}),
|
|
2252
|
-
"data-index": index,
|
|
2253
|
-
"data-label": item.label,
|
|
2254
|
-
"data-list-item-label": "".concat(typeof item.listItemLabel === 'undefined' ? '' : item.listItemLabel),
|
|
2255
|
-
"data-value": item.value,
|
|
2256
|
-
"data-disabled": disabled || (typeof item.disabled !== 'undefined' ? "".concat(item.disabled) : 'false'),
|
|
2257
|
-
key: 'checkbox' + index,
|
|
2258
|
-
"data-optiondata": JSON.stringify(_optiondata)
|
|
2259
|
-
}, _normalEl());
|
|
2260
|
-
}
|
|
2261
|
-
}
|
|
2262
|
-
}) : null);
|
|
2263
|
-
};
|
|
2264
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
2265
|
-
// data init
|
|
2266
|
-
//--------------
|
|
2267
|
-
var _params = fetchFuncMethodParams || [];
|
|
2268
|
-
fetchData(_params.join(','), value);
|
|
2269
|
-
}, [value, options]);
|
|
2270
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
2271
|
-
// update default value (It does not re-render the component because the incoming value changes.)
|
|
2272
|
-
//--------------
|
|
2273
|
-
if (typeof defaultValue !== 'undefined') {
|
|
2274
|
-
//REQUIRED
|
|
2275
|
-
var _params = fetchFuncMethodParams || [];
|
|
2276
|
-
fetchData(_params.join(','), defaultValue);
|
|
2277
|
-
}
|
|
2278
|
-
}, []);
|
|
2279
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, tableLayout ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", {
|
|
2280
|
-
id: "multiple-checkboxes-tablelayout__wrapper-".concat(idRes),
|
|
2281
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.combinedCls)('multiple-checkboxes-tablelayout__wrapper', tableLayoutClassName),
|
|
2282
|
-
ref: rootRef
|
|
2283
|
-
}, label ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, typeof label === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("caption", {
|
|
2284
|
-
dangerouslySetInnerHTML: {
|
|
2285
|
-
__html: "".concat(label)
|
|
2286
|
-
}
|
|
2287
|
-
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("caption", null, label)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", null, itemsList(onCallbackListItem))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tfoot", {
|
|
2288
|
-
style: {
|
|
2289
|
-
display: 'none'
|
|
2290
|
-
}
|
|
2291
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
|
|
2292
|
-
tabIndex: -1,
|
|
2293
|
-
type: "hidden",
|
|
2294
|
-
id: idRes,
|
|
2295
|
-
name: name,
|
|
2296
|
-
value: VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets)(valRes(selectedItems)) : valRes(selectedItems).join(',') // do not use `defaultValue`
|
|
2297
|
-
,
|
|
2298
|
-
onChange: function onChange() {
|
|
2299
|
-
return void 0;
|
|
2300
|
-
},
|
|
2301
|
-
required: required || null
|
|
2302
|
-
}, attributes))))) : /*#__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", {
|
|
2303
|
-
id: "multiple-checkboxes__wrapper-".concat(idRes),
|
|
2304
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.combinedCls)('multiple-checkboxes__wrapper', (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_6__.clsWrite)(wrapperClassName, 'mb-3 position-relative')),
|
|
2305
|
-
ref: rootRef
|
|
2306
|
-
}, label ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, typeof label === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
|
|
2307
|
-
htmlFor: "label-".concat(idRes),
|
|
2308
|
-
className: "form-label",
|
|
2309
|
-
dangerouslySetInnerHTML: {
|
|
2310
|
-
__html: "".concat(label)
|
|
2311
|
-
}
|
|
2312
|
-
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
|
|
2313
|
-
htmlFor: "label-".concat(idRes),
|
|
2314
|
-
className: "form-label"
|
|
2315
|
-
}, label)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
2316
|
-
className: "multiple-checkboxes__control-wrapper",
|
|
2317
|
-
style: style
|
|
2318
|
-
}, itemsList(onCallbackListItem), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
|
|
2319
|
-
tabIndex: -1,
|
|
2320
|
-
type: "hidden",
|
|
2321
|
-
id: idRes,
|
|
2322
|
-
name: name,
|
|
2323
|
-
value: VALUE_BY_BRACKETS ? (0,funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_4__.convertArrToValByBrackets)(valRes(selectedItems)) : valRes(selectedItems).join(',') // do not use `defaultValue`
|
|
2324
|
-
,
|
|
2325
|
-
onChange: function onChange() {
|
|
2326
|
-
return void 0;
|
|
2327
|
-
},
|
|
2328
|
-
required: required || null
|
|
2329
|
-
}, attributes))))));
|
|
2330
|
-
});
|
|
2331
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MultipleCheckboxes);
|
|
2332
|
-
})();
|
|
2333
|
-
|
|
2334
|
-
/******/ return __webpack_exports__;
|
|
2335
|
-
/******/ })()
|
|
2336
|
-
;
|
|
2337
|
-
});
|