tntd 2.0.13 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/array-input/index.js +31 -6
- package/es/columns/index.js +12 -6
- package/es/development-login/LoginModal.js +10 -4
- package/es/drawer/drawer.js +8 -4
- package/es/ellipsis/index.js +25 -14
- package/es/empty/empty.js +13 -9
- package/es/handle/index.js +27 -14
- package/es/img/Contain.js +19 -13
- package/es/img/Cover.js +24 -13
- package/es/img/index.js +21 -14
- package/es/index.js +1 -0
- package/es/loading-button/index.js +13 -6
- package/es/locale/default.js +2 -0
- package/es/locale/en_US.js +2 -0
- package/es/locale/zh_CN.js +2 -0
- package/es/page/Box.js +28 -19
- package/es/page/index.js +38 -22
- package/es/page/utils.js +5 -0
- package/es/prev-locale.js +3 -0
- package/es/query-form/Field/Checkbox.js +8 -4
- package/es/query-form/Field/Select.js +17 -10
- package/es/query-form/Field/SelectInput.js +18 -4
- package/es/query-form/Field/fieldsMap.js +1 -0
- package/es/query-form/Field/index.js +11 -2
- package/es/query-form/createActions.js +8 -0
- package/es/query-form/index.js +34 -2
- package/es/query-list-scene/List.js +39 -18
- package/es/query-list-scene/QueryForm.js +19 -10
- package/es/query-list-scene/QueryListScene.js +2 -0
- package/es/query-list-scene/Toolbar.js +10 -6
- package/es/query-list-scene/createActions.js +3 -0
- package/es/render-empty/render-empty.js +2 -0
- package/es/steps/steps.js +17 -9
- package/es/steps/style/nav.less +3 -1
- package/es/svg-components/illustration-403.js +2 -0
- package/es/svg-components/illustration-404.js +2 -0
- package/es/svg-components/illustration-500.js +2 -0
- package/es/svg-components/illustration-empty.js +2 -0
- package/es/svg-components/illustration-failure.js +2 -0
- package/es/svg-components/illustration-no-access.js +2 -0
- package/es/svg-components/illustration-no-chart.js +2 -0
- package/es/svg-components/illustration-no-result.js +2 -0
- package/es/svg-components/illustration-offline.js +2 -0
- package/es/svg-components/illustration-success.js +2 -0
- package/es/table/assets/image-loading-background.js +2 -0
- package/es/table/assets/image-loading.js +2 -0
- package/es/table/hooks/use-column-setting.js +1 -0
- package/es/table/table.js +19 -14
- package/es/table/table.stories.js +2 -0
- package/es/table/utils.js +6 -2
- package/es/title/index.js +14 -10
- package/es/tntd-cascader/AntdCascader/component/context.js +4 -2
- package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +2 -0
- package/es/tntd-cascader/AntdCascader/component/getIcons.js +15 -6
- package/es/tntd-cascader/AntdCascader/config/utils.js +2 -0
- package/es/tntd-cascader/AntdCascader/config/warning.js +8 -4
- package/es/tntd-cascader/AntdCascader/index.js +73 -51
- package/es/tntd-cascader/rc-cascader/Cascader.js +113 -86
- package/es/tntd-cascader/rc-cascader/OptionList/Column.js +26 -16
- package/es/tntd-cascader/rc-cascader/OptionList/index.js +43 -26
- package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +7 -5
- package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +41 -12
- package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +10 -4
- package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +4 -2
- package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +1 -0
- package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +1 -0
- package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +7 -2
- package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +15 -8
- package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +6 -2
- package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +4 -2
- package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +7 -2
- package/es/tntd-icon/fonts/iconfont.js +12 -7
- package/es/tntd-icon/index.js +9 -5
- package/es/tntd-layout/ActionsContext.js +2 -2
- package/es/tntd-layout/AppList.js +14 -2
- package/es/tntd-layout/Application.js +4 -0
- package/es/tntd-layout/Avatar.js +4 -0
- package/es/tntd-layout/CompatibleLanguage.js +13 -0
- package/es/tntd-layout/EnterpriseLayout/Avatar.js +4 -0
- package/es/tntd-layout/EnterpriseLayout/Language.js +6 -0
- package/es/tntd-layout/EnterpriseLayout/Theme.js +4 -0
- package/es/tntd-layout/EnterpriseLayout/index.js +2 -2
- package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +33 -2
- package/es/tntd-layout/GlobalNavigation/index.js +6 -0
- package/es/tntd-layout/HeaderActions.js +32 -28
- package/es/tntd-layout/HeaderNavs.js +14 -6
- package/es/tntd-layout/HeaderTabs.js +35 -14
- package/es/tntd-layout/Language.js +6 -0
- package/es/tntd-layout/Layout.js +7 -2
- package/es/tntd-layout/Logo.js +11 -4
- package/es/tntd-layout/OrgAppList.js +39 -22
- package/es/tntd-layout/SideMenu.js +45 -8
- package/es/tntd-layout/Theme.js +6 -0
- package/es/tntd-layout/index.js +17 -9
- package/es/tntd-layout/paaslayout/CompactSideMenu.js +15 -0
- package/es/tntd-layout/paaslayout/SideMenu.js +15 -0
- package/es/tntd-layout/paaslayout/index.js +13 -4
- package/es/tntd-layout/storage.js +2 -2
- package/es/tntd-modal/index.js +18 -12
- package/es/tntd-second-page/index.js +3 -0
- package/es/tntd-select/DropDownWrap.js +8 -4
- package/es/tntd-select/index.js +118 -74
- package/es/utils/checkAuth.js +1 -0
- package/es/utils/findMenuInfoByPath.js +3 -0
- package/es/utils/index.js +11 -2
- package/lib/affix/index.js +10 -4
- package/lib/alert/index.js +10 -4
- package/lib/anchor/index.js +10 -4
- package/lib/array-input/icon.js +7 -1
- package/lib/array-input/index.js +91 -41
- package/lib/auth-context/index.js +3 -0
- package/lib/auto-complete/index.js +10 -4
- package/lib/avatar/index.js +10 -4
- package/lib/back-top/index.js +10 -4
- package/lib/badge/index.js +10 -4
- package/lib/breadcrumb/index.js +10 -4
- package/lib/button/index.js +10 -4
- package/lib/calendar/index.js +10 -4
- package/lib/card/index.js +10 -4
- package/lib/carousel/index.js +10 -4
- package/lib/cascader/index.js +10 -4
- package/lib/checkbox/index.js +10 -4
- package/lib/col/index.js +10 -4
- package/lib/collapse/index.js +11 -4
- package/lib/columns/index.js +28 -14
- package/lib/comment/index.js +10 -4
- package/lib/config-provider/config-provider.js +2 -0
- package/lib/config-provider/index.js +10 -4
- package/lib/date-picker/index.js +10 -4
- package/lib/descriptions/index.js +10 -4
- package/lib/development-login/LoginModal.js +50 -25
- package/lib/development-login/index.js +22 -11
- package/lib/divider/index.js +10 -4
- package/lib/drawer/drawer.js +16 -6
- package/lib/drawer/index.js +5 -1
- package/lib/dropdown/index.js +10 -4
- package/lib/ellipsis/Svg/CopySVG.js +4 -0
- package/lib/ellipsis/Svg/TickSVG.js +4 -0
- package/lib/ellipsis/index.js +73 -42
- package/lib/empty/empty.js +30 -14
- package/lib/empty/empty.stories.js +21 -3
- package/lib/empty/index.js +5 -1
- package/lib/exception/exception.js +14 -7
- package/lib/exception/index.js +4 -1
- package/lib/form/index.js +10 -4
- package/lib/handle/index.js +46 -19
- package/lib/icon/index.js +10 -4
- package/lib/img/Contain.js +23 -12
- package/lib/img/Cover.js +53 -31
- package/lib/img/index.js +47 -29
- package/lib/index.js +187 -100
- package/lib/input/index.js +10 -4
- package/lib/input-number/index.js +10 -4
- package/lib/layout/index.js +10 -4
- package/lib/list/index.js +10 -4
- package/lib/loading-button/index.js +32 -15
- package/lib/locale/default.js +5 -0
- package/lib/locale/en_US.js +4 -0
- package/lib/locale/index.js +6 -3
- package/lib/locale/zh_CN.js +4 -0
- package/lib/locale-provider/index.js +10 -4
- package/lib/mention/index.js +10 -4
- package/lib/mentions/index.js +10 -4
- package/lib/menu/index.js +10 -4
- package/lib/message/index.js +11 -4
- package/lib/modal/index.js +11 -4
- package/lib/notification/index.js +10 -4
- package/lib/page/Box.js +37 -24
- package/lib/page/index.js +66 -37
- package/lib/page/utils.js +9 -1
- package/lib/page-header/index.js +10 -4
- package/lib/pagination/index.js +10 -4
- package/lib/popconfirm/index.js +10 -4
- package/lib/popover/index.js +10 -4
- package/lib/prev-locale.js +10 -1
- package/lib/progress/index.js +10 -4
- package/lib/query-form/Field/Checkbox.js +11 -2
- package/lib/query-form/Field/Select.js +45 -27
- package/lib/query-form/Field/SelectInput.js +46 -21
- package/lib/query-form/Field/fieldsMap.js +12 -1
- package/lib/query-form/Field/index.js +70 -38
- package/lib/query-form/createActions.js +7 -0
- package/lib/query-form/index.js +121 -52
- package/lib/query-form/useForm.js +4 -0
- package/lib/query-list-scene/List.js +111 -58
- package/lib/query-list-scene/QueryForm.js +67 -37
- package/lib/query-list-scene/QueryListScene.js +42 -21
- package/lib/query-list-scene/Title.js +5 -1
- package/lib/query-list-scene/Toolbar.js +15 -8
- package/lib/query-list-scene/createActions.js +6 -0
- package/lib/query-list-scene/index.js +10 -0
- package/lib/query-list-scene/useActions.js +4 -0
- package/lib/radio/index.js +10 -4
- package/lib/rate/index.js +10 -4
- package/lib/render-empty/index.js +2 -0
- package/lib/render-empty/render-empty.js +8 -0
- package/lib/result/index.js +10 -4
- package/lib/row/index.js +10 -4
- package/lib/select/index.js +10 -4
- package/lib/skeleton/index.js +10 -4
- package/lib/slider/index.js +10 -4
- package/lib/spin/index.js +10 -4
- package/lib/statistic/index.js +10 -4
- package/lib/steps/index.js +5 -1
- package/lib/steps/steps.js +29 -12
- package/lib/steps/style/nav.less +3 -1
- package/lib/svg-components/illustration-403.js +9 -3
- package/lib/svg-components/illustration-404.js +9 -3
- package/lib/svg-components/illustration-500.js +9 -3
- package/lib/svg-components/illustration-empty.js +9 -3
- package/lib/svg-components/illustration-failure.js +9 -3
- package/lib/svg-components/illustration-no-access.js +9 -3
- package/lib/svg-components/illustration-no-chart.js +9 -3
- package/lib/svg-components/illustration-no-result.js +9 -3
- package/lib/svg-components/illustration-offline.js +9 -3
- package/lib/svg-components/illustration-success.js +9 -3
- package/lib/svg-components/index.js +11 -0
- package/lib/switch/index.js +10 -4
- package/lib/table/assets/image-loading-background.js +9 -3
- package/lib/table/assets/image-loading.js +9 -3
- package/lib/table/context.js +2 -0
- package/lib/table/hooks/index.js +2 -1
- package/lib/table/hooks/use-column-setting.js +16 -8
- package/lib/table/index.js +5 -1
- package/lib/table/table.js +63 -34
- package/lib/table/table.stories.js +11 -2
- package/lib/table/utils.js +11 -2
- package/lib/tabs/index.js +10 -4
- package/lib/tag/index.js +10 -4
- package/lib/time-picker/index.js +10 -4
- package/lib/timeline/index.js +10 -4
- package/lib/title/index.js +20 -10
- package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +11 -4
- package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +8 -3
- package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +8 -3
- package/lib/tntd-cascader/AntdCascader/component/context.js +9 -3
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +12 -4
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +37 -19
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +17 -8
- package/lib/tntd-cascader/AntdCascader/config/utils.js +15 -6
- package/lib/tntd-cascader/AntdCascader/config/warning.js +15 -7
- package/lib/tntd-cascader/AntdCascader/index.js +133 -80
- package/lib/tntd-cascader/AntdCascader/interface.js +3 -0
- package/lib/tntd-cascader/index.js +2 -0
- package/lib/tntd-cascader/rc-cascader/Cascader.js +188 -123
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +21 -11
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +88 -60
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +109 -65
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +33 -18
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +106 -56
- package/lib/tntd-cascader/rc-cascader/context.js +8 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +31 -14
- package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +15 -5
- package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +11 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +8 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +15 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +41 -26
- package/lib/tntd-cascader/rc-cascader/index.js +3 -0
- package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +20 -9
- package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +8 -0
- package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +14 -7
- package/lib/tntd-icon/fonts/iconfont.js +12 -7
- package/lib/tntd-icon/index.js +17 -6
- package/lib/tntd-layout/ActionsContext.js +3 -0
- package/lib/tntd-layout/AppList.js +105 -30
- package/lib/tntd-layout/Application.js +84 -22
- package/lib/tntd-layout/Avatar.js +72 -18
- package/lib/tntd-layout/CompatibleLanguage.js +105 -32
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +80 -24
- package/lib/tntd-layout/EnterpriseLayout/Language.js +45 -14
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +46 -16
- package/lib/tntd-layout/EnterpriseLayout/index.js +12 -4
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +174 -45
- package/lib/tntd-layout/GlobalNavigation/index.js +70 -19
- package/lib/tntd-layout/Header.js +54 -20
- package/lib/tntd-layout/HeaderActions.js +64 -33
- package/lib/tntd-layout/HeaderNavs.js +59 -19
- package/lib/tntd-layout/HeaderTabs.js +111 -43
- package/lib/tntd-layout/Iconfont.js +5 -0
- package/lib/tntd-layout/Language.js +45 -14
- package/lib/tntd-layout/Layout.js +113 -74
- package/lib/tntd-layout/Logo.js +41 -14
- package/lib/tntd-layout/OrgAppList.js +119 -51
- package/lib/tntd-layout/SideMenu.js +120 -42
- package/lib/tntd-layout/Theme.js +71 -19
- package/lib/tntd-layout/createActions.js +5 -0
- package/lib/tntd-layout/images/index.js +28 -0
- package/lib/tntd-layout/index.js +49 -21
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +81 -29
- package/lib/tntd-layout/paaslayout/Header.js +47 -14
- package/lib/tntd-layout/paaslayout/Logo.js +19 -2
- package/lib/tntd-layout/paaslayout/SideMenu.js +82 -31
- package/lib/tntd-layout/paaslayout/index.js +108 -62
- package/lib/tntd-layout/storage.d.ts +1 -1
- package/lib/tntd-layout/storage.d.ts.map +1 -1
- package/lib/tntd-layout/storage.js +33 -3
- package/lib/tntd-modal/index.js +51 -32
- package/lib/tntd-second-page/index.js +24 -14
- package/lib/tntd-select/DropDownWrap.js +45 -24
- package/lib/tntd-select/index.js +206 -117
- package/lib/tooltip/index.js +10 -4
- package/lib/transfer/index.js +10 -4
- package/lib/tree/index.js +10 -4
- package/lib/tree-select/index.js +10 -4
- package/lib/typography/index.js +10 -4
- package/lib/upload/index.js +10 -4
- package/lib/utils/checkAuth.js +10 -4
- package/lib/utils/findMenuInfoByPath.js +7 -1
- package/lib/utils/index.js +41 -13
- package/lib/version/index.js +10 -4
- package/package.json +1 -1
- package/es/array-input/style/index.js +0 -1
- package/es/array-input/style/index.js.map +0 -1
- package/es/auth-context/style/index.js +0 -1
- package/es/auth-context/style/index.js.map +0 -1
- package/es/development-login/style/index.js +0 -1
- package/es/development-login/style/index.js.map +0 -1
- package/es/ellipsis/style/index.js +0 -1
- package/es/ellipsis/style/index.js.map +0 -1
- package/es/empty/render-empty.js +0 -22
- package/es/empty/render-empty.js.map +0 -1
- package/es/empty/style/index.js +0 -2
- package/es/empty/style/index.js.map +0 -1
- package/es/handle/style/index.js +0 -1
- package/es/handle/style/index.js.map +0 -1
- package/es/icon-list/style/index.js +0 -1
- package/es/icon-list/style/index.js.map +0 -1
- package/es/img/style/index.js +0 -1
- package/es/img/style/index.js.map +0 -1
- package/es/loading-button/style/index.js +0 -1
- package/es/loading-button/style/index.js.map +0 -1
- package/es/page/style/index.js +0 -1
- package/es/page/style/index.js.map +0 -1
- package/es/query-form/style/index.js +0 -1
- package/es/query-form/style/index.js.map +0 -1
- package/es/query-list-scene/style/index.js +0 -1
- package/es/query-list-scene/style/index.js.map +0 -1
- package/es/render-empty/style/index.js +0 -1
- package/es/render-empty/style/index.js.map +0 -1
- package/es/table/style/index.js +0 -2
- package/es/table/style/index.js.map +0 -1
- package/es/title/style/index.js +0 -1
- package/es/title/style/index.js.map +0 -1
- package/es/tntd-icon/style/index.js +0 -1
- package/es/tntd-icon/style/index.js.map +0 -1
- package/es/tntd-layout/style/index.js +0 -1
- package/es/tntd-layout/style/index.js.map +0 -1
- package/es/tntd-modal/style/index.js +0 -1
- package/es/tntd-modal/style/index.js.map +0 -1
- package/es/tntd-select/style/index.js +0 -1
- package/es/tntd-select/style/index.js.map +0 -1
- package/lib/array-input/style/index.d.ts +0 -1
- package/lib/array-input/style/index.d.ts.map +0 -1
- package/lib/array-input/style/index.js +0 -1
- package/lib/array-input/style/index.js.map +0 -1
- package/lib/auth-context/style/index.d.ts +0 -1
- package/lib/auth-context/style/index.d.ts.map +0 -1
- package/lib/auth-context/style/index.js +0 -1
- package/lib/auth-context/style/index.js.map +0 -1
- package/lib/development-login/style/index.d.ts +0 -1
- package/lib/development-login/style/index.d.ts.map +0 -1
- package/lib/development-login/style/index.js +0 -1
- package/lib/development-login/style/index.js.map +0 -1
- package/lib/ellipsis/style/index.d.ts +0 -1
- package/lib/ellipsis/style/index.d.ts.map +0 -1
- package/lib/ellipsis/style/index.js +0 -1
- package/lib/ellipsis/style/index.js.map +0 -1
- package/lib/empty/render-empty.d.ts +0 -3
- package/lib/empty/render-empty.d.ts.map +0 -1
- package/lib/empty/render-empty.js +0 -32
- package/lib/empty/render-empty.js.map +0 -1
- package/lib/empty/style/index.d.ts +0 -3
- package/lib/empty/style/index.d.ts.map +0 -1
- package/lib/empty/style/index.js +0 -4
- package/lib/empty/style/index.js.map +0 -1
- package/lib/handle/style/index.d.ts +0 -1
- package/lib/handle/style/index.d.ts.map +0 -1
- package/lib/handle/style/index.js +0 -1
- package/lib/handle/style/index.js.map +0 -1
- package/lib/icon-list/style/index.d.ts +0 -3
- package/lib/icon-list/style/index.d.ts.map +0 -1
- package/lib/icon-list/style/index.js +0 -8
- package/lib/icon-list/style/index.js.map +0 -1
- package/lib/img/style/index.d.ts +0 -1
- package/lib/img/style/index.d.ts.map +0 -1
- package/lib/img/style/index.js +0 -1
- package/lib/img/style/index.js.map +0 -1
- package/lib/loading-button/style/index.d.ts +0 -1
- package/lib/loading-button/style/index.d.ts.map +0 -1
- package/lib/loading-button/style/index.js +0 -1
- package/lib/loading-button/style/index.js.map +0 -1
- package/lib/page/style/index.d.ts +0 -1
- package/lib/page/style/index.d.ts.map +0 -1
- package/lib/page/style/index.js +0 -1
- package/lib/page/style/index.js.map +0 -1
- package/lib/query-form/style/index.d.ts +0 -1
- package/lib/query-form/style/index.d.ts.map +0 -1
- package/lib/query-form/style/index.js +0 -1
- package/lib/query-form/style/index.js.map +0 -1
- package/lib/query-list-scene/style/index.d.ts +0 -1
- package/lib/query-list-scene/style/index.d.ts.map +0 -1
- package/lib/query-list-scene/style/index.js +0 -1
- package/lib/query-list-scene/style/index.js.map +0 -1
- package/lib/render-empty/style/index.d.ts +0 -2
- package/lib/render-empty/style/index.d.ts.map +0 -1
- package/lib/render-empty/style/index.js +0 -3
- package/lib/render-empty/style/index.js.map +0 -1
- package/lib/table/style/index.d.ts +0 -3
- package/lib/table/style/index.d.ts.map +0 -1
- package/lib/table/style/index.js +0 -4
- package/lib/table/style/index.js.map +0 -1
- package/lib/title/style/index.d.ts +0 -1
- package/lib/title/style/index.d.ts.map +0 -1
- package/lib/title/style/index.js +0 -1
- package/lib/title/style/index.js.map +0 -1
- package/lib/tntd-icon/style/index.d.ts +0 -1
- package/lib/tntd-icon/style/index.d.ts.map +0 -1
- package/lib/tntd-icon/style/index.js +0 -1
- package/lib/tntd-icon/style/index.js.map +0 -1
- package/lib/tntd-layout/style/index.d.ts +0 -1
- package/lib/tntd-layout/style/index.d.ts.map +0 -1
- package/lib/tntd-layout/style/index.js +0 -1
- package/lib/tntd-layout/style/index.js.map +0 -1
- package/lib/tntd-modal/style/index.d.ts +0 -1
- package/lib/tntd-modal/style/index.d.ts.map +0 -1
- package/lib/tntd-modal/style/index.js +0 -1
- package/lib/tntd-modal/style/index.js.map +0 -1
- package/lib/tntd-select/style/index.d.ts +0 -1
- package/lib/tntd-select/style/index.d.ts.map +0 -1
- package/lib/tntd-select/style/index.js +0 -1
- package/lib/tntd-select/style/index.js.map +0 -1
|
@@ -4,31 +4,43 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = useSearchConfig;
|
|
7
|
+
|
|
7
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
8
10
|
var _warning = _interopRequireDefault(require("rc-util/lib/warning"));
|
|
11
|
+
|
|
9
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
19
|
+
|
|
13
20
|
// Convert `showSearch` to unique config
|
|
14
21
|
function useSearchConfig(showSearch) {
|
|
15
22
|
return React.useMemo(function () {
|
|
16
23
|
if (!showSearch) {
|
|
17
24
|
return [false, {}];
|
|
18
25
|
}
|
|
26
|
+
|
|
19
27
|
var searchConfig = {
|
|
20
28
|
matchInputWidth: true,
|
|
21
29
|
limit: 50
|
|
22
30
|
};
|
|
31
|
+
|
|
23
32
|
if (showSearch && _typeof(showSearch) === 'object') {
|
|
24
33
|
searchConfig = Object.assign(Object.assign({}, searchConfig), showSearch);
|
|
25
34
|
}
|
|
35
|
+
|
|
26
36
|
if (searchConfig.limit <= 0) {
|
|
27
37
|
delete searchConfig.limit;
|
|
38
|
+
|
|
28
39
|
if (process.env.NODE_ENV !== 'production') {
|
|
29
40
|
(0, _warning["default"])(false, "'limit' of showSearch should be positive number or false.");
|
|
30
41
|
}
|
|
31
42
|
}
|
|
43
|
+
|
|
32
44
|
return [true, searchConfig];
|
|
33
45
|
}, [showSearch]);
|
|
34
46
|
}
|
|
@@ -1,82 +1,97 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) {
|
|
3
|
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports["default"] = exports.SEARCH_MARK = void 0;
|
|
9
|
+
|
|
8
10
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
|
|
18
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
19
|
+
|
|
20
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
21
|
+
|
|
22
|
+
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
23
|
+
|
|
24
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
25
|
+
|
|
20
26
|
var SEARCH_MARK = '__rc_cascader_search_mark__';
|
|
21
27
|
exports.SEARCH_MARK = SEARCH_MARK;
|
|
28
|
+
|
|
22
29
|
var defaultFilter = function defaultFilter(search, options, _ref) {
|
|
23
30
|
var label = _ref.label;
|
|
24
31
|
return options.some(function (opt) {
|
|
25
32
|
return String(opt[label]).toLowerCase().includes(search.toLowerCase());
|
|
26
33
|
});
|
|
27
34
|
};
|
|
35
|
+
|
|
28
36
|
var defaultRender = function defaultRender(inputValue, path, prefixCls, fieldNames) {
|
|
29
37
|
return path.map(function (opt) {
|
|
30
38
|
return opt[fieldNames.label];
|
|
31
39
|
}).join(' / ');
|
|
32
40
|
};
|
|
41
|
+
|
|
33
42
|
var _default = function _default(search, options, fieldNames, prefixCls, config, changeOnSelect) {
|
|
34
43
|
var _config$filter = config.filter,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
filter = _config$filter === void 0 ? defaultFilter : _config$filter,
|
|
45
|
+
_config$render = config.render,
|
|
46
|
+
render = _config$render === void 0 ? defaultRender : _config$render,
|
|
47
|
+
_config$limit = config.limit,
|
|
48
|
+
limit = _config$limit === void 0 ? 50 : _config$limit,
|
|
49
|
+
sort = config.sort;
|
|
41
50
|
return React.useMemo(function () {
|
|
42
51
|
var filteredOptions = [];
|
|
52
|
+
|
|
43
53
|
if (!search) {
|
|
44
54
|
return [];
|
|
45
55
|
}
|
|
56
|
+
|
|
46
57
|
function dig(list, pathOptions) {
|
|
47
58
|
list.forEach(function (option) {
|
|
48
59
|
// Perf saving when `sort` is disabled and `limit` is provided
|
|
49
60
|
if (!sort && limit > 0 && filteredOptions.length >= limit) {
|
|
50
61
|
return;
|
|
51
62
|
}
|
|
63
|
+
|
|
52
64
|
var connectedPathOptions = [].concat(_toConsumableArray(pathOptions), [option]);
|
|
53
|
-
var children = option[fieldNames.children];
|
|
54
|
-
|
|
55
|
-
if (
|
|
56
|
-
// If is
|
|
57
|
-
!children || children.length === 0 ||
|
|
58
|
-
// If is changeOnSelect
|
|
65
|
+
var children = option[fieldNames.children]; // If current option is filterable
|
|
66
|
+
|
|
67
|
+
if ( // If is leaf option
|
|
68
|
+
!children || children.length === 0 || // If is changeOnSelect
|
|
59
69
|
changeOnSelect) {
|
|
60
70
|
if (filter(search, connectedPathOptions, {
|
|
61
71
|
label: fieldNames.label
|
|
62
72
|
})) {
|
|
63
73
|
var _Object$assign;
|
|
74
|
+
|
|
64
75
|
filteredOptions.push(Object.assign(Object.assign({}, option), (_Object$assign = {}, _defineProperty(_Object$assign, fieldNames.label, render(search, connectedPathOptions, prefixCls, fieldNames)), _defineProperty(_Object$assign, SEARCH_MARK, connectedPathOptions), _Object$assign)));
|
|
65
76
|
}
|
|
66
77
|
}
|
|
78
|
+
|
|
67
79
|
if (children) {
|
|
68
80
|
dig(option[fieldNames.children], connectedPathOptions);
|
|
69
81
|
}
|
|
70
82
|
});
|
|
71
83
|
}
|
|
72
|
-
|
|
73
|
-
// Do sort
|
|
84
|
+
|
|
85
|
+
dig(options, []); // Do sort
|
|
86
|
+
|
|
74
87
|
if (sort) {
|
|
75
88
|
filteredOptions.sort(function (a, b) {
|
|
76
89
|
return sort(a[SEARCH_MARK], b[SEARCH_MARK], search, fieldNames);
|
|
77
90
|
});
|
|
78
91
|
}
|
|
92
|
+
|
|
79
93
|
return limit > 0 ? filteredOptions.slice(0, limit) : filteredOptions;
|
|
80
94
|
}, [search, options, fieldNames, prefixCls, render, changeOnSelect, filter, sort, limit]);
|
|
81
95
|
};
|
|
96
|
+
|
|
82
97
|
exports["default"] = _default;
|
|
@@ -4,7 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _Cascader = _interopRequireDefault(require("./Cascader"));
|
|
9
|
+
|
|
8
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
9
12
|
var _default = _Cascader["default"];
|
|
10
13
|
exports["default"] = _default;
|
|
@@ -3,33 +3,38 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.VALUE_SPLIT = exports.SHOW_PARENT = exports.SHOW_CHILD = void 0;
|
|
7
|
-
exports.fillFieldNames = fillFieldNames;
|
|
8
|
-
exports.isLeaf = isLeaf;
|
|
9
|
-
exports.scrollIntoParentView = scrollIntoParentView;
|
|
10
6
|
exports.toPathKey = toPathKey;
|
|
11
7
|
exports.toPathKeys = toPathKeys;
|
|
12
8
|
exports.toPathValueStr = toPathValueStr;
|
|
9
|
+
exports.fillFieldNames = fillFieldNames;
|
|
10
|
+
exports.isLeaf = isLeaf;
|
|
11
|
+
exports.scrollIntoParentView = scrollIntoParentView;
|
|
12
|
+
exports.SHOW_CHILD = exports.SHOW_PARENT = exports.VALUE_SPLIT = void 0;
|
|
13
13
|
var VALUE_SPLIT = '__RC_CASCADER_SPLIT__';
|
|
14
14
|
exports.VALUE_SPLIT = VALUE_SPLIT;
|
|
15
15
|
var SHOW_PARENT = 'SHOW_PARENT';
|
|
16
16
|
exports.SHOW_PARENT = SHOW_PARENT;
|
|
17
17
|
var SHOW_CHILD = 'SHOW_CHILD';
|
|
18
18
|
exports.SHOW_CHILD = SHOW_CHILD;
|
|
19
|
+
|
|
19
20
|
function toPathKey(value) {
|
|
20
21
|
return value.join(VALUE_SPLIT);
|
|
21
22
|
}
|
|
23
|
+
|
|
22
24
|
function toPathKeys(value) {
|
|
23
25
|
return value.map(toPathKey);
|
|
24
26
|
}
|
|
27
|
+
|
|
25
28
|
function toPathValueStr(pathKey) {
|
|
26
29
|
return pathKey.split(VALUE_SPLIT);
|
|
27
30
|
}
|
|
31
|
+
|
|
28
32
|
function fillFieldNames(fieldNames) {
|
|
29
33
|
var _ref = fieldNames || {},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
label = _ref.label,
|
|
35
|
+
value = _ref.value,
|
|
36
|
+
children = _ref.children;
|
|
37
|
+
|
|
33
38
|
var val = value || 'value';
|
|
34
39
|
return {
|
|
35
40
|
label: label || 'label',
|
|
@@ -38,17 +43,23 @@ function fillFieldNames(fieldNames) {
|
|
|
38
43
|
children: children || 'children'
|
|
39
44
|
};
|
|
40
45
|
}
|
|
46
|
+
|
|
41
47
|
function isLeaf(option, fieldNames) {
|
|
42
|
-
var _a, _b;
|
|
43
|
-
|
|
48
|
+
var _a, _b; // @ts-ignore
|
|
49
|
+
|
|
50
|
+
|
|
44
51
|
return (_a = option.isLeaf) !== null && _a !== void 0 ? _a : !((_b = option[fieldNames.children]) === null || _b === void 0 ? void 0 : _b.length);
|
|
45
52
|
}
|
|
53
|
+
|
|
46
54
|
function scrollIntoParentView(element) {
|
|
47
55
|
var parent = element.parentElement;
|
|
56
|
+
|
|
48
57
|
if (!parent) {
|
|
49
58
|
return;
|
|
50
59
|
}
|
|
60
|
+
|
|
51
61
|
var elementToParent = element.offsetTop - parent.offsetTop; // offsetParent may not be parent.
|
|
62
|
+
|
|
52
63
|
if (elementToParent - parent.scrollTop < 0) {
|
|
53
64
|
parent.scrollTo({
|
|
54
65
|
top: elementToParent
|
|
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.formatStrategyValues = formatStrategyValues;
|
|
7
7
|
exports.toPathOptions = toPathOptions;
|
|
8
|
+
|
|
8
9
|
var _commonUtil = require("./commonUtil");
|
|
10
|
+
|
|
9
11
|
function formatStrategyValues(pathKeys, getKeyPathEntities, showCheckedStrategy) {
|
|
10
12
|
var valueSet = new Set(pathKeys);
|
|
11
13
|
var keyPathEntities = getKeyPathEntities();
|
|
@@ -18,11 +20,15 @@ function formatStrategyValues(pathKeys, getKeyPathEntities, showCheckedStrategy)
|
|
|
18
20
|
})) : !(parent && !parent.node.disabled && valueSet.has(parent.key));
|
|
19
21
|
});
|
|
20
22
|
}
|
|
23
|
+
|
|
21
24
|
function toPathOptions(valueCells, options, fieldNames) {
|
|
22
25
|
var stringMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
26
|
+
|
|
23
27
|
var _a;
|
|
28
|
+
|
|
24
29
|
var currentList = options;
|
|
25
30
|
var valueOptions = [];
|
|
31
|
+
|
|
26
32
|
var _loop = function _loop(i) {
|
|
27
33
|
var valueCell = valueCells[i];
|
|
28
34
|
var foundIndex = currentList === null || currentList === void 0 ? void 0 : currentList.findIndex(function (option) {
|
|
@@ -38,8 +44,10 @@ function toPathOptions(valueCells, options, fieldNames) {
|
|
|
38
44
|
});
|
|
39
45
|
currentList = foundOption === null || foundOption === void 0 ? void 0 : foundOption[fieldNames.children];
|
|
40
46
|
};
|
|
47
|
+
|
|
41
48
|
for (var i = 0; i < valueCells.length; i += 1) {
|
|
42
49
|
_loop(i);
|
|
43
50
|
}
|
|
51
|
+
|
|
44
52
|
return valueOptions;
|
|
45
53
|
}
|
|
@@ -3,39 +3,46 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
6
|
exports.warningNullOptions = warningNullOptions;
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
|
|
8
9
|
var _warning = _interopRequireDefault(require("rc-util/lib/warning"));
|
|
10
|
+
|
|
9
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
-
// @ts-nocheck
|
|
11
12
|
|
|
13
|
+
// @ts-nocheck
|
|
12
14
|
function warningProps(props) {
|
|
13
15
|
var onPopupVisibleChange = props.onPopupVisibleChange,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
popupVisible = props.popupVisible,
|
|
17
|
+
popupClassName = props.popupClassName,
|
|
18
|
+
popupPlacement = props.popupPlacement;
|
|
17
19
|
(0, _warning["default"])(!onPopupVisibleChange, '`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead.');
|
|
18
20
|
(0, _warning["default"])(popupVisible === undefined, '`popupVisible` is deprecated. Please use `open` instead.');
|
|
19
21
|
(0, _warning["default"])(popupClassName === undefined, '`popupClassName` is deprecated. Please use `dropdownClassName` instead.');
|
|
20
22
|
(0, _warning["default"])(popupPlacement === undefined, '`popupPlacement` is deprecated. Please use `placement` instead.');
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
+
} // value in Cascader options should not be null
|
|
24
|
+
|
|
25
|
+
|
|
23
26
|
function warningNullOptions(options, fieldNames) {
|
|
24
27
|
if (options) {
|
|
25
28
|
var recursiveOptions = function recursiveOptions(optionsList) {
|
|
26
29
|
for (var i = 0; i < optionsList.length; i++) {
|
|
27
30
|
var option = optionsList[i];
|
|
31
|
+
|
|
28
32
|
if (option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value] === null) {
|
|
29
33
|
(0, _warning["default"])(false, '`value` in Cascader options should not be `null`.');
|
|
30
34
|
return true;
|
|
31
35
|
}
|
|
36
|
+
|
|
32
37
|
if (Array.isArray(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]) && recursiveOptions(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children])) {
|
|
33
38
|
return true;
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
41
|
};
|
|
42
|
+
|
|
37
43
|
recursiveOptions(options);
|
|
38
44
|
}
|
|
39
45
|
}
|
|
46
|
+
|
|
40
47
|
var _default = warningProps;
|
|
41
48
|
exports["default"] = _default;
|