@teamix/pro 1.0.25 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.css +1 -1
- package/dist/all.js +10401 -14141
- package/dist/all.min.css +1 -1
- package/dist/all.min.js +1 -1
- package/es/actions/base.d.ts +13 -0
- package/es/actions/base.js +23 -0
- package/es/actions/confirm.d.ts +7 -0
- package/es/actions/confirm.js +11 -0
- package/es/actions/danger-confirm.d.ts +7 -0
- package/es/actions/danger-confirm.js +14 -0
- package/es/actions/dialog-component.d.ts +10 -0
- package/es/actions/dialog-component.js +25 -0
- package/es/actions/dialog-form.d.ts +15 -0
- package/es/actions/dialog-form.js +129 -0
- package/es/actions/dialog-table.d.ts +4 -0
- package/es/actions/dialog-table.js +1 -0
- package/es/actions/dialog.d.ts +17 -0
- package/es/actions/dialog.js +197 -0
- package/es/actions/drawer-form.d.ts +6 -0
- package/es/actions/drawer-form.js +7 -0
- package/es/actions/drawer-table.d.ts +2 -0
- package/es/actions/drawer-table.js +1 -0
- package/es/actions/drawer.d.ts +6 -0
- package/es/actions/drawer.js +7 -0
- package/es/actions/error.d.ts +7 -0
- package/es/actions/error.js +11 -0
- package/es/actions/index.d.ts +76 -0
- package/es/actions/index.js +317 -0
- package/es/actions/index.scss +34 -0
- package/es/actions/link.d.ts +14 -0
- package/es/actions/link.js +45 -0
- package/es/actions/notice.d.ts +7 -0
- package/es/actions/notice.js +11 -0
- package/es/actions/request.d.ts +9 -0
- package/es/actions/request.js +60 -0
- package/es/card/index.d.ts +30 -0
- package/es/card/index.js +159 -0
- package/es/card/index.scss +98 -0
- package/es/field/index.d.ts +3 -0
- package/es/field/index.js +3 -0
- package/es/form/Components/Editable/index.d.ts +20 -0
- package/es/form/Components/Editable/index.js +228 -0
- package/es/form/Components/FormGroup/index.d.ts +13 -0
- package/es/form/Components/FormGroup/index.js +89 -0
- package/es/form/Components/FormGroup/index.scss +23 -0
- package/es/form/Components/ProField/index.d.ts +150 -0
- package/es/form/Components/ProField/index.js +53 -0
- package/es/form/Components/Query/index.d.ts +4 -0
- package/es/form/Components/Query/index.js +70 -0
- package/es/form/Components/Query/index.scss +90 -0
- package/es/form/Components/QueryFilter/index.d.ts +3 -0
- package/es/form/Components/QueryFilter/index.js +111 -0
- package/es/form/Components/Search/index.d.ts +11 -0
- package/es/form/Components/Search/index.js +89 -0
- package/es/form/Filter/index.d.ts +16 -0
- package/es/form/Filter/index.js +218 -0
- package/es/form/ProForm/index.d.ts +5 -0
- package/es/form/ProForm/index.js +100 -0
- package/es/form/ProForm/index.scss +248 -0
- package/es/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/es/form/SchemaForm/adapterComponent.js +17 -0
- package/es/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/es/form/SchemaForm/adapterDecorator.js +28 -0
- package/es/form/SchemaForm/adapterType.d.ts +5 -0
- package/es/form/SchemaForm/adapterType.js +54 -0
- package/es/form/SchemaForm/index.d.ts +4 -0
- package/es/form/SchemaForm/index.js +258 -0
- package/es/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCards.js +69 -0
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCollapse.js +78 -0
- package/es/form/SchemaForm/initializeArrayIcon.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayIcon.js +50 -0
- package/es/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayItems.js +97 -0
- package/es/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayTable.js +66 -0
- package/es/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormButton.js +75 -0
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormCollapse.js +43 -0
- package/es/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormGroup.js +46 -0
- package/es/form/SchemaForm/initializeFormStep.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormStep.js +48 -0
- package/es/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormTab.js +53 -0
- package/es/form/SchemaForm/initializeProField.d.ts +5 -0
- package/es/form/SchemaForm/initializeProField.js +69 -0
- package/es/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/es/form/SchemaForm/initializeRequest.js +25 -0
- package/es/form/SchemaForm/reactions.d.ts +4 -0
- package/es/form/SchemaForm/reactions.js +62 -0
- package/es/form/index.d.ts +20 -0
- package/es/form/index.js +24 -0
- package/es/form/typing.d.ts +78 -0
- package/es/form/typing.js +1 -0
- package/es/form/utils.d.ts +9 -0
- package/es/form/utils.js +108 -0
- package/es/form/warning.d.ts +3 -0
- package/es/form/warning.js +20 -0
- package/es/hooks/index.d.ts +2 -0
- package/es/hooks/index.js +2 -0
- package/es/index.d.ts +24 -23
- package/es/index.js +25 -24
- package/es/info/components/FormItem/index.d.ts +5 -0
- package/es/info/components/FormItem/index.js +63 -0
- package/es/info/components/FormItem/index.scss +49 -0
- package/es/info/components/InfoGroup/index.d.ts +5 -0
- package/es/info/components/InfoGroup/index.js +16 -0
- package/es/info/components/InfoGroup/index.scss +8 -0
- package/es/info/components/InfoValueItem/index.d.ts +5 -0
- package/es/info/components/InfoValueItem/index.js +211 -0
- package/es/info/components/InfoValueItem/index.scss +21 -0
- package/es/info/components/baseInfo/index.d.ts +7 -0
- package/es/info/components/baseInfo/index.js +72 -0
- package/es/info/components/baseInfo/index.scss +3 -0
- package/es/info/components/headerInfo/index.d.ts +7 -0
- package/es/info/components/headerInfo/index.js +84 -0
- package/es/info/components/headerInfo/index.scss +0 -0
- package/es/info/components/tableInfo/index.d.ts +8 -0
- package/es/info/components/tableInfo/index.js +172 -0
- package/es/info/components/tableInfo/index.scss +18 -0
- package/es/info/index.d.ts +9 -0
- package/es/info/index.js +85 -0
- package/es/info/index.scss +8 -0
- package/es/info/typing.d.ts +143 -0
- package/es/info/typing.js +1 -0
- package/es/info/utils/index.d.ts +3 -0
- package/es/info/utils/index.js +12 -0
- package/es/info/utils/layout.d.ts +2 -0
- package/es/info/utils/layout.js +58 -0
- package/es/info/utils/useInfoRequest.d.ts +14 -0
- package/es/info/utils/useInfoRequest.js +73 -0
- package/es/info/utils/utils.d.ts +1 -0
- package/es/info/utils/utils.js +13 -0
- package/es/layout/index.d.ts +3 -0
- package/es/layout/index.js +3 -0
- package/es/nocode/configurators/Card.d.ts +3 -0
- package/es/nocode/configurators/Card.js +109 -0
- package/es/nocode/configurators/PageHeader.d.ts +3 -0
- package/es/nocode/configurators/PageHeader.js +196 -0
- package/es/nocode/configurators/ProTable.d.ts +3 -0
- package/es/nocode/configurators/ProTable.js +317 -0
- package/es/nocode/configurators/common.d.ts +176 -0
- package/es/nocode/configurators/common.js +314 -0
- package/es/nocode/configurators/index.d.ts +15 -0
- package/es/nocode/configurators/index.js +27 -0
- package/es/nocode/configurators/map.d.ts +2 -0
- package/es/nocode/configurators/map.js +8 -0
- package/es/nocode/index.d.ts +8 -0
- package/es/nocode/index.js +11 -0
- package/es/nocode/index.scss +93 -0
- package/es/nocode/pages/editor.d.ts +12 -0
- package/es/nocode/pages/editor.js +40 -0
- package/es/nocode/pages/index.d.ts +14 -0
- package/es/nocode/pages/index.js +41 -0
- package/es/nocode/pages/playground.d.ts +11 -0
- package/es/nocode/pages/playground.js +130 -0
- package/es/nocode/pages/renderer.d.ts +10 -0
- package/es/nocode/pages/renderer.js +144 -0
- package/es/nocode/playground.d.ts +14 -0
- package/es/nocode/playground.js +68 -0
- package/es/page-container/index.d.ts +3 -0
- package/es/page-container/index.js +3 -0
- package/es/page-header/index.d.ts +42 -0
- package/es/page-header/index.js +222 -0
- package/es/page-header/index.scss +171 -0
- package/es/skeleton/index.d.ts +3 -0
- package/es/skeleton/index.js +3 -0
- package/es/table/components/Filter/index.d.ts +9 -0
- package/es/table/components/Filter/index.js +231 -0
- package/es/table/components/Filter/index.scss +23 -0
- package/es/table/components/Layout/index.d.ts +5 -0
- package/es/table/components/Layout/index.js +241 -0
- package/es/table/components/Layout/index.scss +39 -0
- package/es/table/components/QuickAction/index.d.ts +10 -0
- package/es/table/components/QuickAction/index.js +53 -0
- package/es/table/components/QuickAction/index.scss +0 -0
- package/es/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/es/table/components/ToolBar/DensityIcon.js +117 -0
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FilterColumnIcon.js +284 -0
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +89 -0
- package/es/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/es/table/components/ToolBar/Fullscreen.js +68 -0
- package/es/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/es/table/components/ToolBar/RefreshIcon.js +45 -0
- package/es/table/components/ToolBar/index.d.ts +5 -0
- package/es/table/components/ToolBar/index.js +79 -0
- package/es/table/components/ToolBar/index.scss +110 -0
- package/es/table/index.d.ts +7 -0
- package/es/table/index.js +620 -0
- package/es/table/index.scss +104 -0
- package/es/table/typing.d.ts +222 -0
- package/es/table/typing.js +1 -0
- package/es/table/utils/columnRender.d.ts +13 -0
- package/es/table/utils/columnRender.js +185 -0
- package/es/table/utils/genProColumnToColumn.d.ts +9 -0
- package/es/table/utils/genProColumnToColumn.js +51 -0
- package/es/table/utils/getTableProps.d.ts +2 -0
- package/es/table/utils/getTableProps.js +4 -0
- package/es/table/utils/getTableSortIcons.d.ts +3 -0
- package/es/table/utils/getTableSortIcons.js +21 -0
- package/es/table/utils/index.d.ts +4 -0
- package/es/table/utils/index.js +100 -0
- package/es/table/utils/useTableSelection.d.ts +3 -0
- package/es/table/utils/useTableSelection.js +107 -0
- package/es/templates/Detail/index.d.ts +2 -0
- package/es/templates/Detail/index.js +5 -0
- package/es/templates/Detail/index.scss +3 -0
- package/es/templates/Form/index.d.ts +2 -0
- package/es/templates/Form/index.js +5 -0
- package/es/templates/Form/index.scss +3 -0
- package/es/templates/List/index.d.ts +9 -0
- package/es/templates/List/index.js +45 -0
- package/es/templates/List/index.scss +3 -0
- package/es/templates/index.d.ts +5 -0
- package/es/templates/index.js +7 -0
- package/es/templates/index.scss +3 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.js +2 -0
- package/lib/actions/base.d.ts +13 -0
- package/lib/actions/base.js +33 -0
- package/lib/actions/confirm.d.ts +7 -0
- package/lib/actions/confirm.js +25 -0
- package/lib/actions/danger-confirm.d.ts +7 -0
- package/lib/actions/danger-confirm.js +28 -0
- package/lib/actions/dialog-component.d.ts +10 -0
- package/lib/actions/dialog-component.js +39 -0
- package/lib/actions/dialog-form.d.ts +15 -0
- package/lib/actions/dialog-form.js +152 -0
- package/lib/actions/dialog-table.d.ts +4 -0
- package/lib/actions/dialog-table.js +5 -0
- package/lib/actions/dialog.d.ts +17 -0
- package/lib/actions/dialog.js +219 -0
- package/lib/actions/drawer-form.d.ts +6 -0
- package/lib/actions/drawer-form.js +18 -0
- package/lib/actions/drawer-table.d.ts +2 -0
- package/lib/actions/drawer-table.js +5 -0
- package/lib/actions/drawer.d.ts +6 -0
- package/lib/actions/drawer.js +20 -0
- package/lib/actions/error.d.ts +7 -0
- package/lib/actions/error.js +25 -0
- package/lib/actions/index.d.ts +76 -0
- package/lib/actions/index.js +356 -0
- package/lib/actions/index.scss +34 -0
- package/lib/actions/link.d.ts +14 -0
- package/lib/actions/link.js +60 -0
- package/lib/actions/notice.d.ts +7 -0
- package/lib/actions/notice.js +25 -0
- package/lib/actions/request.d.ts +9 -0
- package/lib/actions/request.js +75 -0
- package/lib/card/index.d.ts +30 -0
- package/lib/card/index.js +179 -0
- package/lib/card/index.scss +98 -0
- package/lib/field/index.d.ts +3 -0
- package/lib/field/index.js +30 -0
- package/lib/form/Components/Editable/index.d.ts +20 -0
- package/lib/form/Components/Editable/index.js +251 -0
- package/lib/form/Components/FormGroup/index.d.ts +13 -0
- package/lib/form/Components/FormGroup/index.js +103 -0
- package/lib/form/Components/FormGroup/index.scss +23 -0
- package/lib/form/Components/ProField/index.d.ts +150 -0
- package/lib/form/Components/ProField/index.js +68 -0
- package/lib/form/Components/Query/index.d.ts +4 -0
- package/lib/form/Components/Query/index.js +91 -0
- package/lib/form/Components/Query/index.scss +90 -0
- package/lib/form/Components/QueryFilter/index.d.ts +3 -0
- package/lib/form/Components/QueryFilter/index.js +130 -0
- package/lib/form/Components/Search/index.d.ts +11 -0
- package/lib/form/Components/Search/index.js +103 -0
- package/lib/form/Filter/index.d.ts +16 -0
- package/lib/form/Filter/index.js +242 -0
- package/lib/form/ProForm/index.d.ts +5 -0
- package/lib/form/ProForm/index.js +125 -0
- package/lib/form/ProForm/index.scss +248 -0
- package/lib/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/lib/form/SchemaForm/adapterComponent.js +27 -0
- package/lib/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/lib/form/SchemaForm/adapterDecorator.js +34 -0
- package/lib/form/SchemaForm/adapterType.d.ts +5 -0
- package/lib/form/SchemaForm/adapterType.js +64 -0
- package/lib/form/SchemaForm/index.d.ts +4 -0
- package/lib/form/SchemaForm/index.js +301 -0
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCards.js +76 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.js +85 -0
- package/lib/form/SchemaForm/initializeArrayIcon.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayIcon.js +61 -0
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayItems.js +104 -0
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayTable.js +73 -0
- package/lib/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormButton.js +82 -0
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormCollapse.js +50 -0
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormGroup.js +53 -0
- package/lib/form/SchemaForm/initializeFormStep.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormStep.js +55 -0
- package/lib/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormTab.js +60 -0
- package/lib/form/SchemaForm/initializeProField.d.ts +5 -0
- package/lib/form/SchemaForm/initializeProField.js +76 -0
- package/lib/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/lib/form/SchemaForm/initializeRequest.js +34 -0
- package/lib/form/SchemaForm/reactions.d.ts +4 -0
- package/lib/form/SchemaForm/reactions.js +72 -0
- package/lib/form/index.d.ts +20 -0
- package/lib/form/index.js +149 -0
- package/lib/form/typing.d.ts +78 -0
- package/lib/form/typing.js +5 -0
- package/lib/form/utils.d.ts +9 -0
- package/lib/form/utils.js +124 -0
- package/lib/form/warning.d.ts +3 -0
- package/lib/form/warning.js +28 -0
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.js +17 -0
- package/lib/index.d.ts +24 -23
- package/lib/index.js +79 -61
- package/lib/info/components/FormItem/index.d.ts +5 -0
- package/lib/info/components/FormItem/index.js +78 -0
- package/lib/info/components/FormItem/index.scss +49 -0
- package/lib/info/components/InfoGroup/index.d.ts +5 -0
- package/lib/info/components/InfoGroup/index.js +27 -0
- package/lib/info/components/InfoGroup/index.scss +8 -0
- package/lib/info/components/InfoValueItem/index.d.ts +5 -0
- package/lib/info/components/InfoValueItem/index.js +237 -0
- package/lib/info/components/InfoValueItem/index.scss +21 -0
- package/lib/info/components/baseInfo/index.d.ts +7 -0
- package/lib/info/components/baseInfo/index.js +99 -0
- package/lib/info/components/baseInfo/index.scss +3 -0
- package/lib/info/components/headerInfo/index.d.ts +7 -0
- package/lib/info/components/headerInfo/index.js +111 -0
- package/lib/info/components/headerInfo/index.scss +0 -0
- package/lib/info/components/tableInfo/index.d.ts +8 -0
- package/lib/info/components/tableInfo/index.js +193 -0
- package/lib/info/components/tableInfo/index.scss +18 -0
- package/lib/info/index.d.ts +9 -0
- package/lib/info/index.js +121 -0
- package/lib/info/index.scss +8 -0
- package/lib/info/typing.d.ts +143 -0
- package/lib/info/typing.js +5 -0
- package/lib/info/utils/index.d.ts +3 -0
- package/lib/info/utils/index.js +19 -0
- package/lib/info/utils/layout.d.ts +2 -0
- package/lib/info/utils/layout.js +65 -0
- package/lib/info/utils/useInfoRequest.d.ts +14 -0
- package/lib/info/utils/useInfoRequest.js +82 -0
- package/lib/info/utils/utils.d.ts +1 -0
- package/lib/info/utils/utils.js +20 -0
- package/lib/layout/index.d.ts +3 -0
- package/lib/layout/index.js +30 -0
- package/lib/nocode/configurators/Card.d.ts +3 -0
- package/lib/nocode/configurators/Card.js +116 -0
- package/lib/nocode/configurators/PageHeader.d.ts +3 -0
- package/lib/nocode/configurators/PageHeader.js +205 -0
- package/lib/nocode/configurators/ProTable.d.ts +3 -0
- package/lib/nocode/configurators/ProTable.js +326 -0
- package/lib/nocode/configurators/common.d.ts +176 -0
- package/lib/nocode/configurators/common.js +325 -0
- package/lib/nocode/configurators/index.d.ts +15 -0
- package/lib/nocode/configurators/index.js +44 -0
- package/lib/nocode/configurators/map.d.ts +2 -0
- package/lib/nocode/configurators/map.js +21 -0
- package/lib/nocode/index.d.ts +8 -0
- package/lib/nocode/index.js +76 -0
- package/lib/nocode/index.scss +93 -0
- package/lib/nocode/pages/editor.d.ts +12 -0
- package/lib/nocode/pages/editor.js +58 -0
- package/lib/nocode/pages/index.d.ts +14 -0
- package/lib/nocode/pages/index.js +93 -0
- package/lib/nocode/pages/playground.d.ts +11 -0
- package/lib/nocode/pages/playground.js +158 -0
- package/lib/nocode/pages/renderer.d.ts +10 -0
- package/lib/nocode/pages/renderer.js +164 -0
- package/lib/nocode/playground.d.ts +14 -0
- package/lib/nocode/playground.js +91 -0
- package/lib/page-container/index.d.ts +3 -0
- package/lib/page-container/index.js +30 -0
- package/lib/page-header/index.d.ts +42 -0
- package/lib/page-header/index.js +240 -0
- package/lib/page-header/index.scss +171 -0
- package/lib/skeleton/index.d.ts +3 -0
- package/lib/skeleton/index.js +30 -0
- package/lib/table/components/Filter/index.d.ts +9 -0
- package/lib/table/components/Filter/index.js +252 -0
- package/lib/table/components/Filter/index.scss +23 -0
- package/lib/table/components/Layout/index.d.ts +5 -0
- package/lib/table/components/Layout/index.js +265 -0
- package/lib/table/components/Layout/index.scss +39 -0
- package/lib/table/components/QuickAction/index.d.ts +10 -0
- package/lib/table/components/QuickAction/index.js +65 -0
- package/lib/table/components/QuickAction/index.scss +0 -0
- package/lib/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/DensityIcon.js +135 -0
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FilterColumnIcon.js +303 -0
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +107 -0
- package/lib/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/lib/table/components/ToolBar/Fullscreen.js +85 -0
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/RefreshIcon.js +60 -0
- package/lib/table/components/ToolBar/index.d.ts +5 -0
- package/lib/table/components/ToolBar/index.js +96 -0
- package/lib/table/components/ToolBar/index.scss +110 -0
- package/lib/table/index.d.ts +7 -0
- package/lib/table/index.js +681 -0
- package/lib/table/index.scss +104 -0
- package/lib/table/typing.d.ts +222 -0
- package/lib/table/typing.js +5 -0
- package/lib/table/utils/columnRender.d.ts +13 -0
- package/lib/table/utils/columnRender.js +201 -0
- package/lib/table/utils/genProColumnToColumn.d.ts +9 -0
- package/lib/table/utils/genProColumnToColumn.js +62 -0
- package/lib/table/utils/getTableProps.d.ts +2 -0
- package/lib/table/utils/getTableProps.js +13 -0
- package/lib/table/utils/getTableSortIcons.d.ts +3 -0
- package/lib/table/utils/getTableSortIcons.js +34 -0
- package/lib/table/utils/index.d.ts +4 -0
- package/lib/table/utils/index.js +112 -0
- package/lib/table/utils/useTableSelection.d.ts +3 -0
- package/lib/table/utils/useTableSelection.js +112 -0
- package/lib/templates/Detail/index.d.ts +2 -0
- package/lib/templates/Detail/index.js +18 -0
- package/lib/templates/Detail/index.scss +3 -0
- package/lib/templates/Form/index.d.ts +2 -0
- package/lib/templates/Form/index.js +18 -0
- package/lib/templates/Form/index.scss +3 -0
- package/lib/templates/List/index.d.ts +9 -0
- package/lib/templates/List/index.js +67 -0
- package/lib/templates/List/index.scss +3 -0
- package/lib/templates/index.d.ts +5 -0
- package/lib/templates/index.js +59 -0
- package/lib/templates/index.scss +3 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +17 -0
- package/package.json +21 -11
@@ -0,0 +1,193 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
11
|
+
|
12
|
+
require("./index.scss");
|
13
|
+
|
14
|
+
var _components = require("@alicloudfe/components");
|
15
|
+
|
16
|
+
var _card = _interopRequireDefault(require("../../../card"));
|
17
|
+
|
18
|
+
var _utils = require("@teamix/utils");
|
19
|
+
|
20
|
+
var _InfoValueItem = _interopRequireDefault(require("../InfoValueItem"));
|
21
|
+
|
22
|
+
var _2 = require("../../..");
|
23
|
+
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
|
+
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
27
|
+
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
29
|
+
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
31
|
+
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
33
|
+
|
34
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
35
|
+
|
36
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
37
|
+
|
38
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
39
|
+
|
40
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
41
|
+
|
42
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
43
|
+
|
44
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
45
|
+
|
46
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
47
|
+
|
48
|
+
var ProTableInfo = function ProTableInfo(props) {
|
49
|
+
var header = props.header,
|
50
|
+
columns = props.columns,
|
51
|
+
dataSource = props.dataSource,
|
52
|
+
layout = props.layout,
|
53
|
+
loading = props.loading,
|
54
|
+
result = props.result,
|
55
|
+
actionRef = props.actionRef;
|
56
|
+
var _layout$colNum = layout.colNum,
|
57
|
+
colNum = _layout$colNum === void 0 ? 2 : _layout$colNum,
|
58
|
+
_layout$labelGutter = layout.labelGutter,
|
59
|
+
labelGutter = _layout$labelGutter === void 0 ? '80px' : _layout$labelGutter;
|
60
|
+
|
61
|
+
var newColumns = function newColumns() {
|
62
|
+
return _toConsumableArray(new Array(colNum)).map(function (_, index) {
|
63
|
+
return [{
|
64
|
+
dataIndex: "label_".concat(index),
|
65
|
+
align: 'left',
|
66
|
+
height: 50,
|
67
|
+
width: labelGutter
|
68
|
+
}, {
|
69
|
+
dataIndex: "value_".concat(index),
|
70
|
+
align: 'left'
|
71
|
+
}];
|
72
|
+
}).reduce(function (acc, cur) {
|
73
|
+
return [].concat(_toConsumableArray(acc), _toConsumableArray(cur));
|
74
|
+
}, []);
|
75
|
+
};
|
76
|
+
|
77
|
+
var newDataSource = (0, _react.useMemo)(function () {
|
78
|
+
var nResult = [];
|
79
|
+
var columnsCopy = JSON.parse(JSON.stringify(columns)); // 取当前行的数据。直到取完
|
80
|
+
|
81
|
+
while (columnsCopy.length > 0) {
|
82
|
+
var filterColumns = [];
|
83
|
+
var col = colNum * 2; // 需要判断是否有合并行情况
|
84
|
+
|
85
|
+
while (col >= 2) {
|
86
|
+
if (columnsCopy.length > 0) {
|
87
|
+
var _columnsItem$colSpan;
|
88
|
+
|
89
|
+
var columnsItem = columnsCopy.shift();
|
90
|
+
var needCol = 1 + ((_columnsItem$colSpan = columnsItem === null || columnsItem === void 0 ? void 0 : columnsItem.colSpan) !== null && _columnsItem$colSpan !== void 0 ? _columnsItem$colSpan : 1); // 如果剩余的col能满足下一组数据那么就放在这一组
|
91
|
+
|
92
|
+
if (needCol <= col) {
|
93
|
+
var _columnsItem$colSpan2;
|
94
|
+
|
95
|
+
col = col - 1 - ((_columnsItem$colSpan2 = columnsItem === null || columnsItem === void 0 ? void 0 : columnsItem.colSpan) !== null && _columnsItem$colSpan2 !== void 0 ? _columnsItem$colSpan2 : 1);
|
96
|
+
filterColumns.push(columnsItem);
|
97
|
+
} else {
|
98
|
+
var _filterColumns$0$colS;
|
99
|
+
|
100
|
+
// 不满足条件。再安回去。。。
|
101
|
+
columnsCopy.unshift(columnsItem); // 并且把剩余的col都分配给前一组数据
|
102
|
+
|
103
|
+
filterColumns[0].colSpan = ((_filterColumns$0$colS = filterColumns[0].colSpan) !== null && _filterColumns$0$colS !== void 0 ? _filterColumns$0$colS : 1) + col; // 置0
|
104
|
+
|
105
|
+
col = 0;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
var itemData = filterColumns.map(function (item, index) {
|
111
|
+
var _item$title, _item$valueType, _item$dataIndex, _data;
|
112
|
+
|
113
|
+
var data = (_data = {}, _defineProperty(_data, "label_".concat(index), /*#__PURE__*/_react.default.createElement(_utils.LabelIconTip, {
|
114
|
+
label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
|
115
|
+
tooltip: item.tooltip,
|
116
|
+
icon: item.tooltipIcon
|
117
|
+
})), _defineProperty(_data, "value_".concat(index), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, loading && /*#__PURE__*/_react.default.createElement(_2.BaseSkeleton.Info, null), !loading && /*#__PURE__*/_react.default.createElement(_InfoValueItem.default, {
|
118
|
+
type: (_item$valueType = item === null || item === void 0 ? void 0 : item.valueType) !== null && _item$valueType !== void 0 ? _item$valueType : 'text',
|
119
|
+
value: (0, _utils.getTargetValue)("{{".concat((_item$dataIndex = item === null || item === void 0 ? void 0 : item.dataIndex) !== null && _item$dataIndex !== void 0 ? _item$dataIndex : '', "}}"), dataSource !== null && dataSource !== void 0 ? dataSource : result),
|
120
|
+
render: item.render,
|
121
|
+
dataSource: item.dataSource,
|
122
|
+
infoItem: item,
|
123
|
+
record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
|
124
|
+
actionRef: actionRef
|
125
|
+
}))), _data);
|
126
|
+
|
127
|
+
if (item.colSpan) {
|
128
|
+
data['formatter'] = {
|
129
|
+
colSpan: item.colSpan
|
130
|
+
};
|
131
|
+
}
|
132
|
+
|
133
|
+
return data;
|
134
|
+
}).reduce(function (acc, cur) {
|
135
|
+
return _objectSpread(_objectSpread({}, acc), cur);
|
136
|
+
}, {});
|
137
|
+
nResult.push(itemData);
|
138
|
+
}
|
139
|
+
|
140
|
+
return nResult;
|
141
|
+
}, [loading]);
|
142
|
+
|
143
|
+
var setCellProps = function setCellProps(rowIndex, colIndex, dataIndex, record) {
|
144
|
+
if (colIndex % 2 === 0) {
|
145
|
+
return {
|
146
|
+
className: 'key-type'
|
147
|
+
};
|
148
|
+
}
|
149
|
+
|
150
|
+
if (record.formatter) {
|
151
|
+
if (record.formatter.colSpan) {
|
152
|
+
if (colIndex === record.formatter.colSpan) {
|
153
|
+
return {
|
154
|
+
colSpan: record.formatter.colSpan
|
155
|
+
};
|
156
|
+
}
|
157
|
+
|
158
|
+
var length = Object.keys(record).length;
|
159
|
+
|
160
|
+
if (length <= 3) {
|
161
|
+
return {
|
162
|
+
colSpan: record.formatter.colSpan
|
163
|
+
};
|
164
|
+
}
|
165
|
+
|
166
|
+
if (length > 5) {
|
167
|
+
return {
|
168
|
+
colSpan: record.formatter.colSpan
|
169
|
+
};
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
return {
|
174
|
+
rowSpan: record.formatter.rowSpan
|
175
|
+
};
|
176
|
+
}
|
177
|
+
};
|
178
|
+
|
179
|
+
return /*#__PURE__*/_react.default.createElement(_card.default, _objectSpread({
|
180
|
+
hoveredShadow: false,
|
181
|
+
bordered: false
|
182
|
+
}, header), /*#__PURE__*/_react.default.createElement(_components.Table.StickyLock, {
|
183
|
+
className: "teamix-pro-info-table",
|
184
|
+
cellProps: setCellProps,
|
185
|
+
columns: newColumns(),
|
186
|
+
hasHeader: false,
|
187
|
+
hasBorder: true,
|
188
|
+
dataSource: newDataSource
|
189
|
+
}));
|
190
|
+
};
|
191
|
+
|
192
|
+
var _default = ProTableInfo;
|
193
|
+
exports.default = _default;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.teamix-pro-info-table {
|
2
|
+
text-align: center;
|
3
|
+
width: 100%;
|
4
|
+
color: var(--color-brand1-6);
|
5
|
+
.next-table td .next-table-cell-wrapper {
|
6
|
+
padding: 16px 24px;
|
7
|
+
}
|
8
|
+
.next-table-row.hovered {
|
9
|
+
background-color:var(--color-white);
|
10
|
+
}
|
11
|
+
.next-table-row {
|
12
|
+
color: var(--color-text1-3, #333333);
|
13
|
+
}
|
14
|
+
.key-type {
|
15
|
+
background: var(--color-fill1-2);
|
16
|
+
color: var(--color-text1-6, #666);
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './index.scss';
|
3
|
+
import { ProInfoProps } from './typing';
|
4
|
+
export * from './typing';
|
5
|
+
declare const ProInfo: {
|
6
|
+
(props: ProInfoProps): JSX.Element;
|
7
|
+
ProInfoGroup: React.FC<import("./typing").InfoGroupProps>;
|
8
|
+
};
|
9
|
+
export default ProInfo;
|
@@ -0,0 +1,121 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
var _exportNames = {};
|
9
|
+
exports.default = void 0;
|
10
|
+
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
12
|
+
|
13
|
+
var _tableInfo = _interopRequireDefault(require("./components/tableInfo"));
|
14
|
+
|
15
|
+
var _headerInfo = _interopRequireDefault(require("./components/headerInfo"));
|
16
|
+
|
17
|
+
var _baseInfo = _interopRequireDefault(require("./components/baseInfo"));
|
18
|
+
|
19
|
+
var _InfoGroup = _interopRequireDefault(require("./components/InfoGroup"));
|
20
|
+
|
21
|
+
require("./index.scss");
|
22
|
+
|
23
|
+
var _useInfoRequest2 = _interopRequireDefault(require("./utils/useInfoRequest"));
|
24
|
+
|
25
|
+
var _utils = require("./utils");
|
26
|
+
|
27
|
+
var _typing = require("./typing");
|
28
|
+
|
29
|
+
Object.keys(_typing).forEach(function (key) {
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
31
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
32
|
+
if (key in exports && exports[key] === _typing[key]) return;
|
33
|
+
Object.defineProperty(exports, key, {
|
34
|
+
enumerable: true,
|
35
|
+
get: function get() {
|
36
|
+
return _typing[key];
|
37
|
+
}
|
38
|
+
});
|
39
|
+
});
|
40
|
+
var _excluded = ["type", "url", "method", "formatResult", "params", "actionRef", "header"];
|
41
|
+
|
42
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
43
|
+
|
44
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
45
|
+
|
46
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
47
|
+
|
48
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
49
|
+
|
50
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
51
|
+
|
52
|
+
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; }
|
53
|
+
|
54
|
+
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; }
|
55
|
+
|
56
|
+
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; }
|
57
|
+
|
58
|
+
var ProInfo = function ProInfo(props) {
|
59
|
+
var type = props.type,
|
60
|
+
url = props.url,
|
61
|
+
method = props.method,
|
62
|
+
formatResult = props.formatResult,
|
63
|
+
params = props.params,
|
64
|
+
propsActionRef = props.actionRef,
|
65
|
+
_props$header = props.header,
|
66
|
+
header = _props$header === void 0 ? {} : _props$header,
|
67
|
+
others = _objectWithoutProperties(props, _excluded); // 请求数据
|
68
|
+
|
69
|
+
|
70
|
+
var _useInfoRequest = (0, _useInfoRequest2.default)({
|
71
|
+
url: url,
|
72
|
+
method: method,
|
73
|
+
params: params,
|
74
|
+
formatResult: formatResult
|
75
|
+
}),
|
76
|
+
loading = _useInfoRequest.loading,
|
77
|
+
result = _useInfoRequest.result,
|
78
|
+
_refresh = _useInfoRequest.refresh;
|
79
|
+
|
80
|
+
var actionRef = (0, _react.useRef)(); // 将 Actions 绑定到传入的 propsActionRef 中
|
81
|
+
|
82
|
+
if (propsActionRef) {
|
83
|
+
propsActionRef.current = actionRef.current;
|
84
|
+
} // 绑定 Actions
|
85
|
+
|
86
|
+
|
87
|
+
(0, _utils.useActionType)(actionRef, {
|
88
|
+
refresh: function refresh() {
|
89
|
+
_refresh === null || _refresh === void 0 ? void 0 : _refresh();
|
90
|
+
}
|
91
|
+
});
|
92
|
+
|
93
|
+
if (type === 'table') {
|
94
|
+
return /*#__PURE__*/_react.default.createElement(_tableInfo.default, _objectSpread(_objectSpread({}, others), {}, {
|
95
|
+
header: header,
|
96
|
+
loading: loading,
|
97
|
+
result: result,
|
98
|
+
actionRef: actionRef
|
99
|
+
}));
|
100
|
+
}
|
101
|
+
|
102
|
+
if (type === 'header') {
|
103
|
+
return /*#__PURE__*/_react.default.createElement(_headerInfo.default, _objectSpread(_objectSpread({}, others), {}, {
|
104
|
+
header: header,
|
105
|
+
loading: loading,
|
106
|
+
result: result,
|
107
|
+
actionRef: actionRef
|
108
|
+
}));
|
109
|
+
}
|
110
|
+
|
111
|
+
return /*#__PURE__*/_react.default.createElement(_baseInfo.default, _objectSpread(_objectSpread({}, others), {}, {
|
112
|
+
header: header,
|
113
|
+
loading: loading,
|
114
|
+
result: result,
|
115
|
+
actionRef: actionRef
|
116
|
+
}));
|
117
|
+
};
|
118
|
+
|
119
|
+
ProInfo.ProInfoGroup = _InfoGroup.default;
|
120
|
+
var _default = ProInfo;
|
121
|
+
exports.default = _default;
|
@@ -0,0 +1,143 @@
|
|
1
|
+
import { IProFieldFormatterProps, IProFieldOptionItem, IProFieldProps, IProFieldType, IProFieldValueEnum } from '../field';
|
2
|
+
import { ActionGroupProps, IActionButton } from '../actions';
|
3
|
+
import { Method } from 'axios';
|
4
|
+
import React from 'react';
|
5
|
+
import { CardProps } from '../card';
|
6
|
+
/** ProInfoBaseProps info 基础定义 */
|
7
|
+
export declare type ProInfoBaseProps = {
|
8
|
+
/** ProColums 定义,取代 Table 的 columns */
|
9
|
+
columns: ProInfoItemProps[];
|
10
|
+
/** 请求地址 */
|
11
|
+
url?: string;
|
12
|
+
/** 请求方法 */
|
13
|
+
method?: Method;
|
14
|
+
/** 请求参数 */
|
15
|
+
params?: object;
|
16
|
+
/** 对返回值的 data 进行映射处理 */
|
17
|
+
formatResult?: {
|
18
|
+
[key: string]: any;
|
19
|
+
} | ((res: any) => {
|
20
|
+
[key: string]: any;
|
21
|
+
});
|
22
|
+
/** 请求成功后经过 formatResult 转换后的回调 */
|
23
|
+
onFormatResult?: (data: any[]) => void;
|
24
|
+
/** 内部请求每次成功后的回调 */
|
25
|
+
onSuccess?: (res: any) => void;
|
26
|
+
/** 内部请求失败时的回调 */
|
27
|
+
onError?: (error: Error) => void;
|
28
|
+
/** ProInfo action 的引用,便于手动触发一些方法 */
|
29
|
+
actionRef?: React.MutableRefObject<ProInfoActionType | undefined>;
|
30
|
+
/** 标题区 */
|
31
|
+
header?: ProInfoHeaderProps;
|
32
|
+
/** info 数据源 */
|
33
|
+
dataSource?: {
|
34
|
+
[key: string]: any;
|
35
|
+
};
|
36
|
+
/** 布局值 */
|
37
|
+
layout?: BaseInfoLayoutProps;
|
38
|
+
};
|
39
|
+
/** ProInfoItemProps info 单元格 定义 */
|
40
|
+
export interface ProInfoItemProps {
|
41
|
+
/** 标题 */
|
42
|
+
title: string;
|
43
|
+
/** 列表项展示的Tooltip */
|
44
|
+
tooltip?: string;
|
45
|
+
/**
|
46
|
+
* title 之后展示一个 icon 设置,可传 TeamixIcon 对应的 type,也可以是自定义 Icon
|
47
|
+
*/
|
48
|
+
tooltipIcon?: React.ReactNode;
|
49
|
+
/** 对应 ProField 里面的 type */
|
50
|
+
valueType?: IProFieldType;
|
51
|
+
/** 渲染单元格内容字段 */
|
52
|
+
render?: IProFieldFormatterProps;
|
53
|
+
/** 枚举值 */
|
54
|
+
dataSource?: IProFieldValueEnum | IProFieldOptionItem[];
|
55
|
+
/** 表头的筛选菜单项,当值为 true 时,自动使用 dataSource 生成 */
|
56
|
+
filters?: boolean;
|
57
|
+
/** 操作组配置 */
|
58
|
+
actionSchema?: ActionGroupProps;
|
59
|
+
/** 指定列对应的字段,支持`a.b`形式的快速取值 和 数组取值 */
|
60
|
+
dataIndex?: string;
|
61
|
+
/** 合并行 */
|
62
|
+
colSpan?: number;
|
63
|
+
/** 是否可被编辑 */
|
64
|
+
isEdit?: boolean;
|
65
|
+
/** 点击确定的回调函数 */
|
66
|
+
editOnOk?: (form: any, e: React.MouseEvent) => void | Promise<any>;
|
67
|
+
/** 点击取消的回调函数 */
|
68
|
+
editOnCancel?: (form: any, e: React.MouseEvent) => void | Promise<any>;
|
69
|
+
/** 请求地址 */
|
70
|
+
editUrl?: string;
|
71
|
+
/** 请求方法 */
|
72
|
+
editMethod?: Method;
|
73
|
+
/** 如需自定义调用参数格式,则可以设定此值在请求前对 params 进行自定义,如果返回false则可以阻止请求 */
|
74
|
+
editFormatParams?: (params: any, record: any) => typeof params;
|
75
|
+
/** 编辑请求成功提示文案 */
|
76
|
+
successMessage?: string;
|
77
|
+
/** 列 actions 配置 */
|
78
|
+
actions?: IActionButton[];
|
79
|
+
/** 追加在列后 */
|
80
|
+
extra?: React.ReactNode;
|
81
|
+
}
|
82
|
+
export declare type ProInfoActionType = {
|
83
|
+
/** 刷新Info */
|
84
|
+
refresh?: (params?: any) => void;
|
85
|
+
};
|
86
|
+
/** FormItem 定义 */
|
87
|
+
export declare type IProFieldFormItem = {
|
88
|
+
/** label */
|
89
|
+
label: React.ReactNode;
|
90
|
+
/** 值 */
|
91
|
+
value: React.ReactNode;
|
92
|
+
/** 基础详情布局值 */
|
93
|
+
baseInfoLayout?: BaseInfoLayoutProps;
|
94
|
+
/** 头部详情布局值 */
|
95
|
+
headerInfoLayout?: HeaderInfoLayoutProps;
|
96
|
+
/** loading 状态 */
|
97
|
+
loading?: boolean;
|
98
|
+
} & Pick<ProInfoItemProps, 'tooltip' | 'tooltipIcon'>;
|
99
|
+
/** header info 定义 */
|
100
|
+
export declare type IProHeaderInfo = {
|
101
|
+
/** 布局值 */
|
102
|
+
layout?: HeaderInfoLayoutProps;
|
103
|
+
} & Omit<ProInfoBaseProps, 'layout'>;
|
104
|
+
/** table info 定义 */
|
105
|
+
export declare type IProTableInfo = {
|
106
|
+
/** 布局值 */
|
107
|
+
layout?: TableInfoLayoutProps;
|
108
|
+
} & Omit<ProInfoBaseProps, 'layout'>;
|
109
|
+
/** ProInfo */
|
110
|
+
export declare type ProInfoProps = {
|
111
|
+
/** 布局值 */
|
112
|
+
layout?: TableInfoLayoutProps | HeaderInfoLayoutProps | BaseInfoLayoutProps;
|
113
|
+
/** 类型 */
|
114
|
+
type?: 'base' | 'header' | 'table';
|
115
|
+
} & Omit<ProInfoBaseProps, 'layout'>;
|
116
|
+
export declare type IProHeaderInfoItem = {};
|
117
|
+
export declare type BaseInfoLayoutProps = {
|
118
|
+
labelCol: {
|
119
|
+
span: number;
|
120
|
+
};
|
121
|
+
wrapperCol: {
|
122
|
+
span: number;
|
123
|
+
};
|
124
|
+
};
|
125
|
+
export declare type HeaderInfoLayoutProps = {
|
126
|
+
/** label 间隔 */
|
127
|
+
labelGutter?: number | string;
|
128
|
+
/** 列数 宽度 */
|
129
|
+
colNum?: number;
|
130
|
+
};
|
131
|
+
/** infoGroup */
|
132
|
+
export declare type InfoGroupProps = {
|
133
|
+
children?: React.ReactNode[];
|
134
|
+
};
|
135
|
+
export declare type TableInfoLayoutProps = {} & HeaderInfoLayoutProps;
|
136
|
+
export declare type InfoValueItemProps = {
|
137
|
+
infoItem: ProInfoItemProps;
|
138
|
+
record: any;
|
139
|
+
actionRef?: React.MutableRefObject<ProInfoActionType | undefined>;
|
140
|
+
} & IProFieldProps;
|
141
|
+
export declare type ProInfoHeaderProps = {
|
142
|
+
extra?: CardProps['extra'] | IActionButton[];
|
143
|
+
} & Omit<CardProps, 'extra'>;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.useActionType = useActionType;
|
7
|
+
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
9
|
+
|
10
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
11
|
+
|
12
|
+
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
|
+
|
14
|
+
function useActionType(ref, action) {
|
15
|
+
// 合并自定义事件
|
16
|
+
var userAction = _objectSpread({}, action);
|
17
|
+
|
18
|
+
ref.current = userAction;
|
19
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
var defaultLayoutMap = {
|
8
|
+
xs: {
|
9
|
+
span: 24,
|
10
|
+
formItemLayout: {
|
11
|
+
labelCol: {
|
12
|
+
span: 6
|
13
|
+
},
|
14
|
+
wrapperCol: {
|
15
|
+
span: 18
|
16
|
+
}
|
17
|
+
}
|
18
|
+
},
|
19
|
+
s: {
|
20
|
+
span: 24,
|
21
|
+
formItemLayout: {
|
22
|
+
labelCol: {
|
23
|
+
span: 6
|
24
|
+
},
|
25
|
+
wrapperCol: {
|
26
|
+
span: 18
|
27
|
+
}
|
28
|
+
}
|
29
|
+
},
|
30
|
+
m: {
|
31
|
+
span: 12,
|
32
|
+
formItemLayout: {
|
33
|
+
labelCol: {
|
34
|
+
span: 6
|
35
|
+
},
|
36
|
+
wrapperCol: {
|
37
|
+
span: 18
|
38
|
+
}
|
39
|
+
}
|
40
|
+
},
|
41
|
+
l: {
|
42
|
+
span: 8,
|
43
|
+
formItemLayout: {
|
44
|
+
labelCol: {
|
45
|
+
span: 6
|
46
|
+
},
|
47
|
+
wrapperCol: {
|
48
|
+
span: 18
|
49
|
+
}
|
50
|
+
}
|
51
|
+
},
|
52
|
+
xl: {
|
53
|
+
span: 6,
|
54
|
+
formItemLayout: {
|
55
|
+
labelCol: {
|
56
|
+
span: 8
|
57
|
+
},
|
58
|
+
wrapperCol: {
|
59
|
+
span: 16
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
};
|
64
|
+
var _default = defaultLayoutMap;
|
65
|
+
exports.default = _default;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { ProInfoBaseProps } from '../typing';
|
2
|
+
interface IUseInfoRequest {
|
3
|
+
url?: ProInfoBaseProps['url'];
|
4
|
+
method?: ProInfoBaseProps['method'];
|
5
|
+
params?: ProInfoBaseProps['params'];
|
6
|
+
formatResult?: ProInfoBaseProps['formatResult'];
|
7
|
+
}
|
8
|
+
export declare type IUseInfoRequestResult = {
|
9
|
+
loading: boolean;
|
10
|
+
result: any;
|
11
|
+
refresh?: () => void;
|
12
|
+
};
|
13
|
+
declare const useInfoRequest: (props: IUseInfoRequest) => IUseInfoRequestResult;
|
14
|
+
export default useInfoRequest;
|