@teamix/pro 1.1.3 → 1.1.7
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/README.md +97 -0
- package/dist/pro.css +1 -1
- package/dist/pro.js +1198 -1228
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +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 +9 -0
- package/es/actions/dialog-table.js +10 -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 +6 -0
- package/es/actions/drawer-table.js +7 -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 +71 -0
- package/es/actions/index.js +337 -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 +47 -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 +254 -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 +52 -0
- package/es/form/SchemaForm/index.d.ts +4 -0
- package/es/form/SchemaForm/index.js +259 -0
- package/es/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCards.js +24 -0
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCollapse.js +24 -0
- package/es/form/SchemaForm/initializeArrayIcon.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayIcon.js +57 -0
- package/es/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayItems.js +38 -0
- package/es/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayTable.js +56 -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 +67 -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 +27 -0
- package/es/form/index.js +35 -0
- package/es/form/typing.d.ts +69 -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 +16 -0
- package/es/hooks/index.d.ts +2 -0
- package/es/hooks/index.js +2 -0
- package/es/index.d.ts +24 -0
- package/es/index.js +29 -0
- 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 +60 -0
- package/es/info/components/InfoGroup/index.d.ts +5 -0
- package/es/info/components/InfoGroup/index.js +47 -0
- package/es/info/components/InfoGroup/index.scss +14 -0
- package/es/info/components/InfoValueItem/index.d.ts +5 -0
- package/es/info/components/InfoValueItem/index.js +223 -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 +73 -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 +85 -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 +175 -0
- package/es/info/components/tableInfo/index.scss +18 -0
- package/es/info/index.d.ts +10 -0
- package/es/info/index.js +87 -0
- package/es/info/index.scss +12 -0
- package/es/info/typing.d.ts +157 -0
- package/es/info/typing.js +1 -0
- package/es/info/utils/index.d.ts +12 -0
- package/es/info/utils/index.js +33 -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 +2 -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 +202 -0
- package/es/nocode/configurators/ProTable.d.ts +3 -0
- package/es/nocode/configurators/ProTable.js +320 -0
- package/es/nocode/configurators/common.d.ts +188 -0
- package/es/nocode/configurators/common.js +318 -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 +43 -0
- package/es/page-header/index.js +233 -0
- package/es/page-header/index.scss +169 -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 +223 -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 +242 -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 +6 -0
- package/es/table/index.js +607 -0
- package/es/table/index.scss +103 -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 +9 -0
- package/lib/actions/dialog-table.js +24 -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 +6 -0
- package/lib/actions/drawer-table.js +18 -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 +71 -0
- package/lib/actions/index.js +380 -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 +47 -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 +254 -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 +62 -0
- package/lib/form/SchemaForm/index.d.ts +4 -0
- package/lib/form/SchemaForm/index.js +302 -0
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCards.js +32 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.js +32 -0
- package/lib/form/SchemaForm/initializeArrayIcon.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayIcon.js +68 -0
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayItems.js +46 -0
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayTable.js +63 -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 +74 -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 +27 -0
- package/lib/form/index.js +139 -0
- package/lib/form/typing.d.ts +69 -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 +24 -0
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.js +17 -0
- package/lib/index.d.ts +24 -0
- package/lib/index.js +244 -0
- 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 +60 -0
- package/lib/info/components/InfoGroup/index.d.ts +5 -0
- package/lib/info/components/InfoGroup/index.js +67 -0
- package/lib/info/components/InfoGroup/index.scss +14 -0
- package/lib/info/components/InfoValueItem/index.d.ts +5 -0
- package/lib/info/components/InfoValueItem/index.js +249 -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 +100 -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 +112 -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 +197 -0
- package/lib/info/components/tableInfo/index.scss +18 -0
- package/lib/info/index.d.ts +10 -0
- package/lib/info/index.js +123 -0
- package/lib/info/index.scss +12 -0
- package/lib/info/typing.d.ts +157 -0
- package/lib/info/typing.js +5 -0
- package/lib/info/utils/index.d.ts +12 -0
- package/lib/info/utils/index.js +50 -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 +2 -0
- package/lib/layout/index.js +10 -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 +211 -0
- package/lib/nocode/configurators/ProTable.d.ts +3 -0
- package/lib/nocode/configurators/ProTable.js +329 -0
- package/lib/nocode/configurators/common.d.ts +188 -0
- package/lib/nocode/configurators/common.js +329 -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 +43 -0
- package/lib/page-header/index.js +252 -0
- package/lib/page-header/index.scss +169 -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 +244 -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 +266 -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 +6 -0
- package/lib/table/index.js +662 -0
- package/lib/table/index.scss +103 -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 +5 -5
@@ -0,0 +1,16 @@
|
|
1
|
+
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; }
|
2
|
+
|
3
|
+
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; }
|
4
|
+
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
|
7
|
+
var warning = function warning(item) {
|
8
|
+
var newItem = _objectSpread({}, item); // if (xxx) {
|
9
|
+
// console.warn('xxx');
|
10
|
+
// }
|
11
|
+
|
12
|
+
|
13
|
+
return newItem;
|
14
|
+
};
|
15
|
+
|
16
|
+
export default warning;
|
package/es/index.d.ts
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
import ProAction from './actions';
|
2
|
+
import ProCard from './card';
|
3
|
+
import ProField from './field';
|
4
|
+
import ProForm from './form';
|
5
|
+
import hooks from './hooks';
|
6
|
+
import ProInfo from './info';
|
7
|
+
import ProPageContainer from './page-container';
|
8
|
+
import ProPageHeader from './page-header';
|
9
|
+
import ProTable from './table';
|
10
|
+
import ProSkeleton from './skeleton';
|
11
|
+
import utils from './utils';
|
12
|
+
import * as nocode from './nocode';
|
13
|
+
import * as templates from './templates';
|
14
|
+
export * from './actions';
|
15
|
+
export * from './card';
|
16
|
+
export * from './field';
|
17
|
+
export * from './form';
|
18
|
+
export * from './info';
|
19
|
+
export * from './page-container';
|
20
|
+
export * from './page-header';
|
21
|
+
export * from './skeleton';
|
22
|
+
export * from './table';
|
23
|
+
declare const version = "1.1.6";
|
24
|
+
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, hooks, nocode, templates, utils, };
|
package/es/index.js
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
import ProAction from './actions';
|
2
|
+
import ProCard from './card';
|
3
|
+
import ProField from './field';
|
4
|
+
import ProForm from './form';
|
5
|
+
import hooks from './hooks';
|
6
|
+
import ProInfo from './info'; // import ProLayout from './layout';
|
7
|
+
|
8
|
+
import ProPageContainer from './page-container';
|
9
|
+
import ProPageHeader from './page-header';
|
10
|
+
import ProTable from './table';
|
11
|
+
import ProSkeleton from './skeleton';
|
12
|
+
import utils from './utils';
|
13
|
+
import * as nocode from './nocode';
|
14
|
+
import * as templates from './templates';
|
15
|
+
import TeamixIcon from '@teamix/icon'; // 设置图标源
|
16
|
+
|
17
|
+
TeamixIcon.setConfig(utils.getTeamixIconConfig());
|
18
|
+
export * from './actions';
|
19
|
+
export * from './card';
|
20
|
+
export * from './field';
|
21
|
+
export * from './form';
|
22
|
+
export * from './info';
|
23
|
+
export * from './page-container';
|
24
|
+
export * from './page-header';
|
25
|
+
export * from './skeleton';
|
26
|
+
export * from './table';
|
27
|
+
var version = '1.1.6';
|
28
|
+
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
|
29
|
+
ProPageContainer, ProPageHeader, ProSkeleton, ProTable, hooks, nocode, templates, utils };
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import { Grid } from '@alicloudfe/components';
|
2
|
+
import { BaseSkeleton } from '../../..';
|
3
|
+
import { baseClass, LabelIconTip } from '@teamix/utils';
|
4
|
+
import React from 'react';
|
5
|
+
import './index.scss';
|
6
|
+
var cls = baseClass('teamix-pro-field-info-form-item');
|
7
|
+
var Row = Grid.Row,
|
8
|
+
Col = Grid.Col;
|
9
|
+
|
10
|
+
var FormItem = function FormItem(prop) {
|
11
|
+
var value = prop.value,
|
12
|
+
label = prop.label,
|
13
|
+
baseInfoLayout = prop.baseInfoLayout,
|
14
|
+
headerInfoLayout = prop.headerInfoLayout,
|
15
|
+
loading = prop.loading,
|
16
|
+
tooltip = prop.tooltip,
|
17
|
+
tooltipIcon = prop.tooltipIcon;
|
18
|
+
|
19
|
+
if (baseInfoLayout) {
|
20
|
+
var labelCol = baseInfoLayout.labelCol,
|
21
|
+
wrapperCol = baseInfoLayout.wrapperCol;
|
22
|
+
return /*#__PURE__*/React.createElement("div", {
|
23
|
+
className: cls()
|
24
|
+
}, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
25
|
+
span: labelCol.span,
|
26
|
+
className: cls('label')
|
27
|
+
}, /*#__PURE__*/React.createElement(LabelIconTip, {
|
28
|
+
label: label,
|
29
|
+
tooltip: tooltip,
|
30
|
+
icon: tooltipIcon
|
31
|
+
})), /*#__PURE__*/React.createElement(Col, {
|
32
|
+
span: wrapperCol.span,
|
33
|
+
className: cls('value')
|
34
|
+
}, loading && /*#__PURE__*/React.createElement("div", {
|
35
|
+
className: cls('base-skeleton-box')
|
36
|
+
}, /*#__PURE__*/React.createElement(BaseSkeleton.Info, null)), !loading && /*#__PURE__*/React.createElement("div", null, value))));
|
37
|
+
}
|
38
|
+
|
39
|
+
if (headerInfoLayout) {
|
40
|
+
var _headerInfoLayout$lab = headerInfoLayout.labelGutter,
|
41
|
+
labelGutter = _headerInfoLayout$lab === void 0 ? '16px' : _headerInfoLayout$lab;
|
42
|
+
return /*#__PURE__*/React.createElement("div", {
|
43
|
+
className: cls()
|
44
|
+
}, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement("div", {
|
45
|
+
className: cls('header-label')
|
46
|
+
}, /*#__PURE__*/React.createElement(LabelIconTip, {
|
47
|
+
label: label,
|
48
|
+
tooltip: tooltip,
|
49
|
+
icon: tooltipIcon
|
50
|
+
})), /*#__PURE__*/React.createElement("div", {
|
51
|
+
className: cls('header-value'),
|
52
|
+
style: {
|
53
|
+
marginLeft: labelGutter
|
54
|
+
}
|
55
|
+
}, loading && /*#__PURE__*/React.createElement("div", {
|
56
|
+
className: cls('base-skeleton-box')
|
57
|
+
}, /*#__PURE__*/React.createElement(BaseSkeleton.Info, null)), !loading && /*#__PURE__*/React.createElement(React.Fragment, null, value))));
|
58
|
+
}
|
59
|
+
|
60
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
61
|
+
};
|
62
|
+
|
63
|
+
export default FormItem;
|
@@ -0,0 +1,60 @@
|
|
1
|
+
$label-color: var(--color-text1-2, #5a5a5a);
|
2
|
+
$label-size: var(--font-size-body-1, 12px);
|
3
|
+
$label-weight: var(--font-weight-medium, 500);
|
4
|
+
$text-color: var(--color-text1-3, #333333);
|
5
|
+
$text-size: var(--font-size-body-1, 12px);
|
6
|
+
// $text-weight: var(--font-weight-medium, 500);
|
7
|
+
|
8
|
+
$header-label-color: var(--color-text1-2, #5a5a5a);
|
9
|
+
$header-label-size: var(--font-size-body-1, 12px);
|
10
|
+
// $header-label-weight: var(--font-weight-medium, 500);
|
11
|
+
$header-text-color: var(--color-text1-3, #333333);
|
12
|
+
$header-text-size: var(--font-size-body-1, 12px);
|
13
|
+
// $header-text-weight: var(--font-weight-medium, 500);
|
14
|
+
|
15
|
+
$item-padding-bottom: 8px;
|
16
|
+
|
17
|
+
.teamix-pro-field-info-form-item {
|
18
|
+
width: 100%;
|
19
|
+
padding-bottom: $item-padding-bottom;
|
20
|
+
}
|
21
|
+
|
22
|
+
.teamix-pro-field-info-form-item-label {
|
23
|
+
color: $label-color;
|
24
|
+
font-size: $label-size;
|
25
|
+
// font-weight: $label-weight;
|
26
|
+
display: unset;
|
27
|
+
}
|
28
|
+
|
29
|
+
.teamix-pro-field-info-form-item-value {
|
30
|
+
color: $text-color;
|
31
|
+
font-size: $text-size;
|
32
|
+
display: unset;
|
33
|
+
width: 100%;
|
34
|
+
padding-right: 20px;
|
35
|
+
}
|
36
|
+
|
37
|
+
.teamix-pro-field-info-form-item-header-label {
|
38
|
+
color: $header-label-color;
|
39
|
+
font-size: $header-label-size;
|
40
|
+
// font-weight: $header-label-weight;
|
41
|
+
display: inline-block;
|
42
|
+
white-space:nowrap;
|
43
|
+
}
|
44
|
+
|
45
|
+
.teamix-pro-field-info-form-item-header-value {
|
46
|
+
color: $header-text-color;
|
47
|
+
font-size: $header-text-size;
|
48
|
+
display: inline-block;
|
49
|
+
width: 100%;
|
50
|
+
}
|
51
|
+
|
52
|
+
.teamix-pro-field-info-form-item-base-skeleton-box {
|
53
|
+
width: 100%;
|
54
|
+
height: 100%;
|
55
|
+
display: flex;
|
56
|
+
align-items: center;
|
57
|
+
span {
|
58
|
+
width: 100%
|
59
|
+
}
|
60
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import React, { useRef } from 'react';
|
2
|
+
import { ProInfoGroupContext } from '../../utils';
|
3
|
+
import { useSize } from '@teamix/hooks';
|
4
|
+
import './index.scss';
|
5
|
+
import useInfoRequest from '../../utils/useInfoRequest';
|
6
|
+
|
7
|
+
var ProInfoGroup = function ProInfoGroup(props) {
|
8
|
+
var children = props.children,
|
9
|
+
url = props.url,
|
10
|
+
method = props.method,
|
11
|
+
params = props.params,
|
12
|
+
formatResult = props.formatResult;
|
13
|
+
var ref = useRef();
|
14
|
+
var size = useSize(ref); // 请求数据
|
15
|
+
|
16
|
+
var _useInfoRequest = useInfoRequest({
|
17
|
+
url: url,
|
18
|
+
method: method,
|
19
|
+
params: params,
|
20
|
+
formatResult: formatResult
|
21
|
+
}),
|
22
|
+
loading = _useInfoRequest.loading,
|
23
|
+
result = _useInfoRequest.result,
|
24
|
+
refresh = _useInfoRequest.refresh;
|
25
|
+
|
26
|
+
return /*#__PURE__*/React.createElement(ProInfoGroupContext.Provider, {
|
27
|
+
value: {
|
28
|
+
visible: true,
|
29
|
+
size: size,
|
30
|
+
loading: loading,
|
31
|
+
result: result,
|
32
|
+
refresh: refresh
|
33
|
+
}
|
34
|
+
}, /*#__PURE__*/React.createElement("div", {
|
35
|
+
className: "teamix-pro-info-group",
|
36
|
+
ref: ref
|
37
|
+
}, Array.isArray(children) && (children === null || children === void 0 ? void 0 : children.map(function (item, index) {
|
38
|
+
return /*#__PURE__*/React.createElement("div", {
|
39
|
+
className: "teamix-pro-info-group-item",
|
40
|
+
key: index
|
41
|
+
}, item);
|
42
|
+
})), !Array.isArray(children) && /*#__PURE__*/React.createElement("div", {
|
43
|
+
className: "teamix-pro-info-group-item"
|
44
|
+
}, children)));
|
45
|
+
};
|
46
|
+
|
47
|
+
export default ProInfoGroup;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
.teamix-pro-info-group {
|
2
|
+
&-item {
|
3
|
+
margin-top: 16px;
|
4
|
+
border-bottom: 1px solid var(--color-line1-1, #eaeaea);
|
5
|
+
margin-bottom: 16px;
|
6
|
+
}
|
7
|
+
.teamix-pro-info-group-item:last-child {
|
8
|
+
border-bottom: 0;
|
9
|
+
margin-bottom: 0;
|
10
|
+
}
|
11
|
+
.teamix-pro-info-group-item:first-child {
|
12
|
+
margin-top: 0;
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,223 @@
|
|
1
|
+
var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef"];
|
2
|
+
|
3
|
+
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; }
|
4
|
+
|
5
|
+
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; }
|
6
|
+
|
7
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
8
|
+
|
9
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
10
|
+
|
11
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
12
|
+
|
13
|
+
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); }
|
14
|
+
|
15
|
+
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; }
|
16
|
+
|
17
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
18
|
+
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
20
|
+
|
21
|
+
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; }
|
22
|
+
|
23
|
+
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; }
|
24
|
+
|
25
|
+
import TeamixIcon from '@teamix/icon';
|
26
|
+
import ProField from '../../../field';
|
27
|
+
import { baseClass, request } from '@teamix/utils';
|
28
|
+
import PopConfirm from '@teamix/pop-confirm';
|
29
|
+
import React, { useMemo, useState } from 'react';
|
30
|
+
import './index.scss';
|
31
|
+
import ProForm, { createForm, formilyReactive } from '../../../form';
|
32
|
+
import { Message } from '@alicloudfe/components';
|
33
|
+
import { ActionGroup } from '../../../actions';
|
34
|
+
var cls = baseClass('teamix-pro-info');
|
35
|
+
var toJS = formilyReactive.toJS;
|
36
|
+
|
37
|
+
var InfoValueItem = function InfoValueItem(props) {
|
38
|
+
var _props$type = props.type,
|
39
|
+
type = _props$type === void 0 ? 'text' : _props$type,
|
40
|
+
value = props.value,
|
41
|
+
render = props.render,
|
42
|
+
infoItem = props.infoItem,
|
43
|
+
record = props.record,
|
44
|
+
actionRef = props.actionRef,
|
45
|
+
others = _objectWithoutProperties(props, _excluded);
|
46
|
+
|
47
|
+
var dataIndex = infoItem.dataIndex,
|
48
|
+
isEdit = infoItem.isEdit,
|
49
|
+
editOnCancel = infoItem.editOnCancel,
|
50
|
+
editOnOk = infoItem.editOnOk,
|
51
|
+
editUrl = infoItem.editUrl,
|
52
|
+
editFormatParams = infoItem.editFormatParams,
|
53
|
+
_infoItem$editMethod = infoItem.editMethod,
|
54
|
+
editMethod = _infoItem$editMethod === void 0 ? 'post' : _infoItem$editMethod,
|
55
|
+
_infoItem$successMess = infoItem.successMessage,
|
56
|
+
successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
|
57
|
+
actions = infoItem.actions,
|
58
|
+
extra = infoItem.extra; // 由info接管field中的value。重新实现
|
59
|
+
// let fieldRender = render;
|
60
|
+
// let newValue = value;
|
61
|
+
// if (render && typeof render !== 'function') {
|
62
|
+
// const { value, ...others } = render;
|
63
|
+
// fieldRender = others;
|
64
|
+
// if (value) {
|
65
|
+
// newValue = getTargetValue(`${value}`, { ...record, record });
|
66
|
+
// console.log("newValue", newValue);
|
67
|
+
// }
|
68
|
+
// }
|
69
|
+
// 浮层的显隐状态
|
70
|
+
|
71
|
+
var _useState = useState(false),
|
72
|
+
_useState2 = _slicedToArray(_useState, 2),
|
73
|
+
popConfirmVisible = _useState2[0],
|
74
|
+
setPopConfirmVisible = _useState2[1]; // 确认按钮的loading状态
|
75
|
+
|
76
|
+
|
77
|
+
var _useState3 = useState(false),
|
78
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
79
|
+
confirmLoading = _useState4[0],
|
80
|
+
setConfirmLoading = _useState4[1]; // edit 的显隐状态
|
81
|
+
|
82
|
+
|
83
|
+
var _useState5 = useState(false),
|
84
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
85
|
+
editVisible = _useState6[0],
|
86
|
+
setEditVisible = _useState6[1];
|
87
|
+
|
88
|
+
var requestDataKey = editMethod.toLowerCase() === 'get' ? 'params' : 'data';
|
89
|
+
var dataFilterForm = useMemo(function () {
|
90
|
+
return createForm();
|
91
|
+
}, []);
|
92
|
+
|
93
|
+
var renderAction = function renderAction() {
|
94
|
+
if (actions) {
|
95
|
+
return /*#__PURE__*/React.createElement(ActionGroup, {
|
96
|
+
actions: actions,
|
97
|
+
type: "text",
|
98
|
+
style: {
|
99
|
+
marginLeft: '8px'
|
100
|
+
}
|
101
|
+
});
|
102
|
+
}
|
103
|
+
|
104
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
105
|
+
};
|
106
|
+
|
107
|
+
if (isEdit) {
|
108
|
+
// 渲染表单
|
109
|
+
var renderContent = function renderContent() {
|
110
|
+
return /*#__PURE__*/React.createElement(ProForm, {
|
111
|
+
schema: [{
|
112
|
+
name: dataIndex,
|
113
|
+
component: 'Input',
|
114
|
+
required: true,
|
115
|
+
default: value
|
116
|
+
}],
|
117
|
+
form: dataFilterForm
|
118
|
+
});
|
119
|
+
}; // 表单提交
|
120
|
+
|
121
|
+
|
122
|
+
var onConfirm = function onConfirm(e) {
|
123
|
+
var formData = toJS(dataFilterForm.values); // 如果传入了 editUrl 则内置请求
|
124
|
+
|
125
|
+
if (editUrl) {
|
126
|
+
setConfirmLoading(true);
|
127
|
+
var params = formData;
|
128
|
+
|
129
|
+
if (editFormatParams) {
|
130
|
+
params = editFormatParams === null || editFormatParams === void 0 ? void 0 : editFormatParams(formData, record);
|
131
|
+
}
|
132
|
+
|
133
|
+
request(_defineProperty({
|
134
|
+
url: editUrl,
|
135
|
+
method: editMethod
|
136
|
+
}, requestDataKey, params)).then(function (resp) {
|
137
|
+
var _actionRef$current, _actionRef$current$re;
|
138
|
+
|
139
|
+
Message.success(successMessage);
|
140
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$re = _actionRef$current.refresh) === null || _actionRef$current$re === void 0 ? void 0 : _actionRef$current$re.call(_actionRef$current);
|
141
|
+
setEditVisible(!editVisible);
|
142
|
+
}).catch(function (error) {// TODO 暂时不处理。是否需要开放函数?
|
143
|
+
}).finally(function () {
|
144
|
+
setConfirmLoading(false);
|
145
|
+
});
|
146
|
+
}
|
147
|
+
|
148
|
+
var okResult = editOnOk === null || editOnOk === void 0 ? void 0 : editOnOk(formData, e); // 重写了 editOnOk
|
149
|
+
|
150
|
+
if (okResult instanceof Promise) {
|
151
|
+
setConfirmLoading(true);
|
152
|
+
okResult.then(function () {
|
153
|
+
setPopConfirmVisible(!popConfirmVisible);
|
154
|
+
setEditVisible(!editVisible);
|
155
|
+
setConfirmLoading(false);
|
156
|
+
});
|
157
|
+
} else {
|
158
|
+
setPopConfirmVisible(!popConfirmVisible);
|
159
|
+
setEditVisible(!editVisible);
|
160
|
+
}
|
161
|
+
}; // 取消
|
162
|
+
|
163
|
+
|
164
|
+
var onCancel = function onCancel(e) {
|
165
|
+
var formData = toJS(dataFilterForm.values);
|
166
|
+
|
167
|
+
if (editOnCancel) {
|
168
|
+
editOnCancel === null || editOnCancel === void 0 ? void 0 : editOnCancel(formData, e);
|
169
|
+
setPopConfirmVisible(!popConfirmVisible);
|
170
|
+
setEditVisible(!editVisible);
|
171
|
+
} else {
|
172
|
+
setPopConfirmVisible(!popConfirmVisible);
|
173
|
+
setEditVisible(!editVisible);
|
174
|
+
}
|
175
|
+
};
|
176
|
+
|
177
|
+
return /*#__PURE__*/React.createElement("div", {
|
178
|
+
className: cls('edit'),
|
179
|
+
onMouseEnter: function onMouseEnter() {
|
180
|
+
setEditVisible(true);
|
181
|
+
},
|
182
|
+
onMouseLeave: function onMouseLeave() {
|
183
|
+
setEditVisible(false);
|
184
|
+
}
|
185
|
+
}, /*#__PURE__*/React.createElement(ProField, _objectSpread({
|
186
|
+
type: type,
|
187
|
+
value: value,
|
188
|
+
render: render
|
189
|
+
}, others)), /*#__PURE__*/React.createElement(PopConfirm, {
|
190
|
+
visible: popConfirmVisible,
|
191
|
+
content: renderContent(),
|
192
|
+
triggerType: "click",
|
193
|
+
popupClassName: cls('edit-pop-confirm'),
|
194
|
+
onConfirm: onConfirm,
|
195
|
+
onCancel: onCancel,
|
196
|
+
confirmProps: {
|
197
|
+
loading: confirmLoading
|
198
|
+
},
|
199
|
+
trigger: /*#__PURE__*/React.createElement(TeamixIcon, {
|
200
|
+
type: "edit-line",
|
201
|
+
size: "small",
|
202
|
+
className: cls('edit-icon'),
|
203
|
+
// 这里使用 opacity 是为了占位
|
204
|
+
style: {
|
205
|
+
opacity: editVisible || popConfirmVisible ? 1 : 0
|
206
|
+
},
|
207
|
+
onClick: function onClick() {
|
208
|
+
setPopConfirmVisible(!popConfirmVisible);
|
209
|
+
}
|
210
|
+
})
|
211
|
+
}), renderAction(), extra && extra);
|
212
|
+
}
|
213
|
+
|
214
|
+
return /*#__PURE__*/React.createElement("div", {
|
215
|
+
className: cls()
|
216
|
+
}, /*#__PURE__*/React.createElement(ProField, _objectSpread({
|
217
|
+
type: type,
|
218
|
+
value: value,
|
219
|
+
render: render
|
220
|
+
}, others)), renderAction(), extra && extra);
|
221
|
+
};
|
222
|
+
|
223
|
+
export default InfoValueItem;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.teamix-pro-info-edit {
|
2
|
+
display: flex;
|
3
|
+
align-items: center;
|
4
|
+
&-icon {
|
5
|
+
margin-left: 8px;
|
6
|
+
color: var(--color-fill1-6, #848484);
|
7
|
+
cursor: pointer;
|
8
|
+
transition: all 0.2s;
|
9
|
+
}
|
10
|
+
&-pop-confirm {
|
11
|
+
.pop-confirm-icon-area {
|
12
|
+
display: none;
|
13
|
+
}
|
14
|
+
.title-content-area.title-content-area.title-content-area.title-content-area {
|
15
|
+
margin-left: 0;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
.teamix-pro-info {
|
20
|
+
display: flex;
|
21
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ProInfoBaseProps } from '../../typing';
|
3
|
+
import './index.scss';
|
4
|
+
import { IUseInfoRequestResult } from '../../utils/useInfoRequest';
|
5
|
+
declare type ProBaseInfoProps = ProInfoBaseProps & IUseInfoRequestResult;
|
6
|
+
declare const ProBaseInfo: React.FC<ProBaseInfoProps>;
|
7
|
+
export default ProBaseInfo;
|
@@ -0,0 +1,73 @@
|
|
1
|
+
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; }
|
2
|
+
|
3
|
+
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; }
|
4
|
+
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
|
7
|
+
import { Grid } from '@alicloudfe/components';
|
8
|
+
import { ProCard } from '../../../';
|
9
|
+
import React, { useContext, useRef } from 'react';
|
10
|
+
import FormItem from '../FormItem';
|
11
|
+
import './index.scss';
|
12
|
+
import { useSize } from '@teamix/hooks';
|
13
|
+
import { getLayout } from '../../utils/utils';
|
14
|
+
import defaultLayoutMap from '../../utils/layout';
|
15
|
+
import InfoValueItem from '../InfoValueItem';
|
16
|
+
import { getDataIndexValue, ProInfoGroupContext } from '../../utils';
|
17
|
+
var Row = Grid.Row,
|
18
|
+
Col = Grid.Col;
|
19
|
+
|
20
|
+
var ProBaseInfo = function ProBaseInfo(props) {
|
21
|
+
var _size$width;
|
22
|
+
|
23
|
+
var header = props.header,
|
24
|
+
columns = props.columns,
|
25
|
+
dataSource = props.dataSource,
|
26
|
+
loading = props.loading,
|
27
|
+
result = props.result,
|
28
|
+
actionRef = props.actionRef;
|
29
|
+
var context = useContext(ProInfoGroupContext);
|
30
|
+
var ref = useRef();
|
31
|
+
var size = context.visible ? context.size : useSize(ref);
|
32
|
+
var defaultLayout = defaultLayoutMap[getLayout((_size$width = size === null || size === void 0 ? void 0 : size.width) !== null && _size$width !== void 0 ? _size$width : 0)];
|
33
|
+
|
34
|
+
var renderContent = function renderContent() {
|
35
|
+
return columns.map(function (item, index) {
|
36
|
+
var _item$title, _item$valueType;
|
37
|
+
|
38
|
+
var span = item.colSpan ? defaultLayout.span * item.colSpan : defaultLayout.span;
|
39
|
+
return /*#__PURE__*/React.createElement(Col, {
|
40
|
+
span: span,
|
41
|
+
key: index
|
42
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
43
|
+
label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
|
44
|
+
loading: loading,
|
45
|
+
value: /*#__PURE__*/React.createElement(InfoValueItem, {
|
46
|
+
type: (_item$valueType = item === null || item === void 0 ? void 0 : item.valueType) !== null && _item$valueType !== void 0 ? _item$valueType : 'text',
|
47
|
+
value: getDataIndexValue(item.dataIndex, dataSource !== null && dataSource !== void 0 ? dataSource : result),
|
48
|
+
render: item.render,
|
49
|
+
dataSource: item.dataSource,
|
50
|
+
infoItem: item,
|
51
|
+
record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
|
52
|
+
actionRef: actionRef
|
53
|
+
}),
|
54
|
+
baseInfoLayout: defaultLayout.formItemLayout,
|
55
|
+
tooltip: item.tooltip,
|
56
|
+
tooltipIcon: item.tooltipIcon
|
57
|
+
}));
|
58
|
+
});
|
59
|
+
};
|
60
|
+
|
61
|
+
return /*#__PURE__*/React.createElement("div", {
|
62
|
+
ref: ref,
|
63
|
+
className: "teamix-pro-info"
|
64
|
+
}, (size === null || size === void 0 ? void 0 : size.width) && /*#__PURE__*/React.createElement(ProCard, _objectSpread({
|
65
|
+
compacted: true,
|
66
|
+
hoveredShadow: false,
|
67
|
+
bordered: false
|
68
|
+
}, header), /*#__PURE__*/React.createElement(Row, {
|
69
|
+
wrap: true
|
70
|
+
}, renderContent())));
|
71
|
+
};
|
72
|
+
|
73
|
+
export default ProBaseInfo;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { IProHeaderInfo } from '../../typing';
|
3
|
+
import { IUseInfoRequestResult } from '../../utils/useInfoRequest';
|
4
|
+
import './index.scss';
|
5
|
+
declare type ProHeaderInfoProps = IProHeaderInfo & IUseInfoRequestResult;
|
6
|
+
declare const ProHeaderInfo: React.FC<ProHeaderInfoProps>;
|
7
|
+
export default ProHeaderInfo;
|