@aloudata/aloudata-design 0.2.5 → 0.3.0-beta.1
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/es/Avatar/index.d.ts +15 -0
- package/es/Avatar/index.js +33 -0
- package/es/Avatar/style/index.d.ts +2 -0
- package/es/Avatar/style/index.js +2 -0
- package/es/Avatar/style/index.less +34 -0
- package/es/Breadcrumb/index.d.ts +8 -0
- package/es/Breadcrumb/index.js +36 -0
- package/es/Breadcrumb/style/index.d.ts +2 -0
- package/es/Breadcrumb/style/index.js +2 -0
- package/es/Breadcrumb/style/index.less +28 -0
- package/es/Button/index.d.ts +4 -4
- package/es/Button/index.js +28 -23
- package/es/Button/style/index.less +158 -125
- package/es/Button/style/variables.less +60 -0
- package/es/Checkbox/style/index.less +16 -1
- package/es/ConfigProvider/index.d.ts +1 -0
- package/es/ConfigProvider/index.js +1 -0
- package/es/Dropdown/Button.js +1 -1
- package/es/Dropdown/style/index.less +41 -8
- package/es/Empty/image/Authority.d.ts +3 -0
- package/es/Empty/image/Authority.js +360 -0
- package/es/Empty/image/Dataspace.d.ts +3 -0
- package/es/Empty/image/Dataspace.js +271 -0
- package/es/Empty/image/Search.d.ts +3 -0
- package/es/Empty/image/Search.js +156 -0
- package/es/Empty/image/Simple.d.ts +3 -0
- package/es/Empty/image/Simple.js +20 -0
- package/es/Empty/image/Worksheet.d.ts +3 -0
- package/es/Empty/image/Worksheet.js +270 -0
- package/es/Empty/image/empty.d.ts +3 -0
- package/es/Empty/image/empty.js +139 -0
- package/es/Empty/index.d.ts +21 -5
- package/es/Empty/index.js +84 -54
- package/es/Empty/style/index.less +56 -11
- package/es/Icon/index.d.ts +2 -2
- package/es/Icon/index.js +10 -2
- package/es/Input/components/Group/index.d.ts +4 -2
- package/es/Input/components/Group/index.js +23 -1
- package/es/Input/components/Input/index.d.ts +1 -1
- package/es/Input/components/Input/index.js +12 -0
- package/es/Input/components/Password/index.d.ts +7 -1
- package/es/Input/components/Password/index.js +25 -3
- package/es/Input/style/index.less +278 -43
- package/es/InputNumber/index.d.ts +4 -0
- package/es/InputNumber/index.js +32 -0
- package/es/InputNumber/style/index.d.ts +2 -0
- package/es/InputNumber/style/index.js +2 -0
- package/es/InputNumber/style/index.less +152 -0
- package/es/Menu/Divider.d.ts +2 -1
- package/es/Menu/MenuItem.d.ts +2 -1
- package/es/Menu/SubMenu.d.ts +2 -1
- package/es/Menu/SubMenu.js +1 -1
- package/es/Menu/index.d.ts +2 -1
- package/es/Menu/style/index.less +0 -1
- package/es/Modal/index.d.ts +21 -0
- package/es/Modal/index.js +93 -0
- package/es/Modal/style/index.d.ts +2 -0
- package/es/Modal/style/index.js +2 -0
- package/es/Modal/style/index.less +206 -0
- package/es/Navigator/components/Header/index.d.ts +9 -0
- package/es/Navigator/components/Header/index.js +18 -0
- package/es/Navigator/components/Menu/index.d.ts +7 -13
- package/es/Navigator/components/Menu/index.js +26 -162
- package/es/Navigator/components/MenuItem/index.d.ts +21 -0
- package/es/Navigator/components/MenuItem/index.js +39 -0
- package/es/Navigator/index.d.ts +19 -8
- package/es/Navigator/index.js +6 -15
- package/es/Navigator/style/bg.png +0 -0
- package/es/Navigator/style/index.less +66 -176
- package/es/Popover/index.d.ts +5 -0
- package/es/Popover/index.js +22 -0
- package/es/Popover/style/index.d.ts +2 -0
- package/es/Popover/style/index.js +2 -0
- package/es/Popover/style/index.less +37 -0
- package/es/Radio/index.d.ts +2 -3
- package/es/Select/index.d.ts +36 -9
- package/es/Select/index.js +154 -7
- package/es/Select/rc-select/BaseSelect.d.ts +116 -0
- package/es/Select/rc-select/BaseSelect.js +641 -0
- package/es/Select/rc-select/OptGroup.d.ts +12 -0
- package/es/Select/{OptionsList → rc-select}/OptGroup.js +1 -0
- package/es/Select/rc-select/Option.d.ts +14 -0
- package/es/Select/{OptionsList/Options.js → rc-select/Option.js} +1 -0
- package/es/Select/rc-select/OptionList.d.ts +10 -0
- package/es/Select/rc-select/OptionList.js +401 -0
- package/es/Select/rc-select/Select.d.ts +109 -0
- package/es/Select/rc-select/Select.js +547 -0
- package/es/Select/rc-select/SelectContext.d.ts +20 -0
- package/es/Select/rc-select/SelectContext.js +4 -0
- package/es/Select/rc-select/SelectTrigger.d.ts +30 -0
- package/es/Select/rc-select/SelectTrigger.js +136 -0
- package/es/Select/rc-select/Selector/Input.d.ts +26 -0
- package/es/Select/rc-select/Selector/Input.js +114 -0
- package/es/Select/rc-select/Selector/MultipleSelector.d.ts +16 -0
- package/es/Select/rc-select/Selector/MultipleSelector.js +236 -0
- package/es/Select/rc-select/Selector/SingleSelector.d.ts +8 -0
- package/es/Select/rc-select/Selector/SingleSelector.js +112 -0
- package/es/Select/rc-select/Selector/index.d.ts +80 -0
- package/es/Select/rc-select/Selector/index.js +194 -0
- package/es/Select/rc-select/TransBtn.d.ts +12 -0
- package/es/Select/rc-select/TransBtn.js +42 -0
- package/es/Select/rc-select/hooks/useBaseProps.d.ts +13 -0
- package/es/Select/rc-select/hooks/useBaseProps.js +11 -0
- package/es/Select/rc-select/hooks/useCache.d.ts +7 -0
- package/es/Select/rc-select/hooks/useCache.js +49 -0
- package/es/Select/rc-select/hooks/useDelayReset.d.ts +5 -0
- package/es/Select/rc-select/hooks/useDelayReset.js +50 -0
- package/es/Select/rc-select/hooks/useFilterOptions.d.ts +3 -0
- package/es/Select/rc-select/hooks/useFilterOptions.js +75 -0
- package/es/Select/rc-select/hooks/useId.d.ts +5 -0
- package/es/Select/rc-select/hooks/useId.js +47 -0
- package/es/Select/rc-select/hooks/useLayoutEffect.d.ts +5 -0
- package/es/Select/rc-select/hooks/useLayoutEffect.js +17 -0
- package/es/Select/rc-select/hooks/useLock.d.ts +7 -0
- package/es/Select/rc-select/hooks/useLock.js +35 -0
- package/es/Select/rc-select/hooks/useOptions.d.ts +11 -0
- package/es/Select/rc-select/hooks/useOptions.js +53 -0
- package/es/Select/rc-select/hooks/useRefFunc.d.ts +5 -0
- package/es/Select/rc-select/hooks/useRefFunc.js +15 -0
- package/es/Select/rc-select/hooks/useSelectTriggerControl.d.ts +1 -0
- package/es/Select/rc-select/hooks/useSelectTriggerControl.js +40 -0
- package/es/Select/rc-select/index.d.ts +10 -0
- package/es/Select/rc-select/index.js +7 -0
- package/es/Select/rc-select/interface.d.ts +10 -0
- package/es/Select/{interface.js → rc-select/interface.js} +0 -0
- package/es/Select/rc-select/utils/commonUtil.d.ts +4 -0
- package/es/Select/rc-select/utils/commonUtil.js +12 -0
- package/es/Select/rc-select/utils/keyUtil.d.ts +2 -0
- package/es/Select/rc-select/utils/keyUtil.js +8 -0
- package/es/Select/rc-select/utils/legacyUtil.d.ts +3 -0
- package/es/Select/rc-select/utils/legacyUtil.js +58 -0
- package/es/Select/rc-select/utils/platformUtil.d.ts +1 -0
- package/es/Select/rc-select/utils/platformUtil.js +4 -0
- package/es/Select/rc-select/utils/valueUtil.d.ts +22 -0
- package/es/Select/rc-select/utils/valueUtil.js +157 -0
- package/es/Select/rc-select/utils/warningPropsUtil.d.ts +3 -0
- package/es/Select/rc-select/utils/warningPropsUtil.js +114 -0
- package/es/Select/style/index.d.ts +2 -0
- package/es/Select/style/index.js +4 -1
- package/es/Select/style/index.less +173 -494
- package/es/Select/style/multiple.less +222 -0
- package/es/Select/style/rtl.less +168 -0
- package/es/Select/style/select.less +337 -0
- package/es/Select/style/single.less +179 -0
- package/es/Select/style/status.less +48 -0
- package/es/Select/style/variables.less +56 -0
- package/es/Select/style/variables.less.d.ts +97 -0
- package/es/Select/utils/iconUtil.d.ts +24 -0
- package/es/Select/utils/iconUtil.js +87 -0
- package/es/Space/index.d.ts +1 -1
- package/es/Space/index.js +0 -1
- package/es/Table/Table.d.ts +6 -0
- package/es/Table/Table.js +464 -0
- package/es/Table/components/Empty/empty-img.png +0 -0
- package/es/Table/components/Empty/index.d.ts +4 -0
- package/es/Table/components/Empty/index.js +16 -0
- package/es/Table/components/Empty/index.less +24 -0
- package/es/Table/index.d.ts +2 -4
- package/es/Table/index.js +2 -463
- package/es/Table/interface.d.ts +11 -15
- package/es/Table/style/index.less +44 -21
- package/es/Tabs/style/index.less +39 -7
- package/es/Tooltip/style/index.less +1 -0
- package/es/index.d.ts +14 -2
- package/es/index.js +7 -1
- package/es/style/index.less +2 -1
- package/es/style/mixins/index.less +8 -0
- package/es/style/themes/default/index.less +1 -1
- package/es/style/themes/default/themeColor.module.less +58 -94
- package/es/style/themes/default/themeColor.module.less.d.ts +1 -17
- package/lib/Avatar/index.d.ts +15 -0
- package/lib/Avatar/index.js +57 -0
- package/lib/Avatar/style/index.d.ts +2 -0
- package/lib/Avatar/style/index.js +5 -0
- package/lib/Avatar/style/index.less +34 -0
- package/lib/Breadcrumb/index.d.ts +8 -0
- package/lib/Breadcrumb/index.js +50 -0
- package/lib/Breadcrumb/style/index.d.ts +2 -0
- package/lib/Breadcrumb/style/index.js +5 -0
- package/lib/Breadcrumb/style/index.less +28 -0
- package/lib/Button/index.d.ts +4 -4
- package/lib/Button/index.js +28 -24
- package/lib/Button/style/index.less +158 -125
- package/lib/Button/style/variables.less +60 -0
- package/lib/Checkbox/style/index.less +16 -1
- package/lib/ConfigProvider/index.d.ts +1 -0
- package/lib/ConfigProvider/index.js +26 -0
- package/lib/Dropdown/Button.js +1 -1
- package/lib/Dropdown/style/index.less +41 -8
- package/lib/Empty/image/Authority.d.ts +3 -0
- package/lib/Empty/image/Authority.js +374 -0
- package/lib/Empty/image/Dataspace.d.ts +3 -0
- package/lib/Empty/image/Dataspace.js +285 -0
- package/lib/Empty/image/Search.d.ts +3 -0
- package/lib/Empty/image/Search.js +170 -0
- package/lib/Empty/image/Simple.d.ts +3 -0
- package/lib/Empty/image/Simple.js +34 -0
- package/lib/Empty/image/Worksheet.d.ts +3 -0
- package/lib/Empty/image/Worksheet.js +284 -0
- package/lib/Empty/image/empty.d.ts +3 -0
- package/lib/Empty/image/empty.js +153 -0
- package/lib/Empty/index.d.ts +21 -5
- package/lib/Empty/index.js +94 -53
- package/lib/Empty/style/index.less +56 -11
- package/lib/Icon/index.d.ts +2 -2
- package/lib/Icon/index.js +10 -2
- package/lib/Input/components/Group/index.d.ts +4 -2
- package/lib/Input/components/Group/index.js +24 -1
- package/lib/Input/components/Input/index.d.ts +1 -1
- package/lib/Input/components/Input/index.js +13 -0
- package/lib/Input/components/Password/index.d.ts +7 -1
- package/lib/Input/components/Password/index.js +25 -2
- package/lib/Input/style/index.less +278 -43
- package/lib/InputNumber/index.d.ts +4 -0
- package/lib/InputNumber/index.js +45 -0
- package/lib/InputNumber/style/index.d.ts +2 -0
- package/lib/InputNumber/style/index.js +5 -0
- package/lib/InputNumber/style/index.less +152 -0
- package/lib/Menu/Divider.d.ts +2 -1
- package/lib/Menu/MenuItem.d.ts +2 -1
- package/lib/Menu/SubMenu.d.ts +2 -1
- package/lib/Menu/SubMenu.js +1 -1
- package/lib/Menu/index.d.ts +2 -1
- package/lib/Menu/style/index.less +0 -1
- package/lib/Modal/index.d.ts +21 -0
- package/lib/Modal/index.js +119 -0
- package/lib/Modal/style/index.d.ts +2 -0
- package/lib/Modal/style/index.js +5 -0
- package/lib/Modal/style/index.less +206 -0
- package/lib/Navigator/components/Header/index.d.ts +9 -0
- package/lib/Navigator/components/Header/index.js +28 -0
- package/lib/Navigator/components/Menu/index.d.ts +7 -13
- package/lib/Navigator/components/Menu/index.js +25 -162
- package/lib/Navigator/components/MenuItem/index.d.ts +21 -0
- package/lib/Navigator/components/MenuItem/index.js +56 -0
- package/lib/Navigator/index.d.ts +19 -8
- package/lib/Navigator/index.js +7 -15
- package/lib/Navigator/style/bg.png +0 -0
- package/lib/Navigator/style/index.less +66 -176
- package/lib/Popover/index.d.ts +5 -0
- package/lib/Popover/index.js +35 -0
- package/lib/Popover/style/index.d.ts +2 -0
- package/lib/Popover/style/index.js +5 -0
- package/lib/Popover/style/index.less +37 -0
- package/lib/Radio/index.d.ts +2 -3
- package/lib/Select/index.d.ts +36 -9
- package/lib/Select/index.js +166 -18
- package/lib/Select/rc-select/BaseSelect.d.ts +116 -0
- package/lib/Select/rc-select/BaseSelect.js +672 -0
- package/lib/Select/rc-select/OptGroup.d.ts +12 -0
- package/lib/Select/{OptionsList → rc-select}/OptGroup.js +1 -0
- package/lib/Select/rc-select/Option.d.ts +14 -0
- package/lib/Select/{OptionsList/Options.js → rc-select/Option.js} +1 -0
- package/lib/Select/rc-select/OptionList.d.ts +10 -0
- package/lib/Select/rc-select/OptionList.js +427 -0
- package/lib/Select/rc-select/Select.d.ts +109 -0
- package/lib/Select/rc-select/Select.js +545 -0
- package/lib/Select/rc-select/SelectContext.d.ts +20 -0
- package/lib/Select/rc-select/SelectContext.js +19 -0
- package/lib/Select/rc-select/SelectTrigger.d.ts +30 -0
- package/lib/Select/rc-select/SelectTrigger.js +153 -0
- package/lib/Select/rc-select/Selector/Input.d.ts +26 -0
- package/lib/Select/rc-select/Selector/Input.js +132 -0
- package/lib/Select/rc-select/Selector/MultipleSelector.d.ts +16 -0
- package/lib/Select/rc-select/Selector/MultipleSelector.js +257 -0
- package/lib/Select/rc-select/Selector/SingleSelector.d.ts +8 -0
- package/lib/Select/rc-select/Selector/SingleSelector.js +129 -0
- package/lib/Select/rc-select/Selector/index.d.ts +80 -0
- package/lib/Select/rc-select/Selector/index.js +203 -0
- package/lib/Select/rc-select/TransBtn.d.ts +12 -0
- package/lib/Select/rc-select/TransBtn.js +59 -0
- package/lib/Select/rc-select/hooks/useBaseProps.d.ts +13 -0
- package/lib/Select/rc-select/hooks/useBaseProps.js +28 -0
- package/lib/Select/rc-select/hooks/useCache.d.ts +7 -0
- package/lib/Select/rc-select/hooks/useCache.js +63 -0
- package/lib/Select/rc-select/hooks/useDelayReset.d.ts +5 -0
- package/lib/Select/rc-select/hooks/useDelayReset.js +62 -0
- package/lib/Select/rc-select/hooks/useFilterOptions.d.ts +3 -0
- package/lib/Select/rc-select/hooks/useFilterOptions.js +91 -0
- package/lib/Select/rc-select/hooks/useId.d.ts +5 -0
- package/lib/Select/rc-select/hooks/useId.js +68 -0
- package/lib/Select/rc-select/hooks/useLayoutEffect.d.ts +5 -0
- package/lib/Select/rc-select/hooks/useLayoutEffect.js +32 -0
- package/lib/Select/rc-select/hooks/useLock.d.ts +7 -0
- package/lib/Select/rc-select/hooks/useLock.js +49 -0
- package/lib/Select/rc-select/hooks/useOptions.d.ts +11 -0
- package/lib/Select/rc-select/hooks/useOptions.js +68 -0
- package/lib/Select/rc-select/hooks/useRefFunc.d.ts +5 -0
- package/lib/Select/rc-select/hooks/useRefFunc.js +29 -0
- package/lib/Select/rc-select/hooks/useSelectTriggerControl.d.ts +1 -0
- package/lib/Select/rc-select/hooks/useSelectTriggerControl.js +54 -0
- package/lib/Select/rc-select/index.d.ts +10 -0
- package/lib/Select/rc-select/index.js +45 -0
- package/lib/Select/rc-select/interface.d.ts +10 -0
- package/lib/Select/{interface.js → rc-select/interface.js} +0 -0
- package/lib/Select/rc-select/utils/commonUtil.d.ts +4 -0
- package/lib/Select/rc-select/utils/commonUtil.js +23 -0
- package/lib/Select/rc-select/utils/keyUtil.d.ts +2 -0
- package/lib/Select/rc-select/utils/keyUtil.js +17 -0
- package/lib/Select/rc-select/utils/legacyUtil.d.ts +3 -0
- package/lib/Select/rc-select/utils/legacyUtil.js +73 -0
- package/lib/Select/rc-select/utils/platformUtil.d.ts +1 -0
- package/lib/Select/rc-select/utils/platformUtil.js +11 -0
- package/lib/Select/rc-select/utils/valueUtil.d.ts +22 -0
- package/lib/Select/rc-select/utils/valueUtil.js +172 -0
- package/lib/Select/rc-select/utils/warningPropsUtil.d.ts +3 -0
- package/lib/Select/rc-select/utils/warningPropsUtil.js +132 -0
- package/lib/Select/style/index.d.ts +2 -0
- package/lib/Select/style/index.js +4 -0
- package/lib/Select/style/index.less +173 -494
- package/lib/Select/style/multiple.less +222 -0
- package/lib/Select/style/rtl.less +168 -0
- package/lib/Select/style/select.less +337 -0
- package/lib/Select/style/single.less +179 -0
- package/lib/Select/style/status.less +48 -0
- package/lib/Select/style/variables.less +56 -0
- package/lib/Select/style/variables.less.d.ts +97 -0
- package/lib/Select/utils/iconUtil.d.ts +24 -0
- package/lib/Select/utils/iconUtil.js +109 -0
- package/lib/Space/index.d.ts +1 -1
- package/lib/Space/index.js +0 -6
- package/lib/Table/Table.d.ts +6 -0
- package/lib/Table/Table.js +491 -0
- package/lib/Table/components/Empty/empty-img.png +0 -0
- package/lib/Table/components/Empty/index.d.ts +4 -0
- package/lib/Table/components/Empty/index.js +30 -0
- package/lib/Table/components/Empty/index.less +24 -0
- package/lib/Table/index.d.ts +2 -4
- package/lib/Table/index.js +2 -478
- package/lib/Table/interface.d.ts +11 -15
- package/lib/Table/style/index.less +44 -21
- package/lib/Tabs/style/index.less +39 -7
- package/lib/Tooltip/style/index.less +1 -0
- package/lib/index.d.ts +14 -2
- package/lib/index.js +48 -0
- package/lib/style/index.less +2 -1
- package/lib/style/mixins/index.less +8 -0
- package/lib/style/themes/default/index.less +1 -1
- package/lib/style/themes/default/themeColor.module.less +58 -94
- package/lib/style/themes/default/themeColor.module.less.d.ts +1 -17
- package/package.json +3 -2
- package/es/Select/BaseSelect.d.ts +0 -5
- package/es/Select/BaseSelect.js +0 -413
- package/es/Select/OptionsList/OptGroup.d.ts +0 -7
- package/es/Select/OptionsList/OptionItem/RenderGroup.d.ts +0 -9
- package/es/Select/OptionsList/OptionItem/RenderGroup.js +0 -16
- package/es/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +0 -10
- package/es/Select/OptionsList/OptionItem/RenderLabelIcon.js +0 -45
- package/es/Select/OptionsList/OptionItem/RenderOption.d.ts +0 -16
- package/es/Select/OptionsList/OptionItem/RenderOption.js +0 -79
- package/es/Select/OptionsList/OptionItem/RenderTooltip.d.ts +0 -8
- package/es/Select/OptionsList/OptionItem/RenderTooltip.js +0 -25
- package/es/Select/OptionsList/OptionItem.d.ts +0 -4
- package/es/Select/OptionsList/OptionItem.js +0 -4
- package/es/Select/OptionsList/Options.d.ts +0 -7
- package/es/Select/OptionsList/index.d.ts +0 -4
- package/es/Select/OptionsList/index.js +0 -176
- package/es/Select/Selector/index.d.ts +0 -4
- package/es/Select/Selector/index.js +0 -252
- package/es/Select/VirtualList.d.ts +0 -5
- package/es/Select/VirtualList.js +0 -29
- package/es/Select/hooks/useCacheOption.d.ts +0 -9
- package/es/Select/hooks/useCacheOption.js +0 -107
- package/es/Select/interface.d.ts +0 -235
- package/es/Select/utils.d.ts +0 -21
- package/es/Select/utils.js +0 -193
- package/lib/Select/BaseSelect.d.ts +0 -5
- package/lib/Select/BaseSelect.js +0 -446
- package/lib/Select/OptionsList/OptGroup.d.ts +0 -7
- package/lib/Select/OptionsList/OptionItem/RenderGroup.d.ts +0 -9
- package/lib/Select/OptionsList/OptionItem/RenderGroup.js +0 -27
- package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +0 -10
- package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.js +0 -60
- package/lib/Select/OptionsList/OptionItem/RenderOption.d.ts +0 -16
- package/lib/Select/OptionsList/OptionItem/RenderOption.js +0 -94
- package/lib/Select/OptionsList/OptionItem/RenderTooltip.d.ts +0 -8
- package/lib/Select/OptionsList/OptionItem/RenderTooltip.js +0 -37
- package/lib/Select/OptionsList/OptionItem.d.ts +0 -4
- package/lib/Select/OptionsList/OptionItem.js +0 -39
- package/lib/Select/OptionsList/Options.d.ts +0 -7
- package/lib/Select/OptionsList/index.d.ts +0 -4
- package/lib/Select/OptionsList/index.js +0 -195
- package/lib/Select/Selector/index.d.ts +0 -4
- package/lib/Select/Selector/index.js +0 -276
- package/lib/Select/VirtualList.d.ts +0 -5
- package/lib/Select/VirtualList.js +0 -42
- package/lib/Select/hooks/useCacheOption.d.ts +0 -9
- package/lib/Select/hooks/useCacheOption.js +0 -113
- package/lib/Select/interface.d.ts +0 -235
- package/lib/Select/utils.d.ts +0 -21
- package/lib/Select/utils.js +0 -233
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ITooltipProps {
|
|
3
|
-
render: JSX.Element & React.ReactNode;
|
|
4
|
-
getContainer?: (node: HTMLElement) => HTMLElement;
|
|
5
|
-
tooltip?: string;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: React.ForwardRefExoticComponent<ITooltipProps & React.RefAttributes<unknown>>;
|
|
8
|
-
export default _default;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _Tooltip = _interopRequireDefault(require("../../../Tooltip"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
var RenderTooltip = function RenderTooltip(props, ref) {
|
|
15
|
-
var tooltip = props.tooltip,
|
|
16
|
-
render = props.render,
|
|
17
|
-
getContainer = props.getContainer;
|
|
18
|
-
|
|
19
|
-
if (tooltip) {
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
-
ref: ref
|
|
22
|
-
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
23
|
-
title: tooltip,
|
|
24
|
-
destroyTooltipOnHide: true,
|
|
25
|
-
placement: "right",
|
|
26
|
-
getTooltipContainer: getContainer
|
|
27
|
-
}, /*#__PURE__*/_react.default.createElement("div", null, render)));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
-
ref: ref
|
|
32
|
-
}, render);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
var _default = /*#__PURE__*/_react.default.forwardRef(RenderTooltip);
|
|
36
|
-
|
|
37
|
-
exports.default = _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { default as ForwardRenderGroup } from './OptionItem/RenderGroup';
|
|
2
|
-
export { default as ForwardRenderOption } from './OptionItem/RenderOption';
|
|
3
|
-
export { default as RenderLabelIcon } from './OptionItem/RenderLabelIcon';
|
|
4
|
-
export { default as ForwardRenderTooltip } from './OptionItem/RenderTooltip';
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "ForwardRenderGroup", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _RenderGroup.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "ForwardRenderOption", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _RenderOption.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "ForwardRenderTooltip", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _RenderTooltip.default;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "RenderLabelIcon", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _RenderLabelIcon.default;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
var _RenderGroup = _interopRequireDefault(require("./OptionItem/RenderGroup"));
|
|
32
|
-
|
|
33
|
-
var _RenderOption = _interopRequireDefault(require("./OptionItem/RenderOption"));
|
|
34
|
-
|
|
35
|
-
var _RenderLabelIcon = _interopRequireDefault(require("./OptionItem/RenderLabelIcon"));
|
|
36
|
-
|
|
37
|
-
var _RenderTooltip = _interopRequireDefault(require("./OptionItem/RenderTooltip"));
|
|
38
|
-
|
|
39
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
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); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
|
-
var _OptionItem = require("./OptionItem");
|
|
15
|
-
|
|
16
|
-
var _excluded = ["input", "prefixCls", "data", "groupStyle", "height", "itemHeight", "selected", "optionChecked", "tempValue", "value", "placeholder", "notFoundContent", "onValueChange", "onTempValueChange", "setTempValue", "onInputChange", "onOptionClick", "activeIndex", "multiple", "visible", "setActiveIndex"];
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
-
|
|
22
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
|
|
24
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
-
|
|
26
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
27
|
-
|
|
28
|
-
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."); }
|
|
29
|
-
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
33
|
-
|
|
34
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
|
-
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; }
|
|
41
|
-
|
|
42
|
-
var ZERO_LENGTH = 0;
|
|
43
|
-
var DEFAULT_ACTIVE_INDEX = -1;
|
|
44
|
-
var DEFAULT_LIST_HEIGHT = 256;
|
|
45
|
-
var DEFAULT_LIST_PADDING = 8;
|
|
46
|
-
|
|
47
|
-
var OptionsList = function OptionsList(props, ref) {
|
|
48
|
-
var input = props.input,
|
|
49
|
-
prefixCls = props.prefixCls,
|
|
50
|
-
data = props.data,
|
|
51
|
-
groupStyle = props.groupStyle,
|
|
52
|
-
_props$height = props.height,
|
|
53
|
-
height = _props$height === void 0 ? DEFAULT_LIST_HEIGHT : _props$height,
|
|
54
|
-
itemHeight = props.itemHeight,
|
|
55
|
-
selected = props.selected,
|
|
56
|
-
optionChecked = props.optionChecked,
|
|
57
|
-
tempValue = props.tempValue,
|
|
58
|
-
value = props.value,
|
|
59
|
-
placeholder = props.placeholder,
|
|
60
|
-
notFoundContent = props.notFoundContent,
|
|
61
|
-
onValueChange = props.onValueChange,
|
|
62
|
-
onTempValueChange = props.onTempValueChange,
|
|
63
|
-
setTempValue = props.setTempValue,
|
|
64
|
-
onInputChange = props.onInputChange,
|
|
65
|
-
onOptionClick = props.onOptionClick,
|
|
66
|
-
activeIndex = props.activeIndex,
|
|
67
|
-
multiple = props.multiple,
|
|
68
|
-
visible = props.visible,
|
|
69
|
-
setActiveIndex = props.setActiveIndex,
|
|
70
|
-
restProps = _objectWithoutProperties(props, _excluded);
|
|
71
|
-
|
|
72
|
-
var selectAllRef = (0, _react.useRef)(null);
|
|
73
|
-
var OptionListRef = (0, _react.useRef)(null);
|
|
74
|
-
var VirtualListRef = (0, _react.useRef)(null);
|
|
75
|
-
(0, _react.useImperativeHandle)(ref, function () {
|
|
76
|
-
return {
|
|
77
|
-
onConfirm: function onConfirm() {
|
|
78
|
-
_onConfirm();
|
|
79
|
-
},
|
|
80
|
-
onCancel: function onCancel() {
|
|
81
|
-
_onCancel();
|
|
82
|
-
},
|
|
83
|
-
onFocus: function onFocus() {
|
|
84
|
-
var _OptionListRef$curren;
|
|
85
|
-
|
|
86
|
-
OptionListRef === null || OptionListRef === void 0 ? void 0 : (_OptionListRef$curren = OptionListRef.current) === null || _OptionListRef$curren === void 0 ? void 0 : _OptionListRef$curren.focus();
|
|
87
|
-
},
|
|
88
|
-
onBlur: function onBlur() {
|
|
89
|
-
var _OptionListRef$curren2;
|
|
90
|
-
|
|
91
|
-
OptionListRef === null || OptionListRef === void 0 ? void 0 : (_OptionListRef$curren2 = OptionListRef.current) === null || _OptionListRef$curren2 === void 0 ? void 0 : _OptionListRef$curren2.blur();
|
|
92
|
-
},
|
|
93
|
-
scrollIntoView: function scrollIntoView(index, offset) {
|
|
94
|
-
_scrollIntoView(index, offset);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
});
|
|
98
|
-
var filterflattenOptions = (0, _react.useMemo)(function () {
|
|
99
|
-
return data.filter(function (filterOption) {
|
|
100
|
-
return !filterOption.isSelectOptGroup;
|
|
101
|
-
});
|
|
102
|
-
}, [data]); // 有选中值
|
|
103
|
-
|
|
104
|
-
var isChecked = (0, _react.useMemo)(function () {
|
|
105
|
-
return (selected === null || selected === void 0 ? void 0 : selected.length) >= 1;
|
|
106
|
-
}, [selected]); // 部分选中
|
|
107
|
-
// 全部列表选项选中
|
|
108
|
-
|
|
109
|
-
var isAllChecked = isChecked && (selected === null || selected === void 0 ? void 0 : selected.length) === (filterflattenOptions === null || filterflattenOptions === void 0 ? void 0 : filterflattenOptions.length) || (selected === null || selected === void 0 ? void 0 : selected.length) === ZERO_LENGTH; // ”全部“选项是否选中
|
|
110
|
-
|
|
111
|
-
var allOptionChecked = isAllChecked && Array.isArray(optionChecked) && optionChecked.length === ZERO_LENGTH; // 点击全选
|
|
112
|
-
|
|
113
|
-
var onAllClick = (0, _react.useCallback)(function () {
|
|
114
|
-
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(allOptionChecked ? null : filterflattenOptions.reduce(function (prev, curr) {
|
|
115
|
-
return [].concat(_toConsumableArray(prev), [curr.value]);
|
|
116
|
-
}, []));
|
|
117
|
-
}, [allOptionChecked, filterflattenOptions, onValueChange]);
|
|
118
|
-
(0, _react.useEffect)(function () {
|
|
119
|
-
if (!visible && !allOptionChecked && multiple && Array.isArray(selected) && selected.length === (filterflattenOptions === null || filterflattenOptions === void 0 ? void 0 : filterflattenOptions.length)) {
|
|
120
|
-
onAllClick();
|
|
121
|
-
}
|
|
122
|
-
}, [visible, selected, multiple, filterflattenOptions, onAllClick, allOptionChecked]);
|
|
123
|
-
var onSingleOptionClick = (0, _react.useCallback)(function (selectedValue) {
|
|
124
|
-
onOptionClick === null || onOptionClick === void 0 ? void 0 : onOptionClick(selectedValue);
|
|
125
|
-
}, [onOptionClick]);
|
|
126
|
-
|
|
127
|
-
var _onConfirm = (0, _react.useCallback)(function () {
|
|
128
|
-
return onTempValueChange(tempValue);
|
|
129
|
-
}, [onTempValueChange, tempValue]);
|
|
130
|
-
|
|
131
|
-
var _onCancel = (0, _react.useCallback)(function () {
|
|
132
|
-
return onTempValueChange([]);
|
|
133
|
-
}, [onTempValueChange]);
|
|
134
|
-
|
|
135
|
-
var _scrollIntoView = function _scrollIntoView(index, offset) {
|
|
136
|
-
var _VirtualListRef$curre;
|
|
137
|
-
|
|
138
|
-
VirtualListRef === null || VirtualListRef === void 0 ? void 0 : (_VirtualListRef$curre = VirtualListRef.current) === null || _VirtualListRef$curre === void 0 ? void 0 : _VirtualListRef$curre.scrollTo({
|
|
139
|
-
index: index,
|
|
140
|
-
offset: offset
|
|
141
|
-
});
|
|
142
|
-
}; // 渲染”全部“选项
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
var renderAllOptions = function renderAllOptions() {
|
|
146
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
147
|
-
ref: selectAllRef,
|
|
148
|
-
className: (0, _classnames2.default)("".concat(prefixCls, "-list-option-all"), _defineProperty({}, "".concat(prefixCls, "-list-option-all-isSelected"), isChecked)),
|
|
149
|
-
onClick: function onClick(e) {
|
|
150
|
-
e.stopPropagation();
|
|
151
|
-
onAllClick();
|
|
152
|
-
},
|
|
153
|
-
"aria-hidden": "true"
|
|
154
|
-
}, /*#__PURE__*/_react.default.createElement(_OptionItem.RenderLabelIcon, {
|
|
155
|
-
isSelected: allOptionChecked,
|
|
156
|
-
multiple: true,
|
|
157
|
-
prefixCls: prefixCls
|
|
158
|
-
}), "\u5168\u90E8");
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
162
|
-
className: "".concat(prefixCls, "-list"),
|
|
163
|
-
style: {
|
|
164
|
-
maxHeight: "".concat(height - DEFAULT_LIST_PADDING, "px")
|
|
165
|
-
},
|
|
166
|
-
ref: OptionListRef,
|
|
167
|
-
role: "list",
|
|
168
|
-
"aria-hidden": "true",
|
|
169
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
170
|
-
tabIndex: 0,
|
|
171
|
-
onMouseLeave: function onMouseLeave() {
|
|
172
|
-
return setActiveIndex(DEFAULT_ACTIVE_INDEX);
|
|
173
|
-
}
|
|
174
|
-
}, multiple && renderAllOptions(), data.length > ZERO_LENGTH ? data.map(function (option, index) {
|
|
175
|
-
return /*#__PURE__*/_react.default.createElement(_OptionItem.ForwardRenderTooltip, {
|
|
176
|
-
tooltip: option === null || option === void 0 ? void 0 : option.tooltip,
|
|
177
|
-
key: option === null || option === void 0 ? void 0 : option.value,
|
|
178
|
-
render: /*#__PURE__*/_react.default.createElement(_OptionItem.ForwardRenderOption, Object.assign({
|
|
179
|
-
option: option,
|
|
180
|
-
prefixCls: prefixCls,
|
|
181
|
-
selected: optionChecked,
|
|
182
|
-
index: index,
|
|
183
|
-
activeIndex: activeIndex,
|
|
184
|
-
multiple: multiple,
|
|
185
|
-
onOptionClick: onSingleOptionClick,
|
|
186
|
-
setActiveIndex: setActiveIndex
|
|
187
|
-
}, restProps))
|
|
188
|
-
});
|
|
189
|
-
}) : notFoundContent);
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
var ForwardRenderOptionList = /*#__PURE__*/_react.default.forwardRef(OptionsList);
|
|
193
|
-
|
|
194
|
-
var _default = ForwardRenderOptionList;
|
|
195
|
-
exports.default = _default;
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
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); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _Icon = _interopRequireDefault(require("../../Icon"));
|
|
11
|
-
|
|
12
|
-
var _classnames3 = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
|
-
var _lodash = require("lodash");
|
|
15
|
-
|
|
16
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
|
|
18
|
-
var _Tooltip = _interopRequireDefault(require("../../Tooltip"));
|
|
19
|
-
|
|
20
|
-
var _rcOverflow = _interopRequireDefault(require("rc-overflow"));
|
|
21
|
-
|
|
22
|
-
var _themeColorModule = _interopRequireDefault(require("../../style/themes/default/themeColor.module.less"));
|
|
23
|
-
|
|
24
|
-
var _excluded = ["input", "disabled", "prefix", "size", "multiple", "bordered", "isFocused", "className", "visible", "style", "allowClear", "label", "mode", "value", "searchType", "arrowComponent", "closeComponent", "placeholder", "deleteValue", "optionLabelRenderer", "getOptionByValue", "onInputChange", "onAllowClear", "filteredOptions"];
|
|
25
|
-
|
|
26
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
-
|
|
28
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
30
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
-
|
|
34
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
35
|
-
|
|
36
|
-
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."); }
|
|
37
|
-
|
|
38
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39
|
-
|
|
40
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
41
|
-
|
|
42
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
-
|
|
44
|
-
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."); }
|
|
45
|
-
|
|
46
|
-
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); }
|
|
47
|
-
|
|
48
|
-
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; }
|
|
49
|
-
|
|
50
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
51
|
-
|
|
52
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
-
|
|
54
|
-
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; }
|
|
55
|
-
|
|
56
|
-
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; }
|
|
57
|
-
|
|
58
|
-
var ZERO = 0;
|
|
59
|
-
var ICON_LARGE_SIZE = 20;
|
|
60
|
-
var ICON_SMALL_SIZE = 16;
|
|
61
|
-
var FIRST_INDEX = 0;
|
|
62
|
-
var REVERSE_INDEX = -1;
|
|
63
|
-
|
|
64
|
-
var defaultArrowComponent = function defaultArrowComponent(prefix, size) {
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
66
|
-
className: "".concat(prefix, "-icon-arrow"),
|
|
67
|
-
size: size === 'large' ? ICON_LARGE_SIZE : ICON_SMALL_SIZE,
|
|
68
|
-
type: "expand_more1",
|
|
69
|
-
color: _themeColorModule.default.NL40
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
var defaultCloseComponent = function defaultCloseComponent(prefix, size) {
|
|
74
|
-
return /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
75
|
-
className: "".concat(prefix, "-icon-close"),
|
|
76
|
-
size: size === 'large' ? ICON_LARGE_SIZE : ICON_SMALL_SIZE,
|
|
77
|
-
type: "cancel",
|
|
78
|
-
color: _themeColorModule.default.NL40
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
var Selector = function Selector(props, ref) {
|
|
83
|
-
var _classnames;
|
|
84
|
-
|
|
85
|
-
var input = props.input,
|
|
86
|
-
disabled = props.disabled,
|
|
87
|
-
prefix = props.prefix,
|
|
88
|
-
size = props.size,
|
|
89
|
-
multiple = props.multiple,
|
|
90
|
-
bordered = props.bordered,
|
|
91
|
-
isFocused = props.isFocused,
|
|
92
|
-
className = props.className,
|
|
93
|
-
visible = props.visible,
|
|
94
|
-
style = props.style,
|
|
95
|
-
allowClear = props.allowClear,
|
|
96
|
-
label = props.label,
|
|
97
|
-
mode = props.mode,
|
|
98
|
-
value = props.value,
|
|
99
|
-
searchType = props.searchType,
|
|
100
|
-
arrowComponent = props.arrowComponent,
|
|
101
|
-
closeComponent = props.closeComponent,
|
|
102
|
-
placeholder = props.placeholder,
|
|
103
|
-
deleteValue = props.deleteValue,
|
|
104
|
-
optionLabelRenderer = props.optionLabelRenderer,
|
|
105
|
-
getOptionByValue = props.getOptionByValue,
|
|
106
|
-
onInputChange = props.onInputChange,
|
|
107
|
-
onAllowClear = props.onAllowClear,
|
|
108
|
-
filteredOptions = props.filteredOptions,
|
|
109
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
110
|
-
|
|
111
|
-
var inputRef = (0, _react.useRef)(null);
|
|
112
|
-
var selectorRef = (0, _react.useRef)(null);
|
|
113
|
-
var selectorAllRef = (0, _react.useRef)(null);
|
|
114
|
-
var selectValuesRef = (0, _react.useRef)(null);
|
|
115
|
-
|
|
116
|
-
var _useState = (0, _react.useState)(false),
|
|
117
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
118
|
-
isHovered = _useState2[0],
|
|
119
|
-
setIsHovered = _useState2[1];
|
|
120
|
-
|
|
121
|
-
var isEmptyValue = (0, _react.useMemo)(function () {
|
|
122
|
-
return !(0, _lodash.isEmpty)(value);
|
|
123
|
-
}, [value]);
|
|
124
|
-
var showClose = allowClear && (isEmptyValue || input) && isHovered && !disabled;
|
|
125
|
-
(0, _react.useImperativeHandle)(ref, function () {
|
|
126
|
-
var _selectorRef$current;
|
|
127
|
-
|
|
128
|
-
return {
|
|
129
|
-
clientWidth: selectorRef === null || selectorRef === void 0 ? void 0 : (_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.clientWidth,
|
|
130
|
-
focus: function focus() {
|
|
131
|
-
var _inputRef$current;
|
|
132
|
-
|
|
133
|
-
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
134
|
-
},
|
|
135
|
-
blur: function blur() {
|
|
136
|
-
var _inputRef$current2;
|
|
137
|
-
|
|
138
|
-
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.blur();
|
|
139
|
-
},
|
|
140
|
-
onBlur: function onBlur() {
|
|
141
|
-
var _selectorRef$current2;
|
|
142
|
-
|
|
143
|
-
selectorRef === null || selectorRef === void 0 ? void 0 : (_selectorRef$current2 = selectorRef.current) === null || _selectorRef$current2 === void 0 ? void 0 : _selectorRef$current2.blur();
|
|
144
|
-
},
|
|
145
|
-
onFocus: function onFocus() {
|
|
146
|
-
var _selectorRef$current3;
|
|
147
|
-
|
|
148
|
-
selectorRef === null || selectorRef === void 0 ? void 0 : (_selectorRef$current3 = selectorRef.current) === null || _selectorRef$current3 === void 0 ? void 0 : _selectorRef$current3.focus();
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
var onMouseEnter = function onMouseEnter() {
|
|
154
|
-
if (allowClear) {
|
|
155
|
-
setIsHovered(true);
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
var onMouseLeave = function onMouseLeave() {
|
|
160
|
-
if (allowClear) {
|
|
161
|
-
setIsHovered(false);
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
var onAllClearClick = function onAllClearClick(e) {
|
|
166
|
-
e.stopPropagation();
|
|
167
|
-
|
|
168
|
-
if (allowClear) {
|
|
169
|
-
onAllowClear();
|
|
170
|
-
}
|
|
171
|
-
}; // ========================== render =======================
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
var renderPlaceHolder = function renderPlaceHolder() {
|
|
175
|
-
if ((0, _lodash.isEmpty)(value) && !input && placeholder) {
|
|
176
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
177
|
-
className: "".concat(prefix, "-item ").concat(prefix, "-placeholder")
|
|
178
|
-
}, placeholder);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
return null;
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
var renderMultipleValue = function renderMultipleValue() {
|
|
185
|
-
// @ts-ignore
|
|
186
|
-
var allTooltipTitleNode = value === null || value === void 0 ? void 0 : value.reduce(function (prev, curr) {
|
|
187
|
-
var item = getOptionByValue(curr);
|
|
188
|
-
|
|
189
|
-
if (item) {
|
|
190
|
-
return [].concat(_toConsumableArray(prev), [(item === null || item === void 0 ? void 0 : item.title) || optionLabelRenderer(curr, getOptionByValue(curr)) || (item === null || item === void 0 ? void 0 : item.label), ',']);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
return [].concat(_toConsumableArray(prev), [curr, ',']);
|
|
194
|
-
}, []);
|
|
195
|
-
|
|
196
|
-
if (Array.isArray(value) && (value.length === filteredOptions.length || (0, _lodash.isEmpty)(value))) {
|
|
197
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
198
|
-
className: "multipleAll"
|
|
199
|
-
}, "\u5168\u90E8");
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
var renderItem = function renderItem(valueItem) {
|
|
203
|
-
return /*#__PURE__*/_react.default.createElement("span", null, optionLabelRenderer(valueItem, getOptionByValue(valueItem)));
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
var renderRest = function renderRest(valueItems) {
|
|
207
|
-
return /*#__PURE__*/_react.default.createElement("span", null, "\u7B49", valueItems.length, "\u9879");
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
return !input && !(0, _lodash.isNil)(value) ? /*#__PURE__*/_react.default.createElement(_Tooltip.default // @ts-ignore
|
|
211
|
-
, {
|
|
212
|
-
// @ts-ignore
|
|
213
|
-
title: allTooltipTitleNode.slice(FIRST_INDEX, REVERSE_INDEX),
|
|
214
|
-
placement: "top",
|
|
215
|
-
getTooltipContainer: function getTooltipContainer() {
|
|
216
|
-
var _selectorRef$current4;
|
|
217
|
-
|
|
218
|
-
return (selectorRef === null || selectorRef === void 0 ? void 0 : (_selectorRef$current4 = selectorRef.current) === null || _selectorRef$current4 === void 0 ? void 0 : _selectorRef$current4.parentElement) || document.body;
|
|
219
|
-
}
|
|
220
|
-
}, /*#__PURE__*/_react.default.createElement(_rcOverflow.default, {
|
|
221
|
-
className: "".concat(prefix, "-item-all"),
|
|
222
|
-
prefixCls: "".concat(prefix, "-overflow"),
|
|
223
|
-
data: value,
|
|
224
|
-
renderItem: renderItem,
|
|
225
|
-
renderRest: renderRest,
|
|
226
|
-
maxCount: "responsive"
|
|
227
|
-
})) : null;
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
var renderSingleValue = function renderSingleValue() {
|
|
231
|
-
var text = optionLabelRenderer(value, getOptionByValue(value));
|
|
232
|
-
return !input && (typeof value === 'string' || typeof value === 'number') ?
|
|
233
|
-
/*#__PURE__*/
|
|
234
|
-
// <Text>
|
|
235
|
-
_react.default.createElement("div", {
|
|
236
|
-
className: (0, _classnames3.default)("".concat(prefix, "-item"))
|
|
237
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
238
|
-
ref: selectorAllRef,
|
|
239
|
-
className: (0, _classnames3.default)("".concat(prefix, "-item-text"))
|
|
240
|
-
}, text)) : // </Text>
|
|
241
|
-
null;
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
return /*#__PURE__*/_react.default.createElement("div", Object.assign({
|
|
245
|
-
role: disabled ? undefined : 'combobox',
|
|
246
|
-
"aria-expanded": visible,
|
|
247
|
-
"aria-controls": "expandable",
|
|
248
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
249
|
-
tabIndex: ZERO,
|
|
250
|
-
className: (0, _classnames3.default)("".concat(prefix), "".concat(prefix, "-").concat(size), (_classnames = {}, _defineProperty(_classnames, "".concat(prefix, "-single"), !multiple), _defineProperty(_classnames, "".concat(prefix, "-bordered"), bordered), _defineProperty(_classnames, "".concat(prefix, "-focused"), isFocused), _defineProperty(_classnames, "".concat(prefix, "-disabled"), disabled), _classnames), className),
|
|
251
|
-
"aria-disabled": disabled,
|
|
252
|
-
"aria-hidden": "true",
|
|
253
|
-
style: style,
|
|
254
|
-
ref: selectorRef
|
|
255
|
-
}, rest), /*#__PURE__*/_react.default.createElement("div", {
|
|
256
|
-
className: "".concat(prefix, "-selector-wrap"),
|
|
257
|
-
onMouseEnter: onMouseEnter,
|
|
258
|
-
onMouseLeave: onMouseLeave
|
|
259
|
-
}, label && /*#__PURE__*/_react.default.createElement("div", {
|
|
260
|
-
className: "".concat(prefix, "-selector-label")
|
|
261
|
-
}, label), /*#__PURE__*/_react.default.createElement("div", {
|
|
262
|
-
className: "".concat(prefix, "-selector")
|
|
263
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
264
|
-
className: (0, _classnames3.default)("".concat(prefix, "-values-wrapper")),
|
|
265
|
-
ref: selectValuesRef
|
|
266
|
-
}, multiple ? renderMultipleValue() : renderSingleValue(), !multiple && renderPlaceHolder())), /*#__PURE__*/_react.default.createElement("div", {
|
|
267
|
-
"aria-hidden": "true",
|
|
268
|
-
className: (0, _classnames3.default)("".concat(prefix, "-arrow"), _defineProperty({}, "".concat(prefix, "-arrow-focused"), visible)),
|
|
269
|
-
onClick: showClose ? onAllClearClick : undefined
|
|
270
|
-
}, showClose ? closeComponent || defaultCloseComponent(prefix, size) : arrowComponent || defaultArrowComponent(prefix, size))));
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
var ForwardSelector = /*#__PURE__*/_react.default.forwardRef(Selector);
|
|
274
|
-
|
|
275
|
-
var _default = ForwardSelector;
|
|
276
|
-
exports.default = _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ListRef, ListProps } from 'rc-virtual-list';
|
|
3
|
-
import { IOption } from './interface';
|
|
4
|
-
declare const RefVirtualList: React.ForwardRefExoticComponent<ListProps<IOption> & React.RefAttributes<ListRef>>;
|
|
5
|
-
export default RefVirtualList;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _rcVirtualList = _interopRequireDefault(require("rc-virtual-list"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
var defaultListRowHeight = 44;
|
|
15
|
-
var defaultListHeight = 520;
|
|
16
|
-
|
|
17
|
-
var VirtualList = function VirtualList(props, ref) {
|
|
18
|
-
var _props$itemHeight = props.itemHeight,
|
|
19
|
-
itemHeight = _props$itemHeight === void 0 ? defaultListRowHeight : _props$itemHeight,
|
|
20
|
-
_props$height = props.height,
|
|
21
|
-
height = _props$height === void 0 ? defaultListHeight : _props$height,
|
|
22
|
-
prefixCls = props.prefixCls,
|
|
23
|
-
children = props.children,
|
|
24
|
-
data = props.data,
|
|
25
|
-
virtual = props.virtual,
|
|
26
|
-
itemKey = props.itemKey;
|
|
27
|
-
return /*#__PURE__*/_react.default.createElement(_rcVirtualList.default, {
|
|
28
|
-
itemKey: itemKey,
|
|
29
|
-
ref: ref,
|
|
30
|
-
itemHeight: itemHeight,
|
|
31
|
-
height: height,
|
|
32
|
-
data: data,
|
|
33
|
-
virtual: virtual,
|
|
34
|
-
prefixCls: "".concat(prefixCls, "-virtual-list"),
|
|
35
|
-
fullHeight: false
|
|
36
|
-
}, children);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
var RefVirtualList = /*#__PURE__*/_react.default.forwardRef(VirtualList);
|
|
40
|
-
|
|
41
|
-
var _default = RefVirtualList;
|
|
42
|
-
exports.default = _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TMaybeArray, IOption } from '../interface';
|
|
2
|
-
export default function useCacheOptions(): {
|
|
3
|
-
setCacheOptions: (options: IOption[]) => void;
|
|
4
|
-
getOptionByValue: (optValue: string | number) => IOption;
|
|
5
|
-
getOptionsByValue: (optValue: TMaybeArray<string | number>) => TMaybeArray<IOption>;
|
|
6
|
-
updateGroup: (value: boolean) => void;
|
|
7
|
-
cacheOptionsMap: Map<any, any>;
|
|
8
|
-
hasGroup: boolean;
|
|
9
|
-
};
|