@teamix/pro 1.5.1-aplha.0 → 1.5.2
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/dist/pro.css +1 -1
- package/dist/pro.js +65886 -79105
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/base.d.ts +24 -0
- package/es/actions/confirm.d.ts +7 -0
- package/es/actions/danger-confirm.d.ts +7 -0
- package/es/actions/danger-pop-confirm.d.ts +5 -0
- package/es/actions/dialog-component.d.ts +10 -0
- package/es/actions/dialog-component.js +7 -1
- package/es/actions/dialog-form.d.ts +29 -0
- package/es/actions/dialog-form.js +3 -5
- package/es/actions/dialog-info.d.ts +9 -0
- package/es/actions/dialog-table.d.ts +9 -0
- package/es/actions/dialog.d.ts +40 -0
- package/es/actions/dialog.js +1 -1
- package/es/actions/drawer-form.d.ts +6 -0
- package/es/actions/drawer-info.d.ts +6 -0
- package/es/actions/drawer-table.d.ts +6 -0
- package/es/actions/drawer.d.ts +6 -0
- package/es/actions/error.d.ts +7 -0
- package/es/actions/index.d.ts +111 -0
- package/es/actions/index.js +23 -32
- package/es/actions/index.scss +5 -0
- package/es/actions/link.d.ts +8 -0
- package/es/actions/notice.d.ts +7 -0
- package/es/actions/pop-confirm.d.ts +9 -0
- package/es/actions/request.d.ts +9 -0
- package/es/actions/request.js +2 -2
- package/es/actions/utils.d.ts +1 -0
- package/es/card/card-container.d.ts +18 -0
- package/es/card/card-container.js +9 -9
- package/es/card/divider.d.ts +6 -0
- package/es/card/divider.js +6 -2
- package/es/card/index.d.ts +109 -0
- package/es/card/index.js +8 -14
- package/es/card/index.scss +7 -0
- package/es/card/selectable.d.ts +13 -0
- package/es/card/selectable.js +6 -2
- package/es/card/tab.d.ts +6 -0
- package/es/card/tab.js +6 -2
- package/es/card/utils.d.ts +9 -0
- package/es/field/index.d.ts +3 -0
- package/es/form/Components/Editable/index.d.ts +20 -0
- package/es/form/Components/Editable/index.js +1 -1
- package/es/form/Components/FormGroup/index.d.ts +13 -0
- package/es/form/Components/FormGroup/index.js +3 -5
- package/es/form/Components/LightFilter/componentMap.d.ts +3 -0
- package/es/form/Components/LightFilter/index.d.ts +17 -0
- package/es/form/Components/LightFilter/index.js +2 -8
- package/es/form/Components/ProField/index.d.ts +2 -0
- package/es/form/Components/ProField/index.js +6 -2
- package/es/form/Components/ProField/mapDateFormat.d.ts +3 -0
- package/es/form/Components/Text/index.d.ts +7 -0
- package/es/form/Components/Text/index.js +6 -2
- package/es/form/Filter/AdvancedFilter.d.ts +7 -0
- package/es/form/Filter/AdvancedFilter.js +15 -18
- package/es/form/Filter/Layout.d.ts +5 -0
- package/es/form/Filter/LightFilter.d.ts +7 -0
- package/es/form/Filter/LightFilter.js +10 -13
- package/es/form/Filter/SimpleFilter.d.ts +7 -0
- package/es/form/Filter/SimpleFilter.js +6 -10
- package/es/form/Filter/index.d.ts +9 -0
- package/es/form/Filter/index.js +10 -7
- package/es/form/Filter/index2.d.ts +13 -0
- package/es/form/Filter/index2.js +17 -21
- package/es/form/Filter/useBindUrl.d.ts +2 -0
- package/es/form/Filter/useSpecialProps.d.ts +6 -0
- package/es/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/es/form/ProForm/customComponent.d.ts +3 -0
- package/es/form/ProForm/index.d.ts +5 -0
- package/es/form/ProForm/index.js +2 -4
- package/es/form/ProForm/useAutoLayout.d.ts +9 -0
- package/es/form/ProForm/useAutoSubmit.d.ts +6 -0
- package/es/form/ProForm/useFieldRequest.d.ts +5 -0
- package/es/form/ProForm/useFormDisplayValues.d.ts +4 -0
- package/es/form/ProForm/useFormDisplayValues.js +1 -1
- package/es/form/ProForm/useInitialRequest.d.ts +6 -0
- package/es/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/es/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/es/form/SchemaForm/adapterType.d.ts +5 -0
- package/es/form/SchemaForm/index.d.ts +4 -0
- package/es/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/es/form/SchemaForm/initializeDataSource.d.ts +15 -0
- package/es/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormStep.d.ts +5 -0
- package/es/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/es/form/SchemaForm/initializeReactions.d.ts +2 -0
- package/es/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/es/form/SchemaForm/initializeRules.d.ts +11 -0
- package/es/form/SchemaForm/initializeSelectTable.d.ts +3 -0
- package/es/form/SchemaForm/reactions.d.ts +6 -0
- package/es/form/SchemaForm/reactions.js +1 -2
- package/es/form/docs/ActionResponse.d.ts +7 -0
- package/es/form/fieldTypeMap.d.ts +7 -0
- package/es/form/index.d.ts +125 -0
- package/es/form/locales/validate.d.ts +159 -0
- package/es/form/schemaNameMap.d.ts +5 -0
- package/es/form/typing.d.ts +192 -0
- package/es/form/utils.d.ts +55 -0
- package/es/form/utils.js +1 -8
- package/es/form/warning.d.ts +3 -0
- package/es/hooks/index.d.ts +2 -0
- package/es/index-without-icon.d.ts +32 -0
- package/es/index.d.ts +32 -0
- package/es/index.js +1 -1
- package/es/info/components/InfoGroup/index.d.ts +5 -0
- package/es/info/components/InfoGroup/index.js +6 -2
- package/es/info/components/InfoValueItem/index.d.ts +5 -0
- package/es/info/components/InfoValueItem/index.js +21 -23
- package/es/info/components/ProInfoItem/index.d.ts +5 -0
- package/es/info/components/baseInfo/index.d.ts +8 -0
- package/es/info/components/headerInfo/index.d.ts +8 -0
- package/es/info/components/tableInfo/index.d.ts +7 -0
- package/es/info/components/tableInfo/index.js +4 -5
- package/es/info/index.d.ts +10 -0
- package/es/info/index.js +5 -8
- package/es/info/typing.d.ts +218 -0
- package/es/info/utils/index.d.ts +20 -0
- package/es/info/utils/layout.d.ts +2 -0
- package/es/info/utils/utils.d.ts +1 -0
- package/es/layout/index.d.ts +2 -0
- package/es/nocode/configurators/Card.d.ts +3 -0
- package/es/nocode/configurators/PageHeader.d.ts +3 -0
- package/es/nocode/configurators/ProTable.d.ts +3 -0
- package/es/nocode/configurators/common.d.ts +280 -0
- package/es/nocode/configurators/index.d.ts +15 -0
- package/es/nocode/configurators/map.d.ts +2 -0
- package/es/nocode/index.d.ts +8 -0
- package/es/nocode/index.js +2 -2
- package/es/nocode/pages/editor.d.ts +12 -0
- package/es/nocode/pages/index.d.ts +14 -0
- package/es/nocode/pages/index.js +3 -4
- package/es/nocode/pages/playground.d.ts +11 -0
- package/es/nocode/pages/playground.js +7 -3
- package/es/nocode/pages/renderer.d.ts +10 -0
- package/es/nocode/pages/renderer.js +8 -4
- package/es/nocode/playground.d.ts +14 -0
- package/es/nocode/playground.js +6 -2
- package/es/page-container/index.d.ts +3 -0
- package/es/page-header/index.d.ts +74 -0
- package/es/page-header/index.js +7 -12
- package/es/sidebar/components/sidebar-container/index.d.ts +5 -0
- package/es/sidebar/components/sidebar-container/index.js +9 -5
- package/es/sidebar/components/tree/index.d.ts +6 -0
- package/es/sidebar/components/tree/index.js +6 -2
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +6 -2
- package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
- package/es/sidebar/components/tree-node/components/IconAction/index.js +2 -4
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
- package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/es/sidebar/components/tree-node/index.d.ts +7 -0
- package/es/sidebar/components/tree-node/index.js +18 -21
- package/es/sidebar/index.d.ts +9 -0
- package/es/sidebar/index.js +8 -4
- package/es/sidebar/typing.d.ts +141 -0
- package/es/sidebar/utils/action-ref.d.ts +3 -0
- package/es/sidebar/utils/index.d.ts +361 -0
- package/es/sidebar/utils/index.js +11 -11
- package/es/skeleton/index.d.ts +3 -0
- package/es/table/components/CardView/index.d.ts +5 -0
- package/es/table/components/CardView/index.js +446 -0
- package/es/table/components/CardView/index.scss +46 -0
- package/es/table/components/EmptyContent/index.d.ts +2 -0
- package/es/table/components/Filter/index.d.ts +10 -0
- package/es/table/components/Filter/index.js +21 -14
- package/es/table/components/Layout/index.d.ts +5 -0
- package/es/table/components/Layout/index.js +8 -10
- package/es/table/components/LoadMore/index.d.ts +20 -0
- package/es/table/components/LoadMore/index.js +107 -0
- package/es/table/components/LoadMore/index.scss +19 -0
- package/es/table/components/Pagination/index.d.ts +7 -0
- package/es/table/components/Pagination/index.js +14 -10
- package/es/table/components/QuickAction/index.d.ts +11 -0
- package/es/table/components/QuickAction/index.js +2 -4
- package/es/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/es/table/components/ToolBar/CardSwitch.js +63 -0
- package/es/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/es/table/components/ToolBar/DensityIcon.js +3 -2
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FilterColumnIcon.js +13 -2
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/es/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/es/table/components/ToolBar/Fullscreen.js +15 -2
- package/es/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/es/table/components/ToolBar/RefreshIcon.js +1 -2
- package/es/table/components/ToolBar/index.d.ts +5 -0
- package/es/table/components/ToolBar/index.js +69 -34
- package/es/table/components/ToolBar/index.scss +10 -1
- package/es/table/index.d.ts +5 -0
- package/es/table/index.js +150 -59
- package/es/table/typing.d.ts +371 -0
- package/es/table/utils/columnRender.d.ts +13 -0
- package/es/table/utils/columnRender.js +28 -28
- package/es/table/utils/genProColumnToColumn.d.ts +13 -0
- package/es/table/utils/genProColumnToColumn.js +4 -2
- package/es/table/utils/getTableProps.d.ts +2 -0
- package/es/table/utils/getTableSortIcons.d.ts +3 -0
- package/es/table/utils/index.d.ts +19 -0
- package/es/table/utils/index.js +2 -2
- package/es/table/utils/pureColumnRender.d.ts +9 -0
- package/es/table/utils/pureColumnRender.js +2 -4
- package/es/table/utils/pureGenProColumnToColumn.d.ts +7 -0
- package/es/table/utils/pureGenProColumnToColumn.js +1 -1
- package/es/table/utils/useTableSelection.d.ts +3 -0
- package/es/templates/Detail/index.d.ts +2 -0
- package/es/templates/Form/index.d.ts +2 -0
- package/es/templates/List/index.d.ts +9 -0
- package/es/templates/List/index.js +8 -4
- package/es/templates/index.d.ts +3 -0
- package/es/templates/index.js +1 -2
- package/es/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/es/timeline/ProTimeLineItem/index.js +6 -2
- package/es/timeline/index.d.ts +10 -0
- package/es/timeline/index.js +7 -3
- package/es/timeline/typing.d.ts +106 -0
- package/es/utils/index.d.ts +3 -0
- package/es/utils/message.d.ts +3 -0
- package/es/utils/message.js +7 -3
- package/lib/actions/base.d.ts +24 -0
- package/lib/actions/confirm.d.ts +7 -0
- package/lib/actions/danger-confirm.d.ts +7 -0
- package/lib/actions/danger-pop-confirm.d.ts +5 -0
- package/lib/actions/dialog-component.d.ts +10 -0
- package/lib/actions/dialog-component.js +7 -1
- package/lib/actions/dialog-form.d.ts +29 -0
- package/lib/actions/dialog-form.js +3 -5
- package/lib/actions/dialog-info.d.ts +9 -0
- package/lib/actions/dialog-table.d.ts +9 -0
- package/lib/actions/dialog.d.ts +40 -0
- package/lib/actions/dialog.js +1 -1
- package/lib/actions/drawer-form.d.ts +6 -0
- package/lib/actions/drawer-info.d.ts +6 -0
- package/lib/actions/drawer-table.d.ts +6 -0
- package/lib/actions/drawer.d.ts +6 -0
- package/lib/actions/error.d.ts +7 -0
- package/lib/actions/index.d.ts +111 -0
- package/lib/actions/index.js +23 -32
- package/lib/actions/index.scss +5 -0
- package/lib/actions/link.d.ts +8 -0
- package/lib/actions/notice.d.ts +7 -0
- package/lib/actions/pop-confirm.d.ts +9 -0
- package/lib/actions/request.d.ts +9 -0
- package/lib/actions/utils.d.ts +1 -0
- package/lib/card/card-container.d.ts +18 -0
- package/lib/card/card-container.js +7 -5
- package/lib/card/divider.d.ts +6 -0
- package/lib/card/divider.js +6 -2
- package/lib/card/index.d.ts +109 -0
- package/lib/card/index.js +7 -14
- package/lib/card/index.scss +7 -0
- package/lib/card/selectable.d.ts +13 -0
- package/lib/card/selectable.js +6 -2
- package/lib/card/tab.d.ts +6 -0
- package/lib/card/tab.js +6 -2
- package/lib/card/utils.d.ts +9 -0
- package/lib/field/index.d.ts +3 -0
- package/lib/form/Components/Editable/index.d.ts +20 -0
- package/lib/form/Components/Editable/index.js +1 -1
- package/lib/form/Components/FormGroup/index.d.ts +13 -0
- package/lib/form/Components/FormGroup/index.js +3 -5
- package/lib/form/Components/LightFilter/componentMap.d.ts +3 -0
- package/lib/form/Components/LightFilter/index.d.ts +17 -0
- package/lib/form/Components/LightFilter/index.js +2 -8
- package/lib/form/Components/ProField/index.d.ts +2 -0
- package/lib/form/Components/ProField/index.js +6 -2
- package/lib/form/Components/ProField/mapDateFormat.d.ts +3 -0
- package/lib/form/Components/Text/index.d.ts +7 -0
- package/lib/form/Components/Text/index.js +6 -2
- package/lib/form/Filter/AdvancedFilter.d.ts +7 -0
- package/lib/form/Filter/AdvancedFilter.js +14 -17
- package/lib/form/Filter/Layout.d.ts +5 -0
- package/lib/form/Filter/LightFilter.d.ts +7 -0
- package/lib/form/Filter/LightFilter.js +9 -12
- package/lib/form/Filter/SimpleFilter.d.ts +7 -0
- package/lib/form/Filter/SimpleFilter.js +5 -8
- package/lib/form/Filter/index.d.ts +9 -0
- package/lib/form/Filter/index.js +9 -6
- package/lib/form/Filter/index2.d.ts +13 -0
- package/lib/form/Filter/index2.js +17 -21
- package/lib/form/Filter/useBindUrl.d.ts +2 -0
- package/lib/form/Filter/useSpecialProps.d.ts +6 -0
- package/lib/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/lib/form/ProForm/customComponent.d.ts +3 -0
- package/lib/form/ProForm/index.d.ts +5 -0
- package/lib/form/ProForm/index.js +2 -4
- package/lib/form/ProForm/useAutoLayout.d.ts +9 -0
- package/lib/form/ProForm/useAutoSubmit.d.ts +6 -0
- package/lib/form/ProForm/useFieldRequest.d.ts +5 -0
- package/lib/form/ProForm/useFormDisplayValues.d.ts +4 -0
- package/lib/form/ProForm/useInitialRequest.d.ts +6 -0
- package/lib/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/lib/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/lib/form/SchemaForm/adapterType.d.ts +5 -0
- package/lib/form/SchemaForm/index.d.ts +4 -0
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/lib/form/SchemaForm/initializeDataSource.d.ts +15 -0
- package/lib/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormStep.d.ts +5 -0
- package/lib/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/lib/form/SchemaForm/initializeReactions.d.ts +2 -0
- package/lib/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/lib/form/SchemaForm/initializeRules.d.ts +11 -0
- package/lib/form/SchemaForm/initializeSelectTable.d.ts +3 -0
- package/lib/form/SchemaForm/reactions.d.ts +6 -0
- package/lib/form/docs/ActionResponse.d.ts +7 -0
- package/lib/form/fieldTypeMap.d.ts +7 -0
- package/lib/form/index.d.ts +125 -0
- package/lib/form/locales/validate.d.ts +159 -0
- package/lib/form/schemaNameMap.d.ts +5 -0
- package/lib/form/typing.d.ts +192 -0
- package/lib/form/typing.js +5 -1
- package/lib/form/utils.d.ts +55 -0
- package/lib/form/utils.js +0 -7
- package/lib/form/warning.d.ts +3 -0
- package/lib/hooks/index.d.ts +2 -0
- package/lib/index-without-icon.d.ts +32 -0
- package/lib/index.d.ts +32 -0
- package/lib/index.js +1 -1
- package/lib/info/components/InfoGroup/index.d.ts +5 -0
- package/lib/info/components/InfoGroup/index.js +6 -2
- package/lib/info/components/InfoValueItem/index.d.ts +5 -0
- package/lib/info/components/InfoValueItem/index.js +21 -23
- package/lib/info/components/ProInfoItem/index.d.ts +5 -0
- package/lib/info/components/baseInfo/index.d.ts +8 -0
- package/lib/info/components/headerInfo/index.d.ts +8 -0
- package/lib/info/components/tableInfo/index.d.ts +7 -0
- package/lib/info/components/tableInfo/index.js +4 -5
- package/lib/info/index.d.ts +10 -0
- package/lib/info/index.js +5 -8
- package/lib/info/typing.d.ts +218 -0
- package/lib/info/typing.js +5 -1
- package/lib/info/utils/index.d.ts +20 -0
- package/lib/info/utils/layout.d.ts +2 -0
- package/lib/info/utils/utils.d.ts +1 -0
- package/lib/layout/index.d.ts +2 -0
- package/lib/nocode/configurators/Card.d.ts +3 -0
- package/lib/nocode/configurators/PageHeader.d.ts +3 -0
- package/lib/nocode/configurators/ProTable.d.ts +3 -0
- package/lib/nocode/configurators/common.d.ts +280 -0
- package/lib/nocode/configurators/index.d.ts +15 -0
- package/lib/nocode/configurators/map.d.ts +2 -0
- package/lib/nocode/index.d.ts +8 -0
- package/lib/nocode/pages/editor.d.ts +12 -0
- package/lib/nocode/pages/index.d.ts +14 -0
- package/lib/nocode/pages/index.js +2 -2
- package/lib/nocode/pages/playground.d.ts +11 -0
- package/lib/nocode/pages/playground.js +7 -3
- package/lib/nocode/pages/renderer.d.ts +10 -0
- package/lib/nocode/pages/renderer.js +8 -4
- package/lib/nocode/playground.d.ts +14 -0
- package/lib/nocode/playground.js +6 -2
- package/lib/page-container/index.d.ts +3 -0
- package/lib/page-header/index.d.ts +74 -0
- package/lib/page-header/index.js +6 -12
- package/lib/sidebar/components/sidebar-container/index.d.ts +5 -0
- package/lib/sidebar/components/sidebar-container/index.js +9 -5
- package/lib/sidebar/components/tree/index.d.ts +6 -0
- package/lib/sidebar/components/tree/index.js +6 -2
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +6 -2
- package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +2 -4
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/lib/sidebar/components/tree-node/index.d.ts +7 -0
- package/lib/sidebar/components/tree-node/index.js +18 -21
- package/lib/sidebar/index.d.ts +9 -0
- package/lib/sidebar/index.js +17 -4
- package/lib/sidebar/typing.d.ts +141 -0
- package/lib/sidebar/typing.js +5 -1
- package/lib/sidebar/utils/action-ref.d.ts +3 -0
- package/lib/sidebar/utils/index.d.ts +361 -0
- package/lib/sidebar/utils/index.js +11 -11
- package/lib/skeleton/index.d.ts +3 -0
- package/lib/table/components/CardView/index.d.ts +5 -0
- package/lib/table/components/CardView/index.js +468 -0
- package/lib/table/components/CardView/index.scss +46 -0
- package/lib/table/components/EmptyContent/index.d.ts +2 -0
- package/lib/table/components/Filter/index.d.ts +10 -0
- package/lib/table/components/Filter/index.js +21 -14
- package/lib/table/components/Layout/index.d.ts +5 -0
- package/lib/table/components/Layout/index.js +9 -11
- package/lib/table/components/LoadMore/index.d.ts +20 -0
- package/lib/table/components/LoadMore/index.js +128 -0
- package/lib/table/components/LoadMore/index.scss +19 -0
- package/lib/table/components/Pagination/index.d.ts +7 -0
- package/lib/table/components/Pagination/index.js +14 -10
- package/lib/table/components/QuickAction/index.d.ts +11 -0
- package/lib/table/components/QuickAction/index.js +2 -4
- package/lib/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/lib/table/components/ToolBar/CardSwitch.js +82 -0
- package/lib/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/DensityIcon.js +3 -2
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FilterColumnIcon.js +13 -2
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/lib/table/components/ToolBar/Fullscreen.js +15 -2
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/RefreshIcon.js +1 -2
- package/lib/table/components/ToolBar/index.d.ts +5 -0
- package/lib/table/components/ToolBar/index.js +70 -33
- package/lib/table/components/ToolBar/index.scss +10 -1
- package/lib/table/index.d.ts +5 -0
- package/lib/table/index.js +153 -60
- package/lib/table/typing.d.ts +371 -0
- package/lib/table/typing.js +5 -1
- package/lib/table/utils/columnRender.d.ts +13 -0
- package/lib/table/utils/columnRender.js +28 -28
- package/lib/table/utils/genProColumnToColumn.d.ts +13 -0
- package/lib/table/utils/genProColumnToColumn.js +3 -1
- package/lib/table/utils/getTableProps.d.ts +2 -0
- package/lib/table/utils/getTableSortIcons.d.ts +3 -0
- package/lib/table/utils/index.d.ts +19 -0
- package/lib/table/utils/pureColumnRender.d.ts +9 -0
- package/lib/table/utils/pureColumnRender.js +1 -3
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +7 -0
- package/lib/table/utils/useTableSelection.d.ts +3 -0
- package/lib/templates/Detail/index.d.ts +2 -0
- package/lib/templates/Form/index.d.ts +2 -0
- package/lib/templates/List/index.d.ts +9 -0
- package/lib/templates/List/index.js +8 -4
- package/lib/templates/index.d.ts +3 -0
- package/lib/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/lib/timeline/ProTimeLineItem/index.js +6 -2
- package/lib/timeline/index.d.ts +10 -0
- package/lib/timeline/index.js +7 -3
- package/lib/timeline/typing.d.ts +106 -0
- package/lib/timeline/typing.js +5 -1
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/message.d.ts +3 -0
- package/lib/utils/message.js +7 -3
- package/package.json +1 -1
package/lib/table/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var _Fullscreen = _interopRequireDefault(require("./components/ToolBar/Fullscree
|
|
|
34
34
|
|
|
35
35
|
var _EmptyContent = _interopRequireDefault(require("./components/EmptyContent"));
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _actions = require("../actions");
|
|
38
38
|
|
|
39
39
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
40
40
|
|
|
@@ -42,6 +42,10 @@ var _pageContainer = _interopRequireDefault(require("../page-container"));
|
|
|
42
42
|
|
|
43
43
|
var _lodash = _interopRequireDefault(require("lodash.debounce"));
|
|
44
44
|
|
|
45
|
+
var _CardView = _interopRequireDefault(require("./components/CardView"));
|
|
46
|
+
|
|
47
|
+
var _columns = _interopRequireDefault(require("../../demos/table/columns"));
|
|
48
|
+
|
|
45
49
|
var _typing = require("./typing");
|
|
46
50
|
|
|
47
51
|
Object.keys(_typing).forEach(function (key) {
|
|
@@ -55,7 +59,7 @@ Object.keys(_typing).forEach(function (key) {
|
|
|
55
59
|
}
|
|
56
60
|
});
|
|
57
61
|
});
|
|
58
|
-
var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree", "data-teamix-spm"];
|
|
62
|
+
var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView"];
|
|
59
63
|
|
|
60
64
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
61
65
|
|
|
@@ -63,8 +67,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
63
67
|
|
|
64
68
|
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; }
|
|
65
69
|
|
|
66
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
67
|
-
|
|
68
70
|
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); }
|
|
69
71
|
|
|
70
72
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -223,7 +225,14 @@ var ProTable = function ProTable(props) {
|
|
|
223
225
|
_props$fixedTableBody = props.fixedTableBody,
|
|
224
226
|
fixedTableBody = _props$fixedTableBody === void 0 ? false : _props$fixedTableBody,
|
|
225
227
|
isTree = props.isTree,
|
|
228
|
+
_props$toolBarAutoWid = props.toolBarAutoWidth,
|
|
229
|
+
toolBarAutoWidth = _props$toolBarAutoWid === void 0 ? true : _props$toolBarAutoWid,
|
|
226
230
|
dataTeamixSpm = props['data-teamix-spm'],
|
|
231
|
+
_props$switchCardView = props.switchCardView,
|
|
232
|
+
switchCardView = _props$switchCardView === void 0 ? false : _props$switchCardView,
|
|
233
|
+
cardViewProps = props.cardViewProps,
|
|
234
|
+
_props$defaultView = props.defaultView,
|
|
235
|
+
defaultView = _props$defaultView === void 0 ? 'table' : _props$defaultView,
|
|
227
236
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
228
237
|
|
|
229
238
|
var targetPageKey = pageKey || globalPageKey;
|
|
@@ -248,7 +257,7 @@ var ProTable = function ProTable(props) {
|
|
|
248
257
|
var _useState7 = (0, _react.useState)(propsDataSource !== null && propsDataSource !== void 0 ? propsDataSource : []),
|
|
249
258
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
250
259
|
data = _useState8[0],
|
|
251
|
-
|
|
260
|
+
_setData = _useState8[1];
|
|
252
261
|
|
|
253
262
|
var _useState9 = (0, _react.useState)(props.sort || {}),
|
|
254
263
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
@@ -400,7 +409,11 @@ var ProTable = function ProTable(props) {
|
|
|
400
409
|
|
|
401
410
|
var offsetHeaderHeight = headerHeight + tableHeaderHeight + pageHeaderHeight + teamixNavHeight + footerRowSelectionHeight + 16 + (offset !== null && offset !== void 0 ? offset : 0) + 1;
|
|
402
411
|
|
|
403
|
-
if (
|
|
412
|
+
if (switchViewState === 'card') {
|
|
413
|
+
offsetHeaderHeight = offsetHeaderHeight - tableHeaderHeight - footerRowSelectionHeight;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
if ((tableBodyDom === null || tableBodyDom === void 0 ? void 0 : tableBodyDom.clientHeight) < (tableBodyDom === null || tableBodyDom === void 0 ? void 0 : tableBodyDom.scrollHeight)) {
|
|
404
417
|
setFooterSuctionState(true);
|
|
405
418
|
} else {
|
|
406
419
|
setFooterSuctionState(false);
|
|
@@ -435,7 +448,13 @@ var ProTable = function ProTable(props) {
|
|
|
435
448
|
var _useState27 = (0, _react.useState)(false),
|
|
436
449
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
437
450
|
fullscreenState = _useState28[0],
|
|
438
|
-
setFullscreenState = _useState28[1]; //
|
|
451
|
+
setFullscreenState = _useState28[1]; // 切换视角
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
var _useState29 = (0, _react.useState)(defaultView !== null && defaultView !== void 0 ? defaultView : 'table'),
|
|
455
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
|
456
|
+
switchViewState = _useState30[0],
|
|
457
|
+
setSwitchViewState = _useState30[1]; // 切换全屏搜索开关
|
|
439
458
|
|
|
440
459
|
|
|
441
460
|
var filterEnableRef = (0, _react.useRef)({
|
|
@@ -451,10 +470,10 @@ var ProTable = function ProTable(props) {
|
|
|
451
470
|
var dataFilterFormRef = !fullscreenState ? normalDataFilterFormRef : fullscreenDataFilterFormRef; // let dataFilterForm = dataFilterFormRef.current;
|
|
452
471
|
// 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
|
|
453
472
|
|
|
454
|
-
var
|
|
455
|
-
|
|
456
|
-
footerSuctionState =
|
|
457
|
-
setFooterSuctionState =
|
|
473
|
+
var _useState31 = (0, _react.useState)(false),
|
|
474
|
+
_useState32 = _slicedToArray(_useState31, 2),
|
|
475
|
+
footerSuctionState = _useState32[0],
|
|
476
|
+
setFooterSuctionState = _useState32[1]; // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
|
|
458
477
|
|
|
459
478
|
|
|
460
479
|
var getFooterSuctionState = function getFooterSuctionState() {
|
|
@@ -519,14 +538,13 @@ var ProTable = function ProTable(props) {
|
|
|
519
538
|
}, [rowSelectionHook]); // 获取 table 左下角 checkbox 属性
|
|
520
539
|
|
|
521
540
|
function getCheckAllProps() {
|
|
522
|
-
var
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
getProps = _ref.getProps;
|
|
541
|
+
var _rowSelection$onChang = rowSelection.onChange,
|
|
542
|
+
_onChange = _rowSelection$onChang === void 0 ? function () {} : _rowSelection$onChang,
|
|
543
|
+
_rowSelection$onSelec = rowSelection.onSelectAll,
|
|
544
|
+
onSelectAll = _rowSelection$onSelec === void 0 ? function () {} : _rowSelection$onSelec,
|
|
545
|
+
_rowSelection$selecte2 = rowSelection.selectedRowKeys,
|
|
546
|
+
selectedRowKeys = _rowSelection$selecte2 === void 0 ? [] : _rowSelection$selecte2,
|
|
547
|
+
getProps = rowSelection.getProps;
|
|
530
548
|
|
|
531
549
|
var dataSource = data;
|
|
532
550
|
var allRowKeys = dataSource.filter(function (d, i) {
|
|
@@ -580,7 +598,7 @@ var ProTable = function ProTable(props) {
|
|
|
580
598
|
|
|
581
599
|
(0, _react.useEffect)(function () {
|
|
582
600
|
if (propsDataSource) {
|
|
583
|
-
|
|
601
|
+
_setData(propsDataSource);
|
|
584
602
|
}
|
|
585
603
|
}, [propsDataSource]); // 初始化 ActionRef。
|
|
586
604
|
|
|
@@ -603,14 +621,14 @@ var ProTable = function ProTable(props) {
|
|
|
603
621
|
actionRefCallback[state][name] = fun;
|
|
604
622
|
},
|
|
605
623
|
off: function off(name) {
|
|
606
|
-
actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (
|
|
607
|
-
var
|
|
608
|
-
k =
|
|
609
|
-
v =
|
|
624
|
+
actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref) {
|
|
625
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
626
|
+
k = _ref2[0],
|
|
627
|
+
v = _ref2[1];
|
|
610
628
|
|
|
611
|
-
var filterV = Object.fromEntries(Object.entries(v).filter(function (
|
|
612
|
-
var
|
|
613
|
-
k =
|
|
629
|
+
var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref3) {
|
|
630
|
+
var _ref4 = _slicedToArray(_ref3, 1),
|
|
631
|
+
k = _ref4[0];
|
|
614
632
|
|
|
615
633
|
return k !== name;
|
|
616
634
|
}));
|
|
@@ -647,7 +665,16 @@ var ProTable = function ProTable(props) {
|
|
|
647
665
|
_setSize(mode);
|
|
648
666
|
},
|
|
649
667
|
refresh: function refresh(params) {
|
|
650
|
-
|
|
668
|
+
// card视角的刷新等于重新请求
|
|
669
|
+
if (switchViewState === 'card') {
|
|
670
|
+
setCurrentPage(1);
|
|
671
|
+
|
|
672
|
+
_request(_objectSpread(_objectSpread({}, params), {}, _defineProperty({}, targetPageKey, 1)));
|
|
673
|
+
|
|
674
|
+
setShowSkeleton(true);
|
|
675
|
+
} else {
|
|
676
|
+
_request(params);
|
|
677
|
+
}
|
|
651
678
|
},
|
|
652
679
|
request: function request(params) {
|
|
653
680
|
// 如果请求中还有翻页相关信息,需要自动设置到指定页
|
|
@@ -675,6 +702,12 @@ var ProTable = function ProTable(props) {
|
|
|
675
702
|
resetPage: function resetPage() {
|
|
676
703
|
setCurrentPage(1);
|
|
677
704
|
},
|
|
705
|
+
nextPage: function nextPage() {
|
|
706
|
+
var newCurrentPage = currentPage + 1;
|
|
707
|
+
setCurrentPage(newCurrentPage);
|
|
708
|
+
|
|
709
|
+
_request(_defineProperty({}, targetPageKey, newCurrentPage));
|
|
710
|
+
},
|
|
678
711
|
rowSelection: rowSelection,
|
|
679
712
|
clearRowSelection: function clearRowSelection() {
|
|
680
713
|
rowSelectionHook.setSelectedRowKeys([]);
|
|
@@ -694,8 +727,34 @@ var ProTable = function ProTable(props) {
|
|
|
694
727
|
normalDataFilterForm: normalDataFilterForm,
|
|
695
728
|
fullscreenDataFilterForm: fullscreenDataFilterForm,
|
|
696
729
|
filterEnableRef: filterEnableRef,
|
|
730
|
+
setData: function setData(data) {
|
|
731
|
+
_setData(data);
|
|
732
|
+
},
|
|
697
733
|
resetTableMaxBodyHeight: function resetTableMaxBodyHeight(offset) {
|
|
698
734
|
getHeaderHeight(fullscreenState, offset);
|
|
735
|
+
},
|
|
736
|
+
switchView: function switchView(view) {
|
|
737
|
+
setSwitchViewState(view);
|
|
738
|
+
setShowSkeleton(true);
|
|
739
|
+
setCurrentPage(1);
|
|
740
|
+
|
|
741
|
+
if (view === 'table') {
|
|
742
|
+
var _request4;
|
|
743
|
+
|
|
744
|
+
setPageSize(pageSize !== null && pageSize !== void 0 ? pageSize : 20);
|
|
745
|
+
|
|
746
|
+
_request((_request4 = {}, _defineProperty(_request4, targetPageSizeKey, pageSize !== null && pageSize !== void 0 ? pageSize : 20), _defineProperty(_request4, targetPageKey, 1), _request4));
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
if (view === 'card') {
|
|
750
|
+
var _cardViewProps$pageSi, _cardViewProps$pageSi2, _request5;
|
|
751
|
+
|
|
752
|
+
setPageSize((_cardViewProps$pageSi = cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.pageSize) !== null && _cardViewProps$pageSi !== void 0 ? _cardViewProps$pageSi : 12);
|
|
753
|
+
|
|
754
|
+
_request((_request5 = {}, _defineProperty(_request5, targetPageSizeKey, (_cardViewProps$pageSi2 = cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.pageSize) !== null && _cardViewProps$pageSi2 !== void 0 ? _cardViewProps$pageSi2 : 12), _defineProperty(_request5, targetPageKey, 1), _request5));
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
getHeaderHeight(fullscreenState);
|
|
699
758
|
}
|
|
700
759
|
}); // 将 Actions 绑定到传入的 propsActionRef 中
|
|
701
760
|
|
|
@@ -704,8 +763,6 @@ var ProTable = function ProTable(props) {
|
|
|
704
763
|
}
|
|
705
764
|
|
|
706
765
|
function onFormatResult(next) {
|
|
707
|
-
var _next$data;
|
|
708
|
-
|
|
709
766
|
props.onFormatResult && props.onFormatResult(next);
|
|
710
767
|
var time = autoRefresh ? autoRefresh(next.data) : false;
|
|
711
768
|
|
|
@@ -717,8 +774,22 @@ var ProTable = function ProTable(props) {
|
|
|
717
774
|
} // 设置 dataSource、total
|
|
718
775
|
|
|
719
776
|
|
|
720
|
-
|
|
721
|
-
|
|
777
|
+
if (switchViewState === 'table' || currentPage === 1) {
|
|
778
|
+
var _next$data;
|
|
779
|
+
|
|
780
|
+
_setData(next.data || []);
|
|
781
|
+
|
|
782
|
+
setTotal(next.total || ((_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length));
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
if (switchViewState === 'card' && currentPage !== 1) {
|
|
786
|
+
var _next$data2;
|
|
787
|
+
|
|
788
|
+
_setData([].concat(_toConsumableArray(data), _toConsumableArray(next.data || [])));
|
|
789
|
+
|
|
790
|
+
setTotal(total + (next.total || ((_next$data2 = next.data) === null || _next$data2 === void 0 ? void 0 : _next$data2.length)));
|
|
791
|
+
}
|
|
792
|
+
|
|
722
793
|
setShowSkeleton(false);
|
|
723
794
|
} // 请求表格数据工具函数
|
|
724
795
|
|
|
@@ -790,7 +861,7 @@ var ProTable = function ProTable(props) {
|
|
|
790
861
|
}); // 请求函数
|
|
791
862
|
|
|
792
863
|
function _request(params, noLoading, filterParams) {
|
|
793
|
-
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current5, _actionRef$current5$g,
|
|
864
|
+
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current5, _actionRef$current5$g, _objectSpread3;
|
|
794
865
|
|
|
795
866
|
// 如果没有传 url 且没有 customRequest,直接返回
|
|
796
867
|
if (!url && !customRequest) {
|
|
@@ -807,7 +878,7 @@ var ProTable = function ProTable(props) {
|
|
|
807
878
|
|
|
808
879
|
var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$g = _actionRef$current5.getFilterRules) === null || _actionRef$current5$g === void 0 ? void 0 : _actionRef$current5$g.call(_actionRef$current5)) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {}; // 格式化后的请求参数
|
|
809
880
|
|
|
810
|
-
var requestData = formatParams(_objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread((
|
|
881
|
+
var requestData = formatParams(_objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread((_objectSpread3 = {}, _defineProperty(_objectSpread3, targetPageKey, currentPage), _defineProperty(_objectSpread3, targetPageSizeKey, pageSize), _objectSpread3), dataFilterParams), propsParams), sortParams), columnsFilterParams)), params));
|
|
811
882
|
|
|
812
883
|
if (requestData) {
|
|
813
884
|
if (autoRefreshTimerRef.current) {
|
|
@@ -835,14 +906,24 @@ var ProTable = function ProTable(props) {
|
|
|
835
906
|
if (customRequest && typeof customRequest === 'function') {
|
|
836
907
|
setCustomTableLoading(true);
|
|
837
908
|
customRequest(requestData).then(function (res) {
|
|
838
|
-
var
|
|
839
|
-
|
|
909
|
+
var dataRes = res.data,
|
|
910
|
+
totalRes = res.total,
|
|
840
911
|
success = res.success;
|
|
841
912
|
|
|
842
913
|
if (success === true) {
|
|
843
914
|
// 设置 dataSource、total
|
|
844
|
-
|
|
845
|
-
|
|
915
|
+
if (switchViewState === 'table' || params['targetPageKey'] === 1) {
|
|
916
|
+
_setData(dataRes || []);
|
|
917
|
+
|
|
918
|
+
setTotal(totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length));
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
if (switchViewState === 'card' && params['targetPageKey'] !== 1) {
|
|
922
|
+
_setData([].concat(_toConsumableArray(data), _toConsumableArray(dataRes || [])));
|
|
923
|
+
|
|
924
|
+
setTotal(total + (totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length)));
|
|
925
|
+
}
|
|
926
|
+
|
|
846
927
|
setShowSkeleton(false);
|
|
847
928
|
setCustomTableLoading(false);
|
|
848
929
|
} // 重新计算是否需要吸底
|
|
@@ -912,7 +993,6 @@ var ProTable = function ProTable(props) {
|
|
|
912
993
|
|
|
913
994
|
(_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$c = _actionRef$current6.clearRowSelection) === null || _actionRef$current6$c === void 0 ? void 0 : _actionRef$current6$c.call(_actionRef$current6);
|
|
914
995
|
setCurrentPage(1);
|
|
915
|
-
console.log('currentPageSize1', pageSize);
|
|
916
996
|
|
|
917
997
|
_request(_defineProperty({}, targetPageKey, 1), false, values);
|
|
918
998
|
},
|
|
@@ -922,7 +1002,6 @@ var ProTable = function ProTable(props) {
|
|
|
922
1002
|
(propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
|
|
923
1003
|
(_dataFilterFormRef$cu3 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu3 === void 0 ? void 0 : _dataFilterFormRef$cu3.reset();
|
|
924
1004
|
setCurrentPage(1);
|
|
925
|
-
console.log('currentPageSize2', pageSize);
|
|
926
1005
|
|
|
927
1006
|
_request(_defineProperty({}, targetPageKey, 1), false, values);
|
|
928
1007
|
}
|
|
@@ -957,11 +1036,14 @@ var ProTable = function ProTable(props) {
|
|
|
957
1036
|
rowSelection: rowSelection,
|
|
958
1037
|
filterColumnType: filterColumnType,
|
|
959
1038
|
fullScreenState: isFullScreen,
|
|
960
|
-
|
|
961
|
-
|
|
1039
|
+
toolBarAutoWidth: toolBarAutoWidth,
|
|
1040
|
+
dataTeamixSpm: dataTeamixSpm,
|
|
1041
|
+
switchCardView: switchCardView,
|
|
1042
|
+
defaultView: defaultView
|
|
1043
|
+
}), switchViewState === 'table' && /*#__PURE__*/_react.default.createElement(_components.Table.StickyLock, _objectSpread({
|
|
962
1044
|
hasBorder: false,
|
|
963
1045
|
dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
|
|
964
|
-
columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context),
|
|
1046
|
+
columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context, dataTeamixSpm),
|
|
965
1047
|
loading: getTableLoading(),
|
|
966
1048
|
className: (0, _classnames.default)('teamix-pro-table', tableClassName, {
|
|
967
1049
|
'with-row-select': rowSelection,
|
|
@@ -976,21 +1058,30 @@ var ProTable = function ProTable(props) {
|
|
|
976
1058
|
emptyContent: /*#__PURE__*/_react.default.createElement(_EmptyContent.default, null),
|
|
977
1059
|
sortIcons: (0, _getTableSortIcons.default)(),
|
|
978
1060
|
fixedHeader: fullscreenState || fixedTableBody,
|
|
979
|
-
maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)")
|
|
980
|
-
|
|
981
|
-
|
|
1061
|
+
maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)")
|
|
1062
|
+
}, (0, _utils.pickProps)((0, _getTableProps.default)(), otherProps))), switchViewState === 'card' && /*#__PURE__*/_react.default.createElement(_CardView.default, {
|
|
1063
|
+
dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
|
|
1064
|
+
showSkeleton: showSkeleton,
|
|
1065
|
+
loading: getTableLoading(),
|
|
1066
|
+
originColumns: _columns.default,
|
|
1067
|
+
cardViewProps: cardViewProps,
|
|
1068
|
+
scrollHeight: fullscreenState || fixedTableBody ? "calc(100vh - ".concat(headerHeight, "px)") : undefined,
|
|
1069
|
+
actionRef: actionRef,
|
|
1070
|
+
context: context,
|
|
1071
|
+
columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context)
|
|
1072
|
+
}));
|
|
982
1073
|
} else {
|
|
983
1074
|
// 不传 columns 直接返回原始 Table
|
|
984
|
-
return /*#__PURE__*/_react.default.createElement(_components.Table,
|
|
1075
|
+
return /*#__PURE__*/_react.default.createElement(_components.Table, _objectSpread({
|
|
985
1076
|
className: cls()
|
|
986
1077
|
}, (0, _utils.pickProps)((0, _getTableProps.default)(), otherProps)));
|
|
987
1078
|
}
|
|
988
1079
|
};
|
|
989
1080
|
|
|
990
1081
|
var renderFooterAction = function renderFooterAction() {
|
|
991
|
-
var
|
|
1082
|
+
var _footerAction$actions;
|
|
992
1083
|
|
|
993
|
-
if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (
|
|
1084
|
+
if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_footerAction$actions = footerAction.actions) === null || _footerAction$actions === void 0 ? void 0 : _footerAction$actions.length) >= 0) {
|
|
994
1085
|
// 默认 context
|
|
995
1086
|
var defaultContext = {
|
|
996
1087
|
action: actionRef.current,
|
|
@@ -1009,8 +1100,9 @@ var ProTable = function ProTable(props) {
|
|
|
1009
1100
|
|
|
1010
1101
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1011
1102
|
className: cls('footer-action')
|
|
1012
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
1013
|
-
context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context)
|
|
1103
|
+
}, /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, _objectSpread(_objectSpread({}, targetFooterActions), {}, {
|
|
1104
|
+
context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context),
|
|
1105
|
+
"data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-footerAction") : undefined
|
|
1014
1106
|
})));
|
|
1015
1107
|
} else return footerAction;
|
|
1016
1108
|
};
|
|
@@ -1032,7 +1124,7 @@ var ProTable = function ProTable(props) {
|
|
|
1032
1124
|
}
|
|
1033
1125
|
|
|
1034
1126
|
function onChangePaginationSize(currentPageSize) {
|
|
1035
|
-
var
|
|
1127
|
+
var _request8;
|
|
1036
1128
|
|
|
1037
1129
|
// 翻页默认清空选择
|
|
1038
1130
|
if (!reserveSelectedRecords) {
|
|
@@ -1044,7 +1136,7 @@ var ProTable = function ProTable(props) {
|
|
|
1044
1136
|
setPageSize(currentPageSize);
|
|
1045
1137
|
setCurrentPage(1);
|
|
1046
1138
|
|
|
1047
|
-
_request((
|
|
1139
|
+
_request((_request8 = {}, _defineProperty(_request8, targetPageSizeKey, currentPageSize), _defineProperty(_request8, targetPageKey, 1), _request8));
|
|
1048
1140
|
}
|
|
1049
1141
|
|
|
1050
1142
|
function renderRowSelection() {
|
|
@@ -1056,13 +1148,13 @@ var ProTable = function ProTable(props) {
|
|
|
1056
1148
|
} else {
|
|
1057
1149
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1058
1150
|
className: cls('footer-left-wrapper')
|
|
1059
|
-
}, rowSelection.mode !== 'single' && /*#__PURE__*/_react.default.createElement(_components.Checkbox,
|
|
1151
|
+
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, rowSelection.mode !== 'single' && /*#__PURE__*/_react.default.createElement(_components.Checkbox, _objectSpread({
|
|
1060
1152
|
className: cls("footer-checkbox-".concat(size))
|
|
1061
1153
|
}, getCheckAllProps())), footerAction && renderFooterAction(), /*#__PURE__*/_react.default.createElement("span", {
|
|
1062
1154
|
className: cls('selected-msg')
|
|
1063
1155
|
}, (0, _utils.getMessage)('selected', {
|
|
1064
1156
|
count: selectedCount
|
|
1065
|
-
})));
|
|
1157
|
+
}))));
|
|
1066
1158
|
}
|
|
1067
1159
|
} else if (footerAction) {
|
|
1068
1160
|
if (showSkeleton) {
|
|
@@ -1077,7 +1169,7 @@ var ProTable = function ProTable(props) {
|
|
|
1077
1169
|
}
|
|
1078
1170
|
}
|
|
1079
1171
|
|
|
1080
|
-
if (showPagination) {
|
|
1172
|
+
if (showPagination && switchViewState === 'table') {
|
|
1081
1173
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1082
1174
|
className: cls('footer', {
|
|
1083
1175
|
'footer-has-rowSelection': rowSelection,
|
|
@@ -1085,15 +1177,15 @@ var ProTable = function ProTable(props) {
|
|
|
1085
1177
|
})
|
|
1086
1178
|
}, renderRowSelection(), /*#__PURE__*/_react.default.createElement("div", {
|
|
1087
1179
|
className: cls('footer-right-wrapper')
|
|
1088
|
-
}, showSkeleton ? /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Footer.Pagination, null) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, data.length > 0 && /*#__PURE__*/_react.default.createElement(_Pagination.default,
|
|
1180
|
+
}, showSkeleton ? /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Footer.Pagination, null) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, data.length > 0 && /*#__PURE__*/_react.default.createElement(_Pagination.default, _objectSpread({
|
|
1089
1181
|
className: cls('pagination'),
|
|
1090
1182
|
onChange: function onChange(number) {
|
|
1091
1183
|
return onChangePagination(number);
|
|
1092
1184
|
},
|
|
1093
1185
|
total: total,
|
|
1094
|
-
responsivePaginationType: responsivePaginationType
|
|
1186
|
+
responsivePaginationType: responsivePaginationType,
|
|
1187
|
+
// shape="arrow-only"
|
|
1095
1188
|
// pageSizePosition="end"
|
|
1096
|
-
,
|
|
1097
1189
|
totalRender: function totalRender(total) {
|
|
1098
1190
|
return (0, _utils.getMessage)('total', {
|
|
1099
1191
|
total: new Intl.NumberFormat().format(total)
|
|
@@ -1108,7 +1200,7 @@ var ProTable = function ProTable(props) {
|
|
|
1108
1200
|
return onChangePaginationSize(number);
|
|
1109
1201
|
}
|
|
1110
1202
|
}, props.paginationProps)))));
|
|
1111
|
-
} else if (!showPagination) {
|
|
1203
|
+
} else if (!showPagination && (footerAction || rowSelection || useRowSelection)) {
|
|
1112
1204
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1113
1205
|
className: cls('footer', {
|
|
1114
1206
|
'footer-has-rowSelection': rowSelection
|
|
@@ -1122,6 +1214,7 @@ var ProTable = function ProTable(props) {
|
|
|
1122
1214
|
|
|
1123
1215
|
var fixFooterState = (0, _react.useMemo)(function () {
|
|
1124
1216
|
if (fullscreenState) {
|
|
1217
|
+
// TODO XXX
|
|
1125
1218
|
return false;
|
|
1126
1219
|
}
|
|
1127
1220
|
|