@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
@@ -0,0 +1,9 @@
|
|
1
|
+
import { PageProps } from '../../page-container';
|
2
|
+
import { ProPageHeaderProps } from '../../page-header';
|
3
|
+
import { ProTableProps } from '../../table';
|
4
|
+
export declare type ListPageProps = PageProps<{
|
5
|
+
header: ProPageHeaderProps;
|
6
|
+
content: ProTableProps;
|
7
|
+
}>;
|
8
|
+
export declare const ListPage: (props: ListPageProps) => JSX.Element;
|
9
|
+
export default ListPage;
|
@@ -1,6 +1,10 @@
|
|
1
1
|
var _excluded = ["loading", "pageProps"];
|
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 _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; }
|
6
10
|
|
@@ -23,17 +27,17 @@ export var ListPage = function ListPage(props) {
|
|
23
27
|
var contentProps = (pageProps === null || pageProps === void 0 ? void 0 : pageProps.content) || {
|
24
28
|
columns: []
|
25
29
|
};
|
26
|
-
return /*#__PURE__*/React.createElement(PageContainer,
|
30
|
+
return /*#__PURE__*/React.createElement(PageContainer, _objectSpread({
|
27
31
|
header: /*#__PURE__*/React.createElement(EditableContainer, {
|
28
32
|
id: "header",
|
29
33
|
component: "PageHeader"
|
30
|
-
}, /*#__PURE__*/React.createElement(PageHeader,
|
34
|
+
}, /*#__PURE__*/React.createElement(PageHeader, _objectSpread({
|
31
35
|
loading: loading
|
32
36
|
}, headerProps))),
|
33
37
|
content: /*#__PURE__*/React.createElement(EditableContainer, {
|
34
38
|
id: "content",
|
35
39
|
component: "ProTable"
|
36
|
-
}, /*#__PURE__*/React.createElement(ProTable,
|
40
|
+
}, /*#__PURE__*/React.createElement(ProTable, _objectSpread({
|
37
41
|
loading: loading
|
38
42
|
}, contentProps)))
|
39
43
|
}, others));
|
package/es/templates/index.js
CHANGED
@@ -1,6 +1,10 @@
|
|
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
|
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 _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); }
|
6
10
|
|
@@ -269,7 +273,7 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
269
273
|
}))
|
270
274
|
}, !_comment && renderStateNode()));
|
271
275
|
}, [_shape, icon, status, dotRender]);
|
272
|
-
return /*#__PURE__*/React.createElement(TimelineItem,
|
276
|
+
return /*#__PURE__*/React.createElement(TimelineItem, _objectSpread({
|
273
277
|
title: renderTitle(),
|
274
278
|
dot: renderNode(),
|
275
279
|
timeLeft: renderTimeLeft(),
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ProTimeLineProps } from './typing';
|
3
|
+
import ProTimeLineItem from './ProTimeLineItem';
|
4
|
+
import './index.scss';
|
5
|
+
interface ProTimelineProperties {
|
6
|
+
/** ProTimeLineItem */
|
7
|
+
Item: typeof ProTimeLineItem;
|
8
|
+
}
|
9
|
+
declare const ProTimeline: React.FC<ProTimeLineProps> & ProTimelineProperties;
|
10
|
+
export { ProTimeline, ProTimeLineItem };
|
package/es/timeline/index.js
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
var _excluded = ["items", "comment", "shape", "fold", "children"];
|
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 _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; }
|
6
10
|
|
@@ -43,7 +47,7 @@ var ProTimeline = function ProTimeline(props) {
|
|
43
47
|
// 传递了 item 采用 item 渲染数组的方式
|
44
48
|
if (items) {
|
45
49
|
return items.map(function (item, index) {
|
46
|
-
return /*#__PURE__*/React.createElement(ProTimeLineItem,
|
50
|
+
return /*#__PURE__*/React.createElement(ProTimeLineItem, _objectSpread({
|
47
51
|
key: index,
|
48
52
|
_shape: shape,
|
49
53
|
_comment: comment
|
@@ -56,7 +60,7 @@ var ProTimeline = function ProTimeline(props) {
|
|
56
60
|
|
57
61
|
|
58
62
|
var renderProTimeline = function renderProTimeline() {
|
59
|
-
return /*#__PURE__*/React.createElement(Timeline,
|
63
|
+
return /*#__PURE__*/React.createElement(Timeline, _objectSpread({
|
60
64
|
fold: fold
|
61
65
|
}, others), renderItem());
|
62
66
|
};
|
@@ -0,0 +1,106 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { ProTagItem } from '../field';
|
3
|
+
export declare type ProTimeLineItemStatus = 'success' | 'fail' | 'process' | 'warning' | 'wait';
|
4
|
+
export declare type FoldProps = {
|
5
|
+
/**
|
6
|
+
* 折叠区域
|
7
|
+
*/
|
8
|
+
foldArea: [number, number];
|
9
|
+
/**
|
10
|
+
* 是否展示折叠图标
|
11
|
+
*/
|
12
|
+
foldShow: boolean;
|
13
|
+
};
|
14
|
+
export declare type ProTimeLineProps = {
|
15
|
+
/**
|
16
|
+
* 时间线:节点展示类型
|
17
|
+
*/
|
18
|
+
shape?: 'circle' | 'dot';
|
19
|
+
/**
|
20
|
+
* 内部渲染自组件
|
21
|
+
*/
|
22
|
+
items?: ProTimeLineItemProps[];
|
23
|
+
/**
|
24
|
+
* 时间线: 自定义折叠选项
|
25
|
+
*/
|
26
|
+
fold?: FoldProps[];
|
27
|
+
/**
|
28
|
+
* 是否为评论型 timeline
|
29
|
+
*/
|
30
|
+
comment?: boolean;
|
31
|
+
};
|
32
|
+
export declare type ProTimeLineItemProps = {
|
33
|
+
/**
|
34
|
+
* 是否为评论型 timeline
|
35
|
+
*/
|
36
|
+
_comment?: boolean;
|
37
|
+
/**
|
38
|
+
* 时间线:节点展示类型
|
39
|
+
*/
|
40
|
+
_shape?: 'circle' | 'dot';
|
41
|
+
/**
|
42
|
+
* 节点状态
|
43
|
+
*/
|
44
|
+
status?: string | ProTimeLineItemStatus;
|
45
|
+
/**
|
46
|
+
* 图标
|
47
|
+
*/
|
48
|
+
icon?: string;
|
49
|
+
/**
|
50
|
+
* 节点的内容
|
51
|
+
*/
|
52
|
+
content?: ReactNode;
|
53
|
+
/**
|
54
|
+
* 节点标题
|
55
|
+
*/
|
56
|
+
title?: ReactNode;
|
57
|
+
/**
|
58
|
+
* 自定义渲染
|
59
|
+
*/
|
60
|
+
dotRender?: (index?: number, status?: string) => ReactNode;
|
61
|
+
/**
|
62
|
+
* 节点副标题
|
63
|
+
* @deprecated 弃用,请使用 `time`
|
64
|
+
*/
|
65
|
+
subTitle?: ReactNode;
|
66
|
+
/**
|
67
|
+
* 右侧时间
|
68
|
+
*/
|
69
|
+
time?: ReactNode;
|
70
|
+
/**
|
71
|
+
* 节点对应描述
|
72
|
+
*/
|
73
|
+
discription?: ReactNode;
|
74
|
+
/**
|
75
|
+
* 节点的标签
|
76
|
+
*/
|
77
|
+
tags?: ProTagItem[] | ReactNode;
|
78
|
+
/**
|
79
|
+
* 左侧展示时间
|
80
|
+
*/
|
81
|
+
timeLeft?: ReactNode;
|
82
|
+
/**
|
83
|
+
* 头像
|
84
|
+
*/
|
85
|
+
image?: string | ReactNode;
|
86
|
+
/**
|
87
|
+
* animation 动画
|
88
|
+
*/
|
89
|
+
animation?: boolean;
|
90
|
+
/**
|
91
|
+
* 卡片是否可折叠
|
92
|
+
*/
|
93
|
+
collapsible?: boolean;
|
94
|
+
/**
|
95
|
+
* 默认是否折叠,用于非受控模式
|
96
|
+
*/
|
97
|
+
defaultCollapsed?: boolean;
|
98
|
+
/**
|
99
|
+
* 是否折叠,受控模式
|
100
|
+
*/
|
101
|
+
collapsed?: boolean;
|
102
|
+
/**
|
103
|
+
* 折叠状态改变的回调函数
|
104
|
+
*/
|
105
|
+
onCollapse?: (collapsed: boolean) => void;
|
106
|
+
};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { MessageProps } from '@alicloudfe/components/types/message';
|
2
|
+
export declare type ProMessageProps = MessageProps | string;
|
3
|
+
export declare const renderProMessage: (message?: ProMessageProps | undefined, defaultProps?: MessageProps | undefined) => JSX.Element | null;
|
package/es/utils/message.js
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
function
|
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; }
|
2
|
+
|
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; }
|
4
|
+
|
5
|
+
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
6
|
|
3
7
|
import React from 'react';
|
4
8
|
import { Message } from '@alicloudfe/components';
|
@@ -8,8 +12,8 @@ export var renderProMessage = function renderProMessage(message, defaultProps) {
|
|
8
12
|
}
|
9
13
|
|
10
14
|
if (typeof message === 'string') {
|
11
|
-
return /*#__PURE__*/React.createElement(Message, defaultProps, message);
|
15
|
+
return /*#__PURE__*/React.createElement(Message, _objectSpread({}, defaultProps), message);
|
12
16
|
}
|
13
17
|
|
14
|
-
return /*#__PURE__*/React.createElement(Message,
|
18
|
+
return /*#__PURE__*/React.createElement(Message, _objectSpread(_objectSpread({}, defaultProps), message));
|
15
19
|
};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { MaybePromise } from '@teamix/utils';
|
3
|
+
export interface BaseAction {
|
4
|
+
/** 事件触发方式,默认是 onClick */
|
5
|
+
trigger?: string;
|
6
|
+
/** 事件发生时,是否执行 e.preventDefault() 方法 */
|
7
|
+
preventDefault?: boolean;
|
8
|
+
/** 事件发生时,是否执行 e.stopPropagation() 方法 */
|
9
|
+
stopPropagation?: boolean;
|
10
|
+
/** 事件执行前的处理函数
|
11
|
+
* 如果返回 false 或者 Promise<false>,则停止 Action 执行。
|
12
|
+
* 如果返回 true 或者 Promise<true>,则正常执行 Action。
|
13
|
+
* 如果返回其他对象,则正常执行 Action,并把返回的对象放到接下来 Action 的上下文中。
|
14
|
+
*/
|
15
|
+
beforeAction?: () => MaybePromise<any>;
|
16
|
+
/** 事件开始执行后的回调函数 */
|
17
|
+
onTrigger?: () => void;
|
18
|
+
/** 事件开始执行完毕的回调函数 */
|
19
|
+
onFinish?: (params?: any) => any;
|
20
|
+
}
|
21
|
+
export declare function eventHandler(action: BaseAction, actionContext: any, onTrigger: (context: any, e: React.MouseEvent<HTMLElement>) => void): {
|
22
|
+
[x: string]: (e: React.MouseEvent<HTMLElement>) => Promise<void>;
|
23
|
+
};
|
24
|
+
export default eventHandler;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { DialogAction } from './dialog';
|
2
|
+
export interface ConfirmAction extends DialogAction {
|
3
|
+
}
|
4
|
+
export declare function useConfirmAction(action: DialogAction, context?: any): {
|
5
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
6
|
+
};
|
7
|
+
export default useConfirmAction;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { DialogAction } from './dialog';
|
2
|
+
export interface DangerConfirmAction extends DialogAction {
|
3
|
+
}
|
4
|
+
export declare function useDangerConfirmAction(action: DialogAction, context?: any): {
|
5
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
6
|
+
};
|
7
|
+
export default useDangerConfirmAction;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { PopConfirmAction } from './pop-confirm';
|
2
|
+
export declare function useDangerPopConfirmAction(action: PopConfirmAction, context?: any): {
|
3
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
4
|
+
};
|
5
|
+
export default useDangerPopConfirmAction;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { DialogAction } from './dialog';
|
3
|
+
export interface DialogComponentAction extends DialogAction {
|
4
|
+
schema: any;
|
5
|
+
component: React.FC<any>;
|
6
|
+
}
|
7
|
+
export declare function useDialogComponentAction(action: DialogComponentAction, context?: any): {
|
8
|
+
[x: string]: (e: React.MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
9
|
+
};
|
10
|
+
export default useDialogComponentAction;
|
@@ -16,6 +16,12 @@ var _excluded = ["schema", "component"];
|
|
16
16
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18
18
|
|
19
|
+
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; }
|
20
|
+
|
21
|
+
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; }
|
22
|
+
|
23
|
+
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; }
|
24
|
+
|
19
25
|
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; }
|
20
26
|
|
21
27
|
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; }
|
@@ -26,7 +32,7 @@ function useDialogComponentAction(action, context) {
|
|
26
32
|
others = _objectWithoutProperties(action, _excluded);
|
27
33
|
|
28
34
|
return (0, _dialog.default)(Object.assign({
|
29
|
-
content: /*#__PURE__*/_react.default.createElement(Component, (0, _utils.addContext)(schema, context)),
|
35
|
+
content: /*#__PURE__*/_react.default.createElement(Component, _objectSpread({}, (0, _utils.addContext)(schema, context))),
|
30
36
|
closeable: true
|
31
37
|
}, others), context);
|
32
38
|
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ProFormProps, ProFormSchema, ProFormType } from '../form';
|
3
|
+
import { RequestAction } from './request';
|
4
|
+
import { DialogAction } from './dialog';
|
5
|
+
export interface DialogFormAction extends DialogAction {
|
6
|
+
/** 表单初始值 */
|
7
|
+
initialValues?: any;
|
8
|
+
/** 表单初始化数据请求 */
|
9
|
+
initialRequest?: RequestAction;
|
10
|
+
/** 表单提交发送数据请求时,是否携带全部表单数据。默认携带 */
|
11
|
+
useFieldValuesForRequest?: boolean;
|
12
|
+
/**
|
13
|
+
* @deprecated 建议使用 schema 配置 ProFormProps 代替
|
14
|
+
*/
|
15
|
+
formProps?: Omit<ProFormProps, 'schema' | 'form'>;
|
16
|
+
/** 同时支持两种配置方式:
|
17
|
+
* 如果想完整定制表单,可使用完整的表单配置项 ProFormProps,但不可以传 form 字段,可以通过 formRef 获取内部 form 实例。
|
18
|
+
* 否则可以只配置 ProFormSchema
|
19
|
+
*/
|
20
|
+
schema: ProFormSchema | Omit<ProFormProps, 'form'>;
|
21
|
+
/** 外部传来的 formRef,用于获取内置 form 实例 */
|
22
|
+
formRef?: React.MutableRefObject<ProFormType | undefined>;
|
23
|
+
/** 是否开启懒惰校验,只校验第一个非法规则,默认开启 */
|
24
|
+
validateFirst?: boolean;
|
25
|
+
}
|
26
|
+
export declare function useDialogFormAction(action: DialogFormAction, context?: any): {
|
27
|
+
[x: string]: (e: React.MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
28
|
+
};
|
29
|
+
export default useDialogFormAction;
|
@@ -37,8 +37,6 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
37
37
|
|
38
38
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
39
39
|
|
40
|
-
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); }
|
41
|
-
|
42
40
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
43
41
|
|
44
42
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -163,10 +161,10 @@ var DialogForm = function DialogForm(props) {
|
|
163
161
|
style: {
|
164
162
|
display: 'block'
|
165
163
|
}
|
166
|
-
}, /*#__PURE__*/_react.default.createElement(_form.default,
|
164
|
+
}, /*#__PURE__*/_react.default.createElement(_form.default, _objectSpread(_objectSpread({
|
167
165
|
form: form,
|
168
166
|
schema: formSchema
|
169
|
-
}, getDefaultFormPropsByDialogSize(size), otherFormProps)));
|
167
|
+
}, getDefaultFormPropsByDialogSize(size)), otherFormProps)));
|
170
168
|
};
|
171
169
|
|
172
170
|
function useDialogFormAction(action, context) {
|
@@ -198,7 +196,7 @@ function useDialogFormAction(action, context) {
|
|
198
196
|
formProps: formProps,
|
199
197
|
context: contentContext
|
200
198
|
};
|
201
|
-
return /*#__PURE__*/_react.default.createElement(DialogForm,
|
199
|
+
return /*#__PURE__*/_react.default.createElement(DialogForm, _objectSpread({
|
202
200
|
innerFormRef: innerFormRef,
|
203
201
|
formRef: propsFormRef
|
204
202
|
}, dialogFormProps));
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { DialogAction } from './dialog';
|
2
|
+
import { ProInfoProps } from '..';
|
3
|
+
export interface DialogInfoAction extends DialogAction {
|
4
|
+
schema: ProInfoProps;
|
5
|
+
}
|
6
|
+
export declare function useDialogInfoAction(action: DialogInfoAction, context?: any): {
|
7
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
8
|
+
};
|
9
|
+
export default useDialogInfoAction;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { DialogAction } from './dialog';
|
2
|
+
import { ProTableProps } from '..';
|
3
|
+
export interface DialogTableAction extends DialogAction {
|
4
|
+
schema: ProTableProps;
|
5
|
+
}
|
6
|
+
export declare function useDialogTableAction(action: DialogTableAction, context?: any): {
|
7
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
8
|
+
};
|
9
|
+
export default useDialogTableAction;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { QuickShowConfig } from '@alicloudfe/components/types/dialog';
|
3
|
+
import { quickShowDrawerProps } from '@alicloudfe/components/types/drawer';
|
4
|
+
import { ProFormSchema, ProFormSchemaItem } from '../form';
|
5
|
+
import { ProMessageProps } from '../utils/message';
|
6
|
+
import { RequestAction } from './request';
|
7
|
+
export interface DialogAction extends Omit<RequestAction, 'url'>, Omit<QuickShowConfig, 'onError' | 'type'>, Omit<quickShowDrawerProps, 'trigger' | 'animation' | 'height' | 'locale' | 'onError'> {
|
8
|
+
/** 点击「确认按钮」后的数据请求地址,非必填,不填就不发请求 */
|
9
|
+
url?: string;
|
10
|
+
/** 弹窗类型,支持普通弹窗和抽屉两种模式,默认为普通弹窗 */
|
11
|
+
dialogType?: 'dialog' | 'drawer' | 'pop';
|
12
|
+
/** 弹窗快捷调用类型 */
|
13
|
+
dialogQuickShowType?: 'alert' | 'confirm';
|
14
|
+
/** 弹窗消息类型 */
|
15
|
+
messageType?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
|
16
|
+
/** 位于弹窗内容最上方的自定义内容区 */
|
17
|
+
beforeContent?: React.ReactNode;
|
18
|
+
/** 位于弹窗内容上方的消息提示区 */
|
19
|
+
message?: ProMessageProps;
|
20
|
+
/** 位于弹窗内容下方的自定义内容区 */
|
21
|
+
afterContent?: React.ReactNode;
|
22
|
+
/** 弹窗页脚描述区,位于按钮组的对面 */
|
23
|
+
footerDescription?: React.ReactNode | ProFormSchema | ProFormSchemaItem;
|
24
|
+
/** 弹窗内容组件的 schema */
|
25
|
+
schema?: any;
|
26
|
+
/** 弹窗内容区的组件 */
|
27
|
+
component?: any;
|
28
|
+
/** 点击确定自定义回调函数 */
|
29
|
+
onOk?: any;
|
30
|
+
/** 点击取消自定义回调函数 */
|
31
|
+
onCancel?: any;
|
32
|
+
/** 隐藏footer区域 */
|
33
|
+
hideFooter?: boolean;
|
34
|
+
/** 支持通过传函数自定义底部按钮 */
|
35
|
+
footer?: any;
|
36
|
+
}
|
37
|
+
export declare function useDialogAction(action: DialogAction, actionContext?: any, hasForm?: boolean): {
|
38
|
+
[x: string]: (e: React.MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
39
|
+
};
|
40
|
+
export default useDialogAction;
|
package/lib/actions/dialog.js
CHANGED
@@ -255,7 +255,7 @@ function useDialogAction(action, actionContext, hasForm) {
|
|
255
255
|
var dialogContext = Object.assign({}, context, {
|
256
256
|
hide: hide
|
257
257
|
});
|
258
|
-
var dialogContent = Component ? /*#__PURE__*/_react.default.createElement(Component, (0, _utils2.addContext)(componentProps, dialogContext)) : addContextForReactNode(content, dialogContext);
|
258
|
+
var dialogContent = Component ? /*#__PURE__*/_react.default.createElement(Component, _objectSpread({}, (0, _utils2.addContext)(componentProps, dialogContext))) : addContextForReactNode(content, dialogContext);
|
259
259
|
|
260
260
|
var quickShowProps = _objectSpread(_objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, "".concat(isPop ? 'onConfirm' : 'onOk'), hideFooter && !isPop && isDrawer ? false : onOk), _defineProperty(_objectSpread2, "onCancel", hideFooter && !isPop && isDrawer ? false : function () {
|
261
261
|
propsOnCancel && propsOnCancel(context);
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { DialogFormAction } from './dialog-form';
|
2
|
+
export declare type DrawerFormAction = DialogFormAction;
|
3
|
+
export declare function useDrawerFormAction(action: DrawerFormAction, context?: any): {
|
4
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
5
|
+
};
|
6
|
+
export default useDrawerFormAction;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { DialogInfoAction } from './dialog-info';
|
2
|
+
export declare type DrawerInfoAction = DialogInfoAction;
|
3
|
+
export declare function useDrawerInfoAction(action: DrawerInfoAction, context?: any): {
|
4
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
5
|
+
};
|
6
|
+
export default useDrawerInfoAction;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { DialogTableAction } from './dialog-table';
|
2
|
+
export declare type DrawerTableAction = DialogTableAction;
|
3
|
+
export declare function useDrawerTableAction(action: DrawerTableAction, context?: any): {
|
4
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
5
|
+
};
|
6
|
+
export default useDrawerTableAction;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { DialogAction } from './dialog';
|
2
|
+
export declare type DrawerAction = Omit<DialogAction, 'dialogQuickShowType' | 'messageType'>;
|
3
|
+
export declare function useDrawerAction(action: DrawerAction, context?: any): {
|
4
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
5
|
+
};
|
6
|
+
export default useDrawerAction;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { DialogAction } from './dialog';
|
2
|
+
export interface ErrorAction extends DialogAction {
|
3
|
+
}
|
4
|
+
export declare function useErrorAction(action: DialogAction, context?: any): {
|
5
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
6
|
+
};
|
7
|
+
export default useErrorAction;
|