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
package/publish/Radio/index.js
DELETED
|
@@ -1,1838 +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
|
-
/***/ 575:
|
|
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 _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); }
|
|
233
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
234
|
-
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),
|
|
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_993__ = {};
|
|
247
|
-
/******/
|
|
248
|
-
/************************************************************************/
|
|
249
|
-
/******/ /* webpack/runtime/define property getters */
|
|
250
|
-
/******/
|
|
251
|
-
(function () {
|
|
252
|
-
/******/ // define getter functions for harmony exports
|
|
253
|
-
/******/__nested_webpack_require_993__.d = function (exports, definition) {
|
|
254
|
-
/******/for (var key in definition) {
|
|
255
|
-
/******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.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_993__.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_993__.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_993__.r(__webpack_exports__);
|
|
301
|
-
/* harmony export */
|
|
302
|
-
__nested_webpack_require_993__.d(__webpack_exports__, {
|
|
303
|
-
/* harmony export */"deepClone": function deepClone() {
|
|
304
|
-
return (/* binding */_deepClone
|
|
305
|
-
);
|
|
306
|
-
},
|
|
307
|
-
/* harmony export */"flatData": function flatData() {
|
|
308
|
-
return (/* binding */_flatData
|
|
309
|
-
);
|
|
310
|
-
},
|
|
311
|
-
/* harmony export */"removeArrDuplicateItems": function removeArrDuplicateItems() {
|
|
312
|
-
return (/* binding */_removeArrDuplicateItems
|
|
313
|
-
);
|
|
314
|
-
}
|
|
315
|
-
/* harmony export */
|
|
316
|
-
});
|
|
317
|
-
function _typeof(obj) {
|
|
318
|
-
"@babel/helpers - typeof";
|
|
319
|
-
|
|
320
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
321
|
-
return typeof obj;
|
|
322
|
-
} : function (obj) {
|
|
323
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
324
|
-
}, _typeof(obj);
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Remove Duplicate objects from JSON Array
|
|
328
|
-
* @param {Array} obj
|
|
329
|
-
* @param {String} fieldName
|
|
330
|
-
*/
|
|
331
|
-
function _removeArrDuplicateItems(obj, fieldName) {
|
|
332
|
-
if (!Array.isArray(obj)) return [];
|
|
333
|
-
var clean = obj.filter(function (item, index, self) {
|
|
334
|
-
return index === self.findIndex(function (t) {
|
|
335
|
-
return t[fieldName] === item[fieldName];
|
|
336
|
-
});
|
|
337
|
-
});
|
|
338
|
-
return clean;
|
|
339
|
-
}
|
|
340
|
-
;
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Deep clone
|
|
344
|
-
* @param {*} obj
|
|
345
|
-
*/
|
|
346
|
-
function _deepClone(obj) {
|
|
347
|
-
if (Array.isArray(obj)) {
|
|
348
|
-
return obj.map(function (item) {
|
|
349
|
-
return _deepClone(item);
|
|
350
|
-
});
|
|
351
|
-
} else if (_typeof(obj) === 'object' && obj !== null) {
|
|
352
|
-
var clone = {};
|
|
353
|
-
for (var key in obj) {
|
|
354
|
-
if (obj.hasOwnProperty(key)) {
|
|
355
|
-
clone[key] = _deepClone(obj[key]);
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
return clone;
|
|
359
|
-
} else {
|
|
360
|
-
return obj;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* Flat Data
|
|
366
|
-
* @param {*} data
|
|
367
|
-
* @returns
|
|
368
|
-
*/
|
|
369
|
-
function _flatData(data) {
|
|
370
|
-
var result = [];
|
|
371
|
-
var iterate = function iterate(obj) {
|
|
372
|
-
if (!obj) {
|
|
373
|
-
return;
|
|
374
|
-
}
|
|
375
|
-
obj.forEach(function (item) {
|
|
376
|
-
result.push(item);
|
|
377
|
-
if (item.children) {
|
|
378
|
-
iterate(item.children);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
// delete current item children
|
|
382
|
-
delete item.children;
|
|
383
|
-
});
|
|
384
|
-
};
|
|
385
|
-
iterate(data);
|
|
386
|
-
return result;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/******/
|
|
390
|
-
return __webpack_exports__;
|
|
391
|
-
/******/
|
|
392
|
-
}()
|
|
393
|
-
);
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
/***/ }),
|
|
397
|
-
|
|
398
|
-
/***/ 85:
|
|
399
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
400
|
-
|
|
401
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
402
|
-
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); }
|
|
403
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
404
|
-
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),
|
|
405
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
406
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
407
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
408
|
-
})(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
|
|
409
|
-
return (/******/function () {
|
|
410
|
-
// webpackBootstrap
|
|
411
|
-
/******/
|
|
412
|
-
"use strict";
|
|
413
|
-
|
|
414
|
-
/******/
|
|
415
|
-
var __webpack_modules__ = {
|
|
416
|
-
/***/787: /***/function _(module) {
|
|
417
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
418
|
-
|
|
419
|
-
/***/
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
/******/
|
|
423
|
-
};
|
|
424
|
-
/************************************************************************/
|
|
425
|
-
/******/ // The module cache
|
|
426
|
-
/******/
|
|
427
|
-
var __webpack_module_cache__ = {};
|
|
428
|
-
/******/
|
|
429
|
-
/******/ // The require function
|
|
430
|
-
/******/
|
|
431
|
-
function __nested_webpack_require_1465__(moduleId) {
|
|
432
|
-
/******/ // Check if module is in cache
|
|
433
|
-
/******/var cachedModule = __webpack_module_cache__[moduleId];
|
|
434
|
-
/******/
|
|
435
|
-
if (cachedModule !== undefined) {
|
|
436
|
-
/******/return cachedModule.exports;
|
|
437
|
-
/******/
|
|
438
|
-
}
|
|
439
|
-
/******/ // Create a new module (and put it into the cache)
|
|
440
|
-
/******/
|
|
441
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
442
|
-
/******/ // no module.id needed
|
|
443
|
-
/******/ // no module.loaded needed
|
|
444
|
-
/******/exports: {}
|
|
445
|
-
/******/
|
|
446
|
-
};
|
|
447
|
-
/******/
|
|
448
|
-
/******/ // Execute the module function
|
|
449
|
-
/******/
|
|
450
|
-
__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
|
|
451
|
-
/******/
|
|
452
|
-
/******/ // Return the exports of the module
|
|
453
|
-
/******/
|
|
454
|
-
return module.exports;
|
|
455
|
-
/******/
|
|
456
|
-
}
|
|
457
|
-
/******/
|
|
458
|
-
/************************************************************************/
|
|
459
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
460
|
-
/******/
|
|
461
|
-
(function () {
|
|
462
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
463
|
-
/******/__nested_webpack_require_1465__.n = function (module) {
|
|
464
|
-
/******/var getter = module && module.__esModule ? /******/function () {
|
|
465
|
-
return module['default'];
|
|
466
|
-
} : /******/function () {
|
|
467
|
-
return module;
|
|
468
|
-
};
|
|
469
|
-
/******/
|
|
470
|
-
__nested_webpack_require_1465__.d(getter, {
|
|
471
|
-
a: getter
|
|
472
|
-
});
|
|
473
|
-
/******/
|
|
474
|
-
return getter;
|
|
475
|
-
/******/
|
|
476
|
-
};
|
|
477
|
-
/******/
|
|
478
|
-
})();
|
|
479
|
-
/******/
|
|
480
|
-
/******/ /* webpack/runtime/define property getters */
|
|
481
|
-
/******/
|
|
482
|
-
(function () {
|
|
483
|
-
/******/ // define getter functions for harmony exports
|
|
484
|
-
/******/__nested_webpack_require_1465__.d = function (exports, definition) {
|
|
485
|
-
/******/for (var key in definition) {
|
|
486
|
-
/******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
|
|
487
|
-
/******/Object.defineProperty(exports, key, {
|
|
488
|
-
enumerable: true,
|
|
489
|
-
get: definition[key]
|
|
490
|
-
});
|
|
491
|
-
/******/
|
|
492
|
-
}
|
|
493
|
-
/******/
|
|
494
|
-
}
|
|
495
|
-
/******/
|
|
496
|
-
};
|
|
497
|
-
/******/
|
|
498
|
-
})();
|
|
499
|
-
/******/
|
|
500
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
501
|
-
/******/
|
|
502
|
-
(function () {
|
|
503
|
-
/******/__nested_webpack_require_1465__.o = function (obj, prop) {
|
|
504
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
505
|
-
};
|
|
506
|
-
/******/
|
|
507
|
-
})();
|
|
508
|
-
/******/
|
|
509
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
510
|
-
/******/
|
|
511
|
-
(function () {
|
|
512
|
-
/******/ // define __esModule on exports
|
|
513
|
-
/******/__nested_webpack_require_1465__.r = function (exports) {
|
|
514
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
515
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
516
|
-
value: 'Module'
|
|
517
|
-
});
|
|
518
|
-
/******/
|
|
519
|
-
}
|
|
520
|
-
/******/
|
|
521
|
-
Object.defineProperty(exports, '__esModule', {
|
|
522
|
-
value: true
|
|
523
|
-
});
|
|
524
|
-
/******/
|
|
525
|
-
};
|
|
526
|
-
/******/
|
|
527
|
-
})();
|
|
528
|
-
/******/
|
|
529
|
-
/************************************************************************/
|
|
530
|
-
var __webpack_exports__ = {};
|
|
531
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
532
|
-
(function () {
|
|
533
|
-
__nested_webpack_require_1465__.r(__webpack_exports__);
|
|
534
|
-
/* harmony export */
|
|
535
|
-
__nested_webpack_require_1465__.d(__webpack_exports__, {
|
|
536
|
-
/* harmony export */"default": function _default() {
|
|
537
|
-
return __WEBPACK_DEFAULT_EXPORT__;
|
|
538
|
-
}
|
|
539
|
-
/* harmony export */
|
|
540
|
-
});
|
|
541
|
-
/* harmony import */
|
|
542
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
|
|
543
|
-
/* harmony import */
|
|
544
|
-
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
545
|
-
/**
|
|
546
|
-
* Create an available ID
|
|
547
|
-
*
|
|
548
|
-
*/
|
|
549
|
-
|
|
550
|
-
var useComId = function useComId() {
|
|
551
|
-
return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
|
|
552
|
-
};
|
|
553
|
-
/* harmony default export */
|
|
554
|
-
var __WEBPACK_DEFAULT_EXPORT__ = useComId;
|
|
555
|
-
})();
|
|
556
|
-
|
|
557
|
-
/******/
|
|
558
|
-
return __webpack_exports__;
|
|
559
|
-
/******/
|
|
560
|
-
}()
|
|
561
|
-
);
|
|
562
|
-
});
|
|
563
|
-
|
|
564
|
-
/***/ }),
|
|
565
|
-
|
|
566
|
-
/***/ 455:
|
|
567
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
568
|
-
|
|
569
|
-
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
570
|
-
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); }
|
|
571
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
572
|
-
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),
|
|
573
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
574
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
575
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
576
|
-
})(this, function () {
|
|
577
|
-
return (/******/function () {
|
|
578
|
-
// webpackBootstrap
|
|
579
|
-
/******/
|
|
580
|
-
"use strict";
|
|
581
|
-
|
|
582
|
-
/******/ // The require scope
|
|
583
|
-
/******/
|
|
584
|
-
var __nested_webpack_require_993__ = {};
|
|
585
|
-
/******/
|
|
586
|
-
/************************************************************************/
|
|
587
|
-
/******/ /* webpack/runtime/define property getters */
|
|
588
|
-
/******/
|
|
589
|
-
(function () {
|
|
590
|
-
/******/ // define getter functions for harmony exports
|
|
591
|
-
/******/__nested_webpack_require_993__.d = function (exports, definition) {
|
|
592
|
-
/******/for (var key in definition) {
|
|
593
|
-
/******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
|
|
594
|
-
/******/Object.defineProperty(exports, key, {
|
|
595
|
-
enumerable: true,
|
|
596
|
-
get: definition[key]
|
|
597
|
-
});
|
|
598
|
-
/******/
|
|
599
|
-
}
|
|
600
|
-
/******/
|
|
601
|
-
}
|
|
602
|
-
/******/
|
|
603
|
-
};
|
|
604
|
-
/******/
|
|
605
|
-
})();
|
|
606
|
-
/******/
|
|
607
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
608
|
-
/******/
|
|
609
|
-
(function () {
|
|
610
|
-
/******/__nested_webpack_require_993__.o = function (obj, prop) {
|
|
611
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
612
|
-
};
|
|
613
|
-
/******/
|
|
614
|
-
})();
|
|
615
|
-
/******/
|
|
616
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
617
|
-
/******/
|
|
618
|
-
(function () {
|
|
619
|
-
/******/ // define __esModule on exports
|
|
620
|
-
/******/__nested_webpack_require_993__.r = function (exports) {
|
|
621
|
-
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
622
|
-
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
623
|
-
value: 'Module'
|
|
624
|
-
});
|
|
625
|
-
/******/
|
|
626
|
-
}
|
|
627
|
-
/******/
|
|
628
|
-
Object.defineProperty(exports, '__esModule', {
|
|
629
|
-
value: true
|
|
630
|
-
});
|
|
631
|
-
/******/
|
|
632
|
-
};
|
|
633
|
-
/******/
|
|
634
|
-
})();
|
|
635
|
-
/******/
|
|
636
|
-
/************************************************************************/
|
|
637
|
-
var __webpack_exports__ = {};
|
|
638
|
-
__nested_webpack_require_993__.r(__webpack_exports__);
|
|
639
|
-
/* harmony export */
|
|
640
|
-
__nested_webpack_require_993__.d(__webpack_exports__, {
|
|
641
|
-
/* harmony export */"isEmail": function isEmail() {
|
|
642
|
-
return (/* binding */_isEmail
|
|
643
|
-
);
|
|
644
|
-
},
|
|
645
|
-
/* harmony export */"isEmpty": function isEmpty() {
|
|
646
|
-
return (/* binding */_isEmpty
|
|
647
|
-
);
|
|
648
|
-
},
|
|
649
|
-
/* harmony export */"isInt": function isInt() {
|
|
650
|
-
return (/* binding */_isInt
|
|
651
|
-
);
|
|
652
|
-
},
|
|
653
|
-
/* harmony export */"isJSON": function isJSON() {
|
|
654
|
-
return (/* binding */_isJSON
|
|
655
|
-
);
|
|
656
|
-
},
|
|
657
|
-
/* harmony export */"isMobile": function isMobile() {
|
|
658
|
-
return (/* binding */_isMobile
|
|
659
|
-
);
|
|
660
|
-
},
|
|
661
|
-
/* harmony export */"isNumber": function isNumber() {
|
|
662
|
-
return (/* binding */_isNumber
|
|
663
|
-
);
|
|
664
|
-
},
|
|
665
|
-
/* harmony export */"isTel": function isTel() {
|
|
666
|
-
return (/* binding */_isTel
|
|
667
|
-
);
|
|
668
|
-
},
|
|
669
|
-
/* harmony export */"isValidNumeric": function isValidNumeric() {
|
|
670
|
-
return (/* binding */_isValidNumeric
|
|
671
|
-
);
|
|
672
|
-
}
|
|
673
|
-
/* harmony export */
|
|
674
|
-
});
|
|
675
|
-
function _typeof(obj) {
|
|
676
|
-
"@babel/helpers - typeof";
|
|
677
|
-
|
|
678
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
679
|
-
return typeof obj;
|
|
680
|
-
} : function (obj) {
|
|
681
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
682
|
-
}, _typeof(obj);
|
|
683
|
-
}
|
|
684
|
-
/**
|
|
685
|
-
* Fix And Parse JSON (Support for handling complex escape JSON strings)
|
|
686
|
-
* @desc recursively fix top-level key/value (recursively handles when encountering top-level values that are objects/arrays)
|
|
687
|
-
* @private
|
|
688
|
-
*/
|
|
689
|
-
/*
|
|
690
|
-
- Still prioritize JSON.parse first;
|
|
691
|
-
- After parse fails, do unescaping (\\" → ");
|
|
692
|
-
- Then process the outermost layer (object or array) key by key, value by value;
|
|
693
|
-
- 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;
|
|
694
|
-
- 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);
|
|
695
|
-
- Set MAX_DEPTH to prevent infinite recursion.
|
|
696
|
-
*/
|
|
697
|
-
/*
|
|
698
|
-
@Examples:
|
|
699
|
-
|
|
700
|
-
// ✅ Valid JSON (contains svg and single quote content)
|
|
701
|
-
const okJson = `{
|
|
702
|
-
"label":"<svg width='16' height='16'><path fill='currentColor' d='M19 13h-6'/></svg> 新建会话",
|
|
703
|
-
"value":"new",
|
|
704
|
-
"onClick":"method.setVal(''); method.clearData();"
|
|
705
|
-
}`;
|
|
706
|
-
|
|
707
|
-
const okJson2 = `{
|
|
708
|
-
label:"<svg width='16' height='16'><path fill='currentColor' d='M19 13h-6'/></svg> 新建会话",
|
|
709
|
-
value:"new",
|
|
710
|
-
onClick:"method.setVal(''); method.clearData();"
|
|
711
|
-
}`;
|
|
712
|
-
|
|
713
|
-
// ⚠️ Single quote JSON
|
|
714
|
-
const badJson = "{'model':'{model}','messages':[{'role':'user','content':'{message}'}],'stream': true}";
|
|
715
|
-
|
|
716
|
-
// ⚠️ Escaped JSON
|
|
717
|
-
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();\\\"}";
|
|
718
|
-
|
|
719
|
-
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();\"}";
|
|
720
|
-
|
|
721
|
-
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}]";
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
// ❌ Invalid JSON with missing } or ]
|
|
725
|
-
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}'";
|
|
726
|
-
|
|
727
|
-
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}'}";
|
|
728
|
-
|
|
729
|
-
// ❌ Invalid JSON with missing quotes
|
|
730
|
-
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}'}";
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
console.log('okJson =>', fixAndParseJSON(okJson)); // Can parse normally success = true
|
|
735
|
-
console.log('okJson =>', fixAndParseJSON(okJson2)); // Can parse normally success = true
|
|
736
|
-
console.log('badJson =>', fixAndParseJSON(badJson)); // Can parse after fixing success = true
|
|
737
|
-
console.log('badJson =>', fixAndParseJSON(badJson2)); // Can parse after fixing success = true
|
|
738
|
-
console.log('badJson =>', fixAndParseJSON(badJson3)); // Can parse after fixing success = true
|
|
739
|
-
console.log('badJson =>', fixAndParseJSON(badJson4)); // Can parse after fixing success = true
|
|
740
|
-
console.log('errorJson =>', fixAndParseJSON(errorJson001)); // {success: false, error: 'Invalid JSON format', details: 'Invalid object: mismatched braces'}
|
|
741
|
-
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)"}
|
|
742
|
-
console.log('errorJson =>', fixAndParseJSON(errorJson003)); // {success: false, error: 'Invalid JSON format', details: 'Invalid object: mismatched braces'}
|
|
743
|
-
|
|
744
|
-
*/
|
|
745
|
-
|
|
746
|
-
// Type definitions
|
|
747
|
-
|
|
748
|
-
function fixAndParseJSON(input) {
|
|
749
|
-
var MAX_DEPTH = 6;
|
|
750
|
-
|
|
751
|
-
// 1. Quick attempt
|
|
752
|
-
try {
|
|
753
|
-
return {
|
|
754
|
-
success: true,
|
|
755
|
-
data: JSON.parse(input)
|
|
756
|
-
};
|
|
757
|
-
} catch (e) {
|
|
758
|
-
// Continue with fixing
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
// 2. Simple unescaping of escaped \" (common case from pasted JS literals)
|
|
762
|
-
var s = input;
|
|
763
|
-
if (s.includes('\\"')) s = s.replace(/\\"/g, '"');
|
|
764
|
-
s = s.trim();
|
|
765
|
-
try {
|
|
766
|
-
if (s.startsWith('{')) {
|
|
767
|
-
s = processTopObject(s, 0, MAX_DEPTH);
|
|
768
|
-
} else if (s.startsWith('[')) {
|
|
769
|
-
s = processTopArray(s, 0, MAX_DEPTH);
|
|
770
|
-
} else {
|
|
771
|
-
throw new Error('Input is not an object or array');
|
|
772
|
-
}
|
|
773
|
-
return {
|
|
774
|
-
success: true,
|
|
775
|
-
data: JSON.parse(s)
|
|
776
|
-
};
|
|
777
|
-
} catch (err) {
|
|
778
|
-
var error = err instanceof Error ? err : new Error('Unknown error');
|
|
779
|
-
return {
|
|
780
|
-
success: false,
|
|
781
|
-
error: 'Invalid JSON format',
|
|
782
|
-
details: error.message
|
|
783
|
-
};
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
/* ---------- Helper (Recursive) Functions ---------- */
|
|
788
|
-
|
|
789
|
-
function processTopObject(str, depth, MAX_DEPTH) {
|
|
790
|
-
if (depth > MAX_DEPTH) return str;
|
|
791
|
-
str = str.trim();
|
|
792
|
-
|
|
793
|
-
// First check if braces match
|
|
794
|
-
var braceCount = 0;
|
|
795
|
-
var inString = false;
|
|
796
|
-
var escapeNext = false;
|
|
797
|
-
for (var i = 0; i < str.length; i++) {
|
|
798
|
-
var ch = str[i];
|
|
799
|
-
if (escapeNext) {
|
|
800
|
-
escapeNext = false;
|
|
801
|
-
continue;
|
|
802
|
-
}
|
|
803
|
-
if (ch === '\\') {
|
|
804
|
-
escapeNext = true;
|
|
805
|
-
continue;
|
|
806
|
-
}
|
|
807
|
-
if ((ch === '"' || ch === "'") && !escapeNext) {
|
|
808
|
-
inString = !inString;
|
|
809
|
-
continue;
|
|
810
|
-
}
|
|
811
|
-
if (!inString) {
|
|
812
|
-
if (ch === '{') braceCount++;else if (ch === '}') braceCount--;
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
if (braceCount !== 0) {
|
|
816
|
-
throw new Error('Invalid object: mismatched braces');
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
// Ensure both ends are { ... }
|
|
820
|
-
if (!(str.startsWith('{') && str.endsWith('}'))) {
|
|
821
|
-
var f = str.indexOf('{'),
|
|
822
|
-
l = str.lastIndexOf('}');
|
|
823
|
-
if (f === -1 || l === -1 || l <= f) {
|
|
824
|
-
throw new Error('Invalid object format: missing or mismatched braces');
|
|
825
|
-
}
|
|
826
|
-
str = str.slice(f, l + 1);
|
|
827
|
-
}
|
|
828
|
-
var inner = str.slice(1, -1);
|
|
829
|
-
var pairs = splitTopLevel(inner);
|
|
830
|
-
var repairedPairs = pairs.map(function (pair) {
|
|
831
|
-
if (!pair || pair.trim() === '') return '';
|
|
832
|
-
var idx = findTopLevelColon(pair);
|
|
833
|
-
if (idx === -1) {
|
|
834
|
-
return pair; // Non key:value fragment, keep as is (rare case)
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
var rawKey = pair.slice(0, idx).trim();
|
|
838
|
-
var rawVal = pair.slice(idx + 1);
|
|
839
|
-
var keyContent = extractKeyContent(rawKey);
|
|
840
|
-
var keyJson = JSON.stringify(keyContent);
|
|
841
|
-
var repairedValue = repairPossiblyQuotedValue(rawVal, depth + 1, MAX_DEPTH);
|
|
842
|
-
return keyJson + ':' + repairedValue;
|
|
843
|
-
});
|
|
844
|
-
return '{' + repairedPairs.join(',') + '}';
|
|
845
|
-
}
|
|
846
|
-
function processTopArray(str, depth, MAX_DEPTH) {
|
|
847
|
-
if (depth > MAX_DEPTH) return str;
|
|
848
|
-
str = str.trim();
|
|
849
|
-
if (!(str.startsWith('[') && str.endsWith(']'))) {
|
|
850
|
-
var f = str.indexOf('['),
|
|
851
|
-
l = str.lastIndexOf(']');
|
|
852
|
-
if (f === -1 || l === -1 || l <= f) return str;
|
|
853
|
-
str = str.slice(f, l + 1);
|
|
854
|
-
}
|
|
855
|
-
var inner = str.slice(1, -1);
|
|
856
|
-
var elements = splitTopLevel(inner);
|
|
857
|
-
var processed = elements.map(function (el) {
|
|
858
|
-
var t = el.trim();
|
|
859
|
-
if (t === '') return '';
|
|
860
|
-
if (t.startsWith('{')) return processTopObject(t, depth + 1, MAX_DEPTH);
|
|
861
|
-
if (t.startsWith('[')) return processTopArray(t, depth + 1, MAX_DEPTH);
|
|
862
|
-
return repairPossiblyQuotedValue(t, depth + 1, MAX_DEPTH);
|
|
863
|
-
});
|
|
864
|
-
return '[' + processed.join(',') + ']';
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
// If it's a string wrapped in quotes, extract the inner content and JSON.stringify (safe escaping)
|
|
868
|
-
// If it's an object/array literal (not wrapped in quotes), recursively process (treat as new outermost layer)
|
|
869
|
-
// Otherwise return the original fragment directly (numbers/true/false/null or JS expressions)
|
|
870
|
-
function repairPossiblyQuotedValue(rawVal, depth, MAX_DEPTH) {
|
|
871
|
-
var v = rawVal.trim();
|
|
872
|
-
if (v === '') return v;
|
|
873
|
-
if (v[0] === '"' || v[0] === "'") {
|
|
874
|
-
var quote = v[0];
|
|
875
|
-
// Find the last unescaped same quote
|
|
876
|
-
var lastPos = -1;
|
|
877
|
-
for (var i = v.length - 1; i >= 0; i--) {
|
|
878
|
-
if (v[i] === quote) {
|
|
879
|
-
// check escaped
|
|
880
|
-
var bs = 0,
|
|
881
|
-
k = i - 1;
|
|
882
|
-
while (k >= 0 && v[k] === '\\') {
|
|
883
|
-
bs++;
|
|
884
|
-
k--;
|
|
885
|
-
}
|
|
886
|
-
if (bs % 2 === 0) {
|
|
887
|
-
lastPos = i;
|
|
888
|
-
break;
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
var inner = lastPos > 0 ? v.slice(1, lastPos) : v.slice(1);
|
|
893
|
-
return JSON.stringify(inner); // Use JSON.stringify to generate valid JSON string (automatically escape internal quotes, etc.)
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
// If it's an object or array literal (not wrapped in quotes) -> recursively treat as new outermost layer
|
|
897
|
-
if (v.startsWith('{')) {
|
|
898
|
-
return processTopObject(v, depth, MAX_DEPTH);
|
|
899
|
-
}
|
|
900
|
-
if (v.startsWith('[')) {
|
|
901
|
-
return processTopArray(v, depth, MAX_DEPTH);
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
// Others (numbers, boolean, null, or JS expressions): return as-is
|
|
905
|
-
return v;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
/* --------- Utilities: Split by top-level commas, find top-level colon, extract key --------- */
|
|
909
|
-
|
|
910
|
-
// Split by top-level commas (ignore strings, sub-objects, sub-arrays, commas inside parentheses)
|
|
911
|
-
function splitTopLevel(str) {
|
|
912
|
-
var parts = [];
|
|
913
|
-
var buf = '';
|
|
914
|
-
var depthCurly = 0,
|
|
915
|
-
depthSquare = 0,
|
|
916
|
-
depthParen = 0;
|
|
917
|
-
var inSingle = false,
|
|
918
|
-
inDouble = false,
|
|
919
|
-
esc = false;
|
|
920
|
-
for (var i = 0; i < str.length; i++) {
|
|
921
|
-
var ch = str[i];
|
|
922
|
-
if (esc) {
|
|
923
|
-
buf += ch;
|
|
924
|
-
esc = false;
|
|
925
|
-
continue;
|
|
926
|
-
}
|
|
927
|
-
if (ch === '\\') {
|
|
928
|
-
buf += ch;
|
|
929
|
-
esc = true;
|
|
930
|
-
continue;
|
|
931
|
-
}
|
|
932
|
-
if (ch === "'" && !inDouble) {
|
|
933
|
-
inSingle = !inSingle;
|
|
934
|
-
buf += ch;
|
|
935
|
-
continue;
|
|
936
|
-
}
|
|
937
|
-
if (ch === '"' && !inSingle) {
|
|
938
|
-
inDouble = !inDouble;
|
|
939
|
-
buf += ch;
|
|
940
|
-
continue;
|
|
941
|
-
}
|
|
942
|
-
if (!inSingle && !inDouble) {
|
|
943
|
-
if (ch === '{') {
|
|
944
|
-
depthCurly++;
|
|
945
|
-
buf += ch;
|
|
946
|
-
continue;
|
|
947
|
-
}
|
|
948
|
-
if (ch === '}') {
|
|
949
|
-
depthCurly--;
|
|
950
|
-
buf += ch;
|
|
951
|
-
continue;
|
|
952
|
-
}
|
|
953
|
-
if (ch === '[') {
|
|
954
|
-
depthSquare++;
|
|
955
|
-
buf += ch;
|
|
956
|
-
continue;
|
|
957
|
-
}
|
|
958
|
-
if (ch === ']') {
|
|
959
|
-
depthSquare--;
|
|
960
|
-
buf += ch;
|
|
961
|
-
continue;
|
|
962
|
-
}
|
|
963
|
-
if (ch === '(') {
|
|
964
|
-
depthParen++;
|
|
965
|
-
buf += ch;
|
|
966
|
-
continue;
|
|
967
|
-
}
|
|
968
|
-
if (ch === ')') {
|
|
969
|
-
depthParen--;
|
|
970
|
-
buf += ch;
|
|
971
|
-
continue;
|
|
972
|
-
}
|
|
973
|
-
if (ch === ',' && depthCurly === 0 && depthSquare === 0 && depthParen === 0) {
|
|
974
|
-
parts.push(buf);
|
|
975
|
-
buf = '';
|
|
976
|
-
continue;
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
buf += ch;
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
// Check for unclosed brackets or quotes
|
|
983
|
-
if (depthCurly !== 0 || depthSquare !== 0 || depthParen !== 0 || inSingle || inDouble) {
|
|
984
|
-
throw new Error('Invalid JSON: unclosed brackets or quotes');
|
|
985
|
-
}
|
|
986
|
-
if (buf.trim() !== '') parts.push(buf);
|
|
987
|
-
return parts;
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
// Find the first "top-level" colon index (ignore inside strings & sub-levels)
|
|
991
|
-
function findTopLevelColon(str) {
|
|
992
|
-
var inSingle = false,
|
|
993
|
-
inDouble = false,
|
|
994
|
-
esc = false;
|
|
995
|
-
var depthCurly = 0,
|
|
996
|
-
depthSquare = 0,
|
|
997
|
-
depthParen = 0;
|
|
998
|
-
for (var i = 0; i < str.length; i++) {
|
|
999
|
-
var ch = str[i];
|
|
1000
|
-
if (esc) {
|
|
1001
|
-
esc = false;
|
|
1002
|
-
continue;
|
|
1003
|
-
}
|
|
1004
|
-
if (ch === '\\') {
|
|
1005
|
-
esc = true;
|
|
1006
|
-
continue;
|
|
1007
|
-
}
|
|
1008
|
-
if (ch === "'" && !inDouble) {
|
|
1009
|
-
inSingle = !inSingle;
|
|
1010
|
-
continue;
|
|
1011
|
-
}
|
|
1012
|
-
if (ch === '"' && !inSingle) {
|
|
1013
|
-
inDouble = !inDouble;
|
|
1014
|
-
continue;
|
|
1015
|
-
}
|
|
1016
|
-
if (!inSingle && !inDouble) {
|
|
1017
|
-
if (ch === '{') {
|
|
1018
|
-
depthCurly++;
|
|
1019
|
-
continue;
|
|
1020
|
-
}
|
|
1021
|
-
if (ch === '}') {
|
|
1022
|
-
depthCurly--;
|
|
1023
|
-
continue;
|
|
1024
|
-
}
|
|
1025
|
-
if (ch === '[') {
|
|
1026
|
-
depthSquare++;
|
|
1027
|
-
continue;
|
|
1028
|
-
}
|
|
1029
|
-
if (ch === ']') {
|
|
1030
|
-
depthSquare--;
|
|
1031
|
-
continue;
|
|
1032
|
-
}
|
|
1033
|
-
if (ch === '(') {
|
|
1034
|
-
depthParen++;
|
|
1035
|
-
continue;
|
|
1036
|
-
}
|
|
1037
|
-
if (ch === ')') {
|
|
1038
|
-
depthParen--;
|
|
1039
|
-
continue;
|
|
1040
|
-
}
|
|
1041
|
-
if (ch === ':' && depthCurly === 0 && depthSquare === 0 && depthParen === 0) {
|
|
1042
|
-
return i;
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
return -1;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
// Extract key content (supports "key", 'key', key), returns pure key string
|
|
1050
|
-
function extractKeyContent(rawKey) {
|
|
1051
|
-
var r = rawKey.trim();
|
|
1052
|
-
if (r.startsWith('"') && r.endsWith('"') || r.startsWith("'") && r.endsWith("'")) {
|
|
1053
|
-
var inner = r.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'");
|
|
1054
|
-
return inner;
|
|
1055
|
-
}
|
|
1056
|
-
return r;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
/**
|
|
1060
|
-
* Determine whether it is in JSON format
|
|
1061
|
-
* @private
|
|
1062
|
-
*/
|
|
1063
|
-
function _isJSON(input) {
|
|
1064
|
-
if (typeof input === 'string' && input.length > 0) {
|
|
1065
|
-
return fixAndParseJSON(input).success;
|
|
1066
|
-
} else {
|
|
1067
|
-
if (_typeof(input) === 'object' && Object.prototype.toString.call(input) === '[object Object]' && !input.length) {
|
|
1068
|
-
return true;
|
|
1069
|
-
} else {
|
|
1070
|
-
return false;
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
/**
|
|
1076
|
-
* Check if a string is a valid number
|
|
1077
|
-
* @param str - The string to check
|
|
1078
|
-
* @returns boolean indicating if the string is a valid number
|
|
1079
|
-
*/
|
|
1080
|
-
function _isValidNumeric(str) {
|
|
1081
|
-
if (typeof str !== "string") return false; // we only process strings!
|
|
1082
|
-
if (!isNaN(Number(str)) &&
|
|
1083
|
-
// use type coercion to parse the _entirety_ of the string
|
|
1084
|
-
!isNaN(parseFloat(str)) // ensure strings of whitespace fail
|
|
1085
|
-
) {
|
|
1086
|
-
return true;
|
|
1087
|
-
}
|
|
1088
|
-
return false;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* Check if input is empty
|
|
1093
|
-
* @param input - The input to check (string or array of strings)
|
|
1094
|
-
* @returns boolean indicating if the input is empty
|
|
1095
|
-
*/
|
|
1096
|
-
function _isEmpty(input) {
|
|
1097
|
-
if (Array.isArray(input)) {
|
|
1098
|
-
return input.some(function (str) {
|
|
1099
|
-
return !str.replace(/\s/g, '').length === true;
|
|
1100
|
-
});
|
|
1101
|
-
}
|
|
1102
|
-
return !input.replace(/\s/g, '').length === true;
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* Check if input is a valid number
|
|
1107
|
-
* @param input - The input to check
|
|
1108
|
-
* @returns boolean indicating if the input is a valid number
|
|
1109
|
-
*/
|
|
1110
|
-
function _isNumber(input) {
|
|
1111
|
-
var reg = /^[\d|\.|,]+$/;
|
|
1112
|
-
return reg.test(input);
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
/**
|
|
1116
|
-
* Check if input is a valid integer
|
|
1117
|
-
* @param input - The input to check
|
|
1118
|
-
* @returns boolean indicating if the input is a valid integer
|
|
1119
|
-
*/
|
|
1120
|
-
function _isInt(input) {
|
|
1121
|
-
if (input === "") {
|
|
1122
|
-
return false;
|
|
1123
|
-
}
|
|
1124
|
-
var reg = /\D+/;
|
|
1125
|
-
return !reg.test(input);
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
/**
|
|
1129
|
-
* Check if input is a valid email address
|
|
1130
|
-
* @param input - The input to check
|
|
1131
|
-
* @returns boolean indicating if the input is a valid email
|
|
1132
|
-
*/
|
|
1133
|
-
function _isEmail(input) {
|
|
1134
|
-
var reg = /^\s*([A-Za-z0-9_-]+(\.\w+)*@(\w+\.)+\w{2,3})\s*$/;
|
|
1135
|
-
return reg.test(input);
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
/**
|
|
1139
|
-
* Check if input is a valid telephone number
|
|
1140
|
-
* @param input - The input to check
|
|
1141
|
-
* @returns boolean indicating if the input is a valid telephone number
|
|
1142
|
-
*/
|
|
1143
|
-
function _isTel(input) {
|
|
1144
|
-
var reg = /^[0-9- ]{7,20}$/;
|
|
1145
|
-
return reg.test(input);
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
/**
|
|
1149
|
-
* Check if input is a valid mobile number
|
|
1150
|
-
* @param input - The input to check
|
|
1151
|
-
* @returns boolean indicating if the input is a valid mobile number
|
|
1152
|
-
*/
|
|
1153
|
-
function _isMobile(input) {
|
|
1154
|
-
var reg = /^1[0-9]{10}$/;
|
|
1155
|
-
return reg.test(input);
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
/******/
|
|
1159
|
-
return __webpack_exports__;
|
|
1160
|
-
/******/
|
|
1161
|
-
}()
|
|
1162
|
-
);
|
|
1163
|
-
});
|
|
1164
|
-
|
|
1165
|
-
/***/ }),
|
|
1166
|
-
|
|
1167
|
-
/***/ 787:
|
|
1168
|
-
/***/ ((module) => {
|
|
1169
|
-
|
|
1170
|
-
"use strict";
|
|
1171
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
1172
|
-
|
|
1173
|
-
/***/ })
|
|
1174
|
-
|
|
1175
|
-
/******/ });
|
|
1176
|
-
/************************************************************************/
|
|
1177
|
-
/******/ // The module cache
|
|
1178
|
-
/******/ var __webpack_module_cache__ = {};
|
|
1179
|
-
/******/
|
|
1180
|
-
/******/ // The require function
|
|
1181
|
-
/******/ function __webpack_require__(moduleId) {
|
|
1182
|
-
/******/ // Check if module is in cache
|
|
1183
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
1184
|
-
/******/ if (cachedModule !== undefined) {
|
|
1185
|
-
/******/ return cachedModule.exports;
|
|
1186
|
-
/******/ }
|
|
1187
|
-
/******/ // Create a new module (and put it into the cache)
|
|
1188
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
1189
|
-
/******/ id: moduleId,
|
|
1190
|
-
/******/ loaded: false,
|
|
1191
|
-
/******/ exports: {}
|
|
1192
|
-
/******/ };
|
|
1193
|
-
/******/
|
|
1194
|
-
/******/ // Execute the module function
|
|
1195
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
1196
|
-
/******/
|
|
1197
|
-
/******/ // Flag the module as loaded
|
|
1198
|
-
/******/ module.loaded = true;
|
|
1199
|
-
/******/
|
|
1200
|
-
/******/ // Return the exports of the module
|
|
1201
|
-
/******/ return module.exports;
|
|
1202
|
-
/******/ }
|
|
1203
|
-
/******/
|
|
1204
|
-
/************************************************************************/
|
|
1205
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
1206
|
-
/******/ (() => {
|
|
1207
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
1208
|
-
/******/ __webpack_require__.n = (module) => {
|
|
1209
|
-
/******/ var getter = module && module.__esModule ?
|
|
1210
|
-
/******/ () => (module['default']) :
|
|
1211
|
-
/******/ () => (module);
|
|
1212
|
-
/******/ __webpack_require__.d(getter, { a: getter });
|
|
1213
|
-
/******/ return getter;
|
|
1214
|
-
/******/ };
|
|
1215
|
-
/******/ })();
|
|
1216
|
-
/******/
|
|
1217
|
-
/******/ /* webpack/runtime/define property getters */
|
|
1218
|
-
/******/ (() => {
|
|
1219
|
-
/******/ // define getter functions for harmony exports
|
|
1220
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
1221
|
-
/******/ for(var key in definition) {
|
|
1222
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
1223
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
1224
|
-
/******/ }
|
|
1225
|
-
/******/ }
|
|
1226
|
-
/******/ };
|
|
1227
|
-
/******/ })();
|
|
1228
|
-
/******/
|
|
1229
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1230
|
-
/******/ (() => {
|
|
1231
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
1232
|
-
/******/ })();
|
|
1233
|
-
/******/
|
|
1234
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
1235
|
-
/******/ (() => {
|
|
1236
|
-
/******/ // define __esModule on exports
|
|
1237
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
1238
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
1239
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1240
|
-
/******/ }
|
|
1241
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
1242
|
-
/******/ };
|
|
1243
|
-
/******/ })();
|
|
1244
|
-
/******/
|
|
1245
|
-
/******/ /* webpack/runtime/node module decorator */
|
|
1246
|
-
/******/ (() => {
|
|
1247
|
-
/******/ __webpack_require__.nmd = (module) => {
|
|
1248
|
-
/******/ module.paths = [];
|
|
1249
|
-
/******/ if (!module.children) module.children = [];
|
|
1250
|
-
/******/ return module;
|
|
1251
|
-
/******/ };
|
|
1252
|
-
/******/ })();
|
|
1253
|
-
/******/
|
|
1254
|
-
/************************************************************************/
|
|
1255
|
-
var __webpack_exports__ = {};
|
|
1256
|
-
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
1257
|
-
(() => {
|
|
1258
|
-
"use strict";
|
|
1259
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1260
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1261
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1262
|
-
/* harmony export */ });
|
|
1263
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(787);
|
|
1264
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1265
|
-
/* harmony import */ var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85);
|
|
1266
|
-
/* 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__);
|
|
1267
|
-
/* harmony import */ var funda_utils_dist_cjs_validate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(455);
|
|
1268
|
-
/* 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__);
|
|
1269
|
-
/* harmony import */ var funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(575);
|
|
1270
|
-
/* harmony import */ var funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_3__);
|
|
1271
|
-
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(188);
|
|
1272
|
-
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__);
|
|
1273
|
-
var _excluded = ["contentRef", "wrapperClassName", "controlClassName", "groupWrapperClassName", "groupLabelClassName", "itemSelectedClassName", "tableLayout", "tableLayoutClassName", "tableLayoutCellClassName", "disabled", "required", "defaultValue", "value", "label", "name", "id", "options", "inline", "style", "tabIndex", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onLoad", "onClick", "onChange", "onBlur", "onFocus", "onCallbackListItem"];
|
|
1274
|
-
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; }
|
|
1275
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
1276
|
-
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."); }
|
|
1277
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
1278
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
1279
|
-
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); }
|
|
1280
|
-
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); }
|
|
1281
|
-
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); } }
|
|
1282
|
-
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); }); }; }
|
|
1283
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function (_e2) { function e(_x5) { return _e2.apply(this, arguments); } e.toString = function () { return _e2.toString(); }; return e; }(function (e) { throw e; }), f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function (_e3) { function e(_x6) { return _e3.apply(this, arguments); } e.toString = function () { return _e3.toString(); }; return e; }(function (e) { didErr = true; err = e; }), f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
1284
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
1285
|
-
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."); }
|
|
1286
|
-
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); }
|
|
1287
|
-
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; }
|
|
1288
|
-
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; } }
|
|
1289
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1290
|
-
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; }
|
|
1291
|
-
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; }
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
var Radio = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
|
|
1298
|
-
var contentRef = props.contentRef,
|
|
1299
|
-
wrapperClassName = props.wrapperClassName,
|
|
1300
|
-
controlClassName = props.controlClassName,
|
|
1301
|
-
groupWrapperClassName = props.groupWrapperClassName,
|
|
1302
|
-
groupLabelClassName = props.groupLabelClassName,
|
|
1303
|
-
itemSelectedClassName = props.itemSelectedClassName,
|
|
1304
|
-
tableLayout = props.tableLayout,
|
|
1305
|
-
tableLayoutClassName = props.tableLayoutClassName,
|
|
1306
|
-
tableLayoutCellClassName = props.tableLayoutCellClassName,
|
|
1307
|
-
disabled = props.disabled,
|
|
1308
|
-
required = props.required,
|
|
1309
|
-
defaultValue = props.defaultValue,
|
|
1310
|
-
value = props.value,
|
|
1311
|
-
label = props.label,
|
|
1312
|
-
name = props.name,
|
|
1313
|
-
id = props.id,
|
|
1314
|
-
options = props.options,
|
|
1315
|
-
inline = props.inline,
|
|
1316
|
-
style = props.style,
|
|
1317
|
-
tabIndex = props.tabIndex,
|
|
1318
|
-
fetchFuncAsync = props.fetchFuncAsync,
|
|
1319
|
-
fetchFuncMethod = props.fetchFuncMethod,
|
|
1320
|
-
fetchFuncMethodParams = props.fetchFuncMethodParams,
|
|
1321
|
-
fetchCallback = props.fetchCallback,
|
|
1322
|
-
onFetch = props.onFetch,
|
|
1323
|
-
onLoad = props.onLoad,
|
|
1324
|
-
onClick = props.onClick,
|
|
1325
|
-
onChange = props.onChange,
|
|
1326
|
-
onBlur = props.onBlur,
|
|
1327
|
-
onFocus = props.onFocus,
|
|
1328
|
-
onCallbackListItem = props.onCallbackListItem,
|
|
1329
|
-
attributes = _objectWithoutProperties(props, _excluded);
|
|
1330
|
-
var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default()();
|
|
1331
|
-
var idRes = id || uniqueID;
|
|
1332
|
-
var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1333
|
-
var optionsRes = options ? (0,funda_utils_dist_cjs_validate__WEBPACK_IMPORTED_MODULE_2__.isJSON)(options) ? JSON.parse(options) : options : '';
|
|
1334
|
-
|
|
1335
|
-
// return a array of options
|
|
1336
|
-
var optionsDataInit = optionsRes;
|
|
1337
|
-
var optionsFormatGroupOpt = function optionsFormatGroupOpt(allData) {
|
|
1338
|
-
allData.forEach(function (item) {
|
|
1339
|
-
if (typeof item.optgroup !== 'undefined') {
|
|
1340
|
-
item.value = String(Math.random());
|
|
1341
|
-
}
|
|
1342
|
-
});
|
|
1343
|
-
};
|
|
1344
|
-
var isObject = function isObject(value) {
|
|
1345
|
-
return Object.prototype.toString.call(value) === '[object Object]';
|
|
1346
|
-
};
|
|
1347
|
-
var optionsFlat = function optionsFlat(allData) {
|
|
1348
|
-
var flatItems = [];
|
|
1349
|
-
allData.forEach(function (item) {
|
|
1350
|
-
if (typeof item.optgroup !== 'undefined') {
|
|
1351
|
-
item.optgroup.forEach(function (opt) {
|
|
1352
|
-
flatItems.push(opt);
|
|
1353
|
-
});
|
|
1354
|
-
} else {
|
|
1355
|
-
flatItems.push(item);
|
|
1356
|
-
}
|
|
1357
|
-
});
|
|
1358
|
-
return flatItems;
|
|
1359
|
-
};
|
|
1360
|
-
var finalRes = function finalRes(val) {
|
|
1361
|
-
return isObject(val) ? val.value : val;
|
|
1362
|
-
};
|
|
1363
|
-
|
|
1364
|
-
//
|
|
1365
|
-
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(optionsDataInit),
|
|
1366
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1367
|
-
dataInit = _useState2[0],
|
|
1368
|
-
setDataInit = _useState2[1];
|
|
1369
|
-
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
1370
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
1371
|
-
hasErr = _useState4[0],
|
|
1372
|
-
setHasErr = _useState4[1];
|
|
1373
|
-
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
|
|
1374
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
1375
|
-
controlValue = _useState6[0],
|
|
1376
|
-
setControlValue = _useState6[1];
|
|
1377
|
-
var labelRes = function labelRes(label, id) {
|
|
1378
|
-
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", {
|
|
1379
|
-
htmlFor: id,
|
|
1380
|
-
className: "form-check-label",
|
|
1381
|
-
dangerouslySetInnerHTML: {
|
|
1382
|
-
__html: "".concat(label)
|
|
1383
|
-
}
|
|
1384
|
-
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
|
|
1385
|
-
htmlFor: id,
|
|
1386
|
-
className: "form-check-label"
|
|
1387
|
-
}, label)) : null;
|
|
1388
|
-
};
|
|
1389
|
-
var getAllControls = function getAllControls() {
|
|
1390
|
-
if (rootRef.current === null) return [];
|
|
1391
|
-
return [].slice.call(rootRef.current.querySelectorAll("[type=\"radio\"]"));
|
|
1392
|
-
};
|
|
1393
|
-
|
|
1394
|
-
// exposes the following methods
|
|
1395
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
|
|
1396
|
-
return {
|
|
1397
|
-
control: function control() {
|
|
1398
|
-
return getAllControls();
|
|
1399
|
-
},
|
|
1400
|
-
getLatestVal: function getLatestVal() {
|
|
1401
|
-
return controlValue || '';
|
|
1402
|
-
},
|
|
1403
|
-
clear: function clear(cb) {
|
|
1404
|
-
setControlValue('');
|
|
1405
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
1406
|
-
if (typeof onChange === 'function') {
|
|
1407
|
-
var curData = optionsFlat(dataInit).find(function (v) {
|
|
1408
|
-
return v.value == value;
|
|
1409
|
-
});
|
|
1410
|
-
var _currentIndex = optionsFlat(dataInit).findIndex(function (v) {
|
|
1411
|
-
return v.value == value;
|
|
1412
|
-
});
|
|
1413
|
-
var targetInput = getAllControls().find(function (input) {
|
|
1414
|
-
return input.checked;
|
|
1415
|
-
});
|
|
1416
|
-
onChange(null, '', null, null, typeof targetInput !== 'undefined' ? targetInput : getAllControls()[0]);
|
|
1417
|
-
}
|
|
1418
|
-
},
|
|
1419
|
-
set: function set(value, cb) {
|
|
1420
|
-
setControlValue("".concat(value));
|
|
1421
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
1422
|
-
if (typeof onChange === 'function') {
|
|
1423
|
-
var curData = optionsFlat(dataInit).find(function (v) {
|
|
1424
|
-
return v.value == value;
|
|
1425
|
-
});
|
|
1426
|
-
var _currentIndex2 = optionsFlat(dataInit).findIndex(function (v) {
|
|
1427
|
-
return v.value == value;
|
|
1428
|
-
});
|
|
1429
|
-
var targetInput = getAllControls().find(function (input) {
|
|
1430
|
-
return input.value === value;
|
|
1431
|
-
});
|
|
1432
|
-
onChange(null, "".concat(value), curData, _currentIndex2, typeof targetInput !== 'undefined' ? targetInput : getAllControls()[0]);
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
};
|
|
1436
|
-
}, [dataInit, contentRef, controlValue]);
|
|
1437
|
-
function stringlineToHump(str) {
|
|
1438
|
-
if (typeof str === 'string' && str.length > 0) {
|
|
1439
|
-
var re = /-(\w)/g;
|
|
1440
|
-
str = str.replace(re, function ($0, $1) {
|
|
1441
|
-
return $1.toUpperCase();
|
|
1442
|
-
});
|
|
1443
|
-
return str;
|
|
1444
|
-
} else {
|
|
1445
|
-
return str;
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
function getDataAttributes(node) {
|
|
1449
|
-
if (node === null) return [];
|
|
1450
|
-
var res = {};
|
|
1451
|
-
var _iterator = _createForOfIteratorHelper(node.attributes),
|
|
1452
|
-
_step;
|
|
1453
|
-
try {
|
|
1454
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1455
|
-
var attr = _step.value;
|
|
1456
|
-
if (/^data-/.test(attr.name)) {
|
|
1457
|
-
res[stringlineToHump(attr.name)] = attr.value;
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
} catch (err) {
|
|
1461
|
-
_iterator.e(err);
|
|
1462
|
-
} finally {
|
|
1463
|
-
_iterator.f();
|
|
1464
|
-
}
|
|
1465
|
-
return res;
|
|
1466
|
-
}
|
|
1467
|
-
function fetchData(_x2, _x3, _x4) {
|
|
1468
|
-
return _fetchData.apply(this, arguments);
|
|
1469
|
-
} //
|
|
1470
|
-
function _fetchData() {
|
|
1471
|
-
_fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, valueToInputDefault, inputDefault) {
|
|
1472
|
-
var allControlsData, response, _ORGIN_DATA, _realValue, filterRes, filterResQueryValue, filterResQueryLabel, _realValue2, _filterRes, _filterResQueryValue, _filterResQueryLabel;
|
|
1473
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1474
|
-
while (1) switch (_context.prev = _context.next) {
|
|
1475
|
-
case 0:
|
|
1476
|
-
// set default value
|
|
1477
|
-
if (typeof valueToInputDefault !== 'undefined' && valueToInputDefault !== '') rootRef.current.dataset.value = valueToInputDefault;
|
|
1478
|
-
if (rootRef.current) {
|
|
1479
|
-
allControlsData = [];
|
|
1480
|
-
getAllControls().forEach(function (el, i) {
|
|
1481
|
-
allControlsData.push(getDataAttributes(el));
|
|
1482
|
-
});
|
|
1483
|
-
rootRef.current.setAttribute('data-controls-cus-attrs', JSON.stringify(allControlsData));
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
//
|
|
1487
|
-
if (!(_typeof(fetchFuncAsync) === 'object')) {
|
|
1488
|
-
_context.next = 23;
|
|
1489
|
-
break;
|
|
1490
|
-
}
|
|
1491
|
-
_context.next = 5;
|
|
1492
|
-
return fetchFuncAsync["".concat(fetchFuncMethod)].apply(fetchFuncAsync, _toConsumableArray(params.split(',')));
|
|
1493
|
-
case 5:
|
|
1494
|
-
response = _context.sent;
|
|
1495
|
-
_ORGIN_DATA = response.data; // reset data structure
|
|
1496
|
-
if (typeof fetchCallback === 'function') {
|
|
1497
|
-
_ORGIN_DATA = fetchCallback(_ORGIN_DATA);
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
// Determine whether the data structure matches
|
|
1501
|
-
if (_ORGIN_DATA.length > 0 && typeof _ORGIN_DATA[0].value === 'undefined') {
|
|
1502
|
-
console.warn('The data structure does not match, please refer to the example in the component documentation.');
|
|
1503
|
-
setHasErr(true);
|
|
1504
|
-
_ORGIN_DATA = [];
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
// If the default value is label, match value
|
|
1508
|
-
_realValue = valueToInputDefault;
|
|
1509
|
-
filterRes = [];
|
|
1510
|
-
filterResQueryValue = _ORGIN_DATA.filter(function (item) {
|
|
1511
|
-
return item.value == valueToInputDefault;
|
|
1512
|
-
});
|
|
1513
|
-
filterResQueryLabel = _ORGIN_DATA.filter(function (item) {
|
|
1514
|
-
return item.label == valueToInputDefault;
|
|
1515
|
-
});
|
|
1516
|
-
if (filterResQueryValue.length === 0 && filterResQueryLabel.length > 0) {
|
|
1517
|
-
filterRes = filterResQueryValue;
|
|
1518
|
-
if (filterResQueryValue.length === 0) filterRes = filterResQueryLabel;
|
|
1519
|
-
if (filterRes.length > 0) _realValue = filterRes[0].value;
|
|
1520
|
-
|
|
1521
|
-
// if the default value is Object
|
|
1522
|
-
if (isObject(inputDefault) && filterRes.length === 0) {
|
|
1523
|
-
filterRes = [inputDefault];
|
|
1524
|
-
}
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
// set "<input type="radio">" value
|
|
1528
|
-
setControlValue(_realValue); // value must be initialized
|
|
1529
|
-
|
|
1530
|
-
// remove Duplicate objects from JSON Array
|
|
1531
|
-
optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
|
|
1532
|
-
_ORGIN_DATA = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_3__.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
|
|
1533
|
-
|
|
1534
|
-
//
|
|
1535
|
-
setDataInit(_ORGIN_DATA); // data must be initialized
|
|
1536
|
-
|
|
1537
|
-
//
|
|
1538
|
-
onFetch === null || onFetch === void 0 ? void 0 : onFetch(_ORGIN_DATA);
|
|
1539
|
-
|
|
1540
|
-
//
|
|
1541
|
-
onLoad === null || onLoad === void 0 ? void 0 : onLoad(_ORGIN_DATA, _realValue, rootRef.current);
|
|
1542
|
-
return _context.abrupt("return", _ORGIN_DATA);
|
|
1543
|
-
case 23:
|
|
1544
|
-
// If the default value is label, match value
|
|
1545
|
-
_realValue2 = valueToInputDefault;
|
|
1546
|
-
_filterRes = [];
|
|
1547
|
-
_filterResQueryValue = optionsDataInit.filter(function (item) {
|
|
1548
|
-
return item.value == valueToInputDefault;
|
|
1549
|
-
});
|
|
1550
|
-
_filterResQueryLabel = optionsDataInit.filter(function (item) {
|
|
1551
|
-
return item.label == valueToInputDefault;
|
|
1552
|
-
});
|
|
1553
|
-
if (_filterResQueryValue.length === 0 && _filterResQueryLabel.length > 0) {
|
|
1554
|
-
_filterRes = _filterResQueryValue;
|
|
1555
|
-
if (_filterResQueryValue.length === 0) _filterRes = _filterResQueryLabel;
|
|
1556
|
-
if (_filterRes.length > 0) _realValue2 = _filterRes[0].value;
|
|
1557
|
-
|
|
1558
|
-
// if the default value is Object
|
|
1559
|
-
if (isObject(inputDefault) && _filterRes.length === 0) {
|
|
1560
|
-
_filterRes = [inputDefault];
|
|
1561
|
-
}
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
// set "<input type="radio">" value
|
|
1565
|
-
setControlValue(_realValue2); // value must be initialized
|
|
1566
|
-
|
|
1567
|
-
// remove Duplicate objects from JSON Array
|
|
1568
|
-
optionsFormatGroupOpt(optionsDataInit); // prevent the value from being filtered out
|
|
1569
|
-
optionsDataInit = (0,funda_utils_dist_cjs_object__WEBPACK_IMPORTED_MODULE_3__.removeArrDuplicateItems)(optionsDataInit, 'value');
|
|
1570
|
-
|
|
1571
|
-
//
|
|
1572
|
-
setDataInit(optionsDataInit); // data must be initialized
|
|
1573
|
-
|
|
1574
|
-
//
|
|
1575
|
-
onFetch === null || onFetch === void 0 ? void 0 : onFetch(optionsDataInit);
|
|
1576
|
-
|
|
1577
|
-
//
|
|
1578
|
-
onLoad === null || onLoad === void 0 ? void 0 : onLoad(optionsDataInit, _realValue2, rootRef.current);
|
|
1579
|
-
return _context.abrupt("return", optionsDataInit);
|
|
1580
|
-
case 35:
|
|
1581
|
-
case "end":
|
|
1582
|
-
return _context.stop();
|
|
1583
|
-
}
|
|
1584
|
-
}, _callee);
|
|
1585
|
-
}));
|
|
1586
|
-
return _fetchData.apply(this, arguments);
|
|
1587
|
-
}
|
|
1588
|
-
function handleFocus(event) {
|
|
1589
|
-
var _rootRef$current;
|
|
1590
|
-
(_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.classList.add('focus');
|
|
1591
|
-
|
|
1592
|
-
//
|
|
1593
|
-
onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
|
|
1594
|
-
}
|
|
1595
|
-
function handleChange(event) {
|
|
1596
|
-
var _rootRef$current2;
|
|
1597
|
-
var val = event.target.value;
|
|
1598
|
-
var curData = optionsFlat(dataInit).find(function (v) {
|
|
1599
|
-
return v.value == val;
|
|
1600
|
-
});
|
|
1601
|
-
var currentIndex = event.target.dataset.index;
|
|
1602
|
-
|
|
1603
|
-
//----
|
|
1604
|
-
// update value
|
|
1605
|
-
setControlValue(val);
|
|
1606
|
-
|
|
1607
|
-
//----
|
|
1608
|
-
//remove focus style
|
|
1609
|
-
(_rootRef$current2 = rootRef.current) === null || _rootRef$current2 === void 0 ? void 0 : _rootRef$current2.classList.remove('focus');
|
|
1610
|
-
|
|
1611
|
-
//
|
|
1612
|
-
if (typeof onChange === 'function') {
|
|
1613
|
-
onChange(event, val, curData, currentIndex, event.target);
|
|
1614
|
-
}
|
|
1615
|
-
if (typeof onClick === 'function') {
|
|
1616
|
-
onClick(event, val, curData, currentIndex, event.target);
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
function handleBlur(event) {
|
|
1620
|
-
var _rootRef$current3;
|
|
1621
|
-
//----
|
|
1622
|
-
//remove focus style
|
|
1623
|
-
(_rootRef$current3 = rootRef.current) === null || _rootRef$current3 === void 0 ? void 0 : _rootRef$current3.classList.remove('focus');
|
|
1624
|
-
|
|
1625
|
-
//
|
|
1626
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
// Generate list of options
|
|
1630
|
-
var itemsList = function itemsList(fn) {
|
|
1631
|
-
if (typeof fn === 'function') {
|
|
1632
|
-
return fn === null || fn === void 0 ? void 0 : fn({
|
|
1633
|
-
name: name,
|
|
1634
|
-
dataInit: dataInit,
|
|
1635
|
-
required: required,
|
|
1636
|
-
groupLabelClassName: groupLabelClassName,
|
|
1637
|
-
inline: inline,
|
|
1638
|
-
controlValue: controlValue,
|
|
1639
|
-
itemSelectedClassName: itemSelectedClassName,
|
|
1640
|
-
tabIndex: tabIndex,
|
|
1641
|
-
uniqueID: uniqueID,
|
|
1642
|
-
disabled: disabled,
|
|
1643
|
-
handleChange: handleChange,
|
|
1644
|
-
onClick: onClick,
|
|
1645
|
-
handleFocus: handleFocus,
|
|
1646
|
-
handleBlur: handleBlur,
|
|
1647
|
-
attributes: attributes,
|
|
1648
|
-
style: style,
|
|
1649
|
-
labelRes: labelRes,
|
|
1650
|
-
groupWrapperClassName: groupWrapperClassName,
|
|
1651
|
-
tableLayout: tableLayout,
|
|
1652
|
-
tableLayoutClassName: tableLayoutClassName,
|
|
1653
|
-
tableLayoutCellClassName: tableLayoutCellClassName
|
|
1654
|
-
});
|
|
1655
|
-
}
|
|
1656
|
-
return Array.isArray(dataInit) ? dataInit.map(function (item, index) {
|
|
1657
|
-
var requiredVal = index === 0 ? required || null : null;
|
|
1658
|
-
var _formatItem = {};
|
|
1659
|
-
Object.keys(item).forEach(function (key) {
|
|
1660
|
-
if (key !== 'extends') _formatItem[key] = item[key];
|
|
1661
|
-
});
|
|
1662
|
-
var _groupEl = function _groupEl() {
|
|
1663
|
-
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", {
|
|
1664
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.combinedCls)('radio-group__label', groupLabelClassName)
|
|
1665
|
-
}, item.label), item.optgroup.map(function (opt, optIndex) {
|
|
1666
|
-
var _formatOpt = {};
|
|
1667
|
-
Object.keys(item).forEach(function (key) {
|
|
1668
|
-
if (key !== 'extends') _formatOpt[key] = item[key];
|
|
1669
|
-
});
|
|
1670
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1671
|
-
key: 'option-' + optIndex,
|
|
1672
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.combinedCls)('form-check', controlValue == opt.value ? (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.clsWrite)(itemSelectedClassName, 'item-selected') : undefined, {
|
|
1673
|
-
'form-check-inline': inline
|
|
1674
|
-
})
|
|
1675
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1676
|
-
className: "d-inline-block"
|
|
1677
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
|
|
1678
|
-
ref: function ref(node) {
|
|
1679
|
-
if (externalRef) externalRef.current = getAllControls();
|
|
1680
|
-
},
|
|
1681
|
-
tabIndex: tabIndex || 0,
|
|
1682
|
-
type: "radio",
|
|
1683
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.clsWrite)(controlClassName, 'form-check-input'),
|
|
1684
|
-
id: "field-".concat(uniqueID, "-").concat(index, "-").concat(optIndex),
|
|
1685
|
-
name: name,
|
|
1686
|
-
"data-index": "".concat(index, "-").concat(optIndex),
|
|
1687
|
-
"data-label": opt.label,
|
|
1688
|
-
"data-list-item-label": "".concat(typeof opt.listItemLabel === 'undefined' ? '' : opt.listItemLabel),
|
|
1689
|
-
"data-value": opt.value,
|
|
1690
|
-
"data-disabled": disabled || (typeof opt.disabled !== 'undefined' ? "".concat(opt.disabled) : 'false'),
|
|
1691
|
-
"data-optiondata": JSON.stringify(_formatOpt),
|
|
1692
|
-
value: "".concat(opt.value),
|
|
1693
|
-
required: requiredVal,
|
|
1694
|
-
disabled: disabled || (typeof opt.disabled !== 'undefined' ? opt.disabled : null),
|
|
1695
|
-
onChange: handleChange,
|
|
1696
|
-
onClick: typeof onClick === 'function' ? handleChange : function () {
|
|
1697
|
-
return void 0;
|
|
1698
|
-
},
|
|
1699
|
-
onFocus: handleFocus,
|
|
1700
|
-
onBlur: handleBlur,
|
|
1701
|
-
checked: controlValue == opt.value // component status will not change if defaultChecked is used
|
|
1702
|
-
,
|
|
1703
|
-
style: style
|
|
1704
|
-
}, attributes)), labelRes(typeof opt.listItemLabel === 'undefined' ? opt.label : opt.listItemLabel, "field-".concat(uniqueID, "-").concat(index, "-").concat(optIndex))), 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", {
|
|
1705
|
-
className: "d-inline-block"
|
|
1706
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1707
|
-
className: "form-control-extends__wrapper"
|
|
1708
|
-
}, opt["extends"]))) : null);
|
|
1709
|
-
}));
|
|
1710
|
-
};
|
|
1711
|
-
var _normalEl = function _normalEl() {
|
|
1712
|
-
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", {
|
|
1713
|
-
className: "d-inline-block"
|
|
1714
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
|
|
1715
|
-
ref: function ref(node) {
|
|
1716
|
-
if (externalRef) externalRef.current = getAllControls();
|
|
1717
|
-
},
|
|
1718
|
-
tabIndex: tabIndex || 0,
|
|
1719
|
-
type: "radio",
|
|
1720
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.clsWrite)(controlClassName, 'form-check-input'),
|
|
1721
|
-
id: "field-".concat(uniqueID, "-").concat(index),
|
|
1722
|
-
name: name,
|
|
1723
|
-
"data-index": index,
|
|
1724
|
-
"data-label": item.label,
|
|
1725
|
-
"data-list-item-label": "".concat(typeof item.listItemLabel === 'undefined' ? '' : item.listItemLabel),
|
|
1726
|
-
"data-value": item.value,
|
|
1727
|
-
"data-disabled": disabled || (typeof item.disabled !== 'undefined' ? "".concat(item.disabled) : 'false'),
|
|
1728
|
-
"data-optiondata": JSON.stringify(_formatItem),
|
|
1729
|
-
value: "".concat(item.value),
|
|
1730
|
-
required: requiredVal,
|
|
1731
|
-
disabled: disabled || (typeof item.disabled !== 'undefined' ? item.disabled : null),
|
|
1732
|
-
onChange: handleChange,
|
|
1733
|
-
onClick: typeof onClick === 'function' ? handleChange : function () {
|
|
1734
|
-
return void 0;
|
|
1735
|
-
},
|
|
1736
|
-
onFocus: handleFocus,
|
|
1737
|
-
onBlur: handleBlur,
|
|
1738
|
-
checked: controlValue == item.value // component status will not change if defaultChecked is used
|
|
1739
|
-
,
|
|
1740
|
-
style: style
|
|
1741
|
-
}, attributes)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
|
|
1742
|
-
className: "form-check-label",
|
|
1743
|
-
htmlFor: "field-".concat(uniqueID, "-").concat(index),
|
|
1744
|
-
dangerouslySetInnerHTML: {
|
|
1745
|
-
__html: "".concat(typeof item.listItemLabel === 'undefined' ? item.label : item.listItemLabel)
|
|
1746
|
-
}
|
|
1747
|
-
})), 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", {
|
|
1748
|
-
className: "d-inline-block"
|
|
1749
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1750
|
-
className: "form-control-extends__wrapper"
|
|
1751
|
-
}, item["extends"]))) : null);
|
|
1752
|
-
};
|
|
1753
|
-
if (tableLayout) {
|
|
1754
|
-
/* TABLE LAYOUT */
|
|
1755
|
-
if (typeof item.optgroup !== 'undefined') {
|
|
1756
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
1757
|
-
colSpan: 1,
|
|
1758
|
-
className: "radio-group__wrapper ".concat(groupWrapperClassName || '', " ").concat(tableLayoutCellClassName || ''),
|
|
1759
|
-
key: 'optgroup-' + index,
|
|
1760
|
-
"data-optiondata": JSON.stringify(_formatItem)
|
|
1761
|
-
}, _groupEl());
|
|
1762
|
-
} else {
|
|
1763
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", {
|
|
1764
|
-
colSpan: 1,
|
|
1765
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.combinedCls)('form-check', controlValue == item.value ? (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.clsWrite)(itemSelectedClassName, 'item-selected') : undefined, tableLayoutCellClassName, {
|
|
1766
|
-
'form-check-inline': inline
|
|
1767
|
-
}),
|
|
1768
|
-
key: 'option-' + index,
|
|
1769
|
-
"data-optiondata": JSON.stringify(_formatItem)
|
|
1770
|
-
}, _normalEl());
|
|
1771
|
-
}
|
|
1772
|
-
/* /TABLE LAYOUT */
|
|
1773
|
-
} else {
|
|
1774
|
-
if (typeof item.optgroup !== 'undefined') {
|
|
1775
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1776
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.combinedCls)('radio-group__wrapper', groupWrapperClassName),
|
|
1777
|
-
key: 'optgroup-' + index,
|
|
1778
|
-
"data-optiondata": JSON.stringify(_formatItem)
|
|
1779
|
-
}, _groupEl());
|
|
1780
|
-
} else {
|
|
1781
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1782
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.combinedCls)('form-check', controlValue == item.value ? (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.clsWrite)(itemSelectedClassName, 'item-selected') : undefined, {
|
|
1783
|
-
'form-check-inline': inline
|
|
1784
|
-
}),
|
|
1785
|
-
key: 'option-' + index,
|
|
1786
|
-
"data-optiondata": JSON.stringify(_formatItem)
|
|
1787
|
-
}, _normalEl());
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
}) : null;
|
|
1791
|
-
};
|
|
1792
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1793
|
-
// data init
|
|
1794
|
-
//--------------
|
|
1795
|
-
var _params = fetchFuncMethodParams || [];
|
|
1796
|
-
fetchData(_params.join(','), finalRes(value), value);
|
|
1797
|
-
}, [value, options]);
|
|
1798
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1799
|
-
// update default value (It does not re-render the component because the incoming value changes.)
|
|
1800
|
-
//--------------
|
|
1801
|
-
if (typeof defaultValue !== 'undefined') {
|
|
1802
|
-
//REQUIRED
|
|
1803
|
-
var _params = fetchFuncMethodParams || [];
|
|
1804
|
-
fetchData(_params.join(','), finalRes(defaultValue), defaultValue);
|
|
1805
|
-
}
|
|
1806
|
-
}, []);
|
|
1807
|
-
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", {
|
|
1808
|
-
id: "radio-tablelayout__wrapper-".concat(idRes),
|
|
1809
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.combinedCls)('radio-tablelayout__wrapper', tableLayoutClassName),
|
|
1810
|
-
ref: rootRef
|
|
1811
|
-
}, 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", {
|
|
1812
|
-
dangerouslySetInnerHTML: {
|
|
1813
|
-
__html: "".concat(label)
|
|
1814
|
-
}
|
|
1815
|
-
}) : /*#__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, !hasErr ? itemsList(onCallbackListItem) : null)))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1816
|
-
id: "radio__wrapper-".concat(idRes),
|
|
1817
|
-
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.combinedCls)('radio__wrapper', (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__.clsWrite)(wrapperClassName, 'mb-3 position-relative')),
|
|
1818
|
-
ref: rootRef
|
|
1819
|
-
}, 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", {
|
|
1820
|
-
htmlFor: idRes,
|
|
1821
|
-
className: "form-label",
|
|
1822
|
-
dangerouslySetInnerHTML: {
|
|
1823
|
-
__html: "".concat(label)
|
|
1824
|
-
}
|
|
1825
|
-
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
|
|
1826
|
-
htmlFor: idRes,
|
|
1827
|
-
className: "form-label"
|
|
1828
|
-
}, label)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
1829
|
-
id: idRes
|
|
1830
|
-
}, !hasErr ? itemsList(onCallbackListItem) : null))));
|
|
1831
|
-
});
|
|
1832
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Radio);
|
|
1833
|
-
})();
|
|
1834
|
-
|
|
1835
|
-
/******/ return __webpack_exports__;
|
|
1836
|
-
/******/ })()
|
|
1837
|
-
;
|
|
1838
|
-
});
|