@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,111 @@
|
|
1
|
+
import React, { ReactNode } from 'react';
|
2
|
+
import { ButtonProps } from '@alicloudfe/components/types/button';
|
3
|
+
import { MenuButtonProps } from '@alicloudfe/components/types/menu-button';
|
4
|
+
import { TooltipProps } from '@alicloudfe/components/types/balloon';
|
5
|
+
import { LinkAction } from './link';
|
6
|
+
import { RequestAction } from './request';
|
7
|
+
import { DialogAction } from './dialog';
|
8
|
+
import { DialogFormAction } from './dialog-form';
|
9
|
+
import { DialogTableAction } from './dialog-table';
|
10
|
+
import { DialogInfoAction } from './dialog-info';
|
11
|
+
import { PopConfirmAction } from './pop-confirm';
|
12
|
+
import './index.scss';
|
13
|
+
export declare type ProActionConfig = ({
|
14
|
+
type: 'dialog-form' | 'drawer-form';
|
15
|
+
} & DialogFormAction) | ({
|
16
|
+
type: 'dialog-table' | 'drawer-table';
|
17
|
+
} & DialogTableAction) | ({
|
18
|
+
type: 'dialog-info' | 'drawer-info';
|
19
|
+
} & DialogInfoAction) | ({
|
20
|
+
type: 'pop-confirm' | 'danger-pop-confirm';
|
21
|
+
} & PopConfirmAction) | ({
|
22
|
+
type: 'dialog' | 'drawer' | 'confirm' | 'danger-confirm' | 'notice' | 'error';
|
23
|
+
} & DialogAction) | ({
|
24
|
+
type: 'request';
|
25
|
+
} & RequestAction) | ({
|
26
|
+
type: 'link';
|
27
|
+
} & LinkAction);
|
28
|
+
export declare function registerActionHandler(id: string, extendActionId: string, defaultConfig: any): void;
|
29
|
+
export declare function useAction(config?: ProActionConfig, context?: any): any;
|
30
|
+
export interface ProActionButtonProps extends ProActionCommonProps, ButtonProps {
|
31
|
+
config?: ProActionConfig;
|
32
|
+
disabled?: any;
|
33
|
+
tooltip?: ReactNode;
|
34
|
+
disabledTooltip?: ReactNode;
|
35
|
+
icon?: string;
|
36
|
+
tooltipProps?: TooltipProps;
|
37
|
+
onClick?: (event: React.MouseEvent<Element, MouseEvent>, context?: any) => void;
|
38
|
+
}
|
39
|
+
export declare const ProActionButton: (props: ProActionButtonProps) => JSX.Element;
|
40
|
+
export interface ProActionCommonProps {
|
41
|
+
key?: string | number;
|
42
|
+
visible?: any;
|
43
|
+
context?: any;
|
44
|
+
'data-teamix-spm'?: string;
|
45
|
+
}
|
46
|
+
export interface ProActionMenuButtonProps extends ProActionCommonProps, Omit<MenuButtonProps, 'visible'> {
|
47
|
+
actions: ProActionProps[];
|
48
|
+
icon?: string;
|
49
|
+
noArrow?: boolean;
|
50
|
+
'data-teamix-spm'?: string;
|
51
|
+
}
|
52
|
+
export declare const ProActionMenuButton: (props: ProActionMenuButtonProps) => JSX.Element;
|
53
|
+
export interface ProActionDividerProps extends ProActionCommonProps {
|
54
|
+
type: 'divider';
|
55
|
+
}
|
56
|
+
export declare type ProActionProps = ProActionButtonProps | ProActionMenuButtonProps | ProActionDividerProps;
|
57
|
+
export declare type ProActionGroupProps = {
|
58
|
+
/** 操作组类型:按钮、文字按钮 */
|
59
|
+
type?: 'button' | 'text';
|
60
|
+
/** 上下文 */
|
61
|
+
context?: any;
|
62
|
+
/** 操作项配置 */
|
63
|
+
actions: ProActionProps[];
|
64
|
+
/** 操作按钮最长数量,超出后折叠,默认为4 */
|
65
|
+
max?: number;
|
66
|
+
/**
|
67
|
+
* @deprecated 建议使用 more 代替
|
68
|
+
*/
|
69
|
+
moreText?: string;
|
70
|
+
/** 更多按钮的配置,只有在actions数量超过max时才有效 */
|
71
|
+
more?: string | Omit<ProActionMenuButtonProps, 'actions'>;
|
72
|
+
/** 是否有分割线,只有type="text"时生效,默认有分割线 */
|
73
|
+
divider?: boolean;
|
74
|
+
/** 用于埋点 */
|
75
|
+
['data-teamix-spm']?: string;
|
76
|
+
} & React.HTMLAttributes<HTMLElement>;
|
77
|
+
export declare function ProActionGroup(props: ProActionGroupProps): JSX.Element;
|
78
|
+
declare const ProAction: (props: ProActionProps) => JSX.Element;
|
79
|
+
export default ProAction;
|
80
|
+
/**
|
81
|
+
* @deprecated 建议使用 ProActionGroup 代替
|
82
|
+
*/
|
83
|
+
export declare const ActionGroup: typeof ProActionGroup;
|
84
|
+
/**
|
85
|
+
* @deprecated 建议使用 ProActionButton 代替
|
86
|
+
*/
|
87
|
+
export declare const ActionButton: (props: ProActionButtonProps) => JSX.Element;
|
88
|
+
/**
|
89
|
+
* @deprecated 建议使用 ProActionMenuButton 代替
|
90
|
+
*/
|
91
|
+
export declare const ActionMenuButton: (props: ProActionMenuButtonProps) => JSX.Element;
|
92
|
+
/**
|
93
|
+
* @deprecated 建议使用 ProActionConfig 代替
|
94
|
+
*/
|
95
|
+
export declare type ActionConfig = ProActionConfig;
|
96
|
+
/**
|
97
|
+
* @deprecated 建议使用 ProActionButtonProps 代替
|
98
|
+
*/
|
99
|
+
export declare type IActionButton = ProActionButtonProps;
|
100
|
+
/**
|
101
|
+
* @deprecated 建议使用 ProActionMenuButtonProps 代替
|
102
|
+
*/
|
103
|
+
export declare type IActionMenuButton = ProActionMenuButtonProps;
|
104
|
+
/**
|
105
|
+
* @deprecated 建议使用 ProActionGroupProps 代替
|
106
|
+
*/
|
107
|
+
export declare type ActionGroupProps = ProActionGroupProps;
|
108
|
+
/**
|
109
|
+
* @deprecated 建议使用 ProActionProps 代替
|
110
|
+
*/
|
111
|
+
export declare type ICommonActionButton = ProActionProps;
|
package/lib/actions/index.js
CHANGED
@@ -76,8 +76,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
76
76
|
|
77
77
|
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; }
|
78
78
|
|
79
|
-
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); }
|
80
|
-
|
81
79
|
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; }
|
82
80
|
|
83
81
|
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; }
|
@@ -227,7 +225,7 @@ var ProActionButton = function ProActionButton(props) {
|
|
227
225
|
buttonProps['data-teamix-spm'] = dataTeamixSpm;
|
228
226
|
}
|
229
227
|
|
230
|
-
var content = /*#__PURE__*/_react.default.createElement(_components.Button,
|
228
|
+
var content = /*#__PURE__*/_react.default.createElement(_components.Button, _objectSpread({
|
231
229
|
type: type
|
232
230
|
}, buttonProps), buttonContent(children, icon, iconSize, context));
|
233
231
|
|
@@ -240,15 +238,15 @@ var ProActionButton = function ProActionButton(props) {
|
|
240
238
|
if (tooltip || disabledTooltip) {
|
241
239
|
if (tooltip && !disabledTooltip) {
|
242
240
|
if (!disabled) {
|
243
|
-
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, baseToolTipProps, tooltip);
|
241
|
+
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), tooltip);
|
244
242
|
}
|
245
243
|
} else if (!tooltip && disabledTooltip) {
|
246
244
|
if (disabled) {
|
247
|
-
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, baseToolTipProps, disabledTooltip);
|
245
|
+
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), disabledTooltip);
|
248
246
|
}
|
249
247
|
} else if (tooltip && disabledTooltip) {
|
250
248
|
var showToolTip = disabled ? disabledTooltip : tooltip;
|
251
|
-
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, baseToolTipProps, showToolTip);
|
249
|
+
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), showToolTip);
|
252
250
|
}
|
253
251
|
}
|
254
252
|
|
@@ -303,19 +301,19 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
|
|
303
301
|
if (tooltip || disabledTooltip) {
|
304
302
|
if (tooltip && !disabledTooltip) {
|
305
303
|
if (!disabled) {
|
306
|
-
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, baseToolTipProps, tooltip);
|
304
|
+
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), tooltip);
|
307
305
|
}
|
308
306
|
} else if (!tooltip && disabledTooltip) {
|
309
307
|
if (disabled) {
|
310
|
-
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, baseToolTipProps, disabledTooltip);
|
308
|
+
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), disabledTooltip);
|
311
309
|
}
|
312
310
|
} else if (tooltip && disabledTooltip) {
|
313
311
|
var showToolTip = disabled ? disabledTooltip : tooltip;
|
314
|
-
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, baseToolTipProps, showToolTip);
|
312
|
+
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), showToolTip);
|
315
313
|
}
|
316
314
|
}
|
317
315
|
|
318
|
-
return /*#__PURE__*/_react.default.createElement("div",
|
316
|
+
return /*#__PURE__*/_react.default.createElement("div", _objectSpread({
|
319
317
|
className: (0, _classnames.default)(_defineProperty({}, basePrefix('disabled'), disabled), basePrefix('menu-item'), prefixCls('menu-item'))
|
320
318
|
}, buttonProps), content);
|
321
319
|
};
|
@@ -359,7 +357,7 @@ var ProActionMenuButton = function ProActionMenuButton(props) {
|
|
359
357
|
noArrow = props.noArrow,
|
360
358
|
others = _objectWithoutProperties(props, _excluded4);
|
361
359
|
|
362
|
-
return /*#__PURE__*/_react.default.createElement(_components.MenuButton,
|
360
|
+
return /*#__PURE__*/_react.default.createElement(_components.MenuButton, _objectSpread({
|
363
361
|
popupTriggerType: "hover",
|
364
362
|
autoWidth: false,
|
365
363
|
menuProps: {
|
@@ -377,11 +375,11 @@ var ProActionMenuButton = function ProActionMenuButton(props) {
|
|
377
375
|
}, others), actions.map(function (action, i) {
|
378
376
|
return renderCommonActionButtonMenuItem(action, action.key || i, context, others === null || others === void 0 ? void 0 : others['data-teamix-spm']);
|
379
377
|
}));
|
380
|
-
};
|
378
|
+
}; // 超出 max,则折叠起来
|
379
|
+
|
381
380
|
|
382
381
|
exports.ProActionMenuButton = ProActionMenuButton;
|
383
382
|
|
384
|
-
// 超出 max,则折叠起来
|
385
383
|
function foldExtraActions(actions, max, moreConfig) {
|
386
384
|
if (actions.length <= max) {
|
387
385
|
return actions;
|
@@ -419,10 +417,9 @@ function renderCommonActionButton(button, context, isTypeText, dataTeamixSpm) {
|
|
419
417
|
});
|
420
418
|
}
|
421
419
|
|
422
|
-
var
|
423
|
-
|
424
|
-
|
425
|
-
others = _objectWithoutProperties(_ref, _excluded5);
|
420
|
+
var buttonContext = button.context,
|
421
|
+
text = button.text,
|
422
|
+
others = _objectWithoutProperties(button, _excluded5);
|
426
423
|
|
427
424
|
var buttonProps = _objectSpread({
|
428
425
|
context: Object.assign({}, context, buttonContext),
|
@@ -434,10 +431,10 @@ function renderCommonActionButton(button, context, isTypeText, dataTeamixSpm) {
|
|
434
431
|
}
|
435
432
|
|
436
433
|
if (!button.actions) {
|
437
|
-
return /*#__PURE__*/_react.default.createElement(ProActionButton, buttonProps);
|
434
|
+
return /*#__PURE__*/_react.default.createElement(ProActionButton, _objectSpread({}, buttonProps));
|
438
435
|
}
|
439
436
|
|
440
|
-
return /*#__PURE__*/_react.default.createElement(ProActionMenuButton, buttonProps);
|
437
|
+
return /*#__PURE__*/_react.default.createElement(ProActionMenuButton, _objectSpread({}, buttonProps));
|
441
438
|
}
|
442
439
|
|
443
440
|
function getDefaultMoreButton(type, more) {
|
@@ -476,10 +473,9 @@ function getKey(index, key) {
|
|
476
473
|
|
477
474
|
function getActionConfig(action, index, context) {
|
478
475
|
if (action.actions) {
|
479
|
-
var
|
480
|
-
|
481
|
-
|
482
|
-
_others = _objectWithoutProperties(_ref2, _excluded6);
|
476
|
+
var _key = action.key,
|
477
|
+
actions = action.actions,
|
478
|
+
_others = _objectWithoutProperties(action, _excluded6);
|
483
479
|
|
484
480
|
return _objectSpread({
|
485
481
|
key: getKey(index, _key),
|
@@ -491,10 +487,9 @@ function getActionConfig(action, index, context) {
|
|
491
487
|
}, (0, _utils.getTargetValue)(_others, context));
|
492
488
|
}
|
493
489
|
|
494
|
-
var
|
495
|
-
|
496
|
-
|
497
|
-
others = _objectWithoutProperties(_ref3, _excluded7);
|
490
|
+
var key = action.key,
|
491
|
+
config = action.config,
|
492
|
+
others = _objectWithoutProperties(action, _excluded7);
|
498
493
|
|
499
494
|
return _objectSpread({
|
500
495
|
key: getKey(index, key),
|
@@ -525,7 +520,7 @@ function ProActionGroup(props) {
|
|
525
520
|
return action.visible !== false;
|
526
521
|
});
|
527
522
|
var formatedActions = formatGroupActions(filteredActions, max, getDefaultMoreButton(type, more || moreText));
|
528
|
-
return /*#__PURE__*/_react.default.createElement("div",
|
523
|
+
return /*#__PURE__*/_react.default.createElement("div", _objectSpread({
|
529
524
|
className: (0, _classnames.default)('teamix-pro-actions', "teamix-pro-actions-type-".concat(type), className, {
|
530
525
|
'teamix-pro-actions-divider': type === 'button' ? false : divider
|
531
526
|
})
|
@@ -569,8 +564,4 @@ var ActionButton = ProActionButton;
|
|
569
564
|
|
570
565
|
exports.ActionButton = ActionButton;
|
571
566
|
var ActionMenuButton = ProActionMenuButton;
|
572
|
-
/**
|
573
|
-
* @deprecated 建议使用 ProActionConfig 代替
|
574
|
-
*/
|
575
|
-
|
576
567
|
exports.ActionMenuButton = ActionMenuButton;
|
package/lib/actions/index.scss
CHANGED
@@ -110,15 +110,20 @@
|
|
110
110
|
|
111
111
|
.next-dialog-body {
|
112
112
|
.teamix-pro-info {
|
113
|
+
padding-right: 16px;
|
113
114
|
.next-card-content-container {
|
114
115
|
margin-top: 10px;
|
115
116
|
padding-bottom: 10px;
|
117
|
+
padding-right: 0;
|
116
118
|
.next-col.next-col-24:last-child {
|
117
119
|
.teamix-pro-info-item:last-child {
|
118
120
|
padding-bottom: 0px;
|
119
121
|
}
|
120
122
|
}
|
121
123
|
}
|
124
|
+
.teamix-pro-info-item-value {
|
125
|
+
padding-right: 0px;
|
126
|
+
}
|
122
127
|
}
|
123
128
|
}
|
124
129
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { LocationHistory } from '@teamix/utils';
|
2
|
+
import { BaseAction } from './base';
|
3
|
+
export interface LinkAction extends BaseAction, LocationHistory {
|
4
|
+
}
|
5
|
+
export declare function useLinkAction(action: LinkAction, actionContext?: any): {
|
6
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
7
|
+
};
|
8
|
+
export default useLinkAction;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { DialogAction } from './dialog';
|
2
|
+
export interface NoticeAction extends DialogAction {
|
3
|
+
}
|
4
|
+
export declare function useNoticeAction(action: DialogAction, context?: any): {
|
5
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
6
|
+
};
|
7
|
+
export default useNoticeAction;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { IPopConfirmProps } from '@teamix/pop-confirm';
|
2
|
+
import { DialogAction } from './dialog';
|
3
|
+
export declare type PopConfirmAction = DialogAction & Omit<IPopConfirmProps, 'type' | 'trigger'> & {
|
4
|
+
popType?: IPopConfirmProps['type'];
|
5
|
+
};
|
6
|
+
export declare function usePopConfirmAction(action: PopConfirmAction, context?: any): {
|
7
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
8
|
+
};
|
9
|
+
export default usePopConfirmAction;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { CommonRequestConfig } from '@teamix/utils';
|
2
|
+
import { BaseAction } from './base';
|
3
|
+
export interface RequestAction extends CommonRequestConfig, BaseAction {
|
4
|
+
}
|
5
|
+
export declare function doRequest(action: RequestAction, context?: any, history?: any, extraParams?: any): Promise<unknown>;
|
6
|
+
export declare function useRequestAction(action: RequestAction, actionContext?: any): {
|
7
|
+
loading: boolean;
|
8
|
+
};
|
9
|
+
export default useRequestAction;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function addContext(props?: any, context?: any): any;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ProCardProps } from './index';
|
3
|
+
/**
|
4
|
+
* @deprecated 建议使用 ProCardProps 代替
|
5
|
+
*/
|
6
|
+
export declare type ProCardContainerProps = ProCardProps;
|
7
|
+
/**
|
8
|
+
* @deprecated 建议使用 ProCard 代替
|
9
|
+
*/
|
10
|
+
export declare const ProCardContainer: React.FC<ProCardContainerProps>;
|
11
|
+
/**
|
12
|
+
* @deprecated 建议使用 ProCardContainer 代替
|
13
|
+
*/
|
14
|
+
export declare const CardContainer: React.FC<ProCardProps>;
|
15
|
+
/**
|
16
|
+
* @deprecated 建议使用 ProCardContainerProps 代替
|
17
|
+
*/
|
18
|
+
export declare type CardContainerProps = ProCardContainerProps;
|
@@ -11,11 +11,17 @@ var _index = require("./index");
|
|
11
11
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
13
|
|
14
|
+
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; }
|
15
|
+
|
16
|
+
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; }
|
17
|
+
|
18
|
+
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; }
|
19
|
+
|
14
20
|
/**
|
15
21
|
* @deprecated 建议使用 ProCard 代替
|
16
22
|
*/
|
17
23
|
var ProCardContainer = function ProCardContainer(props) {
|
18
|
-
return /*#__PURE__*/_react.default.createElement(_index.ProCard, props);
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_index.ProCard, _objectSpread({}, props));
|
19
25
|
};
|
20
26
|
|
21
27
|
exports.ProCardContainer = ProCardContainer;
|
@@ -28,8 +34,4 @@ ProCardContainer.defaultProps = {
|
|
28
34
|
*/
|
29
35
|
|
30
36
|
var CardContainer = ProCardContainer;
|
31
|
-
/**
|
32
|
-
* @deprecated 建议使用 ProCardContainerProps 代替
|
33
|
-
*/
|
34
|
-
|
35
37
|
exports.CardContainer = CardContainer;
|
package/lib/card/divider.js
CHANGED
@@ -9,10 +9,14 @@ var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
11
|
|
12
|
-
function
|
12
|
+
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; }
|
13
|
+
|
14
|
+
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; }
|
15
|
+
|
16
|
+
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; }
|
13
17
|
|
14
18
|
var ProCardDivider = function ProCardDivider(props) {
|
15
|
-
return /*#__PURE__*/_react.default.createElement("div",
|
19
|
+
return /*#__PURE__*/_react.default.createElement("div", _objectSpread({
|
16
20
|
className: "teamix-pro-card-divider"
|
17
21
|
}, props));
|
18
22
|
};
|
@@ -0,0 +1,109 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ProTagItem } from '../field';
|
3
|
+
import { ProMessageProps } from '../utils/message';
|
4
|
+
import { ProActionGroupProps } from '../actions';
|
5
|
+
import './index.scss';
|
6
|
+
export * from './card-container';
|
7
|
+
export interface ProCardProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
8
|
+
/** 内容部分 */
|
9
|
+
children?: React.ReactNode;
|
10
|
+
/**卡片标题 */
|
11
|
+
title?: React.ReactNode;
|
12
|
+
/**卡片副标题 */
|
13
|
+
subTitle?: React.ReactNode;
|
14
|
+
/** 标题右侧图标 hover 提示信息 */
|
15
|
+
tooltip?: React.ReactNode;
|
16
|
+
/** 标题右侧图标 */
|
17
|
+
tooltipIcon?: React.ReactNode;
|
18
|
+
/** 标签组 */
|
19
|
+
tags?: ProTagItem[];
|
20
|
+
/** 标题右侧描述 */
|
21
|
+
description?: React.ReactNode;
|
22
|
+
/** 额外信息区域,位于卡片右上角,可以配置一些常用轻量操作 */
|
23
|
+
extra?: React.ReactNode | ProActionGroupProps;
|
24
|
+
/** 卡片操作区域,位于卡片最下方,可以配置一些常用轻量操作 */
|
25
|
+
actions?: React.ReactNode | ProActionGroupProps;
|
26
|
+
/** 卡片背景图 */
|
27
|
+
image?: string;
|
28
|
+
/** 位于弹窗内容上方的消息提示区 */
|
29
|
+
message?: ProMessageProps;
|
30
|
+
/** 卡片标题下方是否有分割线 */
|
31
|
+
divider?: boolean;
|
32
|
+
/**
|
33
|
+
* @deprecated 建议使用 borderColor = 'none' 代替
|
34
|
+
*/
|
35
|
+
bordered?: boolean;
|
36
|
+
/** 卡片在 hover 时拥有阴影效果 */
|
37
|
+
hoveredShadow?: boolean;
|
38
|
+
/** 卡片是否为紧凑模式,紧凑模式下卡片没有内边距和边框 */
|
39
|
+
compacted?: boolean;
|
40
|
+
/** 卡片内容是否居中展示 */
|
41
|
+
centered?: boolean;
|
42
|
+
/** 加载中状态 */
|
43
|
+
loading?: boolean;
|
44
|
+
/** 是否只是内容区加载,标题正常显示 */
|
45
|
+
contentLoading?: boolean;
|
46
|
+
/** 空状态 */
|
47
|
+
empty?: boolean;
|
48
|
+
/** 边框颜色 */
|
49
|
+
borderColor?: 'blue' | 'green' | 'red' | 'orange' | 'yellow' | 'grey' | 'transparent' | 'none';
|
50
|
+
/** 背景色 */
|
51
|
+
backgroundColor?: 'blue' | 'green' | 'red' | 'orange' | 'yellow' | 'grey' | 'transparent';
|
52
|
+
/** 内容区栅格排列 flex 方向,仅仅在卡片嵌套模式下生效 */
|
53
|
+
direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
54
|
+
/** 内容区栅格的间距,仅仅在卡片嵌套模式下生效 */
|
55
|
+
spacing?: [number, number] | number;
|
56
|
+
/** 内容区栅格超出部分是否换行展示,仅仅在卡片嵌套模式下生效 */
|
57
|
+
wrap?: boolean;
|
58
|
+
/** 卡片嵌套使用的模式下,子卡片分隔 */
|
59
|
+
split?: 'horizontal' | 'vertical';
|
60
|
+
/** 卡片嵌套使用的模式下,卡片占父卡片内容区域的栅格数量 */
|
61
|
+
col?: number | string;
|
62
|
+
/** 卡片是否可折叠 */
|
63
|
+
collapsible?: boolean;
|
64
|
+
/** 默认是否折叠,用于非受控模式 */
|
65
|
+
defaultCollapsed?: boolean;
|
66
|
+
/** 是否折叠,受控模式 */
|
67
|
+
collapsed?: boolean;
|
68
|
+
/** 折叠状态改变的回调函数 */
|
69
|
+
onCollapse?: (collapsed: boolean) => void;
|
70
|
+
/** 卡片 class */
|
71
|
+
className?: string;
|
72
|
+
/** 卡片样式 */
|
73
|
+
style?: React.CSSProperties;
|
74
|
+
/** 卡片内容 class */
|
75
|
+
contentClassName?: string;
|
76
|
+
/** 卡片内容样式 */
|
77
|
+
contentStyle?: React.CSSProperties;
|
78
|
+
/** 上下文 */
|
79
|
+
context?: any;
|
80
|
+
}
|
81
|
+
export declare const ProCard: {
|
82
|
+
(props: ProCardProps): JSX.Element;
|
83
|
+
defaultProps: {
|
84
|
+
bordered: boolean;
|
85
|
+
spacing: number;
|
86
|
+
direction: string;
|
87
|
+
};
|
88
|
+
Divider: {
|
89
|
+
(props: React.HTMLAttributes<HTMLElement>): JSX.Element;
|
90
|
+
isProCardDivider: boolean;
|
91
|
+
};
|
92
|
+
Selectable: {
|
93
|
+
(props: import("./selectable").ProCardSelectableProps): JSX.Element;
|
94
|
+
defaultProps: {
|
95
|
+
hoveredShadow: boolean;
|
96
|
+
};
|
97
|
+
isProCard: boolean;
|
98
|
+
};
|
99
|
+
Tab: {
|
100
|
+
(props: import("@alifd/next/types/tab").TabProps): JSX.Element;
|
101
|
+
Item: typeof import("@alifd/next/types/tab").Item;
|
102
|
+
};
|
103
|
+
isProCard: boolean;
|
104
|
+
};
|
105
|
+
export default ProCard;
|
106
|
+
/**
|
107
|
+
* @deprecated 建议使用 ProCardProps 代替
|
108
|
+
*/
|
109
|
+
export declare type CardProps = ProCardProps;
|
package/lib/card/index.js
CHANGED
@@ -78,8 +78,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
78
78
|
|
79
79
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
80
80
|
|
81
|
-
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); }
|
82
|
-
|
83
81
|
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; }
|
84
82
|
|
85
83
|
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; }
|
@@ -98,15 +96,14 @@ var renderActionGroup = function renderActionGroup(extra, context) {
|
|
98
96
|
}
|
99
97
|
|
100
98
|
if (extra.actions instanceof Array) {
|
101
|
-
var
|
102
|
-
|
103
|
-
others = _objectWithoutProperties(_ref, _excluded);
|
99
|
+
var userContext = extra.context,
|
100
|
+
others = _objectWithoutProperties(extra, _excluded);
|
104
101
|
|
105
102
|
var mergedContext = _objectSpread(_objectSpread({}, context), userContext);
|
106
103
|
|
107
|
-
return /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup,
|
104
|
+
return /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, _objectSpread(_objectSpread({
|
108
105
|
context: mergedContext
|
109
|
-
}, others, {
|
106
|
+
}, others), {}, {
|
110
107
|
type: "text"
|
111
108
|
}));
|
112
109
|
}
|
@@ -327,12 +324,12 @@ var ProCard = function ProCard(props) {
|
|
327
324
|
})));
|
328
325
|
};
|
329
326
|
|
330
|
-
return /*#__PURE__*/_react.default.createElement(_components.Card,
|
327
|
+
return /*#__PURE__*/_react.default.createElement(_components.Card, _objectSpread({
|
331
328
|
free: true,
|
332
329
|
className: cardClassName,
|
333
330
|
style: style,
|
334
|
-
actions: renderActionGroup(actions, context)
|
335
|
-
|
331
|
+
actions: renderActionGroup(actions, context),
|
332
|
+
// @ts-ignore
|
336
333
|
ref: cardRef
|
337
334
|
}, others), !loading && image && /*#__PURE__*/_react.default.createElement(_components.Card.Media, {
|
338
335
|
component: "img",
|
@@ -376,8 +373,4 @@ ProCard.Selectable = _selectable.default;
|
|
376
373
|
ProCard.Tab = _tab.default;
|
377
374
|
ProCard.isProCard = true;
|
378
375
|
var _default = ProCard;
|
379
|
-
/**
|
380
|
-
* @deprecated 建议使用 ProCardProps 代替
|
381
|
-
*/
|
382
|
-
|
383
376
|
exports.default = _default;
|
package/lib/card/index.scss
CHANGED
@@ -51,6 +51,12 @@
|
|
51
51
|
display: flex;
|
52
52
|
align-items: center;
|
53
53
|
|
54
|
+
.next-menu-btn.next-menu-btn.next-menu-btn.next-menu-btn.next-menu-btn.next-menu-btn {
|
55
|
+
i {
|
56
|
+
margin-right: 0;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
54
60
|
& > div {
|
55
61
|
display: flex;
|
56
62
|
align-items: center;
|
@@ -295,4 +301,5 @@
|
|
295
301
|
&.transparent {
|
296
302
|
background: transparent;
|
297
303
|
}
|
304
|
+
|
298
305
|
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { ProCardProps } from './index';
|
2
|
+
export interface ProCardSelectableProps extends Omit<ProCardProps, 'onSelect'> {
|
3
|
+
selected?: boolean;
|
4
|
+
onSelect?: (selected: boolean) => void;
|
5
|
+
}
|
6
|
+
declare const ProCardSelectable: {
|
7
|
+
(props: ProCardSelectableProps): JSX.Element;
|
8
|
+
defaultProps: {
|
9
|
+
hoveredShadow: boolean;
|
10
|
+
};
|
11
|
+
isProCard: boolean;
|
12
|
+
};
|
13
|
+
export default ProCardSelectable;
|
package/lib/card/selectable.js
CHANGED
@@ -19,7 +19,11 @@ var _excluded = ["selected", "onSelect", "className", "onClick"];
|
|
19
19
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
21
|
|
22
|
-
function
|
22
|
+
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; }
|
23
|
+
|
24
|
+
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
|
+
|
26
|
+
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; }
|
23
27
|
|
24
28
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
25
29
|
|
@@ -34,7 +38,7 @@ var ProCardSelectable = function ProCardSelectable(props) {
|
|
34
38
|
_onClick = props.onClick,
|
35
39
|
others = _objectWithoutProperties(props, _excluded);
|
36
40
|
|
37
|
-
return /*#__PURE__*/_react.default.createElement(_index.ProCard,
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_index.ProCard, _objectSpread({
|
38
42
|
className: (0, _classnames.default)(cls(), className),
|
39
43
|
borderColor: selected ? 'blue' : 'grey',
|
40
44
|
extra: /*#__PURE__*/_react.default.createElement(_icon.default, {
|