tntd 2.0.14 → 2.0.15
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 +6 -31
- package/es/array-input/style/index.js +1 -0
- package/es/array-input/style/index.js.map +1 -0
- package/es/auth-context/style/index.js +1 -0
- package/es/auth-context/style/index.js.map +1 -0
- package/es/columns/index.js +6 -12
- package/es/development-login/LoginModal.js +4 -10
- package/es/development-login/style/index.js +1 -0
- package/es/development-login/style/index.js.map +1 -0
- package/es/drawer/drawer.js +5 -9
- package/es/drawer/drawer.js.map +1 -1
- package/es/drawer/drawer.less +13 -11
- package/es/ellipsis/index.js +14 -25
- package/es/ellipsis/style/index.js +1 -0
- package/es/ellipsis/style/index.js.map +1 -0
- package/es/empty/empty.js +9 -13
- package/es/empty/render-empty.js +22 -0
- package/es/empty/render-empty.js.map +1 -0
- package/es/empty/style/index.js +2 -0
- package/es/empty/style/index.js.map +1 -0
- package/es/handle/index.js +14 -27
- package/es/handle/style/index.js +1 -0
- package/es/handle/style/index.js.map +1 -0
- package/es/icon-list/style/index.js +1 -0
- package/es/icon-list/style/index.js.map +1 -0
- package/es/img/Contain.js +13 -19
- package/es/img/Cover.js +13 -24
- package/es/img/index.js +14 -21
- package/es/img/style/index.js +1 -0
- package/es/img/style/index.js.map +1 -0
- package/es/index.js +0 -1
- package/es/loading-button/index.js +6 -13
- package/es/loading-button/style/index.js +1 -0
- package/es/loading-button/style/index.js.map +1 -0
- package/es/locale/default.js +0 -2
- package/es/locale/en_US.js +0 -2
- package/es/locale/zh_CN.js +0 -2
- package/es/modal/index.js +11 -2
- package/es/modal/index.js.map +1 -1
- package/es/modal/modal.js +44 -0
- package/es/modal/modal.js.map +1 -0
- package/es/modal/modal.less +27 -25
- package/es/page/Box.js +19 -28
- package/es/page/index.js +22 -38
- package/es/page/style/index.js +1 -0
- package/es/page/style/index.js.map +1 -0
- package/es/page/utils.js +0 -5
- package/es/prev-locale.js +0 -3
- package/es/query-form/Field/Checkbox.js +4 -8
- package/es/query-form/Field/Select.js +10 -17
- package/es/query-form/Field/SelectInput.js +4 -18
- package/es/query-form/Field/fieldsMap.js +0 -1
- package/es/query-form/Field/index.js +2 -11
- package/es/query-form/createActions.js +0 -8
- package/es/query-form/index.js +2 -34
- package/es/query-form/style/index.js +1 -0
- package/es/query-form/style/index.js.map +1 -0
- package/es/query-list-scene/List.js +18 -39
- package/es/query-list-scene/QueryForm.js +10 -19
- package/es/query-list-scene/QueryListScene.js +0 -2
- package/es/query-list-scene/Toolbar.js +6 -10
- package/es/query-list-scene/createActions.js +0 -3
- package/es/query-list-scene/style/index.js +1 -0
- package/es/query-list-scene/style/index.js.map +1 -0
- package/es/render-empty/render-empty.js +0 -2
- package/es/render-empty/style/index.js +1 -0
- package/es/render-empty/style/index.js.map +1 -0
- package/es/steps/steps.js +9 -17
- package/es/svg-components/illustration-403.js +0 -2
- package/es/svg-components/illustration-404.js +0 -2
- package/es/svg-components/illustration-500.js +0 -2
- package/es/svg-components/illustration-empty.js +0 -2
- package/es/svg-components/illustration-failure.js +0 -2
- package/es/svg-components/illustration-no-access.js +0 -2
- package/es/svg-components/illustration-no-chart.js +0 -2
- package/es/svg-components/illustration-no-result.js +0 -2
- package/es/svg-components/illustration-offline.js +0 -2
- package/es/svg-components/illustration-success.js +0 -2
- package/es/table/assets/image-loading-background.js +0 -2
- package/es/table/assets/image-loading.js +0 -2
- package/es/table/hooks/use-column-setting.js +0 -1
- package/es/table/style/index.js +2 -0
- package/es/table/style/index.js.map +1 -0
- package/es/table/table.js +14 -19
- package/es/table/table.stories.js +0 -2
- package/es/table/utils.js +2 -6
- package/es/title/index.js +10 -14
- package/es/title/style/index.js +1 -0
- package/es/title/style/index.js.map +1 -0
- package/es/tntd-cascader/AntdCascader/component/context.js +2 -4
- package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +0 -2
- package/es/tntd-cascader/AntdCascader/component/getIcons.js +6 -15
- package/es/tntd-cascader/AntdCascader/config/utils.js +0 -2
- package/es/tntd-cascader/AntdCascader/config/warning.js +4 -8
- package/es/tntd-cascader/AntdCascader/index.js +51 -73
- package/es/tntd-cascader/rc-cascader/Cascader.js +86 -113
- package/es/tntd-cascader/rc-cascader/OptionList/Column.js +16 -26
- package/es/tntd-cascader/rc-cascader/OptionList/index.js +26 -43
- package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -7
- package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +12 -41
- package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +4 -10
- package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +2 -4
- package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +0 -1
- package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +0 -1
- package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +2 -7
- package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +8 -15
- package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +2 -6
- package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +2 -4
- package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +2 -7
- package/es/tntd-icon/fonts/iconfont.js +7 -12
- package/es/tntd-icon/index.js +5 -9
- package/es/tntd-icon/style/index.js +1 -0
- package/es/tntd-icon/style/index.js.map +1 -0
- package/es/tntd-layout/ActionsContext.js +2 -2
- package/es/tntd-layout/AppList.js +2 -14
- package/es/tntd-layout/Application.js +0 -4
- package/es/tntd-layout/Avatar.js +0 -4
- package/es/tntd-layout/CompatibleLanguage.js +0 -13
- package/es/tntd-layout/EnterpriseLayout/Avatar.js +0 -4
- package/es/tntd-layout/EnterpriseLayout/Language.js +0 -6
- package/es/tntd-layout/EnterpriseLayout/Theme.js +0 -4
- package/es/tntd-layout/EnterpriseLayout/index.js +2 -2
- package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +2 -33
- package/es/tntd-layout/GlobalNavigation/index.js +0 -6
- package/es/tntd-layout/HeaderActions.js +28 -32
- package/es/tntd-layout/HeaderNavs.js +6 -14
- package/es/tntd-layout/HeaderTabs.js +14 -35
- package/es/tntd-layout/Language.js +0 -6
- package/es/tntd-layout/Layout.js +2 -7
- package/es/tntd-layout/Logo.js +4 -11
- package/es/tntd-layout/OrgAppList.js +22 -39
- package/es/tntd-layout/SideMenu.js +8 -45
- package/es/tntd-layout/Theme.js +0 -6
- package/es/tntd-layout/index.js +9 -17
- package/es/tntd-layout/paaslayout/CompactSideMenu.js +0 -15
- package/es/tntd-layout/paaslayout/SideMenu.js +0 -15
- package/es/tntd-layout/paaslayout/index.js +4 -13
- package/es/tntd-layout/storage.js +2 -2
- package/es/tntd-layout/style/index.js +1 -0
- package/es/tntd-layout/style/index.js.map +1 -0
- package/es/tntd-modal/index.js +12 -18
- package/es/tntd-modal/style/index.js +1 -0
- package/es/tntd-modal/style/index.js.map +1 -0
- package/es/tntd-second-page/index.js +0 -3
- package/es/tntd-select/DropDownWrap.js +4 -8
- package/es/tntd-select/index.js +74 -118
- package/es/tntd-select/style/index.js +1 -0
- package/es/tntd-select/style/index.js.map +1 -0
- package/es/utils/checkAuth.js +0 -1
- package/es/utils/findMenuInfoByPath.js +0 -3
- package/es/utils/index.js +2 -11
- package/lib/affix/index.js +4 -10
- package/lib/alert/index.js +4 -10
- package/lib/anchor/index.js +4 -10
- package/lib/array-input/icon.js +1 -7
- package/lib/array-input/index.js +41 -91
- package/lib/array-input/style/index.d.ts +1 -0
- package/lib/array-input/style/index.d.ts.map +1 -0
- package/lib/array-input/style/index.js +1 -0
- package/lib/array-input/style/index.js.map +1 -0
- package/lib/auth-context/index.js +0 -3
- package/lib/auth-context/style/index.d.ts +1 -0
- package/lib/auth-context/style/index.d.ts.map +1 -0
- package/lib/auth-context/style/index.js +1 -0
- package/lib/auth-context/style/index.js.map +1 -0
- package/lib/auto-complete/index.js +4 -10
- package/lib/avatar/index.js +4 -10
- package/lib/back-top/index.js +4 -10
- package/lib/badge/index.js +4 -10
- package/lib/breadcrumb/index.js +4 -10
- package/lib/button/index.js +4 -10
- package/lib/calendar/index.js +4 -10
- package/lib/card/index.js +4 -10
- package/lib/carousel/index.js +4 -10
- package/lib/cascader/index.js +4 -10
- package/lib/checkbox/index.js +4 -10
- package/lib/col/index.js +4 -10
- package/lib/collapse/index.js +4 -11
- package/lib/columns/index.js +14 -28
- package/lib/comment/index.js +4 -10
- package/lib/config-provider/config-provider.js +0 -2
- package/lib/config-provider/index.js +4 -10
- package/lib/date-picker/index.js +4 -10
- package/lib/descriptions/index.js +4 -10
- package/lib/development-login/LoginModal.js +25 -50
- package/lib/development-login/index.js +11 -22
- package/lib/development-login/style/index.d.ts +1 -0
- package/lib/development-login/style/index.d.ts.map +1 -0
- package/lib/development-login/style/index.js +1 -0
- package/lib/development-login/style/index.js.map +1 -0
- package/lib/divider/index.js +4 -10
- package/lib/drawer/drawer.d.ts.map +1 -1
- package/lib/drawer/drawer.js +7 -17
- package/lib/drawer/drawer.js.map +1 -1
- package/lib/drawer/drawer.less +13 -11
- package/lib/drawer/index.js +1 -5
- package/lib/dropdown/index.js +4 -10
- package/lib/ellipsis/Svg/CopySVG.js +0 -4
- package/lib/ellipsis/Svg/TickSVG.js +0 -4
- package/lib/ellipsis/index.js +42 -73
- package/lib/ellipsis/style/index.d.ts +1 -0
- package/lib/ellipsis/style/index.d.ts.map +1 -0
- package/lib/ellipsis/style/index.js +1 -0
- package/lib/ellipsis/style/index.js.map +1 -0
- package/lib/empty/empty.js +14 -30
- package/lib/empty/empty.stories.js +3 -21
- package/lib/empty/index.js +1 -5
- package/lib/empty/render-empty.d.ts +3 -0
- package/lib/empty/render-empty.d.ts.map +1 -0
- package/lib/empty/render-empty.js +32 -0
- package/lib/empty/render-empty.js.map +1 -0
- package/lib/empty/style/index.d.ts +3 -0
- package/lib/empty/style/index.d.ts.map +1 -0
- package/lib/empty/style/index.js +4 -0
- package/lib/empty/style/index.js.map +1 -0
- package/lib/exception/exception.js +7 -14
- package/lib/exception/index.js +1 -4
- package/lib/form/index.js +4 -10
- package/lib/handle/index.js +19 -46
- package/lib/handle/style/index.d.ts +1 -0
- package/lib/handle/style/index.d.ts.map +1 -0
- package/lib/handle/style/index.js +1 -0
- package/lib/handle/style/index.js.map +1 -0
- package/lib/icon/index.js +4 -10
- package/lib/icon-list/style/index.d.ts +3 -0
- package/lib/icon-list/style/index.d.ts.map +1 -0
- package/lib/icon-list/style/index.js +8 -0
- package/lib/icon-list/style/index.js.map +1 -0
- package/lib/img/Contain.js +12 -23
- package/lib/img/Cover.js +31 -53
- package/lib/img/index.js +29 -47
- package/lib/img/style/index.d.ts +1 -0
- package/lib/img/style/index.d.ts.map +1 -0
- package/lib/img/style/index.js +1 -0
- package/lib/img/style/index.js.map +1 -0
- package/lib/index.js +100 -187
- package/lib/input/index.js +4 -10
- package/lib/input-number/index.js +4 -10
- package/lib/layout/index.js +4 -10
- package/lib/list/index.js +4 -10
- package/lib/loading-button/index.js +15 -32
- package/lib/loading-button/style/index.d.ts +1 -0
- package/lib/loading-button/style/index.d.ts.map +1 -0
- package/lib/loading-button/style/index.js +1 -0
- package/lib/loading-button/style/index.js.map +1 -0
- package/lib/locale/default.js +0 -5
- package/lib/locale/en_US.js +0 -4
- package/lib/locale/index.js +3 -6
- package/lib/locale/zh_CN.js +0 -4
- package/lib/locale-provider/index.js +4 -10
- package/lib/mention/index.js +4 -10
- package/lib/mentions/index.js +4 -10
- package/lib/menu/index.js +4 -10
- package/lib/message/index.js +4 -11
- package/lib/modal/index.d.ts +2 -2
- package/lib/modal/index.d.ts.map +1 -1
- package/lib/modal/index.js +13 -14
- package/lib/modal/index.js.map +1 -1
- package/lib/modal/modal.d.ts +15 -0
- package/lib/modal/modal.d.ts.map +1 -0
- package/lib/modal/modal.js +66 -0
- package/lib/modal/modal.js.map +1 -0
- package/lib/modal/modal.less +27 -25
- package/lib/notification/index.js +4 -10
- package/lib/page/Box.js +24 -37
- package/lib/page/index.js +37 -66
- package/lib/page/style/index.d.ts +1 -0
- package/lib/page/style/index.d.ts.map +1 -0
- package/lib/page/style/index.js +1 -0
- package/lib/page/style/index.js.map +1 -0
- package/lib/page/utils.js +1 -9
- package/lib/page-header/index.js +4 -10
- package/lib/pagination/index.js +4 -10
- package/lib/popconfirm/index.js +4 -10
- package/lib/popover/index.js +4 -10
- package/lib/prev-locale.js +1 -10
- package/lib/progress/index.js +4 -10
- package/lib/query-form/Field/Checkbox.js +2 -11
- package/lib/query-form/Field/Select.js +27 -45
- package/lib/query-form/Field/SelectInput.js +21 -46
- package/lib/query-form/Field/fieldsMap.js +1 -12
- package/lib/query-form/Field/index.js +38 -70
- package/lib/query-form/createActions.js +0 -7
- package/lib/query-form/index.js +52 -121
- package/lib/query-form/style/index.d.ts +1 -0
- package/lib/query-form/style/index.d.ts.map +1 -0
- package/lib/query-form/style/index.js +1 -0
- package/lib/query-form/style/index.js.map +1 -0
- package/lib/query-form/useForm.js +0 -4
- package/lib/query-list-scene/List.js +58 -111
- package/lib/query-list-scene/QueryForm.js +37 -67
- package/lib/query-list-scene/QueryListScene.js +21 -42
- package/lib/query-list-scene/Title.js +1 -5
- package/lib/query-list-scene/Toolbar.js +8 -15
- package/lib/query-list-scene/createActions.js +0 -6
- package/lib/query-list-scene/index.js +0 -10
- package/lib/query-list-scene/style/index.d.ts +1 -0
- package/lib/query-list-scene/style/index.d.ts.map +1 -0
- package/lib/query-list-scene/style/index.js +1 -0
- package/lib/query-list-scene/style/index.js.map +1 -0
- package/lib/query-list-scene/useActions.js +0 -4
- package/lib/radio/index.js +4 -10
- package/lib/rate/index.js +4 -10
- package/lib/render-empty/index.js +0 -2
- package/lib/render-empty/render-empty.js +0 -8
- package/lib/render-empty/style/index.d.ts +2 -0
- package/lib/render-empty/style/index.d.ts.map +1 -0
- package/lib/render-empty/style/index.js +3 -0
- package/lib/render-empty/style/index.js.map +1 -0
- package/lib/result/index.js +4 -10
- package/lib/row/index.js +4 -10
- package/lib/select/index.js +4 -10
- package/lib/skeleton/index.js +4 -10
- package/lib/slider/index.js +4 -10
- package/lib/spin/index.js +4 -10
- package/lib/statistic/index.js +4 -10
- package/lib/steps/index.js +1 -5
- package/lib/steps/steps.js +12 -29
- package/lib/svg-components/illustration-403.js +3 -9
- package/lib/svg-components/illustration-404.js +3 -9
- package/lib/svg-components/illustration-500.js +3 -9
- package/lib/svg-components/illustration-empty.js +3 -9
- package/lib/svg-components/illustration-failure.js +3 -9
- package/lib/svg-components/illustration-no-access.js +3 -9
- package/lib/svg-components/illustration-no-chart.js +3 -9
- package/lib/svg-components/illustration-no-result.js +3 -9
- package/lib/svg-components/illustration-offline.js +3 -9
- package/lib/svg-components/illustration-success.js +3 -9
- package/lib/svg-components/index.js +0 -11
- package/lib/switch/index.js +4 -10
- package/lib/table/assets/image-loading-background.js +3 -9
- package/lib/table/assets/image-loading.js +3 -9
- package/lib/table/context.js +0 -2
- package/lib/table/hooks/index.js +1 -2
- package/lib/table/hooks/use-column-setting.js +8 -16
- package/lib/table/index.js +1 -5
- package/lib/table/style/index.d.ts +3 -0
- package/lib/table/style/index.d.ts.map +1 -0
- package/lib/table/style/index.js +4 -0
- package/lib/table/style/index.js.map +1 -0
- package/lib/table/table.js +34 -63
- package/lib/table/table.stories.js +2 -11
- package/lib/table/utils.js +2 -11
- package/lib/tabs/index.js +4 -10
- package/lib/tag/index.js +4 -10
- package/lib/time-picker/index.js +4 -10
- package/lib/timeline/index.js +4 -10
- package/lib/title/index.js +10 -20
- package/lib/title/style/index.d.ts +1 -0
- package/lib/title/style/index.d.ts.map +1 -0
- package/lib/title/style/index.js +1 -0
- package/lib/title/style/index.js.map +1 -0
- package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +4 -11
- package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +3 -8
- package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +3 -8
- package/lib/tntd-cascader/AntdCascader/component/context.js +3 -9
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +4 -12
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +19 -37
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +8 -17
- package/lib/tntd-cascader/AntdCascader/config/utils.js +6 -15
- package/lib/tntd-cascader/AntdCascader/config/warning.js +7 -15
- package/lib/tntd-cascader/AntdCascader/index.js +80 -133
- package/lib/tntd-cascader/AntdCascader/interface.js +0 -3
- package/lib/tntd-cascader/index.js +0 -2
- package/lib/tntd-cascader/rc-cascader/Cascader.js +123 -188
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +11 -21
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +60 -88
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +65 -109
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +18 -33
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +56 -106
- package/lib/tntd-cascader/rc-cascader/context.js +3 -8
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +14 -31
- package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +5 -15
- package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +3 -11
- package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +3 -8
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +3 -15
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +26 -41
- package/lib/tntd-cascader/rc-cascader/index.js +0 -3
- package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +9 -20
- package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +0 -8
- package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +7 -14
- package/lib/tntd-icon/fonts/iconfont.js +7 -12
- package/lib/tntd-icon/index.js +6 -17
- package/lib/tntd-icon/style/index.d.ts +1 -0
- package/lib/tntd-icon/style/index.d.ts.map +1 -0
- package/lib/tntd-icon/style/index.js +1 -0
- package/lib/tntd-icon/style/index.js.map +1 -0
- package/lib/tntd-layout/ActionsContext.js +0 -3
- package/lib/tntd-layout/AppList.js +30 -105
- package/lib/tntd-layout/Application.js +22 -84
- package/lib/tntd-layout/Avatar.js +18 -72
- package/lib/tntd-layout/CompatibleLanguage.js +32 -105
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +24 -80
- package/lib/tntd-layout/EnterpriseLayout/Language.js +14 -45
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +16 -46
- package/lib/tntd-layout/EnterpriseLayout/index.js +4 -12
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +45 -174
- package/lib/tntd-layout/GlobalNavigation/index.js +19 -70
- package/lib/tntd-layout/Header.js +20 -54
- package/lib/tntd-layout/HeaderActions.js +33 -64
- package/lib/tntd-layout/HeaderNavs.js +19 -59
- package/lib/tntd-layout/HeaderTabs.js +43 -111
- package/lib/tntd-layout/Iconfont.js +0 -5
- package/lib/tntd-layout/Language.js +14 -45
- package/lib/tntd-layout/Layout.js +74 -113
- package/lib/tntd-layout/Logo.js +14 -41
- package/lib/tntd-layout/OrgAppList.js +51 -119
- package/lib/tntd-layout/SideMenu.js +42 -120
- package/lib/tntd-layout/Theme.js +19 -71
- package/lib/tntd-layout/createActions.js +0 -5
- package/lib/tntd-layout/images/index.js +0 -28
- package/lib/tntd-layout/index.js +21 -49
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +29 -81
- package/lib/tntd-layout/paaslayout/Header.js +14 -47
- package/lib/tntd-layout/paaslayout/Logo.js +2 -19
- package/lib/tntd-layout/paaslayout/SideMenu.js +31 -82
- package/lib/tntd-layout/paaslayout/index.js +62 -108
- 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 +3 -33
- package/lib/tntd-layout/style/index.d.ts +1 -0
- package/lib/tntd-layout/style/index.d.ts.map +1 -0
- package/lib/tntd-layout/style/index.js +1 -0
- package/lib/tntd-layout/style/index.js.map +1 -0
- package/lib/tntd-modal/index.js +32 -51
- package/lib/tntd-modal/style/index.d.ts +1 -0
- package/lib/tntd-modal/style/index.d.ts.map +1 -0
- package/lib/tntd-modal/style/index.js +1 -0
- package/lib/tntd-modal/style/index.js.map +1 -0
- package/lib/tntd-second-page/index.js +14 -24
- package/lib/tntd-select/DropDownWrap.js +24 -45
- package/lib/tntd-select/index.js +117 -206
- package/lib/tntd-select/style/index.d.ts +1 -0
- package/lib/tntd-select/style/index.d.ts.map +1 -0
- package/lib/tntd-select/style/index.js +1 -0
- package/lib/tntd-select/style/index.js.map +1 -0
- package/lib/tooltip/index.js +4 -10
- package/lib/transfer/index.js +4 -10
- package/lib/tree/index.js +4 -10
- package/lib/tree-select/index.js +4 -10
- package/lib/typography/index.js +4 -10
- package/lib/upload/index.js +4 -10
- package/lib/utils/checkAuth.js +4 -10
- package/lib/utils/findMenuInfoByPath.js +1 -7
- package/lib/utils/index.js +13 -41
- package/lib/version/index.js +4 -10
- package/package.json +1 -1
|
@@ -15,49 +15,40 @@ export default ((ref, options, fieldNames, activeValueCells, setActiveValueCells
|
|
|
15
15
|
let currentOptions = options;
|
|
16
16
|
const mergedActiveIndexes = [];
|
|
17
17
|
const mergedActiveValueCells = [];
|
|
18
|
-
const len = activeValueCells.length;
|
|
19
|
-
|
|
18
|
+
const len = activeValueCells.length;
|
|
19
|
+
// Fill validate active value cells and index
|
|
20
20
|
for (let i = 0; i < len && currentOptions; i += 1) {
|
|
21
21
|
// Mark the active index for current options
|
|
22
22
|
const nextActiveIndex = currentOptions.findIndex(option => option[fieldNames.value] === activeValueCells[i]);
|
|
23
|
-
|
|
24
23
|
if (nextActiveIndex === -1) {
|
|
25
24
|
break;
|
|
26
25
|
}
|
|
27
|
-
|
|
28
26
|
activeIndex = nextActiveIndex;
|
|
29
27
|
mergedActiveIndexes.push(activeIndex);
|
|
30
28
|
mergedActiveValueCells.push(activeValueCells[i]);
|
|
31
29
|
currentOptions = currentOptions[activeIndex][fieldNames.children];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
}
|
|
31
|
+
// Fill last active options
|
|
35
32
|
let activeOptions = options;
|
|
36
|
-
|
|
37
33
|
for (let i = 0; i < mergedActiveIndexes.length - 1; i += 1) {
|
|
38
34
|
activeOptions = activeOptions[mergedActiveIndexes[i]][fieldNames.children];
|
|
39
35
|
}
|
|
40
|
-
|
|
41
36
|
return [mergedActiveValueCells, activeIndex, activeOptions];
|
|
42
|
-
}, [activeValueCells, fieldNames, options]);
|
|
43
|
-
|
|
37
|
+
}, [activeValueCells, fieldNames, options]);
|
|
38
|
+
// Update active value cells and scroll to target element
|
|
44
39
|
const internalSetActiveValueCells = next => {
|
|
45
40
|
setActiveValueCells(next);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
};
|
|
42
|
+
// Same options offset
|
|
49
43
|
const offsetActiveOption = offset => {
|
|
50
44
|
const len = lastActiveOptions.length;
|
|
51
45
|
let currentIndex = lastActiveIndex;
|
|
52
|
-
|
|
53
46
|
if (currentIndex === -1 && offset < 0) {
|
|
54
47
|
currentIndex = len;
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
for (let i = 0; i < len; i += 1) {
|
|
58
50
|
currentIndex = (currentIndex + offset + len) % len;
|
|
59
51
|
const option = lastActiveOptions[currentIndex];
|
|
60
|
-
|
|
61
52
|
if (option && !option.disabled) {
|
|
62
53
|
const value = option[fieldNames.value];
|
|
63
54
|
const nextActiveCells = validActiveValueCells.slice(0, -1).concat(value);
|
|
@@ -65,9 +56,8 @@ export default ((ref, options, fieldNames, activeValueCells, setActiveValueCells
|
|
|
65
56
|
return;
|
|
66
57
|
}
|
|
67
58
|
}
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
};
|
|
60
|
+
// Different options offset
|
|
71
61
|
const prevColumn = () => {
|
|
72
62
|
if (validActiveValueCells.length > 1) {
|
|
73
63
|
const nextActiveCells = validActiveValueCells.slice(0, -1);
|
|
@@ -76,46 +66,37 @@ export default ((ref, options, fieldNames, activeValueCells, setActiveValueCells
|
|
|
76
66
|
toggleOpen(false);
|
|
77
67
|
}
|
|
78
68
|
};
|
|
79
|
-
|
|
80
69
|
const nextColumn = () => {
|
|
81
70
|
var _a;
|
|
82
|
-
|
|
83
71
|
const nextOptions = ((_a = lastActiveOptions[lastActiveIndex]) === null || _a === void 0 ? void 0 : _a[fieldNames.children]) || [];
|
|
84
72
|
const nextOption = nextOptions.find(option => !option.disabled);
|
|
85
|
-
|
|
86
73
|
if (nextOption) {
|
|
87
74
|
const nextActiveCells = [...validActiveValueCells, nextOption[fieldNames.value]];
|
|
88
75
|
internalSetActiveValueCells(nextActiveCells);
|
|
89
76
|
}
|
|
90
77
|
};
|
|
91
|
-
|
|
92
78
|
React.useImperativeHandle(ref, () => ({
|
|
93
79
|
// scrollTo: treeRef.current?.scrollTo,
|
|
94
80
|
onKeyDown: event => {
|
|
95
81
|
const {
|
|
96
82
|
which
|
|
97
83
|
} = event;
|
|
98
|
-
|
|
99
84
|
switch (which) {
|
|
100
85
|
// >>> Arrow keys
|
|
101
86
|
case KeyCode.UP:
|
|
102
87
|
case KeyCode.DOWN:
|
|
103
88
|
{
|
|
104
89
|
let offset = 0;
|
|
105
|
-
|
|
106
90
|
if (which === KeyCode.UP) {
|
|
107
91
|
offset = -1;
|
|
108
92
|
} else if (which === KeyCode.DOWN) {
|
|
109
93
|
offset = 1;
|
|
110
94
|
}
|
|
111
|
-
|
|
112
95
|
if (offset !== 0) {
|
|
113
96
|
offsetActiveOption(offset);
|
|
114
97
|
}
|
|
115
|
-
|
|
116
98
|
break;
|
|
117
99
|
}
|
|
118
|
-
|
|
119
100
|
case KeyCode.LEFT:
|
|
120
101
|
{
|
|
121
102
|
if (rtl) {
|
|
@@ -123,10 +104,8 @@ export default ((ref, options, fieldNames, activeValueCells, setActiveValueCells
|
|
|
123
104
|
} else {
|
|
124
105
|
prevColumn();
|
|
125
106
|
}
|
|
126
|
-
|
|
127
107
|
break;
|
|
128
108
|
}
|
|
129
|
-
|
|
130
109
|
case KeyCode.RIGHT:
|
|
131
110
|
{
|
|
132
111
|
if (rtl) {
|
|
@@ -134,42 +113,34 @@ export default ((ref, options, fieldNames, activeValueCells, setActiveValueCells
|
|
|
134
113
|
} else {
|
|
135
114
|
nextColumn();
|
|
136
115
|
}
|
|
137
|
-
|
|
138
116
|
break;
|
|
139
117
|
}
|
|
140
|
-
|
|
141
118
|
case KeyCode.BACKSPACE:
|
|
142
119
|
{
|
|
143
120
|
if (!searchValue) {
|
|
144
121
|
prevColumn();
|
|
145
122
|
}
|
|
146
|
-
|
|
147
123
|
break;
|
|
148
124
|
}
|
|
149
125
|
// >>> Select
|
|
150
|
-
|
|
151
126
|
case KeyCode.ENTER:
|
|
152
127
|
{
|
|
153
128
|
if (validActiveValueCells.length) {
|
|
154
|
-
const option = lastActiveOptions[lastActiveIndex];
|
|
155
|
-
|
|
129
|
+
const option = lastActiveOptions[lastActiveIndex];
|
|
130
|
+
// Search option should revert back of origin options
|
|
156
131
|
const originOptions = (option === null || option === void 0 ? void 0 : option[SEARCH_MARK]) || [];
|
|
157
|
-
|
|
158
132
|
if (originOptions.length) {
|
|
159
133
|
onKeyBoardSelect(originOptions.map(opt => opt[fieldNames.value]), originOptions[originOptions.length - 1]);
|
|
160
134
|
} else {
|
|
161
135
|
onKeyBoardSelect(validActiveValueCells, lastActiveOptions[lastActiveIndex]);
|
|
162
136
|
}
|
|
163
137
|
}
|
|
164
|
-
|
|
165
138
|
break;
|
|
166
139
|
}
|
|
167
140
|
// >>> Close
|
|
168
|
-
|
|
169
141
|
case KeyCode.ESC:
|
|
170
142
|
{
|
|
171
143
|
toggleOpen(false);
|
|
172
|
-
|
|
173
144
|
if (open) {
|
|
174
145
|
event.stopPropagation();
|
|
175
146
|
}
|
|
@@ -4,39 +4,33 @@ import * as React from 'react';
|
|
|
4
4
|
import { toPathKey } from '../utils/commonUtil';
|
|
5
5
|
export default ((rawValues, options, fieldNames, multiple, displayRender) => {
|
|
6
6
|
return React.useMemo(() => {
|
|
7
|
-
const mergedDisplayRender = displayRender || (
|
|
7
|
+
const mergedDisplayRender = displayRender || (
|
|
8
|
+
// Default displayRender
|
|
8
9
|
labels => {
|
|
9
10
|
const mergedLabels = multiple ? labels.slice(-1) : labels;
|
|
10
11
|
const SPLIT = ' / ';
|
|
11
|
-
|
|
12
12
|
if (mergedLabels.every(label => ['string', 'number'].includes(typeof label))) {
|
|
13
13
|
return mergedLabels.join(SPLIT);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
}
|
|
15
|
+
// If exist non-string value, use ReactNode instead
|
|
17
16
|
return mergedLabels.reduce((list, label, index) => {
|
|
18
17
|
const keyedLabel = React.isValidElement(label) ? React.cloneElement(label, {
|
|
19
18
|
key: index
|
|
20
19
|
}) : label;
|
|
21
|
-
|
|
22
20
|
if (index === 0) {
|
|
23
21
|
return [keyedLabel];
|
|
24
22
|
}
|
|
25
|
-
|
|
26
23
|
return [...list, SPLIT, keyedLabel];
|
|
27
24
|
}, []);
|
|
28
25
|
});
|
|
29
|
-
|
|
30
26
|
return rawValues.map(valueCells => {
|
|
31
27
|
var _a, _b;
|
|
32
|
-
|
|
33
28
|
const valueOptions = toPathOptions(valueCells, options, fieldNames);
|
|
34
29
|
const label = mergedDisplayRender(valueOptions.map(({
|
|
35
30
|
option,
|
|
36
31
|
value
|
|
37
32
|
}) => {
|
|
38
33
|
var _a;
|
|
39
|
-
|
|
40
34
|
return (_a = option === null || option === void 0 ? void 0 : option[fieldNames.label]) !== null && _a !== void 0 ? _a : value;
|
|
41
35
|
}), valueOptions.map(({
|
|
42
36
|
option
|
|
@@ -3,7 +3,6 @@ import * as React from 'react';
|
|
|
3
3
|
import { convertDataToEntities } from 'rc-tree/lib/utils/treeUtil';
|
|
4
4
|
import { VALUE_SPLIT } from '../utils/commonUtil';
|
|
5
5
|
/** Lazy parse options data into conduct-able info to avoid perf issue in single mode */
|
|
6
|
-
|
|
7
6
|
export default ((options, fieldNames) => {
|
|
8
7
|
const cacheRef = React.useRef({
|
|
9
8
|
options: null,
|
|
@@ -19,14 +18,13 @@ export default ((options, fieldNames) => {
|
|
|
19
18
|
}),
|
|
20
19
|
processEntity: (entity, wrapper) => {
|
|
21
20
|
const pathKey = entity.nodes.map(node => node[fieldNames.value]).join(VALUE_SPLIT);
|
|
22
|
-
wrapper.pathKeyEntities[pathKey] = entity;
|
|
21
|
+
wrapper.pathKeyEntities[pathKey] = entity;
|
|
22
|
+
// Overwrite origin key.
|
|
23
23
|
// this is very hack but we need let conduct logic work with connect path
|
|
24
|
-
|
|
25
24
|
entity.key = pathKey;
|
|
26
25
|
}
|
|
27
26
|
});
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
return cacheRef.current.info.pathKeyEntities;
|
|
31
29
|
}, [fieldNames, options]);
|
|
32
30
|
return getEntities;
|
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import warning from 'rc-util/lib/warning';
|
|
4
|
-
|
|
3
|
+
import warning from 'rc-util/lib/warning';
|
|
4
|
+
// Convert `showSearch` to unique config
|
|
5
5
|
export default function useSearchConfig(showSearch) {
|
|
6
6
|
return React.useMemo(() => {
|
|
7
7
|
if (!showSearch) {
|
|
8
8
|
return [false, {}];
|
|
9
9
|
}
|
|
10
|
-
|
|
11
10
|
let searchConfig = {
|
|
12
11
|
matchInputWidth: true,
|
|
13
12
|
limit: 50
|
|
14
13
|
};
|
|
15
|
-
|
|
16
14
|
if (showSearch && typeof showSearch === 'object') {
|
|
17
15
|
searchConfig = Object.assign(Object.assign({}, searchConfig), showSearch);
|
|
18
16
|
}
|
|
19
|
-
|
|
20
17
|
if (searchConfig.limit <= 0) {
|
|
21
18
|
delete searchConfig.limit;
|
|
22
|
-
|
|
23
19
|
if (process.env.NODE_ENV !== 'production') {
|
|
24
20
|
warning(false, "'limit' of showSearch should be positive number or false.");
|
|
25
21
|
}
|
|
26
22
|
}
|
|
27
|
-
|
|
28
23
|
return [true, searchConfig];
|
|
29
24
|
}, [showSearch]);
|
|
30
25
|
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export const SEARCH_MARK = '__rc_cascader_search_mark__';
|
|
3
|
-
|
|
4
3
|
const defaultFilter = (search, options, {
|
|
5
4
|
label
|
|
6
5
|
}) => options.some(opt => String(opt[label]).toLowerCase().includes(search.toLowerCase()));
|
|
7
|
-
|
|
8
6
|
const defaultRender = (inputValue, path, prefixCls, fieldNames) => path.map(opt => opt[fieldNames.label]).join(' / ');
|
|
9
|
-
|
|
10
7
|
export default ((search, options, fieldNames, prefixCls, config, changeOnSelect) => {
|
|
11
8
|
const {
|
|
12
9
|
filter = defaultFilter,
|
|
@@ -16,23 +13,22 @@ export default ((search, options, fieldNames, prefixCls, config, changeOnSelect)
|
|
|
16
13
|
} = config;
|
|
17
14
|
return React.useMemo(() => {
|
|
18
15
|
const filteredOptions = [];
|
|
19
|
-
|
|
20
16
|
if (!search) {
|
|
21
17
|
return [];
|
|
22
18
|
}
|
|
23
|
-
|
|
24
19
|
function dig(list, pathOptions) {
|
|
25
20
|
list.forEach(option => {
|
|
26
21
|
// Perf saving when `sort` is disabled and `limit` is provided
|
|
27
22
|
if (!sort && limit > 0 && filteredOptions.length >= limit) {
|
|
28
23
|
return;
|
|
29
24
|
}
|
|
30
|
-
|
|
31
25
|
const connectedPathOptions = [...pathOptions, option];
|
|
32
|
-
const children = option[fieldNames.children];
|
|
33
|
-
|
|
34
|
-
if (
|
|
35
|
-
|
|
26
|
+
const children = option[fieldNames.children];
|
|
27
|
+
// If current option is filterable
|
|
28
|
+
if (
|
|
29
|
+
// If is leaf option
|
|
30
|
+
!children || children.length === 0 ||
|
|
31
|
+
// If is changeOnSelect
|
|
36
32
|
changeOnSelect) {
|
|
37
33
|
if (filter(search, connectedPathOptions, {
|
|
38
34
|
label: fieldNames.label
|
|
@@ -43,21 +39,18 @@ export default ((search, options, fieldNames, prefixCls, config, changeOnSelect)
|
|
|
43
39
|
}));
|
|
44
40
|
}
|
|
45
41
|
}
|
|
46
|
-
|
|
47
42
|
if (children) {
|
|
48
43
|
dig(option[fieldNames.children], connectedPathOptions);
|
|
49
44
|
}
|
|
50
45
|
});
|
|
51
46
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
dig(options, []);
|
|
48
|
+
// Do sort
|
|
55
49
|
if (sort) {
|
|
56
50
|
filteredOptions.sort((a, b) => {
|
|
57
51
|
return sort(a[SEARCH_MARK], b[SEARCH_MARK], search, fieldNames);
|
|
58
52
|
});
|
|
59
53
|
}
|
|
60
|
-
|
|
61
54
|
return limit > 0 ? filteredOptions.slice(0, limit) : filteredOptions;
|
|
62
55
|
}, [search, options, fieldNames, prefixCls, render, changeOnSelect, filter, sort, limit]);
|
|
63
56
|
});
|
|
@@ -25,20 +25,16 @@ export function fillFieldNames(fieldNames) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
export function isLeaf(option, fieldNames) {
|
|
28
|
-
var _a, _b;
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
var _a, _b;
|
|
29
|
+
// @ts-ignore
|
|
31
30
|
return (_a = option.isLeaf) !== null && _a !== void 0 ? _a : !((_b = option[fieldNames.children]) === null || _b === void 0 ? void 0 : _b.length);
|
|
32
31
|
}
|
|
33
32
|
export function scrollIntoParentView(element) {
|
|
34
33
|
const parent = element.parentElement;
|
|
35
|
-
|
|
36
34
|
if (!parent) {
|
|
37
35
|
return;
|
|
38
36
|
}
|
|
39
|
-
|
|
40
37
|
const elementToParent = element.offsetTop - parent.offsetTop; // offsetParent may not be parent.
|
|
41
|
-
|
|
42
38
|
if (elementToParent - parent.scrollTop < 0) {
|
|
43
39
|
parent.scrollTo({
|
|
44
40
|
top: elementToParent
|
|
@@ -9,13 +9,12 @@ export function formatStrategyValues(pathKeys, getKeyPathEntities, showCheckedSt
|
|
|
9
9
|
return showCheckedStrategy === SHOW_CHILD ? !(children && children.some(child => child.key && valueSet.has(child.key))) : !(parent && !parent.node.disabled && valueSet.has(parent.key));
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
export function toPathOptions(valueCells, options, fieldNames,
|
|
12
|
+
export function toPathOptions(valueCells, options, fieldNames,
|
|
13
|
+
// Used for loadingKeys which saved loaded keys as string
|
|
13
14
|
stringMode = false) {
|
|
14
15
|
var _a;
|
|
15
|
-
|
|
16
16
|
let currentList = options;
|
|
17
17
|
const valueOptions = [];
|
|
18
|
-
|
|
19
18
|
for (let i = 0; i < valueCells.length; i += 1) {
|
|
20
19
|
const valueCell = valueCells[i];
|
|
21
20
|
const foundIndex = currentList === null || currentList === void 0 ? void 0 : currentList.findIndex(option => {
|
|
@@ -31,6 +30,5 @@ stringMode = false) {
|
|
|
31
30
|
});
|
|
32
31
|
currentList = foundOption === null || foundOption === void 0 ? void 0 : foundOption[fieldNames.children];
|
|
33
32
|
}
|
|
34
|
-
|
|
35
33
|
return valueOptions;
|
|
36
34
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import warning from 'rc-util/lib/warning';
|
|
3
|
-
|
|
4
3
|
function warningProps(props) {
|
|
5
4
|
const {
|
|
6
5
|
onPopupVisibleChange,
|
|
@@ -12,26 +11,22 @@ function warningProps(props) {
|
|
|
12
11
|
warning(popupVisible === undefined, '`popupVisible` is deprecated. Please use `open` instead.');
|
|
13
12
|
warning(popupClassName === undefined, '`popupClassName` is deprecated. Please use `dropdownClassName` instead.');
|
|
14
13
|
warning(popupPlacement === undefined, '`popupPlacement` is deprecated. Please use `placement` instead.');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
}
|
|
15
|
+
// value in Cascader options should not be null
|
|
18
16
|
export function warningNullOptions(options, fieldNames) {
|
|
19
17
|
if (options) {
|
|
20
18
|
const recursiveOptions = optionsList => {
|
|
21
19
|
for (let i = 0; i < optionsList.length; i++) {
|
|
22
20
|
const option = optionsList[i];
|
|
23
|
-
|
|
24
21
|
if (option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value] === null) {
|
|
25
22
|
warning(false, '`value` in Cascader options should not be `null`.');
|
|
26
23
|
return true;
|
|
27
24
|
}
|
|
28
|
-
|
|
29
25
|
if (Array.isArray(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]) && recursiveOptions(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children])) {
|
|
30
26
|
return true;
|
|
31
27
|
}
|
|
32
28
|
}
|
|
33
29
|
};
|
|
34
|
-
|
|
35
30
|
recursiveOptions(options);
|
|
36
31
|
}
|
|
37
32
|
}
|