tntd 2.8.50 → 2.8.51
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/_util/context.js +1 -1
- package/es/_util/defaultRenderEmpty.js +1 -1
- package/es/_util/hooks/useFlexGapSupport.js +4 -4
- package/es/_util/hooks/useForceUpdate.js +4 -4
- package/es/_util/hooks/useScrollLock.js +4 -4
- package/es/_util/responsiveObserve.js +1 -1
- package/es/_util/styleChecker.js +1 -1
- package/es/actions/index.js +1 -1
- package/es/anchor/anchor.js +5 -5
- package/es/array-input/index.js +9 -9
- package/es/check-card/group.js +8 -8
- package/es/check-card/index.js +6 -6
- package/es/checkbox/checkbox-group.js +1 -1
- package/es/color-picker/ColorPicker.js +6 -6
- package/es/color-picker/index.js +1 -1
- package/es/columns/index.js +1 -1
- package/es/config-provider/config-provider.js +1 -1
- package/es/descriptions/descriptions.js +5 -5
- package/es/development-login/LoginModal.js +6 -6
- package/es/development-login/index.js +4 -4
- package/es/drawer/drawer.js +2 -2
- package/es/ellipsis/Svg/CopySVG.js +1 -1
- package/es/ellipsis/Svg/TickSVG.js +1 -1
- package/es/ellipsis/index.js +5 -5
- package/es/empty/empty.js +2 -2
- package/es/empty/empty.stories.js +2 -2
- package/es/exception/exception.js +1 -1
- package/es/form/form.js +2 -2
- package/es/grid-v4/col.js +2 -2
- package/es/grid-v4/hooks/useBreakpoint.js +1 -1
- package/es/grid-v4/index.js +1 -1
- package/es/grid-v4/row.js +6 -6
- package/es/handle/index.js +1 -1
- package/es/handle-icon/index.js +8 -8
- package/es/icon/IconFont.js +1 -1
- package/es/icon/components/Icon.js +9 -9
- package/es/icon/components/index.js +1 -1
- package/es/icon/components/utils.js +3 -3
- package/es/icon/index.js +7 -7
- package/es/icon/twoTonePrimaryColor.js +1 -1
- package/es/icon/utils.js +1 -1
- package/es/img/Contain.js +1 -1
- package/es/img/Cover.js +5 -5
- package/es/img/index.js +5 -5
- package/es/index.js +8 -1
- package/es/index.js.map +1 -1
- package/es/input/input.js +2 -2
- package/es/input-number/index.js +1 -1
- package/es/label/index.js +2 -2
- package/es/loading-button/index.js +5 -5
- package/es/locale/default.js +1 -1
- package/es/locale/en_US.js +1 -1
- package/es/locale/zh_CN.js +1 -1
- package/es/modal/modal.js +1 -1
- package/es/notification/assets/index.js +1 -1
- package/es/notification/index.js +1 -1
- package/es/notification/notification.js +1 -1
- package/es/page/Box.js +1 -1
- package/es/page/index.js +7 -7
- package/es/page-container/index.js +1 -1
- package/es/page-loading/index.js +1 -1
- package/es/prev-locale.js +4 -2
- package/es/prev-locale.js.map +1 -1
- package/es/preview-text/index.js +7 -7
- package/es/query-form/Field/Checkbox.js +1 -1
- package/es/query-form/Field/Select.js +6 -6
- package/es/query-form/Field/SelectInput.js +6 -6
- package/es/query-form/Field/fieldsMap.js +1 -1
- package/es/query-form/Field/index.js +10 -10
- package/es/query-form/createActions.js +1 -1
- package/es/query-form/index.js +10 -10
- package/es/query-form/useForm.js +1 -1
- package/es/query-list-scene/List.js +13 -13
- package/es/query-list-scene/QueryForm.js +10 -10
- package/es/query-list-scene/QueryListScene.js +10 -10
- package/es/query-list-scene/Title.js +1 -1
- package/es/query-list-scene/Toolbar.js +2 -2
- package/es/query-list-scene/createActions.js +1 -1
- package/es/query-list-scene/index.js +1 -1
- package/es/query-list-scene/useActions.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/radio/radio-group.js +1 -1
- package/es/render-empty/render-empty.js +1 -1
- package/es/scroll-bar/Bar.js +5 -5
- package/es/scroll-bar/Context.js +1 -1
- package/es/scroll-bar/ScrollBar.js +1 -1
- package/es/scroll-bar/Thumb.js +5 -5
- package/es/scroll-bar/index.js +1 -1
- package/es/scroll-bar/util.js +1 -1
- package/es/segmented/index.js +2 -2
- package/es/select/select.js +2 -2
- package/es/steps/steps.js +2 -2
- package/es/svg-components/index.js +1 -1
- package/es/switch/switch.js +1 -1
- package/es/table/hooks/use-column-setting.js +4 -4
- package/es/table/hooks/use-expand-fixed.js +6 -6
- package/es/table/resizableTable/index.js +6 -6
- package/es/table/table-hoc.js +1 -1
- package/es/table/table.js +9 -9
- package/es/table/table.stories.js +2 -2
- package/es/table/total-shower.js +1 -1
- package/es/table/utils.js +1 -1
- package/es/table-container/index.js +1 -1
- package/es/tabs-container/index.js +1 -1
- package/es/tag/tag.js +2 -2
- package/es/title/index.js +1 -1
- package/es/tntd-cascader/AntdCascader/component/context.js +1 -1
- package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
- package/es/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
- package/es/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
- package/es/tntd-cascader/AntdCascader/config/utils.js +2 -2
- package/es/tntd-cascader/AntdCascader/index.js +7 -7
- package/es/tntd-cascader/index.js +1 -1
- package/es/tntd-cascader/rc-cascader/Cascader.js +8 -8
- package/es/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
- package/es/tntd-cascader/rc-cascader/OptionList/Column.js +7 -7
- package/es/tntd-cascader/rc-cascader/OptionList/index.js +9 -9
- package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
- package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
- package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
- package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
- package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
- package/es/tntd-cascader/rc-cascader/index.js +1 -1
- package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
- package/es/tntd-checkbox-select/index.js +262 -0
- package/es/tntd-checkbox-select/index.js.map +1 -0
- package/es/tntd-checkbox-select/index.less +62 -0
- package/es/tntd-form/ErrorList.js +7 -7
- package/es/tntd-form/Form.js +6 -6
- package/es/tntd-form/FormItem/ItemHolder.js +6 -6
- package/es/tntd-form/FormItem/index.js +8 -8
- package/es/tntd-form/FormItemInput.js +1 -1
- package/es/tntd-form/FormItemLabel.js +2 -2
- package/es/tntd-form/FormList.js +1 -1
- package/es/tntd-form/context.js +1 -1
- package/es/tntd-form/hooks/useDebounce.js +4 -4
- package/es/tntd-form/hooks/useForm.js +5 -5
- package/es/tntd-form/hooks/useFormItemStatus.js +1 -1
- package/es/tntd-form/hooks/useFrameState.js +5 -5
- package/es/tntd-form/index.js +1 -1
- package/es/tntd-icon/index.js +1 -1
- package/es/tntd-layout/AppList.js +6 -6
- package/es/tntd-layout/Application.js +6 -6
- package/es/tntd-layout/Avatar.js +2 -2
- package/es/tntd-layout/CompatibleLanguage.js +6 -6
- package/es/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
- package/es/tntd-layout/EnterpriseLayout/Language.js +6 -6
- package/es/tntd-layout/EnterpriseLayout/Theme.js +6 -6
- package/es/tntd-layout/EnterpriseLayout/index.js +1 -1
- package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
- package/es/tntd-layout/GlobalNavigation/index.js +9 -9
- package/es/tntd-layout/Header.js +2 -2
- package/es/tntd-layout/HeaderActions.js +2 -2
- package/es/tntd-layout/HeaderNavs.js +6 -6
- package/es/tntd-layout/HeaderTabs.js +7 -7
- package/es/tntd-layout/Iconfont.js +1 -1
- package/es/tntd-layout/Language.js +6 -6
- package/es/tntd-layout/Layout.js +6 -6
- package/es/tntd-layout/Logo.js +2 -2
- package/es/tntd-layout/OrgAppList.js +6 -6
- package/es/tntd-layout/SideMenu.js +6 -6
- package/es/tntd-layout/Theme.js +6 -6
- package/es/tntd-layout/createActions.js +1 -1
- package/es/tntd-layout/images/index.js +1 -1
- package/es/tntd-layout/index.js +1 -1
- package/es/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
- package/es/tntd-layout/paaslayout/Header.js +2 -2
- package/es/tntd-layout/paaslayout/Logo.js +2 -2
- package/es/tntd-layout/paaslayout/SideMenu.js +6 -6
- package/es/tntd-layout/paaslayout/index.js +6 -6
- package/es/tntd-layout/storage.js +1 -1
- package/es/tntd-modal/index.js +6 -6
- package/es/tntd-rc-select/_util/PurePanel.js +5 -5
- package/es/tntd-rc-select/_util/context.js +1 -1
- package/es/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
- package/es/tntd-rc-select/_util/getIcons.js +1 -1
- package/es/tntd-rc-select/_util/useCompactItemContext.js +2 -2
- package/es/tntd-rc-select/index.js +2 -2
- package/es/tntd-rc-select/style/index.less +4 -4
- package/es/tntd-reference/AHref/index.js +1 -1
- package/es/tntd-reference/ReferenceBatchCheck/index.js +1 -1
- package/es/tntd-reference/ReferenceBatchDrawer/index.js +5 -5
- package/es/tntd-reference/ReferenceCheck/index.js +1 -1
- package/es/tntd-reference/ReferenceDrawer/index.js +5 -5
- package/es/tntd-reference/ReferenceInfo/index.js +1 -1
- package/es/tntd-reference/index.js +1 -1
- package/es/tntd-second-page/index.js +1 -1
- package/es/tntd-select/DropDownWrap.js +8 -8
- package/es/tntd-select/index.js +10 -9
- package/es/tntd-virtual-tree/index.js +8 -8
- package/es/tntd-virtual-tree/utils.js +28 -28
- package/es/tntd-virtual-tree-select/index.js +10 -10
- package/es/tntd-virtual-tree-select/utils.js +9 -9
- package/es/tooltip/tooltip.js +1 -1
- package/es/upload/index.js +6 -6
- package/es/upload/svg/UploadSVG.js +1 -1
- package/es/utils/checkAuth.js +4 -4
- package/es/utils/index.js +9 -9
- package/es/utils/lang.js +1 -1
- package/es/water-mark/index.js +5 -5
- package/lib/_util/context.js +3 -3
- package/lib/_util/defaultRenderEmpty.js +3 -3
- package/lib/_util/hooks/useFlexGapSupport.js +14 -15
- package/lib/_util/hooks/useForceUpdate.js +14 -15
- package/lib/_util/hooks/useScrollLock.js +14 -15
- package/lib/_util/responsiveObserve.js +7 -13
- package/lib/_util/styleChecker.js +3 -3
- package/lib/actions/index.js +3 -3
- package/lib/anchor/anchor.js +17 -18
- package/lib/array-input/index.js +30 -37
- package/lib/check-card/group.js +23 -24
- package/lib/check-card/index.js +24 -31
- package/lib/checkbox/checkbox-group.js +3 -3
- package/lib/color-picker/ColorPicker.js +24 -31
- package/lib/color-picker/index.js +3 -3
- package/lib/columns/index.js +3 -3
- package/lib/config-provider/config-provider.js +3 -3
- package/lib/descriptions/descriptions.js +13 -19
- package/lib/development-login/LoginModal.js +24 -31
- package/lib/development-login/index.js +14 -15
- package/lib/drawer/drawer.js +10 -16
- package/lib/ellipsis/Svg/CopySVG.js +3 -3
- package/lib/ellipsis/Svg/TickSVG.js +3 -3
- package/lib/ellipsis/index.js +17 -18
- package/lib/empty/empty.js +10 -16
- package/lib/empty/empty.stories.js +6 -9
- package/lib/exception/exception.js +3 -3
- package/lib/form/form.js +10 -16
- package/lib/grid-v4/col.js +10 -16
- package/lib/grid-v4/hooks/useBreakpoint.js +3 -3
- package/lib/grid-v4/index.js +3 -3
- package/lib/grid-v4/row.js +24 -31
- package/lib/handle/index.js +3 -3
- package/lib/handle-icon/index.js +10 -10
- package/lib/icon/IconFont.js +3 -3
- package/lib/icon/components/Icon.js +44 -70
- package/lib/icon/components/index.js +3 -3
- package/lib/icon/components/utils.js +10 -18
- package/lib/icon/index.js +26 -33
- package/lib/icon/twoTonePrimaryColor.js +3 -3
- package/lib/icon/utils.js +3 -3
- package/lib/img/Contain.js +3 -3
- package/lib/img/Cover.js +17 -18
- package/lib/img/index.js +17 -18
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -3
- package/lib/index.js.map +1 -1
- package/lib/input/input.js +10 -16
- package/lib/input-number/index.js +3 -3
- package/lib/label/index.js +10 -16
- package/lib/loading-button/index.js +17 -18
- package/lib/locale/default.js +3 -3
- package/lib/locale/en_US.js +3 -3
- package/lib/locale/zh_CN.js +3 -3
- package/lib/modal/modal.js +3 -3
- package/lib/notification/assets/index.js +3 -3
- package/lib/notification/index.js +3 -3
- package/lib/notification/notification.js +3 -3
- package/lib/page/Box.js +3 -3
- package/lib/page/index.js +26 -33
- package/lib/page-container/index.js +3 -3
- package/lib/page-loading/index.js +3 -3
- package/lib/prev-locale.d.ts +3 -0
- package/lib/prev-locale.d.ts.map +1 -1
- package/lib/prev-locale.js +4 -2
- package/lib/prev-locale.js.map +1 -1
- package/lib/preview-text/index.js +9 -9
- package/lib/query-form/Field/Checkbox.js +3 -3
- package/lib/query-form/Field/Select.js +24 -31
- package/lib/query-form/Field/SelectInput.js +24 -31
- package/lib/query-form/Field/fieldsMap.js +3 -3
- package/lib/query-form/Field/index.js +47 -73
- package/lib/query-form/createActions.js +3 -3
- package/lib/query-form/index.js +44 -70
- package/lib/query-form/useForm.js +3 -3
- package/lib/query-list-scene/List.js +41 -61
- package/lib/query-list-scene/QueryForm.js +44 -70
- package/lib/query-list-scene/QueryListScene.js +44 -70
- package/lib/query-list-scene/Title.js +3 -3
- package/lib/query-list-scene/Toolbar.js +10 -16
- package/lib/query-list-scene/createActions.js +3 -3
- package/lib/query-list-scene/index.js +3 -3
- package/lib/query-list-scene/useActions.js +3 -3
- package/lib/radio/index.js +3 -3
- package/lib/radio/radio-group.js +3 -3
- package/lib/render-empty/render-empty.js +3 -3
- package/lib/scroll-bar/Bar.js +17 -18
- package/lib/scroll-bar/Context.js +3 -3
- package/lib/scroll-bar/ScrollBar.js +3 -3
- package/lib/scroll-bar/Thumb.js +17 -18
- package/lib/scroll-bar/index.js +3 -3
- package/lib/scroll-bar/util.js +7 -13
- package/lib/segmented/index.js +10 -16
- package/lib/select/select.js +10 -16
- package/lib/steps/steps.js +10 -16
- package/lib/svg-components/index.js +3 -3
- package/lib/switch/switch.js +3 -3
- package/lib/table/hooks/use-column-setting.js +14 -15
- package/lib/table/hooks/use-expand-fixed.js +30 -36
- package/lib/table/resizableTable/index.js +24 -31
- package/lib/table/table-hoc.js +3 -3
- package/lib/table/table.js +27 -34
- package/lib/table/table.stories.js +10 -16
- package/lib/table/total-shower.js +3 -3
- package/lib/table/utils.js +3 -3
- package/lib/table-container/index.js +3 -3
- package/lib/tabs-container/index.js +3 -3
- package/lib/tag/tag.js +10 -16
- package/lib/title/index.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/context.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +10 -16
- package/lib/tntd-cascader/AntdCascader/config/utils.js +10 -16
- package/lib/tntd-cascader/AntdCascader/index.js +26 -33
- package/lib/tntd-cascader/index.js +3 -3
- package/lib/tntd-cascader/rc-cascader/Cascader.js +23 -24
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +10 -16
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +26 -33
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +30 -37
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +17 -18
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +23 -24
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +16 -17
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +3 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +23 -30
- package/lib/tntd-cascader/rc-cascader/index.js +3 -3
- package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +6 -6
- package/lib/tntd-checkbox-select/index.d.ts +11 -0
- package/lib/tntd-checkbox-select/index.d.ts.map +1 -0
- package/lib/tntd-checkbox-select/index.js +347 -0
- package/lib/tntd-checkbox-select/index.js.map +1 -0
- package/lib/tntd-checkbox-select/index.less +62 -0
- package/lib/tntd-form/ErrorList.js +26 -33
- package/lib/tntd-form/Form.js +24 -31
- package/lib/tntd-form/FormItem/ItemHolder.js +24 -31
- package/lib/tntd-form/FormItem/index.js +23 -24
- package/lib/tntd-form/FormItemInput.js +3 -3
- package/lib/tntd-form/FormItemLabel.js +10 -16
- package/lib/tntd-form/FormList.js +3 -3
- package/lib/tntd-form/context.js +3 -3
- package/lib/tntd-form/hooks/useDebounce.js +14 -15
- package/lib/tntd-form/hooks/useForm.js +17 -18
- package/lib/tntd-form/hooks/useFormItemStatus.js +3 -3
- package/lib/tntd-form/hooks/useFrameState.js +17 -18
- package/lib/tntd-form/index.js +3 -3
- package/lib/tntd-icon/index.js +3 -3
- package/lib/tntd-layout/AppList.js +20 -24
- package/lib/tntd-layout/Application.js +20 -24
- package/lib/tntd-layout/Avatar.js +6 -9
- package/lib/tntd-layout/CompatibleLanguage.js +20 -24
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +6 -9
- package/lib/tntd-layout/EnterpriseLayout/Language.js +20 -24
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +20 -24
- package/lib/tntd-layout/EnterpriseLayout/index.js +3 -3
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +20 -24
- package/lib/tntd-layout/GlobalNavigation/index.js +26 -30
- package/lib/tntd-layout/Header.js +6 -9
- package/lib/tntd-layout/HeaderActions.js +6 -9
- package/lib/tntd-layout/HeaderNavs.js +20 -24
- package/lib/tntd-layout/HeaderTabs.js +27 -37
- package/lib/tntd-layout/Iconfont.js +3 -3
- package/lib/tntd-layout/Language.js +20 -24
- package/lib/tntd-layout/Layout.js +20 -24
- package/lib/tntd-layout/Logo.js +6 -9
- package/lib/tntd-layout/OrgAppList.js +20 -24
- package/lib/tntd-layout/SideMenu.js +20 -24
- package/lib/tntd-layout/Theme.js +20 -24
- package/lib/tntd-layout/createActions.js +3 -3
- package/lib/tntd-layout/images/index.js +3 -3
- package/lib/tntd-layout/index.js +3 -3
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +20 -24
- package/lib/tntd-layout/paaslayout/Header.js +6 -9
- package/lib/tntd-layout/paaslayout/Logo.js +6 -9
- package/lib/tntd-layout/paaslayout/SideMenu.js +20 -24
- package/lib/tntd-layout/paaslayout/index.js +20 -24
- package/lib/tntd-layout/storage.js +3 -3
- package/lib/tntd-modal/index.js +24 -31
- package/lib/tntd-rc-select/_util/PurePanel.js +17 -18
- package/lib/tntd-rc-select/_util/context.js +3 -3
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +3 -3
- package/lib/tntd-rc-select/_util/getIcons.js +3 -3
- package/lib/tntd-rc-select/_util/useCompactItemContext.js +10 -16
- package/lib/tntd-rc-select/index.js +10 -16
- package/lib/tntd-rc-select/style/index.less +4 -4
- package/lib/tntd-reference/AHref/index.js +3 -3
- package/lib/tntd-reference/ReferenceBatchCheck/index.js +3 -3
- package/lib/tntd-reference/ReferenceBatchDrawer/index.js +17 -18
- package/lib/tntd-reference/ReferenceCheck/index.js +3 -3
- package/lib/tntd-reference/ReferenceDrawer/index.js +17 -18
- package/lib/tntd-reference/ReferenceInfo/index.js +3 -3
- package/lib/tntd-reference/index.js +3 -3
- package/lib/tntd-second-page/index.js +3 -3
- package/lib/tntd-select/DropDownWrap.js +34 -54
- package/lib/tntd-select/index.js +40 -57
- package/lib/tntd-virtual-tree/index.js +23 -24
- package/lib/tntd-virtual-tree/utils.js +62 -66
- package/lib/tntd-virtual-tree-select/index.js +22 -23
- package/lib/tntd-virtual-tree-select/utils.js +20 -21
- package/lib/tooltip/tooltip.js +3 -3
- package/lib/upload/index.js +41 -45
- package/lib/upload/svg/UploadSVG.js +3 -3
- package/lib/utils/checkAuth.js +6 -6
- package/lib/utils/index.js +20 -21
- package/lib/utils/lang.js +3 -3
- package/lib/water-mark/index.js +17 -18
- package/package.json +1 -1
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) {
|
|
4
|
+
"@babel/helpers - typeof";
|
|
5
|
+
|
|
6
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
+
return typeof o;
|
|
8
|
+
} : function (o) {
|
|
9
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
+
}, _typeof(o);
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
15
|
+
exports["default"] = void 0;
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
var _prevLocale = require("../prev-locale");
|
|
18
|
+
var _rcVirtualList = _interopRequireDefault(require("rc-virtual-list"));
|
|
19
|
+
var _tntdRcSelect = _interopRequireDefault(require("../tntd-rc-select"));
|
|
20
|
+
var _icon = _interopRequireDefault(require("../icon"));
|
|
21
|
+
require("../select");
|
|
22
|
+
var _tag = _interopRequireDefault(require("../tag"));
|
|
23
|
+
var _checkbox = _interopRequireDefault(require("../checkbox"));
|
|
24
|
+
var _empty = _interopRequireDefault(require("../empty"));
|
|
25
|
+
var _ellipsis = _interopRequireDefault(require("../ellipsis"));
|
|
26
|
+
require("./index.less");
|
|
27
|
+
function _interopRequireDefault(e) {
|
|
28
|
+
return e && e.__esModule ? e : {
|
|
29
|
+
"default": e
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function _getRequireWildcardCache(e) {
|
|
33
|
+
if ("function" != typeof WeakMap) return null;
|
|
34
|
+
var r = new WeakMap(),
|
|
35
|
+
t = new WeakMap();
|
|
36
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
37
|
+
return e ? t : r;
|
|
38
|
+
})(e);
|
|
39
|
+
}
|
|
40
|
+
function _interopRequireWildcard(e, r) {
|
|
41
|
+
if (!r && e && e.__esModule) return e;
|
|
42
|
+
if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
|
|
43
|
+
"default": e
|
|
44
|
+
};
|
|
45
|
+
var t = _getRequireWildcardCache(r);
|
|
46
|
+
if (t && t.has(e)) return t.get(e);
|
|
47
|
+
var n = {
|
|
48
|
+
__proto__: null
|
|
49
|
+
},
|
|
50
|
+
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
51
|
+
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
52
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
53
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
54
|
+
}
|
|
55
|
+
return n["default"] = e, t && t.set(e, n), n;
|
|
56
|
+
}
|
|
57
|
+
function _toConsumableArray(r) {
|
|
58
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
59
|
+
}
|
|
60
|
+
function _nonIterableSpread() {
|
|
61
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
62
|
+
}
|
|
63
|
+
function _iterableToArray(r) {
|
|
64
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
65
|
+
}
|
|
66
|
+
function _arrayWithoutHoles(r) {
|
|
67
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
68
|
+
}
|
|
69
|
+
function _slicedToArray(r, e) {
|
|
70
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
71
|
+
}
|
|
72
|
+
function _nonIterableRest() {
|
|
73
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
74
|
+
}
|
|
75
|
+
function _unsupportedIterableToArray(r, a) {
|
|
76
|
+
if (r) {
|
|
77
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
78
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
79
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function _arrayLikeToArray(r, a) {
|
|
83
|
+
(null == a || a > r.length) && (a = r.length);
|
|
84
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
85
|
+
return n;
|
|
86
|
+
}
|
|
87
|
+
function _iterableToArrayLimit(r, l) {
|
|
88
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
89
|
+
if (null != t) {
|
|
90
|
+
var e,
|
|
91
|
+
n,
|
|
92
|
+
i,
|
|
93
|
+
u,
|
|
94
|
+
a = [],
|
|
95
|
+
f = !0,
|
|
96
|
+
o = !1;
|
|
97
|
+
try {
|
|
98
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
99
|
+
if (Object(t) !== t) return;
|
|
100
|
+
f = !1;
|
|
101
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
102
|
+
} catch (r) {
|
|
103
|
+
o = !0, n = r;
|
|
104
|
+
} finally {
|
|
105
|
+
try {
|
|
106
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
107
|
+
} finally {
|
|
108
|
+
if (o) throw n;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return a;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function _arrayWithHoles(r) {
|
|
115
|
+
if (Array.isArray(r)) return r;
|
|
116
|
+
}
|
|
117
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
118
|
+
var t = {};
|
|
119
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
120
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
121
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
122
|
+
}
|
|
123
|
+
return t;
|
|
124
|
+
};
|
|
125
|
+
/*
|
|
126
|
+
* @Descripttion: antd3 select 增加checkbox
|
|
127
|
+
* @Author: 郑泳健
|
|
128
|
+
* @Date: 2025-08-05 10:50:17
|
|
129
|
+
* @LastEditors: 郑泳健
|
|
130
|
+
* @LastEditTime: 2025-08-12 13:46:11
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
var all = (0, _prevLocale.getText)('all', (0, _prevLocale.getLanguage)());
|
|
134
|
+
var TntdCheckboxSelect = function TntdCheckboxSelect(_a) {
|
|
135
|
+
var mode = _a.mode,
|
|
136
|
+
value = _a.value,
|
|
137
|
+
onChange = _a.onChange,
|
|
138
|
+
options = _a.options,
|
|
139
|
+
_a$filterOption = _a.filterOption,
|
|
140
|
+
filterOption = _a$filterOption === void 0 ? function (inputValue, option) {
|
|
141
|
+
var _a;
|
|
142
|
+
return (_a = option === null || option === void 0 ? void 0 : option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase());
|
|
143
|
+
} : _a$filterOption,
|
|
144
|
+
restProps = __rest(_a, ["mode", "value", "onChange", "options", "filterOption"]);
|
|
145
|
+
// 搜索
|
|
146
|
+
var _useState = (0, _react.useState)(undefined),
|
|
147
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
148
|
+
searchValue = _useState2[0],
|
|
149
|
+
setSearchValue = _useState2[1];
|
|
150
|
+
/** 根据搜索过滤,dropDown的渲染数据 */
|
|
151
|
+
var renderData = (0, _react.useMemo)(function () {
|
|
152
|
+
if (!Array.isArray(options)) {
|
|
153
|
+
return [];
|
|
154
|
+
}
|
|
155
|
+
if (['', undefined, null].includes(searchValue)) {
|
|
156
|
+
return options;
|
|
157
|
+
}
|
|
158
|
+
return options.filter(function (item) {
|
|
159
|
+
return filterOption(searchValue, item);
|
|
160
|
+
});
|
|
161
|
+
}, [options, filterOption, searchValue]);
|
|
162
|
+
/** 全选中 */
|
|
163
|
+
var checkedAll = (0, _react.useMemo)(function () {
|
|
164
|
+
if (!Array.isArray(value) || !Array.isArray(value)) {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
// 过滤掉disabled的选中情况
|
|
168
|
+
var filterDisabled = renderData.filter(function (item) {
|
|
169
|
+
return !item.disabled;
|
|
170
|
+
});
|
|
171
|
+
return filterDisabled.every(function (i) {
|
|
172
|
+
return value.includes(i.value);
|
|
173
|
+
});
|
|
174
|
+
}, [value, renderData]);
|
|
175
|
+
/** 半选中 */
|
|
176
|
+
var indeterminate = (0, _react.useMemo)(function () {
|
|
177
|
+
if (!Array.isArray(value) || !Array.isArray(value)) {
|
|
178
|
+
return false;
|
|
179
|
+
} // 过滤掉disabled的选中情况
|
|
180
|
+
var filterDisabled = renderData.filter(function (item) {
|
|
181
|
+
return !item.disabled;
|
|
182
|
+
});
|
|
183
|
+
/** 非disable既有选中的,也有没选中的 */
|
|
184
|
+
return filterDisabled.some(function (i) {
|
|
185
|
+
return value.includes(i.value);
|
|
186
|
+
}) && filterDisabled.some(function (i) {
|
|
187
|
+
return !value.includes(i.value);
|
|
188
|
+
});
|
|
189
|
+
}, [value, renderData]);
|
|
190
|
+
var handleSearch = function handleSearch(val) {
|
|
191
|
+
setSearchValue(val);
|
|
192
|
+
};
|
|
193
|
+
/** 全选情况 */
|
|
194
|
+
var handleAllClick = function handleAllClick(item, checked) {
|
|
195
|
+
// 筛选出非disabled的数组
|
|
196
|
+
var noDisabledChoosedList = Array.isArray(renderData) ? renderData.reduce(function (total, item) {
|
|
197
|
+
if (!item.disabled) {
|
|
198
|
+
total.push(item.value);
|
|
199
|
+
}
|
|
200
|
+
return total;
|
|
201
|
+
}, []) : [];
|
|
202
|
+
if (checked) {
|
|
203
|
+
// 这里加value的原因是有可能是搜索的时候点击了全选
|
|
204
|
+
var list = Array.isArray(value) ? Array.from(new Set([].concat(_toConsumableArray(value), _toConsumableArray(noDisabledChoosedList)))) : _toConsumableArray(noDisabledChoosedList);
|
|
205
|
+
onChange(list);
|
|
206
|
+
} else {
|
|
207
|
+
var _list = Array.isArray(value) ? value.filter(function (i) {
|
|
208
|
+
return !noDisabledChoosedList.includes(i);
|
|
209
|
+
}) : [];
|
|
210
|
+
onChange(_list);
|
|
211
|
+
}
|
|
212
|
+
setSearchValue(undefined);
|
|
213
|
+
};
|
|
214
|
+
var handleClick = function handleClick(item, checked) {
|
|
215
|
+
if (!Array.isArray(value)) {
|
|
216
|
+
value = [];
|
|
217
|
+
}
|
|
218
|
+
if (checked) {
|
|
219
|
+
onChange([].concat(_toConsumableArray(value), [item.value]));
|
|
220
|
+
} else {
|
|
221
|
+
onChange(value.filter(function (v) {
|
|
222
|
+
return v !== item.value;
|
|
223
|
+
}));
|
|
224
|
+
}
|
|
225
|
+
setSearchValue(undefined);
|
|
226
|
+
};
|
|
227
|
+
var handleStopPropagation = function handleStopPropagation(e) {
|
|
228
|
+
var _a;
|
|
229
|
+
(_a = e === null || e === void 0 ? void 0 : e.nativeEvent) === null || _a === void 0 ? void 0 : _a.stopImmediatePropagation();
|
|
230
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
231
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
232
|
+
};
|
|
233
|
+
return _react["default"].createElement(_tntdRcSelect["default"], Object.assign({
|
|
234
|
+
showSearch: true,
|
|
235
|
+
searchValue: searchValue,
|
|
236
|
+
onSearch: handleSearch,
|
|
237
|
+
tagRender: function tagRender(item) {
|
|
238
|
+
var onClose = item.onClose,
|
|
239
|
+
value = item.value;
|
|
240
|
+
var _ref = Array.isArray(options) ? options.find(function (opt) {
|
|
241
|
+
return opt.value === value;
|
|
242
|
+
}) || {} : {},
|
|
243
|
+
label = _ref.label,
|
|
244
|
+
disabled = _ref.disabled;
|
|
245
|
+
return _react["default"].createElement(_tag["default"], {
|
|
246
|
+
size: "small",
|
|
247
|
+
className: "tntd-checkbox-select-item-tag"
|
|
248
|
+
}, _react["default"].createElement("div", {
|
|
249
|
+
className: 'tntd-checkbox-select-item-tag-label'
|
|
250
|
+
}, _react["default"].createElement(_ellipsis["default"], {
|
|
251
|
+
title: label,
|
|
252
|
+
widthLimit: "100%"
|
|
253
|
+
})), !disabled ? _react["default"].createElement(_icon["default"], {
|
|
254
|
+
type: "close",
|
|
255
|
+
onClick: onClose
|
|
256
|
+
}) : '');
|
|
257
|
+
},
|
|
258
|
+
value: value,
|
|
259
|
+
onChange: onChange
|
|
260
|
+
}, restProps, {
|
|
261
|
+
mode: mode || 'multiple',
|
|
262
|
+
dropdownRender: function dropdownRender() {
|
|
263
|
+
if (!Array.isArray(renderData) || !(renderData === null || renderData === void 0 ? void 0 : renderData.length)) {
|
|
264
|
+
return _react["default"].createElement("div", {
|
|
265
|
+
className: "tntd-checkbox-select-dropdown-render-wrapper"
|
|
266
|
+
}, _react["default"].createElement(_empty["default"], {
|
|
267
|
+
className: "tntd-rc-select-item-empty",
|
|
268
|
+
size: "mini"
|
|
269
|
+
}));
|
|
270
|
+
}
|
|
271
|
+
var renderList = [{
|
|
272
|
+
label: all,
|
|
273
|
+
value: 'all',
|
|
274
|
+
isAll: true
|
|
275
|
+
}].concat(_toConsumableArray(renderData));
|
|
276
|
+
return _react["default"].createElement("div", {
|
|
277
|
+
className: "tntd-checkbox-select-dropdown-render-wrapper",
|
|
278
|
+
onClick: function onClick(e) {
|
|
279
|
+
return handleStopPropagation(e);
|
|
280
|
+
}
|
|
281
|
+
}, _react["default"].createElement(_rcVirtualList["default"], {
|
|
282
|
+
height: renderData.length > 8 ? 250 : 'auto',
|
|
283
|
+
itemHeight: 32,
|
|
284
|
+
data: renderList,
|
|
285
|
+
itemKey: 'value'
|
|
286
|
+
}, function (item) {
|
|
287
|
+
var isAll = item.isAll,
|
|
288
|
+
disabled = item.disabled;
|
|
289
|
+
// 是否全部disabled
|
|
290
|
+
var allDisabled = renderData.filter(function (i) {
|
|
291
|
+
return i.disabled;
|
|
292
|
+
}).length === renderData.length;
|
|
293
|
+
var checked = Array.isArray(value) ? value.includes(item.value) : false;
|
|
294
|
+
if (isAll) {
|
|
295
|
+
return _react["default"].createElement("div", {
|
|
296
|
+
className: "tntd-checkbox-select-item ".concat(checkedAll ? 'tntd-checkbox-select-item_choosed' : '', " ").concat(allDisabled ? 'tntd-checkbox-select-item_disabled' : ''),
|
|
297
|
+
onMouseDown: function onMouseDown(e) {
|
|
298
|
+
handleStopPropagation(e);
|
|
299
|
+
},
|
|
300
|
+
onClick: function onClick() {
|
|
301
|
+
if (!allDisabled) {
|
|
302
|
+
handleAllClick(item, !checkedAll);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}, _react["default"].createElement(_checkbox["default"], {
|
|
306
|
+
disabled: allDisabled,
|
|
307
|
+
size: "small",
|
|
308
|
+
indeterminate: indeterminate,
|
|
309
|
+
checked: checkedAll,
|
|
310
|
+
onChange: function onChange(e) {
|
|
311
|
+
handleStopPropagation(e);
|
|
312
|
+
}
|
|
313
|
+
}), _react["default"].createElement("div", {
|
|
314
|
+
className: "tntd-checkbox-select-content"
|
|
315
|
+
}, _react["default"].createElement(_ellipsis["default"], {
|
|
316
|
+
title: item.label,
|
|
317
|
+
widthLimit: "100%"
|
|
318
|
+
})));
|
|
319
|
+
}
|
|
320
|
+
return _react["default"].createElement("div", {
|
|
321
|
+
className: "tntd-checkbox-select-item ".concat(checked ? 'tntd-checkbox-select-item_choosed' : '', " ").concat(disabled ? 'tntd-checkbox-select-item_disabled' : ''),
|
|
322
|
+
onMouseDown: function onMouseDown(e) {
|
|
323
|
+
handleStopPropagation(e);
|
|
324
|
+
},
|
|
325
|
+
onClick: function onClick() {
|
|
326
|
+
if (!disabled) {
|
|
327
|
+
handleClick(item, !checked);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}, _react["default"].createElement(_checkbox["default"], {
|
|
331
|
+
disabled: disabled,
|
|
332
|
+
size: "small",
|
|
333
|
+
checked: checked,
|
|
334
|
+
onChange: function onChange(e) {
|
|
335
|
+
return handleStopPropagation(e);
|
|
336
|
+
}
|
|
337
|
+
}), _react["default"].createElement("div", {
|
|
338
|
+
className: "tntd-checkbox-select-content"
|
|
339
|
+
}, _react["default"].createElement(_ellipsis["default"], {
|
|
340
|
+
title: item.label,
|
|
341
|
+
widthLimit: "100%"
|
|
342
|
+
})));
|
|
343
|
+
}));
|
|
344
|
+
}
|
|
345
|
+
}));
|
|
346
|
+
};
|
|
347
|
+
var _default = exports["default"] = TntdCheckboxSelect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tntd-checkbox-select/index.jsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAiD;AACjD,gDAAsD;AACtD,sEAAmC;AACnC,uEAAuC;AACvC,mDAA2B;AAC3B,qBAAkC;AAClC,iDAAyB;AACzB,2DAAmC;AACnC,qDAA6B;AAC7B,2DAAmC;AACnC,wBAAsB;AAEtB,MAAM,GAAG,GAAG,IAAA,qBAAO,EAAC,KAAK,EAAE,IAAA,yBAAW,GAAE,CAAC,CAAC;AAE1C,MAAM,kBAAkB,GAAG,CAAC,EAS3B,EAAE,EAAE;QATuB,EAC1B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,OAAO,EACP,YAAY,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE;;QACpC,OAAO,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,0CAAE,WAAW,GAAG,QAAQ,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,EAAE,CAAC,CAAC;IAC1E,CAAC,OAEF,EADI,SAAS,cARc,wDAS3B,CADa;IAEZ,KAAK;IACL,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;IAE1D,2BAA2B;IAC3B,MAAM,UAAU,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CA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,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,UAAU,EAAC,MAAM,GAAG,CAC7C,CACF,CACP,CAAC;qBACH;oBAED,OAAO,CACL,uCACE,SAAS,EAAE,6BAA6B,OAAO,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,EAAE,IACxF,QAAQ,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC,CAAC,EACpD,EAAE,EACF,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;4BACjB,qBAAqB,CAAC,CAAC,CAAC,CAAC;wBAC3B,CAAC,EACD,OAAO,EAAE,GAAG,EAAE;4BACZ,IAAI,CAAC,QAAQ,EAAE;gCACb,WAAW,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC;6BAC7B;wBACH,CAAC;wBACD,8BAAC,kBAAQ,IAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC,CAAC,GAAI;wBAC1G,uCAAK,SAAS,EAAC,8BAA8B;4BAC3C,8BAAC,kBAAQ,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,UAAU,EAAC,MAAM,GAAG,CAC7C,CACF,CACP,CAAC;gBACJ,CAAC,CACI,CACH,CACP,CAAC;QACJ,CAAC,IACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC","sourcesContent":["/*\n * @Descripttion: antd3 select 增加checkbox\n * @Author: 郑泳健\n * @Date: 2025-08-05 10:50:17\n * @LastEditors: 郑泳健\n * @LastEditTime: 2025-08-12 13:46:11\n */\nimport React, { useState, useMemo } from 'react';\nimport { getLanguage, getText } from '../prev-locale';\nimport List from 'rc-virtual-list';\nimport Select from '../tntd-rc-select';\nimport Icon from '../icon';\nimport AntSelect from '../select';\nimport Tag from '../tag';\nimport Checkbox from '../checkbox';\nimport Empty from '../empty';\nimport Ellipsis from '../ellipsis';\nimport './index.less';\n\nconst all = getText('all', getLanguage());\n\nconst TntdCheckboxSelect = ({\n mode,\n value,\n onChange,\n options,\n filterOption = (inputValue, option) => {\n return option?.label?.toLowerCase().includes(inputValue?.toLowerCase());\n },\n ...restProps\n}) => {\n // 搜索\n const [searchValue, setSearchValue] = useState(undefined);\n\n /** 根据搜索过滤,dropDown的渲染数据 */\n const renderData = useMemo(() => {\n if (!Array.isArray(options)) {\n return [];\n }\n if (['', undefined, null].includes(searchValue)) {\n return options;\n }\n return options.filter((item) => filterOption(searchValue, item));\n }, [options, filterOption, searchValue]);\n\n /** 全选中 */\n const checkedAll = useMemo(() => {\n if (!Array.isArray(value) || !Array.isArray(value)) {\n return false;\n }\n // 过滤掉disabled的选中情况\n const filterDisabled = renderData.filter((item) => !item.disabled);\n return filterDisabled.every((i) => value.includes(i.value));\n }, [value, renderData]);\n\n /** 半选中 */\n const indeterminate = useMemo(() => {\n if (!Array.isArray(value) || !Array.isArray(value)) {\n return false;\n } // 过滤掉disabled的选中情况\n const filterDisabled = renderData.filter((item) => !item.disabled);\n /** 非disable既有选中的,也有没选中的 */\n return filterDisabled.some((i) => value.includes(i.value)) && filterDisabled.some((i) => !value.includes(i.value));\n }, [value, renderData]);\n\n const handleSearch = (val) => {\n setSearchValue(val);\n };\n\n /** 全选情况 */\n const handleAllClick = (item, checked) => {\n // 筛选出非disabled的数组\n const noDisabledChoosedList = Array.isArray(renderData)\n ? renderData.reduce((total, item) => {\n if (!item.disabled) {\n total.push(item.value);\n }\n return total;\n }, [])\n : [];\n\n if (checked) {\n // 这里加value的原因是有可能是搜索的时候点击了全选\n const list = Array.isArray(value) ? Array.from(new Set([...value, ...noDisabledChoosedList])) : [...noDisabledChoosedList];\n onChange(list);\n } else {\n const list = Array.isArray(value) ? value.filter((i) => !noDisabledChoosedList.includes(i)) : [];\n onChange(list);\n }\n setSearchValue(undefined);\n };\n\n const handleClick = (item, checked) => {\n if (!Array.isArray(value)) {\n value = [];\n }\n if (checked) {\n onChange([...value, item.value]);\n } else {\n onChange(value.filter((v) => v !== item.value));\n }\n setSearchValue(undefined);\n };\n\n const handleStopPropagation = (e) => {\n e?.nativeEvent?.stopImmediatePropagation();\n e?.stopPropagation();\n e?.preventDefault();\n };\n\n return (\n <Select\n showSearch\n searchValue={searchValue}\n onSearch={handleSearch}\n tagRender={(item) => {\n const { onClose, value } = item;\n const { label, disabled } = Array.isArray(options) ? options.find((opt) => opt.value === value) || {} : {};\n return (\n <Tag size=\"small\" className=\"tntd-checkbox-select-item-tag\">\n <div className='tntd-checkbox-select-item-tag-label'>\n <Ellipsis title={label} widthLimit={\"100%\"} />\n </div>\n {!disabled ? <Icon type=\"close\" onClick={onClose} /> : ''}\n </Tag>\n );\n }}\n value={value}\n onChange={onChange}\n {...restProps}\n mode={mode || 'multiple'}\n dropdownRender={() => {\n if (!Array.isArray(renderData) || !renderData?.length) {\n return (\n <div className=\"tntd-checkbox-select-dropdown-render-wrapper\">\n <Empty className=\"tntd-rc-select-item-empty\" size=\"mini\" />\n </div>\n );\n }\n const renderList = [{ label: all, value: 'all', isAll: true }, ...renderData];\n return (\n <div className=\"tntd-checkbox-select-dropdown-render-wrapper\" onClick={(e) => handleStopPropagation(e)}>\n <List height={renderData.length > 8 ? 250 : 'auto'} itemHeight={32} data={renderList} itemKey={'value'}>\n {(item) => {\n const { isAll, disabled } = item;\n // 是否全部disabled\n const allDisabled = renderData.filter((i) => i.disabled).length === renderData.length;\n const checked = Array.isArray(value) ? value.includes(item.value) : false;\n\n if (isAll) {\n return (\n <div\n className={`tntd-checkbox-select-item ${checkedAll ? 'tntd-checkbox-select-item_choosed' : ''} ${\n allDisabled ? 'tntd-checkbox-select-item_disabled' : ''\n }`}\n onMouseDown={(e) => {\n handleStopPropagation(e);\n }}\n onClick={() => {\n if (!allDisabled) {\n handleAllClick(item, !checkedAll);\n }\n }}>\n <Checkbox\n disabled={allDisabled}\n size=\"small\"\n indeterminate={indeterminate}\n checked={checkedAll}\n onChange={(e) => {\n handleStopPropagation(e);\n }}\n />\n <div className=\"tntd-checkbox-select-content\">\n <Ellipsis title={item.label} widthLimit=\"100%\" />\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={`tntd-checkbox-select-item ${checked ? 'tntd-checkbox-select-item_choosed' : ''} ${\n disabled ? 'tntd-checkbox-select-item_disabled' : ''\n }`}\n onMouseDown={(e) => {\n handleStopPropagation(e);\n }}\n onClick={() => {\n if (!disabled) {\n handleClick(item, !checked);\n }\n }}>\n <Checkbox disabled={disabled} size=\"small\" checked={checked} onChange={(e) => handleStopPropagation(e)} />\n <div className=\"tntd-checkbox-select-content\">\n <Ellipsis title={item.label} widthLimit=\"100%\" />\n </div>\n </div>\n );\n }}\n </List>\n </div>\n );\n }}\n />\n );\n};\n\nexport default TntdCheckboxSelect;\n"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.tntd-checkbox-select-dropdown-render-wrapper {
|
|
2
|
+
padding: 0 0;
|
|
3
|
+
border-radius: 0;
|
|
4
|
+
|
|
5
|
+
.tntd-rc-select-item-empty {
|
|
6
|
+
.ant-empty-description {
|
|
7
|
+
color: rgba(0, 0, 0, 0.25);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.tntd-checkbox-select-item {
|
|
12
|
+
display: flex;
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
color: #454F64;
|
|
15
|
+
padding: 5px 8px 5px 16px;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
|
|
18
|
+
&:hover {
|
|
19
|
+
background: var(--blue-1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&_choosed {
|
|
23
|
+
background: var(--blue-1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&_disabled {
|
|
27
|
+
color: rgba(23, 35, 61, 0.3);
|
|
28
|
+
cursor: not-allowed;
|
|
29
|
+
background: #fafafa !important;
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
background: #fafafa !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tntd-checkbox-select-content {
|
|
37
|
+
flex: 1;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
margin-left: 8px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.tntd-checkbox-select-item-tag {
|
|
45
|
+
margin-right: 4px;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
margin-top: 2px;
|
|
48
|
+
margin-bottom: 2px;
|
|
49
|
+
max-width: 100%;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
.tntd-checkbox-select-item-tag-label{
|
|
53
|
+
flex: 1;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.anticon-close{
|
|
58
|
+
color: rgba(23, 35, 61, 0.8);
|
|
59
|
+
font-size: 16px !important;
|
|
60
|
+
font-weight: bold;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -45,24 +45,18 @@ function _interopRequireWildcard(e, r) {
|
|
|
45
45
|
}
|
|
46
46
|
return n["default"] = e, t && t.set(e, n), n;
|
|
47
47
|
}
|
|
48
|
-
function _interopRequireDefault(
|
|
49
|
-
return
|
|
50
|
-
"default":
|
|
48
|
+
function _interopRequireDefault(e) {
|
|
49
|
+
return e && e.__esModule ? e : {
|
|
50
|
+
"default": e
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function _defineProperty(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
writable: true
|
|
61
|
-
});
|
|
62
|
-
} else {
|
|
63
|
-
obj[key] = value;
|
|
64
|
-
}
|
|
65
|
-
return obj;
|
|
53
|
+
function _defineProperty(e, r, t) {
|
|
54
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
55
|
+
value: t,
|
|
56
|
+
enumerable: !0,
|
|
57
|
+
configurable: !0,
|
|
58
|
+
writable: !0
|
|
59
|
+
}) : e[r] = t, e;
|
|
66
60
|
}
|
|
67
61
|
function _toPropertyKey(t) {
|
|
68
62
|
var i = _toPrimitive(t, "string");
|
|
@@ -78,30 +72,29 @@ function _toPrimitive(t, r) {
|
|
|
78
72
|
}
|
|
79
73
|
return ("string" === r ? String : Number)(t);
|
|
80
74
|
}
|
|
81
|
-
function _toConsumableArray(
|
|
82
|
-
return _arrayWithoutHoles(
|
|
75
|
+
function _toConsumableArray(r) {
|
|
76
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
83
77
|
}
|
|
84
78
|
function _nonIterableSpread() {
|
|
85
79
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
86
80
|
}
|
|
87
|
-
function _unsupportedIterableToArray(
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
81
|
+
function _unsupportedIterableToArray(r, a) {
|
|
82
|
+
if (r) {
|
|
83
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
84
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
85
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
86
|
+
}
|
|
94
87
|
}
|
|
95
|
-
function _iterableToArray(
|
|
96
|
-
if (typeof Symbol
|
|
88
|
+
function _iterableToArray(r) {
|
|
89
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
97
90
|
}
|
|
98
|
-
function _arrayWithoutHoles(
|
|
99
|
-
if (Array.isArray(
|
|
91
|
+
function _arrayWithoutHoles(r) {
|
|
92
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
100
93
|
}
|
|
101
|
-
function _arrayLikeToArray(
|
|
102
|
-
|
|
103
|
-
for (var
|
|
104
|
-
return
|
|
94
|
+
function _arrayLikeToArray(r, a) {
|
|
95
|
+
(null == a || a > r.length) && (a = r.length);
|
|
96
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
97
|
+
return n;
|
|
105
98
|
}
|
|
106
99
|
var EMPTY_LIST = [];
|
|
107
100
|
function toErrorEntity(error, errorStatus, prefix) {
|
package/lib/tntd-form/Form.js
CHANGED
|
@@ -57,9 +57,9 @@ function _interopRequireWildcard(e, r) {
|
|
|
57
57
|
}
|
|
58
58
|
return n["default"] = e, t && t.set(e, n), n;
|
|
59
59
|
}
|
|
60
|
-
function _interopRequireDefault(
|
|
61
|
-
return
|
|
62
|
-
"default":
|
|
60
|
+
function _interopRequireDefault(e) {
|
|
61
|
+
return e && e.__esModule ? e : {
|
|
62
|
+
"default": e
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
function _typeof(o) {
|
|
@@ -71,24 +71,23 @@ function _typeof(o) {
|
|
|
71
71
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
72
72
|
}, _typeof(o);
|
|
73
73
|
}
|
|
74
|
-
function _slicedToArray(
|
|
75
|
-
return _arrayWithHoles(
|
|
74
|
+
function _slicedToArray(r, e) {
|
|
75
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
76
76
|
}
|
|
77
77
|
function _nonIterableRest() {
|
|
78
78
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
79
79
|
}
|
|
80
|
-
function _unsupportedIterableToArray(
|
|
81
|
-
if (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
80
|
+
function _unsupportedIterableToArray(r, a) {
|
|
81
|
+
if (r) {
|
|
82
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
83
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
84
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
85
|
+
}
|
|
87
86
|
}
|
|
88
|
-
function _arrayLikeToArray(
|
|
89
|
-
|
|
90
|
-
for (var
|
|
91
|
-
return
|
|
87
|
+
function _arrayLikeToArray(r, a) {
|
|
88
|
+
(null == a || a > r.length) && (a = r.length);
|
|
89
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
90
|
+
return n;
|
|
92
91
|
}
|
|
93
92
|
function _iterableToArrayLimit(r, l) {
|
|
94
93
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
@@ -117,22 +116,16 @@ function _iterableToArrayLimit(r, l) {
|
|
|
117
116
|
return a;
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
|
-
function _arrayWithHoles(
|
|
121
|
-
if (Array.isArray(
|
|
119
|
+
function _arrayWithHoles(r) {
|
|
120
|
+
if (Array.isArray(r)) return r;
|
|
122
121
|
}
|
|
123
|
-
function _defineProperty(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
writable: true
|
|
131
|
-
});
|
|
132
|
-
} else {
|
|
133
|
-
obj[key] = value;
|
|
134
|
-
}
|
|
135
|
-
return obj;
|
|
122
|
+
function _defineProperty(e, r, t) {
|
|
123
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
124
|
+
value: t,
|
|
125
|
+
enumerable: !0,
|
|
126
|
+
configurable: !0,
|
|
127
|
+
writable: !0
|
|
128
|
+
}) : e[r] = t, e;
|
|
136
129
|
}
|
|
137
130
|
function _toPropertyKey(t) {
|
|
138
131
|
var i = _toPrimitive(t, "string");
|