@teamix/pro 1.5.0-beta.1 → 1.5.1-aplha.0
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 +84670 -60159
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +11 -0
- package/es/actions/dialog-component.js +1 -7
- package/es/actions/dialog-form.js +5 -3
- package/es/actions/dialog.js +1 -1
- package/es/actions/index.js +66 -32
- package/es/actions/request.js +2 -2
- package/es/card/card-container.js +9 -9
- package/es/card/divider.js +2 -6
- package/es/card/index.js +16 -10
- package/es/card/selectable.js +2 -6
- package/es/card/tab.js +2 -6
- package/es/form/Components/Editable/index.js +1 -1
- package/es/form/Components/FormGroup/index.js +5 -3
- package/es/form/Components/LightFilter/index.js +8 -2
- package/es/form/Components/ProField/index.js +2 -6
- package/es/form/Components/Text/index.js +2 -6
- package/es/form/Filter/AdvancedFilter.js +18 -15
- package/es/form/Filter/LightFilter.js +13 -10
- package/es/form/Filter/SimpleFilter.js +10 -6
- package/es/form/Filter/index.js +7 -10
- package/es/form/Filter/index2.js +21 -17
- package/es/form/Filter/layout.scss +1 -1
- package/es/form/ProForm/addCascadeEffect.js +225 -0
- package/es/form/ProForm/index.js +12 -7
- package/es/form/ProForm/useFormDisplayValues.js +1 -1
- package/es/form/SchemaForm/reactions.js +2 -1
- package/es/form/utils.js +8 -1
- package/es/index.js +2 -1
- package/es/info/components/InfoGroup/index.js +2 -6
- package/es/info/components/InfoValueItem/index.js +23 -21
- package/es/info/components/tableInfo/index.js +5 -4
- package/es/info/index.js +8 -5
- package/es/nocode/index.js +2 -2
- package/es/nocode/pages/index.js +4 -3
- package/es/nocode/pages/playground.js +3 -7
- package/es/nocode/pages/renderer.js +4 -8
- package/es/nocode/playground.js +2 -6
- package/es/page-header/index.js +12 -7
- package/es/sidebar/components/sidebar-container/index.js +23 -11
- package/es/sidebar/components/sidebar-container/index.scss +21 -14
- package/es/sidebar/components/tree/index.js +26 -12
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +2 -6
- package/es/sidebar/components/tree-node/components/IconAction/index.js +4 -2
- package/es/sidebar/components/tree-node/index.js +22 -19
- package/es/sidebar/index.js +3 -5
- package/es/sidebar/utils/index.js +11 -11
- package/es/table/components/Layout/index.js +14 -10
- package/es/table/components/Pagination/index.js +10 -14
- package/es/table/components/QuickAction/index.js +4 -2
- package/es/table/components/ToolBar/DensityIcon.js +3 -3
- package/es/table/components/ToolBar/FilterColumnIcon.js +2 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +6 -57
- package/es/table/components/ToolBar/RefreshIcon.js +2 -1
- package/es/table/components/ToolBar/index.js +98 -19
- package/es/table/components/ToolBar/index.scss +22 -2
- package/es/table/index.js +38 -28
- package/es/table/utils/columnRender.js +27 -25
- package/es/table/utils/genProColumnToColumn.js +1 -1
- package/es/table/utils/index.js +2 -2
- package/es/table/utils/pureColumnRender.js +4 -2
- package/es/table/utils/pureGenProColumnToColumn.js +1 -1
- package/es/templates/List/index.js +4 -8
- package/es/templates/index.js +2 -1
- package/es/timeline/ProTimeLineItem/index.js +2 -6
- package/es/timeline/index.js +3 -7
- package/es/utils/message.js +3 -7
- package/lib/actions/dialog-component.js +1 -7
- package/lib/actions/dialog-form.js +5 -3
- package/lib/actions/dialog.js +1 -1
- package/lib/actions/index.js +65 -32
- package/lib/card/card-container.js +5 -7
- package/lib/card/divider.js +2 -6
- package/lib/card/index.js +16 -9
- package/lib/card/selectable.js +2 -6
- package/lib/card/tab.js +2 -6
- package/lib/form/Components/Editable/index.js +1 -1
- package/lib/form/Components/FormGroup/index.js +5 -3
- package/lib/form/Components/LightFilter/index.js +8 -2
- package/lib/form/Components/ProField/index.js +2 -6
- package/lib/form/Components/Text/index.js +2 -6
- package/lib/form/Filter/AdvancedFilter.js +17 -14
- package/lib/form/Filter/LightFilter.js +12 -9
- package/lib/form/Filter/SimpleFilter.js +8 -5
- package/lib/form/Filter/index.js +6 -9
- package/lib/form/Filter/index2.js +21 -17
- package/lib/form/Filter/layout.scss +1 -1
- package/lib/form/ProForm/addCascadeEffect.js +235 -0
- package/lib/form/ProForm/index.js +13 -7
- package/lib/form/typing.js +1 -5
- package/lib/form/utils.js +7 -0
- package/lib/index.js +2 -1
- package/lib/info/components/InfoGroup/index.js +2 -6
- package/lib/info/components/InfoValueItem/index.js +23 -21
- package/lib/info/components/tableInfo/index.js +5 -4
- package/lib/info/index.js +8 -5
- package/lib/info/typing.js +1 -5
- package/lib/nocode/pages/index.js +2 -2
- package/lib/nocode/pages/playground.js +3 -7
- package/lib/nocode/pages/renderer.js +4 -8
- package/lib/nocode/playground.js +2 -6
- package/lib/page-header/index.js +12 -6
- package/lib/sidebar/components/sidebar-container/index.js +23 -11
- package/lib/sidebar/components/sidebar-container/index.scss +21 -14
- package/lib/sidebar/components/tree/index.js +26 -12
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +2 -6
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +4 -2
- package/lib/sidebar/components/tree-node/index.js +22 -19
- package/lib/sidebar/index.js +3 -5
- package/lib/sidebar/typing.js +1 -5
- package/lib/sidebar/utils/index.js +11 -11
- package/lib/table/components/Layout/index.js +15 -11
- package/lib/table/components/Pagination/index.js +10 -14
- package/lib/table/components/QuickAction/index.js +4 -2
- package/lib/table/components/ToolBar/DensityIcon.js +3 -3
- package/lib/table/components/ToolBar/FilterColumnIcon.js +2 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +9 -63
- package/lib/table/components/ToolBar/RefreshIcon.js +2 -1
- package/lib/table/components/ToolBar/index.js +107 -18
- package/lib/table/components/ToolBar/index.scss +22 -2
- package/lib/table/index.js +39 -29
- package/lib/table/typing.js +1 -5
- package/lib/table/utils/columnRender.js +27 -25
- package/lib/table/utils/pureColumnRender.js +3 -1
- package/lib/templates/List/index.js +4 -8
- package/lib/timeline/ProTimeLineItem/index.js +2 -6
- package/lib/timeline/index.js +3 -7
- package/lib/timeline/typing.js +1 -5
- package/lib/utils/message.js +3 -7
- package/package.json +1 -1
- package/es/actions/base.d.ts +0 -24
- package/es/actions/confirm.d.ts +0 -7
- package/es/actions/danger-confirm.d.ts +0 -7
- package/es/actions/danger-pop-confirm.d.ts +0 -5
- package/es/actions/dialog-component.d.ts +0 -10
- package/es/actions/dialog-form.d.ts +0 -29
- package/es/actions/dialog-info.d.ts +0 -9
- package/es/actions/dialog-table.d.ts +0 -9
- package/es/actions/dialog.d.ts +0 -40
- package/es/actions/drawer-form.d.ts +0 -6
- package/es/actions/drawer-info.d.ts +0 -6
- package/es/actions/drawer-table.d.ts +0 -6
- package/es/actions/drawer.d.ts +0 -6
- package/es/actions/error.d.ts +0 -7
- package/es/actions/index.d.ts +0 -107
- package/es/actions/link.d.ts +0 -8
- package/es/actions/notice.d.ts +0 -7
- package/es/actions/pop-confirm.d.ts +0 -9
- package/es/actions/request.d.ts +0 -9
- package/es/actions/utils.d.ts +0 -1
- package/es/card/card-container.d.ts +0 -18
- package/es/card/divider.d.ts +0 -6
- package/es/card/index.d.ts +0 -109
- package/es/card/selectable.d.ts +0 -13
- package/es/card/tab.d.ts +0 -6
- package/es/card/utils.d.ts +0 -9
- package/es/field/index.d.ts +0 -3
- package/es/form/Components/Editable/index.d.ts +0 -20
- package/es/form/Components/FormGroup/index.d.ts +0 -13
- package/es/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/es/form/Components/LightFilter/index.d.ts +0 -17
- package/es/form/Components/ProField/index.d.ts +0 -2
- package/es/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/es/form/Components/Text/index.d.ts +0 -7
- package/es/form/Filter/AdvancedFilter.d.ts +0 -7
- package/es/form/Filter/Layout.d.ts +0 -5
- package/es/form/Filter/LightFilter.d.ts +0 -7
- package/es/form/Filter/SimpleFilter.d.ts +0 -7
- package/es/form/Filter/index.d.ts +0 -9
- package/es/form/Filter/index2.d.ts +0 -13
- package/es/form/Filter/useBindUrl.d.ts +0 -2
- package/es/form/Filter/useSpecialProps.d.ts +0 -6
- package/es/form/ProForm/customComponent.d.ts +0 -3
- package/es/form/ProForm/index.d.ts +0 -5
- package/es/form/ProForm/useAutoLayout.d.ts +0 -9
- package/es/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/es/form/ProForm/useFieldRequest.d.ts +0 -5
- package/es/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/es/form/ProForm/useInitialRequest.d.ts +0 -6
- package/es/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/es/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/es/form/SchemaForm/adapterType.d.ts +0 -5
- package/es/form/SchemaForm/index.d.ts +0 -4
- package/es/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/es/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/es/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/es/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/es/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/es/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/es/form/SchemaForm/initializeRules.d.ts +0 -11
- package/es/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/es/form/SchemaForm/reactions.d.ts +0 -6
- package/es/form/docs/ActionResponse.d.ts +0 -7
- package/es/form/fieldTypeMap.d.ts +0 -7
- package/es/form/index.d.ts +0 -125
- package/es/form/locales/validate.d.ts +0 -159
- package/es/form/schemaNameMap.d.ts +0 -5
- package/es/form/typing.d.ts +0 -172
- package/es/form/utils.d.ts +0 -55
- package/es/form/warning.d.ts +0 -3
- package/es/hooks/index.d.ts +0 -2
- package/es/index-without-icon.d.ts +0 -32
- package/es/index.d.ts +0 -32
- package/es/info/components/InfoGroup/index.d.ts +0 -5
- package/es/info/components/InfoValueItem/index.d.ts +0 -5
- package/es/info/components/ProInfoItem/index.d.ts +0 -5
- package/es/info/components/baseInfo/index.d.ts +0 -8
- package/es/info/components/headerInfo/index.d.ts +0 -8
- package/es/info/components/tableInfo/index.d.ts +0 -7
- package/es/info/index.d.ts +0 -10
- package/es/info/typing.d.ts +0 -218
- package/es/info/utils/index.d.ts +0 -20
- package/es/info/utils/layout.d.ts +0 -2
- package/es/info/utils/utils.d.ts +0 -1
- package/es/layout/index.d.ts +0 -2
- package/es/nocode/configurators/Card.d.ts +0 -3
- package/es/nocode/configurators/PageHeader.d.ts +0 -3
- package/es/nocode/configurators/ProTable.d.ts +0 -3
- package/es/nocode/configurators/common.d.ts +0 -280
- package/es/nocode/configurators/index.d.ts +0 -15
- package/es/nocode/configurators/map.d.ts +0 -2
- package/es/nocode/index.d.ts +0 -8
- package/es/nocode/pages/editor.d.ts +0 -12
- package/es/nocode/pages/index.d.ts +0 -14
- package/es/nocode/pages/playground.d.ts +0 -11
- package/es/nocode/pages/renderer.d.ts +0 -10
- package/es/nocode/playground.d.ts +0 -14
- package/es/page-container/index.d.ts +0 -3
- package/es/page-header/index.d.ts +0 -74
- package/es/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/es/sidebar/components/tree/index.d.ts +0 -6
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/es/sidebar/components/tree-node/index.d.ts +0 -7
- package/es/sidebar/index.d.ts +0 -7
- package/es/sidebar/typing.d.ts +0 -137
- package/es/sidebar/utils/action-ref.d.ts +0 -3
- package/es/sidebar/utils/index.d.ts +0 -361
- package/es/skeleton/index.d.ts +0 -3
- package/es/table/components/EmptyContent/index.d.ts +0 -2
- package/es/table/components/Filter/index.d.ts +0 -9
- package/es/table/components/Layout/index.d.ts +0 -5
- package/es/table/components/Pagination/index.d.ts +0 -7
- package/es/table/components/QuickAction/index.d.ts +0 -10
- package/es/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/es/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/es/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/es/table/components/ToolBar/index.d.ts +0 -5
- package/es/table/index.d.ts +0 -5
- package/es/table/typing.d.ts +0 -299
- package/es/table/utils/columnRender.d.ts +0 -13
- package/es/table/utils/genProColumnToColumn.d.ts +0 -13
- package/es/table/utils/getTableProps.d.ts +0 -2
- package/es/table/utils/getTableSortIcons.d.ts +0 -3
- package/es/table/utils/index.d.ts +0 -19
- package/es/table/utils/pureColumnRender.d.ts +0 -9
- package/es/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/es/table/utils/useTableSelection.d.ts +0 -3
- package/es/templates/Detail/index.d.ts +0 -2
- package/es/templates/Form/index.d.ts +0 -2
- package/es/templates/List/index.d.ts +0 -9
- package/es/templates/index.d.ts +0 -3
- package/es/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/es/timeline/index.d.ts +0 -10
- package/es/timeline/typing.d.ts +0 -106
- package/es/utils/index.d.ts +0 -3
- package/es/utils/message.d.ts +0 -3
- package/lib/actions/base.d.ts +0 -24
- package/lib/actions/confirm.d.ts +0 -7
- package/lib/actions/danger-confirm.d.ts +0 -7
- package/lib/actions/danger-pop-confirm.d.ts +0 -5
- package/lib/actions/dialog-component.d.ts +0 -10
- package/lib/actions/dialog-form.d.ts +0 -29
- package/lib/actions/dialog-info.d.ts +0 -9
- package/lib/actions/dialog-table.d.ts +0 -9
- package/lib/actions/dialog.d.ts +0 -40
- package/lib/actions/drawer-form.d.ts +0 -6
- package/lib/actions/drawer-info.d.ts +0 -6
- package/lib/actions/drawer-table.d.ts +0 -6
- package/lib/actions/drawer.d.ts +0 -6
- package/lib/actions/error.d.ts +0 -7
- package/lib/actions/index.d.ts +0 -107
- package/lib/actions/link.d.ts +0 -8
- package/lib/actions/notice.d.ts +0 -7
- package/lib/actions/pop-confirm.d.ts +0 -9
- package/lib/actions/request.d.ts +0 -9
- package/lib/actions/utils.d.ts +0 -1
- package/lib/card/card-container.d.ts +0 -18
- package/lib/card/divider.d.ts +0 -6
- package/lib/card/index.d.ts +0 -109
- package/lib/card/selectable.d.ts +0 -13
- package/lib/card/tab.d.ts +0 -6
- package/lib/card/utils.d.ts +0 -9
- package/lib/field/index.d.ts +0 -3
- package/lib/form/Components/Editable/index.d.ts +0 -20
- package/lib/form/Components/FormGroup/index.d.ts +0 -13
- package/lib/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/lib/form/Components/LightFilter/index.d.ts +0 -17
- package/lib/form/Components/ProField/index.d.ts +0 -2
- package/lib/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/lib/form/Components/Text/index.d.ts +0 -7
- package/lib/form/Filter/AdvancedFilter.d.ts +0 -7
- package/lib/form/Filter/Layout.d.ts +0 -5
- package/lib/form/Filter/LightFilter.d.ts +0 -7
- package/lib/form/Filter/SimpleFilter.d.ts +0 -7
- package/lib/form/Filter/index.d.ts +0 -9
- package/lib/form/Filter/index2.d.ts +0 -13
- package/lib/form/Filter/useBindUrl.d.ts +0 -2
- package/lib/form/Filter/useSpecialProps.d.ts +0 -6
- package/lib/form/ProForm/customComponent.d.ts +0 -3
- package/lib/form/ProForm/index.d.ts +0 -5
- package/lib/form/ProForm/useAutoLayout.d.ts +0 -9
- package/lib/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/lib/form/ProForm/useFieldRequest.d.ts +0 -5
- package/lib/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/lib/form/ProForm/useInitialRequest.d.ts +0 -6
- package/lib/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/lib/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/lib/form/SchemaForm/adapterType.d.ts +0 -5
- package/lib/form/SchemaForm/index.d.ts +0 -4
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/lib/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/lib/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/lib/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/lib/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/lib/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/lib/form/SchemaForm/initializeRules.d.ts +0 -11
- package/lib/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/lib/form/SchemaForm/reactions.d.ts +0 -6
- package/lib/form/docs/ActionResponse.d.ts +0 -7
- package/lib/form/fieldTypeMap.d.ts +0 -7
- package/lib/form/index.d.ts +0 -125
- package/lib/form/locales/validate.d.ts +0 -159
- package/lib/form/schemaNameMap.d.ts +0 -5
- package/lib/form/typing.d.ts +0 -172
- package/lib/form/utils.d.ts +0 -55
- package/lib/form/warning.d.ts +0 -3
- package/lib/hooks/index.d.ts +0 -2
- package/lib/index-without-icon.d.ts +0 -32
- package/lib/index.d.ts +0 -32
- package/lib/info/components/InfoGroup/index.d.ts +0 -5
- package/lib/info/components/InfoValueItem/index.d.ts +0 -5
- package/lib/info/components/ProInfoItem/index.d.ts +0 -5
- package/lib/info/components/baseInfo/index.d.ts +0 -8
- package/lib/info/components/headerInfo/index.d.ts +0 -8
- package/lib/info/components/tableInfo/index.d.ts +0 -7
- package/lib/info/index.d.ts +0 -10
- package/lib/info/typing.d.ts +0 -218
- package/lib/info/utils/index.d.ts +0 -20
- package/lib/info/utils/layout.d.ts +0 -2
- package/lib/info/utils/utils.d.ts +0 -1
- package/lib/layout/index.d.ts +0 -2
- package/lib/nocode/configurators/Card.d.ts +0 -3
- package/lib/nocode/configurators/PageHeader.d.ts +0 -3
- package/lib/nocode/configurators/ProTable.d.ts +0 -3
- package/lib/nocode/configurators/common.d.ts +0 -280
- package/lib/nocode/configurators/index.d.ts +0 -15
- package/lib/nocode/configurators/map.d.ts +0 -2
- package/lib/nocode/index.d.ts +0 -8
- package/lib/nocode/pages/editor.d.ts +0 -12
- package/lib/nocode/pages/index.d.ts +0 -14
- package/lib/nocode/pages/playground.d.ts +0 -11
- package/lib/nocode/pages/renderer.d.ts +0 -10
- package/lib/nocode/playground.d.ts +0 -14
- package/lib/page-container/index.d.ts +0 -3
- package/lib/page-header/index.d.ts +0 -74
- package/lib/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/lib/sidebar/components/tree/index.d.ts +0 -6
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/lib/sidebar/components/tree-node/index.d.ts +0 -7
- package/lib/sidebar/index.d.ts +0 -7
- package/lib/sidebar/typing.d.ts +0 -137
- package/lib/sidebar/utils/action-ref.d.ts +0 -3
- package/lib/sidebar/utils/index.d.ts +0 -361
- package/lib/skeleton/index.d.ts +0 -3
- package/lib/table/components/EmptyContent/index.d.ts +0 -2
- package/lib/table/components/Filter/index.d.ts +0 -9
- package/lib/table/components/Layout/index.d.ts +0 -5
- package/lib/table/components/Pagination/index.d.ts +0 -7
- package/lib/table/components/QuickAction/index.d.ts +0 -10
- package/lib/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/index.d.ts +0 -5
- package/lib/table/index.d.ts +0 -5
- package/lib/table/typing.d.ts +0 -299
- package/lib/table/utils/columnRender.d.ts +0 -13
- package/lib/table/utils/genProColumnToColumn.d.ts +0 -13
- package/lib/table/utils/getTableProps.d.ts +0 -2
- package/lib/table/utils/getTableSortIcons.d.ts +0 -3
- package/lib/table/utils/index.d.ts +0 -19
- package/lib/table/utils/pureColumnRender.d.ts +0 -9
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/lib/table/utils/useTableSelection.d.ts +0 -3
- package/lib/templates/Detail/index.d.ts +0 -2
- package/lib/templates/Form/index.d.ts +0 -2
- package/lib/templates/List/index.d.ts +0 -9
- package/lib/templates/index.d.ts +0 -3
- package/lib/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/lib/timeline/index.d.ts +0 -10
- package/lib/timeline/typing.d.ts +0 -106
- package/lib/utils/index.d.ts +0 -3
- package/lib/utils/message.d.ts +0 -3
@@ -1,5 +1,7 @@
|
|
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); }
|
4
|
+
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
4
6
|
value: true
|
5
7
|
});
|
@@ -7,7 +9,11 @@ exports.default = void 0;
|
|
7
9
|
|
8
10
|
var _utils = require("@teamix/utils");
|
9
11
|
|
10
|
-
var _react =
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
13
|
+
|
14
|
+
var _components = require("@alicloudfe/components");
|
15
|
+
|
16
|
+
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
11
17
|
|
12
18
|
var _FullScreenIcon = _interopRequireDefault(require("./FullScreenIcon"));
|
13
19
|
|
@@ -17,16 +23,32 @@ var _DensityIcon = _interopRequireDefault(require("./DensityIcon"));
|
|
17
23
|
|
18
24
|
var _RefreshIcon = _interopRequireDefault(require("./RefreshIcon"));
|
19
25
|
|
26
|
+
var _hooks = require("@teamix/hooks");
|
27
|
+
|
28
|
+
var _lodash = _interopRequireDefault(require("lodash.debounce"));
|
29
|
+
|
20
30
|
require("./index.scss");
|
21
31
|
|
22
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
33
|
|
24
|
-
function
|
34
|
+
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); }
|
25
35
|
|
26
|
-
function
|
36
|
+
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; }
|
27
37
|
|
28
38
|
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; }
|
29
39
|
|
40
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
41
|
+
|
42
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
43
|
+
|
44
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
45
|
+
|
46
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
47
|
+
|
48
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
49
|
+
|
50
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
51
|
+
|
30
52
|
var cls = (0, _utils.usePrefixCls)('teamix-pro-table-toolbar');
|
31
53
|
var presetToolBarMap = {
|
32
54
|
refresh: _RefreshIcon.default,
|
@@ -54,7 +76,46 @@ var presetToolBar = [{
|
|
54
76
|
}];
|
55
77
|
|
56
78
|
var ToolBar = function ToolBar(props) {
|
57
|
-
var
|
79
|
+
var _toolBarRef$current, _toolBarRef$current$p, _toolBarRef$current$p2;
|
80
|
+
|
81
|
+
var toolBar = props.toolBar,
|
82
|
+
fullScreenState = props.fullScreenState;
|
83
|
+
var toolBarRef = (0, _react.useRef)(null); // const toolBarSize = useSize(toolBarRef);
|
84
|
+
// 用于获取内容宽度
|
85
|
+
|
86
|
+
var toolBarContentRef = (0, _react.useRef)(null); // '.teamix-pro-form-query-filter-layout-inline' 元素
|
87
|
+
|
88
|
+
var layoutInlineDom = (_toolBarRef$current = toolBarRef.current) === null || _toolBarRef$current === void 0 ? void 0 : (_toolBarRef$current$p = _toolBarRef$current.parentElement) === null || _toolBarRef$current$p === void 0 ? void 0 : (_toolBarRef$current$p2 = _toolBarRef$current$p.parentElement) === null || _toolBarRef$current$p2 === void 0 ? void 0 : _toolBarRef$current$p2.parentElement; // 监听它的尺寸变化
|
89
|
+
|
90
|
+
var layoutInlineSize = (0, _hooks.useSize)(layoutInlineDom); // '.teamix-pro-form-query-filter-layout-left' 元素
|
91
|
+
|
92
|
+
var layoutLeftDom = layoutInlineDom === null || layoutInlineDom === void 0 ? void 0 : layoutInlineDom.firstElementChild;
|
93
|
+
var leftWidth = layoutLeftDom === null || layoutLeftDom === void 0 ? void 0 : layoutLeftDom.clientWidth; // 展示形式,是否平铺
|
94
|
+
|
95
|
+
var _useSafeState = (0, _hooks.useSafeState)(),
|
96
|
+
_useSafeState2 = _slicedToArray(_useSafeState, 2),
|
97
|
+
flat = _useSafeState2[0],
|
98
|
+
setFlat = _useSafeState2[1]; // 监听高度,> 32px则切换形态
|
99
|
+
|
100
|
+
|
101
|
+
(0, _react.useEffect)((0, _lodash.default)(function () {
|
102
|
+
// console.log(
|
103
|
+
// layoutInlineSize?.width,
|
104
|
+
// leftWidth,
|
105
|
+
// toolBarContentRef.current?.clientWidth,
|
106
|
+
// );
|
107
|
+
if ((layoutInlineSize === null || layoutInlineSize === void 0 ? void 0 : layoutInlineSize.width) && leftWidth && toolBarContentRef.current) {
|
108
|
+
var _toolBarContentRef$cu;
|
109
|
+
|
110
|
+
var width = layoutInlineSize.width; // console.log('layoutInlineSize-width', width);
|
111
|
+
|
112
|
+
if (width - leftWidth <= ((_toolBarContentRef$cu = toolBarContentRef.current) === null || _toolBarContentRef$cu === void 0 ? void 0 : _toolBarContentRef$cu.clientWidth) + 8) {
|
113
|
+
setFlat(false);
|
114
|
+
} else {
|
115
|
+
setFlat(true);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}, 300));
|
58
119
|
var toolBarList = toolBar !== false ? presetToolBar : [];
|
59
120
|
|
60
121
|
if (Array.isArray(toolBar)) {
|
@@ -75,21 +136,49 @@ var ToolBar = function ToolBar(props) {
|
|
75
136
|
});
|
76
137
|
}
|
77
138
|
|
139
|
+
var renderFlatShape = function renderFlatShape() {
|
140
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
141
|
+
className: cls('content')
|
142
|
+
}, toolBarList.map(function (_ref) {
|
143
|
+
var type = _ref.type,
|
144
|
+
name = _ref.name,
|
145
|
+
Component = _ref.component;
|
146
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
147
|
+
className: cls('item', _defineProperty({}, name, true)),
|
148
|
+
key: name
|
149
|
+
}, type === 'preset' && /*#__PURE__*/_react.default.createElement(Component, props), type === 'custom' && /*#__PURE__*/_react.default.createElement("div", {
|
150
|
+
className: cls({
|
151
|
+
custom: true
|
152
|
+
})
|
153
|
+
}, Component));
|
154
|
+
}));
|
155
|
+
};
|
156
|
+
|
157
|
+
var renderUnFlatShape = function renderUnFlatShape() {
|
158
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, {
|
159
|
+
triggerType: ['click'],
|
160
|
+
popupProps: {
|
161
|
+
cache: true
|
162
|
+
},
|
163
|
+
style: {
|
164
|
+
padding: 8
|
165
|
+
},
|
166
|
+
trigger: /*#__PURE__*/_react.default.createElement(_components.Button, null, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
167
|
+
type: "more-line"
|
168
|
+
})),
|
169
|
+
align: "tr"
|
170
|
+
}, renderFlatShape()));
|
171
|
+
};
|
172
|
+
|
78
173
|
return /*#__PURE__*/_react.default.createElement("div", {
|
79
|
-
className: cls(
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
}, type === 'preset' && /*#__PURE__*/_react.default.createElement(Component, _objectSpread({}, props)), type === 'custom' && /*#__PURE__*/_react.default.createElement("div", {
|
88
|
-
className: cls({
|
89
|
-
custom: true
|
90
|
-
})
|
91
|
-
}, Component));
|
92
|
-
}));
|
174
|
+
className: cls('', {
|
175
|
+
flat: flat
|
176
|
+
}),
|
177
|
+
ref: toolBarRef
|
178
|
+
}, !flat && !fullScreenState ? renderUnFlatShape() : renderFlatShape(), /*#__PURE__*/_react.default.createElement("div", {
|
179
|
+
className: cls('shadow'),
|
180
|
+
ref: toolBarContentRef
|
181
|
+
}, renderFlatShape()));
|
93
182
|
};
|
94
183
|
|
95
184
|
var _default = ToolBar;
|
@@ -2,20 +2,40 @@
|
|
2
2
|
width: 100%;
|
3
3
|
text-align: right;
|
4
4
|
margin-bottom: 8px;
|
5
|
+
&-flat {
|
6
|
+
margin-left: 8px;
|
7
|
+
}
|
8
|
+
&-item {
|
9
|
+
display: inline-block;
|
10
|
+
&:not(:first-child) {
|
11
|
+
margin-left: 8px;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
&-content {
|
15
|
+
display: flex;
|
16
|
+
}
|
17
|
+
&-shadow {
|
18
|
+
visibility: hidden;
|
19
|
+
pointer-events: none;
|
20
|
+
opacity: 0;
|
21
|
+
height: 0px;
|
22
|
+
position: absolute;
|
23
|
+
z-index: -1;
|
24
|
+
overflow: hidden;
|
25
|
+
}
|
5
26
|
}
|
6
27
|
.teamix-pro-table-toolbar-custom {
|
7
28
|
display: inline-block;
|
8
|
-
margin-left: 8px;
|
9
29
|
}
|
10
30
|
|
11
31
|
// FullScreen
|
12
32
|
.teamix-pro-table-toolbar-icon {
|
13
|
-
margin-left: 8px;
|
14
33
|
i {
|
15
34
|
color: var(--color-fill1-6, #848484);
|
16
35
|
}
|
17
36
|
}
|
18
37
|
|
38
|
+
|
19
39
|
// FilterColumn
|
20
40
|
.teamix-pro-table-toolbar-filter-column {
|
21
41
|
min-width: 180px;
|
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 _actions2 = require("../actions");
|
38
38
|
|
39
39
|
var _classnames = _interopRequireDefault(require("classnames"));
|
40
40
|
|
@@ -55,7 +55,7 @@ Object.keys(_typing).forEach(function (key) {
|
|
55
55
|
}
|
56
56
|
});
|
57
57
|
});
|
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", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree"];
|
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"];
|
59
59
|
|
60
60
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
61
61
|
|
@@ -63,6 +63,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
63
63
|
|
64
64
|
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
65
|
|
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
|
+
|
66
68
|
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); }
|
67
69
|
|
68
70
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
@@ -186,6 +188,7 @@ var ProTable = function ProTable(props) {
|
|
186
188
|
return params;
|
187
189
|
} : _props$formatParams,
|
188
190
|
formatResult = props.formatResult,
|
191
|
+
requestConfig = props.requestConfig,
|
189
192
|
_props$requestWhenMou = props.requestWhenMount,
|
190
193
|
requestWhenMount = _props$requestWhenMou === void 0 ? true : _props$requestWhenMou,
|
191
194
|
_props$showPagination = props.showPagination,
|
@@ -220,6 +223,7 @@ var ProTable = function ProTable(props) {
|
|
220
223
|
_props$fixedTableBody = props.fixedTableBody,
|
221
224
|
fixedTableBody = _props$fixedTableBody === void 0 ? false : _props$fixedTableBody,
|
222
225
|
isTree = props.isTree,
|
226
|
+
dataTeamixSpm = props['data-teamix-spm'],
|
223
227
|
otherProps = _objectWithoutProperties(props, _excluded);
|
224
228
|
|
225
229
|
var targetPageKey = pageKey || globalPageKey;
|
@@ -515,13 +519,14 @@ var ProTable = function ProTable(props) {
|
|
515
519
|
}, [rowSelectionHook]); // 获取 table 左下角 checkbox 属性
|
516
520
|
|
517
521
|
function getCheckAllProps() {
|
518
|
-
var
|
519
|
-
|
520
|
-
|
521
|
-
onSelectAll =
|
522
|
-
|
523
|
-
selectedRowKeys =
|
524
|
-
|
522
|
+
var _ref = rowSelection,
|
523
|
+
_ref$onChange = _ref.onChange,
|
524
|
+
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
525
|
+
_ref$onSelectAll = _ref.onSelectAll,
|
526
|
+
onSelectAll = _ref$onSelectAll === void 0 ? function () {} : _ref$onSelectAll,
|
527
|
+
_ref$selectedRowKeys = _ref.selectedRowKeys,
|
528
|
+
selectedRowKeys = _ref$selectedRowKeys === void 0 ? [] : _ref$selectedRowKeys,
|
529
|
+
getProps = _ref.getProps;
|
525
530
|
|
526
531
|
var dataSource = data;
|
527
532
|
var allRowKeys = dataSource.filter(function (d, i) {
|
@@ -598,14 +603,14 @@ var ProTable = function ProTable(props) {
|
|
598
603
|
actionRefCallback[state][name] = fun;
|
599
604
|
},
|
600
605
|
off: function off(name) {
|
601
|
-
actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (
|
602
|
-
var
|
603
|
-
k =
|
604
|
-
v =
|
606
|
+
actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref2) {
|
607
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
608
|
+
k = _ref3[0],
|
609
|
+
v = _ref3[1];
|
605
610
|
|
606
|
-
var filterV = Object.fromEntries(Object.entries(v).filter(function (
|
607
|
-
var
|
608
|
-
k =
|
611
|
+
var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref4) {
|
612
|
+
var _ref5 = _slicedToArray(_ref4, 1),
|
613
|
+
k = _ref5[0];
|
609
614
|
|
610
615
|
return k !== name;
|
611
616
|
}));
|
@@ -726,7 +731,8 @@ var ProTable = function ProTable(props) {
|
|
726
731
|
}, {
|
727
732
|
// 使用 request 方法代替 fetch
|
728
733
|
requestMethod: function requestMethod(params) {
|
729
|
-
|
734
|
+
// 支持使用 requestConfig 自定义请求配置
|
735
|
+
return (0, _utils.request)(_objectSpread(_objectSpread({}, params), requestConfig));
|
730
736
|
},
|
731
737
|
manual: true,
|
732
738
|
onSuccess: function onSuccess(result) {
|
@@ -936,7 +942,8 @@ var ProTable = function ProTable(props) {
|
|
936
942
|
className: (0, _classnames.default)('teamix-pro-table-container', className, 'teamix-test-request'),
|
937
943
|
"data-teamix-test-request": "url=".concat(url, "&formatResult=").concat(!!formatResult),
|
938
944
|
"data-teamix-test-params": (0, _utils.getTestRequestParams)(propsParams),
|
939
|
-
"data-teamix-test-data": (0, _utils.getTestRequestData)(propsColumns)
|
945
|
+
"data-teamix-test-data": (0, _utils.getTestRequestData)(propsColumns),
|
946
|
+
"data-teamix-spm": dataTeamixSpm
|
940
947
|
}, /*#__PURE__*/_react.default.createElement(_Layout.default, {
|
941
948
|
header: header,
|
942
949
|
mainAction: mainAction,
|
@@ -948,8 +955,10 @@ var ProTable = function ProTable(props) {
|
|
948
955
|
afterDataFilter: afterDataFilter,
|
949
956
|
dataFilterFormRef: isFullScreen ? fullscreenDataFilterFormRef : normalDataFilterFormRef,
|
950
957
|
rowSelection: rowSelection,
|
951
|
-
filterColumnType: filterColumnType
|
952
|
-
|
958
|
+
filterColumnType: filterColumnType,
|
959
|
+
fullScreenState: isFullScreen,
|
960
|
+
dataTeamixSpm: dataTeamixSpm
|
961
|
+
}), /*#__PURE__*/_react.default.createElement(_components.Table.StickyLock, _extends({
|
953
962
|
hasBorder: false,
|
954
963
|
dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
|
955
964
|
columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context),
|
@@ -967,20 +976,21 @@ var ProTable = function ProTable(props) {
|
|
967
976
|
emptyContent: /*#__PURE__*/_react.default.createElement(_EmptyContent.default, null),
|
968
977
|
sortIcons: (0, _getTableSortIcons.default)(),
|
969
978
|
fixedHeader: fullscreenState || fixedTableBody,
|
970
|
-
maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)")
|
979
|
+
maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)") // 过滤出可以传到 Table 的 Props
|
980
|
+
|
971
981
|
}, (0, _utils.pickProps)((0, _getTableProps.default)(), otherProps))));
|
972
982
|
} else {
|
973
983
|
// 不传 columns 直接返回原始 Table
|
974
|
-
return /*#__PURE__*/_react.default.createElement(_components.Table,
|
984
|
+
return /*#__PURE__*/_react.default.createElement(_components.Table, _extends({
|
975
985
|
className: cls()
|
976
986
|
}, (0, _utils.pickProps)((0, _getTableProps.default)(), otherProps)));
|
977
987
|
}
|
978
988
|
};
|
979
989
|
|
980
990
|
var renderFooterAction = function renderFooterAction() {
|
981
|
-
var
|
991
|
+
var _actions;
|
982
992
|
|
983
|
-
if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (
|
993
|
+
if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_actions = footerAction.actions) === null || _actions === void 0 ? void 0 : _actions.length) >= 0) {
|
984
994
|
// 默认 context
|
985
995
|
var defaultContext = {
|
986
996
|
action: actionRef.current,
|
@@ -999,7 +1009,7 @@ var ProTable = function ProTable(props) {
|
|
999
1009
|
|
1000
1010
|
return /*#__PURE__*/_react.default.createElement("div", {
|
1001
1011
|
className: cls('footer-action')
|
1002
|
-
}, /*#__PURE__*/_react.default.createElement(
|
1012
|
+
}, /*#__PURE__*/_react.default.createElement(_actions2.ProActionGroup, _extends({}, targetFooterActions, {
|
1003
1013
|
context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context)
|
1004
1014
|
})));
|
1005
1015
|
} else return footerAction;
|
@@ -1046,7 +1056,7 @@ var ProTable = function ProTable(props) {
|
|
1046
1056
|
} else {
|
1047
1057
|
return /*#__PURE__*/_react.default.createElement("div", {
|
1048
1058
|
className: cls('footer-left-wrapper')
|
1049
|
-
}, rowSelection.mode !== 'single' && /*#__PURE__*/_react.default.createElement(_components.Checkbox,
|
1059
|
+
}, rowSelection.mode !== 'single' && /*#__PURE__*/_react.default.createElement(_components.Checkbox, _extends({
|
1050
1060
|
className: cls("footer-checkbox-".concat(size))
|
1051
1061
|
}, getCheckAllProps())), footerAction && renderFooterAction(), /*#__PURE__*/_react.default.createElement("span", {
|
1052
1062
|
className: cls('selected-msg')
|
@@ -1075,15 +1085,15 @@ var ProTable = function ProTable(props) {
|
|
1075
1085
|
})
|
1076
1086
|
}, renderRowSelection(), /*#__PURE__*/_react.default.createElement("div", {
|
1077
1087
|
className: cls('footer-right-wrapper')
|
1078
|
-
}, 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,
|
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, _extends({
|
1079
1089
|
className: cls('pagination'),
|
1080
1090
|
onChange: function onChange(number) {
|
1081
1091
|
return onChangePagination(number);
|
1082
1092
|
},
|
1083
1093
|
total: total,
|
1084
|
-
responsivePaginationType: responsivePaginationType
|
1085
|
-
// shape="arrow-only"
|
1094
|
+
responsivePaginationType: responsivePaginationType // shape="arrow-only"
|
1086
1095
|
// pageSizePosition="end"
|
1096
|
+
,
|
1087
1097
|
totalRender: function totalRender(total) {
|
1088
1098
|
return (0, _utils.getMessage)('total', {
|
1089
1099
|
total: new Intl.NumberFormat().format(total)
|
package/lib/table/typing.js
CHANGED
@@ -43,6 +43,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
43
43
|
|
44
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
45
45
|
|
46
|
+
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); }
|
47
|
+
|
46
48
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
47
49
|
|
48
50
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
@@ -66,22 +68,24 @@ var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
66
68
|
var selectedItem = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : _actionRef$current$ge2.call(_actionRef$current).filterRules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
|
67
69
|
|
68
70
|
if (Object.keys(selectedItem).length > 0) {
|
69
|
-
var _selectedItem
|
71
|
+
var _selectedItem;
|
70
72
|
|
71
|
-
if ((_selectedItem
|
72
|
-
var _targetFilters$find;
|
73
|
+
if ((_selectedItem = selectedItem[dataIndex]) === null || _selectedItem === void 0 ? void 0 : _selectedItem.params) {
|
74
|
+
var _ref, _targetFilters$find;
|
73
75
|
|
74
76
|
// 找到对应的 label
|
75
|
-
var targetFilters = filters !== null &&
|
77
|
+
var targetFilters = (_ref = filters) !== null && _ref !== void 0 ? _ref : [];
|
76
78
|
|
77
79
|
if (filters === true) {
|
78
|
-
|
80
|
+
var _ref2;
|
81
|
+
|
82
|
+
targetFilters = (_ref2 = dataSource) !== null && _ref2 !== void 0 ? _ref2 : [];
|
79
83
|
}
|
80
84
|
|
81
85
|
var label = (_targetFilters$find = targetFilters.find(function (item) {
|
82
|
-
var
|
86
|
+
var _selectedItem2;
|
83
87
|
|
84
|
-
return item.value === ((
|
88
|
+
return item.value === ((_selectedItem2 = selectedItem[dataIndex]) === null || _selectedItem2 === void 0 ? void 0 : _selectedItem2.params);
|
85
89
|
})) === null || _targetFilters$find === void 0 ? void 0 : _targetFilters$find.label;
|
86
90
|
var value = "".concat(item.title, " (").concat(label, ")");
|
87
91
|
return /*#__PURE__*/_react.default.createElement(_field.default, {
|
@@ -128,9 +132,7 @@ var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
128
132
|
|
129
133
|
exports.renderColumnsTitle = renderColumnsTitle;
|
130
134
|
|
131
|
-
var renderCell = function renderCell(value, item, index, record, actionRef,
|
132
|
-
/** 接收外部比如 dialog-table 传过来的 context,用于弹窗关闭等 */
|
133
|
-
context) {
|
135
|
+
var renderCell = function renderCell(value, item, index, record, actionRef, context) {
|
134
136
|
var _actionSchema$actions;
|
135
137
|
|
136
138
|
var _item$valueType = item.valueType,
|
@@ -198,9 +200,9 @@ context) {
|
|
198
200
|
action: actionRef.current
|
199
201
|
}, context);
|
200
202
|
|
201
|
-
return /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup,
|
203
|
+
return /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, _extends({
|
202
204
|
type: "text"
|
203
|
-
}, actionSchema
|
205
|
+
}, actionSchema, {
|
204
206
|
context: _objectSpread(_objectSpread({}, defaultContext), actionSchema.context)
|
205
207
|
}));
|
206
208
|
} // dataSource可传函数
|
@@ -214,10 +216,10 @@ context) {
|
|
214
216
|
var _item$dataSource2;
|
215
217
|
|
216
218
|
newDataSource = ((_item$dataSource2 = item.dataSource) !== null && _item$dataSource2 !== void 0 ? _item$dataSource2 : []).map(function (item) {
|
217
|
-
return Object.fromEntries(Object.entries(item).map(function (
|
218
|
-
var
|
219
|
-
k =
|
220
|
-
v =
|
219
|
+
return Object.fromEntries(Object.entries(item).map(function (_ref3) {
|
220
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
221
|
+
k = _ref4[0],
|
222
|
+
v = _ref4[1];
|
221
223
|
|
222
224
|
return [k, (0, _utils.getTargetValue)(v, _objectSpread(_objectSpread({}, record), {}, {
|
223
225
|
record: record,
|
@@ -229,7 +231,7 @@ context) {
|
|
229
231
|
} // 渲染 ProField
|
230
232
|
|
231
233
|
|
232
|
-
return /*#__PURE__*/_react.default.createElement(_field.default,
|
234
|
+
return /*#__PURE__*/_react.default.createElement(_field.default, _extends({
|
233
235
|
type: valueType || 'text',
|
234
236
|
value: value,
|
235
237
|
render: newRender,
|
@@ -256,10 +258,10 @@ var processRenderFunction = function processRenderFunction() {
|
|
256
258
|
var record = arguments.length > 3 ? arguments[3] : undefined;
|
257
259
|
// 当 ProField render 类型为 function 时。需要表格预先处理以塞入 record
|
258
260
|
var external = ['linkOnClick', 'link', 'value', 'renderEdit', 'descriptionRenderEdit', 'editPopConfirmProps', 'descriptionEditPopConfirmProps', 'editOnClick', 'descriptionEditOnClick', 'extra', 'prefixExtra'];
|
259
|
-
return Object.fromEntries(Object.entries(render).map(function (
|
260
|
-
var
|
261
|
-
k =
|
262
|
-
v =
|
261
|
+
return Object.fromEntries(Object.entries(render).map(function (_ref5) {
|
262
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
263
|
+
k = _ref6[0],
|
264
|
+
v = _ref6[1];
|
263
265
|
|
264
266
|
if (typeof v === 'function') {
|
265
267
|
var _v;
|
@@ -295,10 +297,10 @@ var processBuriedPoint = function processBuriedPoint() {
|
|
295
297
|
var index = arguments.length > 3 ? arguments[3] : undefined;
|
296
298
|
return Object.fromEntries([// 默认 ellipsis、descriptionEllipsis 为 true
|
297
299
|
// emptyText 默认为 '-'
|
298
|
-
['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (
|
299
|
-
var
|
300
|
-
k =
|
301
|
-
v =
|
300
|
+
['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (_ref7) {
|
301
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
302
|
+
k = _ref8[0],
|
303
|
+
v = _ref8[1];
|
302
304
|
|
303
305
|
return [k, (0, _utils.getTargetValue)(v, _objectSpread(_objectSpread({}, record), {}, {
|
304
306
|
record: record,
|
@@ -27,6 +27,8 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
27
27
|
|
28
28
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
29
29
|
|
30
|
+
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); }
|
31
|
+
|
30
32
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
31
33
|
|
32
34
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -141,7 +143,7 @@ var renderCell = function renderCell(value, item, index, record) {
|
|
141
143
|
} // 渲染 ProField
|
142
144
|
|
143
145
|
|
144
|
-
return /*#__PURE__*/_react.default.createElement(_field.default,
|
146
|
+
return /*#__PURE__*/_react.default.createElement(_field.default, _extends({
|
145
147
|
type: valueType || 'text',
|
146
148
|
value: value,
|
147
149
|
render: newRender,
|
@@ -23,11 +23,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
23
23
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
25
|
|
26
|
-
function
|
27
|
-
|
28
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
29
|
-
|
30
|
-
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; }
|
26
|
+
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); }
|
31
27
|
|
32
28
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
33
29
|
|
@@ -46,17 +42,17 @@ var ListPage = function ListPage(props) {
|
|
46
42
|
var contentProps = (pageProps === null || pageProps === void 0 ? void 0 : pageProps.content) || {
|
47
43
|
columns: []
|
48
44
|
};
|
49
|
-
return /*#__PURE__*/_react.default.createElement(_pageContainer.default,
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_pageContainer.default, _extends({
|
50
46
|
header: /*#__PURE__*/_react.default.createElement(_pageContainer.EditableContainer, {
|
51
47
|
id: "header",
|
52
48
|
component: "PageHeader"
|
53
|
-
}, /*#__PURE__*/_react.default.createElement(_pageHeader.default,
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_pageHeader.default, _extends({
|
54
50
|
loading: loading
|
55
51
|
}, headerProps))),
|
56
52
|
content: /*#__PURE__*/_react.default.createElement(_pageContainer.EditableContainer, {
|
57
53
|
id: "content",
|
58
54
|
component: "ProTable"
|
59
|
-
}, /*#__PURE__*/_react.default.createElement(_table.default,
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_table.default, _extends({
|
60
56
|
loading: loading
|
61
57
|
}, contentProps)))
|
62
58
|
}, others));
|
@@ -27,11 +27,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
27
27
|
|
28
28
|
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; }
|
29
29
|
|
30
|
-
function
|
31
|
-
|
32
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
33
|
-
|
34
|
-
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; }
|
30
|
+
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); }
|
35
31
|
|
36
32
|
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); }
|
37
33
|
|
@@ -293,7 +289,7 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
293
289
|
}))
|
294
290
|
}, !_comment && renderStateNode()));
|
295
291
|
}, [_shape, icon, status, dotRender]);
|
296
|
-
return /*#__PURE__*/_react.default.createElement(TimelineItem,
|
292
|
+
return /*#__PURE__*/_react.default.createElement(TimelineItem, _extends({
|
297
293
|
title: renderTitle(),
|
298
294
|
dot: renderNode(),
|
299
295
|
timeLeft: renderTimeLeft(),
|