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
|
@@ -1,63 +1,41 @@
|
|
|
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 _throttle2 = _interopRequireDefault(require("lodash/throttle"));
|
|
9
|
-
|
|
10
9
|
var _pickBy2 = _interopRequireDefault(require("lodash/pickBy"));
|
|
11
|
-
|
|
12
10
|
var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
|
|
13
|
-
|
|
14
11
|
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
15
|
-
|
|
16
12
|
var _debounce2 = _interopRequireDefault(require("lodash/debounce"));
|
|
17
|
-
|
|
18
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
-
|
|
20
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
-
|
|
22
15
|
var _reactDom = require("react-dom");
|
|
23
|
-
|
|
24
16
|
var _prevLocale = require("../prev-locale");
|
|
25
|
-
|
|
26
17
|
var _spin = _interopRequireDefault(require("../spin"));
|
|
27
|
-
|
|
28
18
|
var _table = _interopRequireDefault(require("../table"));
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
-
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
34
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
|
-
|
|
36
|
-
function _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); }
|
|
37
|
-
|
|
38
22
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
function
|
|
47
|
-
|
|
23
|
+
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); } }
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
26
|
+
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); }
|
|
27
|
+
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); }
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
+
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); }; }
|
|
30
|
+
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); }
|
|
48
31
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
49
|
-
|
|
50
|
-
function
|
|
51
|
-
|
|
52
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
53
|
-
|
|
32
|
+
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; } }
|
|
33
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
54
34
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
55
35
|
var t = {};
|
|
56
|
-
|
|
57
36
|
for (var p in s) {
|
|
58
37
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
59
38
|
}
|
|
60
|
-
|
|
61
39
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
62
40
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
63
41
|
}
|
|
@@ -67,28 +45,20 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
67
45
|
* @file QueryList
|
|
68
46
|
* @author you.zhang
|
|
69
47
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
var QueryList =
|
|
73
|
-
/*#__PURE__*/
|
|
74
|
-
function (_React$PureComponent) {
|
|
48
|
+
var QueryList = /*#__PURE__*/function (_React$PureComponent) {
|
|
75
49
|
_inherits(QueryList, _React$PureComponent);
|
|
76
|
-
|
|
50
|
+
var _super = _createSuper(QueryList);
|
|
77
51
|
function QueryList(props) {
|
|
78
52
|
var _this;
|
|
79
|
-
|
|
80
53
|
_classCallCheck(this, QueryList);
|
|
81
|
-
|
|
82
54
|
var _a;
|
|
83
|
-
|
|
84
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(QueryList).call(this, props));
|
|
55
|
+
_this = _super.call(this, props);
|
|
85
56
|
Object.defineProperty(_assertThisInitialized(_this), "onWindowResize", {
|
|
86
57
|
enumerable: true,
|
|
87
58
|
configurable: true,
|
|
88
59
|
writable: true,
|
|
89
60
|
value: (0, _debounce2["default"])(function () {
|
|
90
61
|
var scroll = _this.state.scroll;
|
|
91
|
-
|
|
92
62
|
_this.setState({
|
|
93
63
|
scroll: Object.assign(Object.assign({}, scroll), {
|
|
94
64
|
y: window.innerHeight - (_this.initialTop || _this.props.top || 200)
|
|
@@ -102,42 +72,36 @@ function (_React$PureComponent) {
|
|
|
102
72
|
writable: true,
|
|
103
73
|
value: function value() {
|
|
104
74
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
105
|
-
|
|
106
75
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
76
|
+
callback = _ref.callback,
|
|
77
|
+
_ref$showLoading = _ref.showLoading,
|
|
78
|
+
showLoading = _ref$showLoading === void 0 ? true : _ref$showLoading,
|
|
79
|
+
isInterval = _ref.isInterval;
|
|
112
80
|
var _this$props = _this.props,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
81
|
+
query = _this$props.qlsProps.query,
|
|
82
|
+
defaultExpandAllRows = _this$props.defaultExpandAllRows,
|
|
83
|
+
rowKey = _this$props.rowKey,
|
|
84
|
+
actions = _this$props.actions;
|
|
117
85
|
var pagination = _this.state.pagination;
|
|
118
86
|
var hasPagination = _this.props.pagination !== false;
|
|
119
|
-
|
|
120
87
|
if (hasPagination) {
|
|
121
88
|
params = Object.assign({
|
|
122
89
|
pageSize: pagination.pageSize,
|
|
123
90
|
current: pagination.current
|
|
124
91
|
}, params);
|
|
125
92
|
}
|
|
126
|
-
|
|
127
93
|
showLoading && _this.setState({
|
|
128
94
|
loading: true
|
|
129
|
-
});
|
|
130
|
-
|
|
95
|
+
});
|
|
96
|
+
// 当用户操作查询还未得到服务端响应前,不要执行轮询请求时序问题导致覆盖
|
|
131
97
|
if (!isInterval) {
|
|
132
98
|
_this.isFetching = true;
|
|
133
99
|
}
|
|
134
|
-
|
|
135
100
|
actions.setData('submittedFormData', params);
|
|
136
101
|
return query((0, _pickBy2["default"])(params, function (val) {
|
|
137
102
|
return val !== '' && val !== null && val !== undefined;
|
|
138
103
|
})).then(function (result) {
|
|
139
104
|
var dataSource = hasPagination ? result.data || [] : result;
|
|
140
|
-
|
|
141
105
|
_this.setState(Object.assign({
|
|
142
106
|
loading: false,
|
|
143
107
|
dataSource: dataSource,
|
|
@@ -171,7 +135,6 @@ function (_React$PureComponent) {
|
|
|
171
135
|
_this.setState({
|
|
172
136
|
dataSource: dataSource
|
|
173
137
|
});
|
|
174
|
-
|
|
175
138
|
_this.props.actions.setData('dataSource', dataSource);
|
|
176
139
|
}
|
|
177
140
|
});
|
|
@@ -183,7 +146,6 @@ function (_React$PureComponent) {
|
|
|
183
146
|
_this.setState({
|
|
184
147
|
pagination: pagination
|
|
185
148
|
});
|
|
186
|
-
|
|
187
149
|
_this.props.actions.setData('pagination', pagination);
|
|
188
150
|
}
|
|
189
151
|
});
|
|
@@ -206,12 +168,11 @@ function (_React$PureComponent) {
|
|
|
206
168
|
writable: true,
|
|
207
169
|
value: function value(values) {
|
|
208
170
|
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
171
|
+
callback = _ref2.callback,
|
|
172
|
+
_ref2$showLoading = _ref2.showLoading,
|
|
173
|
+
showLoading = _ref2$showLoading === void 0 ? true : _ref2$showLoading;
|
|
174
|
+
_this.formData = Object.assign(Object.assign({}, _this.formData), values);
|
|
175
|
+
// this.props.actions.setData('formData', this.formData);
|
|
215
176
|
return _this.fetchData(_this.formData, {
|
|
216
177
|
callback: callback,
|
|
217
178
|
showLoading: showLoading
|
|
@@ -224,8 +185,8 @@ function (_React$PureComponent) {
|
|
|
224
185
|
writable: true,
|
|
225
186
|
value: function value(pagination, filters, sorter) {
|
|
226
187
|
var _this$props2 = _this.props,
|
|
227
|
-
|
|
228
|
-
|
|
188
|
+
actions = _this$props2.actions,
|
|
189
|
+
localPagination = _this$props2.localPagination;
|
|
229
190
|
var tableParams = {
|
|
230
191
|
pageSize: pagination.pageSize,
|
|
231
192
|
current: pagination.current,
|
|
@@ -233,17 +194,15 @@ function (_React$PureComponent) {
|
|
|
233
194
|
sorter: (0, _isEmpty2["default"])(sorter) ? undefined : sorter
|
|
234
195
|
};
|
|
235
196
|
console.log('onTableChange...', actions.getSubmittedFormData(), _this.formData);
|
|
236
|
-
Object.assign(_this.formData, tableParams);
|
|
197
|
+
Object.assign(_this.formData, tableParams);
|
|
198
|
+
// 排序变化暂时不处理,因为有时可能是前端sorter不需要走请求
|
|
237
199
|
// 所以暂时排序有使用者自己处理
|
|
238
|
-
|
|
239
200
|
if (!localPagination) {
|
|
240
201
|
_this.fetchData(Object.assign(Object.assign({}, actions.getSubmittedFormData()), tableParams));
|
|
241
|
-
|
|
242
202
|
return;
|
|
243
203
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
204
|
+
var dataSource = _this.state.dataSource;
|
|
205
|
+
// 前端本地分页
|
|
247
206
|
if (localPagination) {
|
|
248
207
|
_this.setState({
|
|
249
208
|
dataSource: dataSource,
|
|
@@ -265,7 +224,6 @@ function (_React$PureComponent) {
|
|
|
265
224
|
writable: true,
|
|
266
225
|
value: (0, _throttle2["default"])(function (evt) {
|
|
267
226
|
console.log('onTableBodyScroll', evt.target.scrollTop);
|
|
268
|
-
|
|
269
227
|
_this.updateIsScrollToBottom(evt.target);
|
|
270
228
|
}, 50)
|
|
271
229
|
});
|
|
@@ -276,11 +234,10 @@ function (_React$PureComponent) {
|
|
|
276
234
|
value: function value(tableBody) {
|
|
277
235
|
var isScrollToBottom = function isScrollToBottom(tableBody) {
|
|
278
236
|
var scrollHeight = tableBody.scrollHeight,
|
|
279
|
-
|
|
280
|
-
|
|
237
|
+
scrollTop = tableBody.scrollTop,
|
|
238
|
+
offsetHeight = tableBody.offsetHeight;
|
|
281
239
|
return scrollHeight === scrollTop + offsetHeight;
|
|
282
240
|
};
|
|
283
|
-
|
|
284
241
|
_this.setState({
|
|
285
242
|
hasScrollToBottom: isScrollToBottom(tableBody)
|
|
286
243
|
});
|
|
@@ -305,30 +262,28 @@ function (_React$PureComponent) {
|
|
|
305
262
|
actions.on('setFormData', _this.onFormChange);
|
|
306
263
|
return _this;
|
|
307
264
|
}
|
|
308
|
-
|
|
309
265
|
_createClass(QueryList, [{
|
|
310
266
|
key: "render",
|
|
311
267
|
value: function render() {
|
|
312
268
|
var _a = this.props,
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
269
|
+
columns = _a.columns,
|
|
270
|
+
children = _a.children,
|
|
271
|
+
pagination = _a.pagination,
|
|
272
|
+
_a$localPagination = _a.localPagination,
|
|
273
|
+
localPagination = _a$localPagination === void 0 ? false : _a$localPagination,
|
|
274
|
+
_a$paginationSticky = _a.paginationSticky,
|
|
275
|
+
paginationSticky = _a$paginationSticky === void 0 ? false : _a$paginationSticky,
|
|
276
|
+
_a$className = _a.className,
|
|
277
|
+
className = _a$className === void 0 ? '' : _a$className,
|
|
278
|
+
qlsProps = _a.qlsProps,
|
|
279
|
+
rest = __rest(_a, ["columns", "children", "pagination", "localPagination", "paginationSticky", "className", "qlsProps"]);
|
|
325
280
|
var _this$state = this.state,
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
281
|
+
dataSource = _this$state.dataSource,
|
|
282
|
+
loading = _this$state.loading,
|
|
283
|
+
_this$state$expandedR = _this$state.expandedRowKeys,
|
|
284
|
+
expandedRowKeys = _this$state$expandedR === void 0 ? [] : _this$state$expandedR,
|
|
285
|
+
scroll = _this$state.scroll,
|
|
286
|
+
hasScrollToBottom = _this$state.hasScrollToBottom;
|
|
332
287
|
var hasPagination = typeof pagination !== 'undefined' ? pagination : true;
|
|
333
288
|
var paginationInfo = Object.assign(Object.assign(Object.assign({}, this.state.pagination), {
|
|
334
289
|
// size: 'small',
|
|
@@ -364,14 +319,11 @@ function (_React$PureComponent) {
|
|
|
364
319
|
key: "componentDidMount",
|
|
365
320
|
value: function componentDidMount() {
|
|
366
321
|
var _this2 = this;
|
|
367
|
-
|
|
368
322
|
var _a;
|
|
369
|
-
|
|
370
323
|
var _this$props3 = this.props,
|
|
371
|
-
|
|
372
|
-
|
|
324
|
+
qlsProps = _this$props3.qlsProps,
|
|
325
|
+
actions = _this$props3.actions;
|
|
373
326
|
this.formData = Object.assign(Object.assign({}, actions.getFormData() || {}), qlsProps.memory ? actions.getPagination() : {});
|
|
374
|
-
|
|
375
327
|
if (!qlsProps.initSearch) {
|
|
376
328
|
// 默认进来不请求
|
|
377
329
|
this.fetchData(this.formData)["finally"](function () {
|
|
@@ -395,15 +347,12 @@ function (_React$PureComponent) {
|
|
|
395
347
|
}, ms);
|
|
396
348
|
}
|
|
397
349
|
};
|
|
398
|
-
|
|
399
350
|
doIntervalQuery(qlsProps.interval);
|
|
400
351
|
}
|
|
401
352
|
});
|
|
402
353
|
}
|
|
403
|
-
|
|
404
354
|
if ((_a = this.state.scroll) === null || _a === void 0 ? void 0 : _a.y) {
|
|
405
355
|
window.addEventListener('resize', this.onWindowResize);
|
|
406
|
-
|
|
407
356
|
if (this.tableRef.current) {
|
|
408
357
|
// table内垂直滚动,需要动态设置分页组件上阴影样式
|
|
409
358
|
var tableBody = (0, _reactDom.findDOMNode)(this.tableRef.current).querySelector('.ant-table-body');
|
|
@@ -426,8 +375,6 @@ function (_React$PureComponent) {
|
|
|
426
375
|
this.timmer && clearTimeout(this.timmer);
|
|
427
376
|
}
|
|
428
377
|
}]);
|
|
429
|
-
|
|
430
378
|
return QueryList;
|
|
431
379
|
}(_react["default"].PureComponent);
|
|
432
|
-
|
|
433
380
|
exports["default"] = QueryList;
|
|
@@ -1,77 +1,58 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
9
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
10
|
var _queryForm = _interopRequireDefault(require("../query-form"));
|
|
13
|
-
|
|
14
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
12
|
+
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; }
|
|
20
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
14
|
+
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); } }
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
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); }
|
|
18
|
+
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); }
|
|
19
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
20
|
+
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); }; }
|
|
21
|
+
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); }
|
|
30
22
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
|
-
|
|
23
|
+
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; } }
|
|
24
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
36
25
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
37
26
|
var t = {};
|
|
38
|
-
|
|
39
27
|
for (var p in s) {
|
|
40
28
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
41
29
|
}
|
|
42
|
-
|
|
43
30
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
44
31
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
45
32
|
}
|
|
46
33
|
return t;
|
|
47
34
|
};
|
|
48
|
-
|
|
49
35
|
var clsPrefix = 'tnt-querylistscene-queryform';
|
|
50
|
-
|
|
51
|
-
var QueryForm =
|
|
52
|
-
/*#__PURE__*/
|
|
53
|
-
function (_React$PureComponent) {
|
|
36
|
+
var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
54
37
|
_inherits(QueryForm, _React$PureComponent);
|
|
55
|
-
|
|
38
|
+
var _super = _createSuper(QueryForm);
|
|
56
39
|
function QueryForm(props) {
|
|
57
40
|
var _this;
|
|
58
|
-
|
|
59
41
|
_classCallCheck(this, QueryForm);
|
|
60
|
-
|
|
61
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));
|
|
42
|
+
_this = _super.call(this, props);
|
|
62
43
|
Object.defineProperty(_assertThisInitialized(_this), "onSearch", {
|
|
63
44
|
enumerable: true,
|
|
64
45
|
configurable: true,
|
|
65
46
|
writable: true,
|
|
66
47
|
value: function value() {
|
|
67
48
|
var _this$props = _this.props,
|
|
68
|
-
|
|
69
|
-
|
|
49
|
+
onSearch = _this$props.onSearch,
|
|
50
|
+
actions = _this$props.actions;
|
|
70
51
|
var values = actions.getFormData();
|
|
71
52
|
var params = Object.assign(Object.assign({}, values), {
|
|
72
53
|
current: 1
|
|
73
|
-
});
|
|
74
|
-
|
|
54
|
+
});
|
|
55
|
+
// memory 与 url解析setForm时 监听事件异步
|
|
75
56
|
actions.setData('formData', values);
|
|
76
57
|
Promise.resolve().then(function () {
|
|
77
58
|
onSearch && onSearch(params);
|
|
@@ -85,12 +66,11 @@ function (_React$PureComponent) {
|
|
|
85
66
|
writable: true,
|
|
86
67
|
value: function value() {
|
|
87
68
|
var _this$props2 = _this.props,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
69
|
+
initialValues = _this$props2.initialValues,
|
|
70
|
+
onReset = _this$props2.onReset,
|
|
71
|
+
actions = _this$props2.actions;
|
|
91
72
|
actions.setFormData(initialValues, false);
|
|
92
73
|
onReset && onReset(initialValues);
|
|
93
|
-
|
|
94
74
|
_this.onSearch();
|
|
95
75
|
}
|
|
96
76
|
});
|
|
@@ -100,13 +80,11 @@ function (_React$PureComponent) {
|
|
|
100
80
|
writable: true,
|
|
101
81
|
value: function value(newValues, changedInfo) {
|
|
102
82
|
var _this$props3 = _this.props,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
83
|
+
onChange = _this$props3.onChange,
|
|
84
|
+
actions = _this$props3.actions;
|
|
106
85
|
for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
107
86
|
rest[_key - 2] = arguments[_key];
|
|
108
87
|
}
|
|
109
|
-
|
|
110
88
|
onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));
|
|
111
89
|
actions.setFormData(newValues, false);
|
|
112
90
|
}
|
|
@@ -118,9 +96,7 @@ function (_React$PureComponent) {
|
|
|
118
96
|
value: function value(data, needSearch) {
|
|
119
97
|
var actions = _this.props.actions;
|
|
120
98
|
actions.setData('formData', data);
|
|
121
|
-
|
|
122
99
|
_this.form.setValues(data);
|
|
123
|
-
|
|
124
100
|
needSearch && _this.onSearch();
|
|
125
101
|
}
|
|
126
102
|
});
|
|
@@ -130,32 +106,29 @@ function (_React$PureComponent) {
|
|
|
130
106
|
writable: true,
|
|
131
107
|
value: function value(needSearch) {
|
|
132
108
|
var _this$props4 = _this.props,
|
|
133
|
-
|
|
134
|
-
|
|
109
|
+
initialValues = _this$props4.initialValues,
|
|
110
|
+
actions = _this$props4.actions;
|
|
135
111
|
actions.setFormData(initialValues, needSearch);
|
|
136
|
-
|
|
137
112
|
_this.form.resetValues();
|
|
138
113
|
}
|
|
139
114
|
});
|
|
140
115
|
var actions = props.actions,
|
|
141
|
-
|
|
116
|
+
form = props.form;
|
|
142
117
|
_this.form = form || _queryForm["default"].createForm();
|
|
143
118
|
actions.on('setFormData', _this.setFormData);
|
|
144
119
|
actions.on('resetFormData', _this.resetFormData);
|
|
145
120
|
return _this;
|
|
146
121
|
}
|
|
147
|
-
|
|
148
122
|
_createClass(QueryForm, [{
|
|
149
123
|
key: "render",
|
|
150
124
|
value: function render() {
|
|
151
125
|
var _a = this.props,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
126
|
+
className = _a.className,
|
|
127
|
+
actions = _a.actions,
|
|
128
|
+
extraActions = _a.extraActions,
|
|
129
|
+
extralActions = _a.extralActions,
|
|
130
|
+
qlsProps = _a.qlsProps,
|
|
131
|
+
props = __rest(_a, ["className", "actions", "extraActions", "extralActions", "qlsProps"]);
|
|
159
132
|
return _react["default"].createElement(_queryForm["default"], Object.assign({}, props, {
|
|
160
133
|
form: this.form,
|
|
161
134
|
className: (0, _classnames2["default"])(clsPrefix, _defineProperty({}, className, className)),
|
|
@@ -170,11 +143,10 @@ function (_React$PureComponent) {
|
|
|
170
143
|
key: "componentDidMount",
|
|
171
144
|
value: function componentDidMount() {
|
|
172
145
|
var _this$props5 = this.props,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
146
|
+
_this$props5$initialV = _this$props5.initialValues,
|
|
147
|
+
initialValues = _this$props5$initialV === void 0 ? {} : _this$props5$initialV,
|
|
148
|
+
actions = _this$props5.actions,
|
|
149
|
+
qlsProps = _this$props5.qlsProps;
|
|
178
150
|
if (qlsProps.memory) {
|
|
179
151
|
actions.setFormData(Object.assign(Object.assign({}, initialValues), actions.getFormData()), false);
|
|
180
152
|
} else {
|
|
@@ -189,9 +161,7 @@ function (_React$PureComponent) {
|
|
|
189
161
|
actions.removeListener('resetFormData', this.resetFormData);
|
|
190
162
|
}
|
|
191
163
|
}]);
|
|
192
|
-
|
|
193
164
|
return QueryForm;
|
|
194
165
|
}(_react["default"].PureComponent);
|
|
195
|
-
|
|
196
166
|
exports["default"] = QueryForm;
|
|
197
167
|
QueryForm.Field = _queryForm["default"].Field;
|