@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,66 @@
|
|
1
|
+
var _excluded = ["title", "decoratorProps"],
|
2
|
+
_excluded2 = ["props", "children", "items"];
|
3
|
+
|
4
|
+
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; }
|
5
|
+
|
6
|
+
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; }
|
7
|
+
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
9
|
+
|
10
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
11
|
+
|
12
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
13
|
+
|
14
|
+
var initializeChildren = function initializeChildren(item) {
|
15
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
16
|
+
component: 'ArrayTable.Addition'
|
17
|
+
});
|
18
|
+
};
|
19
|
+
|
20
|
+
var initializeColumn = function initializeColumn(item) {
|
21
|
+
var title = item.title,
|
22
|
+
decoratorProps = item.decoratorProps,
|
23
|
+
otherProps = _objectWithoutProperties(item, _excluded);
|
24
|
+
|
25
|
+
return _objectSpread(_objectSpread({}, otherProps), {}, {
|
26
|
+
component: 'ArrayTable.Column',
|
27
|
+
props: _objectSpread(_objectSpread({}, decoratorProps), {}, {
|
28
|
+
title: title
|
29
|
+
}),
|
30
|
+
children: [_objectSpread({}, otherProps)]
|
31
|
+
});
|
32
|
+
};
|
33
|
+
|
34
|
+
var initializeItems = function initializeItems(items) {
|
35
|
+
return [{
|
36
|
+
name: 'items',
|
37
|
+
type: 'object',
|
38
|
+
children: items.map(function (item) {
|
39
|
+
return initializeColumn(item);
|
40
|
+
})
|
41
|
+
}];
|
42
|
+
};
|
43
|
+
|
44
|
+
var initialize = function initialize(item) {
|
45
|
+
var _item$props = item.props,
|
46
|
+
props = _item$props === void 0 ? {} : _item$props,
|
47
|
+
_item$children = item.children,
|
48
|
+
children = _item$children === void 0 ? [] : _item$children,
|
49
|
+
_item$items = item.items,
|
50
|
+
items = _item$items === void 0 ? [] : _item$items,
|
51
|
+
otherProps = _objectWithoutProperties(item, _excluded2);
|
52
|
+
|
53
|
+
return _objectSpread(_objectSpread({}, otherProps), {}, {
|
54
|
+
props: _objectSpread({
|
55
|
+
pagination: {
|
56
|
+
pageSize: 10
|
57
|
+
}
|
58
|
+
}, props),
|
59
|
+
children: children.map(function (item) {
|
60
|
+
return initializeChildren(item);
|
61
|
+
}),
|
62
|
+
items: initializeItems(items)
|
63
|
+
});
|
64
|
+
};
|
65
|
+
|
66
|
+
export default initialize;
|
@@ -0,0 +1,75 @@
|
|
1
|
+
var _excluded = ["component", "props"],
|
2
|
+
_excluded2 = ["props", "component"];
|
3
|
+
|
4
|
+
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; }
|
5
|
+
|
6
|
+
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; }
|
7
|
+
|
8
|
+
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; }
|
9
|
+
|
10
|
+
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; }
|
11
|
+
|
12
|
+
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; }
|
13
|
+
|
14
|
+
var buttonTextMap = {
|
15
|
+
Submit: '提交',
|
16
|
+
Reset: '重置'
|
17
|
+
};
|
18
|
+
|
19
|
+
var initializeButton = function initializeButton(item) {
|
20
|
+
var component = item.component,
|
21
|
+
props = item.props,
|
22
|
+
otherProps = _objectWithoutProperties(item, _excluded);
|
23
|
+
|
24
|
+
return _objectSpread({
|
25
|
+
component: component,
|
26
|
+
props: _objectSpread({
|
27
|
+
children: buttonTextMap[component]
|
28
|
+
}, props)
|
29
|
+
}, otherProps);
|
30
|
+
};
|
31
|
+
|
32
|
+
var initialize = function initialize(item) {
|
33
|
+
var _item$props = item.props,
|
34
|
+
props = _item$props === void 0 ? {} : _item$props,
|
35
|
+
component = item.component,
|
36
|
+
otherProps = _objectWithoutProperties(item, _excluded2);
|
37
|
+
|
38
|
+
var sticky = props.sticky,
|
39
|
+
align = props.align,
|
40
|
+
gutter = props.gutter;
|
41
|
+
var alignProps = align ? {
|
42
|
+
align: align
|
43
|
+
} : {};
|
44
|
+
var gutterProps = gutter ? {
|
45
|
+
gutter: gutter
|
46
|
+
} : {};
|
47
|
+
|
48
|
+
if (component && ['Submit', 'Reset'].includes(component)) {
|
49
|
+
return initializeButton(item);
|
50
|
+
}
|
51
|
+
|
52
|
+
var decoratorTemp = {
|
53
|
+
title: ' ',
|
54
|
+
decorator: 'FormButtonGroup.FormItem',
|
55
|
+
decoratorProps: {
|
56
|
+
inset: false
|
57
|
+
},
|
58
|
+
props: _objectSpread(_objectSpread({}, alignProps), gutterProps)
|
59
|
+
};
|
60
|
+
|
61
|
+
if (sticky) {
|
62
|
+
decoratorTemp = {
|
63
|
+
title: '',
|
64
|
+
decorator: 'FormButtonGroup.Sticky',
|
65
|
+
decoratorProps: _objectSpread({}, alignProps),
|
66
|
+
props: _objectSpread({}, gutterProps)
|
67
|
+
};
|
68
|
+
}
|
69
|
+
|
70
|
+
return _objectSpread(_objectSpread({
|
71
|
+
component: component
|
72
|
+
}, decoratorTemp), otherProps);
|
73
|
+
};
|
74
|
+
|
75
|
+
export default initialize;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
var _excluded = ["children", "title", "props"],
|
2
|
+
_excluded2 = ["children"];
|
3
|
+
|
4
|
+
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; }
|
5
|
+
|
6
|
+
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; }
|
7
|
+
|
8
|
+
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; }
|
9
|
+
|
10
|
+
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; }
|
11
|
+
|
12
|
+
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; }
|
13
|
+
|
14
|
+
var initializeCollapsePanel = function initializeCollapsePanel(item) {
|
15
|
+
var _item$children = item.children,
|
16
|
+
children = _item$children === void 0 ? [] : _item$children,
|
17
|
+
title = item.title,
|
18
|
+
_item$props = item.props,
|
19
|
+
props = _item$props === void 0 ? {} : _item$props,
|
20
|
+
otherProps = _objectWithoutProperties(item, _excluded);
|
21
|
+
|
22
|
+
return _objectSpread({
|
23
|
+
component: 'FormCollapse.CollapsePanel',
|
24
|
+
props: _objectSpread({
|
25
|
+
title: title
|
26
|
+
}, props),
|
27
|
+
children: children
|
28
|
+
}, otherProps);
|
29
|
+
};
|
30
|
+
|
31
|
+
var initialize = function initialize(item) {
|
32
|
+
var _item$children2 = item.children,
|
33
|
+
children = _item$children2 === void 0 ? [] : _item$children2,
|
34
|
+
otherProps = _objectWithoutProperties(item, _excluded2);
|
35
|
+
|
36
|
+
return _objectSpread({
|
37
|
+
children: children.map(function (item) {
|
38
|
+
return initializeCollapsePanel(item);
|
39
|
+
})
|
40
|
+
}, otherProps);
|
41
|
+
};
|
42
|
+
|
43
|
+
export default initialize;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
var _excluded = ["props", "children", "title"],
|
2
|
+
_excluded2 = ["props", "children"];
|
3
|
+
|
4
|
+
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; }
|
5
|
+
|
6
|
+
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; }
|
7
|
+
|
8
|
+
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; }
|
9
|
+
|
10
|
+
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; }
|
11
|
+
|
12
|
+
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; }
|
13
|
+
|
14
|
+
var initializeGroupPanel = function initializeGroupPanel(item) {
|
15
|
+
var _item$props = item.props,
|
16
|
+
props = _item$props === void 0 ? {} : _item$props,
|
17
|
+
_item$children = item.children,
|
18
|
+
children = _item$children === void 0 ? [] : _item$children,
|
19
|
+
title = item.title,
|
20
|
+
otherProps = _objectWithoutProperties(item, _excluded);
|
21
|
+
|
22
|
+
return _objectSpread({
|
23
|
+
component: 'FormGroup.GroupPanel',
|
24
|
+
props: _objectSpread({
|
25
|
+
title: title
|
26
|
+
}, props),
|
27
|
+
children: children
|
28
|
+
}, otherProps);
|
29
|
+
};
|
30
|
+
|
31
|
+
var initialize = function initialize(item) {
|
32
|
+
var _item$props2 = item.props,
|
33
|
+
props = _item$props2 === void 0 ? {} : _item$props2,
|
34
|
+
_item$children2 = item.children,
|
35
|
+
children = _item$children2 === void 0 ? [] : _item$children2,
|
36
|
+
otherProps = _objectWithoutProperties(item, _excluded2);
|
37
|
+
|
38
|
+
return _objectSpread({
|
39
|
+
props: props,
|
40
|
+
children: children.map(function (item) {
|
41
|
+
return initializeGroupPanel(item);
|
42
|
+
})
|
43
|
+
}, otherProps);
|
44
|
+
};
|
45
|
+
|
46
|
+
export default initialize;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
var _excluded = ["props", "children", "title"],
|
2
|
+
_excluded2 = ["props", "children"];
|
3
|
+
|
4
|
+
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; }
|
5
|
+
|
6
|
+
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; }
|
7
|
+
|
8
|
+
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; }
|
9
|
+
|
10
|
+
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; }
|
11
|
+
|
12
|
+
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; }
|
13
|
+
|
14
|
+
var initializeStepPane = function initializeStepPane(item) {
|
15
|
+
var _item$props = item.props,
|
16
|
+
props = _item$props === void 0 ? {} : _item$props,
|
17
|
+
_item$children = item.children,
|
18
|
+
children = _item$children === void 0 ? [] : _item$children,
|
19
|
+
title = item.title,
|
20
|
+
otherProps = _objectWithoutProperties(item, _excluded);
|
21
|
+
|
22
|
+
return _objectSpread({
|
23
|
+
component: 'FormStep.StepPane',
|
24
|
+
props: _objectSpread({
|
25
|
+
title: title
|
26
|
+
}, props),
|
27
|
+
children: children
|
28
|
+
}, otherProps);
|
29
|
+
};
|
30
|
+
|
31
|
+
var initialize = function initialize(item) {
|
32
|
+
var _item$props2 = item.props,
|
33
|
+
props = _item$props2 === void 0 ? {} : _item$props2,
|
34
|
+
_item$children2 = item.children,
|
35
|
+
children = _item$children2 === void 0 ? [] : _item$children2,
|
36
|
+
otherProps = _objectWithoutProperties(item, _excluded2);
|
37
|
+
|
38
|
+
return _objectSpread({
|
39
|
+
props: _objectSpread({
|
40
|
+
labelPlacement: 'hoz'
|
41
|
+
}, props),
|
42
|
+
children: children.map(function (item) {
|
43
|
+
return initializeStepPane(item);
|
44
|
+
})
|
45
|
+
}, otherProps);
|
46
|
+
};
|
47
|
+
|
48
|
+
export default initialize;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
var _excluded = ["props", "children", "title"],
|
2
|
+
_excluded2 = ["props", "children"];
|
3
|
+
|
4
|
+
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; }
|
5
|
+
|
6
|
+
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; }
|
7
|
+
|
8
|
+
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; }
|
9
|
+
|
10
|
+
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; }
|
11
|
+
|
12
|
+
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; }
|
13
|
+
|
14
|
+
var initializeTabPane = function initializeTabPane(item) {
|
15
|
+
var _item$props = item.props,
|
16
|
+
props = _item$props === void 0 ? {} : _item$props,
|
17
|
+
_item$children = item.children,
|
18
|
+
children = _item$children === void 0 ? [] : _item$children,
|
19
|
+
title = item.title,
|
20
|
+
otherProps = _objectWithoutProperties(item, _excluded);
|
21
|
+
|
22
|
+
return _objectSpread({
|
23
|
+
component: 'FormTab.TabPane',
|
24
|
+
props: _objectSpread({
|
25
|
+
tab: title
|
26
|
+
}, props),
|
27
|
+
children: children
|
28
|
+
}, otherProps);
|
29
|
+
};
|
30
|
+
|
31
|
+
var initialize = function initialize(item) {
|
32
|
+
var _item$props2 = item.props,
|
33
|
+
props = _item$props2 === void 0 ? {} : _item$props2,
|
34
|
+
_item$children2 = item.children,
|
35
|
+
children = _item$children2 === void 0 ? [] : _item$children2,
|
36
|
+
otherProps = _objectWithoutProperties(item, _excluded2);
|
37
|
+
|
38
|
+
return _objectSpread({
|
39
|
+
props: _objectSpread({
|
40
|
+
navStyle: {
|
41
|
+
lineHeight: 1.5
|
42
|
+
},
|
43
|
+
contentStyle: {
|
44
|
+
paddingTop: 16
|
45
|
+
}
|
46
|
+
}, props),
|
47
|
+
children: children.map(function (item) {
|
48
|
+
return initializeTabPane(item);
|
49
|
+
})
|
50
|
+
}, otherProps);
|
51
|
+
};
|
52
|
+
|
53
|
+
export default initialize;
|
@@ -0,0 +1,69 @@
|
|
1
|
+
var _excluded = ["component", "props"];
|
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 _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; }
|
10
|
+
|
11
|
+
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; }
|
12
|
+
|
13
|
+
var proFieldTypeMap = {
|
14
|
+
Input: 'text',
|
15
|
+
Password: 'password',
|
16
|
+
TextArea: 'textArea',
|
17
|
+
NumberPicker: 'number',
|
18
|
+
Percent: 'percent',
|
19
|
+
Money: 'money',
|
20
|
+
Select: 'select',
|
21
|
+
MultipleSelect: 'multipleSelect',
|
22
|
+
TreeSelect: 'treeSelect',
|
23
|
+
Cascader: 'cascader',
|
24
|
+
MultipleCascader: 'multipleCascader',
|
25
|
+
ArbitraryCascader: 'arbitraryCascader',
|
26
|
+
Radio: 'radio',
|
27
|
+
Checkbox: 'checkbox',
|
28
|
+
Switch: 'switch',
|
29
|
+
DatePicker: 'date',
|
30
|
+
TimePicker: 'time',
|
31
|
+
DateTimePicker: 'dateTime',
|
32
|
+
WeekPicker: 'dateWeek',
|
33
|
+
MonthPicker: 'dateMonth',
|
34
|
+
YearPicker: 'dateYear',
|
35
|
+
QuarterPicker: 'dateQuarter',
|
36
|
+
DateRangePicker: 'dateRange',
|
37
|
+
// TimeRangePicker: 'timeRange',
|
38
|
+
DateTimeRangePicker: 'dateTimeRange',
|
39
|
+
WeekRangePicker: 'dateWeekRange',
|
40
|
+
MonthRangePicker: 'dateMonthRange',
|
41
|
+
YearRangePicker: 'dateYearRange',
|
42
|
+
QuarterRangePicker: 'dateQuarterRange',
|
43
|
+
Transfer: 'transfer',
|
44
|
+
ColorPicker: 'color',
|
45
|
+
ColorRadio: 'colorRadio',
|
46
|
+
ColorSwatches: 'colorSwatches',
|
47
|
+
ColorTwitter: 'colorTwitter',
|
48
|
+
IconPicker: 'icon',
|
49
|
+
JsonInput: 'json',
|
50
|
+
Search: 'search' // Upload: 'upload',
|
51
|
+
|
52
|
+
};
|
53
|
+
|
54
|
+
var initialize = function initialize(item) {
|
55
|
+
var component = item.component,
|
56
|
+
_item$props = item.props,
|
57
|
+
props = _item$props === void 0 ? {} : _item$props,
|
58
|
+
otherProps = _objectWithoutProperties(item, _excluded);
|
59
|
+
|
60
|
+
return _objectSpread({
|
61
|
+
component: 'ProField',
|
62
|
+
props: _objectSpread({
|
63
|
+
type: proFieldTypeMap[component]
|
64
|
+
}, props)
|
65
|
+
}, otherProps);
|
66
|
+
};
|
67
|
+
|
68
|
+
export { proFieldTypeMap };
|
69
|
+
export default initialize;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { IRequestConfig } from '../';
|
2
|
+
interface IInitializeRequest {
|
3
|
+
(requestConfig?: IRequestConfig): {
|
4
|
+
reactions: any[];
|
5
|
+
scope: {
|
6
|
+
[x: string]: any;
|
7
|
+
};
|
8
|
+
};
|
9
|
+
}
|
10
|
+
declare const initializeRequest: IInitializeRequest;
|
11
|
+
export default initializeRequest;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
|
+
|
3
|
+
import { useRequest, useAsyncDataSource } from '../SchemaForm/reactions';
|
4
|
+
import { getRandomName } from '../utils';
|
5
|
+
|
6
|
+
var initializeRequest = function initializeRequest(requestConfig) {
|
7
|
+
if (requestConfig) {
|
8
|
+
var _scope;
|
9
|
+
|
10
|
+
// todo 可根据request的功能类型配置不同内置的方法,如:useAsyncDataSource
|
11
|
+
var requestScopeName = getRandomName('$request');
|
12
|
+
var dataSourceScopeName = "$dataSource";
|
13
|
+
return {
|
14
|
+
reactions: ["{{".concat(dataSourceScopeName, "(").concat(requestScopeName, ")}}")],
|
15
|
+
scope: (_scope = {}, _defineProperty(_scope, requestScopeName, useRequest(requestConfig)), _defineProperty(_scope, dataSourceScopeName, useAsyncDataSource), _scope)
|
16
|
+
};
|
17
|
+
}
|
18
|
+
|
19
|
+
return {
|
20
|
+
reactions: [],
|
21
|
+
scope: {}
|
22
|
+
};
|
23
|
+
};
|
24
|
+
|
25
|
+
export default initializeRequest;
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import { request, isObj, isFn, paramMap, listToTree } from '@teamix/utils'; // 配置请求
|
2
|
+
|
3
|
+
var useRequest = function useRequest(requestConfig) {
|
4
|
+
return function (field) {
|
5
|
+
var url = requestConfig.url,
|
6
|
+
method = requestConfig.method,
|
7
|
+
params = requestConfig.params,
|
8
|
+
data = requestConfig.data,
|
9
|
+
when = requestConfig.when,
|
10
|
+
formatter = requestConfig.formatter,
|
11
|
+
onSuccess = requestConfig.onSuccess,
|
12
|
+
onError = requestConfig.onError;
|
13
|
+
var whenResult = isFn(when) ? when(field) : {};
|
14
|
+
|
15
|
+
var _ref = isObj(whenResult) ? whenResult : {},
|
16
|
+
newParams = _ref.params,
|
17
|
+
newData = _ref.data;
|
18
|
+
|
19
|
+
if (when && whenResult === false) {
|
20
|
+
return Promise.reject();
|
21
|
+
}
|
22
|
+
|
23
|
+
return request({
|
24
|
+
method: method,
|
25
|
+
url: url,
|
26
|
+
params: newParams !== null && newParams !== void 0 ? newParams : params,
|
27
|
+
data: newData !== null && newData !== void 0 ? newData : data
|
28
|
+
}).then(function (data) {
|
29
|
+
// 默认按request返回res.data.data处理
|
30
|
+
var dataSource = formatter ? formatter(data, {
|
31
|
+
paramMap: paramMap,
|
32
|
+
listToTree: listToTree
|
33
|
+
}) : data;
|
34
|
+
onSuccess && onSuccess(dataSource, field);
|
35
|
+
return dataSource;
|
36
|
+
}).catch(function (error) {
|
37
|
+
onError && onError(error);
|
38
|
+
return error;
|
39
|
+
});
|
40
|
+
};
|
41
|
+
}; // 配置DataSource
|
42
|
+
|
43
|
+
|
44
|
+
var useAsyncDataSource = function useAsyncDataSource(services) {
|
45
|
+
return function (field) {
|
46
|
+
field.setState({
|
47
|
+
loading: true
|
48
|
+
});
|
49
|
+
services(field).then(function (dataSource) {
|
50
|
+
field.setState({
|
51
|
+
dataSource: dataSource,
|
52
|
+
loading: false
|
53
|
+
});
|
54
|
+
}).catch(function () {
|
55
|
+
field.setState({
|
56
|
+
loading: false
|
57
|
+
});
|
58
|
+
});
|
59
|
+
};
|
60
|
+
};
|
61
|
+
|
62
|
+
export { useRequest, useAsyncDataSource };
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/**
|
2
|
+
* 导出全部 @teamix/formily 方法,支持完全自主定义表单
|
3
|
+
*/
|
4
|
+
export * as formilyCore from '@formily/core';
|
5
|
+
export * as formilyReact from '@formily/react';
|
6
|
+
export * from '@teamix/formily';
|
7
|
+
export * from './Filter';
|
8
|
+
export * from './typing';
|
9
|
+
/**
|
10
|
+
* 导出常用方法等
|
11
|
+
*/
|
12
|
+
import { createForm, registerValidateRules as registerRules, registerValidateFormats as registerFormats, registerValidateLocale, setValidateLanguage } from '@formily/core';
|
13
|
+
import { createSchemaField, Field, FormConsumer } from '@formily/react';
|
14
|
+
import { toJS } from '@formily/reactive';
|
15
|
+
export { createForm, registerRules, registerFormats, registerValidateLocale, setValidateLanguage, Field, createSchemaField, FormConsumer, toJS, };
|
16
|
+
/**
|
17
|
+
* 导出封装的 ProForm 组件,支持快速搭建表单
|
18
|
+
*/
|
19
|
+
import ProForm from './ProForm';
|
20
|
+
export default ProForm;
|
package/es/form/index.js
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
/**
|
2
|
+
* 导出全部 @teamix/formily 方法,支持完全自主定义表单
|
3
|
+
*/
|
4
|
+
import * as _formilyCore from '@formily/core';
|
5
|
+
export { _formilyCore as formilyCore };
|
6
|
+
import * as _formilyReact from '@formily/react';
|
7
|
+
export { _formilyReact as formilyReact };
|
8
|
+
export * from '@teamix/formily';
|
9
|
+
export * from './Filter';
|
10
|
+
export * from './typing';
|
11
|
+
/**
|
12
|
+
* 导出常用方法等
|
13
|
+
*/
|
14
|
+
|
15
|
+
import { createForm, registerValidateRules as registerRules, registerValidateFormats as registerFormats, registerValidateLocale, setValidateLanguage } from '@formily/core';
|
16
|
+
import { createSchemaField, Field, FormConsumer } from '@formily/react';
|
17
|
+
import { toJS } from '@formily/reactive';
|
18
|
+
export { createForm, registerRules, registerFormats, registerValidateLocale, setValidateLanguage, Field, createSchemaField, FormConsumer, toJS };
|
19
|
+
/**
|
20
|
+
* 导出封装的 ProForm 组件,支持快速搭建表单
|
21
|
+
*/
|
22
|
+
|
23
|
+
import ProForm from './ProForm';
|
24
|
+
export default ProForm;
|