@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,301 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
11
|
+
|
12
|
+
var _react2 = require("@formily/react");
|
13
|
+
|
14
|
+
var _formily = require("@teamix/formily");
|
15
|
+
|
16
|
+
var _ProField = _interopRequireDefault(require("../Components/ProField"));
|
17
|
+
|
18
|
+
var _Editable = require("../Components/Editable");
|
19
|
+
|
20
|
+
var _Search = _interopRequireDefault(require("../Components/Search"));
|
21
|
+
|
22
|
+
var _FormGroup = _interopRequireDefault(require("../Components/FormGroup"));
|
23
|
+
|
24
|
+
var _QueryFilter = _interopRequireDefault(require("../Components/QueryFilter"));
|
25
|
+
|
26
|
+
var _adapterType = _interopRequireDefault(require("./adapterType"));
|
27
|
+
|
28
|
+
var _adapterComponent = _interopRequireDefault(require("./adapterComponent"));
|
29
|
+
|
30
|
+
var _adapterDecorator = _interopRequireDefault(require("./adapterDecorator"));
|
31
|
+
|
32
|
+
var _initializeRequest2 = _interopRequireDefault(require("./initializeRequest"));
|
33
|
+
|
34
|
+
var _initializeProField = _interopRequireWildcard(require("./initializeProField"));
|
35
|
+
|
36
|
+
var _initializeArrayCards = _interopRequireDefault(require("./initializeArrayCards"));
|
37
|
+
|
38
|
+
var _initializeArrayCollapse = _interopRequireDefault(require("./initializeArrayCollapse"));
|
39
|
+
|
40
|
+
var _initializeArrayTable = _interopRequireDefault(require("./initializeArrayTable"));
|
41
|
+
|
42
|
+
var _initializeArrayItems = _interopRequireDefault(require("./initializeArrayItems"));
|
43
|
+
|
44
|
+
var _initializeFormButton = _interopRequireDefault(require("./initializeFormButton"));
|
45
|
+
|
46
|
+
var _initializeFormGroup = _interopRequireDefault(require("./initializeFormGroup"));
|
47
|
+
|
48
|
+
var _initializeFormStep = _interopRequireDefault(require("./initializeFormStep"));
|
49
|
+
|
50
|
+
var _initializeFormTab = _interopRequireDefault(require("./initializeFormTab"));
|
51
|
+
|
52
|
+
var _initializeFormCollapse = _interopRequireDefault(require("./initializeFormCollapse"));
|
53
|
+
|
54
|
+
var _initializeArrayIcon = _interopRequireDefault(require("./initializeArrayIcon"));
|
55
|
+
|
56
|
+
var _utils = require("../utils");
|
57
|
+
|
58
|
+
var _utils2 = require("@teamix/utils");
|
59
|
+
|
60
|
+
var _warning = _interopRequireDefault(require("../warning"));
|
61
|
+
|
62
|
+
var _excluded = ["component", "type", "name", "props", "decorator", "decoratorProps", "dataSource", "reactions", "rules", "children", "content", "items", "tooltip", "display", "visible", "hidden", "disabled", "readOnly", "readPretty", "pattern", "request"];
|
63
|
+
|
64
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
65
|
+
|
66
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
67
|
+
|
68
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
69
|
+
|
70
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
71
|
+
|
72
|
+
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."); }
|
73
|
+
|
74
|
+
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); }
|
75
|
+
|
76
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
77
|
+
|
78
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
79
|
+
|
80
|
+
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; }
|
81
|
+
|
82
|
+
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; }
|
83
|
+
|
84
|
+
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; }
|
85
|
+
|
86
|
+
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; }
|
87
|
+
|
88
|
+
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; }
|
89
|
+
|
90
|
+
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; }
|
91
|
+
|
92
|
+
var _default = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
93
|
+
var schema = _ref.schema,
|
94
|
+
scope = _ref.scope,
|
95
|
+
components = _ref.components;
|
96
|
+
var SchemaField = (0, _react.useMemo)(function () {
|
97
|
+
return (0, _react2.createSchemaField)({
|
98
|
+
components: {
|
99
|
+
Upload: _formily.Upload,
|
100
|
+
ProField: _ProField.default,
|
101
|
+
FormLayout: _formily.FormLayout,
|
102
|
+
FormItem: _formily.FormItem,
|
103
|
+
ArrayCollapse: _formily.ArrayCollapse,
|
104
|
+
ArrayCards: _formily.ArrayCards,
|
105
|
+
ArrayItems: _formily.ArrayItems,
|
106
|
+
ArrayTable: _formily.ArrayTable,
|
107
|
+
Space: _formily.Space,
|
108
|
+
FormGrid: _formily.FormGrid,
|
109
|
+
FormTab: _formily.FormTab,
|
110
|
+
FormCollapse: _formily.FormCollapse,
|
111
|
+
FormStep: _formily.FormStep,
|
112
|
+
Editable: _formily.Editable,
|
113
|
+
FormDialogFooter: _formily.FormDialog.Footer,
|
114
|
+
FormDrawerFooter: _formily.FormDrawer.Footer,
|
115
|
+
FormButtonGroup: _formily.FormButtonGroup,
|
116
|
+
Submit: _formily.Submit,
|
117
|
+
Reset: _formily.Reset,
|
118
|
+
EditableDialog: _Editable.EditableDialog,
|
119
|
+
EditableDrawer: _Editable.EditableDrawer,
|
120
|
+
EditablePopover: _Editable.EditablePopover,
|
121
|
+
FormGroup: _FormGroup.default,
|
122
|
+
Search: _Search.default,
|
123
|
+
QueryFilter: _QueryFilter.default
|
124
|
+
}
|
125
|
+
});
|
126
|
+
}, []); // 合并schema中request的scope
|
127
|
+
|
128
|
+
var newScope = (0, _react.useMemo)(function () {
|
129
|
+
return _objectSpread({}, scope);
|
130
|
+
}, [scope]); // 格式化schema
|
131
|
+
|
132
|
+
var formatSchema = (0, _react.useCallback)(function (schema) {
|
133
|
+
var schemaProperties = {};
|
134
|
+
schema.forEach(function (item) {
|
135
|
+
var newItem = (0, _warning.default)(item);
|
136
|
+
var _newItem = newItem,
|
137
|
+
originalComponent = _newItem.component; // 根据component的不同,初始化为内置的item
|
138
|
+
|
139
|
+
if (originalComponent) {
|
140
|
+
if (Object.keys(_initializeProField.proFieldTypeMap).includes(originalComponent)) {
|
141
|
+
// ProField接管组件
|
142
|
+
newItem = (0, _initializeProField.default)(newItem);
|
143
|
+
} else {
|
144
|
+
// 未接管组件,判断是否为Formily组件别名
|
145
|
+
newItem = _objectSpread(_objectSpread({}, newItem), {}, {
|
146
|
+
component: (0, _adapterComponent.default)(originalComponent)
|
147
|
+
});
|
148
|
+
} // 初始化高级组件 - FormButtonGroup/Subimt/Reset
|
149
|
+
|
150
|
+
|
151
|
+
if (['FormButtonGroup', 'Submit', 'Reset'].includes(originalComponent)) {
|
152
|
+
newItem = (0, _initializeFormButton.default)(newItem);
|
153
|
+
} // 初始化高级组件 - ArrayCards
|
154
|
+
|
155
|
+
|
156
|
+
if (['ArrayCards'].includes(originalComponent)) {
|
157
|
+
newItem = (0, _initializeArrayCards.default)(newItem);
|
158
|
+
} // 初始化高级组件 - ArrayCollapse
|
159
|
+
|
160
|
+
|
161
|
+
if (['ArrayCollapse'].includes(originalComponent)) {
|
162
|
+
newItem = (0, _initializeArrayCollapse.default)(newItem);
|
163
|
+
} // 初始化高级组件 - ArrayTable
|
164
|
+
|
165
|
+
|
166
|
+
if (['ArrayTable'].includes(originalComponent)) {
|
167
|
+
newItem = (0, _initializeArrayTable.default)(newItem);
|
168
|
+
} // 初始化高级组件 - ArrayItems
|
169
|
+
|
170
|
+
|
171
|
+
if (['ArrayItems'].includes(originalComponent)) {
|
172
|
+
newItem = (0, _initializeArrayItems.default)(newItem);
|
173
|
+
} // 初始化布局组件 - FormStep
|
174
|
+
|
175
|
+
|
176
|
+
if (['FormStep'].includes(originalComponent)) {
|
177
|
+
newItem = (0, _initializeFormStep.default)(newItem);
|
178
|
+
} // 初始化布局组件 - FormGroup
|
179
|
+
|
180
|
+
|
181
|
+
if (['FormGroup'].includes(originalComponent)) {
|
182
|
+
newItem = (0, _initializeFormGroup.default)(newItem);
|
183
|
+
} // 初始化布局组件 - FormTab
|
184
|
+
|
185
|
+
|
186
|
+
if (['FormTab'].includes(originalComponent)) {
|
187
|
+
newItem = (0, _initializeFormTab.default)(newItem);
|
188
|
+
} // 初始化布局组件 - FormCollapse
|
189
|
+
|
190
|
+
|
191
|
+
if (['FormCollapse'].includes(originalComponent)) {
|
192
|
+
newItem = (0, _initializeFormCollapse.default)(newItem);
|
193
|
+
} // Array组件的Icon替换
|
194
|
+
|
195
|
+
|
196
|
+
if (/\.(Addition|Remove|MoveUp|MoveDown|SortHandle){1}$/g.test(originalComponent)) {
|
197
|
+
newItem = (0, _initializeArrayIcon.default)(newItem);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
|
201
|
+
var _newItem2 = newItem,
|
202
|
+
component = _newItem2.component,
|
203
|
+
type = _newItem2.type,
|
204
|
+
_newItem2$name = _newItem2.name,
|
205
|
+
name = _newItem2$name === void 0 ? (0, _utils.getRandomName)(component === null || component === void 0 ? void 0 : component.replace(/\./g, '')) : _newItem2$name,
|
206
|
+
props = _newItem2.props,
|
207
|
+
decorator = _newItem2.decorator,
|
208
|
+
decoratorProps = _newItem2.decoratorProps,
|
209
|
+
dataSource = _newItem2.dataSource,
|
210
|
+
reactions = _newItem2.reactions,
|
211
|
+
rules = _newItem2.rules,
|
212
|
+
children = _newItem2.children,
|
213
|
+
content = _newItem2.content,
|
214
|
+
items = _newItem2.items,
|
215
|
+
tooltip = _newItem2.tooltip,
|
216
|
+
display = _newItem2.display,
|
217
|
+
visible = _newItem2.visible,
|
218
|
+
hidden = _newItem2.hidden,
|
219
|
+
disabled = _newItem2.disabled,
|
220
|
+
readOnly = _newItem2.readOnly,
|
221
|
+
readPretty = _newItem2.readPretty,
|
222
|
+
pattern = _newItem2.pattern,
|
223
|
+
request = _newItem2.request,
|
224
|
+
otherProps = _objectWithoutProperties(_newItem2, _excluded); // 默认类型
|
225
|
+
|
226
|
+
|
227
|
+
var defaultType = (0, _adapterType.default)(type, originalComponent); // 默认装饰组件
|
228
|
+
|
229
|
+
var defaultDecorator = (0, _adapterDecorator.default)(decorator, originalComponent); // 默认装饰组件属性
|
230
|
+
|
231
|
+
var tooltipProps = tooltip ? {
|
232
|
+
tooltip: tooltip
|
233
|
+
} : {};
|
234
|
+
|
235
|
+
var defaultDecoratorProps = _objectSpread(_objectSpread({}, tooltipProps), decoratorProps); // 初始化request
|
236
|
+
|
237
|
+
|
238
|
+
var _initializeRequest = (0, _initializeRequest2.default)(request),
|
239
|
+
requestReactions = _initializeRequest.reactions,
|
240
|
+
requestScope = _initializeRequest.scope; // 添加request的reactions
|
241
|
+
|
242
|
+
|
243
|
+
var defaultReactions = function () {
|
244
|
+
if ((0, _utils2.isArr)(reactions)) {
|
245
|
+
return [].concat(_toConsumableArray(reactions), _toConsumableArray(requestReactions));
|
246
|
+
}
|
247
|
+
|
248
|
+
if (!reactions) {
|
249
|
+
return requestReactions;
|
250
|
+
}
|
251
|
+
|
252
|
+
return reactions;
|
253
|
+
}(); // 添加request的scope
|
254
|
+
|
255
|
+
|
256
|
+
Object.keys(requestScope).map(function (item) {
|
257
|
+
newScope[item] = requestScope[item];
|
258
|
+
});
|
259
|
+
var formatParam = (0, _utils.commonFormat)({
|
260
|
+
type: defaultType,
|
261
|
+
'x-component': component,
|
262
|
+
'x-component-props': props,
|
263
|
+
'x-decorator': defaultDecorator,
|
264
|
+
'x-decorator-props': defaultDecoratorProps,
|
265
|
+
'x-validator': rules,
|
266
|
+
'x-reactions': defaultReactions,
|
267
|
+
'x-display': display,
|
268
|
+
'x-visible': visible,
|
269
|
+
'x-hidden': hidden,
|
270
|
+
'x-disabled': disabled,
|
271
|
+
'x-read-only': readOnly,
|
272
|
+
'x-read-pretty': readPretty,
|
273
|
+
'x-pattern': pattern,
|
274
|
+
'x-content': content,
|
275
|
+
enum: dataSource
|
276
|
+
}); // 递归子组件
|
277
|
+
|
278
|
+
var recursiveProperties = (children === null || children === void 0 ? void 0 : children.length) ? {
|
279
|
+
properties: formatSchema(children)
|
280
|
+
} : {}; // 递归items(类似子组件)
|
281
|
+
|
282
|
+
var recursiveItems = items ? formatSchema(items) : {}; // 配置组件属性
|
283
|
+
|
284
|
+
schemaProperties[name] = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, otherProps), formatParam), recursiveProperties), recursiveItems);
|
285
|
+
});
|
286
|
+
return schemaProperties;
|
287
|
+
}, [newScope]);
|
288
|
+
var schemaPro = (0, _react.useMemo)(function () {
|
289
|
+
return {
|
290
|
+
type: 'object',
|
291
|
+
properties: formatSchema(schema)
|
292
|
+
};
|
293
|
+
}, [formatSchema, schema]);
|
294
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(SchemaField, {
|
295
|
+
schema: schemaPro,
|
296
|
+
components: components,
|
297
|
+
scope: newScope
|
298
|
+
}));
|
299
|
+
});
|
300
|
+
|
301
|
+
exports.default = _default;
|
@@ -0,0 +1,76 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
var _excluded = ["props", "children", "items"],
|
8
|
+
_excluded2 = ["itemType"];
|
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
|
+
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; }
|
15
|
+
|
16
|
+
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; }
|
17
|
+
|
18
|
+
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; }
|
19
|
+
|
20
|
+
var initializeChildren = function initializeChildren(item) {
|
21
|
+
return item;
|
22
|
+
};
|
23
|
+
|
24
|
+
var initializeAddition = function initializeAddition(item) {
|
25
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
26
|
+
component: 'ArrayCards.Addition'
|
27
|
+
});
|
28
|
+
};
|
29
|
+
|
30
|
+
var initializeString = function initializeString(items) {
|
31
|
+
return [{
|
32
|
+
name: 'items',
|
33
|
+
children: items.map(function (item) {
|
34
|
+
return initializeChildren(item);
|
35
|
+
})
|
36
|
+
}];
|
37
|
+
};
|
38
|
+
|
39
|
+
var initializeObject = function initializeObject(items) {
|
40
|
+
return [{
|
41
|
+
name: 'items',
|
42
|
+
type: 'object',
|
43
|
+
children: items.map(function (item) {
|
44
|
+
return initializeChildren(item);
|
45
|
+
})
|
46
|
+
}];
|
47
|
+
};
|
48
|
+
|
49
|
+
var initialize = function initialize(item) {
|
50
|
+
var _item$props = item.props,
|
51
|
+
props = _item$props === void 0 ? {} : _item$props,
|
52
|
+
_item$children = item.children,
|
53
|
+
children = _item$children === void 0 ? [] : _item$children,
|
54
|
+
_item$items = item.items,
|
55
|
+
items = _item$items === void 0 ? [] : _item$items,
|
56
|
+
other = _objectWithoutProperties(item, _excluded);
|
57
|
+
|
58
|
+
var _props$itemType = props.itemType,
|
59
|
+
itemType = _props$itemType === void 0 ? 'string' : _props$itemType,
|
60
|
+
otherProps = _objectWithoutProperties(props, _excluded2);
|
61
|
+
|
62
|
+
var renderItemsMap = {
|
63
|
+
string: initializeString(items),
|
64
|
+
object: initializeObject(items)
|
65
|
+
};
|
66
|
+
return _objectSpread(_objectSpread({}, other), {}, {
|
67
|
+
props: otherProps,
|
68
|
+
children: children.map(function (item) {
|
69
|
+
return initializeAddition(item);
|
70
|
+
}),
|
71
|
+
items: renderItemsMap[itemType]
|
72
|
+
});
|
73
|
+
};
|
74
|
+
|
75
|
+
var _default = initialize;
|
76
|
+
exports.default = _default;
|
@@ -0,0 +1,85 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
var _excluded = ["props", "children", "items"],
|
8
|
+
_excluded2 = ["itemType", "title"];
|
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
|
+
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; }
|
15
|
+
|
16
|
+
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; }
|
17
|
+
|
18
|
+
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; }
|
19
|
+
|
20
|
+
var initializeChildren = function initializeChildren(item) {
|
21
|
+
return item;
|
22
|
+
};
|
23
|
+
|
24
|
+
var initializeAddition = function initializeAddition(item) {
|
25
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
26
|
+
component: 'ArrayCollapse.Addition'
|
27
|
+
});
|
28
|
+
};
|
29
|
+
|
30
|
+
var initializeString = function initializeString(items, props) {
|
31
|
+
return [{
|
32
|
+
name: 'items',
|
33
|
+
component: 'ArrayCollapse.CollapsePanel',
|
34
|
+
props: props,
|
35
|
+
children: items.map(function (item) {
|
36
|
+
return initializeChildren(item);
|
37
|
+
})
|
38
|
+
}];
|
39
|
+
};
|
40
|
+
|
41
|
+
var initializeObject = function initializeObject(items, props) {
|
42
|
+
return [{
|
43
|
+
type: 'object',
|
44
|
+
name: 'items',
|
45
|
+
component: 'ArrayCollapse.CollapsePanel',
|
46
|
+
props: props,
|
47
|
+
children: items.map(function (item) {
|
48
|
+
return initializeChildren(item);
|
49
|
+
})
|
50
|
+
}];
|
51
|
+
};
|
52
|
+
|
53
|
+
var initialize = function initialize(item) {
|
54
|
+
var _item$props = item.props,
|
55
|
+
props = _item$props === void 0 ? {} : _item$props,
|
56
|
+
_item$children = item.children,
|
57
|
+
children = _item$children === void 0 ? [] : _item$children,
|
58
|
+
_item$items = item.items,
|
59
|
+
items = _item$items === void 0 ? [] : _item$items,
|
60
|
+
other = _objectWithoutProperties(item, _excluded);
|
61
|
+
|
62
|
+
var _props$itemType = props.itemType,
|
63
|
+
itemType = _props$itemType === void 0 ? 'string' : _props$itemType,
|
64
|
+
title = props.title,
|
65
|
+
otherProps = _objectWithoutProperties(props, _excluded2);
|
66
|
+
|
67
|
+
var renderItemsMap = {
|
68
|
+
string: initializeString(items, {
|
69
|
+
title: title
|
70
|
+
}),
|
71
|
+
object: initializeObject(items, {
|
72
|
+
title: title
|
73
|
+
})
|
74
|
+
};
|
75
|
+
return _objectSpread(_objectSpread({}, other), {}, {
|
76
|
+
props: otherProps,
|
77
|
+
children: children.map(function (item) {
|
78
|
+
return initializeAddition(item);
|
79
|
+
}),
|
80
|
+
items: renderItemsMap[itemType]
|
81
|
+
});
|
82
|
+
};
|
83
|
+
|
84
|
+
var _default = initialize;
|
85
|
+
exports.default = _default;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
11
|
+
|
12
|
+
var _excluded = ["component", "props"];
|
13
|
+
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
|
+
|
16
|
+
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; }
|
17
|
+
|
18
|
+
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; }
|
19
|
+
|
20
|
+
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; }
|
21
|
+
|
22
|
+
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; }
|
23
|
+
|
24
|
+
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; }
|
25
|
+
|
26
|
+
var initialize = function initialize(item) {
|
27
|
+
var component = item.component,
|
28
|
+
props = item.props,
|
29
|
+
other = _objectWithoutProperties(item, _excluded);
|
30
|
+
|
31
|
+
var iconType = '';
|
32
|
+
|
33
|
+
if (component) {
|
34
|
+
if (/Addition/.test(component)) {
|
35
|
+
iconType = 'add-line';
|
36
|
+
} else if (/Remove/.test(component)) {
|
37
|
+
iconType = 'delete-line';
|
38
|
+
} else if (/MoveUp/.test(component)) {
|
39
|
+
iconType = 'up-line';
|
40
|
+
} else if (/MoveDown/.test(component)) {
|
41
|
+
iconType = 'down-line';
|
42
|
+
} else if (/SortHandle/.test(component)) {
|
43
|
+
iconType = 'menu-line';
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
return _objectSpread(_objectSpread({}, other), {}, {
|
48
|
+
component: component,
|
49
|
+
props: _objectSpread({
|
50
|
+
icon: function icon(props) {
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_icon.default, _objectSpread({
|
52
|
+
type: iconType,
|
53
|
+
size: "small"
|
54
|
+
}, props));
|
55
|
+
}
|
56
|
+
}, props)
|
57
|
+
});
|
58
|
+
};
|
59
|
+
|
60
|
+
var _default = initialize;
|
61
|
+
exports.default = _default;
|
@@ -0,0 +1,104 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
var _excluded = ["decoratorProps"],
|
8
|
+
_excluded2 = ["props", "children", "items"];
|
9
|
+
|
10
|
+
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; }
|
11
|
+
|
12
|
+
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; }
|
13
|
+
|
14
|
+
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; }
|
15
|
+
|
16
|
+
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; }
|
17
|
+
|
18
|
+
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; }
|
19
|
+
|
20
|
+
var initializeChildren = function initializeChildren(item) {
|
21
|
+
var decoratorProps = item.decoratorProps,
|
22
|
+
otherProps = _objectWithoutProperties(item, _excluded);
|
23
|
+
|
24
|
+
return _objectSpread({
|
25
|
+
decoratorProps: _objectSpread({
|
26
|
+
feedbackLayout: 'none'
|
27
|
+
}, decoratorProps)
|
28
|
+
}, otherProps);
|
29
|
+
};
|
30
|
+
|
31
|
+
var initializeAddition = function initializeAddition(item) {
|
32
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
33
|
+
component: 'ArrayItems.Addition'
|
34
|
+
});
|
35
|
+
};
|
36
|
+
|
37
|
+
var initializeString = function initializeString(items, props) {
|
38
|
+
return [{
|
39
|
+
name: 'items',
|
40
|
+
component: 'FormFlex',
|
41
|
+
props: props,
|
42
|
+
decoratorProps: {
|
43
|
+
feedbackLayout: 'none'
|
44
|
+
},
|
45
|
+
children: items.map(function (item) {
|
46
|
+
return initializeChildren(item);
|
47
|
+
})
|
48
|
+
}];
|
49
|
+
};
|
50
|
+
|
51
|
+
var initializeObject = function initializeObject(items, props) {
|
52
|
+
return [{
|
53
|
+
name: 'items',
|
54
|
+
type: 'object',
|
55
|
+
children: [{
|
56
|
+
component: 'FormFlex',
|
57
|
+
props: props,
|
58
|
+
children: items.map(function (item) {
|
59
|
+
return initializeChildren(item);
|
60
|
+
})
|
61
|
+
}]
|
62
|
+
}];
|
63
|
+
};
|
64
|
+
|
65
|
+
var initializeItems = function initializeItems(items, decoratorProps) {
|
66
|
+
return [{
|
67
|
+
name: 'items',
|
68
|
+
type: 'object',
|
69
|
+
decorator: 'ArrayItems.Item',
|
70
|
+
decoratorProps: decoratorProps,
|
71
|
+
children: items
|
72
|
+
}];
|
73
|
+
};
|
74
|
+
|
75
|
+
var initialize = function initialize(item) {
|
76
|
+
var _item$props = item.props,
|
77
|
+
props = _item$props === void 0 ? {} : _item$props,
|
78
|
+
_item$children = item.children,
|
79
|
+
children = _item$children === void 0 ? [] : _item$children,
|
80
|
+
_item$items = item.items,
|
81
|
+
items = _item$items === void 0 ? [] : _item$items,
|
82
|
+
otherProps = _objectWithoutProperties(item, _excluded2);
|
83
|
+
|
84
|
+
var _props$itemType = props.itemType,
|
85
|
+
itemType = _props$itemType === void 0 ? 'string' : _props$itemType,
|
86
|
+
_props$itemTypeProps = props.itemTypeProps,
|
87
|
+
itemTypeProps = _props$itemTypeProps === void 0 ? {} : _props$itemTypeProps;
|
88
|
+
var renderItemsMap = {
|
89
|
+
string: initializeString(items, itemTypeProps),
|
90
|
+
object: initializeObject(items, itemTypeProps),
|
91
|
+
card: initializeItems(items, {
|
92
|
+
type: 'card'
|
93
|
+
})
|
94
|
+
};
|
95
|
+
return _objectSpread(_objectSpread({}, otherProps), {}, {
|
96
|
+
children: children.map(function (item) {
|
97
|
+
return initializeAddition(item);
|
98
|
+
}),
|
99
|
+
items: renderItemsMap[itemType]
|
100
|
+
});
|
101
|
+
};
|
102
|
+
|
103
|
+
var _default = initialize;
|
104
|
+
exports.default = _default;
|