@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,15 +1,27 @@
|
|
1
|
-
function
|
1
|
+
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; }
|
2
2
|
|
3
|
-
function
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
|
5
|
-
function
|
5
|
+
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."); }
|
6
|
+
|
7
|
+
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); }
|
8
|
+
|
9
|
+
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; }
|
10
|
+
|
11
|
+
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; }
|
12
|
+
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
6
14
|
|
7
15
|
import { usePrefixCls } from '@teamix/utils';
|
8
|
-
import React from 'react';
|
16
|
+
import React, { useEffect, useRef } from 'react';
|
17
|
+
import { Button, Balloon } from '@alicloudfe/components';
|
18
|
+
import TeamixIcon from '@teamix/icon';
|
9
19
|
import FullScreenIcon from './FullScreenIcon';
|
10
20
|
import FilterColumnIcon from './FilterColumnIcon';
|
11
21
|
import DensityIcon from './DensityIcon';
|
12
22
|
import RefreshIcon from './RefreshIcon';
|
23
|
+
import { useSize, useSafeState } from '@teamix/hooks';
|
24
|
+
import debounce from 'lodash.debounce';
|
13
25
|
import './index.scss';
|
14
26
|
var cls = usePrefixCls('teamix-pro-table-toolbar');
|
15
27
|
var presetToolBarMap = {
|
@@ -38,7 +50,46 @@ var presetToolBar = [{
|
|
38
50
|
}];
|
39
51
|
|
40
52
|
var ToolBar = function ToolBar(props) {
|
41
|
-
var
|
53
|
+
var _toolBarRef$current, _toolBarRef$current$p, _toolBarRef$current$p2;
|
54
|
+
|
55
|
+
var toolBar = props.toolBar,
|
56
|
+
fullScreenState = props.fullScreenState;
|
57
|
+
var toolBarRef = useRef(null); // const toolBarSize = useSize(toolBarRef);
|
58
|
+
// 用于获取内容宽度
|
59
|
+
|
60
|
+
var toolBarContentRef = useRef(null); // '.teamix-pro-form-query-filter-layout-inline' 元素
|
61
|
+
|
62
|
+
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; // 监听它的尺寸变化
|
63
|
+
|
64
|
+
var layoutInlineSize = useSize(layoutInlineDom); // '.teamix-pro-form-query-filter-layout-left' 元素
|
65
|
+
|
66
|
+
var layoutLeftDom = layoutInlineDom === null || layoutInlineDom === void 0 ? void 0 : layoutInlineDom.firstElementChild;
|
67
|
+
var leftWidth = layoutLeftDom === null || layoutLeftDom === void 0 ? void 0 : layoutLeftDom.clientWidth; // 展示形式,是否平铺
|
68
|
+
|
69
|
+
var _useSafeState = useSafeState(),
|
70
|
+
_useSafeState2 = _slicedToArray(_useSafeState, 2),
|
71
|
+
flat = _useSafeState2[0],
|
72
|
+
setFlat = _useSafeState2[1]; // 监听高度,> 32px则切换形态
|
73
|
+
|
74
|
+
|
75
|
+
useEffect(debounce(function () {
|
76
|
+
// console.log(
|
77
|
+
// layoutInlineSize?.width,
|
78
|
+
// leftWidth,
|
79
|
+
// toolBarContentRef.current?.clientWidth,
|
80
|
+
// );
|
81
|
+
if ((layoutInlineSize === null || layoutInlineSize === void 0 ? void 0 : layoutInlineSize.width) && leftWidth && toolBarContentRef.current) {
|
82
|
+
var _toolBarContentRef$cu;
|
83
|
+
|
84
|
+
var width = layoutInlineSize.width; // console.log('layoutInlineSize-width', width);
|
85
|
+
|
86
|
+
if (width - leftWidth <= ((_toolBarContentRef$cu = toolBarContentRef.current) === null || _toolBarContentRef$cu === void 0 ? void 0 : _toolBarContentRef$cu.clientWidth) + 8) {
|
87
|
+
setFlat(false);
|
88
|
+
} else {
|
89
|
+
setFlat(true);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}, 300));
|
42
93
|
var toolBarList = toolBar !== false ? presetToolBar : [];
|
43
94
|
|
44
95
|
if (Array.isArray(toolBar)) {
|
@@ -59,21 +110,49 @@ var ToolBar = function ToolBar(props) {
|
|
59
110
|
});
|
60
111
|
}
|
61
112
|
|
113
|
+
var renderFlatShape = function renderFlatShape() {
|
114
|
+
return /*#__PURE__*/React.createElement("div", {
|
115
|
+
className: cls('content')
|
116
|
+
}, toolBarList.map(function (_ref) {
|
117
|
+
var type = _ref.type,
|
118
|
+
name = _ref.name,
|
119
|
+
Component = _ref.component;
|
120
|
+
return /*#__PURE__*/React.createElement("span", {
|
121
|
+
className: cls('item', _defineProperty({}, name, true)),
|
122
|
+
key: name
|
123
|
+
}, type === 'preset' && /*#__PURE__*/React.createElement(Component, props), type === 'custom' && /*#__PURE__*/React.createElement("div", {
|
124
|
+
className: cls({
|
125
|
+
custom: true
|
126
|
+
})
|
127
|
+
}, Component));
|
128
|
+
}));
|
129
|
+
};
|
130
|
+
|
131
|
+
var renderUnFlatShape = function renderUnFlatShape() {
|
132
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Balloon.Tooltip, {
|
133
|
+
triggerType: ['click'],
|
134
|
+
popupProps: {
|
135
|
+
cache: true
|
136
|
+
},
|
137
|
+
style: {
|
138
|
+
padding: 8
|
139
|
+
},
|
140
|
+
trigger: /*#__PURE__*/React.createElement(Button, null, /*#__PURE__*/React.createElement(TeamixIcon, {
|
141
|
+
type: "more-line"
|
142
|
+
})),
|
143
|
+
align: "tr"
|
144
|
+
}, renderFlatShape()));
|
145
|
+
};
|
146
|
+
|
62
147
|
return /*#__PURE__*/React.createElement("div", {
|
63
|
-
className: cls(
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
}, type === 'preset' && /*#__PURE__*/React.createElement(Component, _objectSpread({}, props)), type === 'custom' && /*#__PURE__*/React.createElement("div", {
|
72
|
-
className: cls({
|
73
|
-
custom: true
|
74
|
-
})
|
75
|
-
}, Component));
|
76
|
-
}));
|
148
|
+
className: cls('', {
|
149
|
+
flat: flat
|
150
|
+
}),
|
151
|
+
ref: toolBarRef
|
152
|
+
}, !flat && !fullScreenState ? renderUnFlatShape() : renderFlatShape(), /*#__PURE__*/React.createElement("div", {
|
153
|
+
className: cls('shadow'),
|
154
|
+
ref: toolBarContentRef
|
155
|
+
}, renderFlatShape()));
|
77
156
|
};
|
78
157
|
|
79
158
|
export 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/es/table/index.js
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
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"];
|
1
|
+
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"];
|
2
|
+
|
3
|
+
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); }
|
2
4
|
|
3
5
|
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
6
|
|
@@ -142,6 +144,7 @@ var ProTable = function ProTable(props) {
|
|
142
144
|
return params;
|
143
145
|
} : _props$formatParams,
|
144
146
|
formatResult = props.formatResult,
|
147
|
+
requestConfig = props.requestConfig,
|
145
148
|
_props$requestWhenMou = props.requestWhenMount,
|
146
149
|
requestWhenMount = _props$requestWhenMou === void 0 ? true : _props$requestWhenMou,
|
147
150
|
_props$showPagination = props.showPagination,
|
@@ -176,6 +179,7 @@ var ProTable = function ProTable(props) {
|
|
176
179
|
_props$fixedTableBody = props.fixedTableBody,
|
177
180
|
fixedTableBody = _props$fixedTableBody === void 0 ? false : _props$fixedTableBody,
|
178
181
|
isTree = props.isTree,
|
182
|
+
dataTeamixSpm = props['data-teamix-spm'],
|
179
183
|
otherProps = _objectWithoutProperties(props, _excluded);
|
180
184
|
|
181
185
|
var targetPageKey = pageKey || globalPageKey;
|
@@ -471,13 +475,14 @@ var ProTable = function ProTable(props) {
|
|
471
475
|
}, [rowSelectionHook]); // 获取 table 左下角 checkbox 属性
|
472
476
|
|
473
477
|
function getCheckAllProps() {
|
474
|
-
var
|
475
|
-
|
476
|
-
|
477
|
-
onSelectAll =
|
478
|
-
|
479
|
-
selectedRowKeys =
|
480
|
-
|
478
|
+
var _ref = rowSelection,
|
479
|
+
_ref$onChange = _ref.onChange,
|
480
|
+
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
481
|
+
_ref$onSelectAll = _ref.onSelectAll,
|
482
|
+
onSelectAll = _ref$onSelectAll === void 0 ? function () {} : _ref$onSelectAll,
|
483
|
+
_ref$selectedRowKeys = _ref.selectedRowKeys,
|
484
|
+
selectedRowKeys = _ref$selectedRowKeys === void 0 ? [] : _ref$selectedRowKeys,
|
485
|
+
getProps = _ref.getProps;
|
481
486
|
|
482
487
|
var dataSource = data;
|
483
488
|
var allRowKeys = dataSource.filter(function (d, i) {
|
@@ -554,14 +559,14 @@ var ProTable = function ProTable(props) {
|
|
554
559
|
actionRefCallback[state][name] = fun;
|
555
560
|
},
|
556
561
|
off: function off(name) {
|
557
|
-
actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (
|
558
|
-
var
|
559
|
-
k =
|
560
|
-
v =
|
562
|
+
actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref2) {
|
563
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
564
|
+
k = _ref3[0],
|
565
|
+
v = _ref3[1];
|
561
566
|
|
562
|
-
var filterV = Object.fromEntries(Object.entries(v).filter(function (
|
563
|
-
var
|
564
|
-
k =
|
567
|
+
var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref4) {
|
568
|
+
var _ref5 = _slicedToArray(_ref4, 1),
|
569
|
+
k = _ref5[0];
|
565
570
|
|
566
571
|
return k !== name;
|
567
572
|
}));
|
@@ -682,7 +687,8 @@ var ProTable = function ProTable(props) {
|
|
682
687
|
}, {
|
683
688
|
// 使用 request 方法代替 fetch
|
684
689
|
requestMethod: function requestMethod(params) {
|
685
|
-
|
690
|
+
// 支持使用 requestConfig 自定义请求配置
|
691
|
+
return utilResquest(_objectSpread(_objectSpread({}, params), requestConfig));
|
686
692
|
},
|
687
693
|
manual: true,
|
688
694
|
onSuccess: function onSuccess(result) {
|
@@ -892,7 +898,8 @@ var ProTable = function ProTable(props) {
|
|
892
898
|
className: classNames('teamix-pro-table-container', className, 'teamix-test-request'),
|
893
899
|
"data-teamix-test-request": "url=".concat(url, "&formatResult=").concat(!!formatResult),
|
894
900
|
"data-teamix-test-params": getTestRequestParams(propsParams),
|
895
|
-
"data-teamix-test-data": getTestRequestData(propsColumns)
|
901
|
+
"data-teamix-test-data": getTestRequestData(propsColumns),
|
902
|
+
"data-teamix-spm": dataTeamixSpm
|
896
903
|
}, /*#__PURE__*/React.createElement(Layout, {
|
897
904
|
header: header,
|
898
905
|
mainAction: mainAction,
|
@@ -904,8 +911,10 @@ var ProTable = function ProTable(props) {
|
|
904
911
|
afterDataFilter: afterDataFilter,
|
905
912
|
dataFilterFormRef: isFullScreen ? fullscreenDataFilterFormRef : normalDataFilterFormRef,
|
906
913
|
rowSelection: rowSelection,
|
907
|
-
filterColumnType: filterColumnType
|
908
|
-
|
914
|
+
filterColumnType: filterColumnType,
|
915
|
+
fullScreenState: isFullScreen,
|
916
|
+
dataTeamixSpm: dataTeamixSpm
|
917
|
+
}), /*#__PURE__*/React.createElement(Table.StickyLock, _extends({
|
909
918
|
hasBorder: false,
|
910
919
|
dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
|
911
920
|
columns: genProColumnToColumn(filteredColumns, showSkeleton, actionRef, context),
|
@@ -923,20 +932,21 @@ var ProTable = function ProTable(props) {
|
|
923
932
|
emptyContent: /*#__PURE__*/React.createElement(EmptyContent, null),
|
924
933
|
sortIcons: getTableSortIcons(),
|
925
934
|
fixedHeader: fullscreenState || fixedTableBody,
|
926
|
-
maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)")
|
935
|
+
maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)") // 过滤出可以传到 Table 的 Props
|
936
|
+
|
927
937
|
}, pickProps(getTableProps(), otherProps))));
|
928
938
|
} else {
|
929
939
|
// 不传 columns 直接返回原始 Table
|
930
|
-
return /*#__PURE__*/React.createElement(Table,
|
940
|
+
return /*#__PURE__*/React.createElement(Table, _extends({
|
931
941
|
className: cls()
|
932
942
|
}, pickProps(getTableProps(), otherProps)));
|
933
943
|
}
|
934
944
|
};
|
935
945
|
|
936
946
|
var renderFooterAction = function renderFooterAction() {
|
937
|
-
var
|
947
|
+
var _actions;
|
938
948
|
|
939
|
-
if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (
|
949
|
+
if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_actions = footerAction.actions) === null || _actions === void 0 ? void 0 : _actions.length) >= 0) {
|
940
950
|
// 默认 context
|
941
951
|
var defaultContext = {
|
942
952
|
action: actionRef.current,
|
@@ -955,7 +965,7 @@ var ProTable = function ProTable(props) {
|
|
955
965
|
|
956
966
|
return /*#__PURE__*/React.createElement("div", {
|
957
967
|
className: cls('footer-action')
|
958
|
-
}, /*#__PURE__*/React.createElement(ProActionGroup,
|
968
|
+
}, /*#__PURE__*/React.createElement(ProActionGroup, _extends({}, targetFooterActions, {
|
959
969
|
context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context)
|
960
970
|
})));
|
961
971
|
} else return footerAction;
|
@@ -1002,7 +1012,7 @@ var ProTable = function ProTable(props) {
|
|
1002
1012
|
} else {
|
1003
1013
|
return /*#__PURE__*/React.createElement("div", {
|
1004
1014
|
className: cls('footer-left-wrapper')
|
1005
|
-
}, rowSelection.mode !== 'single' && /*#__PURE__*/React.createElement(Checkbox,
|
1015
|
+
}, rowSelection.mode !== 'single' && /*#__PURE__*/React.createElement(Checkbox, _extends({
|
1006
1016
|
className: cls("footer-checkbox-".concat(size))
|
1007
1017
|
}, getCheckAllProps())), footerAction && renderFooterAction(), /*#__PURE__*/React.createElement("span", {
|
1008
1018
|
className: cls('selected-msg')
|
@@ -1031,15 +1041,15 @@ var ProTable = function ProTable(props) {
|
|
1031
1041
|
})
|
1032
1042
|
}, renderRowSelection(), /*#__PURE__*/React.createElement("div", {
|
1033
1043
|
className: cls('footer-right-wrapper')
|
1034
|
-
}, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : /*#__PURE__*/React.createElement(React.Fragment, null, data.length > 0 && /*#__PURE__*/React.createElement(Pagination,
|
1044
|
+
}, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : /*#__PURE__*/React.createElement(React.Fragment, null, data.length > 0 && /*#__PURE__*/React.createElement(Pagination, _extends({
|
1035
1045
|
className: cls('pagination'),
|
1036
1046
|
onChange: function onChange(number) {
|
1037
1047
|
return onChangePagination(number);
|
1038
1048
|
},
|
1039
1049
|
total: total,
|
1040
|
-
responsivePaginationType: responsivePaginationType
|
1041
|
-
// shape="arrow-only"
|
1050
|
+
responsivePaginationType: responsivePaginationType // shape="arrow-only"
|
1042
1051
|
// pageSizePosition="end"
|
1052
|
+
,
|
1043
1053
|
totalRender: function totalRender(total) {
|
1044
1054
|
return getMessage('total', {
|
1045
1055
|
total: new Intl.NumberFormat().format(total)
|
@@ -18,6 +18,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
18
18
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
20
20
|
|
21
|
+
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); }
|
22
|
+
|
21
23
|
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; }
|
22
24
|
|
23
25
|
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; }
|
@@ -50,22 +52,24 @@ export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
50
52
|
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 : {};
|
51
53
|
|
52
54
|
if (Object.keys(selectedItem).length > 0) {
|
53
|
-
var _selectedItem
|
55
|
+
var _selectedItem;
|
54
56
|
|
55
|
-
if ((_selectedItem
|
56
|
-
var _targetFilters$find;
|
57
|
+
if ((_selectedItem = selectedItem[dataIndex]) === null || _selectedItem === void 0 ? void 0 : _selectedItem.params) {
|
58
|
+
var _ref, _targetFilters$find;
|
57
59
|
|
58
60
|
// 找到对应的 label
|
59
|
-
var targetFilters = filters !== null &&
|
61
|
+
var targetFilters = (_ref = filters) !== null && _ref !== void 0 ? _ref : [];
|
60
62
|
|
61
63
|
if (filters === true) {
|
62
|
-
|
64
|
+
var _ref2;
|
65
|
+
|
66
|
+
targetFilters = (_ref2 = dataSource) !== null && _ref2 !== void 0 ? _ref2 : [];
|
63
67
|
}
|
64
68
|
|
65
69
|
var label = (_targetFilters$find = targetFilters.find(function (item) {
|
66
|
-
var
|
70
|
+
var _selectedItem2;
|
67
71
|
|
68
|
-
return item.value === ((
|
72
|
+
return item.value === ((_selectedItem2 = selectedItem[dataIndex]) === null || _selectedItem2 === void 0 ? void 0 : _selectedItem2.params);
|
69
73
|
})) === null || _targetFilters$find === void 0 ? void 0 : _targetFilters$find.label;
|
70
74
|
var value = "".concat(item.title, " (").concat(label, ")");
|
71
75
|
return /*#__PURE__*/React.createElement(ProField, {
|
@@ -109,9 +113,7 @@ export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
109
113
|
* 负责单元格的具体渲染
|
110
114
|
*/
|
111
115
|
|
112
|
-
export var renderCell = function renderCell(value, item, index, record, actionRef,
|
113
|
-
/** 接收外部比如 dialog-table 传过来的 context,用于弹窗关闭等 */
|
114
|
-
context) {
|
116
|
+
export var renderCell = function renderCell(value, item, index, record, actionRef, context) {
|
115
117
|
var _actionSchema$actions;
|
116
118
|
|
117
119
|
var _item$valueType = item.valueType,
|
@@ -179,9 +181,9 @@ context) {
|
|
179
181
|
action: actionRef.current
|
180
182
|
}, context);
|
181
183
|
|
182
|
-
return /*#__PURE__*/React.createElement(ProActionGroup,
|
184
|
+
return /*#__PURE__*/React.createElement(ProActionGroup, _extends({
|
183
185
|
type: "text"
|
184
|
-
}, actionSchema
|
186
|
+
}, actionSchema, {
|
185
187
|
context: _objectSpread(_objectSpread({}, defaultContext), actionSchema.context)
|
186
188
|
}));
|
187
189
|
} // dataSource可传函数
|
@@ -195,10 +197,10 @@ context) {
|
|
195
197
|
var _item$dataSource2;
|
196
198
|
|
197
199
|
newDataSource = ((_item$dataSource2 = item.dataSource) !== null && _item$dataSource2 !== void 0 ? _item$dataSource2 : []).map(function (item) {
|
198
|
-
return Object.fromEntries(Object.entries(item).map(function (
|
199
|
-
var
|
200
|
-
k =
|
201
|
-
v =
|
200
|
+
return Object.fromEntries(Object.entries(item).map(function (_ref3) {
|
201
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
202
|
+
k = _ref4[0],
|
203
|
+
v = _ref4[1];
|
202
204
|
|
203
205
|
return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
|
204
206
|
record: record,
|
@@ -210,7 +212,7 @@ context) {
|
|
210
212
|
} // 渲染 ProField
|
211
213
|
|
212
214
|
|
213
|
-
return /*#__PURE__*/React.createElement(ProField,
|
215
|
+
return /*#__PURE__*/React.createElement(ProField, _extends({
|
214
216
|
type: valueType || 'text',
|
215
217
|
value: value,
|
216
218
|
render: newRender,
|
@@ -234,10 +236,10 @@ var processRenderFunction = function processRenderFunction() {
|
|
234
236
|
var record = arguments.length > 3 ? arguments[3] : undefined;
|
235
237
|
// 当 ProField render 类型为 function 时。需要表格预先处理以塞入 record
|
236
238
|
var external = ['linkOnClick', 'link', 'value', 'renderEdit', 'descriptionRenderEdit', 'editPopConfirmProps', 'descriptionEditPopConfirmProps', 'editOnClick', 'descriptionEditOnClick', 'extra', 'prefixExtra'];
|
237
|
-
return Object.fromEntries(Object.entries(render).map(function (
|
238
|
-
var
|
239
|
-
k =
|
240
|
-
v =
|
239
|
+
return Object.fromEntries(Object.entries(render).map(function (_ref5) {
|
240
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
241
|
+
k = _ref6[0],
|
242
|
+
v = _ref6[1];
|
241
243
|
|
242
244
|
if (typeof v === 'function') {
|
243
245
|
var _v;
|
@@ -273,10 +275,10 @@ var processBuriedPoint = function processBuriedPoint() {
|
|
273
275
|
var index = arguments.length > 3 ? arguments[3] : undefined;
|
274
276
|
return Object.fromEntries([// 默认 ellipsis、descriptionEllipsis 为 true
|
275
277
|
// emptyText 默认为 '-'
|
276
|
-
['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (
|
277
|
-
var
|
278
|
-
k =
|
279
|
-
v =
|
278
|
+
['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (_ref7) {
|
279
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
280
|
+
k = _ref8[0],
|
281
|
+
v = _ref8[1];
|
280
282
|
|
281
283
|
return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
|
282
284
|
record: record,
|
@@ -14,10 +14,10 @@ import React from 'react';
|
|
14
14
|
import { renderColumnsTitle, renderCell } from './columnRender';
|
15
15
|
import { ProSkeletonRaw as Skeleton } from '../../skeleton';
|
16
16
|
import { getLanguage } from '@teamix/utils';
|
17
|
+
|
17
18
|
/**
|
18
19
|
* ProColumn => Column
|
19
20
|
*/
|
20
|
-
|
21
21
|
export default function genProColumnToColumn(columns,
|
22
22
|
/** 是否渲染骨架屏 */
|
23
23
|
showSkeleton, actionRef) {
|
package/es/table/utils/index.js
CHANGED
@@ -16,8 +16,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
16
16
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
18
18
|
|
19
|
-
import cloneDeepLodash from 'lodash.clonedeep';
|
20
|
-
|
19
|
+
import cloneDeepLodash from 'lodash.clonedeep';
|
20
|
+
// 所有 ProTable 组件公用一套组件内事件转发机制
|
21
21
|
var tableCallback = {}; // 组件内对全局状态的更改
|
22
22
|
|
23
23
|
var getMutations = function getMutations(actionRef) {
|
@@ -6,6 +6,8 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
6
6
|
|
7
7
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
8
8
|
|
9
|
+
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); }
|
10
|
+
|
9
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
10
12
|
|
11
13
|
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."); }
|
@@ -30,10 +32,10 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
30
32
|
import React from 'react';
|
31
33
|
import { getTargetValue } from '@teamix/utils';
|
32
34
|
import ProField, { LabelIconTip } from '../../field';
|
35
|
+
|
33
36
|
/**
|
34
37
|
* 增加了 icon 的功能 render title
|
35
38
|
*/
|
36
|
-
|
37
39
|
export var renderColumnsTitle = function renderColumnsTitle(item) {
|
38
40
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelIconTip, {
|
39
41
|
label: item.title,
|
@@ -124,7 +126,7 @@ export var renderCell = function renderCell(value, item, index, record) {
|
|
124
126
|
} // 渲染 ProField
|
125
127
|
|
126
128
|
|
127
|
-
return /*#__PURE__*/React.createElement(ProField,
|
129
|
+
return /*#__PURE__*/React.createElement(ProField, _extends({
|
128
130
|
type: valueType || 'text',
|
129
131
|
value: value,
|
130
132
|
render: newRender,
|
@@ -11,11 +11,11 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
12
12
|
|
13
13
|
import { renderColumnsTitle, renderCell } from './pureColumnRender';
|
14
|
+
|
14
15
|
/**
|
15
16
|
* ProColumn => Column,去掉操作列,过滤器相关逻辑
|
16
17
|
* 用于非 ProTable 比如 selectTable
|
17
18
|
*/
|
18
|
-
|
19
19
|
export default function genProColumnToColumn(columns) {
|
20
20
|
return columns.map(function (columnProps) {
|
21
21
|
var filters = columnProps.filters,
|
@@ -1,10 +1,6 @@
|
|
1
1
|
var _excluded = ["loading", "pageProps"];
|
2
2
|
|
3
|
-
function
|
4
|
-
|
5
|
-
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; }
|
6
|
-
|
7
|
-
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; }
|
3
|
+
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); }
|
8
4
|
|
9
5
|
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; }
|
10
6
|
|
@@ -27,17 +23,17 @@ export var ListPage = function ListPage(props) {
|
|
27
23
|
var contentProps = (pageProps === null || pageProps === void 0 ? void 0 : pageProps.content) || {
|
28
24
|
columns: []
|
29
25
|
};
|
30
|
-
return /*#__PURE__*/React.createElement(PageContainer,
|
26
|
+
return /*#__PURE__*/React.createElement(PageContainer, _extends({
|
31
27
|
header: /*#__PURE__*/React.createElement(EditableContainer, {
|
32
28
|
id: "header",
|
33
29
|
component: "PageHeader"
|
34
|
-
}, /*#__PURE__*/React.createElement(PageHeader,
|
30
|
+
}, /*#__PURE__*/React.createElement(PageHeader, _extends({
|
35
31
|
loading: loading
|
36
32
|
}, headerProps))),
|
37
33
|
content: /*#__PURE__*/React.createElement(EditableContainer, {
|
38
34
|
id: "content",
|
39
35
|
component: "ProTable"
|
40
|
-
}, /*#__PURE__*/React.createElement(ProTable,
|
36
|
+
}, /*#__PURE__*/React.createElement(ProTable, _extends({
|
41
37
|
loading: loading
|
42
38
|
}, contentProps)))
|
43
39
|
}, others));
|
package/es/templates/index.js
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
var _excluded = ["_comment", "_shape", "status", "image", "icon", "title", "subTitle", "time", "timeLeft", "content", "animation", "discription", "tags", "collapsible", "defaultCollapsed", "collapsed", "onCollapse", "dotRender"];
|
2
2
|
|
3
|
-
function
|
4
|
-
|
5
|
-
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; }
|
6
|
-
|
7
|
-
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; }
|
3
|
+
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); }
|
8
4
|
|
9
5
|
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); }
|
10
6
|
|
@@ -273,7 +269,7 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
273
269
|
}))
|
274
270
|
}, !_comment && renderStateNode()));
|
275
271
|
}, [_shape, icon, status, dotRender]);
|
276
|
-
return /*#__PURE__*/React.createElement(TimelineItem,
|
272
|
+
return /*#__PURE__*/React.createElement(TimelineItem, _extends({
|
277
273
|
title: renderTitle(),
|
278
274
|
dot: renderNode(),
|
279
275
|
timeLeft: renderTimeLeft(),
|
package/es/timeline/index.js
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
var _excluded = ["items", "comment", "shape", "fold", "children"];
|
2
2
|
|
3
|
-
function
|
4
|
-
|
5
|
-
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; }
|
6
|
-
|
7
|
-
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; }
|
3
|
+
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); }
|
8
4
|
|
9
5
|
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; }
|
10
6
|
|
@@ -47,7 +43,7 @@ var ProTimeline = function ProTimeline(props) {
|
|
47
43
|
// 传递了 item 采用 item 渲染数组的方式
|
48
44
|
if (items) {
|
49
45
|
return items.map(function (item, index) {
|
50
|
-
return /*#__PURE__*/React.createElement(ProTimeLineItem,
|
46
|
+
return /*#__PURE__*/React.createElement(ProTimeLineItem, _extends({
|
51
47
|
key: index,
|
52
48
|
_shape: shape,
|
53
49
|
_comment: comment
|
@@ -60,7 +56,7 @@ var ProTimeline = function ProTimeline(props) {
|
|
60
56
|
|
61
57
|
|
62
58
|
var renderProTimeline = function renderProTimeline() {
|
63
|
-
return /*#__PURE__*/React.createElement(Timeline,
|
59
|
+
return /*#__PURE__*/React.createElement(Timeline, _extends({
|
64
60
|
fold: fold
|
65
61
|
}, others), renderItem());
|
66
62
|
};
|