tntd 2.0.13 → 2.0.14
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/array-input/index.js +31 -6
- package/es/columns/index.js +12 -6
- package/es/development-login/LoginModal.js +10 -4
- package/es/drawer/drawer.js +8 -4
- package/es/ellipsis/index.js +25 -14
- package/es/empty/empty.js +13 -9
- package/es/handle/index.js +27 -14
- package/es/img/Contain.js +19 -13
- package/es/img/Cover.js +24 -13
- package/es/img/index.js +21 -14
- package/es/index.js +1 -0
- package/es/loading-button/index.js +13 -6
- package/es/locale/default.js +2 -0
- package/es/locale/en_US.js +2 -0
- package/es/locale/zh_CN.js +2 -0
- package/es/page/Box.js +28 -19
- package/es/page/index.js +38 -22
- package/es/page/utils.js +5 -0
- package/es/prev-locale.js +3 -0
- package/es/query-form/Field/Checkbox.js +8 -4
- package/es/query-form/Field/Select.js +17 -10
- package/es/query-form/Field/SelectInput.js +18 -4
- package/es/query-form/Field/fieldsMap.js +1 -0
- package/es/query-form/Field/index.js +11 -2
- package/es/query-form/createActions.js +8 -0
- package/es/query-form/index.js +34 -2
- package/es/query-list-scene/List.js +39 -18
- package/es/query-list-scene/QueryForm.js +19 -10
- package/es/query-list-scene/QueryListScene.js +2 -0
- package/es/query-list-scene/Toolbar.js +10 -6
- package/es/query-list-scene/createActions.js +3 -0
- package/es/render-empty/render-empty.js +2 -0
- package/es/steps/steps.js +17 -9
- package/es/steps/style/nav.less +3 -1
- package/es/svg-components/illustration-403.js +2 -0
- package/es/svg-components/illustration-404.js +2 -0
- package/es/svg-components/illustration-500.js +2 -0
- package/es/svg-components/illustration-empty.js +2 -0
- package/es/svg-components/illustration-failure.js +2 -0
- package/es/svg-components/illustration-no-access.js +2 -0
- package/es/svg-components/illustration-no-chart.js +2 -0
- package/es/svg-components/illustration-no-result.js +2 -0
- package/es/svg-components/illustration-offline.js +2 -0
- package/es/svg-components/illustration-success.js +2 -0
- package/es/table/assets/image-loading-background.js +2 -0
- package/es/table/assets/image-loading.js +2 -0
- package/es/table/hooks/use-column-setting.js +1 -0
- package/es/table/table.js +19 -14
- package/es/table/table.stories.js +2 -0
- package/es/table/utils.js +6 -2
- package/es/title/index.js +14 -10
- package/es/tntd-cascader/AntdCascader/component/context.js +4 -2
- package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +2 -0
- package/es/tntd-cascader/AntdCascader/component/getIcons.js +15 -6
- package/es/tntd-cascader/AntdCascader/config/utils.js +2 -0
- package/es/tntd-cascader/AntdCascader/config/warning.js +8 -4
- package/es/tntd-cascader/AntdCascader/index.js +73 -51
- package/es/tntd-cascader/rc-cascader/Cascader.js +113 -86
- package/es/tntd-cascader/rc-cascader/OptionList/Column.js +26 -16
- package/es/tntd-cascader/rc-cascader/OptionList/index.js +43 -26
- package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +7 -5
- package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +41 -12
- package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +10 -4
- package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +4 -2
- package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +1 -0
- package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +1 -0
- package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +7 -2
- package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +15 -8
- package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +6 -2
- package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +4 -2
- package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +7 -2
- package/es/tntd-icon/fonts/iconfont.js +12 -7
- package/es/tntd-icon/index.js +9 -5
- package/es/tntd-layout/ActionsContext.js +2 -2
- package/es/tntd-layout/AppList.js +14 -2
- package/es/tntd-layout/Application.js +4 -0
- package/es/tntd-layout/Avatar.js +4 -0
- package/es/tntd-layout/CompatibleLanguage.js +13 -0
- package/es/tntd-layout/EnterpriseLayout/Avatar.js +4 -0
- package/es/tntd-layout/EnterpriseLayout/Language.js +6 -0
- package/es/tntd-layout/EnterpriseLayout/Theme.js +4 -0
- package/es/tntd-layout/EnterpriseLayout/index.js +2 -2
- package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +33 -2
- package/es/tntd-layout/GlobalNavigation/index.js +6 -0
- package/es/tntd-layout/HeaderActions.js +32 -28
- package/es/tntd-layout/HeaderNavs.js +14 -6
- package/es/tntd-layout/HeaderTabs.js +35 -14
- package/es/tntd-layout/Language.js +6 -0
- package/es/tntd-layout/Layout.js +7 -2
- package/es/tntd-layout/Logo.js +11 -4
- package/es/tntd-layout/OrgAppList.js +39 -22
- package/es/tntd-layout/SideMenu.js +45 -8
- package/es/tntd-layout/Theme.js +6 -0
- package/es/tntd-layout/index.js +17 -9
- package/es/tntd-layout/paaslayout/CompactSideMenu.js +15 -0
- package/es/tntd-layout/paaslayout/SideMenu.js +15 -0
- package/es/tntd-layout/paaslayout/index.js +13 -4
- package/es/tntd-layout/storage.js +2 -2
- package/es/tntd-modal/index.js +18 -12
- package/es/tntd-second-page/index.js +3 -0
- package/es/tntd-select/DropDownWrap.js +8 -4
- package/es/tntd-select/index.js +118 -74
- package/es/utils/checkAuth.js +1 -0
- package/es/utils/findMenuInfoByPath.js +3 -0
- package/es/utils/index.js +11 -2
- package/lib/affix/index.js +10 -4
- package/lib/alert/index.js +10 -4
- package/lib/anchor/index.js +10 -4
- package/lib/array-input/icon.js +7 -1
- package/lib/array-input/index.js +91 -41
- package/lib/auth-context/index.js +3 -0
- package/lib/auto-complete/index.js +10 -4
- package/lib/avatar/index.js +10 -4
- package/lib/back-top/index.js +10 -4
- package/lib/badge/index.js +10 -4
- package/lib/breadcrumb/index.js +10 -4
- package/lib/button/index.js +10 -4
- package/lib/calendar/index.js +10 -4
- package/lib/card/index.js +10 -4
- package/lib/carousel/index.js +10 -4
- package/lib/cascader/index.js +10 -4
- package/lib/checkbox/index.js +10 -4
- package/lib/col/index.js +10 -4
- package/lib/collapse/index.js +11 -4
- package/lib/columns/index.js +28 -14
- package/lib/comment/index.js +10 -4
- package/lib/config-provider/config-provider.js +2 -0
- package/lib/config-provider/index.js +10 -4
- package/lib/date-picker/index.js +10 -4
- package/lib/descriptions/index.js +10 -4
- package/lib/development-login/LoginModal.js +50 -25
- package/lib/development-login/index.js +22 -11
- package/lib/divider/index.js +10 -4
- package/lib/drawer/drawer.js +16 -6
- package/lib/drawer/index.js +5 -1
- package/lib/dropdown/index.js +10 -4
- package/lib/ellipsis/Svg/CopySVG.js +4 -0
- package/lib/ellipsis/Svg/TickSVG.js +4 -0
- package/lib/ellipsis/index.js +73 -42
- package/lib/empty/empty.js +30 -14
- package/lib/empty/empty.stories.js +21 -3
- package/lib/empty/index.js +5 -1
- package/lib/exception/exception.js +14 -7
- package/lib/exception/index.js +4 -1
- package/lib/form/index.js +10 -4
- package/lib/handle/index.js +46 -19
- package/lib/icon/index.js +10 -4
- package/lib/img/Contain.js +23 -12
- package/lib/img/Cover.js +53 -31
- package/lib/img/index.js +47 -29
- package/lib/index.js +187 -100
- package/lib/input/index.js +10 -4
- package/lib/input-number/index.js +10 -4
- package/lib/layout/index.js +10 -4
- package/lib/list/index.js +10 -4
- package/lib/loading-button/index.js +32 -15
- package/lib/locale/default.js +5 -0
- package/lib/locale/en_US.js +4 -0
- package/lib/locale/index.js +6 -3
- package/lib/locale/zh_CN.js +4 -0
- package/lib/locale-provider/index.js +10 -4
- package/lib/mention/index.js +10 -4
- package/lib/mentions/index.js +10 -4
- package/lib/menu/index.js +10 -4
- package/lib/message/index.js +11 -4
- package/lib/modal/index.js +11 -4
- package/lib/notification/index.js +10 -4
- package/lib/page/Box.js +37 -24
- package/lib/page/index.js +66 -37
- package/lib/page/utils.js +9 -1
- package/lib/page-header/index.js +10 -4
- package/lib/pagination/index.js +10 -4
- package/lib/popconfirm/index.js +10 -4
- package/lib/popover/index.js +10 -4
- package/lib/prev-locale.js +10 -1
- package/lib/progress/index.js +10 -4
- package/lib/query-form/Field/Checkbox.js +11 -2
- package/lib/query-form/Field/Select.js +45 -27
- package/lib/query-form/Field/SelectInput.js +46 -21
- package/lib/query-form/Field/fieldsMap.js +12 -1
- package/lib/query-form/Field/index.js +70 -38
- package/lib/query-form/createActions.js +7 -0
- package/lib/query-form/index.js +121 -52
- package/lib/query-form/useForm.js +4 -0
- package/lib/query-list-scene/List.js +111 -58
- package/lib/query-list-scene/QueryForm.js +67 -37
- package/lib/query-list-scene/QueryListScene.js +42 -21
- package/lib/query-list-scene/Title.js +5 -1
- package/lib/query-list-scene/Toolbar.js +15 -8
- package/lib/query-list-scene/createActions.js +6 -0
- package/lib/query-list-scene/index.js +10 -0
- package/lib/query-list-scene/useActions.js +4 -0
- package/lib/radio/index.js +10 -4
- package/lib/rate/index.js +10 -4
- package/lib/render-empty/index.js +2 -0
- package/lib/render-empty/render-empty.js +8 -0
- package/lib/result/index.js +10 -4
- package/lib/row/index.js +10 -4
- package/lib/select/index.js +10 -4
- package/lib/skeleton/index.js +10 -4
- package/lib/slider/index.js +10 -4
- package/lib/spin/index.js +10 -4
- package/lib/statistic/index.js +10 -4
- package/lib/steps/index.js +5 -1
- package/lib/steps/steps.js +29 -12
- package/lib/steps/style/nav.less +3 -1
- package/lib/svg-components/illustration-403.js +9 -3
- package/lib/svg-components/illustration-404.js +9 -3
- package/lib/svg-components/illustration-500.js +9 -3
- package/lib/svg-components/illustration-empty.js +9 -3
- package/lib/svg-components/illustration-failure.js +9 -3
- package/lib/svg-components/illustration-no-access.js +9 -3
- package/lib/svg-components/illustration-no-chart.js +9 -3
- package/lib/svg-components/illustration-no-result.js +9 -3
- package/lib/svg-components/illustration-offline.js +9 -3
- package/lib/svg-components/illustration-success.js +9 -3
- package/lib/svg-components/index.js +11 -0
- package/lib/switch/index.js +10 -4
- package/lib/table/assets/image-loading-background.js +9 -3
- package/lib/table/assets/image-loading.js +9 -3
- package/lib/table/context.js +2 -0
- package/lib/table/hooks/index.js +2 -1
- package/lib/table/hooks/use-column-setting.js +16 -8
- package/lib/table/index.js +5 -1
- package/lib/table/table.js +63 -34
- package/lib/table/table.stories.js +11 -2
- package/lib/table/utils.js +11 -2
- package/lib/tabs/index.js +10 -4
- package/lib/tag/index.js +10 -4
- package/lib/time-picker/index.js +10 -4
- package/lib/timeline/index.js +10 -4
- package/lib/title/index.js +20 -10
- package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +11 -4
- package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +8 -3
- package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +8 -3
- package/lib/tntd-cascader/AntdCascader/component/context.js +9 -3
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +12 -4
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +37 -19
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +17 -8
- package/lib/tntd-cascader/AntdCascader/config/utils.js +15 -6
- package/lib/tntd-cascader/AntdCascader/config/warning.js +15 -7
- package/lib/tntd-cascader/AntdCascader/index.js +133 -80
- package/lib/tntd-cascader/AntdCascader/interface.js +3 -0
- package/lib/tntd-cascader/index.js +2 -0
- package/lib/tntd-cascader/rc-cascader/Cascader.js +188 -123
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +21 -11
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +88 -60
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +109 -65
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +33 -18
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +106 -56
- package/lib/tntd-cascader/rc-cascader/context.js +8 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +31 -14
- package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +15 -5
- package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +11 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +8 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +15 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +41 -26
- package/lib/tntd-cascader/rc-cascader/index.js +3 -0
- package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +20 -9
- package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +8 -0
- package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +14 -7
- package/lib/tntd-icon/fonts/iconfont.js +12 -7
- package/lib/tntd-icon/index.js +17 -6
- package/lib/tntd-layout/ActionsContext.js +3 -0
- package/lib/tntd-layout/AppList.js +105 -30
- package/lib/tntd-layout/Application.js +84 -22
- package/lib/tntd-layout/Avatar.js +72 -18
- package/lib/tntd-layout/CompatibleLanguage.js +105 -32
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +80 -24
- package/lib/tntd-layout/EnterpriseLayout/Language.js +45 -14
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +46 -16
- package/lib/tntd-layout/EnterpriseLayout/index.js +12 -4
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +174 -45
- package/lib/tntd-layout/GlobalNavigation/index.js +70 -19
- package/lib/tntd-layout/Header.js +54 -20
- package/lib/tntd-layout/HeaderActions.js +64 -33
- package/lib/tntd-layout/HeaderNavs.js +59 -19
- package/lib/tntd-layout/HeaderTabs.js +111 -43
- package/lib/tntd-layout/Iconfont.js +5 -0
- package/lib/tntd-layout/Language.js +45 -14
- package/lib/tntd-layout/Layout.js +113 -74
- package/lib/tntd-layout/Logo.js +41 -14
- package/lib/tntd-layout/OrgAppList.js +119 -51
- package/lib/tntd-layout/SideMenu.js +120 -42
- package/lib/tntd-layout/Theme.js +71 -19
- package/lib/tntd-layout/createActions.js +5 -0
- package/lib/tntd-layout/images/index.js +28 -0
- package/lib/tntd-layout/index.js +49 -21
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +81 -29
- package/lib/tntd-layout/paaslayout/Header.js +47 -14
- package/lib/tntd-layout/paaslayout/Logo.js +19 -2
- package/lib/tntd-layout/paaslayout/SideMenu.js +82 -31
- package/lib/tntd-layout/paaslayout/index.js +108 -62
- package/lib/tntd-layout/storage.d.ts +1 -1
- package/lib/tntd-layout/storage.d.ts.map +1 -1
- package/lib/tntd-layout/storage.js +33 -3
- package/lib/tntd-modal/index.js +51 -32
- package/lib/tntd-second-page/index.js +24 -14
- package/lib/tntd-select/DropDownWrap.js +45 -24
- package/lib/tntd-select/index.js +206 -117
- package/lib/tooltip/index.js +10 -4
- package/lib/transfer/index.js +10 -4
- package/lib/tree/index.js +10 -4
- package/lib/tree-select/index.js +10 -4
- package/lib/typography/index.js +10 -4
- package/lib/upload/index.js +10 -4
- package/lib/utils/checkAuth.js +10 -4
- package/lib/utils/findMenuInfoByPath.js +7 -1
- package/lib/utils/index.js +41 -13
- package/lib/version/index.js +10 -4
- package/package.json +1 -1
- package/es/array-input/style/index.js +0 -1
- package/es/array-input/style/index.js.map +0 -1
- package/es/auth-context/style/index.js +0 -1
- package/es/auth-context/style/index.js.map +0 -1
- package/es/development-login/style/index.js +0 -1
- package/es/development-login/style/index.js.map +0 -1
- package/es/ellipsis/style/index.js +0 -1
- package/es/ellipsis/style/index.js.map +0 -1
- package/es/empty/render-empty.js +0 -22
- package/es/empty/render-empty.js.map +0 -1
- package/es/empty/style/index.js +0 -2
- package/es/empty/style/index.js.map +0 -1
- package/es/handle/style/index.js +0 -1
- package/es/handle/style/index.js.map +0 -1
- package/es/icon-list/style/index.js +0 -1
- package/es/icon-list/style/index.js.map +0 -1
- package/es/img/style/index.js +0 -1
- package/es/img/style/index.js.map +0 -1
- package/es/loading-button/style/index.js +0 -1
- package/es/loading-button/style/index.js.map +0 -1
- package/es/page/style/index.js +0 -1
- package/es/page/style/index.js.map +0 -1
- package/es/query-form/style/index.js +0 -1
- package/es/query-form/style/index.js.map +0 -1
- package/es/query-list-scene/style/index.js +0 -1
- package/es/query-list-scene/style/index.js.map +0 -1
- package/es/render-empty/style/index.js +0 -1
- package/es/render-empty/style/index.js.map +0 -1
- package/es/table/style/index.js +0 -2
- package/es/table/style/index.js.map +0 -1
- package/es/title/style/index.js +0 -1
- package/es/title/style/index.js.map +0 -1
- package/es/tntd-icon/style/index.js +0 -1
- package/es/tntd-icon/style/index.js.map +0 -1
- package/es/tntd-layout/style/index.js +0 -1
- package/es/tntd-layout/style/index.js.map +0 -1
- package/es/tntd-modal/style/index.js +0 -1
- package/es/tntd-modal/style/index.js.map +0 -1
- package/es/tntd-select/style/index.js +0 -1
- package/es/tntd-select/style/index.js.map +0 -1
- package/lib/array-input/style/index.d.ts +0 -1
- package/lib/array-input/style/index.d.ts.map +0 -1
- package/lib/array-input/style/index.js +0 -1
- package/lib/array-input/style/index.js.map +0 -1
- package/lib/auth-context/style/index.d.ts +0 -1
- package/lib/auth-context/style/index.d.ts.map +0 -1
- package/lib/auth-context/style/index.js +0 -1
- package/lib/auth-context/style/index.js.map +0 -1
- package/lib/development-login/style/index.d.ts +0 -1
- package/lib/development-login/style/index.d.ts.map +0 -1
- package/lib/development-login/style/index.js +0 -1
- package/lib/development-login/style/index.js.map +0 -1
- package/lib/ellipsis/style/index.d.ts +0 -1
- package/lib/ellipsis/style/index.d.ts.map +0 -1
- package/lib/ellipsis/style/index.js +0 -1
- package/lib/ellipsis/style/index.js.map +0 -1
- package/lib/empty/render-empty.d.ts +0 -3
- package/lib/empty/render-empty.d.ts.map +0 -1
- package/lib/empty/render-empty.js +0 -32
- package/lib/empty/render-empty.js.map +0 -1
- package/lib/empty/style/index.d.ts +0 -3
- package/lib/empty/style/index.d.ts.map +0 -1
- package/lib/empty/style/index.js +0 -4
- package/lib/empty/style/index.js.map +0 -1
- package/lib/handle/style/index.d.ts +0 -1
- package/lib/handle/style/index.d.ts.map +0 -1
- package/lib/handle/style/index.js +0 -1
- package/lib/handle/style/index.js.map +0 -1
- package/lib/icon-list/style/index.d.ts +0 -3
- package/lib/icon-list/style/index.d.ts.map +0 -1
- package/lib/icon-list/style/index.js +0 -8
- package/lib/icon-list/style/index.js.map +0 -1
- package/lib/img/style/index.d.ts +0 -1
- package/lib/img/style/index.d.ts.map +0 -1
- package/lib/img/style/index.js +0 -1
- package/lib/img/style/index.js.map +0 -1
- package/lib/loading-button/style/index.d.ts +0 -1
- package/lib/loading-button/style/index.d.ts.map +0 -1
- package/lib/loading-button/style/index.js +0 -1
- package/lib/loading-button/style/index.js.map +0 -1
- package/lib/page/style/index.d.ts +0 -1
- package/lib/page/style/index.d.ts.map +0 -1
- package/lib/page/style/index.js +0 -1
- package/lib/page/style/index.js.map +0 -1
- package/lib/query-form/style/index.d.ts +0 -1
- package/lib/query-form/style/index.d.ts.map +0 -1
- package/lib/query-form/style/index.js +0 -1
- package/lib/query-form/style/index.js.map +0 -1
- package/lib/query-list-scene/style/index.d.ts +0 -1
- package/lib/query-list-scene/style/index.d.ts.map +0 -1
- package/lib/query-list-scene/style/index.js +0 -1
- package/lib/query-list-scene/style/index.js.map +0 -1
- package/lib/render-empty/style/index.d.ts +0 -2
- package/lib/render-empty/style/index.d.ts.map +0 -1
- package/lib/render-empty/style/index.js +0 -3
- package/lib/render-empty/style/index.js.map +0 -1
- package/lib/table/style/index.d.ts +0 -3
- package/lib/table/style/index.d.ts.map +0 -1
- package/lib/table/style/index.js +0 -4
- package/lib/table/style/index.js.map +0 -1
- package/lib/title/style/index.d.ts +0 -1
- package/lib/title/style/index.d.ts.map +0 -1
- package/lib/title/style/index.js +0 -1
- package/lib/title/style/index.js.map +0 -1
- package/lib/tntd-icon/style/index.d.ts +0 -1
- package/lib/tntd-icon/style/index.d.ts.map +0 -1
- package/lib/tntd-icon/style/index.js +0 -1
- package/lib/tntd-icon/style/index.js.map +0 -1
- package/lib/tntd-layout/style/index.d.ts +0 -1
- package/lib/tntd-layout/style/index.d.ts.map +0 -1
- package/lib/tntd-layout/style/index.js +0 -1
- package/lib/tntd-layout/style/index.js.map +0 -1
- package/lib/tntd-modal/style/index.d.ts +0 -1
- package/lib/tntd-modal/style/index.d.ts.map +0 -1
- package/lib/tntd-modal/style/index.js +0 -1
- package/lib/tntd-modal/style/index.js.map +0 -1
- package/lib/tntd-select/style/index.d.ts +0 -1
- package/lib/tntd-select/style/index.d.ts.map +0 -1
- package/lib/tntd-select/style/index.js +0 -1
- package/lib/tntd-select/style/index.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
|
|
2
3
|
function SvgIllustrationNoAccess(props, svgRef) {
|
|
3
4
|
return React.createElement("svg", Object.assign({
|
|
4
5
|
viewBox: "0 0 161 160",
|
|
@@ -114,6 +115,7 @@ function SvgIllustrationNoAccess(props, svgRef) {
|
|
|
114
115
|
fillRule: "nonzero"
|
|
115
116
|
})));
|
|
116
117
|
}
|
|
118
|
+
|
|
117
119
|
const ForwardRef = React.forwardRef(SvgIllustrationNoAccess);
|
|
118
120
|
const MemoForwardRef = React.memo(ForwardRef);
|
|
119
121
|
export default MemoForwardRef;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
|
|
2
3
|
function SvgIllustrationNoChart(props, svgRef) {
|
|
3
4
|
return React.createElement("svg", Object.assign({
|
|
4
5
|
viewBox: "0 0 160 160",
|
|
@@ -134,6 +135,7 @@ function SvgIllustrationNoChart(props, svgRef) {
|
|
|
134
135
|
fillRule: "nonzero"
|
|
135
136
|
}))));
|
|
136
137
|
}
|
|
138
|
+
|
|
137
139
|
const ForwardRef = React.forwardRef(SvgIllustrationNoChart);
|
|
138
140
|
const MemoForwardRef = React.memo(ForwardRef);
|
|
139
141
|
export default MemoForwardRef;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
|
|
2
3
|
function SvgIllustrationNoResult(props, svgRef) {
|
|
3
4
|
return React.createElement("svg", Object.assign({
|
|
4
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -92,6 +93,7 @@ function SvgIllustrationNoResult(props, svgRef) {
|
|
|
92
93
|
d: "M34.233 7.963l-6.1-5.033m-1.87 10.522l-6.13-1.522"
|
|
93
94
|
}))));
|
|
94
95
|
}
|
|
96
|
+
|
|
95
97
|
const ForwardRef = React.forwardRef(SvgIllustrationNoResult);
|
|
96
98
|
const MemoForwardRef = React.memo(ForwardRef);
|
|
97
99
|
export default MemoForwardRef;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
|
|
2
3
|
function SvgIllustrationOffline(props, svgRef) {
|
|
3
4
|
return React.createElement("svg", Object.assign({
|
|
4
5
|
viewBox: "0 0 160 160",
|
|
@@ -131,6 +132,7 @@ function SvgIllustrationOffline(props, svgRef) {
|
|
|
131
132
|
fill: "#18263C"
|
|
132
133
|
})))));
|
|
133
134
|
}
|
|
135
|
+
|
|
134
136
|
const ForwardRef = React.forwardRef(SvgIllustrationOffline);
|
|
135
137
|
const MemoForwardRef = React.memo(ForwardRef);
|
|
136
138
|
export default MemoForwardRef;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
|
|
2
3
|
function SvgIllustrationSuccess(props, svgRef) {
|
|
3
4
|
return React.createElement("svg", Object.assign({
|
|
4
5
|
viewBox: "0 0 160 160",
|
|
@@ -137,6 +138,7 @@ function SvgIllustrationSuccess(props, svgRef) {
|
|
|
137
138
|
fillRule: "nonzero"
|
|
138
139
|
}))));
|
|
139
140
|
}
|
|
141
|
+
|
|
140
142
|
const ForwardRef = React.forwardRef(SvgIllustrationSuccess);
|
|
141
143
|
const MemoForwardRef = React.memo(ForwardRef);
|
|
142
144
|
export default MemoForwardRef;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
|
|
2
3
|
function SvgTableLoading(props, svgRef) {
|
|
3
4
|
return React.createElement("svg", Object.assign({
|
|
4
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -45,6 +46,7 @@ function SvgTableLoading(props, svgRef) {
|
|
|
45
46
|
d: "M54.056 49.364v33m22-33v33"
|
|
46
47
|
})));
|
|
47
48
|
}
|
|
49
|
+
|
|
48
50
|
const ForwardRef = React.forwardRef(SvgTableLoading);
|
|
49
51
|
const MemoForwardRef = React.memo(ForwardRef);
|
|
50
52
|
export default MemoForwardRef;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
|
|
2
3
|
function SvgTableLoading(props, svgRef) {
|
|
3
4
|
return React.createElement("svg", Object.assign({
|
|
4
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -26,6 +27,7 @@ function SvgTableLoading(props, svgRef) {
|
|
|
26
27
|
keyTimes: "0;1"
|
|
27
28
|
})));
|
|
28
29
|
}
|
|
30
|
+
|
|
29
31
|
const ForwardRef = React.forwardRef(SvgTableLoading);
|
|
30
32
|
const MemoForwardRef = React.memo(ForwardRef);
|
|
31
33
|
export default MemoForwardRef;
|
|
@@ -6,6 +6,7 @@ export const useColumnSetting = (columns, storageKey) => {
|
|
|
6
6
|
if (!columnSetting || columnSetting.length === 0) {
|
|
7
7
|
return columns;
|
|
8
8
|
}
|
|
9
|
+
|
|
9
10
|
return columns.filter(column => columnSetting.some(setting => setting.key === column.key)).sort((a, b) => {
|
|
10
11
|
const aIndex = columnSetting.find(setting => setting.key === a.key);
|
|
11
12
|
const bIndex = columnSetting.find(setting => setting.key === b.key);
|
package/es/table/table.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
var __rest = this && this.__rest || function (s, e) {
|
|
2
2
|
var t = {};
|
|
3
|
+
|
|
3
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
+
|
|
4
6
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
7
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
8
|
}
|
|
7
9
|
return t;
|
|
8
10
|
};
|
|
11
|
+
|
|
9
12
|
import { useLocalStorage } from '@stellaris/hooks';
|
|
10
13
|
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
11
14
|
import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
|
|
@@ -20,20 +23,21 @@ import { useColumnSetting } from './hooks';
|
|
|
20
23
|
import { normalizeColumns } from './utils';
|
|
21
24
|
export const Table = _a => {
|
|
22
25
|
var {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
className,
|
|
27
|
+
locale,
|
|
28
|
+
bordered,
|
|
29
|
+
refresh,
|
|
30
|
+
size,
|
|
31
|
+
storageKey,
|
|
32
|
+
columns,
|
|
33
|
+
children,
|
|
34
|
+
pagination = {
|
|
35
|
+
showTotal: total => `共 ${total} 条记录`
|
|
36
|
+
},
|
|
37
|
+
enableToolbar = false
|
|
38
|
+
} = _a,
|
|
39
|
+
rest = __rest(_a, ["className", "locale", "bordered", "refresh", "size", "storageKey", "columns", "children", "pagination", "enableToolbar"]);
|
|
40
|
+
|
|
37
41
|
const tableContainer = useRef(null);
|
|
38
42
|
const [innerSize, setInnerSize] = useLocalStorage(TABLE_SIZE_STORAGE_KEY, 'default');
|
|
39
43
|
const normalizedColumns = useMemo(() => columns || normalizeColumns(children), [children, columns]);
|
|
@@ -41,6 +45,7 @@ export const Table = _a => {
|
|
|
41
45
|
/**
|
|
42
46
|
* update the innerSize when props size changes
|
|
43
47
|
*/
|
|
48
|
+
|
|
44
49
|
useEffect(() => {
|
|
45
50
|
if (size) {
|
|
46
51
|
setInnerSize(size);
|
|
@@ -18,11 +18,13 @@ export default {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
+
|
|
21
22
|
const Template = args => React.createElement("div", {
|
|
22
23
|
style: {
|
|
23
24
|
marginTop: '20px'
|
|
24
25
|
}
|
|
25
26
|
}, React.createElement(Table, Object.assign({}, args)));
|
|
27
|
+
|
|
26
28
|
export const Empty = Template.bind({});
|
|
27
29
|
Empty.args = {
|
|
28
30
|
columns: [{
|
package/es/table/utils.js
CHANGED
|
@@ -5,14 +5,18 @@ export function normalizeColumns(elements) {
|
|
|
5
5
|
if (!React.isValidElement(element)) {
|
|
6
6
|
return;
|
|
7
7
|
}
|
|
8
|
+
|
|
8
9
|
const column = Object.assign({}, element.props);
|
|
10
|
+
|
|
9
11
|
if (element.key) {
|
|
10
12
|
column.key = element.key;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
|
+
|
|
15
|
+
|
|
13
16
|
if (element.type && element.type.__ANT_TABLE_COLUMN_GROUP) {
|
|
14
17
|
column.children = normalizeColumns(column.children);
|
|
15
18
|
}
|
|
19
|
+
|
|
16
20
|
columns.push(column);
|
|
17
21
|
});
|
|
18
22
|
return columns;
|
package/es/title/index.js
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
var __rest = this && this.__rest || function (s, e) {
|
|
2
2
|
var t = {};
|
|
3
|
+
|
|
3
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
+
|
|
4
6
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
7
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
8
|
}
|
|
7
9
|
return t;
|
|
8
10
|
};
|
|
11
|
+
|
|
9
12
|
import React from 'react';
|
|
10
13
|
import cn from 'classnames';
|
|
11
14
|
import './index.less';
|
|
12
15
|
export default (props => {
|
|
13
16
|
const _a = props || {},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
{
|
|
18
|
+
title = '暂无标题',
|
|
19
|
+
subTitle,
|
|
20
|
+
size = 'default',
|
|
21
|
+
extra,
|
|
22
|
+
number,
|
|
23
|
+
simple,
|
|
24
|
+
style
|
|
25
|
+
} = _a,
|
|
26
|
+
rest = __rest(_a, ["title", "subTitle", "size", "extra", "number", "simple", "style"]);
|
|
27
|
+
|
|
24
28
|
return React.createElement("div", {
|
|
25
29
|
className: cn('tnt-title', size, {
|
|
26
30
|
'has-number': number
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
const defaultGetPrefixCls = (suffixCls, customizePrefixCls) => {
|
|
3
4
|
if (customizePrefixCls) return customizePrefixCls;
|
|
4
5
|
return suffixCls ? `tntd-${suffixCls}` : 'tntd';
|
|
5
6
|
};
|
|
6
|
-
|
|
7
|
-
// zombieJ: 🚨 Do not pass `defaultRenderEmpty` here since it will case circular dependency.
|
|
7
|
+
|
|
8
|
+
export const defaultIconPrefixCls = 'anticon'; // zombieJ: 🚨 Do not pass `defaultRenderEmpty` here since it will case circular dependency.
|
|
9
|
+
|
|
8
10
|
export const ConfigContext = React.createContext({
|
|
9
11
|
// We provide a default function for Context without provider
|
|
10
12
|
getPrefixCls: defaultGetPrefixCls
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { ConfigConsumer } from './context';
|
|
10
10
|
import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
|
|
11
|
+
|
|
11
12
|
const defaultRenderEmpty = conponentName => React.createElement(ConfigConsumer, null, ({
|
|
12
13
|
getPrefixCls
|
|
13
14
|
}) => {
|
|
@@ -29,4 +30,5 @@ const defaultRenderEmpty = conponentName => React.createElement(ConfigConsumer,
|
|
|
29
30
|
}, locale.noDate));
|
|
30
31
|
});
|
|
31
32
|
});
|
|
33
|
+
|
|
32
34
|
export default defaultRenderEmpty;
|
|
@@ -17,11 +17,13 @@ export default function getIcons({
|
|
|
17
17
|
const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : React.createElement(_Icon, {
|
|
18
18
|
type: "close-circle",
|
|
19
19
|
theme: "filled"
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const getSuffixIconNode = arrowIcon => React.createElement(React.Fragment, null, showArrow !== false && arrowIcon, hasFeedback && feedbackIcon);
|
|
23
|
-
|
|
20
|
+
}); // Validation Feedback Icon
|
|
21
|
+
|
|
22
|
+
const getSuffixIconNode = arrowIcon => React.createElement(React.Fragment, null, showArrow !== false && arrowIcon, hasFeedback && feedbackIcon); // Arrow item icon
|
|
23
|
+
|
|
24
|
+
|
|
24
25
|
let mergedSuffixIcon = null;
|
|
26
|
+
|
|
25
27
|
if (suffixIcon !== undefined) {
|
|
26
28
|
mergedSuffixIcon = getSuffixIconNode(suffixIcon);
|
|
27
29
|
} else if (loading) {
|
|
@@ -30,6 +32,7 @@ export default function getIcons({
|
|
|
30
32
|
}));
|
|
31
33
|
} else {
|
|
32
34
|
const iconCls = `${prefixCls}-suffix`;
|
|
35
|
+
|
|
33
36
|
mergedSuffixIcon = ({
|
|
34
37
|
open,
|
|
35
38
|
showSearch
|
|
@@ -40,14 +43,17 @@ export default function getIcons({
|
|
|
40
43
|
type: "search"
|
|
41
44
|
}));
|
|
42
45
|
}
|
|
46
|
+
|
|
43
47
|
return getSuffixIconNode(React.createElement(_Icon, {
|
|
44
48
|
className: iconCls,
|
|
45
49
|
type: "down"
|
|
46
50
|
}));
|
|
47
51
|
};
|
|
48
|
-
}
|
|
49
|
-
|
|
52
|
+
} // Checked item icon
|
|
53
|
+
|
|
54
|
+
|
|
50
55
|
let mergedItemIcon = null;
|
|
56
|
+
|
|
51
57
|
if (menuItemSelectedIcon !== undefined) {
|
|
52
58
|
mergedItemIcon = menuItemSelectedIcon;
|
|
53
59
|
} else if (multiple) {
|
|
@@ -57,7 +63,9 @@ export default function getIcons({
|
|
|
57
63
|
} else {
|
|
58
64
|
mergedItemIcon = null;
|
|
59
65
|
}
|
|
66
|
+
|
|
60
67
|
let mergedRemoveIcon = null;
|
|
68
|
+
|
|
61
69
|
if (removeIcon !== undefined) {
|
|
62
70
|
mergedRemoveIcon = removeIcon;
|
|
63
71
|
} else {
|
|
@@ -65,6 +73,7 @@ export default function getIcons({
|
|
|
65
73
|
type: "close"
|
|
66
74
|
});
|
|
67
75
|
}
|
|
76
|
+
|
|
68
77
|
return {
|
|
69
78
|
clearIcon: mergedClearIcon,
|
|
70
79
|
suffixIcon: mergedSuffixIcon,
|
|
@@ -3,12 +3,14 @@ export const getTransitionDirection = placement => {
|
|
|
3
3
|
if (placement !== undefined && (placement === 'topLeft' || placement === 'topRight')) {
|
|
4
4
|
return `slide-down`;
|
|
5
5
|
}
|
|
6
|
+
|
|
6
7
|
return `slide-up`;
|
|
7
8
|
};
|
|
8
9
|
export const getTransitionName = (rootPrefixCls, motion, transitionName) => {
|
|
9
10
|
if (transitionName !== undefined) {
|
|
10
11
|
return transitionName;
|
|
11
12
|
}
|
|
13
|
+
|
|
12
14
|
return `${rootPrefixCls}-${motion}`;
|
|
13
15
|
};
|
|
14
16
|
export function getStatusClassNames(prefixCls, status, hasFeedback) {
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import rcWarning, { resetWarned } from 'rc-util/lib/warning';
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
2
|
+
|
|
3
|
+
function noop() {} // eslint-disable-next-line import/no-mutable-exports
|
|
4
|
+
|
|
5
|
+
|
|
4
6
|
let warning = noop;
|
|
7
|
+
|
|
5
8
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
9
|
warning = (valid, component, message) => {
|
|
7
|
-
rcWarning(valid, `[antd: ${component}] ${message}`);
|
|
8
|
-
|
|
10
|
+
rcWarning(valid, `[antd: ${component}] ${message}`); // StrictMode will inject console which will not throw warning in React 17.
|
|
11
|
+
|
|
9
12
|
if (process.env.NODE_ENV === 'test') {
|
|
10
13
|
resetWarned();
|
|
11
14
|
}
|
|
12
15
|
};
|
|
13
16
|
}
|
|
17
|
+
|
|
14
18
|
export default warning;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import "antd/es/icon/style";
|
|
2
2
|
import _Icon from "antd/es/icon";
|
|
3
|
+
|
|
3
4
|
var __rest = this && this.__rest || function (s, e) {
|
|
4
5
|
var t = {};
|
|
6
|
+
|
|
5
7
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
8
|
+
|
|
6
9
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
10
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
8
11
|
}
|
|
9
12
|
return t;
|
|
10
13
|
};
|
|
14
|
+
|
|
11
15
|
import classNames from 'classnames';
|
|
12
16
|
import RcCascader from '../rc-cascader';
|
|
13
17
|
import omit from 'rc-util/lib/omit';
|
|
@@ -27,6 +31,7 @@ const {
|
|
|
27
31
|
SHOW_CHILD,
|
|
28
32
|
SHOW_PARENT
|
|
29
33
|
} = RcCascader;
|
|
34
|
+
|
|
30
35
|
function highlightKeyword(str, lowerKeyword, prefixCls) {
|
|
31
36
|
const cells = str.toLowerCase().split(lowerKeyword).reduce((list, cur, index) => index === 0 ? [cur] : [...list, lowerKeyword, cur], []);
|
|
32
37
|
const fillCells = [];
|
|
@@ -35,113 +40,125 @@ function highlightKeyword(str, lowerKeyword, prefixCls) {
|
|
|
35
40
|
const end = start + cell.length;
|
|
36
41
|
let originWorld = str.slice(start, end);
|
|
37
42
|
start = end;
|
|
43
|
+
|
|
38
44
|
if (index % 2 === 1) {
|
|
39
45
|
originWorld = React.createElement("span", {
|
|
40
46
|
className: `${prefixCls}-menu-item-keyword`,
|
|
41
47
|
key: `seperator-${index}`
|
|
42
48
|
}, originWorld);
|
|
43
49
|
}
|
|
50
|
+
|
|
44
51
|
fillCells.push(originWorld);
|
|
45
52
|
});
|
|
46
53
|
return fillCells;
|
|
47
54
|
}
|
|
55
|
+
|
|
48
56
|
const defaultSearchRender = (inputValue, path, prefixCls, fieldNames) => {
|
|
49
|
-
const optionList = [];
|
|
50
|
-
|
|
57
|
+
const optionList = []; // We do lower here to save perf
|
|
58
|
+
|
|
51
59
|
const lower = inputValue.toLowerCase();
|
|
52
60
|
path.forEach((node, index) => {
|
|
53
61
|
if (index !== 0) {
|
|
54
62
|
optionList.push(' / ');
|
|
55
63
|
}
|
|
64
|
+
|
|
56
65
|
let label = node[fieldNames.label];
|
|
57
66
|
const type = typeof label;
|
|
67
|
+
|
|
58
68
|
if (type === 'string' || type === 'number') {
|
|
59
69
|
label = highlightKeyword(String(label), lower, prefixCls);
|
|
60
70
|
}
|
|
71
|
+
|
|
61
72
|
optionList.push(label);
|
|
62
73
|
});
|
|
63
74
|
return optionList;
|
|
64
75
|
};
|
|
76
|
+
|
|
65
77
|
const Cascader = React.forwardRef((props, ref) => {
|
|
66
78
|
const {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
79
|
+
prefixCls: customizePrefixCls,
|
|
80
|
+
size: customizeSize,
|
|
81
|
+
disabled: customDisabled,
|
|
82
|
+
className,
|
|
83
|
+
multiple,
|
|
84
|
+
bordered = true,
|
|
85
|
+
transitionName,
|
|
86
|
+
choiceTransitionName = '',
|
|
87
|
+
popupClassName,
|
|
88
|
+
dropdownClassName,
|
|
89
|
+
expandIcon,
|
|
90
|
+
placement,
|
|
91
|
+
showSearch,
|
|
92
|
+
allowClear = true,
|
|
93
|
+
notFoundContent,
|
|
94
|
+
direction,
|
|
95
|
+
getPopupContainer,
|
|
96
|
+
status: customStatus,
|
|
97
|
+
showArrow
|
|
98
|
+
} = props,
|
|
99
|
+
rest = __rest(props, ["prefixCls", "size", "disabled", "className", "multiple", "bordered", "transitionName", "choiceTransitionName", "popupClassName", "dropdownClassName", "expandIcon", "placement", "showSearch", "allowClear", "notFoundContent", "direction", "getPopupContainer", "status", "showArrow"]);
|
|
100
|
+
|
|
88
101
|
const restProps = omit(rest, ['suffixIcon']);
|
|
89
102
|
const {
|
|
90
103
|
getPopupContainer: getContextPopupContainer,
|
|
91
104
|
getPrefixCls,
|
|
92
105
|
renderEmpty,
|
|
93
|
-
direction: rootDirection
|
|
94
|
-
// virtual,
|
|
106
|
+
direction: rootDirection // virtual,
|
|
95
107
|
// dropdownMatchSelectWidth,
|
|
108
|
+
|
|
96
109
|
} = useContext(ConfigContext);
|
|
97
110
|
const mergedDirection = direction || rootDirection;
|
|
98
|
-
const isRtl = mergedDirection === 'rtl';
|
|
99
|
-
|
|
111
|
+
const isRtl = mergedDirection === 'rtl'; // =================== Form =====================
|
|
112
|
+
|
|
100
113
|
const {
|
|
101
114
|
status: contextStatus,
|
|
102
115
|
hasFeedback,
|
|
103
116
|
isFormItemInput,
|
|
104
117
|
feedbackIcon
|
|
105
118
|
} = useContext(FormItemInputContext);
|
|
106
|
-
const mergedStatus = getMergedStatus(contextStatus, customStatus);
|
|
107
|
-
|
|
119
|
+
const mergedStatus = getMergedStatus(contextStatus, customStatus); // =================== Warning =====================
|
|
120
|
+
|
|
108
121
|
warning(!dropdownClassName, 'Cascader', '`dropdownClassName` is deprecated which will be removed in next major version. Please use `popupClassName` instead.');
|
|
109
|
-
warning(!multiple || !props.displayRender, 'Cascader', '`displayRender` not work on `multiple`. Please use `tagRender` instead.');
|
|
110
|
-
|
|
111
|
-
const mergedNotFoundContent = notFoundContent || (renderEmpty || defaultRenderEmpty)('Cascader');
|
|
112
|
-
|
|
122
|
+
warning(!multiple || !props.displayRender, 'Cascader', '`displayRender` not work on `multiple`. Please use `tagRender` instead.'); // =================== No Found ====================
|
|
123
|
+
|
|
124
|
+
const mergedNotFoundContent = notFoundContent || (renderEmpty || defaultRenderEmpty)('Cascader'); // ==================== Prefix =====================
|
|
125
|
+
|
|
113
126
|
const rootPrefixCls = getPrefixCls();
|
|
114
127
|
const prefixCls = getPrefixCls('select', customizePrefixCls);
|
|
115
128
|
const cascaderPrefixCls = getPrefixCls('cascader', customizePrefixCls);
|
|
116
129
|
const {
|
|
117
130
|
compactSize,
|
|
118
131
|
compactItemClassnames
|
|
119
|
-
} = useCompactItemContext(prefixCls, direction);
|
|
120
|
-
|
|
132
|
+
} = useCompactItemContext(prefixCls, direction); // =================== Dropdown ====================
|
|
133
|
+
|
|
121
134
|
const mergedDropdownClassName = classNames(popupClassName || dropdownClassName, `${cascaderPrefixCls}-dropdown`, {
|
|
122
135
|
[`${cascaderPrefixCls}-dropdown-rtl`]: mergedDirection === 'rtl'
|
|
123
|
-
});
|
|
124
|
-
|
|
136
|
+
}); // ==================== Search =====================
|
|
137
|
+
|
|
125
138
|
const mergedShowSearch = React.useMemo(() => {
|
|
126
139
|
if (!showSearch) {
|
|
127
140
|
return showSearch;
|
|
128
141
|
}
|
|
142
|
+
|
|
129
143
|
let searchConfig = {
|
|
130
144
|
render: defaultSearchRender
|
|
131
145
|
};
|
|
146
|
+
|
|
132
147
|
if (typeof showSearch === 'object') {
|
|
133
148
|
searchConfig = Object.assign(Object.assign({}, searchConfig), showSearch);
|
|
134
149
|
}
|
|
150
|
+
|
|
135
151
|
return searchConfig;
|
|
136
|
-
}, [showSearch]);
|
|
137
|
-
|
|
152
|
+
}, [showSearch]); // ===================== Size ======================
|
|
153
|
+
|
|
138
154
|
const size = React.useContext(SizeContext);
|
|
139
|
-
const mergedSize = compactSize || customizeSize || size;
|
|
140
|
-
|
|
155
|
+
const mergedSize = compactSize || customizeSize || size; // ===================== Disabled =====================
|
|
156
|
+
|
|
141
157
|
const disabled = React.useContext(DisabledContext);
|
|
142
|
-
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
|
|
143
|
-
|
|
158
|
+
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled; // ===================== Icon ======================
|
|
159
|
+
|
|
144
160
|
let mergedExpandIcon = expandIcon;
|
|
161
|
+
|
|
145
162
|
if (!expandIcon) {
|
|
146
163
|
mergedExpandIcon = isRtl ? React.createElement(_Icon, {
|
|
147
164
|
type: "left"
|
|
@@ -149,16 +166,17 @@ const Cascader = React.forwardRef((props, ref) => {
|
|
|
149
166
|
type: "right"
|
|
150
167
|
});
|
|
151
168
|
}
|
|
169
|
+
|
|
152
170
|
const loadingIcon = React.createElement("span", {
|
|
153
171
|
className: `${prefixCls}-menu-item-loading-icon`
|
|
154
172
|
}, React.createElement(_Icon, {
|
|
155
173
|
type: "loading"
|
|
156
|
-
}));
|
|
157
|
-
|
|
174
|
+
})); // =================== Multiple ====================
|
|
175
|
+
|
|
158
176
|
const checkable = React.useMemo(() => multiple ? React.createElement("span", {
|
|
159
177
|
className: `${cascaderPrefixCls}-checkbox-inner`
|
|
160
|
-
}) : false, [multiple]);
|
|
161
|
-
|
|
178
|
+
}) : false, [multiple]); // ===================== Icons =====================
|
|
179
|
+
|
|
162
180
|
const mergedShowArrow = showArrow !== undefined ? showArrow : props.loading || !multiple;
|
|
163
181
|
const {
|
|
164
182
|
suffixIcon,
|
|
@@ -170,15 +188,17 @@ const Cascader = React.forwardRef((props, ref) => {
|
|
|
170
188
|
showArrow: mergedShowArrow,
|
|
171
189
|
multiple,
|
|
172
190
|
prefixCls
|
|
173
|
-
}));
|
|
174
|
-
|
|
191
|
+
})); // ===================== Placement =====================
|
|
192
|
+
|
|
175
193
|
const getPlacement = () => {
|
|
176
194
|
if (placement !== undefined) {
|
|
177
195
|
return placement;
|
|
178
196
|
}
|
|
197
|
+
|
|
179
198
|
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
|
|
180
|
-
};
|
|
181
|
-
|
|
199
|
+
}; // ==================== Render =====================
|
|
200
|
+
|
|
201
|
+
|
|
182
202
|
return React.createElement(RcCascader, Object.assign({
|
|
183
203
|
prefixCls: prefixCls,
|
|
184
204
|
className: classNames(!customizePrefixCls && cascaderPrefixCls, {
|
|
@@ -210,9 +230,11 @@ const Cascader = React.forwardRef((props, ref) => {
|
|
|
210
230
|
showArrow: hasFeedback || showArrow
|
|
211
231
|
}));
|
|
212
232
|
});
|
|
233
|
+
|
|
213
234
|
if (process.env.NODE_ENV !== 'production') {
|
|
214
235
|
Cascader.displayName = 'Cascader';
|
|
215
236
|
}
|
|
237
|
+
|
|
216
238
|
Cascader.SHOW_PARENT = SHOW_PARENT;
|
|
217
239
|
Cascader.SHOW_CHILD = SHOW_CHILD;
|
|
218
240
|
export default Cascader;
|