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
package/lib/tntd-icon/index.js
CHANGED
|
@@ -3,45 +3,35 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports["default"] = void 0;
|
|
6
7
|
Object.defineProperty(exports, "iconList", {
|
|
7
8
|
enumerable: true,
|
|
8
9
|
get: function get() {
|
|
9
10
|
return _iconList["default"];
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
|
-
exports["default"] = void 0;
|
|
13
|
-
|
|
14
13
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
14
|
require("./fonts/iconfont");
|
|
17
|
-
|
|
18
15
|
require("./index.less");
|
|
19
|
-
|
|
20
16
|
var _iconList = _interopRequireDefault(require("../icon-list"));
|
|
21
|
-
|
|
22
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
-
|
|
24
18
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
25
19
|
var t = {};
|
|
26
|
-
|
|
27
20
|
for (var p in s) {
|
|
28
21
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
29
22
|
}
|
|
30
|
-
|
|
31
23
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
32
24
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
33
25
|
}
|
|
34
26
|
return t;
|
|
35
27
|
};
|
|
36
|
-
|
|
37
28
|
var _default = function _default(_a) {
|
|
38
29
|
var type = _a.type,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
30
|
+
_a$prefix = _a.prefix,
|
|
31
|
+
prefix = _a$prefix === void 0 ? 'tnt-' : _a$prefix,
|
|
32
|
+
_a$className = _a.className,
|
|
33
|
+
className = _a$className === void 0 ? '' : _a$className,
|
|
34
|
+
props = __rest(_a, ["type", "prefix", "className"]);
|
|
45
35
|
return _react["default"].createElement("i", Object.assign({
|
|
46
36
|
className: "tnt-icon ".concat(className),
|
|
47
37
|
type: type
|
|
@@ -51,5 +41,4 @@ var _default = function _default(_a) {
|
|
|
51
41
|
xlinkHref: "#".concat(prefix).concat(type)
|
|
52
42
|
})));
|
|
53
43
|
};
|
|
54
|
-
|
|
55
44
|
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tntd-icon/style/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tntd-icon/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
// import createActions from './createActions';
|
|
11
9
|
var _default = (0, _react.createContext)({});
|
|
12
|
-
|
|
13
10
|
exports["default"] = _default;
|
|
@@ -1,115 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) {
|
|
4
|
-
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
15
|
-
|
|
16
11
|
var _dropdown = _interopRequireDefault(require("../dropdown"));
|
|
17
|
-
|
|
18
12
|
var _menu = _interopRequireDefault(require("../menu"));
|
|
19
|
-
|
|
20
13
|
var _input = _interopRequireDefault(require("../input"));
|
|
21
|
-
|
|
22
14
|
var _select = _interopRequireDefault(require("../select"));
|
|
23
|
-
|
|
24
15
|
var _treeSelect = _interopRequireDefault(require("../tree-select"));
|
|
25
|
-
|
|
26
16
|
var _tntdIcon = _interopRequireDefault(require("../tntd-icon"));
|
|
27
|
-
|
|
28
17
|
var _storage = require("./storage");
|
|
29
|
-
|
|
30
18
|
var _utils = require("../utils");
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
19
|
+
var _templateObject,
|
|
20
|
+
_templateObject2,
|
|
21
|
+
_templateObject3,
|
|
22
|
+
_templateObject4,
|
|
23
|
+
_this = void 0;
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
38
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
|
-
|
|
27
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
28
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
30
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
31
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
46
32
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
-
|
|
48
|
-
function _templateObject4() {
|
|
49
|
-
var data = _taggedTemplateLiteral(["\n display: block;\n color: #666;\n line-height: ", ";\n font-size: ", ";\n\n .tnt-themeS1 & {\n color: rgba(255, 255, 255, 0.85);\n }\n &:hover {\n color: #666;\n }\n i {\n margin-left: 12px;\n }\n"]);
|
|
50
|
-
|
|
51
|
-
_templateObject4 = function _templateObject4() {
|
|
52
|
-
return data;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function _templateObject3() {
|
|
59
|
-
var data = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n"]);
|
|
60
|
-
|
|
61
|
-
_templateObject3 = function _templateObject3() {
|
|
62
|
-
return data;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return data;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function _templateObject2() {
|
|
69
|
-
var data = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n .ant-select-selection,\n .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u53BB\u6389\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u4E3A\u6D45\u8272\u8C03\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n }\n // \u7EDF\u4E00\u8272\u8C03\n // .tnt-themeS1.hasHeaderTabs & {\n // /* background: #141825; */\n // /* color: rgba(255,255,255,.85); */\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #b2becd;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"]);
|
|
70
|
-
|
|
71
|
-
_templateObject2 = function _templateObject2() {
|
|
72
|
-
return data;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
return data;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function _templateObject() {
|
|
79
|
-
var data = _taggedTemplateLiteral(["\n border-radius: 0;\n min-width: 250px;\n max-height: 350px;\n overflow-y: auto;\n border: 1px solid #ccc;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;\n .ant-dropdown-menu-item {\n padding: 0 20px;\n height: 44px;\n line-height: 44px;\n &:hover {\n background: rgba(0, 0, 0, 0.1);\n }\n &.app-search-warp {\n padding: 0;\n &:hover {\n background: none;\n }\n .ant-input-affix-wrapper {\n height: 100%;\n }\n .ant-input {\n border: none;\n border-bottom: 1px dashed #dcdcdc;\n box-shadow: none;\n padding: 0 20px;\n }\n }\n i {\n margin-right: 0 !important;\n margin-left: 6px !important;\n }\n }\n .isInIframe & {\n margin-left: 20px;\n }\n"]);
|
|
80
|
-
|
|
81
|
-
_templateObject = function _templateObject() {
|
|
82
|
-
return data;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
return data;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
33
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
89
|
-
|
|
90
34
|
var Option = _select["default"].Option;
|
|
91
|
-
var MenuList = (0, _styledComponents["default"])(_menu["default"])(_templateObject())
|
|
92
|
-
|
|
93
|
-
var AppsSelect = (0, _styledComponents["default"])(_select["default"])(_templateObject2(), function (props) {
|
|
35
|
+
var MenuList = (0, _styledComponents["default"])(_menu["default"])(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 0;\n min-width: 250px;\n max-height: 350px;\n overflow-y: auto;\n border: 1px solid #ccc;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;\n .ant-dropdown-menu-item {\n padding: 0 20px;\n height: 44px;\n line-height: 44px;\n &:hover {\n background: rgba(0, 0, 0, 0.1);\n }\n &.app-search-warp {\n padding: 0;\n &:hover {\n background: none;\n }\n .ant-input-affix-wrapper {\n height: 100%;\n }\n .ant-input {\n border: none;\n border-bottom: 1px dashed #dcdcdc;\n box-shadow: none;\n padding: 0 20px;\n }\n }\n i {\n margin-right: 0 !important;\n margin-left: 6px !important;\n }\n }\n .isInIframe & {\n margin-left: 20px;\n }\n"])));
|
|
36
|
+
// 新版UI
|
|
37
|
+
var AppsSelect = (0, _styledComponents["default"])(_select["default"])(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n .ant-select-selection,\n .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u53BB\u6389\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u4E3A\u6D45\u8272\u8C03\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n }\n // \u7EDF\u4E00\u8272\u8C03\n // .tnt-themeS1.hasHeaderTabs & {\n // /* background: #141825; */\n // /* color: rgba(255,255,255,.85); */\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #b2becd;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"])), function (props) {
|
|
94
38
|
return "".concat(props.theme.blueBgColor, " !important");
|
|
95
39
|
});
|
|
96
|
-
var AppTreeSelect = (0, _styledComponents["default"])(_treeSelect["default"])(_templateObject3());
|
|
97
|
-
|
|
98
|
-
var SwitchAppMenu = _styledComponents["default"].a(_templateObject4(), function (props) {
|
|
40
|
+
var AppTreeSelect = (0, _styledComponents["default"])(_treeSelect["default"])(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n"])));
|
|
41
|
+
var SwitchAppMenu = _styledComponents["default"].a(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: block;\n color: #666;\n line-height: ", ";\n font-size: ", ";\n\n .tnt-themeS1 & {\n color: rgba(255, 255, 255, 0.85);\n }\n &:hover {\n color: #666;\n }\n i {\n margin-left: 12px;\n }\n"])), function (props) {
|
|
99
42
|
return "".concat(props.theme.headerHeight, "px");
|
|
100
43
|
}, function (props) {
|
|
101
44
|
return "".concat(props.theme.size === 'large' ? 16 : 14, "px");
|
|
102
45
|
});
|
|
103
|
-
|
|
104
46
|
var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
105
47
|
var selectedKey = props.selectedKey,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
48
|
+
_props$items = props.items,
|
|
49
|
+
items = _props$items === void 0 ? [] : _props$items,
|
|
50
|
+
onChange = props.onChange;
|
|
110
51
|
var getInitialSelectedApp = function getInitialSelectedApp() {
|
|
111
52
|
var currentAppStore = (0, _storage.getCurrentAppStore)();
|
|
112
|
-
|
|
113
53
|
var findAppByKey = function findAppByKey(selectedKey) {
|
|
114
54
|
var findApp;
|
|
115
55
|
(0, _utils.traverseTree)(items, function (item) {
|
|
@@ -120,27 +60,22 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
120
60
|
});
|
|
121
61
|
return findApp;
|
|
122
62
|
};
|
|
123
|
-
|
|
124
63
|
var currentApp = findAppByKey(selectedKey || (0, _get2["default"])(currentAppStore, 'key'));
|
|
125
64
|
return currentApp || items[0];
|
|
126
65
|
};
|
|
127
|
-
|
|
128
66
|
var changeApp = function changeApp(app) {
|
|
129
67
|
setSelectedApp(app);
|
|
130
68
|
(0, _storage.setCurrentAppStore)(app);
|
|
131
69
|
onChange && onChange(app);
|
|
132
70
|
};
|
|
133
|
-
|
|
134
71
|
var _useState = (0, _react.useState)(),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
72
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
73
|
+
searchValue = _useState2[0],
|
|
74
|
+
setSearchValue = _useState2[1];
|
|
139
75
|
var _useState3 = (0, _react.useState)(getInitialSelectedApp()),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
76
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
77
|
+
selectedApp = _useState4[0],
|
|
78
|
+
setSelectedApp = _useState4[1];
|
|
144
79
|
var Menus = _react["default"].createElement(MenuList, {
|
|
145
80
|
selectedKeys: [(0, _get2["default"])(selectedApp, 'key')]
|
|
146
81
|
}, _react["default"].createElement(_menu["default"].Item, {
|
|
@@ -156,15 +91,12 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
156
91
|
}
|
|
157
92
|
})), items.filter(function () {
|
|
158
93
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
94
|
+
key = _ref.key,
|
|
95
|
+
name = _ref.name;
|
|
162
96
|
var regExp = new RegExp(searchValue, 'i');
|
|
163
|
-
|
|
164
97
|
if (searchValue) {
|
|
165
98
|
return regExp.test(key) || regExp.test(name);
|
|
166
99
|
}
|
|
167
|
-
|
|
168
100
|
return true;
|
|
169
101
|
}).map(function (item) {
|
|
170
102
|
return _react["default"].createElement(_menu["default"].Item, {
|
|
@@ -172,19 +104,15 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
172
104
|
onClick: changeApp.bind(_this, item)
|
|
173
105
|
}, item.name);
|
|
174
106
|
}));
|
|
175
|
-
|
|
176
107
|
(0, _react.useEffect)(function () {
|
|
177
108
|
var newApp = getInitialSelectedApp();
|
|
178
|
-
|
|
179
109
|
if ((newApp === null || newApp === void 0 ? void 0 : newApp.key) !== (selectedApp === null || selectedApp === void 0 ? void 0 : selectedApp.key)) {
|
|
180
110
|
changeApp(newApp);
|
|
181
111
|
}
|
|
182
112
|
}, [items, selectedKey]);
|
|
183
|
-
|
|
184
113
|
if (!props.theme.compatible) {
|
|
185
114
|
if (items === null || items === void 0 ? void 0 : items.some(function (item) {
|
|
186
115
|
var _a;
|
|
187
|
-
|
|
188
116
|
return (_a = item.children) === null || _a === void 0 ? void 0 : _a.length;
|
|
189
117
|
})) {
|
|
190
118
|
return _react["default"].createElement(AppTreeSelect, {
|
|
@@ -220,7 +148,6 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
220
148
|
}
|
|
221
149
|
});
|
|
222
150
|
}
|
|
223
|
-
|
|
224
151
|
return _react["default"].createElement(AppsSelect, {
|
|
225
152
|
placeholder: "\u8BF7\u9009\u62E9",
|
|
226
153
|
showSearch: true,
|
|
@@ -239,14 +166,13 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
239
166
|
}
|
|
240
167
|
}, items.map(function (_ref3) {
|
|
241
168
|
var key = _ref3.key,
|
|
242
|
-
|
|
169
|
+
name = _ref3.name;
|
|
243
170
|
return _react["default"].createElement(Option, {
|
|
244
171
|
key: key,
|
|
245
172
|
value: key
|
|
246
173
|
}, name);
|
|
247
174
|
}));
|
|
248
175
|
}
|
|
249
|
-
|
|
250
176
|
return _react["default"].createElement(_dropdown["default"], {
|
|
251
177
|
overlay: Menus,
|
|
252
178
|
trigger: ['click']
|
|
@@ -254,5 +180,4 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
254
180
|
type: "caret-down"
|
|
255
181
|
})));
|
|
256
182
|
});
|
|
257
|
-
|
|
258
183
|
exports["default"] = _default;
|
|
@@ -1,109 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) {
|
|
4
|
-
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
11
|
-
|
|
12
9
|
var _logoIcon = require("@tntx/logo-icon");
|
|
13
|
-
|
|
14
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
|
|
18
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
19
|
-
|
|
20
13
|
var _popover = _interopRequireDefault(require("../popover"));
|
|
21
|
-
|
|
22
14
|
var _Iconfont = _interopRequireDefault(require("./Iconfont"));
|
|
23
|
-
|
|
24
15
|
var _images = require("./images");
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
16
|
+
var _templateObject,
|
|
17
|
+
_templateObject2,
|
|
18
|
+
_templateObject3,
|
|
19
|
+
_templateObject4,
|
|
20
|
+
_this = void 0;
|
|
21
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
32
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
-
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
26
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
28
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
40
29
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
-
|
|
42
|
-
function _templateObject4() {
|
|
43
|
-
var data = _taggedTemplateLiteral(["\n background-color: #fff;\n border-radius: 4px;\n z-index: 1;\n"]);
|
|
44
|
-
|
|
45
|
-
_templateObject4 = function _templateObject4() {
|
|
46
|
-
return data;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return data;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function _templateObject3() {
|
|
53
|
-
var data = _taggedTemplateLiteral(["\n position: relative;\n width: 88px;\n padding: 8px 0;\n cursor: pointer;\n display: inline-block;\n text-align: center;\n &:hover,\n &.active {\n background: #eee;\n }\n &.active:after {\n position: absolute;\n width: 0;\n height: 0;\n border-width: 5px 10px 0 0;\n border-color: #333;\n border-style: solid;\n z-index: 9;\n }\n img {\n width: 44px;\n height: 44px;\n margin-bottom: 6px;\n }\n div {\n line-height: 20px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n"]);
|
|
54
|
-
|
|
55
|
-
_templateObject3 = function _templateObject3() {
|
|
56
|
-
return data;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
return data;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function _templateObject2() {
|
|
63
|
-
var data = _taggedTemplateLiteral(["\n list-style: none;\n width: 264px;\n margin: 0;\n padding: 0;\n"]);
|
|
64
|
-
|
|
65
|
-
_templateObject2 = function _templateObject2() {
|
|
66
|
-
return data;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
return data;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _templateObject() {
|
|
73
|
-
var data = _taggedTemplateLiteral(["\n margin-left: 20px;\n font-size: 20px;\n cursor: pointer;\n .tnt-icon {\n color: #17233d99;\n .tnt-themeS1 & {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n"]);
|
|
74
|
-
|
|
75
|
-
_templateObject = function _templateObject() {
|
|
76
|
-
return data;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
return data;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
30
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
83
|
-
|
|
84
|
-
var
|
|
85
|
-
|
|
86
|
-
var
|
|
87
|
-
|
|
88
|
-
var AppItem = _styledComponents["default"].li(_templateObject3());
|
|
89
|
-
|
|
90
|
-
var AppContentWrapper = _styledComponents["default"].div(_templateObject4());
|
|
91
|
-
|
|
31
|
+
var App = _styledComponents["default"].li(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-left: 20px;\n font-size: 20px;\n cursor: pointer;\n .tnt-icon {\n color: #17233d99;\n .tnt-themeS1 & {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n"])));
|
|
32
|
+
var AppList = _styledComponents["default"].ul(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n list-style: none;\n width: 264px;\n margin: 0;\n padding: 0;\n"])));
|
|
33
|
+
var AppItem = _styledComponents["default"].li(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n width: 88px;\n padding: 8px 0;\n cursor: pointer;\n display: inline-block;\n text-align: center;\n &:hover,\n &.active {\n background: #eee;\n }\n &.active:after {\n position: absolute;\n width: 0;\n height: 0;\n border-width: 5px 10px 0 0;\n border-color: #333;\n border-style: solid;\n z-index: 9;\n }\n img {\n width: 44px;\n height: 44px;\n margin-bottom: 6px;\n }\n div {\n line-height: 20px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n"])));
|
|
34
|
+
var AppContentWrapper = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: #fff;\n border-radius: 4px;\n z-index: 1;\n"])));
|
|
92
35
|
var AppContent = function AppContent(props) {
|
|
93
36
|
var language = props.language,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
37
|
+
apps = props.apps,
|
|
38
|
+
onChange = props.onChange;
|
|
97
39
|
var _useState = (0, _react.useState)(props.appKey),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
+
appKey = _useState2[0],
|
|
42
|
+
setAppKey = _useState2[1];
|
|
102
43
|
var changeApp = function changeApp(appKey) {
|
|
103
44
|
setAppKey(appKey);
|
|
104
45
|
onChange && onChange(appKey);
|
|
105
46
|
};
|
|
106
|
-
|
|
107
47
|
return _react["default"].createElement(AppContentWrapper, null, _react["default"].createElement(AppList, null, apps.sort(function (a, b) {
|
|
108
48
|
return (0, _get2["default"])(_logoIcon.systemMap, "".concat(a.appKey, ".sort"), 1) - (0, _get2["default"])(_logoIcon.systemMap, "".concat(b.appKey, ".sort"), 1);
|
|
109
49
|
}).map(function (_ref) {
|
|
@@ -126,7 +66,6 @@ var AppContent = function AppContent(props) {
|
|
|
126
66
|
}[language || 'cn']), key)));
|
|
127
67
|
})));
|
|
128
68
|
};
|
|
129
|
-
|
|
130
69
|
var _default = function _default(props) {
|
|
131
70
|
return _react["default"].createElement(App, null, _react["default"].createElement(_popover["default"], {
|
|
132
71
|
placement: "bottomRight",
|
|
@@ -137,5 +76,4 @@ var _default = function _default(props) {
|
|
|
137
76
|
type: "application"
|
|
138
77
|
})));
|
|
139
78
|
};
|
|
140
|
-
|
|
141
79
|
exports["default"] = _default;
|
|
@@ -1,97 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) {
|
|
4
|
-
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
15
|
-
|
|
16
11
|
require("../button");
|
|
17
|
-
|
|
18
12
|
var _popover = _interopRequireDefault(require("../popover"));
|
|
19
|
-
|
|
20
13
|
var _row = _interopRequireDefault(require("../row"));
|
|
21
|
-
|
|
22
14
|
var _divider = _interopRequireDefault(require("../divider"));
|
|
23
|
-
|
|
24
15
|
var _ActionsContext = _interopRequireDefault(require("./ActionsContext"));
|
|
25
|
-
|
|
26
16
|
var _images = _interopRequireDefault(require("./images"));
|
|
27
|
-
|
|
28
17
|
var _storage = require("./storage");
|
|
29
|
-
|
|
30
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
31
|
-
|
|
32
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
-
|
|
18
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
34
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
|
-
|
|
36
|
-
function _templateObject3() {
|
|
37
|
-
var data = _taggedTemplateLiteral(["\n min-width: 235px;\n z-index: 1;\n background-color: #fff;\n border-radius: 4px;\n\n .isInIframe & {\n display: none;\n }\n\n .user-info-body {\n padding: 30px 20px 20px 24px;\n line-height: 16px;\n .user-info-body-username {\n margin-top: 0px;\n font-size: 16px;\n color: #333;\n font-weight: normal;\n margin-bottom: 10px;\n line-height: 16px;\n }\n .user-info-body-account {\n margin-top: 0px;\n color: #666;\n margin-bottom: 14px;\n line-height: 16px;\n }\n a {\n margin-right: 16px;\n }\n }\n .user-info-footer {\n border-top: ", ";\n background-color: #fff;\n height: 36px;\n line-height: 36px;\n padding: 0 15px;\n font-size: 12px;\n color: ", ";\n a {\n flex: 1;\n text-align: center;\n color: ", ";\n }\n }\n"]);
|
|
38
|
-
|
|
39
|
-
_templateObject3 = function _templateObject3() {
|
|
40
|
-
return data;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return data;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function _templateObject2() {
|
|
47
|
-
var data = _taggedTemplateLiteral(["\n .tnt-layout-personal-popover {\n .ant-popover-inner-content {\n padding: 0;\n }\n }\n"]);
|
|
48
|
-
|
|
49
|
-
_templateObject2 = function _templateObject2() {
|
|
50
|
-
return data;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
return data;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function _templateObject() {
|
|
57
|
-
var data = _taggedTemplateLiteral(["\n margin-right: 0;\n font-size: 0;\n img {\n width: 26px;\n height: 26px;\n border-radius: 50%;\n cursor: pointer;\n .large-size & {\n width: 32px;\n height: 32px;\n }\n }\n"]);
|
|
58
|
-
|
|
59
|
-
_templateObject = function _templateObject() {
|
|
60
|
-
return data;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
return data;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
22
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
67
|
-
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject2());
|
|
71
|
-
|
|
72
|
-
var UserInfoWrapper = _styledComponents["default"].div(_templateObject3(), function (props) {
|
|
23
|
+
var Avatar = _styledComponents["default"].li(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-right: 0;\n font-size: 0;\n img {\n width: 26px;\n height: 26px;\n border-radius: 50%;\n cursor: pointer;\n .large-size & {\n width: 32px;\n height: 32px;\n }\n }\n"])));
|
|
24
|
+
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .tnt-layout-personal-popover {\n .ant-popover-inner-content {\n padding: 0;\n }\n }\n"])));
|
|
25
|
+
var UserInfoWrapper = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-width: 235px;\n z-index: 1;\n background-color: #fff;\n border-radius: 4px;\n\n .isInIframe & {\n display: none;\n }\n\n .user-info-body {\n padding: 30px 20px 20px 24px;\n line-height: 16px;\n .user-info-body-username {\n margin-top: 0px;\n font-size: 16px;\n color: #333;\n font-weight: normal;\n margin-bottom: 10px;\n line-height: 16px;\n }\n .user-info-body-account {\n margin-top: 0px;\n color: #666;\n margin-bottom: 14px;\n line-height: 16px;\n }\n a {\n margin-right: 16px;\n }\n }\n .user-info-footer {\n border-top: ", ";\n background-color: #fff;\n height: 36px;\n line-height: 36px;\n padding: 0 15px;\n font-size: 12px;\n color: ", ";\n a {\n flex: 1;\n text-align: center;\n color: ", ";\n }\n }\n"])), function (props) {
|
|
73
26
|
return "1px solid ".concat(props.theme.dividerColor);
|
|
74
27
|
}, function (props) {
|
|
75
28
|
return "".concat(props.theme.primaryColor);
|
|
76
29
|
}, function (props) {
|
|
77
30
|
return "".concat(props.theme.primaryColor);
|
|
78
31
|
});
|
|
79
|
-
|
|
80
32
|
var UserInfoContent = function UserInfoContent(props) {
|
|
81
33
|
var userInfo = props.userInfo,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
34
|
+
onLogout = props.onLogout,
|
|
35
|
+
_props$onChangePasswo = props.onChangePassword,
|
|
36
|
+
onChangePassword = _props$onChangePasswo === void 0 ? function () {
|
|
37
|
+
return true;
|
|
38
|
+
} : _props$onChangePasswo,
|
|
39
|
+
_props$onPersonalSett = props.onPersonalSetting,
|
|
40
|
+
onPersonalSetting = _props$onPersonalSett === void 0 ? function () {
|
|
41
|
+
return true;
|
|
42
|
+
} : _props$onPersonalSett;
|
|
92
43
|
var _useContext = (0, _react.useContext)(_ActionsContext["default"]),
|
|
93
|
-
|
|
94
|
-
|
|
44
|
+
getText = _useContext.getText;
|
|
95
45
|
return _react["default"].createElement(UserInfoWrapper, {
|
|
96
46
|
className: "user-info-setting-wrap"
|
|
97
47
|
}, _react["default"].createElement("div", {
|
|
@@ -131,12 +81,10 @@ var UserInfoContent = function UserInfoContent(props) {
|
|
|
131
81
|
}
|
|
132
82
|
}, getText('signOut'))));
|
|
133
83
|
};
|
|
134
|
-
|
|
135
84
|
var _default = function _default(props) {
|
|
136
85
|
var _a;
|
|
137
|
-
|
|
138
86
|
var _props$userInfo = props.userInfo,
|
|
139
|
-
|
|
87
|
+
userInfo = _props$userInfo === void 0 ? {} : _props$userInfo;
|
|
140
88
|
var avatar = userInfo.avatar;
|
|
141
89
|
return _react["default"].createElement(Avatar, null, _react["default"].createElement(_popover["default"], {
|
|
142
90
|
popupClassName: "tnt-layout-personal-popover",
|
|
@@ -148,7 +96,6 @@ var _default = function _default(props) {
|
|
|
148
96
|
src: avatar.indexOf('base64') > 0 ? avatar : (0, _get2["default"])(_images["default"][avatar], 'default', _images["default"][avatar]),
|
|
149
97
|
onError: function onError(e) {
|
|
150
98
|
var _a;
|
|
151
|
-
|
|
152
99
|
e.target.onerror = null;
|
|
153
100
|
e.target.src = ((_a = _images["default"].empty) === null || _a === void 0 ? void 0 : _a["default"]) || _images["default"].empty;
|
|
154
101
|
}
|
|
@@ -156,5 +103,4 @@ var _default = function _default(props) {
|
|
|
156
103
|
src: ((_a = _images["default"].empty) === null || _a === void 0 ? void 0 : _a["default"]) || _images["default"].empty
|
|
157
104
|
})), _react["default"].createElement(GlobalStyle, null));
|
|
158
105
|
};
|
|
159
|
-
|
|
160
106
|
exports["default"] = _default;
|