@teamix/pro 1.5.1-aplha.0 → 1.5.1
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 +65730 -78948
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/base.d.ts +24 -0
- package/es/actions/confirm.d.ts +7 -0
- package/es/actions/danger-confirm.d.ts +7 -0
- package/es/actions/danger-pop-confirm.d.ts +5 -0
- package/es/actions/dialog-component.d.ts +10 -0
- package/es/actions/dialog-component.js +7 -1
- package/es/actions/dialog-form.d.ts +29 -0
- package/es/actions/dialog-form.js +3 -5
- package/es/actions/dialog-info.d.ts +9 -0
- package/es/actions/dialog-table.d.ts +9 -0
- package/es/actions/dialog.d.ts +40 -0
- package/es/actions/dialog.js +1 -1
- package/es/actions/drawer-form.d.ts +6 -0
- package/es/actions/drawer-info.d.ts +6 -0
- package/es/actions/drawer-table.d.ts +6 -0
- package/es/actions/drawer.d.ts +6 -0
- package/es/actions/error.d.ts +7 -0
- package/es/actions/index.d.ts +111 -0
- package/es/actions/index.js +23 -32
- package/es/actions/index.scss +5 -0
- package/es/actions/link.d.ts +8 -0
- package/es/actions/notice.d.ts +7 -0
- package/es/actions/pop-confirm.d.ts +9 -0
- package/es/actions/request.d.ts +9 -0
- package/es/actions/request.js +2 -2
- package/es/actions/utils.d.ts +1 -0
- package/es/card/card-container.d.ts +18 -0
- package/es/card/card-container.js +9 -9
- package/es/card/divider.d.ts +6 -0
- package/es/card/divider.js +6 -2
- package/es/card/index.d.ts +109 -0
- package/es/card/index.js +8 -14
- package/es/card/index.scss +7 -0
- package/es/card/selectable.d.ts +13 -0
- package/es/card/selectable.js +6 -2
- package/es/card/tab.d.ts +6 -0
- package/es/card/tab.js +6 -2
- package/es/card/utils.d.ts +9 -0
- package/es/field/index.d.ts +3 -0
- package/es/form/Components/Editable/index.d.ts +20 -0
- package/es/form/Components/Editable/index.js +1 -1
- package/es/form/Components/FormGroup/index.d.ts +13 -0
- package/es/form/Components/FormGroup/index.js +3 -5
- package/es/form/Components/LightFilter/componentMap.d.ts +3 -0
- package/es/form/Components/LightFilter/index.d.ts +17 -0
- package/es/form/Components/LightFilter/index.js +2 -8
- package/es/form/Components/ProField/index.d.ts +2 -0
- package/es/form/Components/ProField/index.js +6 -2
- package/es/form/Components/ProField/mapDateFormat.d.ts +3 -0
- package/es/form/Components/Text/index.d.ts +7 -0
- package/es/form/Components/Text/index.js +6 -2
- package/es/form/Filter/AdvancedFilter.d.ts +7 -0
- package/es/form/Filter/AdvancedFilter.js +15 -18
- package/es/form/Filter/Layout.d.ts +5 -0
- package/es/form/Filter/LightFilter.d.ts +7 -0
- package/es/form/Filter/LightFilter.js +10 -13
- package/es/form/Filter/SimpleFilter.d.ts +7 -0
- package/es/form/Filter/SimpleFilter.js +6 -10
- package/es/form/Filter/index.d.ts +9 -0
- package/es/form/Filter/index.js +10 -7
- package/es/form/Filter/index2.d.ts +13 -0
- package/es/form/Filter/index2.js +17 -21
- package/es/form/Filter/useBindUrl.d.ts +2 -0
- package/es/form/Filter/useSpecialProps.d.ts +6 -0
- package/es/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/es/form/ProForm/customComponent.d.ts +3 -0
- package/es/form/ProForm/index.d.ts +5 -0
- package/es/form/ProForm/index.js +2 -4
- package/es/form/ProForm/useAutoLayout.d.ts +9 -0
- package/es/form/ProForm/useAutoSubmit.d.ts +6 -0
- package/es/form/ProForm/useFieldRequest.d.ts +5 -0
- package/es/form/ProForm/useFormDisplayValues.d.ts +4 -0
- package/es/form/ProForm/useFormDisplayValues.js +1 -1
- package/es/form/ProForm/useInitialRequest.d.ts +6 -0
- package/es/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/es/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/es/form/SchemaForm/adapterType.d.ts +5 -0
- package/es/form/SchemaForm/index.d.ts +4 -0
- package/es/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/es/form/SchemaForm/initializeDataSource.d.ts +15 -0
- package/es/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormStep.d.ts +5 -0
- package/es/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/es/form/SchemaForm/initializeReactions.d.ts +2 -0
- package/es/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/es/form/SchemaForm/initializeRules.d.ts +11 -0
- package/es/form/SchemaForm/initializeSelectTable.d.ts +3 -0
- package/es/form/SchemaForm/reactions.d.ts +6 -0
- package/es/form/SchemaForm/reactions.js +1 -2
- package/es/form/docs/ActionResponse.d.ts +7 -0
- package/es/form/fieldTypeMap.d.ts +7 -0
- package/es/form/index.d.ts +125 -0
- package/es/form/locales/validate.d.ts +159 -0
- package/es/form/schemaNameMap.d.ts +5 -0
- package/es/form/typing.d.ts +192 -0
- package/es/form/utils.d.ts +55 -0
- package/es/form/utils.js +1 -8
- package/es/form/warning.d.ts +3 -0
- package/es/hooks/index.d.ts +2 -0
- package/es/index-without-icon.d.ts +32 -0
- package/es/index.d.ts +32 -0
- package/es/index.js +1 -1
- package/es/info/components/InfoGroup/index.d.ts +5 -0
- package/es/info/components/InfoGroup/index.js +6 -2
- package/es/info/components/InfoValueItem/index.d.ts +5 -0
- package/es/info/components/InfoValueItem/index.js +21 -23
- package/es/info/components/ProInfoItem/index.d.ts +5 -0
- package/es/info/components/baseInfo/index.d.ts +8 -0
- package/es/info/components/headerInfo/index.d.ts +8 -0
- package/es/info/components/tableInfo/index.d.ts +7 -0
- package/es/info/components/tableInfo/index.js +4 -5
- package/es/info/index.d.ts +10 -0
- package/es/info/index.js +5 -8
- package/es/info/typing.d.ts +218 -0
- package/es/info/utils/index.d.ts +20 -0
- package/es/info/utils/layout.d.ts +2 -0
- package/es/info/utils/utils.d.ts +1 -0
- package/es/layout/index.d.ts +2 -0
- package/es/nocode/configurators/Card.d.ts +3 -0
- package/es/nocode/configurators/PageHeader.d.ts +3 -0
- package/es/nocode/configurators/ProTable.d.ts +3 -0
- package/es/nocode/configurators/common.d.ts +280 -0
- package/es/nocode/configurators/index.d.ts +15 -0
- package/es/nocode/configurators/map.d.ts +2 -0
- package/es/nocode/index.d.ts +8 -0
- package/es/nocode/index.js +2 -2
- package/es/nocode/pages/editor.d.ts +12 -0
- package/es/nocode/pages/index.d.ts +14 -0
- package/es/nocode/pages/index.js +3 -4
- package/es/nocode/pages/playground.d.ts +11 -0
- package/es/nocode/pages/playground.js +7 -3
- package/es/nocode/pages/renderer.d.ts +10 -0
- package/es/nocode/pages/renderer.js +8 -4
- package/es/nocode/playground.d.ts +14 -0
- package/es/nocode/playground.js +6 -2
- package/es/page-container/index.d.ts +3 -0
- package/es/page-header/index.d.ts +74 -0
- package/es/page-header/index.js +7 -12
- package/es/sidebar/components/sidebar-container/index.d.ts +5 -0
- package/es/sidebar/components/sidebar-container/index.js +9 -5
- package/es/sidebar/components/tree/index.d.ts +6 -0
- package/es/sidebar/components/tree/index.js +6 -2
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +6 -2
- package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
- package/es/sidebar/components/tree-node/components/IconAction/index.js +2 -4
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
- package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/es/sidebar/components/tree-node/index.d.ts +7 -0
- package/es/sidebar/components/tree-node/index.js +18 -21
- package/es/sidebar/index.d.ts +9 -0
- package/es/sidebar/index.js +8 -4
- package/es/sidebar/typing.d.ts +141 -0
- package/es/sidebar/utils/action-ref.d.ts +3 -0
- package/es/sidebar/utils/index.d.ts +361 -0
- package/es/sidebar/utils/index.js +11 -11
- package/es/skeleton/index.d.ts +3 -0
- package/es/table/components/CardView/index.d.ts +5 -0
- package/es/table/components/CardView/index.js +446 -0
- package/es/table/components/CardView/index.scss +46 -0
- package/es/table/components/EmptyContent/index.d.ts +2 -0
- package/es/table/components/Filter/index.d.ts +10 -0
- package/es/table/components/Filter/index.js +21 -14
- package/es/table/components/Layout/index.d.ts +5 -0
- package/es/table/components/Layout/index.js +8 -10
- package/es/table/components/LoadMore/index.d.ts +20 -0
- package/es/table/components/LoadMore/index.js +107 -0
- package/es/table/components/LoadMore/index.scss +19 -0
- package/es/table/components/Pagination/index.d.ts +7 -0
- package/es/table/components/Pagination/index.js +14 -10
- package/es/table/components/QuickAction/index.d.ts +11 -0
- package/es/table/components/QuickAction/index.js +2 -4
- package/es/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/es/table/components/ToolBar/CardSwitch.js +63 -0
- package/es/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/es/table/components/ToolBar/DensityIcon.js +3 -2
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FilterColumnIcon.js +13 -2
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/es/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/es/table/components/ToolBar/Fullscreen.js +15 -2
- package/es/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/es/table/components/ToolBar/RefreshIcon.js +1 -2
- package/es/table/components/ToolBar/index.d.ts +5 -0
- package/es/table/components/ToolBar/index.js +69 -34
- package/es/table/components/ToolBar/index.scss +10 -1
- package/es/table/index.d.ts +5 -0
- package/es/table/index.js +150 -59
- package/es/table/typing.d.ts +371 -0
- package/es/table/utils/columnRender.d.ts +13 -0
- package/es/table/utils/columnRender.js +28 -28
- package/es/table/utils/genProColumnToColumn.d.ts +13 -0
- package/es/table/utils/genProColumnToColumn.js +4 -2
- package/es/table/utils/getTableProps.d.ts +2 -0
- package/es/table/utils/getTableSortIcons.d.ts +3 -0
- package/es/table/utils/index.d.ts +19 -0
- package/es/table/utils/index.js +2 -2
- package/es/table/utils/pureColumnRender.d.ts +9 -0
- package/es/table/utils/pureColumnRender.js +2 -4
- package/es/table/utils/pureGenProColumnToColumn.d.ts +7 -0
- package/es/table/utils/pureGenProColumnToColumn.js +1 -1
- package/es/table/utils/useTableSelection.d.ts +3 -0
- package/es/templates/Detail/index.d.ts +2 -0
- package/es/templates/Form/index.d.ts +2 -0
- package/es/templates/List/index.d.ts +9 -0
- package/es/templates/List/index.js +8 -4
- package/es/templates/index.d.ts +3 -0
- package/es/templates/index.js +1 -2
- package/es/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/es/timeline/ProTimeLineItem/index.js +6 -2
- package/es/timeline/index.d.ts +10 -0
- package/es/timeline/index.js +7 -3
- package/es/timeline/typing.d.ts +106 -0
- package/es/utils/index.d.ts +3 -0
- package/es/utils/message.d.ts +3 -0
- package/es/utils/message.js +7 -3
- package/lib/actions/base.d.ts +24 -0
- package/lib/actions/confirm.d.ts +7 -0
- package/lib/actions/danger-confirm.d.ts +7 -0
- package/lib/actions/danger-pop-confirm.d.ts +5 -0
- package/lib/actions/dialog-component.d.ts +10 -0
- package/lib/actions/dialog-component.js +7 -1
- package/lib/actions/dialog-form.d.ts +29 -0
- package/lib/actions/dialog-form.js +3 -5
- package/lib/actions/dialog-info.d.ts +9 -0
- package/lib/actions/dialog-table.d.ts +9 -0
- package/lib/actions/dialog.d.ts +40 -0
- package/lib/actions/dialog.js +1 -1
- package/lib/actions/drawer-form.d.ts +6 -0
- package/lib/actions/drawer-info.d.ts +6 -0
- package/lib/actions/drawer-table.d.ts +6 -0
- package/lib/actions/drawer.d.ts +6 -0
- package/lib/actions/error.d.ts +7 -0
- package/lib/actions/index.d.ts +111 -0
- package/lib/actions/index.js +23 -32
- package/lib/actions/index.scss +5 -0
- package/lib/actions/link.d.ts +8 -0
- package/lib/actions/notice.d.ts +7 -0
- package/lib/actions/pop-confirm.d.ts +9 -0
- package/lib/actions/request.d.ts +9 -0
- package/lib/actions/utils.d.ts +1 -0
- package/lib/card/card-container.d.ts +18 -0
- package/lib/card/card-container.js +7 -5
- package/lib/card/divider.d.ts +6 -0
- package/lib/card/divider.js +6 -2
- package/lib/card/index.d.ts +109 -0
- package/lib/card/index.js +7 -14
- package/lib/card/index.scss +7 -0
- package/lib/card/selectable.d.ts +13 -0
- package/lib/card/selectable.js +6 -2
- package/lib/card/tab.d.ts +6 -0
- package/lib/card/tab.js +6 -2
- package/lib/card/utils.d.ts +9 -0
- package/lib/field/index.d.ts +3 -0
- package/lib/form/Components/Editable/index.d.ts +20 -0
- package/lib/form/Components/Editable/index.js +1 -1
- package/lib/form/Components/FormGroup/index.d.ts +13 -0
- package/lib/form/Components/FormGroup/index.js +3 -5
- package/lib/form/Components/LightFilter/componentMap.d.ts +3 -0
- package/lib/form/Components/LightFilter/index.d.ts +17 -0
- package/lib/form/Components/LightFilter/index.js +2 -8
- package/lib/form/Components/ProField/index.d.ts +2 -0
- package/lib/form/Components/ProField/index.js +6 -2
- package/lib/form/Components/ProField/mapDateFormat.d.ts +3 -0
- package/lib/form/Components/Text/index.d.ts +7 -0
- package/lib/form/Components/Text/index.js +6 -2
- package/lib/form/Filter/AdvancedFilter.d.ts +7 -0
- package/lib/form/Filter/AdvancedFilter.js +14 -17
- package/lib/form/Filter/Layout.d.ts +5 -0
- package/lib/form/Filter/LightFilter.d.ts +7 -0
- package/lib/form/Filter/LightFilter.js +9 -12
- package/lib/form/Filter/SimpleFilter.d.ts +7 -0
- package/lib/form/Filter/SimpleFilter.js +5 -8
- package/lib/form/Filter/index.d.ts +9 -0
- package/lib/form/Filter/index.js +9 -6
- package/lib/form/Filter/index2.d.ts +13 -0
- package/lib/form/Filter/index2.js +17 -21
- package/lib/form/Filter/useBindUrl.d.ts +2 -0
- package/lib/form/Filter/useSpecialProps.d.ts +6 -0
- package/lib/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/lib/form/ProForm/customComponent.d.ts +3 -0
- package/lib/form/ProForm/index.d.ts +5 -0
- package/lib/form/ProForm/index.js +2 -4
- package/lib/form/ProForm/useAutoLayout.d.ts +9 -0
- package/lib/form/ProForm/useAutoSubmit.d.ts +6 -0
- package/lib/form/ProForm/useFieldRequest.d.ts +5 -0
- package/lib/form/ProForm/useFormDisplayValues.d.ts +4 -0
- package/lib/form/ProForm/useInitialRequest.d.ts +6 -0
- package/lib/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/lib/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/lib/form/SchemaForm/adapterType.d.ts +5 -0
- package/lib/form/SchemaForm/index.d.ts +4 -0
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/lib/form/SchemaForm/initializeDataSource.d.ts +15 -0
- package/lib/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormStep.d.ts +5 -0
- package/lib/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/lib/form/SchemaForm/initializeReactions.d.ts +2 -0
- package/lib/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/lib/form/SchemaForm/initializeRules.d.ts +11 -0
- package/lib/form/SchemaForm/initializeSelectTable.d.ts +3 -0
- package/lib/form/SchemaForm/reactions.d.ts +6 -0
- package/lib/form/docs/ActionResponse.d.ts +7 -0
- package/lib/form/fieldTypeMap.d.ts +7 -0
- package/lib/form/index.d.ts +125 -0
- package/lib/form/locales/validate.d.ts +159 -0
- package/lib/form/schemaNameMap.d.ts +5 -0
- package/lib/form/typing.d.ts +192 -0
- package/lib/form/typing.js +5 -1
- package/lib/form/utils.d.ts +55 -0
- package/lib/form/utils.js +0 -7
- package/lib/form/warning.d.ts +3 -0
- package/lib/hooks/index.d.ts +2 -0
- package/lib/index-without-icon.d.ts +32 -0
- package/lib/index.d.ts +32 -0
- package/lib/index.js +1 -1
- package/lib/info/components/InfoGroup/index.d.ts +5 -0
- package/lib/info/components/InfoGroup/index.js +6 -2
- package/lib/info/components/InfoValueItem/index.d.ts +5 -0
- package/lib/info/components/InfoValueItem/index.js +21 -23
- package/lib/info/components/ProInfoItem/index.d.ts +5 -0
- package/lib/info/components/baseInfo/index.d.ts +8 -0
- package/lib/info/components/headerInfo/index.d.ts +8 -0
- package/lib/info/components/tableInfo/index.d.ts +7 -0
- package/lib/info/components/tableInfo/index.js +4 -5
- package/lib/info/index.d.ts +10 -0
- package/lib/info/index.js +5 -8
- package/lib/info/typing.d.ts +218 -0
- package/lib/info/typing.js +5 -1
- package/lib/info/utils/index.d.ts +20 -0
- package/lib/info/utils/layout.d.ts +2 -0
- package/lib/info/utils/utils.d.ts +1 -0
- package/lib/layout/index.d.ts +2 -0
- package/lib/nocode/configurators/Card.d.ts +3 -0
- package/lib/nocode/configurators/PageHeader.d.ts +3 -0
- package/lib/nocode/configurators/ProTable.d.ts +3 -0
- package/lib/nocode/configurators/common.d.ts +280 -0
- package/lib/nocode/configurators/index.d.ts +15 -0
- package/lib/nocode/configurators/map.d.ts +2 -0
- package/lib/nocode/index.d.ts +8 -0
- package/lib/nocode/pages/editor.d.ts +12 -0
- package/lib/nocode/pages/index.d.ts +14 -0
- package/lib/nocode/pages/index.js +2 -2
- package/lib/nocode/pages/playground.d.ts +11 -0
- package/lib/nocode/pages/playground.js +7 -3
- package/lib/nocode/pages/renderer.d.ts +10 -0
- package/lib/nocode/pages/renderer.js +8 -4
- package/lib/nocode/playground.d.ts +14 -0
- package/lib/nocode/playground.js +6 -2
- package/lib/page-container/index.d.ts +3 -0
- package/lib/page-header/index.d.ts +74 -0
- package/lib/page-header/index.js +6 -12
- package/lib/sidebar/components/sidebar-container/index.d.ts +5 -0
- package/lib/sidebar/components/sidebar-container/index.js +9 -5
- package/lib/sidebar/components/tree/index.d.ts +6 -0
- package/lib/sidebar/components/tree/index.js +6 -2
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +6 -2
- package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +2 -4
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/lib/sidebar/components/tree-node/index.d.ts +7 -0
- package/lib/sidebar/components/tree-node/index.js +18 -21
- package/lib/sidebar/index.d.ts +9 -0
- package/lib/sidebar/index.js +17 -4
- package/lib/sidebar/typing.d.ts +141 -0
- package/lib/sidebar/typing.js +5 -1
- package/lib/sidebar/utils/action-ref.d.ts +3 -0
- package/lib/sidebar/utils/index.d.ts +361 -0
- package/lib/sidebar/utils/index.js +11 -11
- package/lib/skeleton/index.d.ts +3 -0
- package/lib/table/components/CardView/index.d.ts +5 -0
- package/lib/table/components/CardView/index.js +468 -0
- package/lib/table/components/CardView/index.scss +46 -0
- package/lib/table/components/EmptyContent/index.d.ts +2 -0
- package/lib/table/components/Filter/index.d.ts +10 -0
- package/lib/table/components/Filter/index.js +21 -14
- package/lib/table/components/Layout/index.d.ts +5 -0
- package/lib/table/components/Layout/index.js +9 -11
- package/lib/table/components/LoadMore/index.d.ts +20 -0
- package/lib/table/components/LoadMore/index.js +128 -0
- package/lib/table/components/LoadMore/index.scss +19 -0
- package/lib/table/components/Pagination/index.d.ts +7 -0
- package/lib/table/components/Pagination/index.js +14 -10
- package/lib/table/components/QuickAction/index.d.ts +11 -0
- package/lib/table/components/QuickAction/index.js +2 -4
- package/lib/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/lib/table/components/ToolBar/CardSwitch.js +82 -0
- package/lib/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/DensityIcon.js +3 -2
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FilterColumnIcon.js +13 -2
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/lib/table/components/ToolBar/Fullscreen.js +15 -2
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/RefreshIcon.js +1 -2
- package/lib/table/components/ToolBar/index.d.ts +5 -0
- package/lib/table/components/ToolBar/index.js +70 -33
- package/lib/table/components/ToolBar/index.scss +10 -1
- package/lib/table/index.d.ts +5 -0
- package/lib/table/index.js +153 -60
- package/lib/table/typing.d.ts +371 -0
- package/lib/table/typing.js +5 -1
- package/lib/table/utils/columnRender.d.ts +13 -0
- package/lib/table/utils/columnRender.js +28 -28
- package/lib/table/utils/genProColumnToColumn.d.ts +13 -0
- package/lib/table/utils/genProColumnToColumn.js +3 -1
- package/lib/table/utils/getTableProps.d.ts +2 -0
- package/lib/table/utils/getTableSortIcons.d.ts +3 -0
- package/lib/table/utils/index.d.ts +19 -0
- package/lib/table/utils/pureColumnRender.d.ts +9 -0
- package/lib/table/utils/pureColumnRender.js +1 -3
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +7 -0
- package/lib/table/utils/useTableSelection.d.ts +3 -0
- package/lib/templates/Detail/index.d.ts +2 -0
- package/lib/templates/Form/index.d.ts +2 -0
- package/lib/templates/List/index.d.ts +9 -0
- package/lib/templates/List/index.js +8 -4
- package/lib/templates/index.d.ts +3 -0
- package/lib/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/lib/timeline/ProTimeLineItem/index.js +6 -2
- package/lib/timeline/index.d.ts +10 -0
- package/lib/timeline/index.js +7 -3
- package/lib/timeline/typing.d.ts +106 -0
- package/lib/timeline/typing.js +5 -1
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/message.d.ts +3 -0
- package/lib/utils/message.js +7 -3
- package/package.json +1 -1
@@ -1,7 +1,5 @@
|
|
1
1
|
var _excluded = ["header", "mainAction", "extra", "actionRef", "dataFilter", "dataFilterFormRef", "afterDataFilter", "rowSelection", "toolBar", "dataTeamixSpm"];
|
2
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); }
|
4
|
-
|
5
3
|
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; }
|
6
4
|
|
7
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; }
|
@@ -39,9 +37,9 @@ var Layout = function Layout(props) {
|
|
39
37
|
|
40
38
|
|
41
39
|
var renderMainAction = function renderMainAction() {
|
42
|
-
var
|
40
|
+
var _mainAction$actions;
|
43
41
|
|
44
|
-
if (_typeof(mainAction) === 'object' && (mainAction === null || mainAction === void 0 ? void 0 : (
|
42
|
+
if (_typeof(mainAction) === 'object' && (mainAction === null || mainAction === void 0 ? void 0 : (_mainAction$actions = mainAction.actions) === null || _mainAction$actions === void 0 ? void 0 : _mainAction$actions.length) > 0) {
|
45
43
|
// 判断 actions 是否 visible 都为 false,是的话也不渲染
|
46
44
|
var isEmptyActions = mainAction === null || mainAction === void 0 ? void 0 : mainAction.actions.every(function (action) {
|
47
45
|
return (action === null || action === void 0 ? void 0 : action.visible) === false;
|
@@ -58,7 +56,7 @@ var Layout = function Layout(props) {
|
|
58
56
|
};
|
59
57
|
return /*#__PURE__*/React.createElement("div", {
|
60
58
|
className: cls('main-action')
|
61
|
-
}, /*#__PURE__*/React.createElement(ProActionGroup,
|
59
|
+
}, /*#__PURE__*/React.createElement(ProActionGroup, _objectSpread(_objectSpread({}, mainAction), {}, {
|
62
60
|
context: _objectSpread(_objectSpread({}, defaultContext), mainAction.context),
|
63
61
|
"data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-mainAction") : undefined
|
64
62
|
})));
|
@@ -73,7 +71,7 @@ var Layout = function Layout(props) {
|
|
73
71
|
actionRef: actionRef,
|
74
72
|
quickAction: extra,
|
75
73
|
rowSelection: rowSelection
|
76
|
-
}), /*#__PURE__*/React.createElement(ToolBar,
|
74
|
+
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
77
75
|
actionRef: actionRef,
|
78
76
|
toolBar: toolBar
|
79
77
|
}, otherProps)));
|
@@ -88,7 +86,7 @@ var Layout = function Layout(props) {
|
|
88
86
|
|
89
87
|
if ( /*#__PURE__*/isValidElement(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.content)) {
|
90
88
|
// 自定义渲染内容
|
91
|
-
return /*#__PURE__*/React.createElement(QueryFilterLayout,
|
89
|
+
return /*#__PURE__*/React.createElement(QueryFilterLayout, _objectSpread({
|
92
90
|
onExpand: function onExpand(expand) {
|
93
91
|
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
94
92
|
setTimeout(function () {
|
@@ -105,7 +103,7 @@ var Layout = function Layout(props) {
|
|
105
103
|
addonAfter: renderAddonAfter()
|
106
104
|
}, dataFilter));
|
107
105
|
} else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema2 = dataFilter.schema) === null || _dataFilter$schema2 === void 0 ? void 0 : _dataFilter$schema2.length) >= 0) {
|
108
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(QueryFilter,
|
106
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(QueryFilter, _objectSpread({
|
109
107
|
formRef: dataFilterFormRef,
|
110
108
|
onExpand: function onExpand(expand) {
|
111
109
|
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
@@ -150,7 +148,7 @@ var Layout = function Layout(props) {
|
|
150
148
|
className: cls('wrapper')
|
151
149
|
}, /*#__PURE__*/React.createElement("div", {
|
152
150
|
className: cls('left')
|
153
|
-
}, header && /*#__PURE__*/React.createElement(Header, header)), /*#__PURE__*/React.createElement("div", {
|
151
|
+
}, header && /*#__PURE__*/React.createElement(Header, _objectSpread({}, header))), /*#__PURE__*/React.createElement("div", {
|
154
152
|
className: cls('right')
|
155
153
|
}, extra && /*#__PURE__*/React.createElement(QuickAction, {
|
156
154
|
actionRef: actionRef,
|
@@ -164,7 +162,7 @@ var Layout = function Layout(props) {
|
|
164
162
|
className: cls('wrapper')
|
165
163
|
}, /*#__PURE__*/React.createElement("div", {
|
166
164
|
className: cls('left')
|
167
|
-
}, header && /*#__PURE__*/React.createElement(Header, header)), /*#__PURE__*/React.createElement("div", {
|
165
|
+
}, header && /*#__PURE__*/React.createElement(Header, _objectSpread({}, header))), /*#__PURE__*/React.createElement("div", {
|
168
166
|
className: cls('right')
|
169
167
|
}, extra && /*#__PURE__*/React.createElement(QuickAction, {
|
170
168
|
actionRef: actionRef,
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './index.scss';
|
3
|
+
export declare type LoadMoreProps = {
|
4
|
+
/** 内容 **/
|
5
|
+
children?: React.ReactNode;
|
6
|
+
/** 加载状态 受控 **/
|
7
|
+
loadState?: 'loading' | 'loadMore' | 'noMore' | 'none';
|
8
|
+
/** 滚动条滚动到底部触发事件 **/
|
9
|
+
onScrollBottom?: () => void;
|
10
|
+
/** 加载状态改变回调 **/
|
11
|
+
onChangeLoadState?: (state: LoadMoreProps['loadState']) => void;
|
12
|
+
/** 点击加载更多回调 **/
|
13
|
+
onLoadMore?: () => void;
|
14
|
+
/** 滚动区域高度 **/
|
15
|
+
scrollHeight?: number | string;
|
16
|
+
/** 当前滚动区域位置 **/
|
17
|
+
scrollPosition?: number;
|
18
|
+
};
|
19
|
+
declare const LoadMore: React.FC<LoadMoreProps>;
|
20
|
+
export default LoadMore;
|
@@ -0,0 +1,107 @@
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
|
+
|
3
|
+
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."); }
|
4
|
+
|
5
|
+
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); }
|
6
|
+
|
7
|
+
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; }
|
8
|
+
|
9
|
+
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; }
|
10
|
+
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
12
|
+
|
13
|
+
import React, { useEffect, useRef, useState } from 'react';
|
14
|
+
import { usePrefixCls } from '@teamix/utils';
|
15
|
+
import './index.scss';
|
16
|
+
import TeamixIcon from '@teamix/icon';
|
17
|
+
import debounce from 'lodash.debounce';
|
18
|
+
var cls = usePrefixCls('teamix-pro-load-more');
|
19
|
+
|
20
|
+
var LoadMore = function LoadMore(props) {
|
21
|
+
var children = props.children,
|
22
|
+
onChangeLoadState = props.onChangeLoadState,
|
23
|
+
onLoadMore = props.onLoadMore,
|
24
|
+
scrollHeight = props.scrollHeight,
|
25
|
+
onScrollBottom = props.onScrollBottom,
|
26
|
+
loadStateProp = props.loadState,
|
27
|
+
scrollPositionProp = props.scrollPosition;
|
28
|
+
var scrollDom = useRef(null); // 加载状态
|
29
|
+
|
30
|
+
var _useState = useState('loadMore'),
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
32
|
+
loadState = _useState2[0],
|
33
|
+
setLoadState = _useState2[1];
|
34
|
+
|
35
|
+
useEffect(function () {
|
36
|
+
var _scrollDom$current;
|
37
|
+
|
38
|
+
scrollDom === null || scrollDom === void 0 ? void 0 : (_scrollDom$current = scrollDom.current) === null || _scrollDom$current === void 0 ? void 0 : _scrollDom$current.addEventListener('scroll', debounce(function (e) {
|
39
|
+
var _e$target, _e$target2, _e$target3;
|
40
|
+
|
41
|
+
var scrollTop = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.scrollTop;
|
42
|
+
var clientHeight = e === null || e === void 0 ? void 0 : (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.clientHeight;
|
43
|
+
var scrollHeight = e === null || e === void 0 ? void 0 : (_e$target3 = e.target) === null || _e$target3 === void 0 ? void 0 : _e$target3.scrollHeight;
|
44
|
+
|
45
|
+
if (scrollTop + clientHeight + 5 >= scrollHeight) {
|
46
|
+
onScrollBottom === null || onScrollBottom === void 0 ? void 0 : onScrollBottom();
|
47
|
+
}
|
48
|
+
}, 100));
|
49
|
+
}, []);
|
50
|
+
useEffect(function () {
|
51
|
+
setLoadState(loadStateProp);
|
52
|
+
}, [loadStateProp]); // 更改加载状态
|
53
|
+
|
54
|
+
var onLoadState = function onLoadState(state) {
|
55
|
+
setLoadState(state);
|
56
|
+
|
57
|
+
if (state === 'loading') {
|
58
|
+
onLoadMore === null || onLoadMore === void 0 ? void 0 : onLoadMore();
|
59
|
+
}
|
60
|
+
|
61
|
+
onChangeLoadState === null || onChangeLoadState === void 0 ? void 0 : onChangeLoadState(state);
|
62
|
+
}; // 渲染加载更多和正在加载区域
|
63
|
+
|
64
|
+
|
65
|
+
var renderLoadMore = function renderLoadMore() {
|
66
|
+
if (loadState === 'loadMore') {
|
67
|
+
return /*#__PURE__*/React.createElement("div", {
|
68
|
+
className: cls('bottom-text'),
|
69
|
+
onClick: function onClick() {
|
70
|
+
return onLoadState('loading');
|
71
|
+
}
|
72
|
+
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
73
|
+
type: "down-line",
|
74
|
+
size: "small",
|
75
|
+
className: cls('bottom-text-icon')
|
76
|
+
}), "\u52A0\u8F7D\u66F4\u591A");
|
77
|
+
}
|
78
|
+
|
79
|
+
if (loadState === 'loading') {
|
80
|
+
return /*#__PURE__*/React.createElement("div", {
|
81
|
+
className: cls('bottom-text')
|
82
|
+
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
83
|
+
type: "loading-line",
|
84
|
+
size: "small",
|
85
|
+
className: cls('bottom-text-icon')
|
86
|
+
}), "\u52A0\u8F7D\u4E2D");
|
87
|
+
}
|
88
|
+
|
89
|
+
if (loadState === 'noMore') {
|
90
|
+
return /*#__PURE__*/React.createElement("div", {
|
91
|
+
className: cls('bottom-text')
|
92
|
+
}, "\u6CA1\u6709\u66F4\u591A\u4E86");
|
93
|
+
}
|
94
|
+
|
95
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
96
|
+
};
|
97
|
+
|
98
|
+
return /*#__PURE__*/React.createElement("div", {
|
99
|
+
className: cls(),
|
100
|
+
style: {
|
101
|
+
height: scrollHeight !== null && scrollHeight !== void 0 ? scrollHeight : 'auto'
|
102
|
+
},
|
103
|
+
ref: scrollDom
|
104
|
+
}, children, renderLoadMore());
|
105
|
+
};
|
106
|
+
|
107
|
+
export default LoadMore;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.teamix-pro-load-more {
|
2
|
+
overflow-y: auto;
|
3
|
+
overflow-x: hidden;
|
4
|
+
|
5
|
+
&-bottom-text {
|
6
|
+
text-align: center;
|
7
|
+
margin-top: 16px;
|
8
|
+
margin-bottom: 16px;
|
9
|
+
cursor: pointer;
|
10
|
+
color: var(--color-brand1-5);
|
11
|
+
display: flex;
|
12
|
+
align-items: center;
|
13
|
+
justify-content: center;
|
14
|
+
}
|
15
|
+
|
16
|
+
&-bottom-text-icon {
|
17
|
+
margin-right: 4px;
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { PaginationProps } from '@alicloudfe/components/types/pagination';
|
2
|
+
import { responsivePaginationType } from '../../typing';
|
3
|
+
import './index.scss';
|
4
|
+
declare const _default: (props: PaginationProps & {
|
5
|
+
responsivePaginationType?: responsivePaginationType;
|
6
|
+
}) => JSX.Element;
|
7
|
+
export default _default;
|
@@ -1,6 +1,10 @@
|
|
1
1
|
var _excluded = ["className", "onChange", "total", "pageSize", "current", "pageSizeList", "pageSizeSelector", "onPageSizeChange", "responsivePaginationType"];
|
2
2
|
|
3
|
-
function
|
3
|
+
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; }
|
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; }
|
4
8
|
|
5
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
6
10
|
|
@@ -82,8 +86,8 @@ export default (function (props) {
|
|
82
86
|
onVisibleChange: function onVisibleChange(visible) {
|
83
87
|
return setVisible(visible);
|
84
88
|
},
|
85
|
-
align: "t"
|
86
|
-
|
89
|
+
align: "t",
|
90
|
+
// triggerType="click"
|
87
91
|
trigger: /*#__PURE__*/React.createElement(Button, {
|
88
92
|
text: true,
|
89
93
|
onMouseEnter: function onMouseEnter() {
|
@@ -182,8 +186,8 @@ export default (function (props) {
|
|
182
186
|
}
|
183
187
|
}, "/"), getTotalPage(total, pageSize)), /*#__PURE__*/React.createElement(Button, {
|
184
188
|
className: basePrefix('next', 'pagination-item'),
|
185
|
-
onClick: handleNextClick
|
186
|
-
|
189
|
+
onClick: handleNextClick,
|
190
|
+
//@ts-ignore
|
187
191
|
disabled: total && Number(currentPage) >= getTotalPage(total, pageSize)
|
188
192
|
}, /*#__PURE__*/React.createElement(Icon, {
|
189
193
|
size: "small",
|
@@ -194,7 +198,7 @@ export default (function (props) {
|
|
194
198
|
var renderMiniPagination = function renderMiniPagination() {
|
195
199
|
if (total && pageSize) {
|
196
200
|
if (total / pageSize <= 2) {
|
197
|
-
return /*#__PURE__*/React.createElement(Pagination,
|
201
|
+
return /*#__PURE__*/React.createElement(Pagination, _objectSpread(_objectSpread({}, commonPaginationProps), {}, {
|
198
202
|
type: "simple"
|
199
203
|
}, otherProps));
|
200
204
|
} else {
|
@@ -208,7 +212,7 @@ export default (function (props) {
|
|
208
212
|
var renderPagination = function renderPagination() {
|
209
213
|
switch (responsivePaginationType || responsiveProps) {
|
210
214
|
case 'normal':
|
211
|
-
return /*#__PURE__*/React.createElement(Pagination,
|
215
|
+
return /*#__PURE__*/React.createElement(Pagination, _objectSpread(_objectSpread({}, commonPaginationProps), {}, {
|
212
216
|
totalRender: function totalRender(total) {
|
213
217
|
return getMessage('total', {
|
214
218
|
total: new Intl.NumberFormat().format(total)
|
@@ -217,7 +221,7 @@ export default (function (props) {
|
|
217
221
|
}, otherProps));
|
218
222
|
|
219
223
|
case 'simple':
|
220
|
-
return /*#__PURE__*/React.createElement(Pagination,
|
224
|
+
return /*#__PURE__*/React.createElement(Pagination, _objectSpread(_objectSpread({}, commonPaginationProps), {}, {
|
221
225
|
pageShowCount: 3,
|
222
226
|
totalRender: function totalRender(total) {
|
223
227
|
return getMessage('total', {
|
@@ -227,7 +231,7 @@ export default (function (props) {
|
|
227
231
|
}, otherProps));
|
228
232
|
|
229
233
|
case 'small':
|
230
|
-
return /*#__PURE__*/React.createElement(Pagination,
|
234
|
+
return /*#__PURE__*/React.createElement(Pagination, _objectSpread(_objectSpread({}, commonPaginationProps), {}, {
|
231
235
|
pageShowCount: 3,
|
232
236
|
pageSizeSelector: false,
|
233
237
|
totalRender: function totalRender(total) {
|
@@ -239,7 +243,7 @@ export default (function (props) {
|
|
239
243
|
return renderMiniPagination();
|
240
244
|
|
241
245
|
default:
|
242
|
-
return /*#__PURE__*/React.createElement(Pagination,
|
246
|
+
return /*#__PURE__*/React.createElement(Pagination, _objectSpread(_objectSpread({}, commonPaginationProps), otherProps));
|
243
247
|
}
|
244
248
|
};
|
245
249
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ProActionButtonProps } from '../../../actions';
|
3
|
+
import { ProTableActionType, innerRowSelectionType, rowSelectionType } from '../../typing';
|
4
|
+
interface QuickActionProps {
|
5
|
+
quickAction?: ProActionButtonProps | React.ReactNode | React.ReactNode[];
|
6
|
+
actionRef: React.MutableRefObject<ProTableActionType | undefined>;
|
7
|
+
rowSelection?: innerRowSelectionType | rowSelectionType;
|
8
|
+
dataTeamixSpm?: string;
|
9
|
+
}
|
10
|
+
declare const QuickAction: React.FC<QuickActionProps>;
|
11
|
+
export default QuickAction;
|
@@ -1,5 +1,3 @@
|
|
1
|
-
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
|
-
|
3
1
|
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; }
|
4
2
|
|
5
3
|
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; }
|
@@ -25,10 +23,10 @@ var QuickAction = function QuickAction(props) {
|
|
25
23
|
};
|
26
24
|
return /*#__PURE__*/React.createElement("div", {
|
27
25
|
className: "teamix-pro-table-layout-quick-action"
|
28
|
-
}, /*#__PURE__*/React.createElement(ProActionButton,
|
26
|
+
}, /*#__PURE__*/React.createElement(ProActionButton, _objectSpread(_objectSpread({
|
29
27
|
type: "primary",
|
30
28
|
text: true
|
31
|
-
}, quickAction, {
|
29
|
+
}, quickAction), {}, {
|
32
30
|
context: _objectSpread(_objectSpread({}, defaultContext), quickAction.context)
|
33
31
|
})));
|
34
32
|
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
|
+
|
3
|
+
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."); }
|
4
|
+
|
5
|
+
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); }
|
6
|
+
|
7
|
+
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; }
|
8
|
+
|
9
|
+
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; }
|
10
|
+
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
12
|
+
|
13
|
+
/**
|
14
|
+
* 切换 table card 视角
|
15
|
+
*/
|
16
|
+
import React, { useState } from 'react';
|
17
|
+
import { Radio } from '@alicloudfe/components';
|
18
|
+
import TeamixIcon from '@teamix/icon';
|
19
|
+
import { usePrefixCls } from '@teamix/utils';
|
20
|
+
import './index.scss';
|
21
|
+
import { emit } from '../../utils';
|
22
|
+
var RadioGroup = Radio.Group;
|
23
|
+
var cls = usePrefixCls('teamix-pro-table-toolbar-switch-card');
|
24
|
+
|
25
|
+
var CardSwitch = function CardSwitch(props) {
|
26
|
+
var actionRef = props.actionRef,
|
27
|
+
defaultView = props.defaultView; // 选择视角
|
28
|
+
|
29
|
+
var _useState = useState(defaultView !== null && defaultView !== void 0 ? defaultView : 'table'),
|
30
|
+
_useState2 = _slicedToArray(_useState, 2),
|
31
|
+
radioView = _useState2[0],
|
32
|
+
setRadioView = _useState2[1]; // 选择视角回调
|
33
|
+
|
34
|
+
|
35
|
+
var onRadioViewChange = function onRadioViewChange(value) {
|
36
|
+
var _actionRef$current, _actionRef$current$sw;
|
37
|
+
|
38
|
+
setRadioView(value);
|
39
|
+
(_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$sw = _actionRef$current.switchView) === null || _actionRef$current$sw === void 0 ? void 0 : _actionRef$current$sw.call(_actionRef$current, value);
|
40
|
+
emit('cardSwitchChange', value);
|
41
|
+
};
|
42
|
+
|
43
|
+
return /*#__PURE__*/React.createElement(RadioGroup, {
|
44
|
+
shape: "button",
|
45
|
+
value: radioView,
|
46
|
+
onChange: onRadioViewChange,
|
47
|
+
className: cls()
|
48
|
+
}, /*#__PURE__*/React.createElement(Radio, {
|
49
|
+
id: "banana",
|
50
|
+
value: "table"
|
51
|
+
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
52
|
+
type: "menu-line",
|
53
|
+
size: "small"
|
54
|
+
})), /*#__PURE__*/React.createElement(Radio, {
|
55
|
+
id: "watermelon",
|
56
|
+
value: "card"
|
57
|
+
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
58
|
+
type: "all-line",
|
59
|
+
size: "small"
|
60
|
+
})));
|
61
|
+
};
|
62
|
+
|
63
|
+
export default CardSwitch;
|
@@ -69,6 +69,7 @@ var DensityIcon = function DensityIcon(props) {
|
|
69
69
|
var renderDropdown = function renderDropdown() {
|
70
70
|
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Dropdown // safeNode={() => sizeMenuRef.current || document}
|
71
71
|
, {
|
72
|
+
// safeNode={() => sizeMenuRef.current || document}
|
72
73
|
trigger: /*#__PURE__*/React.createElement(Button, {
|
73
74
|
iconSize: "small",
|
74
75
|
className: cls()
|
@@ -82,8 +83,8 @@ var DensityIcon = function DensityIcon(props) {
|
|
82
83
|
setTooltipVisible(false);
|
83
84
|
setDropdownVisible(state);
|
84
85
|
},
|
85
|
-
triggerType: ['click']
|
86
|
-
|
86
|
+
triggerType: ['click'],
|
87
|
+
// key={index}
|
87
88
|
align: "tr br"
|
88
89
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(RadioItem, {
|
89
90
|
key: "medium",
|
@@ -90,7 +90,13 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
|
|
90
90
|
var _useState9 = useState(false),
|
91
91
|
_useState10 = _slicedToArray(_useState9, 2),
|
92
92
|
dropdownVisible = _useState10[0],
|
93
|
-
setDropdownVisible = _useState10[1];
|
93
|
+
setDropdownVisible = _useState10[1]; // 视角
|
94
|
+
|
95
|
+
|
96
|
+
var _useState11 = useState('table'),
|
97
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
98
|
+
cardView = _useState12[0],
|
99
|
+
setCardView = _useState12[1];
|
94
100
|
|
95
101
|
useEffect(function () {
|
96
102
|
on === null || on === void 0 ? void 0 : on(function (stateFilterColumns) {
|
@@ -108,8 +114,12 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
|
|
108
114
|
setNewColumns(stateColumns);
|
109
115
|
}
|
110
116
|
}, 'refreshFilterState');
|
117
|
+
on === null || on === void 0 ? void 0 : on(function (view) {
|
118
|
+
setCardView(view);
|
119
|
+
}, 'cardSwitchChange');
|
111
120
|
return function () {
|
112
121
|
off('refreshFilterState');
|
122
|
+
off('cardSwitchChange');
|
113
123
|
};
|
114
124
|
});
|
115
125
|
useEffect(function () {
|
@@ -276,7 +286,8 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
|
|
276
286
|
}, /*#__PURE__*/React.createElement(CheckboxItem, {
|
277
287
|
indeterminate: indeterminate,
|
278
288
|
checked: allVisible,
|
279
|
-
onChange: onChangeAllColumns
|
289
|
+
onChange: onChangeAllColumns,
|
290
|
+
disabled: cardView === 'card'
|
280
291
|
}, getMessage('selectAll'), /*#__PURE__*/React.createElement(Button, {
|
281
292
|
onClick: restColumns,
|
282
293
|
className: cls({
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './index.scss';
|
3
|
+
import { ProTableActionType } from '../../typing';
|
4
|
+
declare type ProTableFullScreenProps = {
|
5
|
+
children: (isFullScreen: boolean) => React.ReactNode | React.ReactNode;
|
6
|
+
visible: boolean;
|
7
|
+
actionRef: React.MutableRefObject<ProTableActionType | undefined>;
|
8
|
+
};
|
9
|
+
declare const FullScreen: React.FC<ProTableFullScreenProps>;
|
10
|
+
export default FullScreen;
|
@@ -29,6 +29,8 @@ var FullScreen = function FullScreen(props) {
|
|
29
29
|
}, [visible, actionRef]);
|
30
30
|
|
31
31
|
var afterClose = function afterClose() {
|
32
|
+
var _document;
|
33
|
+
|
32
34
|
// 判断全屏前后筛选表单值是否有改变
|
33
35
|
var n = JSON.stringify(getValidValues(normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.values));
|
34
36
|
var f = JSON.stringify(getValidValues(fullscreenDataFilterForm === null || fullscreenDataFilterForm === void 0 ? void 0 : fullscreenDataFilterForm.values));
|
@@ -42,11 +44,17 @@ var FullScreen = function FullScreen(props) {
|
|
42
44
|
} // 关闭全屏后,关闭全屏表单onFilter
|
43
45
|
|
44
46
|
|
45
|
-
filterEnableRef.current.fullscreen = false;
|
47
|
+
filterEnableRef.current.fullscreen = false; // 移除类名
|
48
|
+
|
49
|
+
if (document && ((_document = document) === null || _document === void 0 ? void 0 : _document.body)) {
|
50
|
+
document.body.classList.remove('teamix-pro-table-fullscreen');
|
51
|
+
}
|
46
52
|
}; // 全屏开启之后
|
47
53
|
|
48
54
|
|
49
55
|
var afterOpen = function afterOpen() {
|
56
|
+
var _document2;
|
57
|
+
|
50
58
|
// 判断全屏前后筛选表单值是否有改变
|
51
59
|
var n = JSON.stringify(getValidValues(normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.values));
|
52
60
|
var f = JSON.stringify(getValidValues(fullscreenDataFilterForm === null || fullscreenDataFilterForm === void 0 ? void 0 : fullscreenDataFilterForm.values));
|
@@ -60,7 +68,12 @@ var FullScreen = function FullScreen(props) {
|
|
60
68
|
} // 全屏后,关闭普通表单onFilter
|
61
69
|
|
62
70
|
|
63
|
-
filterEnableRef.current.normal = false; //
|
71
|
+
filterEnableRef.current.normal = false; // 为 body 添加类名,用于判断是否全屏
|
72
|
+
|
73
|
+
if (document && ((_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.body)) {
|
74
|
+
document.body.classList.add('teamix-pro-table-fullscreen');
|
75
|
+
} // 消息提示
|
76
|
+
|
64
77
|
|
65
78
|
Message.show({
|
66
79
|
type: 'notice',
|