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/query-form/index.js
CHANGED
|
@@ -1,82 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
8
|
var _debounce2 = _interopRequireDefault(require("lodash/debounce"));
|
|
9
|
-
|
|
10
9
|
var _classnames3 = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
11
|
var _createActions = _interopRequireDefault(require("./createActions"));
|
|
15
|
-
|
|
16
12
|
var _Field = _interopRequireDefault(require("./Field"));
|
|
17
|
-
|
|
18
13
|
var _useForm = _interopRequireDefault(require("./useForm"));
|
|
19
|
-
|
|
20
14
|
var _badge = _interopRequireDefault(require("../badge"));
|
|
21
|
-
|
|
22
15
|
var _button = _interopRequireDefault(require("../button"));
|
|
23
|
-
|
|
24
16
|
var _drawer = _interopRequireDefault(require("../drawer"));
|
|
25
|
-
|
|
26
17
|
var _form = _interopRequireDefault(require("../form"));
|
|
27
|
-
|
|
28
18
|
var _prevLocale = require("../prev-locale");
|
|
29
|
-
|
|
30
19
|
var _tntdIcon = _interopRequireDefault(require("../tntd-icon"));
|
|
31
|
-
|
|
32
20
|
require("./index.less");
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
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; }
|
|
38
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
39
|
-
|
|
40
|
-
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); }
|
|
41
|
-
|
|
42
|
-
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; }
|
|
43
|
-
|
|
24
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
44
25
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
45
|
-
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
function
|
|
51
|
-
|
|
52
|
-
function
|
|
53
|
-
|
|
26
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
27
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
28
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
29
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
30
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
31
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
32
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
33
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
54
34
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
55
|
-
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
59
|
-
|
|
35
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
36
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
60
37
|
var clsPrefix = 'tnt-queryform';
|
|
61
|
-
|
|
62
|
-
var QueryForm =
|
|
63
|
-
/*#__PURE__*/
|
|
64
|
-
function (_React$PureComponent) {
|
|
38
|
+
var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
65
39
|
_inherits(QueryForm, _React$PureComponent);
|
|
66
|
-
|
|
40
|
+
var _super = _createSuper(QueryForm);
|
|
67
41
|
function QueryForm(props) {
|
|
68
42
|
var _this;
|
|
69
|
-
|
|
70
43
|
_classCallCheck(this, QueryForm);
|
|
71
|
-
|
|
72
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));
|
|
44
|
+
_this = _super.call(this, props);
|
|
73
45
|
Object.defineProperty(_assertThisInitialized(_this), "onWindowResize", {
|
|
74
46
|
enumerable: true,
|
|
75
47
|
configurable: true,
|
|
76
48
|
writable: true,
|
|
77
49
|
value: (0, _debounce2["default"])(function () {
|
|
78
50
|
var current = _this.fieldsRef.current;
|
|
79
|
-
|
|
80
51
|
if (current) {
|
|
81
52
|
setTimeout(function () {
|
|
82
53
|
_this.setState({
|
|
@@ -100,7 +71,6 @@ function (_React$PureComponent) {
|
|
|
100
71
|
writable: true,
|
|
101
72
|
value: function value() {
|
|
102
73
|
var _a, _b;
|
|
103
|
-
|
|
104
74
|
(_b = (_a = _this.props).onSearch) === null || _b === void 0 ? void 0 : _b.call(_a, _this.form.getValues());
|
|
105
75
|
}
|
|
106
76
|
});
|
|
@@ -110,13 +80,10 @@ function (_React$PureComponent) {
|
|
|
110
80
|
writable: true,
|
|
111
81
|
value: function value() {
|
|
112
82
|
var _this$props = _this.props,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
83
|
+
initialValues = _this$props.initialValues,
|
|
84
|
+
onReset = _this$props.onReset;
|
|
116
85
|
_this.form.setValues(Object.assign({}, initialValues));
|
|
117
|
-
|
|
118
86
|
_this.updateDrawerFieldsValueCount();
|
|
119
|
-
|
|
120
87
|
onReset === null || onReset === void 0 ? void 0 : onReset(initialValues);
|
|
121
88
|
}
|
|
122
89
|
});
|
|
@@ -126,11 +93,9 @@ function (_React$PureComponent) {
|
|
|
126
93
|
writable: true,
|
|
127
94
|
value: function value() {
|
|
128
95
|
var _a, _b;
|
|
129
|
-
|
|
130
96
|
_this.setState({
|
|
131
97
|
expanded: !_this.state.expanded
|
|
132
98
|
});
|
|
133
|
-
|
|
134
99
|
(_b = (_a = _this.props).onToggleExpand) === null || _b === void 0 ? void 0 : _b.call(_a, !_this.state.expanded);
|
|
135
100
|
}
|
|
136
101
|
});
|
|
@@ -150,7 +115,6 @@ function (_React$PureComponent) {
|
|
|
150
115
|
writable: true,
|
|
151
116
|
value: function value(name, _value) {
|
|
152
117
|
var values = _this.form.getValues();
|
|
153
|
-
|
|
154
118
|
var newValues = Object.assign(Object.assign({}, values), _defineProperty({}, name, _value));
|
|
155
119
|
var changedInfo = {
|
|
156
120
|
name: name,
|
|
@@ -158,15 +122,11 @@ function (_React$PureComponent) {
|
|
|
158
122
|
preValue: values === null || values === void 0 ? void 0 : values[name]
|
|
159
123
|
};
|
|
160
124
|
var onChange = _this.props.onChange;
|
|
161
|
-
|
|
162
125
|
_this.form.setData('values', newValues);
|
|
163
|
-
|
|
164
126
|
for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
165
127
|
rest[_key - 2] = arguments[_key];
|
|
166
128
|
}
|
|
167
|
-
|
|
168
129
|
onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));
|
|
169
|
-
|
|
170
130
|
_this.updateDrawerFieldsValueCount(newValues);
|
|
171
131
|
}
|
|
172
132
|
});
|
|
@@ -176,22 +136,17 @@ function (_React$PureComponent) {
|
|
|
176
136
|
writable: true,
|
|
177
137
|
value: function value() {
|
|
178
138
|
var values = _this.form.getValues();
|
|
179
|
-
|
|
180
139
|
var _this$props2 = _this.props,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
140
|
+
showFieldCount = _this$props2.showFieldCount,
|
|
141
|
+
children = _this$props2.children;
|
|
184
142
|
if (showFieldCount) {
|
|
185
143
|
var drawerFieldsValueCount = children.reduce(function (acc, cur, index) {
|
|
186
144
|
var _a;
|
|
187
|
-
|
|
188
145
|
if (index >= showFieldCount && (values === null || values === void 0 ? void 0 : values[(_a = cur === null || cur === void 0 ? void 0 : cur.props) === null || _a === void 0 ? void 0 : _a.name])) {
|
|
189
146
|
acc++;
|
|
190
147
|
}
|
|
191
|
-
|
|
192
148
|
return acc;
|
|
193
149
|
}, 0);
|
|
194
|
-
|
|
195
150
|
if (drawerFieldsValueCount !== _this.state.drawerFieldsValueCount) {
|
|
196
151
|
_this.setState({
|
|
197
152
|
drawerFieldsValueCount: drawerFieldsValueCount
|
|
@@ -207,7 +162,6 @@ function (_React$PureComponent) {
|
|
|
207
162
|
value: function value() {
|
|
208
163
|
if ('ResizeObserver' in window) {
|
|
209
164
|
var current = _this.fieldsRef.current;
|
|
210
|
-
|
|
211
165
|
if (current) {
|
|
212
166
|
var observer = new ResizeObserver(_this.onWindowResize);
|
|
213
167
|
observer.observe(current);
|
|
@@ -224,11 +178,11 @@ function (_React$PureComponent) {
|
|
|
224
178
|
}
|
|
225
179
|
});
|
|
226
180
|
var form = props.form,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
181
|
+
initialValues = props.initialValues,
|
|
182
|
+
_props$showExpand = props.showExpand,
|
|
183
|
+
showExpand = _props$showExpand === void 0 ? true : _props$showExpand,
|
|
184
|
+
renderActions = props.renderActions,
|
|
185
|
+
defaultExpanded = props.defaultExpanded;
|
|
232
186
|
_this.state = {
|
|
233
187
|
showMore: false,
|
|
234
188
|
expanded: defaultExpanded || !showExpand || renderActions ? true : false,
|
|
@@ -238,41 +192,35 @@ function (_React$PureComponent) {
|
|
|
238
192
|
_this.fieldsRef = (0, _react.createRef)();
|
|
239
193
|
_this.formBoxRef = (0, _react.createRef)();
|
|
240
194
|
_this.form = form || (0, _createActions["default"])();
|
|
241
|
-
|
|
242
195
|
_this.form.setData('initialValues', initialValues);
|
|
243
|
-
|
|
244
196
|
_this.form.setData('values', Object.assign({}, initialValues));
|
|
245
|
-
|
|
246
197
|
return _this;
|
|
247
198
|
}
|
|
248
|
-
|
|
249
199
|
_createClass(QueryForm, [{
|
|
250
200
|
key: "render",
|
|
251
201
|
value: function render() {
|
|
252
202
|
var _this2 = this;
|
|
253
|
-
|
|
254
203
|
var _this$props3 = this.props,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
204
|
+
children = _this$props3.children,
|
|
205
|
+
_this$props3$classNam = _this$props3.className,
|
|
206
|
+
className = _this$props3$classNam === void 0 ? '' : _this$props3$classNam,
|
|
207
|
+
_this$props3$initialV = _this$props3.initialValues,
|
|
208
|
+
initialValues = _this$props3$initialV === void 0 ? {} : _this$props3$initialV,
|
|
209
|
+
renderActions = _this$props3.renderActions,
|
|
210
|
+
_this$props3$showSear = _this$props3.showSearch,
|
|
211
|
+
showSearch = _this$props3$showSear === void 0 ? true : _this$props3$showSear,
|
|
212
|
+
_this$props3$showRese = _this$props3.showReset,
|
|
213
|
+
showReset = _this$props3$showRese === void 0 ? true : _this$props3$showRese,
|
|
214
|
+
showFieldCount = _this$props3.showFieldCount,
|
|
215
|
+
_this$props3$drawerPr = _this$props3.drawerProps,
|
|
216
|
+
drawerProps = _this$props3$drawerPr === void 0 ? {} : _this$props3$drawerPr,
|
|
217
|
+
size = _this$props3.size;
|
|
269
218
|
var extraActions = this.props.extraActions;
|
|
270
219
|
var _this$state = this.state,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
220
|
+
expanded = _this$state.expanded,
|
|
221
|
+
showMore = _this$state.showMore,
|
|
222
|
+
drawerVisible = _this$state.drawerVisible,
|
|
223
|
+
drawerFieldsValueCount = _this$state.drawerFieldsValueCount;
|
|
276
224
|
var renderFormActions = renderActions || function () {
|
|
277
225
|
return _react["default"].createElement(_react["default"].Fragment, null, showFieldCount && _react["default"].createElement(_badge["default"], {
|
|
278
226
|
count: drawerFieldsValueCount
|
|
@@ -291,11 +239,9 @@ function (_React$PureComponent) {
|
|
|
291
239
|
onClick: _this2.onToggleExpand
|
|
292
240
|
}, _this2.getText(expanded ? 'collapse' : 'expand')), _react["default"].Children.map(children, function (child) {
|
|
293
241
|
var _a;
|
|
294
|
-
|
|
295
242
|
return child && ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.align) === 'right' && _react["default"].cloneElement(child);
|
|
296
243
|
}));
|
|
297
244
|
};
|
|
298
|
-
|
|
299
245
|
return _react["default"].createElement("div", {
|
|
300
246
|
ref: this.formBoxRef,
|
|
301
247
|
className: (0, _classnames3["default"])(clsPrefix, _defineProperty({}, className, className))
|
|
@@ -309,7 +255,6 @@ function (_React$PureComponent) {
|
|
|
309
255
|
ref: this.fieldsRef
|
|
310
256
|
}, _react["default"].Children.map(children, function (child, index) {
|
|
311
257
|
var _a;
|
|
312
|
-
|
|
313
258
|
return child && ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.align) !== 'right' && (!showFieldCount || showFieldCount > index) && _react["default"].cloneElement(child, {
|
|
314
259
|
form: _this2.form,
|
|
315
260
|
initialValue: initialValues === null || initialValues === void 0 ? void 0 : initialValues[child.props.name],
|
|
@@ -358,13 +303,11 @@ function (_React$PureComponent) {
|
|
|
358
303
|
key: "isFieldsWidthOverflow",
|
|
359
304
|
value: function isFieldsWidthOverflow() {
|
|
360
305
|
var current = this.fieldsRef.current;
|
|
361
|
-
|
|
362
306
|
if (current) {
|
|
363
307
|
return parseFloat(window.getComputedStyle(current).width, 10) < [].reduce.call(current.children, function (acc, cur) {
|
|
364
308
|
var _window$getComputedSt = window.getComputedStyle(cur),
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
309
|
+
margin = _window$getComputedSt.margin,
|
|
310
|
+
width = _window$getComputedSt.width;
|
|
368
311
|
var marginArray = margin.split(' ').map(function (str) {
|
|
369
312
|
return parseFloat(str, 10);
|
|
370
313
|
});
|
|
@@ -372,30 +315,23 @@ function (_React$PureComponent) {
|
|
|
372
315
|
return acc;
|
|
373
316
|
}, 0);
|
|
374
317
|
}
|
|
375
|
-
|
|
376
318
|
return false;
|
|
377
319
|
}
|
|
378
320
|
}, {
|
|
379
321
|
key: "updateFieldHeight",
|
|
380
322
|
value: function updateFieldHeight() {
|
|
381
323
|
var _a, _b, _c;
|
|
382
|
-
|
|
383
324
|
var formBoxRef = this.formBoxRef,
|
|
384
|
-
|
|
385
|
-
|
|
325
|
+
fieldsRef = this.fieldsRef;
|
|
386
326
|
var getFieldHeight = function getFieldHeight() {
|
|
387
327
|
var _a;
|
|
388
|
-
|
|
389
328
|
var current = fieldsRef.current;
|
|
390
329
|
var height = '32px';
|
|
391
|
-
|
|
392
330
|
if (current && ((_a = current.children) === null || _a === void 0 ? void 0 : _a[0])) {
|
|
393
331
|
height = window.getComputedStyle(current.children[0]).height;
|
|
394
332
|
}
|
|
395
|
-
|
|
396
333
|
return height;
|
|
397
334
|
};
|
|
398
|
-
|
|
399
335
|
var queryFormActionsDom = (_a = formBoxRef === null || formBoxRef === void 0 ? void 0 : formBoxRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(".".concat(clsPrefix, "-actions"));
|
|
400
336
|
var queryFormExtraDom = (_b = formBoxRef === null || formBoxRef === void 0 ? void 0 : formBoxRef.current) === null || _b === void 0 ? void 0 : _b.querySelector(".".concat(clsPrefix, "-extra"));
|
|
401
337
|
var formItemsDomList = (_c = fieldsRef === null || fieldsRef === void 0 ? void 0 : fieldsRef.current) === null || _c === void 0 ? void 0 : _c.querySelectorAll('.ant-form-item-control');
|
|
@@ -416,24 +352,22 @@ function (_React$PureComponent) {
|
|
|
416
352
|
value: function componentDidMount() {
|
|
417
353
|
var current = this.fieldsRef.current;
|
|
418
354
|
var _this$props4 = this.props,
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
355
|
+
showFieldCount = _this$props4.showFieldCount,
|
|
356
|
+
_this$props4$showExpa = _this$props4.showExpand,
|
|
357
|
+
showExpand = _this$props4$showExpa === void 0 ? true : _this$props4$showExpa;
|
|
422
358
|
this.updateFieldHeight();
|
|
423
|
-
this.form.on('search', this.search);
|
|
359
|
+
this.form.on('search', this.search);
|
|
360
|
+
// 未设置第一行显示数量且禁止了展开操作 或 自定义了操作区域,则不需要处理展开计算逻辑
|
|
424
361
|
// || renderActions
|
|
425
|
-
|
|
426
362
|
if (!showFieldCount && !showExpand) {
|
|
427
363
|
return;
|
|
428
364
|
}
|
|
429
|
-
|
|
430
365
|
if (!showFieldCount) {
|
|
431
366
|
if (current && this.isFieldsWidthOverflow()) {
|
|
432
367
|
this.setState({
|
|
433
368
|
showMore: true
|
|
434
369
|
});
|
|
435
370
|
}
|
|
436
|
-
|
|
437
371
|
this.removeResizeListener = this.addResizeListener();
|
|
438
372
|
} else {
|
|
439
373
|
this.updateDrawerFieldsValueCount();
|
|
@@ -445,17 +379,14 @@ function (_React$PureComponent) {
|
|
|
445
379
|
key: "componentWillUnmount",
|
|
446
380
|
value: function componentWillUnmount() {
|
|
447
381
|
var _a;
|
|
448
|
-
|
|
449
382
|
(_a = this.removeResizeListener) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
450
383
|
this.form.off('setValues', this.updateDrawerFieldsValueCount);
|
|
451
384
|
this.form.off('setValue', this.updateDrawerFieldsValueCount);
|
|
452
385
|
this.form.off('search', this.search);
|
|
453
386
|
}
|
|
454
387
|
}]);
|
|
455
|
-
|
|
456
388
|
return QueryForm;
|
|
457
389
|
}(_react["default"].PureComponent);
|
|
458
|
-
|
|
459
390
|
QueryForm.Field = _Field["default"];
|
|
460
391
|
QueryForm.useForm = _useForm["default"];
|
|
461
392
|
QueryForm.createForm = _createActions["default"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/query-form/style/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/query-form/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = useForm;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
var _createActions = _interopRequireDefault(require("./createActions"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
10
|
function useForm() {
|
|
15
11
|
var form = (0, _react.useRef)((0, _createActions["default"])());
|
|
16
12
|
return [form.current];
|