tntd 2.0.12 → 2.0.13
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 +4 -8
- 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 -14
- package/es/empty/empty.js.map +1 -1
- 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/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.js +6 -16
- 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.d.ts.map +1 -1
- package/lib/empty/empty.js +14 -31
- package/lib/empty/empty.js.map +1 -1
- 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.js +4 -11
- 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 +7 -4
package/es/tntd-layout/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
var __rest = this && this.__rest || function (s, e) {
|
|
2
2
|
var t = {};
|
|
3
|
-
|
|
4
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
-
|
|
6
4
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
5
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
8
6
|
}
|
|
9
7
|
return t;
|
|
10
8
|
};
|
|
11
|
-
|
|
12
9
|
import React from 'react';
|
|
13
10
|
import { ThemeProvider } from 'styled-components';
|
|
14
11
|
import Layout from './Layout';
|
|
@@ -23,15 +20,13 @@ import createActions from './createActions';
|
|
|
23
20
|
import { getLanguageStore } from './storage';
|
|
24
21
|
export const HeaderActionItem = props => React.createElement("li", Object.assign({}, props), props.children);
|
|
25
22
|
export * from './HeaderNavs';
|
|
26
|
-
|
|
27
23
|
const TNTLayout = _a => {
|
|
28
24
|
var {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
type,
|
|
26
|
+
config,
|
|
27
|
+
showMenuInIframe = false
|
|
28
|
+
} = _a,
|
|
29
|
+
props = __rest(_a, ["type", "config", "showMenuInIframe"]);
|
|
35
30
|
const headerHeight = props.size === 'large' ? 60 : 50;
|
|
36
31
|
const theme = {
|
|
37
32
|
size: props.size,
|
|
@@ -47,10 +42,10 @@ const TNTLayout = _a => {
|
|
|
47
42
|
dividerColor: '#E1E6EE',
|
|
48
43
|
lightBgColor: '#F1F2F5',
|
|
49
44
|
blueBgColor: '#1D4295' // 默认的蓝色主题
|
|
50
|
-
|
|
51
45
|
};
|
|
52
|
-
const isInIframe = showMenuInIframe ? false : self !== top && !window.navigator.userAgent.includes('mo-fang-app'); // 前期拼写错误,导致需要兼容处理
|
|
53
46
|
|
|
47
|
+
const isInIframe = showMenuInIframe ? false : self !== top && !window.navigator.userAgent.includes('mo-fang-app');
|
|
48
|
+
// 前期拼写错误,导致需要兼容处理
|
|
54
49
|
const extraHeaderActions = props.extraHeaderActions || props.extralHeaderActions;
|
|
55
50
|
const extendMap = typeof props.extendMap === 'string' ? safeParseJSON(props.extendMap, {}) : props.extendMap;
|
|
56
51
|
const {
|
|
@@ -64,13 +59,11 @@ const TNTLayout = _a => {
|
|
|
64
59
|
const actionsContextValue = createActions({
|
|
65
60
|
language: getLanguageStore() || userInfo.lang || 'cn'
|
|
66
61
|
});
|
|
67
|
-
|
|
68
62
|
const onLanguageChange = language => {
|
|
69
63
|
actionsContextValue.setLanguage(language);
|
|
70
64
|
props.onLanguageChange && props.onLanguageChange(language);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
};
|
|
66
|
+
// layout上的指定的属性优先级会高于extendMap中的属性
|
|
74
67
|
type = type || displayType;
|
|
75
68
|
config = Object.assign({
|
|
76
69
|
language: (language === null || language === void 0 ? void 0 : language.length) > 1,
|
|
@@ -111,7 +104,6 @@ const TNTLayout = _a => {
|
|
|
111
104
|
onLanguageChange: onLanguageChange
|
|
112
105
|
})))));
|
|
113
106
|
};
|
|
114
|
-
|
|
115
107
|
TNTLayout.HeaderActionItem = HeaderActionItem;
|
|
116
108
|
TNTLayout.HeaderNavs = HeaderNavs;
|
|
117
109
|
TNTLayout.HeaderTabs = HeaderTabs;
|
|
@@ -107,29 +107,22 @@ export default (props => {
|
|
|
107
107
|
onSelect
|
|
108
108
|
} = props;
|
|
109
109
|
const [activeMenu, setActiveMenu] = useState(selectedKey);
|
|
110
|
-
|
|
111
110
|
const defaultBeforeChange = ({
|
|
112
111
|
data
|
|
113
112
|
}) => !isNewTabMenu(data);
|
|
114
|
-
|
|
115
113
|
const defaultSelect = ({
|
|
116
114
|
data
|
|
117
115
|
}) => {
|
|
118
116
|
var _a;
|
|
119
|
-
|
|
120
117
|
const {
|
|
121
118
|
path
|
|
122
119
|
} = data || {};
|
|
123
|
-
|
|
124
120
|
const formatPath = formatMenuPath || (path => path);
|
|
125
|
-
|
|
126
121
|
if (isNewTabMenu(data)) {
|
|
127
122
|
openInNewTab(formatPath(data === null || data === void 0 ? void 0 : data.path, data));
|
|
128
123
|
return;
|
|
129
124
|
}
|
|
130
|
-
|
|
131
125
|
const routerPrefix = (_a = window.location.pathname.match(/(^\/[^\/]+)/i)) === null || _a === void 0 ? void 0 : _a[1];
|
|
132
|
-
|
|
133
126
|
if (window.location.pathname.startsWith(routerPrefix)) {
|
|
134
127
|
const forwardPath = formatPath(path, data);
|
|
135
128
|
changeRouter ? changeRouter(forwardPath, data) : window.history.pushState(data, data === null || data === void 0 ? void 0 : data.name, forwardPath);
|
|
@@ -137,21 +130,17 @@ export default (props => {
|
|
|
137
130
|
window.location.href = formatPath(path, data);
|
|
138
131
|
}
|
|
139
132
|
};
|
|
140
|
-
|
|
141
133
|
const selectMenu = (param = {}) => {
|
|
142
134
|
const finalBeforeChange = onBeforeChange || defaultBeforeChange;
|
|
143
135
|
const finalSelect = onSelect || defaultSelect;
|
|
144
|
-
|
|
145
136
|
if (param.key !== activeMenu) {
|
|
146
137
|
if (finalBeforeChange(param, activeMenu)) {
|
|
147
138
|
setActiveMenu(param.key);
|
|
148
139
|
onChange && onChange(param);
|
|
149
140
|
}
|
|
150
141
|
}
|
|
151
|
-
|
|
152
142
|
finalSelect(param);
|
|
153
143
|
};
|
|
154
|
-
|
|
155
144
|
const MenuItem = ({
|
|
156
145
|
item
|
|
157
146
|
}) => {
|
|
@@ -161,7 +150,6 @@ export default (props => {
|
|
|
161
150
|
enName,
|
|
162
151
|
children = []
|
|
163
152
|
} = item;
|
|
164
|
-
|
|
165
153
|
const SubMenuItem = ({
|
|
166
154
|
menu
|
|
167
155
|
}) => {
|
|
@@ -188,7 +176,6 @@ export default (props => {
|
|
|
188
176
|
en: enName
|
|
189
177
|
}[language]));
|
|
190
178
|
};
|
|
191
|
-
|
|
192
179
|
if (groupName && children.length) {
|
|
193
180
|
return React.createElement("li", {
|
|
194
181
|
key: code,
|
|
@@ -203,12 +190,10 @@ export default (props => {
|
|
|
203
190
|
key: subItem === null || subItem === void 0 ? void 0 : subItem.code
|
|
204
191
|
}))));
|
|
205
192
|
}
|
|
206
|
-
|
|
207
193
|
return React.createElement(SubMenuItem, {
|
|
208
194
|
menu: item
|
|
209
195
|
});
|
|
210
196
|
};
|
|
211
|
-
|
|
212
197
|
useEffect(() => {
|
|
213
198
|
setActiveMenu(selectedKey);
|
|
214
199
|
}, [selectedKey]);
|
|
@@ -76,29 +76,22 @@ export default (props => {
|
|
|
76
76
|
onSelect
|
|
77
77
|
} = props;
|
|
78
78
|
const [activeMenu, setActiveMenu] = useState(selectedKey);
|
|
79
|
-
|
|
80
79
|
const defaultBeforeChange = ({
|
|
81
80
|
data
|
|
82
81
|
}) => !isNewTabMenu(data);
|
|
83
|
-
|
|
84
82
|
const defaultSelect = ({
|
|
85
83
|
data
|
|
86
84
|
}) => {
|
|
87
85
|
var _a;
|
|
88
|
-
|
|
89
86
|
const {
|
|
90
87
|
path
|
|
91
88
|
} = data || {};
|
|
92
|
-
|
|
93
89
|
const formatPath = formatMenuPath || (path => path);
|
|
94
|
-
|
|
95
90
|
if (isNewTabMenu(data)) {
|
|
96
91
|
openInNewTab(formatPath(data === null || data === void 0 ? void 0 : data.path, data));
|
|
97
92
|
return;
|
|
98
93
|
}
|
|
99
|
-
|
|
100
94
|
const routerPrefix = (_a = window.location.pathname.match(/(^\/[^\/]+)/i)) === null || _a === void 0 ? void 0 : _a[1];
|
|
101
|
-
|
|
102
95
|
if (window.location.pathname.startsWith(routerPrefix)) {
|
|
103
96
|
const forwardPath = formatPath(path, data);
|
|
104
97
|
changeRouter ? changeRouter(forwardPath, data) : window.history.pushState(data, data === null || data === void 0 ? void 0 : data.name, forwardPath);
|
|
@@ -106,21 +99,17 @@ export default (props => {
|
|
|
106
99
|
window.location.href = formatPath(path, data);
|
|
107
100
|
}
|
|
108
101
|
};
|
|
109
|
-
|
|
110
102
|
const selectMenu = (param = {}) => {
|
|
111
103
|
const finalBeforeChange = onBeforeChange || defaultBeforeChange;
|
|
112
104
|
const finalSelect = onSelect || defaultSelect;
|
|
113
|
-
|
|
114
105
|
if (param.key !== activeMenu) {
|
|
115
106
|
if (finalBeforeChange(param, activeMenu)) {
|
|
116
107
|
setActiveMenu(param.key);
|
|
117
108
|
onChange && onChange(param);
|
|
118
109
|
}
|
|
119
110
|
}
|
|
120
|
-
|
|
121
111
|
finalSelect(param);
|
|
122
112
|
};
|
|
123
|
-
|
|
124
113
|
const MenuItem = ({
|
|
125
114
|
item
|
|
126
115
|
}) => {
|
|
@@ -130,7 +119,6 @@ export default (props => {
|
|
|
130
119
|
enName,
|
|
131
120
|
children = []
|
|
132
121
|
} = item;
|
|
133
|
-
|
|
134
122
|
const SubMenuItem = ({
|
|
135
123
|
menu
|
|
136
124
|
}) => {
|
|
@@ -161,7 +149,6 @@ export default (props => {
|
|
|
161
149
|
en: enName
|
|
162
150
|
}[language])));
|
|
163
151
|
};
|
|
164
|
-
|
|
165
152
|
if (groupName && children.length) {
|
|
166
153
|
return React.createElement("li", {
|
|
167
154
|
key: code
|
|
@@ -173,12 +160,10 @@ export default (props => {
|
|
|
173
160
|
key: subItem === null || subItem === void 0 ? void 0 : subItem.code
|
|
174
161
|
}))));
|
|
175
162
|
}
|
|
176
|
-
|
|
177
163
|
return React.createElement(SubMenuItem, {
|
|
178
164
|
menu: item
|
|
179
165
|
});
|
|
180
166
|
};
|
|
181
|
-
|
|
182
167
|
useEffect(() => {
|
|
183
168
|
setActiveMenu(selectedKey);
|
|
184
169
|
}, [selectedKey]);
|
|
@@ -45,9 +45,7 @@ const TNTPaasLayout = styled(Layout)`
|
|
|
45
45
|
background: ${props => props.theme.lightBgColor};
|
|
46
46
|
}
|
|
47
47
|
`;
|
|
48
|
-
|
|
49
48
|
const noop = () => true;
|
|
50
|
-
|
|
51
49
|
export default withTheme(props => {
|
|
52
50
|
const {
|
|
53
51
|
appKey,
|
|
@@ -79,8 +77,8 @@ export default withTheme(props => {
|
|
|
79
77
|
onHeaderNavChange = noop
|
|
80
78
|
} = props;
|
|
81
79
|
const [userInfo, setUserInfo] = useState(props.userInfo || {});
|
|
82
|
-
let theme = getThemeStore() || userInfo.theme || 'themeS2';
|
|
83
|
-
|
|
80
|
+
let theme = getThemeStore() || userInfo.theme || 'themeS2';
|
|
81
|
+
// theme === 'default' ? 'themeS2' : theme;
|
|
84
82
|
theme = ['default', 'themeS3'].includes(theme) ? 'themeS2' : theme;
|
|
85
83
|
const language = getLanguageStore() || userInfo.lang || 'cn';
|
|
86
84
|
const menusMapByApp = menus.reduce((acc, menu) => {
|
|
@@ -90,26 +88,21 @@ export default withTheme(props => {
|
|
|
90
88
|
path
|
|
91
89
|
} = subMenu;
|
|
92
90
|
const appKey = !/^http/i.test(path) ? path === null || path === void 0 ? void 0 : path.match(/\/([^\/]+)/)[1] : '';
|
|
93
|
-
|
|
94
91
|
if (appKey) {
|
|
95
92
|
acc[appKey] = acc[appKey] || Object.assign(Object.assign({}, menu), {
|
|
96
93
|
children: []
|
|
97
94
|
});
|
|
98
95
|
acc[appKey].children.push(subMenu);
|
|
99
96
|
}
|
|
100
|
-
|
|
101
97
|
return acc;
|
|
102
98
|
}, {});
|
|
103
|
-
|
|
104
99
|
for (const appKey in singleGroupMap) {
|
|
105
100
|
acc[appKey] = acc[appKey] || [];
|
|
106
101
|
acc[appKey].push(singleGroupMap[appKey]);
|
|
107
102
|
}
|
|
108
|
-
|
|
109
103
|
return acc;
|
|
110
104
|
}, {});
|
|
111
105
|
const [currentAppKey, setCurrentAppKey] = useState(appKey);
|
|
112
|
-
|
|
113
106
|
const apps = _reduce(menusMapByApp, (acc, value, key) => {
|
|
114
107
|
acc.push({
|
|
115
108
|
appKey: key,
|
|
@@ -117,7 +110,6 @@ export default withTheme(props => {
|
|
|
117
110
|
});
|
|
118
111
|
return acc;
|
|
119
112
|
}, []);
|
|
120
|
-
|
|
121
113
|
const isMenusTop = menuAlignMode === 'top';
|
|
122
114
|
let headerNavMenus = headerNavs;
|
|
123
115
|
const currentSystemMenus = menusMapByApp[currentAppKey] || [];
|
|
@@ -125,8 +117,8 @@ export default withTheme(props => {
|
|
|
125
117
|
const sideMenus = isMenusTop ? _get(currentSystemMenus.find(({
|
|
126
118
|
code
|
|
127
119
|
}) => currentHeaderNavKey === code), 'children', []) : currentSystemMenus;
|
|
128
|
-
const FinalSideMenu = isMenusTop ? CompactSideMenu : SideMenu;
|
|
129
|
-
|
|
120
|
+
const FinalSideMenu = isMenusTop ? CompactSideMenu : SideMenu;
|
|
121
|
+
// 一级菜单放在顶部(Header里面菜单作为一级导航)
|
|
130
122
|
if (isMenusTop) {
|
|
131
123
|
headerNavMenus = React.createElement(HeaderNavs, {
|
|
132
124
|
selectedKey: currentHeaderNavKey,
|
|
@@ -140,7 +132,6 @@ export default withTheme(props => {
|
|
|
140
132
|
}
|
|
141
133
|
});
|
|
142
134
|
}
|
|
143
|
-
|
|
144
135
|
useEffect(() => {
|
|
145
136
|
setUserInfo(props.userInfo);
|
|
146
137
|
}, [props.userInfo]);
|
|
@@ -16,9 +16,9 @@ export const getCurrentOrgStore = () => safeParseJSON(localStorage.getItem('curr
|
|
|
16
16
|
export const setCurrentOrgTreeStore = (currentOrgTree = []) => {
|
|
17
17
|
localStorage.setItem('currentOrgTree', JSON.stringify(currentOrgTree));
|
|
18
18
|
};
|
|
19
|
-
export const getCurrentOrgTreeStore = () => safeParseJSON(localStorage.getItem('currentOrgTree'), []);
|
|
19
|
+
export const getCurrentOrgTreeStore = () => safeParseJSON(localStorage.getItem('currentOrgTree'), []);
|
|
20
|
+
// export const setLanguageStore = (lang) => localStorage.setItem('lang', lang)
|
|
20
21
|
// export const getLanguageStore = () => localStorage.getItem('lang')
|
|
21
|
-
|
|
22
22
|
export const setLanguageStore = lang => cookies.set('lang', lang, {
|
|
23
23
|
path: '/'
|
|
24
24
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tntd-layout/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
package/es/tntd-modal/index.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
var __rest = this && this.__rest || function (s, e) {
|
|
2
2
|
var t = {};
|
|
3
|
-
|
|
4
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
-
|
|
6
4
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
5
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
8
6
|
}
|
|
9
7
|
return t;
|
|
10
8
|
};
|
|
11
|
-
|
|
12
9
|
import cn from 'classnames';
|
|
13
10
|
import React, { Fragment, useEffect, useState } from 'react';
|
|
14
11
|
import Modal from '../modal';
|
|
15
12
|
import Icon from '../tntd-icon';
|
|
16
13
|
import './index.less';
|
|
17
|
-
|
|
18
14
|
const Title = ({
|
|
19
15
|
title,
|
|
20
16
|
logo,
|
|
@@ -37,22 +33,20 @@ const Title = ({
|
|
|
37
33
|
onClick: onClose
|
|
38
34
|
})));
|
|
39
35
|
};
|
|
40
|
-
|
|
41
36
|
export default (props => {
|
|
42
37
|
const {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
visible,
|
|
39
|
+
children,
|
|
40
|
+
logo,
|
|
41
|
+
title,
|
|
42
|
+
height = '90vh',
|
|
43
|
+
width = '85%',
|
|
44
|
+
className,
|
|
45
|
+
supportFullscreen,
|
|
46
|
+
onToggleFullscreen,
|
|
47
|
+
onCancel
|
|
48
|
+
} = props,
|
|
49
|
+
rest = __rest(props, ["visible", "children", "logo", "title", "height", "width", "className", "supportFullscreen", "onToggleFullscreen", "onCancel"]);
|
|
56
50
|
const [fullscreen, setFullscreen] = useState(rest.fullscreen || false);
|
|
57
51
|
useEffect(() => {
|
|
58
52
|
setFullscreen(rest.fullscreen);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tntd-modal/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -3,9 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
|
|
4
4
|
import Icon from '../icon';
|
|
5
5
|
import './index.less';
|
|
6
|
-
|
|
7
6
|
const empty = () => {};
|
|
8
|
-
|
|
9
7
|
export default function TntdSecondPage({
|
|
10
8
|
title,
|
|
11
9
|
header,
|
|
@@ -22,7 +20,6 @@ export default function TntdSecondPage({
|
|
|
22
20
|
if (!visible && destroyOnClose) {
|
|
23
21
|
return null;
|
|
24
22
|
}
|
|
25
|
-
|
|
26
23
|
return React.createElement(LocaleReceiver, {
|
|
27
24
|
componentName: "TntdSecondPage"
|
|
28
25
|
}, locale => {
|
|
@@ -39,7 +39,6 @@ export default class DropDownWrap extends PureComponent {
|
|
|
39
39
|
endIndex
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
|
|
43
42
|
componentDidUpdate(prevProps) {
|
|
44
43
|
if (this.props.allHeight !== prevProps.allHeight) {
|
|
45
44
|
this.setState({
|
|
@@ -47,7 +46,6 @@ export default class DropDownWrap extends PureComponent {
|
|
|
47
46
|
});
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
|
-
|
|
51
49
|
render() {
|
|
52
50
|
const {
|
|
53
51
|
menu
|
|
@@ -56,17 +54,16 @@ export default class DropDownWrap extends PureComponent {
|
|
|
56
54
|
startIndex,
|
|
57
55
|
endIndex,
|
|
58
56
|
allHeight
|
|
59
|
-
} = this.state;
|
|
60
|
-
|
|
57
|
+
} = this.state;
|
|
58
|
+
// 截取 Select 下拉列表中需要显示的部分
|
|
61
59
|
const cloneMenu = React.cloneElement(menu, {
|
|
62
60
|
menuItems: menu.props.menuItems.slice(startIndex, endIndex).map((item, i) => {
|
|
63
61
|
const realIndex = (startIndex || 0) + Number(i);
|
|
64
|
-
const style = this.getItemStyle(realIndex);
|
|
65
|
-
|
|
62
|
+
const style = this.getItemStyle(realIndex);
|
|
63
|
+
// 未搜到数据提示高度使用默认高度
|
|
66
64
|
if (item.key === 'NOT_FOUND') {
|
|
67
65
|
delete style.height;
|
|
68
66
|
}
|
|
69
|
-
|
|
70
67
|
return React.cloneElement(item, {
|
|
71
68
|
style: Object.assign(Object.assign({}, item.props.style), style)
|
|
72
69
|
});
|
|
@@ -79,5 +76,4 @@ export default class DropDownWrap extends PureComponent {
|
|
|
79
76
|
});
|
|
80
77
|
return cloneMenu;
|
|
81
78
|
}
|
|
82
|
-
|
|
83
79
|
}
|