@teamix/pro 1.0.22 → 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 +12421 -13334
- 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 -22
- package/es/index.js +25 -23
- 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 -22
- package/lib/index.js +84 -57
- 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,179 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = exports.CardContainer = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _classnames2 = _interopRequireDefault(require("classnames"));
|
11
|
+
|
12
|
+
var _components = require("@alicloudfe/components");
|
13
|
+
|
14
|
+
var _utils = require("@teamix/utils");
|
15
|
+
|
16
|
+
var _skeleton = require("../skeleton");
|
17
|
+
|
18
|
+
var _actions = require("../actions");
|
19
|
+
|
20
|
+
require("./index.scss");
|
21
|
+
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
|
+
|
24
|
+
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; }
|
25
|
+
|
26
|
+
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; }
|
27
|
+
|
28
|
+
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; }
|
29
|
+
|
30
|
+
var cls = (0, _utils.baseClass)('teamix-pro-card');
|
31
|
+
|
32
|
+
function formatSpacing(spacing) {
|
33
|
+
var spacingArray = spacing instanceof Array ? spacing : [spacing || 0, spacing || 0];
|
34
|
+
return {
|
35
|
+
horizonal: spacingArray[0] / 2,
|
36
|
+
vertical: spacingArray[1] / 2
|
37
|
+
};
|
38
|
+
}
|
39
|
+
|
40
|
+
function getColClassAndStyle(col) {
|
41
|
+
if (!col) {
|
42
|
+
return {
|
43
|
+
style: {}
|
44
|
+
};
|
45
|
+
}
|
46
|
+
|
47
|
+
if (typeof col === 'number') {
|
48
|
+
return {
|
49
|
+
className: cls("col-".concat(col)),
|
50
|
+
style: {}
|
51
|
+
};
|
52
|
+
}
|
53
|
+
|
54
|
+
return {
|
55
|
+
style: {
|
56
|
+
width: col,
|
57
|
+
flexShrink: 0
|
58
|
+
}
|
59
|
+
};
|
60
|
+
}
|
61
|
+
|
62
|
+
var CardContainer = function CardContainer(props) {
|
63
|
+
var children = props.children,
|
64
|
+
style = props.style,
|
65
|
+
className = props.className,
|
66
|
+
spacing = props.spacing,
|
67
|
+
direction = props.direction,
|
68
|
+
wrap = props.wrap;
|
69
|
+
|
70
|
+
var _formatSpacing = formatSpacing(spacing),
|
71
|
+
horizonal = _formatSpacing.horizonal,
|
72
|
+
vertical = _formatSpacing.vertical; // 如果嵌套了 ProCard,为其添加一层栅格化的 col 和 padding
|
73
|
+
|
74
|
+
|
75
|
+
var childrenModified = _react.default.Children.map(children, function (element, index) {
|
76
|
+
var _element$type;
|
77
|
+
|
78
|
+
if (element === null || element === void 0 ? void 0 : (_element$type = element.type) === null || _element$type === void 0 ? void 0 : _element$type.isProCard) {
|
79
|
+
var col = element.props.col;
|
80
|
+
|
81
|
+
var _getColClassAndStyle = getColClassAndStyle(col),
|
82
|
+
colClassName = _getColClassAndStyle.className,
|
83
|
+
colStyle = _getColClassAndStyle.style;
|
84
|
+
|
85
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
86
|
+
style: _objectSpread({
|
87
|
+
paddingRight: horizonal,
|
88
|
+
paddingLeft: horizonal,
|
89
|
+
paddingTop: vertical,
|
90
|
+
paddingBottom: vertical
|
91
|
+
}, colStyle),
|
92
|
+
className: (0, _classnames2.default)(cls('col'), colClassName),
|
93
|
+
key: "pro-card-col-".concat(index)
|
94
|
+
}, /*#__PURE__*/_react.default.cloneElement(element));
|
95
|
+
}
|
96
|
+
|
97
|
+
return element;
|
98
|
+
});
|
99
|
+
|
100
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
101
|
+
style: _objectSpread({
|
102
|
+
marginLeft: -horizonal,
|
103
|
+
marginRight: -horizonal,
|
104
|
+
marginTop: -vertical,
|
105
|
+
marginBottom: -vertical
|
106
|
+
}, style),
|
107
|
+
className: (0, _classnames2.default)(className, cls('container'), cls("container-flex-".concat(direction)), _defineProperty({}, cls('container-wrap'), wrap))
|
108
|
+
}, childrenModified);
|
109
|
+
};
|
110
|
+
|
111
|
+
exports.CardContainer = CardContainer;
|
112
|
+
CardContainer.defaultProps = {
|
113
|
+
spacing: 16,
|
114
|
+
direction: 'column'
|
115
|
+
};
|
116
|
+
|
117
|
+
var renderExtra = function renderExtra(extra) {
|
118
|
+
if (!extra) {
|
119
|
+
return null;
|
120
|
+
}
|
121
|
+
|
122
|
+
if (extra instanceof Array && extra.length) {
|
123
|
+
return /*#__PURE__*/_react.default.createElement(_actions.ActionGroup, {
|
124
|
+
actions: extra,
|
125
|
+
type: "text"
|
126
|
+
});
|
127
|
+
}
|
128
|
+
|
129
|
+
return extra;
|
130
|
+
};
|
131
|
+
|
132
|
+
var Card = function Card(props) {
|
133
|
+
var children = props.children,
|
134
|
+
title = props.title,
|
135
|
+
subTitle = props.subTitle,
|
136
|
+
extra = props.extra,
|
137
|
+
style = props.style,
|
138
|
+
className = props.className,
|
139
|
+
image = props.image,
|
140
|
+
divider = props.divider,
|
141
|
+
bordered = props.bordered,
|
142
|
+
hoveredShadow = props.hoveredShadow,
|
143
|
+
compacted = props.compacted,
|
144
|
+
centered = props.centered,
|
145
|
+
loading = props.loading,
|
146
|
+
backgroundColor = props.backgroundColor,
|
147
|
+
contentClassName = props.contentClassName,
|
148
|
+
contentStyle = props.contentStyle;
|
149
|
+
return /*#__PURE__*/_react.default.createElement(_components.Card, {
|
150
|
+
free: true,
|
151
|
+
className: (0, _classnames2.default)(cls(), className, backgroundColor, {
|
152
|
+
noBorder: !bordered,
|
153
|
+
noHoveredShadow: !hoveredShadow,
|
154
|
+
compacted: compacted
|
155
|
+
}),
|
156
|
+
style: style
|
157
|
+
}, !loading && image && /*#__PURE__*/_react.default.createElement(_components.Card.Media, {
|
158
|
+
component: "img",
|
159
|
+
src: image
|
160
|
+
}), (title || extra) && /*#__PURE__*/_react.default.createElement(_components.Card.Header, {
|
161
|
+
title: loading ? /*#__PURE__*/_react.default.createElement(_skeleton.BaseSkeleton.Card.Title, null) : title,
|
162
|
+
subTitle: !loading && subTitle,
|
163
|
+
extra: !loading && renderExtra(extra)
|
164
|
+
}), divider && /*#__PURE__*/_react.default.createElement(_components.Card.Divider, null), /*#__PURE__*/_react.default.createElement(_components.Card.Content, {
|
165
|
+
className: (0, _classnames2.default)(cls('content'), contentClassName, {
|
166
|
+
centered: centered
|
167
|
+
}),
|
168
|
+
style: contentStyle
|
169
|
+
}, loading && /*#__PURE__*/_react.default.createElement(_skeleton.BaseSkeleton.Card.Content, null), !loading && children));
|
170
|
+
};
|
171
|
+
|
172
|
+
Card.defaultProps = {
|
173
|
+
bordered: true,
|
174
|
+
hoveredShadow: false
|
175
|
+
}; // @ts-ignore
|
176
|
+
|
177
|
+
Card.isProCard = true;
|
178
|
+
var _default = Card;
|
179
|
+
exports.default = _default;
|
@@ -0,0 +1,98 @@
|
|
1
|
+
.teamix-pro-card {
|
2
|
+
width: 100%;
|
3
|
+
|
4
|
+
&-container {
|
5
|
+
display: flex;
|
6
|
+
|
7
|
+
&-wrap {
|
8
|
+
flex-wrap: wrap;
|
9
|
+
}
|
10
|
+
|
11
|
+
&-flex {
|
12
|
+
&-row {
|
13
|
+
flex-direction: row;
|
14
|
+
}
|
15
|
+
|
16
|
+
&-row-reverse {
|
17
|
+
flex-direction: row-reverse;
|
18
|
+
}
|
19
|
+
|
20
|
+
&-column {
|
21
|
+
flex-direction: column;
|
22
|
+
}
|
23
|
+
|
24
|
+
&-column-reverse {
|
25
|
+
flex-direction: column-reverse;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
&-col {
|
31
|
+
width: 100%;
|
32
|
+
$grid-columns: 24;
|
33
|
+
@for $i from 1 through $grid-columns {
|
34
|
+
&-#{$i} {
|
35
|
+
$width: percentage($i/$grid-columns);
|
36
|
+
flex: 0 0 $width;
|
37
|
+
width: $width;
|
38
|
+
max-width: $width;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
&-content {
|
44
|
+
&.centered {
|
45
|
+
display: flex;
|
46
|
+
align-items: center;
|
47
|
+
justify-content: center;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
&.noBorder {
|
52
|
+
border: none;
|
53
|
+
}
|
54
|
+
|
55
|
+
&.compacted {
|
56
|
+
border: none;
|
57
|
+
--card-body-padding-bottom: 0px;
|
58
|
+
--card-padding-lr: 0px;
|
59
|
+
|
60
|
+
.next-card-content-container {
|
61
|
+
--card-body-show-divider-padding-top: 0px;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
&.noHoveredShadow {
|
66
|
+
&:hover {
|
67
|
+
box-shadow: none;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
&.blue {
|
72
|
+
background-color: var(--color-notice-1);
|
73
|
+
}
|
74
|
+
|
75
|
+
&.orange {
|
76
|
+
background-color: var(--color-warning-1);
|
77
|
+
}
|
78
|
+
|
79
|
+
&.yellow {
|
80
|
+
background-color: var(--color-help-1);
|
81
|
+
}
|
82
|
+
|
83
|
+
&.red {
|
84
|
+
background-color: var(--color-error-1);
|
85
|
+
}
|
86
|
+
|
87
|
+
&.green {
|
88
|
+
background-color: var(--color-success-1);
|
89
|
+
}
|
90
|
+
|
91
|
+
&.grey {
|
92
|
+
background-color: var(--color-fill1-2);
|
93
|
+
}
|
94
|
+
|
95
|
+
&.transparent {
|
96
|
+
background: transparent;
|
97
|
+
}
|
98
|
+
}
|
@@ -0,0 +1,30 @@
|
|
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 _proField = _interopRequireWildcard(require("@teamix/pro-field"));
|
12
|
+
|
13
|
+
Object.keys(_proField).forEach(function (key) {
|
14
|
+
if (key === "default" || key === "__esModule") return;
|
15
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
16
|
+
if (key in exports && exports[key] === _proField[key]) return;
|
17
|
+
Object.defineProperty(exports, key, {
|
18
|
+
enumerable: true,
|
19
|
+
get: function get() {
|
20
|
+
return _proField[key];
|
21
|
+
}
|
22
|
+
});
|
23
|
+
});
|
24
|
+
|
25
|
+
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); }
|
26
|
+
|
27
|
+
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; }
|
28
|
+
|
29
|
+
var _default = _proField.default;
|
30
|
+
exports.default = _default;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { BalloonProps as IPopoverProps } from '@alicloudfe/components/types/balloon';
|
3
|
+
import { DialogProps } from '@alicloudfe/components/types/dialog';
|
4
|
+
import { DrawerProps } from '@alicloudfe/components/types/drawer';
|
5
|
+
import { IFormItemProps } from '@teamix/formily';
|
6
|
+
declare type ComposedEditable = React.FC<IFormItemProps> & {
|
7
|
+
BaseBuilder?: (type: any) => React.FC<DialogProps> | React.FC<DrawerProps>;
|
8
|
+
Dialog?: React.FC;
|
9
|
+
Drawer?: React.FC;
|
10
|
+
Popover?: React.FC<IPopoverProps & {
|
11
|
+
title?: React.ReactNode;
|
12
|
+
}>;
|
13
|
+
};
|
14
|
+
export declare const Editable: ComposedEditable;
|
15
|
+
declare const EditableDialog: React.FC<{}>;
|
16
|
+
declare const EditableDrawer: React.FC<{}>;
|
17
|
+
declare const EditablePopover: React.FC<IPopoverProps & {
|
18
|
+
title?: React.ReactNode;
|
19
|
+
}>;
|
20
|
+
export { EditableDialog, EditableDrawer, EditablePopover };
|
@@ -0,0 +1,251 @@
|
|
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.EditablePopover = exports.EditableDrawer = exports.EditableDialog = exports.Editable = void 0;
|
9
|
+
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
11
|
+
|
12
|
+
var _react2 = require("@formily/react");
|
13
|
+
|
14
|
+
var _components = require("@alicloudfe/components");
|
15
|
+
|
16
|
+
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
17
|
+
|
18
|
+
var _formily = require("@teamix/formily");
|
19
|
+
|
20
|
+
var _utils = require("@teamix/utils");
|
21
|
+
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
|
+
|
24
|
+
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); }
|
25
|
+
|
26
|
+
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; }
|
27
|
+
|
28
|
+
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; }
|
29
|
+
|
30
|
+
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; }
|
31
|
+
|
32
|
+
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; }
|
33
|
+
|
34
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
35
|
+
|
36
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
37
|
+
|
38
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
39
|
+
|
40
|
+
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."); }
|
41
|
+
|
42
|
+
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); }
|
43
|
+
|
44
|
+
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; }
|
45
|
+
|
46
|
+
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; }
|
47
|
+
|
48
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
49
|
+
|
50
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
51
|
+
|
52
|
+
var useParentPattern = function useParentPattern() {
|
53
|
+
var _field$parent, _field$form;
|
54
|
+
|
55
|
+
var field = (0, _react2.useField)();
|
56
|
+
return (field === null || field === void 0 ? void 0 : (_field$parent = field.parent) === null || _field$parent === void 0 ? void 0 : _field$parent.pattern) || (field === null || field === void 0 ? void 0 : (_field$form = field.form) === null || _field$form === void 0 ? void 0 : _field$form.pattern);
|
57
|
+
};
|
58
|
+
|
59
|
+
var Editable = (0, _react2.observer)(function (props) {
|
60
|
+
return null;
|
61
|
+
});
|
62
|
+
exports.Editable = Editable;
|
63
|
+
|
64
|
+
Editable.BaseBuilder = function (type) {
|
65
|
+
return (0, _react2.observer)(function (_ref) {
|
66
|
+
var props = _extends({}, _ref);
|
67
|
+
|
68
|
+
var field = (0, _react2.useField)();
|
69
|
+
var pattern = useParentPattern();
|
70
|
+
|
71
|
+
var _useState = (0, _react.useState)(false),
|
72
|
+
_useState2 = _slicedToArray(_useState, 2),
|
73
|
+
visible = _useState2[0],
|
74
|
+
setVisible = _useState2[1];
|
75
|
+
|
76
|
+
var prefixCls = (0, _utils.usePrefixCls)('formily-editable');
|
77
|
+
|
78
|
+
var onOk = /*#__PURE__*/function () {
|
79
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
80
|
+
var errors;
|
81
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
82
|
+
while (1) {
|
83
|
+
switch (_context.prev = _context.next) {
|
84
|
+
case 0:
|
85
|
+
_context.prev = 0;
|
86
|
+
_context.next = 3;
|
87
|
+
return field.form.validate("".concat(field.address, ".*"));
|
88
|
+
|
89
|
+
case 3:
|
90
|
+
_context.prev = 3;
|
91
|
+
errors = field.form.queryFeedbacks({
|
92
|
+
type: 'error',
|
93
|
+
address: "".concat(field.address, ".*")
|
94
|
+
});
|
95
|
+
|
96
|
+
if (!(errors === null || errors === void 0 ? void 0 : errors.length)) {
|
97
|
+
_context.next = 7;
|
98
|
+
break;
|
99
|
+
}
|
100
|
+
|
101
|
+
return _context.abrupt("return");
|
102
|
+
|
103
|
+
case 7:
|
104
|
+
setVisible(false);
|
105
|
+
return _context.finish(3);
|
106
|
+
|
107
|
+
case 9:
|
108
|
+
case "end":
|
109
|
+
return _context.stop();
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}, _callee, null, [[0,, 3, 9]]);
|
113
|
+
}));
|
114
|
+
|
115
|
+
return function onOk() {
|
116
|
+
return _ref2.apply(this, arguments);
|
117
|
+
};
|
118
|
+
}();
|
119
|
+
|
120
|
+
var onCancel = function onCancel() {
|
121
|
+
setVisible(false);
|
122
|
+
};
|
123
|
+
|
124
|
+
var onOpen = function onOpen() {
|
125
|
+
setVisible(true);
|
126
|
+
};
|
127
|
+
|
128
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
129
|
+
style: {
|
130
|
+
display: 'inline-flex'
|
131
|
+
},
|
132
|
+
onClick: onOpen
|
133
|
+
}, /*#__PURE__*/_react.default.createElement(_formily.BaseItem, {
|
134
|
+
className: "".concat(prefixCls, "-trigger")
|
135
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
136
|
+
className: "".concat(prefixCls, "-content")
|
137
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
138
|
+
className: "".concat(prefixCls, "-preview")
|
139
|
+
}, field.title), pattern === 'editable' && /*#__PURE__*/_react.default.createElement(_icon.default, {
|
140
|
+
className: "".concat(prefixCls, "-edit-btn"),
|
141
|
+
type: "form-line",
|
142
|
+
size: "small"
|
143
|
+
})))), /*#__PURE__*/_react.default.createElement(type, _objectSpread(_objectSpread({
|
144
|
+
title: field.title
|
145
|
+
}, props), {}, {
|
146
|
+
visible: visible,
|
147
|
+
onOk: onOk,
|
148
|
+
onCancel: onCancel,
|
149
|
+
onClose: onCancel
|
150
|
+
})));
|
151
|
+
});
|
152
|
+
};
|
153
|
+
|
154
|
+
Editable.Popover = (0, _react2.observer)(function (_ref3) {
|
155
|
+
var props = _extends({}, _ref3);
|
156
|
+
|
157
|
+
var field = (0, _react2.useField)();
|
158
|
+
var pattern = useParentPattern();
|
159
|
+
|
160
|
+
var _useState3 = (0, _react.useState)(false),
|
161
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
162
|
+
visible = _useState4[0],
|
163
|
+
setVisible = _useState4[1];
|
164
|
+
|
165
|
+
var prefixCls = (0, _utils.usePrefixCls)('formily-editable');
|
166
|
+
|
167
|
+
var closePopover = /*#__PURE__*/function () {
|
168
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
169
|
+
var errors;
|
170
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
171
|
+
while (1) {
|
172
|
+
switch (_context2.prev = _context2.next) {
|
173
|
+
case 0:
|
174
|
+
_context2.prev = 0;
|
175
|
+
_context2.next = 3;
|
176
|
+
return field.form.validate("".concat(field.address, ".*"));
|
177
|
+
|
178
|
+
case 3:
|
179
|
+
_context2.prev = 3;
|
180
|
+
errors = field.form.queryFeedbacks({
|
181
|
+
type: 'error',
|
182
|
+
address: "".concat(field.address, ".*")
|
183
|
+
});
|
184
|
+
|
185
|
+
if (!(errors === null || errors === void 0 ? void 0 : errors.length)) {
|
186
|
+
_context2.next = 7;
|
187
|
+
break;
|
188
|
+
}
|
189
|
+
|
190
|
+
return _context2.abrupt("return");
|
191
|
+
|
192
|
+
case 7:
|
193
|
+
setVisible(false);
|
194
|
+
return _context2.finish(3);
|
195
|
+
|
196
|
+
case 9:
|
197
|
+
case "end":
|
198
|
+
return _context2.stop();
|
199
|
+
}
|
200
|
+
}
|
201
|
+
}, _callee2, null, [[0,, 3, 9]]);
|
202
|
+
}));
|
203
|
+
|
204
|
+
return function closePopover() {
|
205
|
+
return _ref4.apply(this, arguments);
|
206
|
+
};
|
207
|
+
}();
|
208
|
+
|
209
|
+
var openPopover = function openPopover() {
|
210
|
+
setVisible(true);
|
211
|
+
};
|
212
|
+
|
213
|
+
return /*#__PURE__*/_react.default.createElement(_components.Balloon, _objectSpread(_objectSpread({}, props), {}, {
|
214
|
+
title: field.title,
|
215
|
+
className: props.className,
|
216
|
+
visible: visible,
|
217
|
+
onVisibleChange: function onVisibleChange(visible) {
|
218
|
+
if (visible) {
|
219
|
+
openPopover();
|
220
|
+
} else {
|
221
|
+
closePopover();
|
222
|
+
}
|
223
|
+
},
|
224
|
+
align: "t",
|
225
|
+
triggerType: "click",
|
226
|
+
closable: false,
|
227
|
+
trigger: /*#__PURE__*/_react.default.createElement("div", {
|
228
|
+
style: {
|
229
|
+
display: 'inline-flex'
|
230
|
+
}
|
231
|
+
}, /*#__PURE__*/_react.default.createElement(_formily.BaseItem, {
|
232
|
+
className: "".concat(prefixCls, "-trigger")
|
233
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
234
|
+
className: "".concat(prefixCls, "-content")
|
235
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
236
|
+
className: "".concat(prefixCls, "-preview")
|
237
|
+
}, props.title || field.title), pattern === 'editable' && /*#__PURE__*/_react.default.createElement(_icon.default, {
|
238
|
+
className: "".concat(prefixCls, "-edit-btn"),
|
239
|
+
type: "form-line",
|
240
|
+
size: "small"
|
241
|
+
}))))
|
242
|
+
}), props.children);
|
243
|
+
});
|
244
|
+
Editable.Dialog = Editable.BaseBuilder(_components.Dialog);
|
245
|
+
Editable.Drawer = Editable.BaseBuilder(_components.Drawer);
|
246
|
+
var EditableDialog = Editable.Dialog;
|
247
|
+
exports.EditableDialog = EditableDialog;
|
248
|
+
var EditableDrawer = Editable.Drawer;
|
249
|
+
exports.EditableDrawer = EditableDrawer;
|
250
|
+
var EditablePopover = Editable.Popover;
|
251
|
+
exports.EditablePopover = EditablePopover;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './index.scss';
|
3
|
+
interface IGroupPanelProps {
|
4
|
+
title?: React.ReactNode;
|
5
|
+
xIndex?: number;
|
6
|
+
className?: string;
|
7
|
+
}
|
8
|
+
declare type IGroupPanel = React.FC<IGroupPanelProps>;
|
9
|
+
declare type IFormGroup = React.FC<any> & {
|
10
|
+
GroupPanel?: IGroupPanel;
|
11
|
+
};
|
12
|
+
declare const FormGroup: IFormGroup;
|
13
|
+
export default FormGroup;
|