@teamix/pro 1.1.3 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -0
- package/dist/pro.css +1 -1
- package/dist/pro.js +1198 -1228
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +1 -1
- package/es/actions/base.d.ts +13 -0
- package/es/actions/base.js +23 -0
- package/es/actions/confirm.d.ts +7 -0
- package/es/actions/confirm.js +11 -0
- package/es/actions/danger-confirm.d.ts +7 -0
- package/es/actions/danger-confirm.js +14 -0
- package/es/actions/dialog-component.d.ts +10 -0
- package/es/actions/dialog-component.js +25 -0
- package/es/actions/dialog-form.d.ts +15 -0
- package/es/actions/dialog-form.js +129 -0
- package/es/actions/dialog-table.d.ts +9 -0
- package/es/actions/dialog-table.js +10 -0
- package/es/actions/dialog.d.ts +17 -0
- package/es/actions/dialog.js +197 -0
- package/es/actions/drawer-form.d.ts +6 -0
- package/es/actions/drawer-form.js +7 -0
- package/es/actions/drawer-table.d.ts +6 -0
- package/es/actions/drawer-table.js +7 -0
- package/es/actions/drawer.d.ts +6 -0
- package/es/actions/drawer.js +7 -0
- package/es/actions/error.d.ts +7 -0
- package/es/actions/error.js +11 -0
- package/es/actions/index.d.ts +71 -0
- package/es/actions/index.js +337 -0
- package/es/actions/index.scss +34 -0
- package/es/actions/link.d.ts +14 -0
- package/es/actions/link.js +45 -0
- package/es/actions/notice.d.ts +7 -0
- package/es/actions/notice.js +11 -0
- package/es/actions/request.d.ts +9 -0
- package/es/actions/request.js +60 -0
- package/es/card/index.d.ts +47 -0
- package/es/card/index.js +159 -0
- package/es/card/index.scss +98 -0
- package/es/field/index.d.ts +3 -0
- package/es/field/index.js +3 -0
- package/es/form/Components/Editable/index.d.ts +20 -0
- package/es/form/Components/Editable/index.js +228 -0
- package/es/form/Components/FormGroup/index.d.ts +13 -0
- package/es/form/Components/FormGroup/index.js +89 -0
- package/es/form/Components/FormGroup/index.scss +23 -0
- package/es/form/Components/ProField/index.d.ts +150 -0
- package/es/form/Components/ProField/index.js +53 -0
- package/es/form/Components/Query/index.d.ts +4 -0
- package/es/form/Components/Query/index.js +70 -0
- package/es/form/Components/Query/index.scss +90 -0
- package/es/form/Components/QueryFilter/index.d.ts +3 -0
- package/es/form/Components/QueryFilter/index.js +111 -0
- package/es/form/Components/Search/index.d.ts +11 -0
- package/es/form/Components/Search/index.js +89 -0
- package/es/form/Filter/index.d.ts +16 -0
- package/es/form/Filter/index.js +218 -0
- package/es/form/ProForm/index.d.ts +5 -0
- package/es/form/ProForm/index.js +100 -0
- package/es/form/ProForm/index.scss +254 -0
- package/es/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/es/form/SchemaForm/adapterComponent.js +17 -0
- package/es/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/es/form/SchemaForm/adapterDecorator.js +28 -0
- package/es/form/SchemaForm/adapterType.d.ts +5 -0
- package/es/form/SchemaForm/adapterType.js +52 -0
- package/es/form/SchemaForm/index.d.ts +4 -0
- package/es/form/SchemaForm/index.js +259 -0
- package/es/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCards.js +24 -0
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCollapse.js +24 -0
- package/es/form/SchemaForm/initializeArrayIcon.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayIcon.js +57 -0
- package/es/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayItems.js +38 -0
- package/es/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayTable.js +56 -0
- package/es/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormButton.js +75 -0
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormCollapse.js +43 -0
- package/es/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormGroup.js +46 -0
- package/es/form/SchemaForm/initializeFormStep.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormStep.js +48 -0
- package/es/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormTab.js +53 -0
- package/es/form/SchemaForm/initializeProField.d.ts +5 -0
- package/es/form/SchemaForm/initializeProField.js +67 -0
- package/es/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/es/form/SchemaForm/initializeRequest.js +25 -0
- package/es/form/SchemaForm/reactions.d.ts +4 -0
- package/es/form/SchemaForm/reactions.js +62 -0
- package/es/form/index.d.ts +27 -0
- package/es/form/index.js +35 -0
- package/es/form/typing.d.ts +69 -0
- package/es/form/typing.js +1 -0
- package/es/form/utils.d.ts +9 -0
- package/es/form/utils.js +108 -0
- package/es/form/warning.d.ts +3 -0
- package/es/form/warning.js +16 -0
- package/es/hooks/index.d.ts +2 -0
- package/es/hooks/index.js +2 -0
- package/es/index.d.ts +24 -0
- package/es/index.js +29 -0
- package/es/info/components/FormItem/index.d.ts +5 -0
- package/es/info/components/FormItem/index.js +63 -0
- package/es/info/components/FormItem/index.scss +60 -0
- package/es/info/components/InfoGroup/index.d.ts +5 -0
- package/es/info/components/InfoGroup/index.js +47 -0
- package/es/info/components/InfoGroup/index.scss +14 -0
- package/es/info/components/InfoValueItem/index.d.ts +5 -0
- package/es/info/components/InfoValueItem/index.js +223 -0
- package/es/info/components/InfoValueItem/index.scss +21 -0
- package/es/info/components/baseInfo/index.d.ts +7 -0
- package/es/info/components/baseInfo/index.js +73 -0
- package/es/info/components/baseInfo/index.scss +3 -0
- package/es/info/components/headerInfo/index.d.ts +7 -0
- package/es/info/components/headerInfo/index.js +85 -0
- package/es/info/components/headerInfo/index.scss +0 -0
- package/es/info/components/tableInfo/index.d.ts +8 -0
- package/es/info/components/tableInfo/index.js +175 -0
- package/es/info/components/tableInfo/index.scss +18 -0
- package/es/info/index.d.ts +10 -0
- package/es/info/index.js +87 -0
- package/es/info/index.scss +12 -0
- package/es/info/typing.d.ts +157 -0
- package/es/info/typing.js +1 -0
- package/es/info/utils/index.d.ts +12 -0
- package/es/info/utils/index.js +33 -0
- package/es/info/utils/layout.d.ts +2 -0
- package/es/info/utils/layout.js +58 -0
- package/es/info/utils/useInfoRequest.d.ts +14 -0
- package/es/info/utils/useInfoRequest.js +73 -0
- package/es/info/utils/utils.d.ts +1 -0
- package/es/info/utils/utils.js +13 -0
- package/es/layout/index.d.ts +2 -0
- package/es/layout/index.js +3 -0
- package/es/nocode/configurators/Card.d.ts +3 -0
- package/es/nocode/configurators/Card.js +109 -0
- package/es/nocode/configurators/PageHeader.d.ts +3 -0
- package/es/nocode/configurators/PageHeader.js +202 -0
- package/es/nocode/configurators/ProTable.d.ts +3 -0
- package/es/nocode/configurators/ProTable.js +320 -0
- package/es/nocode/configurators/common.d.ts +188 -0
- package/es/nocode/configurators/common.js +318 -0
- package/es/nocode/configurators/index.d.ts +15 -0
- package/es/nocode/configurators/index.js +27 -0
- package/es/nocode/configurators/map.d.ts +2 -0
- package/es/nocode/configurators/map.js +8 -0
- package/es/nocode/index.d.ts +8 -0
- package/es/nocode/index.js +11 -0
- package/es/nocode/index.scss +93 -0
- package/es/nocode/pages/editor.d.ts +12 -0
- package/es/nocode/pages/editor.js +40 -0
- package/es/nocode/pages/index.d.ts +14 -0
- package/es/nocode/pages/index.js +41 -0
- package/es/nocode/pages/playground.d.ts +11 -0
- package/es/nocode/pages/playground.js +130 -0
- package/es/nocode/pages/renderer.d.ts +10 -0
- package/es/nocode/pages/renderer.js +144 -0
- package/es/nocode/playground.d.ts +14 -0
- package/es/nocode/playground.js +68 -0
- package/es/page-container/index.d.ts +3 -0
- package/es/page-container/index.js +3 -0
- package/es/page-header/index.d.ts +43 -0
- package/es/page-header/index.js +233 -0
- package/es/page-header/index.scss +169 -0
- package/es/skeleton/index.d.ts +3 -0
- package/es/skeleton/index.js +3 -0
- package/es/table/components/Filter/index.d.ts +9 -0
- package/es/table/components/Filter/index.js +223 -0
- package/es/table/components/Filter/index.scss +23 -0
- package/es/table/components/Layout/index.d.ts +5 -0
- package/es/table/components/Layout/index.js +242 -0
- package/es/table/components/Layout/index.scss +39 -0
- package/es/table/components/QuickAction/index.d.ts +10 -0
- package/es/table/components/QuickAction/index.js +53 -0
- package/es/table/components/QuickAction/index.scss +0 -0
- package/es/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/es/table/components/ToolBar/DensityIcon.js +117 -0
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FilterColumnIcon.js +284 -0
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +89 -0
- package/es/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/es/table/components/ToolBar/Fullscreen.js +68 -0
- package/es/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/es/table/components/ToolBar/RefreshIcon.js +45 -0
- package/es/table/components/ToolBar/index.d.ts +5 -0
- package/es/table/components/ToolBar/index.js +79 -0
- package/es/table/components/ToolBar/index.scss +110 -0
- package/es/table/index.d.ts +6 -0
- package/es/table/index.js +607 -0
- package/es/table/index.scss +103 -0
- package/es/table/typing.d.ts +222 -0
- package/es/table/typing.js +1 -0
- package/es/table/utils/columnRender.d.ts +13 -0
- package/es/table/utils/columnRender.js +185 -0
- package/es/table/utils/genProColumnToColumn.d.ts +9 -0
- package/es/table/utils/genProColumnToColumn.js +51 -0
- package/es/table/utils/getTableProps.d.ts +2 -0
- package/es/table/utils/getTableProps.js +4 -0
- package/es/table/utils/getTableSortIcons.d.ts +3 -0
- package/es/table/utils/getTableSortIcons.js +21 -0
- package/es/table/utils/index.d.ts +4 -0
- package/es/table/utils/index.js +100 -0
- package/es/table/utils/useTableSelection.d.ts +3 -0
- package/es/table/utils/useTableSelection.js +107 -0
- package/es/templates/Detail/index.d.ts +2 -0
- package/es/templates/Detail/index.js +5 -0
- package/es/templates/Detail/index.scss +3 -0
- package/es/templates/Form/index.d.ts +2 -0
- package/es/templates/Form/index.js +5 -0
- package/es/templates/Form/index.scss +3 -0
- package/es/templates/List/index.d.ts +9 -0
- package/es/templates/List/index.js +45 -0
- package/es/templates/List/index.scss +3 -0
- package/es/templates/index.d.ts +5 -0
- package/es/templates/index.js +7 -0
- package/es/templates/index.scss +3 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.js +2 -0
- package/lib/actions/base.d.ts +13 -0
- package/lib/actions/base.js +33 -0
- package/lib/actions/confirm.d.ts +7 -0
- package/lib/actions/confirm.js +25 -0
- package/lib/actions/danger-confirm.d.ts +7 -0
- package/lib/actions/danger-confirm.js +28 -0
- package/lib/actions/dialog-component.d.ts +10 -0
- package/lib/actions/dialog-component.js +39 -0
- package/lib/actions/dialog-form.d.ts +15 -0
- package/lib/actions/dialog-form.js +152 -0
- package/lib/actions/dialog-table.d.ts +9 -0
- package/lib/actions/dialog-table.js +24 -0
- package/lib/actions/dialog.d.ts +17 -0
- package/lib/actions/dialog.js +219 -0
- package/lib/actions/drawer-form.d.ts +6 -0
- package/lib/actions/drawer-form.js +18 -0
- package/lib/actions/drawer-table.d.ts +6 -0
- package/lib/actions/drawer-table.js +18 -0
- package/lib/actions/drawer.d.ts +6 -0
- package/lib/actions/drawer.js +20 -0
- package/lib/actions/error.d.ts +7 -0
- package/lib/actions/error.js +25 -0
- package/lib/actions/index.d.ts +71 -0
- package/lib/actions/index.js +380 -0
- package/lib/actions/index.scss +34 -0
- package/lib/actions/link.d.ts +14 -0
- package/lib/actions/link.js +60 -0
- package/lib/actions/notice.d.ts +7 -0
- package/lib/actions/notice.js +25 -0
- package/lib/actions/request.d.ts +9 -0
- package/lib/actions/request.js +75 -0
- package/lib/card/index.d.ts +47 -0
- package/lib/card/index.js +179 -0
- package/lib/card/index.scss +98 -0
- package/lib/field/index.d.ts +3 -0
- package/lib/field/index.js +30 -0
- package/lib/form/Components/Editable/index.d.ts +20 -0
- package/lib/form/Components/Editable/index.js +251 -0
- package/lib/form/Components/FormGroup/index.d.ts +13 -0
- package/lib/form/Components/FormGroup/index.js +103 -0
- package/lib/form/Components/FormGroup/index.scss +23 -0
- package/lib/form/Components/ProField/index.d.ts +150 -0
- package/lib/form/Components/ProField/index.js +68 -0
- package/lib/form/Components/Query/index.d.ts +4 -0
- package/lib/form/Components/Query/index.js +91 -0
- package/lib/form/Components/Query/index.scss +90 -0
- package/lib/form/Components/QueryFilter/index.d.ts +3 -0
- package/lib/form/Components/QueryFilter/index.js +130 -0
- package/lib/form/Components/Search/index.d.ts +11 -0
- package/lib/form/Components/Search/index.js +103 -0
- package/lib/form/Filter/index.d.ts +16 -0
- package/lib/form/Filter/index.js +242 -0
- package/lib/form/ProForm/index.d.ts +5 -0
- package/lib/form/ProForm/index.js +125 -0
- package/lib/form/ProForm/index.scss +254 -0
- package/lib/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/lib/form/SchemaForm/adapterComponent.js +27 -0
- package/lib/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/lib/form/SchemaForm/adapterDecorator.js +34 -0
- package/lib/form/SchemaForm/adapterType.d.ts +5 -0
- package/lib/form/SchemaForm/adapterType.js +62 -0
- package/lib/form/SchemaForm/index.d.ts +4 -0
- package/lib/form/SchemaForm/index.js +302 -0
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCards.js +32 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.js +32 -0
- package/lib/form/SchemaForm/initializeArrayIcon.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayIcon.js +68 -0
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayItems.js +46 -0
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayTable.js +63 -0
- package/lib/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormButton.js +82 -0
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormCollapse.js +50 -0
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormGroup.js +53 -0
- package/lib/form/SchemaForm/initializeFormStep.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormStep.js +55 -0
- package/lib/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormTab.js +60 -0
- package/lib/form/SchemaForm/initializeProField.d.ts +5 -0
- package/lib/form/SchemaForm/initializeProField.js +74 -0
- package/lib/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/lib/form/SchemaForm/initializeRequest.js +34 -0
- package/lib/form/SchemaForm/reactions.d.ts +4 -0
- package/lib/form/SchemaForm/reactions.js +72 -0
- package/lib/form/index.d.ts +27 -0
- package/lib/form/index.js +139 -0
- package/lib/form/typing.d.ts +69 -0
- package/lib/form/typing.js +5 -0
- package/lib/form/utils.d.ts +9 -0
- package/lib/form/utils.js +124 -0
- package/lib/form/warning.d.ts +3 -0
- package/lib/form/warning.js +24 -0
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.js +17 -0
- package/lib/index.d.ts +24 -0
- package/lib/index.js +244 -0
- package/lib/info/components/FormItem/index.d.ts +5 -0
- package/lib/info/components/FormItem/index.js +78 -0
- package/lib/info/components/FormItem/index.scss +60 -0
- package/lib/info/components/InfoGroup/index.d.ts +5 -0
- package/lib/info/components/InfoGroup/index.js +67 -0
- package/lib/info/components/InfoGroup/index.scss +14 -0
- package/lib/info/components/InfoValueItem/index.d.ts +5 -0
- package/lib/info/components/InfoValueItem/index.js +249 -0
- package/lib/info/components/InfoValueItem/index.scss +21 -0
- package/lib/info/components/baseInfo/index.d.ts +7 -0
- package/lib/info/components/baseInfo/index.js +100 -0
- package/lib/info/components/baseInfo/index.scss +3 -0
- package/lib/info/components/headerInfo/index.d.ts +7 -0
- package/lib/info/components/headerInfo/index.js +112 -0
- package/lib/info/components/headerInfo/index.scss +0 -0
- package/lib/info/components/tableInfo/index.d.ts +8 -0
- package/lib/info/components/tableInfo/index.js +197 -0
- package/lib/info/components/tableInfo/index.scss +18 -0
- package/lib/info/index.d.ts +10 -0
- package/lib/info/index.js +123 -0
- package/lib/info/index.scss +12 -0
- package/lib/info/typing.d.ts +157 -0
- package/lib/info/typing.js +5 -0
- package/lib/info/utils/index.d.ts +12 -0
- package/lib/info/utils/index.js +50 -0
- package/lib/info/utils/layout.d.ts +2 -0
- package/lib/info/utils/layout.js +65 -0
- package/lib/info/utils/useInfoRequest.d.ts +14 -0
- package/lib/info/utils/useInfoRequest.js +82 -0
- package/lib/info/utils/utils.d.ts +1 -0
- package/lib/info/utils/utils.js +20 -0
- package/lib/layout/index.d.ts +2 -0
- package/lib/layout/index.js +10 -0
- package/lib/nocode/configurators/Card.d.ts +3 -0
- package/lib/nocode/configurators/Card.js +116 -0
- package/lib/nocode/configurators/PageHeader.d.ts +3 -0
- package/lib/nocode/configurators/PageHeader.js +211 -0
- package/lib/nocode/configurators/ProTable.d.ts +3 -0
- package/lib/nocode/configurators/ProTable.js +329 -0
- package/lib/nocode/configurators/common.d.ts +188 -0
- package/lib/nocode/configurators/common.js +329 -0
- package/lib/nocode/configurators/index.d.ts +15 -0
- package/lib/nocode/configurators/index.js +44 -0
- package/lib/nocode/configurators/map.d.ts +2 -0
- package/lib/nocode/configurators/map.js +21 -0
- package/lib/nocode/index.d.ts +8 -0
- package/lib/nocode/index.js +76 -0
- package/lib/nocode/index.scss +93 -0
- package/lib/nocode/pages/editor.d.ts +12 -0
- package/lib/nocode/pages/editor.js +58 -0
- package/lib/nocode/pages/index.d.ts +14 -0
- package/lib/nocode/pages/index.js +93 -0
- package/lib/nocode/pages/playground.d.ts +11 -0
- package/lib/nocode/pages/playground.js +158 -0
- package/lib/nocode/pages/renderer.d.ts +10 -0
- package/lib/nocode/pages/renderer.js +164 -0
- package/lib/nocode/playground.d.ts +14 -0
- package/lib/nocode/playground.js +91 -0
- package/lib/page-container/index.d.ts +3 -0
- package/lib/page-container/index.js +30 -0
- package/lib/page-header/index.d.ts +43 -0
- package/lib/page-header/index.js +252 -0
- package/lib/page-header/index.scss +169 -0
- package/lib/skeleton/index.d.ts +3 -0
- package/lib/skeleton/index.js +30 -0
- package/lib/table/components/Filter/index.d.ts +9 -0
- package/lib/table/components/Filter/index.js +244 -0
- package/lib/table/components/Filter/index.scss +23 -0
- package/lib/table/components/Layout/index.d.ts +5 -0
- package/lib/table/components/Layout/index.js +266 -0
- package/lib/table/components/Layout/index.scss +39 -0
- package/lib/table/components/QuickAction/index.d.ts +10 -0
- package/lib/table/components/QuickAction/index.js +65 -0
- package/lib/table/components/QuickAction/index.scss +0 -0
- package/lib/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/DensityIcon.js +135 -0
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FilterColumnIcon.js +303 -0
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +107 -0
- package/lib/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/lib/table/components/ToolBar/Fullscreen.js +85 -0
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/RefreshIcon.js +60 -0
- package/lib/table/components/ToolBar/index.d.ts +5 -0
- package/lib/table/components/ToolBar/index.js +96 -0
- package/lib/table/components/ToolBar/index.scss +110 -0
- package/lib/table/index.d.ts +6 -0
- package/lib/table/index.js +662 -0
- package/lib/table/index.scss +103 -0
- package/lib/table/typing.d.ts +222 -0
- package/lib/table/typing.js +5 -0
- package/lib/table/utils/columnRender.d.ts +13 -0
- package/lib/table/utils/columnRender.js +201 -0
- package/lib/table/utils/genProColumnToColumn.d.ts +9 -0
- package/lib/table/utils/genProColumnToColumn.js +62 -0
- package/lib/table/utils/getTableProps.d.ts +2 -0
- package/lib/table/utils/getTableProps.js +13 -0
- package/lib/table/utils/getTableSortIcons.d.ts +3 -0
- package/lib/table/utils/getTableSortIcons.js +34 -0
- package/lib/table/utils/index.d.ts +4 -0
- package/lib/table/utils/index.js +112 -0
- package/lib/table/utils/useTableSelection.d.ts +3 -0
- package/lib/table/utils/useTableSelection.js +112 -0
- package/lib/templates/Detail/index.d.ts +2 -0
- package/lib/templates/Detail/index.js +18 -0
- package/lib/templates/Detail/index.scss +3 -0
- package/lib/templates/Form/index.d.ts +2 -0
- package/lib/templates/Form/index.js +18 -0
- package/lib/templates/Form/index.scss +3 -0
- package/lib/templates/List/index.d.ts +9 -0
- package/lib/templates/List/index.js +67 -0
- package/lib/templates/List/index.scss +3 -0
- package/lib/templates/index.d.ts +5 -0
- package/lib/templates/index.js +59 -0
- package/lib/templates/index.scss +3 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +17 -0
- package/package.json +5 -5
@@ -0,0 +1,52 @@
|
|
1
|
+
var _typeMap;
|
2
|
+
|
3
|
+
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; }
|
4
|
+
|
5
|
+
/**
|
6
|
+
* 组件的默认type类型,未指定类型为void
|
7
|
+
*/
|
8
|
+
var typeMap = (_typeMap = {
|
9
|
+
Input: 'string',
|
10
|
+
Password: 'string',
|
11
|
+
TextArea: 'string',
|
12
|
+
NumberPicker: 'number',
|
13
|
+
Percent: 'number',
|
14
|
+
Money: 'number',
|
15
|
+
Select: 'string',
|
16
|
+
MultipleSelect: 'array',
|
17
|
+
TreeSelect: 'string',
|
18
|
+
Cascader: 'string',
|
19
|
+
MultipleCascader: 'array',
|
20
|
+
ArbitraryCascader: 'string',
|
21
|
+
Radio: 'string',
|
22
|
+
Checkbox: 'array',
|
23
|
+
Switch: 'boolean',
|
24
|
+
DatePicker: 'string',
|
25
|
+
TimePicker: 'string',
|
26
|
+
DateTimePicker: 'string',
|
27
|
+
WeekPicker: 'string',
|
28
|
+
MonthPicker: 'string',
|
29
|
+
YearPicker: 'string',
|
30
|
+
QuarterPicker: 'string',
|
31
|
+
DateRangePicker: 'array',
|
32
|
+
TimeRangePicker: 'array',
|
33
|
+
DateTimeRangePicker: 'array',
|
34
|
+
WeekRangePicker: 'array',
|
35
|
+
MonthRangePicker: 'array',
|
36
|
+
YearRangePicker: 'array',
|
37
|
+
QuarterRangePicker: 'array',
|
38
|
+
Transfer: 'array',
|
39
|
+
Upload: 'object',
|
40
|
+
ColorPicker: 'string',
|
41
|
+
ColorRadio: 'string',
|
42
|
+
IconPicker: 'string',
|
43
|
+
JsonInput: 'object',
|
44
|
+
Search: 'array',
|
45
|
+
ArrayCollapse: 'array',
|
46
|
+
ArrayCards: 'array',
|
47
|
+
ArrayTable: 'array',
|
48
|
+
ArrayItems: 'array'
|
49
|
+
}, _defineProperty(_typeMap, 'Editable.Popover', 'object'), _defineProperty(_typeMap, 'Editable.Dialog', 'object'), _defineProperty(_typeMap, 'Editable.Drawer', 'object'), _typeMap);
|
50
|
+
export default (function (type, component) {
|
51
|
+
return type || typeMap[component] || 'void';
|
52
|
+
});
|
@@ -0,0 +1,259 @@
|
|
1
|
+
var _excluded = ["component", "type", "name", "props", "decorator", "decoratorProps", "dataSource", "reactions", "rules", "children", "content", "items", "tooltip", "display", "visible", "hidden", "disabled", "readOnly", "readPretty", "pattern", "request"];
|
2
|
+
|
3
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
4
|
+
|
5
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
6
|
+
|
7
|
+
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); }
|
8
|
+
|
9
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
10
|
+
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
12
|
+
|
13
|
+
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; }
|
14
|
+
|
15
|
+
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; }
|
16
|
+
|
17
|
+
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; }
|
18
|
+
|
19
|
+
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; }
|
20
|
+
|
21
|
+
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; }
|
22
|
+
|
23
|
+
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; }
|
24
|
+
|
25
|
+
import React, { memo, useCallback, useMemo } from 'react';
|
26
|
+
import { createSchemaField } from '@formily/react';
|
27
|
+
import { Upload, FormLayout, FormItem, ArrayCollapse, ArrayCards, ArrayItems, ArrayTable, Space, FormGrid, FormTab, FormCollapse, FormStep, Editable, FormDialog, FormDrawer, FormButtonGroup, Submit, Reset } from '@teamix/formily';
|
28
|
+
import ProField from '../Components/ProField';
|
29
|
+
import { EditableDialog, EditableDrawer, EditablePopover } from '../Components/Editable';
|
30
|
+
import Search from '../Components/Search';
|
31
|
+
import FormGroup from '../Components/FormGroup';
|
32
|
+
import QueryFilter from '../Components/QueryFilter';
|
33
|
+
import adapterType from './adapterType';
|
34
|
+
import adapterComponent from './adapterComponent';
|
35
|
+
import adapterDecorator from './adapterDecorator';
|
36
|
+
import initializeRequest from './initializeRequest';
|
37
|
+
import initializeProField, { proFieldTypeMap } from './initializeProField';
|
38
|
+
import initializeArrayCards from './initializeArrayCards';
|
39
|
+
import initializeArrayCollapse from './initializeArrayCollapse';
|
40
|
+
import initializeArrayTable from './initializeArrayTable';
|
41
|
+
import initializeArrayItems from './initializeArrayItems';
|
42
|
+
import initializeFormButton from './initializeFormButton';
|
43
|
+
import initializeFormGroup from './initializeFormGroup';
|
44
|
+
import initializeFormStep from './initializeFormStep';
|
45
|
+
import initializeFormTab from './initializeFormTab';
|
46
|
+
import initializeFormCollapse from './initializeFormCollapse';
|
47
|
+
import initializeArrayIcon from './initializeArrayIcon';
|
48
|
+
import { getRandomName, commonFormat } from '../utils';
|
49
|
+
import { isArr } from '@teamix/utils';
|
50
|
+
import warning from '../warning';
|
51
|
+
export default /*#__PURE__*/memo(function (_ref) {
|
52
|
+
var schema = _ref.schema,
|
53
|
+
scope = _ref.scope,
|
54
|
+
components = _ref.components;
|
55
|
+
var SchemaField = useMemo(function () {
|
56
|
+
return createSchemaField({
|
57
|
+
components: {
|
58
|
+
Upload: Upload,
|
59
|
+
ProField: ProField,
|
60
|
+
FormLayout: FormLayout,
|
61
|
+
FormItem: FormItem,
|
62
|
+
ArrayCollapse: ArrayCollapse,
|
63
|
+
ArrayCards: ArrayCards,
|
64
|
+
ArrayItems: ArrayItems,
|
65
|
+
ArrayTable: ArrayTable,
|
66
|
+
Space: Space,
|
67
|
+
FormGrid: FormGrid,
|
68
|
+
FormTab: FormTab,
|
69
|
+
FormCollapse: FormCollapse,
|
70
|
+
FormStep: FormStep,
|
71
|
+
Editable: Editable,
|
72
|
+
FormDialogFooter: FormDialog.Footer,
|
73
|
+
FormDrawerFooter: FormDrawer.Footer,
|
74
|
+
FormButtonGroup: FormButtonGroup,
|
75
|
+
Submit: Submit,
|
76
|
+
Reset: Reset,
|
77
|
+
EditableDialog: EditableDialog,
|
78
|
+
EditableDrawer: EditableDrawer,
|
79
|
+
EditablePopover: EditablePopover,
|
80
|
+
FormGroup: FormGroup,
|
81
|
+
Search: Search,
|
82
|
+
QueryFilter: QueryFilter
|
83
|
+
}
|
84
|
+
});
|
85
|
+
}, []); // 合并schema中request的scope
|
86
|
+
|
87
|
+
var newScope = useMemo(function () {
|
88
|
+
return _objectSpread({}, scope);
|
89
|
+
}, [scope]); // 格式化schema
|
90
|
+
|
91
|
+
var formatSchema = useCallback(function (schema) {
|
92
|
+
var schemaProperties = {};
|
93
|
+
schema.forEach(function (item) {
|
94
|
+
var newItem = warning(item);
|
95
|
+
var _newItem = newItem,
|
96
|
+
originalComponent = _newItem.component; // 根据component的不同,初始化为内置的item
|
97
|
+
|
98
|
+
if (originalComponent) {
|
99
|
+
if (Object.keys(proFieldTypeMap).includes(originalComponent)) {
|
100
|
+
// ProField接管组件
|
101
|
+
newItem = initializeProField(newItem);
|
102
|
+
} else {
|
103
|
+
// 未接管组件,判断是否为Formily组件别名
|
104
|
+
newItem = _objectSpread(_objectSpread({}, newItem), {}, {
|
105
|
+
component: adapterComponent(originalComponent)
|
106
|
+
});
|
107
|
+
} // 初始化高级组件 - FormButtonGroup/Subimt/Reset
|
108
|
+
|
109
|
+
|
110
|
+
if (['FormButtonGroup', 'Submit', 'Reset'].includes(originalComponent)) {
|
111
|
+
newItem = initializeFormButton(newItem);
|
112
|
+
} // 初始化高级组件 - ArrayCards
|
113
|
+
|
114
|
+
|
115
|
+
if (['ArrayCards'].includes(originalComponent)) {
|
116
|
+
newItem = initializeArrayCards(newItem);
|
117
|
+
} // 初始化高级组件 - ArrayCollapse
|
118
|
+
|
119
|
+
|
120
|
+
if (['ArrayCollapse'].includes(originalComponent)) {
|
121
|
+
newItem = initializeArrayCollapse(newItem);
|
122
|
+
} // 初始化高级组件 - ArrayTable
|
123
|
+
|
124
|
+
|
125
|
+
if (['ArrayTable'].includes(originalComponent)) {
|
126
|
+
newItem = initializeArrayTable(newItem);
|
127
|
+
} // 初始化高级组件 - ArrayItems
|
128
|
+
|
129
|
+
|
130
|
+
if (['ArrayItems'].includes(originalComponent)) {
|
131
|
+
newItem = initializeArrayItems(newItem);
|
132
|
+
} // 初始化布局组件 - FormStep
|
133
|
+
|
134
|
+
|
135
|
+
if (['FormStep'].includes(originalComponent)) {
|
136
|
+
newItem = initializeFormStep(newItem);
|
137
|
+
} // 初始化布局组件 - FormGroup
|
138
|
+
|
139
|
+
|
140
|
+
if (['FormGroup'].includes(originalComponent)) {
|
141
|
+
newItem = initializeFormGroup(newItem);
|
142
|
+
} // 初始化布局组件 - FormTab
|
143
|
+
|
144
|
+
|
145
|
+
if (['FormTab'].includes(originalComponent)) {
|
146
|
+
newItem = initializeFormTab(newItem);
|
147
|
+
} // 初始化布局组件 - FormCollapse
|
148
|
+
|
149
|
+
|
150
|
+
if (['FormCollapse'].includes(originalComponent)) {
|
151
|
+
newItem = initializeFormCollapse(newItem);
|
152
|
+
} // Array组件的Icon替换
|
153
|
+
|
154
|
+
|
155
|
+
if (/\.(Addition|Remove|MoveUp|MoveDown|SortHandle){1}$/g.test(originalComponent)) {
|
156
|
+
newItem = initializeArrayIcon(newItem);
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
var _newItem2 = newItem,
|
161
|
+
component = _newItem2.component,
|
162
|
+
type = _newItem2.type,
|
163
|
+
_newItem2$name = _newItem2.name,
|
164
|
+
name = _newItem2$name === void 0 ? getRandomName(component === null || component === void 0 ? void 0 : component.replace(/\./g, '')) : _newItem2$name,
|
165
|
+
props = _newItem2.props,
|
166
|
+
decorator = _newItem2.decorator,
|
167
|
+
decoratorProps = _newItem2.decoratorProps,
|
168
|
+
dataSource = _newItem2.dataSource,
|
169
|
+
reactions = _newItem2.reactions,
|
170
|
+
rules = _newItem2.rules,
|
171
|
+
children = _newItem2.children,
|
172
|
+
content = _newItem2.content,
|
173
|
+
items = _newItem2.items,
|
174
|
+
tooltip = _newItem2.tooltip,
|
175
|
+
display = _newItem2.display,
|
176
|
+
visible = _newItem2.visible,
|
177
|
+
hidden = _newItem2.hidden,
|
178
|
+
disabled = _newItem2.disabled,
|
179
|
+
readOnly = _newItem2.readOnly,
|
180
|
+
readPretty = _newItem2.readPretty,
|
181
|
+
pattern = _newItem2.pattern,
|
182
|
+
request = _newItem2.request,
|
183
|
+
otherProps = _objectWithoutProperties(_newItem2, _excluded); // 默认类型
|
184
|
+
|
185
|
+
|
186
|
+
var defaultType = adapterType(type, originalComponent); // 默认装饰组件
|
187
|
+
|
188
|
+
var defaultDecorator = adapterDecorator(decorator, originalComponent); // 默认装饰组件属性
|
189
|
+
|
190
|
+
var tooltipProps = tooltip ? {
|
191
|
+
tooltip: tooltip
|
192
|
+
} : {};
|
193
|
+
|
194
|
+
var defaultDecoratorProps = _objectSpread(_objectSpread({}, tooltipProps), decoratorProps); // 初始化request
|
195
|
+
|
196
|
+
|
197
|
+
var _initializeRequest = initializeRequest(request),
|
198
|
+
requestReactions = _initializeRequest.reactions,
|
199
|
+
requestScope = _initializeRequest.scope; // 添加request的reactions
|
200
|
+
|
201
|
+
|
202
|
+
var defaultReactions = function () {
|
203
|
+
if (isArr(reactions)) {
|
204
|
+
return [].concat(_toConsumableArray(reactions), _toConsumableArray(requestReactions));
|
205
|
+
}
|
206
|
+
|
207
|
+
if (!reactions) {
|
208
|
+
return requestReactions;
|
209
|
+
}
|
210
|
+
|
211
|
+
return reactions;
|
212
|
+
}(); // 添加request的scope
|
213
|
+
|
214
|
+
|
215
|
+
Object.keys(requestScope).map(function (item) {
|
216
|
+
newScope[item] = requestScope[item];
|
217
|
+
});
|
218
|
+
var formatParam = commonFormat({
|
219
|
+
type: defaultType,
|
220
|
+
'x-component': component,
|
221
|
+
'x-component-props': props,
|
222
|
+
'x-decorator': defaultDecorator,
|
223
|
+
'x-decorator-props': defaultDecoratorProps,
|
224
|
+
'x-validator': rules,
|
225
|
+
'x-reactions': defaultReactions,
|
226
|
+
'x-display': display,
|
227
|
+
'x-visible': visible,
|
228
|
+
'x-hidden': hidden,
|
229
|
+
'x-disabled': disabled,
|
230
|
+
'x-read-only': readOnly,
|
231
|
+
'x-read-pretty': readPretty,
|
232
|
+
'x-pattern': pattern,
|
233
|
+
'x-content': content,
|
234
|
+
enum: dataSource
|
235
|
+
}); // 递归子组件
|
236
|
+
|
237
|
+
var recursiveProperties = (children === null || children === void 0 ? void 0 : children.length) ? {
|
238
|
+
properties: formatSchema(children)
|
239
|
+
} : {}; // 递归items(类似子组件,会先由各initialize方法格式化为固定形式,type不同不统一处理)
|
240
|
+
// 例如:[{ name: 'items', type: 'object', children: items }]
|
241
|
+
|
242
|
+
var recursiveItems = items ? formatSchema([items]) : {}; // 配置组件属性
|
243
|
+
|
244
|
+
schemaProperties[name] = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, otherProps), formatParam), recursiveProperties), recursiveItems);
|
245
|
+
});
|
246
|
+
return schemaProperties;
|
247
|
+
}, [newScope]);
|
248
|
+
var schemaPro = useMemo(function () {
|
249
|
+
return {
|
250
|
+
type: 'object',
|
251
|
+
properties: formatSchema(schema)
|
252
|
+
};
|
253
|
+
}, [formatSchema, schema]);
|
254
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SchemaField, {
|
255
|
+
schema: schemaPro,
|
256
|
+
components: components,
|
257
|
+
scope: newScope
|
258
|
+
}));
|
259
|
+
});
|
@@ -0,0 +1,24 @@
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
2
|
+
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
4
|
+
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
|
7
|
+
var initializeItems = function initializeItems(items) {
|
8
|
+
if (items) {
|
9
|
+
return _objectSpread(_objectSpread({}, items), {}, {
|
10
|
+
name: 'items'
|
11
|
+
});
|
12
|
+
}
|
13
|
+
|
14
|
+
return items;
|
15
|
+
};
|
16
|
+
|
17
|
+
var initialize = function initialize(item) {
|
18
|
+
var items = item.items;
|
19
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
20
|
+
items: items ? initializeItems(items) : {}
|
21
|
+
});
|
22
|
+
};
|
23
|
+
|
24
|
+
export default initialize;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
2
|
+
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
4
|
+
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
|
7
|
+
var initializeItems = function initializeItems(items) {
|
8
|
+
if (items) {
|
9
|
+
return _objectSpread(_objectSpread({}, items), {}, {
|
10
|
+
name: 'items'
|
11
|
+
});
|
12
|
+
}
|
13
|
+
|
14
|
+
return items;
|
15
|
+
};
|
16
|
+
|
17
|
+
var initialize = function initialize(item) {
|
18
|
+
var items = item.items;
|
19
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
20
|
+
items: items ? initializeItems(items) : {}
|
21
|
+
});
|
22
|
+
};
|
23
|
+
|
24
|
+
export default initialize;
|
@@ -0,0 +1,57 @@
|
|
1
|
+
var _excluded = ["component", "props"],
|
2
|
+
_excluded2 = ["icon"];
|
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
|
+
import React from 'react';
|
15
|
+
import TeamixIcon from '@teamix/icon';
|
16
|
+
|
17
|
+
var initialize = function initialize(item) {
|
18
|
+
var component = item.component,
|
19
|
+
_item$props = item.props,
|
20
|
+
props = _item$props === void 0 ? {} : _item$props,
|
21
|
+
other = _objectWithoutProperties(item, _excluded);
|
22
|
+
|
23
|
+
var icon = props.icon,
|
24
|
+
otherProps = _objectWithoutProperties(props, _excluded2);
|
25
|
+
|
26
|
+
var iconType = '';
|
27
|
+
|
28
|
+
if (icon) {
|
29
|
+
iconType = icon;
|
30
|
+
} else if (component) {
|
31
|
+
if (/Addition/.test(component)) {
|
32
|
+
iconType = 'add-line';
|
33
|
+
} else if (/Remove/.test(component)) {
|
34
|
+
iconType = 'delete-line';
|
35
|
+
} else if (/MoveUp/.test(component)) {
|
36
|
+
iconType = 'up-line';
|
37
|
+
} else if (/MoveDown/.test(component)) {
|
38
|
+
iconType = 'down-line';
|
39
|
+
} else if (/SortHandle/.test(component)) {
|
40
|
+
iconType = 'menu-line';
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
return _objectSpread(_objectSpread({}, other), {}, {
|
45
|
+
component: component,
|
46
|
+
props: _objectSpread({
|
47
|
+
icon: function icon(props) {
|
48
|
+
return /*#__PURE__*/React.createElement(TeamixIcon, _objectSpread(_objectSpread({}, props), {}, {
|
49
|
+
type: iconType,
|
50
|
+
size: "small"
|
51
|
+
}));
|
52
|
+
}
|
53
|
+
}, otherProps)
|
54
|
+
});
|
55
|
+
};
|
56
|
+
|
57
|
+
export default initialize;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
2
|
+
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
4
|
+
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
|
7
|
+
var initializeItems = function initializeItems(items) {
|
8
|
+
if (items) {
|
9
|
+
return _objectSpread(_objectSpread({}, items), {}, {
|
10
|
+
name: 'items'
|
11
|
+
});
|
12
|
+
}
|
13
|
+
|
14
|
+
return items;
|
15
|
+
};
|
16
|
+
|
17
|
+
var initializeChildren = function initializeChildren(item) {
|
18
|
+
var decoratorProps = item.decoratorProps;
|
19
|
+
return _objectSpread(_objectSpread({}, item), decoratorProps ? {
|
20
|
+
decoratorProps: _objectSpread({
|
21
|
+
feedbackLayout: 'none'
|
22
|
+
}, decoratorProps)
|
23
|
+
} : {});
|
24
|
+
};
|
25
|
+
|
26
|
+
var initialize = function initialize(item) {
|
27
|
+
var _item$children = item.children,
|
28
|
+
children = _item$children === void 0 ? [] : _item$children,
|
29
|
+
items = item.items;
|
30
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
31
|
+
children: children.map(function (item) {
|
32
|
+
return initializeChildren(item);
|
33
|
+
}),
|
34
|
+
items: items ? initializeItems(items) : {}
|
35
|
+
});
|
36
|
+
};
|
37
|
+
|
38
|
+
export default initialize;
|
@@ -0,0 +1,56 @@
|
|
1
|
+
var _excluded = ["title", "decoratorProps"];
|
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 initializeColumn = function initializeColumn(item) {
|
14
|
+
var title = item.title,
|
15
|
+
decoratorProps = item.decoratorProps,
|
16
|
+
children = _objectWithoutProperties(item, _excluded);
|
17
|
+
|
18
|
+
return {
|
19
|
+
component: 'ArrayTable.Column',
|
20
|
+
props: _objectSpread(_objectSpread({}, decoratorProps), {}, {
|
21
|
+
title: title
|
22
|
+
}),
|
23
|
+
children: [_objectSpread({}, children)]
|
24
|
+
};
|
25
|
+
};
|
26
|
+
|
27
|
+
var initializeItems = function initializeItems(items) {
|
28
|
+
if (items) {
|
29
|
+
var _items$children;
|
30
|
+
|
31
|
+
return _objectSpread(_objectSpread({}, items), {}, {
|
32
|
+
name: 'items',
|
33
|
+
children: (_items$children = items.children) === null || _items$children === void 0 ? void 0 : _items$children.map(function (item) {
|
34
|
+
return initializeColumn(item);
|
35
|
+
})
|
36
|
+
});
|
37
|
+
}
|
38
|
+
|
39
|
+
return items;
|
40
|
+
};
|
41
|
+
|
42
|
+
var initialize = function initialize(item) {
|
43
|
+
var _item$props = item.props,
|
44
|
+
props = _item$props === void 0 ? {} : _item$props,
|
45
|
+
items = item.items;
|
46
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
47
|
+
props: _objectSpread({
|
48
|
+
pagination: {
|
49
|
+
pageSize: 10
|
50
|
+
}
|
51
|
+
}, props),
|
52
|
+
items: items ? initializeItems(items) : {}
|
53
|
+
});
|
54
|
+
};
|
55
|
+
|
56
|
+
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;
|