tntd 2.0.14 → 2.0.16
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/context.js.map +1 -1
- 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 +29 -33
- package/es/table/table.js.map +1 -1
- package/es/table/table.less +5 -0
- 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.d.ts +0 -9
- package/lib/table/context.d.ts.map +1 -1
- package/lib/table/context.js +0 -2
- package/lib/table/context.js.map +1 -1
- 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.d.ts.map +1 -1
- package/lib/table/table.js +46 -77
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.less +5 -0
- 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/es/array-input/index.js
CHANGED
|
@@ -4,18 +4,14 @@ import _set from "lodash/set";
|
|
|
4
4
|
import _isFunction from "lodash/isFunction";
|
|
5
5
|
import _isArray from "lodash/isArray";
|
|
6
6
|
import _get from "lodash/get";
|
|
7
|
-
|
|
8
7
|
var __rest = this && this.__rest || function (s, e) {
|
|
9
8
|
var t = {};
|
|
10
|
-
|
|
11
9
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
12
|
-
|
|
13
10
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
14
11
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
15
12
|
}
|
|
16
13
|
return t;
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
import React, { isValidElement, useCallback, useEffect, useState } from 'react';
|
|
20
16
|
import { deleteIcon, plusIcon } from './icon';
|
|
21
17
|
import Col from '../col';
|
|
@@ -26,9 +22,7 @@ import './index.less';
|
|
|
26
22
|
const {
|
|
27
23
|
Column
|
|
28
24
|
} = Table;
|
|
29
|
-
|
|
30
25
|
const getWidth = span => 1000 / span;
|
|
31
|
-
|
|
32
26
|
export default function ArrayInput({
|
|
33
27
|
children,
|
|
34
28
|
defaultValue,
|
|
@@ -44,12 +38,10 @@ export default function ArrayInput({
|
|
|
44
38
|
if (!_isFunction(children)) {
|
|
45
39
|
throw new Error('ArrayInput的children必须是函数');
|
|
46
40
|
}
|
|
47
|
-
|
|
48
41
|
const [_value, setValue] = useState(value || defaultValue);
|
|
49
42
|
useEffect(() => {
|
|
50
43
|
setValue(value);
|
|
51
44
|
}, [value]);
|
|
52
|
-
|
|
53
45
|
const _onChange = useCallback(value => {
|
|
54
46
|
if (onChange) {
|
|
55
47
|
onChange(value);
|
|
@@ -57,47 +49,36 @@ export default function ArrayInput({
|
|
|
57
49
|
setValue(value);
|
|
58
50
|
}
|
|
59
51
|
}, []);
|
|
60
|
-
|
|
61
52
|
let inValue = _value || [];
|
|
62
|
-
|
|
63
53
|
if (require && inValue.length === 0) {
|
|
64
54
|
inValue = [{}];
|
|
65
55
|
}
|
|
66
|
-
|
|
67
56
|
const changeValue = (index, name, value) => {
|
|
68
57
|
inValue[index] = Object.assign(Object.assign({}, inValue[index]), {
|
|
69
58
|
[name]: value
|
|
70
59
|
});
|
|
71
|
-
|
|
72
60
|
_onChange([...inValue]);
|
|
73
61
|
};
|
|
74
|
-
|
|
75
62
|
const onAdd = index => {
|
|
76
63
|
if (index === undefined) {
|
|
77
64
|
_onChange([...inValue, {}]);
|
|
78
65
|
} else {
|
|
79
66
|
inValue.splice(index + 1, 0, {});
|
|
80
|
-
|
|
81
67
|
_onChange([...inValue]);
|
|
82
68
|
}
|
|
83
69
|
};
|
|
84
|
-
|
|
85
70
|
const onDelete = i => {
|
|
86
71
|
inValue.splice(i, 1);
|
|
87
|
-
|
|
88
72
|
_onChange([...inValue]);
|
|
89
73
|
};
|
|
90
|
-
|
|
91
74
|
if (mode === 'list') {
|
|
92
75
|
return React.createElement("div", {
|
|
93
76
|
className: "tntd-array-input"
|
|
94
77
|
}, inValue.map((item, index) => {
|
|
95
78
|
let fields = children(item, index);
|
|
96
|
-
|
|
97
79
|
if (!_isArray(fields)) {
|
|
98
80
|
fields = _get(fields, 'props.children', []);
|
|
99
81
|
}
|
|
100
|
-
|
|
101
82
|
return React.createElement(Row, {
|
|
102
83
|
gutter: gutter,
|
|
103
84
|
key: index,
|
|
@@ -109,15 +90,13 @@ export default function ArrayInput({
|
|
|
109
90
|
key: i
|
|
110
91
|
}, field) : '';
|
|
111
92
|
}
|
|
112
|
-
|
|
113
93
|
const _a = field === null || field === void 0 ? void 0 : field.props,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
94
|
+
{
|
|
95
|
+
name,
|
|
96
|
+
span = 4,
|
|
97
|
+
onChange: fieldChange
|
|
98
|
+
} = _a,
|
|
99
|
+
other = __rest(_a, ["name", "span", "onChange"]);
|
|
121
100
|
return React.createElement(Col, {
|
|
122
101
|
span: span,
|
|
123
102
|
key: i
|
|
@@ -155,17 +134,14 @@ export default function ArrayInput({
|
|
|
155
134
|
}, addText));
|
|
156
135
|
} else {
|
|
157
136
|
let fields = children({}, 0);
|
|
158
|
-
|
|
159
137
|
if (!_isArray(fields)) {
|
|
160
138
|
fields = _get(fields, 'props.children', []);
|
|
161
139
|
}
|
|
162
|
-
|
|
163
140
|
const dataSource = inValue.map((value, index) => {
|
|
164
141
|
const fields = children(value, index);
|
|
165
142
|
const back = {};
|
|
166
143
|
fields.forEach(field => {
|
|
167
144
|
var _a;
|
|
168
|
-
|
|
169
145
|
const name = (_a = field === null || field === void 0 ? void 0 : field.props) === null || _a === void 0 ? void 0 : _a.name;
|
|
170
146
|
name && _set(back, name, field);
|
|
171
147
|
});
|
|
@@ -196,7 +172,6 @@ export default function ArrayInput({
|
|
|
196
172
|
if (!isValidElement(field)) {
|
|
197
173
|
return field;
|
|
198
174
|
}
|
|
199
|
-
|
|
200
175
|
const {
|
|
201
176
|
onChange: fieldChange
|
|
202
177
|
} = field.props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/array-input/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth-context/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
package/es/columns/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
var __rest = this && this.__rest || function (s, e) {
|
|
2
2
|
var t = {};
|
|
3
|
-
|
|
4
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
-
|
|
6
4
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
5
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
8
6
|
}
|
|
9
7
|
return t;
|
|
10
8
|
};
|
|
11
|
-
|
|
12
9
|
import classnames from 'classnames';
|
|
13
10
|
import React from 'react';
|
|
14
11
|
import { Row, Col } from '../';
|
|
@@ -56,16 +53,14 @@ export const Item = props => {
|
|
|
56
53
|
className: `${clsPrefix}-col-body`
|
|
57
54
|
}, children)));
|
|
58
55
|
};
|
|
59
|
-
|
|
60
56
|
const Columns = props => {
|
|
61
57
|
const {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
children,
|
|
59
|
+
height,
|
|
60
|
+
gutter = 0,
|
|
61
|
+
style
|
|
62
|
+
} = props,
|
|
63
|
+
rest = __rest(props, ["children", "height", "gutter", "style"]);
|
|
69
64
|
const rowStyle = Object.assign(Object.assign({}, style), {
|
|
70
65
|
height: props.height ? `${props.height}px` : 'calc(100vh)'
|
|
71
66
|
});
|
|
@@ -76,6 +71,5 @@ const Columns = props => {
|
|
|
76
71
|
style: rowStyle
|
|
77
72
|
}, rest), children);
|
|
78
73
|
};
|
|
79
|
-
|
|
80
74
|
Columns.Item = Item;
|
|
81
75
|
export default Columns;
|
|
@@ -4,8 +4,8 @@ import Modal from '../modal';
|
|
|
4
4
|
import Input from '../input';
|
|
5
5
|
import Form from '../form';
|
|
6
6
|
import message from '../message';
|
|
7
|
-
const cookies = new Cookies();
|
|
8
|
-
|
|
7
|
+
const cookies = new Cookies();
|
|
8
|
+
// 默认
|
|
9
9
|
let accountInfoDefault = {
|
|
10
10
|
account: undefined,
|
|
11
11
|
password: undefined
|
|
@@ -15,26 +15,22 @@ export default (({
|
|
|
15
15
|
close,
|
|
16
16
|
signIn
|
|
17
17
|
}) => {
|
|
18
|
-
const [confirmLoading, setConfirmLoading] = useState(false);
|
|
19
|
-
|
|
18
|
+
const [confirmLoading, setConfirmLoading] = useState(false);
|
|
19
|
+
// 如果storage中已存在,则取storage
|
|
20
20
|
const storageAccountInfo = localStorage.getItem('accountInfo');
|
|
21
|
-
|
|
22
21
|
if (storageAccountInfo) {
|
|
23
22
|
try {
|
|
24
23
|
accountInfoDefault = JSON.parse(storageAccountInfo);
|
|
25
24
|
} catch (e) {}
|
|
26
25
|
}
|
|
27
|
-
|
|
28
26
|
const [accountInfo, setAccountInfo] = useState(accountInfoDefault);
|
|
29
27
|
const {
|
|
30
28
|
account,
|
|
31
29
|
password
|
|
32
30
|
} = accountInfo;
|
|
33
|
-
|
|
34
31
|
const onSubmit = () => {
|
|
35
32
|
setConfirmLoading(true);
|
|
36
33
|
const returnVal = signIn && signIn(accountInfo);
|
|
37
|
-
|
|
38
34
|
if (returnVal && returnVal.then) {
|
|
39
35
|
returnVal.then(res => {
|
|
40
36
|
message.success('模拟登陆成功');
|
|
@@ -59,13 +55,11 @@ export default (({
|
|
|
59
55
|
});
|
|
60
56
|
}
|
|
61
57
|
};
|
|
62
|
-
|
|
63
58
|
const changeFieldValue = (key, evt) => {
|
|
64
59
|
setAccountInfo(Object.assign(Object.assign({}, accountInfo), {
|
|
65
60
|
[key]: evt.target.value
|
|
66
61
|
}));
|
|
67
62
|
};
|
|
68
|
-
|
|
69
63
|
return React.createElement(Modal, {
|
|
70
64
|
title: "\u5F00\u53D1\u8005\u6A21\u62DF\u767B\u9646",
|
|
71
65
|
visible: visible,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/development-login/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
package/es/drawer/drawer.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
var __rest = this && this.__rest || function (s, e) {
|
|
2
2
|
var t = {};
|
|
3
|
-
|
|
4
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
-
|
|
6
4
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
5
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
8
6
|
}
|
|
9
7
|
return t;
|
|
10
8
|
};
|
|
11
|
-
|
|
12
9
|
import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
|
|
13
10
|
import classNames from 'classnames';
|
|
14
11
|
import React from 'react';
|
|
@@ -16,11 +13,10 @@ import { ConfigConsumer } from 'antd/es/config-provider';
|
|
|
16
13
|
import { default as AntdDrawer } from 'antd/es/drawer';
|
|
17
14
|
export const Drawer = _a => {
|
|
18
15
|
var {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
closable,
|
|
17
|
+
className
|
|
18
|
+
} = _a,
|
|
19
|
+
rest = __rest(_a, ["closable", "className"]);
|
|
24
20
|
return React.createElement(ConfigConsumer, null, ({
|
|
25
21
|
getPrefixCls
|
|
26
22
|
}) => {
|
|
@@ -28,7 +24,7 @@ export const Drawer = _a => {
|
|
|
28
24
|
return React.createElement(LocaleReceiver, {
|
|
29
25
|
componentName: "Drawer"
|
|
30
26
|
}, () => React.createElement(AntdDrawer, Object.assign({
|
|
31
|
-
className: classNames(prefixCls, className, {
|
|
27
|
+
className: classNames(prefixCls, 'tntd-drawer', className, {
|
|
32
28
|
[`${prefixCls}-contain-closable`]: closable !== false
|
|
33
29
|
}),
|
|
34
30
|
closable: closable
|
package/es/drawer/drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;AASA,OAAO,cAAc,MAAM,wCAAwC,CAAA;AACnE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEtD,MAAM,CAAC,MAAM,MAAM,GAAwB,CAAC,EAAgC,EAAE,EAAE;QAApC,EAAE,QAAQ,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9B,yBAAgC,CAAF;IAAO,OAAA,CAC/E,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;QACxC,OAAO,CACL,oBAAC,cAAc,IAAC,aAAa,EAAC,QAAQ,IACnC,GAAG,EAAE,CAAC,CACL,oBAAC,UAAU,kBACT,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE;gBACzD,CAAC,GAAG,SAAS,mBAAmB,CAAC,EAAE,QAAQ,KAAK,KAAK;aACtD,CAAC,EACF,QAAQ,EAAE,QAAQ,IACd,IAAI,EACR,CACH,CACc,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;CAAA,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-03-08 16:45:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-03-08 18:56:20\n * @FilePath: /tntd/packages/tntd/src/drawer/drawer.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport type { DrawerProps as AntdDrawerProps } from 'antd/es/drawer'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport React, { FC } from 'react'\n\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport { default as AntdDrawer } from 'antd/es/drawer'\n\nexport const Drawer: FC<AntdDrawerProps> = ({ closable, className, ...rest }) => (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('drawer')\n return (\n <LocaleReceiver componentName=\"Drawer\">\n {() => (\n <AntdDrawer\n className={classNames(prefixCls, 'tntd-drawer', className, {\n [`${prefixCls}-contain-closable`]: closable !== false,\n })}\n closable={closable}\n {...rest}\n />\n )}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n)\n"]}
|
package/es/drawer/drawer.less
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
@drawer-prefix-cls: ~'@{ant-prefix}-drawer';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
.tntd-drawer{
|
|
4
|
+
&.@{drawer-prefix-cls} {
|
|
5
|
+
.@{drawer-prefix-cls}-title {
|
|
6
|
+
font-size: @font-size-lg + 2px;
|
|
7
|
+
}
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
.@{drawer-prefix-cls}-close {
|
|
10
|
+
color: fade(@text-color, 50%);;
|
|
11
|
+
top: -4px;
|
|
12
|
+
}
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
.@{drawer-prefix-cls}-contain-closable{
|
|
15
|
+
.@{drawer-prefix-cls}-header{
|
|
16
|
+
padding: 12px 36px 12px 20px;
|
|
17
|
+
}
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
}
|
package/es/ellipsis/index.js
CHANGED
|
@@ -11,23 +11,17 @@ import CopySVG from './Svg/CopySVG';
|
|
|
11
11
|
import TickSVG from './Svg/TickSVG';
|
|
12
12
|
import './index.less';
|
|
13
13
|
const tolerance = 0; // In px. Depends on the font you are using
|
|
14
|
-
|
|
15
14
|
const isEllipsisActive = e => {
|
|
16
15
|
var _a, _b;
|
|
17
|
-
|
|
18
16
|
if (e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight) {
|
|
19
17
|
let styleStr = 'overflow:visible; ';
|
|
20
|
-
|
|
21
18
|
if (!((_b = (_a = e === null || e === void 0 ? void 0 : e.parentNode) === null || _a === void 0 ? void 0 : _a.getAttribute('style')) === null || _b === void 0 ? void 0 : _b.includes('width'))) {
|
|
22
19
|
styleStr += 'max-width:100%;';
|
|
23
20
|
}
|
|
24
|
-
|
|
25
21
|
e.parentNode.setAttribute('style', styleStr);
|
|
26
22
|
}
|
|
27
|
-
|
|
28
23
|
return e.offsetWidth + tolerance < e.scrollWidth || e.offsetHeight < e.scrollHeight;
|
|
29
24
|
};
|
|
30
|
-
|
|
31
25
|
export default (props => {
|
|
32
26
|
let {
|
|
33
27
|
_popover = props.Popover,
|
|
@@ -51,33 +45,30 @@ export default (props => {
|
|
|
51
45
|
prefix,
|
|
52
46
|
// 前缀dom
|
|
53
47
|
suffix // 后缀dom
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
} = props;
|
|
49
|
+
// allow visible or not state
|
|
50
|
+
const [flag, setFlag] = useState(true);
|
|
51
|
+
// visible[Tooltip/Popover] state
|
|
52
|
+
const [tipVisible, setTipVisible] = useState(false);
|
|
53
|
+
// copy animation state
|
|
61
54
|
const [hasCopy, setHasCopy] = useState(false);
|
|
62
55
|
const elementRef = useRef();
|
|
63
56
|
useEffect(() => {
|
|
64
57
|
elementRef.current && isEllipsisActive(elementRef.current) ? setFlag(true) : (setFlag(false), setTipVisible(false));
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
const inner = typeof children === 'string' ? children : _popover ? content : title;
|
|
68
|
-
|
|
58
|
+
});
|
|
59
|
+
// original Node
|
|
60
|
+
const inner = typeof children === 'string' ? children : _popover ? content : title;
|
|
61
|
+
// for className
|
|
69
62
|
const getClassName = () => {
|
|
70
63
|
return `overflow ${_lines ? 'ellipsis-wrap' : 'ellipsis-nowrap'} ${className || ''}`;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
|
|
64
|
+
};
|
|
65
|
+
// Tooltip.trigger(default 'hover') ==trigger==> onVisibleChange(visible)
|
|
74
66
|
const handleVisibleChange = visible => {
|
|
75
67
|
// const { onVisibleChange } = props;
|
|
76
68
|
// onVisibleChange(visible);
|
|
77
69
|
flag && setTipVisible(visible);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
|
|
70
|
+
};
|
|
71
|
+
// onClick Copy Button
|
|
81
72
|
const handleCopy = innerText => {
|
|
82
73
|
copy(innerText);
|
|
83
74
|
setHasCopy(!hasCopy);
|
|
@@ -85,7 +76,6 @@ export default (props => {
|
|
|
85
76
|
setHasCopy(false);
|
|
86
77
|
}, 1000);
|
|
87
78
|
};
|
|
88
|
-
|
|
89
79
|
const renderNode = () => {
|
|
90
80
|
const popoverNode = React.createElement(Popover, Object.assign({}, props, {
|
|
91
81
|
content: content || children,
|
|
@@ -111,7 +101,6 @@ export default (props => {
|
|
|
111
101
|
}, children || title));
|
|
112
102
|
return _popover ? popoverNode : tooltipNode;
|
|
113
103
|
};
|
|
114
|
-
|
|
115
104
|
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
116
105
|
className: "tnt-ellipsis",
|
|
117
106
|
style: Object.assign(Object.assign({}, style), {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ellipsis/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
package/es/empty/empty.js
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
var __rest = this && this.__rest || function (s, e) {
|
|
2
2
|
var t = {};
|
|
3
|
-
|
|
4
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
-
|
|
6
4
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
5
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
8
6
|
}
|
|
9
7
|
return t;
|
|
10
8
|
};
|
|
11
|
-
|
|
12
9
|
import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
|
|
13
10
|
import classNames from 'classnames';
|
|
14
11
|
import React from 'react';
|
|
15
12
|
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
16
13
|
import { default as AntdEmpty } from 'antd/es/empty';
|
|
17
14
|
import { Illustration403, Illustration404, Illustration500, IllustrationEmpty, IllustrationFailure, IllustrationNoAccess, IllustrationNoChart, IllustrationNoResult, IllustrationOffline, IllustrationSuccess } from '../svg-components';
|
|
18
|
-
export * from 'antd/es/empty';
|
|
19
|
-
|
|
15
|
+
export * from 'antd/es/empty';
|
|
16
|
+
// description map for evert type
|
|
20
17
|
export const EmptyDescriptionMap = {
|
|
21
18
|
empty: 'noData',
|
|
22
19
|
'no-result': 'noData',
|
|
@@ -43,14 +40,13 @@ const BuiltinEmptyImage = {
|
|
|
43
40
|
};
|
|
44
41
|
export function Empty(_a) {
|
|
45
42
|
var {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
className,
|
|
44
|
+
description,
|
|
45
|
+
size = 'middle',
|
|
46
|
+
type = 'empty',
|
|
47
|
+
locale
|
|
48
|
+
} = _a,
|
|
49
|
+
rest = __rest(_a, ["className", "description", "size", "type", "locale"]);
|
|
54
50
|
return React.createElement(ConfigConsumer, null, ({
|
|
55
51
|
getPrefixCls
|
|
56
52
|
}) => {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
3
|
+
import { Empty } from '../empty';
|
|
4
|
+
export const renderEmpty = componentName => React.createElement(ConfigConsumer, null, () => {
|
|
5
|
+
switch (componentName) {
|
|
6
|
+
case 'Table':
|
|
7
|
+
case 'List':
|
|
8
|
+
return React.createElement(Empty, {
|
|
9
|
+
type: "no-result"
|
|
10
|
+
});
|
|
11
|
+
case 'Select':
|
|
12
|
+
case 'TreeSelect':
|
|
13
|
+
case 'Cascader':
|
|
14
|
+
case 'Transfer':
|
|
15
|
+
case 'Mentions':
|
|
16
|
+
return React.createElement(Empty, {
|
|
17
|
+
size: "mini"
|
|
18
|
+
});
|
|
19
|
+
default:
|
|
20
|
+
return React.createElement(Empty, null);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-empty.js","sourceRoot":"","sources":["../../src/empty/render-empty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,aAAsB,EAAmB,EAAE,CAAC,CACtE,oBAAC,cAAc,QACZ,GAAG,EAAE;IACJ,QAAQ,aAAa,EAAE;QACrB,KAAK,OAAO,CAAC;QACb,KAAK,MAAM;YACT,OAAO,oBAAC,KAAK,IAAC,IAAI,EAAC,WAAW,GAAG,CAAA;QAEnC,KAAK,QAAQ,CAAC;QACd,KAAK,YAAY,CAAC;QAClB,KAAK,UAAU,CAAC;QAChB,KAAK,UAAU,CAAC;QAChB,KAAK,UAAU;YACb,OAAO,oBAAC,KAAK,IAAC,IAAI,EAAC,MAAM,GAAG,CAAA;QAC9B;YACE,OAAO,oBAAC,KAAK,OAAG,CAAA;KACnB;AACH,CAAC,CACc,CAClB,CAAA","sourcesContent":["import React from 'react'\nimport { ConfigConsumer } from 'antd/es/config-provider'\n\nimport { Empty } from '../empty'\n\nexport const renderEmpty = (componentName?: string): React.ReactNode => (\n <ConfigConsumer>\n {() => {\n switch (componentName) {\n case 'Table':\n case 'List':\n return <Empty type=\"no-result\" />\n\n case 'Select':\n case 'TreeSelect':\n case 'Cascader':\n case 'Transfer':\n case 'Mentions':\n return <Empty size=\"mini\" />\n default:\n return <Empty />\n }\n }}\n </ConfigConsumer>\n)\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/empty/style/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,cAAc,CAAA","sourcesContent":["import 'antd/es/empty/style'\nimport './empty.less'\n"]}
|
package/es/handle/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
var __rest = this && this.__rest || function (s, e) {
|
|
2
2
|
var t = {};
|
|
3
|
-
|
|
4
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
-
|
|
6
4
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
5
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
8
6
|
}
|
|
9
7
|
return t;
|
|
10
8
|
};
|
|
11
|
-
|
|
12
9
|
import React, { Fragment } from 'react';
|
|
13
10
|
import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
|
|
14
11
|
import Icon from '../tntd-icon';
|
|
@@ -22,41 +19,35 @@ export default (props => {
|
|
|
22
19
|
componentName: "Handle"
|
|
23
20
|
}, (locale, localeCode) => {
|
|
24
21
|
const _a = props || {},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
{
|
|
23
|
+
children = [],
|
|
24
|
+
type,
|
|
25
|
+
num = 3,
|
|
26
|
+
lang,
|
|
27
|
+
divider = true,
|
|
28
|
+
lessOneMoreFit,
|
|
29
|
+
popConfirmHandle
|
|
30
|
+
} = _a,
|
|
31
|
+
rest = __rest(_a, ["children", "type", "num", "lang", "divider", "lessOneMoreFit", "popConfirmHandle"]);
|
|
36
32
|
let newChildren = [];
|
|
37
|
-
|
|
38
33
|
if (Array.isArray(children)) {
|
|
39
34
|
newChildren = (children === null || children === void 0 ? void 0 : children.filter(item => !!item)) || [];
|
|
40
35
|
} else if (children) {
|
|
41
36
|
newChildren.push(children);
|
|
42
37
|
}
|
|
43
|
-
|
|
44
38
|
if (localeCode === 'en' || popConfirmHandle) {
|
|
45
39
|
newChildren === null || newChildren === void 0 ? void 0 : newChildren.forEach((v, i) => {
|
|
46
40
|
const {
|
|
47
41
|
type,
|
|
48
42
|
props
|
|
49
43
|
} = v;
|
|
50
|
-
|
|
51
44
|
if ((type === null || type === void 0 ? void 0 : type.name) === 'Popconfirm' || props.hasOwnProperty('onConfirm') && typeof (props === null || props === void 0 ? void 0 : props.onConfirm) === 'function') {
|
|
52
45
|
let placement = {};
|
|
53
|
-
|
|
54
46
|
if (lang === 'en' || num && !isNaN(num) && i + 1 > num && !(lessOneMoreFit && newChildren.length - num === 1)) {
|
|
55
47
|
placement = {
|
|
56
48
|
placement: 'left'
|
|
57
49
|
};
|
|
58
50
|
}
|
|
59
|
-
|
|
60
51
|
newChildren[i] = React.cloneElement(v, Object.assign(Object.assign(Object.assign(Object.assign({
|
|
61
52
|
overlayStyle: {
|
|
62
53
|
width: 180
|
|
@@ -70,31 +61,28 @@ export default (props => {
|
|
|
70
61
|
}
|
|
71
62
|
});
|
|
72
63
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
let [preChildPart, lastChildPart] = [newChildren, null];
|
|
65
|
+
// 只有1个时不适配
|
|
76
66
|
if (lessOneMoreFit && newChildren.length - num === 1) {
|
|
77
67
|
preChildPart = newChildren;
|
|
78
68
|
} else if (newChildren && num && !isNaN(num) && newChildren.length > num) {
|
|
79
69
|
preChildPart = newChildren.slice(0, num);
|
|
80
70
|
lastChildPart = newChildren.slice(num);
|
|
81
71
|
}
|
|
82
|
-
|
|
83
72
|
if (divider && preChildPart) {
|
|
84
73
|
const preChildLen = preChildPart.length;
|
|
85
74
|
preChildPart = preChildPart.map((dom, i) => React.createElement(Fragment, {
|
|
86
75
|
key: i
|
|
87
|
-
}, dom, !(i === preChildLen - 1 && !(lastChildPart === null || lastChildPart === void 0 ? void 0 : lastChildPart.length)
|
|
76
|
+
}, dom, !(i === preChildLen - 1 && !(lastChildPart === null || lastChildPart === void 0 ? void 0 : lastChildPart.length) // 没有更多 且 是最后一个时 不显示 Divider
|
|
77
|
+
) && React.createElement(Divider, {
|
|
88
78
|
type: "vertical"
|
|
89
79
|
})));
|
|
90
80
|
}
|
|
91
|
-
|
|
92
81
|
const menu = childArr => React.createElement(Menu, {
|
|
93
82
|
className: "org-pop-opera-btn"
|
|
94
83
|
}, childArr === null || childArr === void 0 ? void 0 : childArr.map((child, i) => React.createElement(Menu.Item, {
|
|
95
84
|
key: i
|
|
96
85
|
}, child)));
|
|
97
|
-
|
|
98
86
|
if (localeCode === "en") {
|
|
99
87
|
return React.createElement(Dropdown, {
|
|
100
88
|
overlay: menu(newChildren || []),
|
|
@@ -109,7 +97,6 @@ export default (props => {
|
|
|
109
97
|
type: "down"
|
|
110
98
|
}))));
|
|
111
99
|
}
|
|
112
|
-
|
|
113
100
|
return React.createElement("div", Object.assign({
|
|
114
101
|
onClick: e => {
|
|
115
102
|
e.stopPropagation();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/handle/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default ['system', 'entry', 'permission', 'graph', 'guanjia', 'case', 'celve1', 'shoucang', 'deal-type', 'pm', 'shoukuan', 'zhibiao', 'puzzle', 'user-group', 'yuce', 'jianmo', 'zhuanzhang', 'yunwei', 'baozhang', 'jizhang', 'tongji', 'pingfen', 'limit', 'spider', 'loan', 'access', 'role', 'org', 'celve', 'book', 'tag', 'shixufenxipeizhi', 'all-cases', 'xianeguanli', 'api', 'network', 'analysis', 'calendar', 'backup', 'all', 'attachment', 'chart-line', 'branches', 'chart-area', 'clock', 'check', 'charging-setting', 'chart-pie-alt', 'dashboard', 'datebase', 'check-reply', 'datacenter', 'connection', 'download', 'date-set', 'event', 'event-wait', 'fieldanalysis', 'exchange', 'knowledge', 'key', 'log', 'list', 'menu', 'index', 'project', 'monitorin', 'pointmap', 'ranking', 'model', 'plan', 'task', 'wait', 'upload', 'question-list', 'read', 'setting', 'reply', 'jinjianguanli', 'change-theme', 'application', 'flag-en', 'flag-cn', 'down', 'up', 'workflow', 'sync', 'folder', 'database', 'circle', 'edit', 'edit-color', 'box', 'layer', 'box-color', 'home-color', 'record', 'monitor', 'time-color', 'user', 'function-color', 'record-color', 'warning-color', 'layer-color', 'template', 'template-color', 'monitor-color', 'search', 'user-color', 'function', 'warning', 'search-color', 'home', 'time', 'application', 'plus', 'minus'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon-list/style/index.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,QAAQ;IACR,OAAO;IACP,YAAY;IACZ,OAAO;IACP,SAAS;IACT,MAAM;IACN,QAAQ;IACR,UAAU;IACV,WAAW;IACX,IAAI;IACJ,UAAU;IACV,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,SAAS;IACT,QAAQ;IACR,SAAS;IACT,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,KAAK;IACL,kBAAkB;IAClB,WAAW;IACX,aAAa;IACb,KAAK;IACL,SAAS;IACT,UAAU;IACV,UAAU;IACV,QAAQ;IACR,KAAK;IACL,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,OAAO;IACP,OAAO;IACP,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,UAAU;IACV,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,UAAU;IACV,OAAO;IACP,YAAY;IACZ,eAAe;IACf,UAAU;IACV,WAAW;IACX,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;IACP,SAAS;IACT,WAAW;IACX,UAAU;IACV,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,QAAQ;IACR,eAAe;IACf,MAAM;IACN,SAAS;IACT,OAAO;IACP,eAAe;IACf,cAAc;IACd,aAAa;IACb,SAAS;IACT,SAAS;IACT,MAAM;IACN,IAAI;IACJ,UAAU;IACV,MAAM;IACN,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,MAAM;IACN,YAAY;IACZ,KAAK;IACL,OAAO;IACP,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,SAAS;IACT,YAAY;IACZ,MAAM;IACN,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,aAAa;IACb,UAAU;IACV,gBAAgB;IAChB,eAAe;IACf,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,SAAS;IACT,cAAc;IACd,MAAM;IACN,MAAM;IACN,aAAa;IACb,MAAM;IACN,OAAO;CACR,CAAA","sourcesContent":["export default [\n 'system',\n 'entry',\n 'permission',\n 'graph',\n 'guanjia',\n 'case',\n 'celve1',\n 'shoucang',\n 'deal-type',\n 'pm',\n 'shoukuan',\n 'zhibiao',\n 'puzzle',\n 'user-group',\n 'yuce',\n 'jianmo',\n 'zhuanzhang',\n 'yunwei',\n 'baozhang',\n 'jizhang',\n 'tongji',\n 'pingfen',\n 'limit',\n 'spider',\n 'loan',\n 'access',\n 'role',\n 'org',\n 'celve',\n 'book',\n 'tag',\n 'shixufenxipeizhi',\n 'all-cases',\n 'xianeguanli',\n 'api',\n 'network',\n 'analysis',\n 'calendar',\n 'backup',\n 'all',\n 'attachment',\n 'chart-line',\n 'branches',\n 'chart-area',\n 'clock',\n 'check',\n 'charging-setting',\n 'chart-pie-alt',\n 'dashboard',\n 'datebase',\n 'check-reply',\n 'datacenter',\n 'connection',\n 'download',\n 'date-set',\n 'event',\n 'event-wait',\n 'fieldanalysis',\n 'exchange',\n 'knowledge',\n 'key',\n 'log',\n 'list',\n 'menu',\n 'index',\n 'project',\n 'monitorin',\n 'pointmap',\n 'ranking',\n 'model',\n 'plan',\n 'task',\n 'wait',\n 'upload',\n 'question-list',\n 'read',\n 'setting',\n 'reply',\n 'jinjianguanli',\n 'change-theme',\n 'application',\n 'flag-en',\n 'flag-cn',\n 'down',\n 'up',\n 'workflow',\n 'sync',\n 'folder',\n 'database',\n 'circle',\n 'edit',\n 'edit-color',\n 'box',\n 'layer',\n 'box-color',\n 'home-color',\n 'record',\n 'monitor',\n 'time-color',\n 'user',\n 'function-color',\n 'record-color',\n 'warning-color',\n 'layer-color',\n 'template',\n 'template-color',\n 'monitor-color',\n 'search',\n 'user-color',\n 'function',\n 'warning',\n 'search-color',\n 'home',\n 'time',\n 'application',\n 'plus',\n 'minus',\n]\n"]}
|