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