@teamix/pro 1.0.25 → 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 +10401 -14141
- 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 -23
- package/es/index.js +25 -24
- 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 -23
- package/lib/index.js +79 -61
- 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,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
interface ISearchPanelProps {
|
3
|
+
title?: React.ReactNode;
|
4
|
+
className?: string;
|
5
|
+
}
|
6
|
+
declare type ISearchPanel = React.FC<ISearchPanelProps>;
|
7
|
+
declare type ISearch = React.FC<any> & {
|
8
|
+
SearchPanel?: ISearchPanel;
|
9
|
+
};
|
10
|
+
declare const Search: ISearch;
|
11
|
+
export default Search;
|
@@ -0,0 +1,103 @@
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
11
|
+
|
12
|
+
var _react2 = require("@formily/react");
|
13
|
+
|
14
|
+
var _components = require("@alicloudfe/components");
|
15
|
+
|
16
|
+
var _utils = require("@teamix/utils");
|
17
|
+
|
18
|
+
var _excluded = ["children"];
|
19
|
+
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: 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
|
+
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; }
|
27
|
+
|
28
|
+
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; }
|
29
|
+
|
30
|
+
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; }
|
31
|
+
|
32
|
+
var usePanels = function usePanels() {
|
33
|
+
var searchField = (0, _react2.useField)();
|
34
|
+
var schema = (0, _react2.useFieldSchema)();
|
35
|
+
var panels = [];
|
36
|
+
schema.mapProperties(function (schema, name) {
|
37
|
+
var _schema$xComponent;
|
38
|
+
|
39
|
+
var field = searchField.query(searchField.address.concat(name)).take();
|
40
|
+
if ((field === null || field === void 0 ? void 0 : field.display) === 'none' || (field === null || field === void 0 ? void 0 : field.display) === 'hidden') return;
|
41
|
+
|
42
|
+
if (((_schema$xComponent = schema['x-component']) === null || _schema$xComponent === void 0 ? void 0 : _schema$xComponent.indexOf('SearchPanel')) > -1) {
|
43
|
+
var _schema$xComponentP, _schema$xComponentP2;
|
44
|
+
|
45
|
+
panels.push({
|
46
|
+
name: name,
|
47
|
+
props: _objectSpread(_objectSpread({}, schema === null || schema === void 0 ? void 0 : schema['x-component-props']), {}, {
|
48
|
+
title: (schema === null || schema === void 0 ? void 0 : (_schema$xComponentP = schema['x-component-props']) === null || _schema$xComponentP === void 0 ? void 0 : _schema$xComponentP.title) || (schema === null || schema === void 0 ? void 0 : schema.title),
|
49
|
+
key: (schema === null || schema === void 0 ? void 0 : (_schema$xComponentP2 = schema['x-component-props']) === null || _schema$xComponentP2 === void 0 ? void 0 : _schema$xComponentP2.key) || name
|
50
|
+
}),
|
51
|
+
schema: schema
|
52
|
+
});
|
53
|
+
}
|
54
|
+
});
|
55
|
+
return panels;
|
56
|
+
};
|
57
|
+
|
58
|
+
var Search = (0, _react2.observer)(function (_ref) {
|
59
|
+
var children = _ref.children,
|
60
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
61
|
+
|
62
|
+
var prefixCls = (0, _utils.usePrefixCls)('formily-group');
|
63
|
+
var panels = usePanels().map(function (_ref2, index) {
|
64
|
+
var props = _ref2.props,
|
65
|
+
schema = _ref2.schema,
|
66
|
+
name = _ref2.name;
|
67
|
+
return /*#__PURE__*/_react.default.createElement(_react2.RecursionField, {
|
68
|
+
key: index,
|
69
|
+
schema: schema,
|
70
|
+
name: name
|
71
|
+
});
|
72
|
+
});
|
73
|
+
var first = null;
|
74
|
+
var middle = null;
|
75
|
+
var last = null;
|
76
|
+
|
77
|
+
if (panels.length > 1) {
|
78
|
+
first = panels[0];
|
79
|
+
middle = panels.slice(1, panels.length);
|
80
|
+
|
81
|
+
if (panels.length > 2) {
|
82
|
+
middle = panels.slice(1, panels.length - 1);
|
83
|
+
last = panels[panels.length - 1];
|
84
|
+
}
|
85
|
+
} else {
|
86
|
+
middle = panels;
|
87
|
+
}
|
88
|
+
|
89
|
+
return /*#__PURE__*/_react.default.createElement(_components.Input.Group, _objectSpread(_objectSpread({}, props), {}, {
|
90
|
+
className: (0, _classnames.default)(prefixCls, props.className),
|
91
|
+
addonBefore: first,
|
92
|
+
addonAfter: last
|
93
|
+
}), middle);
|
94
|
+
});
|
95
|
+
|
96
|
+
var SearchPanel = function SearchPanel(_ref3) {
|
97
|
+
var children = _ref3.children;
|
98
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
|
99
|
+
};
|
100
|
+
|
101
|
+
Search.SearchPanel = SearchPanel;
|
102
|
+
var _default = Search;
|
103
|
+
exports.default = _default;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { IFilterProps } from '../typing';
|
3
|
+
/**
|
4
|
+
* 简单筛选
|
5
|
+
*/
|
6
|
+
declare const SimpleFilter: React.FC<IFilterProps>;
|
7
|
+
/**
|
8
|
+
* 查询筛选
|
9
|
+
*/
|
10
|
+
declare const QueryFilter: React.FC<IFilterProps>;
|
11
|
+
/**
|
12
|
+
* 高级筛选
|
13
|
+
*/
|
14
|
+
declare const AdvancedFilter: React.FC<IFilterProps>;
|
15
|
+
export { AdvancedFilter, SimpleFilter, QueryFilter };
|
16
|
+
export default AdvancedFilter;
|
@@ -0,0 +1,242 @@
|
|
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 = exports.SimpleFilter = exports.QueryFilter = exports.AdvancedFilter = void 0;
|
9
|
+
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
11
|
+
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
13
|
+
|
14
|
+
var _utils = require("@teamix/utils");
|
15
|
+
|
16
|
+
var _core = require("@formily/core");
|
17
|
+
|
18
|
+
var _ProForm = _interopRequireDefault(require("../ProForm"));
|
19
|
+
|
20
|
+
var _utils2 = require("../utils");
|
21
|
+
|
22
|
+
var _excluded = ["schema", "triggerType", "onFilter"],
|
23
|
+
_excluded2 = ["schema", "triggerType", "onFilter"];
|
24
|
+
|
25
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
26
|
+
|
27
|
+
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); }
|
28
|
+
|
29
|
+
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; }
|
30
|
+
|
31
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
32
|
+
|
33
|
+
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."); }
|
34
|
+
|
35
|
+
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); }
|
36
|
+
|
37
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
38
|
+
|
39
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
40
|
+
|
41
|
+
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; }
|
42
|
+
|
43
|
+
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; }
|
44
|
+
|
45
|
+
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; }
|
46
|
+
|
47
|
+
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; }
|
48
|
+
|
49
|
+
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; }
|
50
|
+
|
51
|
+
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; }
|
52
|
+
|
53
|
+
var searchText = (0, _utils.getMessage)('search');
|
54
|
+
|
55
|
+
var getEventProps = function getEventProps(triggerType, onFilter) {
|
56
|
+
var keydownEvent = {
|
57
|
+
onSubmit: onFilter
|
58
|
+
};
|
59
|
+
var changeEvent = {
|
60
|
+
onChange: onFilter
|
61
|
+
};
|
62
|
+
var eventMap = {
|
63
|
+
keydown: keydownEvent,
|
64
|
+
change: _objectSpread(_objectSpread({}, keydownEvent), changeEvent),
|
65
|
+
submit: keydownEvent
|
66
|
+
};
|
67
|
+
return eventMap[triggerType];
|
68
|
+
};
|
69
|
+
/**
|
70
|
+
* 简单筛选
|
71
|
+
*/
|
72
|
+
|
73
|
+
|
74
|
+
var SimpleFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
75
|
+
var schema = props.schema,
|
76
|
+
triggerType = props.triggerType,
|
77
|
+
onFilter = props.onFilter,
|
78
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
79
|
+
|
80
|
+
var prefixCls = (0, _utils.usePrefixCls)('formily-filter-simple');
|
81
|
+
var simpleSchema = (0, _react.useMemo)(function () {
|
82
|
+
return [{
|
83
|
+
component: 'FormFlex',
|
84
|
+
props: {
|
85
|
+
size: 8
|
86
|
+
},
|
87
|
+
children: [].concat(_toConsumableArray(schema), [{
|
88
|
+
type: 'void',
|
89
|
+
decorator: null,
|
90
|
+
component: 'Submit',
|
91
|
+
props: {
|
92
|
+
style: _objectSpread({}, triggerType === 'submit' ? {} : {
|
93
|
+
display: 'none'
|
94
|
+
})
|
95
|
+
}
|
96
|
+
}])
|
97
|
+
}];
|
98
|
+
}, [schema]);
|
99
|
+
var eventProps = getEventProps(triggerType, onFilter);
|
100
|
+
return /*#__PURE__*/_react.default.createElement(_ProForm.default, _objectSpread(_objectSpread(_objectSpread({
|
101
|
+
feedbackLayout: "none",
|
102
|
+
breakpoints: [],
|
103
|
+
inset: true
|
104
|
+
}, otherProps), eventProps), {}, {
|
105
|
+
className: (0, _classnames.default)(prefixCls, props.className),
|
106
|
+
schema: simpleSchema
|
107
|
+
}));
|
108
|
+
});
|
109
|
+
exports.SimpleFilter = SimpleFilter;
|
110
|
+
SimpleFilter.defaultProps = {
|
111
|
+
triggerType: 'change'
|
112
|
+
};
|
113
|
+
/**
|
114
|
+
* 查询筛选
|
115
|
+
*/
|
116
|
+
|
117
|
+
var QueryFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
118
|
+
var schema = props.schema,
|
119
|
+
triggerType = props.triggerType,
|
120
|
+
onFilter = props.onFilter,
|
121
|
+
otherProps = _objectWithoutProperties(props, _excluded2);
|
122
|
+
|
123
|
+
var prefixCls = (0, _utils.usePrefixCls)('formily-filter-query');
|
124
|
+
var querySchema = (0, _react.useMemo)(function () {
|
125
|
+
return [{
|
126
|
+
component: 'QueryFilter',
|
127
|
+
props: {
|
128
|
+
placeholder: 'placeholder'
|
129
|
+
},
|
130
|
+
children: schema
|
131
|
+
}, {
|
132
|
+
type: 'void',
|
133
|
+
decorator: null,
|
134
|
+
component: 'Submit',
|
135
|
+
props: {
|
136
|
+
style: _objectSpread({}, triggerType === 'submit' ? {} : {
|
137
|
+
display: 'none'
|
138
|
+
})
|
139
|
+
}
|
140
|
+
}];
|
141
|
+
}, [schema]);
|
142
|
+
var eventProps = getEventProps(triggerType, onFilter);
|
143
|
+
return /*#__PURE__*/_react.default.createElement(_ProForm.default, _objectSpread(_objectSpread(_objectSpread({
|
144
|
+
feedbackLayout: "none",
|
145
|
+
breakpoints: [],
|
146
|
+
bordered: false
|
147
|
+
}, otherProps), eventProps), {}, {
|
148
|
+
className: (0, _classnames.default)(prefixCls, props.className),
|
149
|
+
schema: querySchema
|
150
|
+
}));
|
151
|
+
});
|
152
|
+
/**
|
153
|
+
* 高级筛选
|
154
|
+
*/
|
155
|
+
|
156
|
+
exports.QueryFilter = QueryFilter;
|
157
|
+
var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
158
|
+
var form = (0, _react.useMemo)(function () {
|
159
|
+
return (props === null || props === void 0 ? void 0 : props.form) || (0, _core.createForm)();
|
160
|
+
}, []);
|
161
|
+
var schema = props.schema,
|
162
|
+
triggerType = props.triggerType,
|
163
|
+
onFilter = props.onFilter,
|
164
|
+
onReset = props.onReset,
|
165
|
+
layout = props.layout,
|
166
|
+
labelAlign = props.labelAlign,
|
167
|
+
wrapperAlign = props.wrapperAlign,
|
168
|
+
labelCol = props.labelCol,
|
169
|
+
wrapperCol = props.wrapperCol;
|
170
|
+
var prefixCls = (0, _utils.usePrefixCls)('formily-filter-advanced');
|
171
|
+
var gridSchema = (0, _react.useMemo)(function () {
|
172
|
+
return [{
|
173
|
+
name: 'FormGrid',
|
174
|
+
component: 'FormGrid',
|
175
|
+
props: {
|
176
|
+
breakpoints: [480, 720, 990, 1200, Infinity],
|
177
|
+
maxColumns: [1, 2, 3, 3, 4],
|
178
|
+
columnGap: 16,
|
179
|
+
rowGap: 12
|
180
|
+
},
|
181
|
+
children: [].concat(_toConsumableArray(schema), [{
|
182
|
+
component: 'FormButtonGroup',
|
183
|
+
decorator: 'Space',
|
184
|
+
decoratorProps: {
|
185
|
+
style: {
|
186
|
+
gridColumnEnd: -1,
|
187
|
+
alignItems: 'flex-end',
|
188
|
+
justifyContent: 'flex-end'
|
189
|
+
}
|
190
|
+
},
|
191
|
+
children: [{
|
192
|
+
component: 'Reset',
|
193
|
+
props: {
|
194
|
+
onResetValidateSuccess: onReset,
|
195
|
+
style: _objectSpread({}, triggerType === 'submit' ? {} : {
|
196
|
+
marginRight: -16
|
197
|
+
})
|
198
|
+
}
|
199
|
+
}, {
|
200
|
+
component: 'Submit',
|
201
|
+
props: {
|
202
|
+
style: _objectSpread({}, triggerType === 'submit' ? {
|
203
|
+
marginRight: -8
|
204
|
+
} : {
|
205
|
+
display: 'none'
|
206
|
+
})
|
207
|
+
},
|
208
|
+
content: searchText
|
209
|
+
}]
|
210
|
+
}])
|
211
|
+
}];
|
212
|
+
}, [searchText, onReset]);
|
213
|
+
var getTeamixLayout = (0, _react.useMemo)(function () {
|
214
|
+
return {
|
215
|
+
breakpoints: [990],
|
216
|
+
layout: (0, _utils2.mergeArrayValue)(['vertical'], layout),
|
217
|
+
labelAlign: (0, _utils2.mergeArrayValue)(['left'], labelAlign),
|
218
|
+
wrapperAlign: (0, _utils2.mergeArrayValue)(['left'], wrapperAlign),
|
219
|
+
labelCol: (0, _utils2.mergeArrayValue)([24], labelCol),
|
220
|
+
wrapperCol: (0, _utils2.mergeArrayValue)([24], wrapperCol)
|
221
|
+
};
|
222
|
+
}, [layout, labelAlign, wrapperAlign, labelCol, wrapperCol]);
|
223
|
+
var eventProps = getEventProps(triggerType, onFilter);
|
224
|
+
return /*#__PURE__*/_react.default.createElement(_ProForm.default, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
225
|
+
feedbackLayout: "none"
|
226
|
+
}, props), eventProps), getTeamixLayout), {}, {
|
227
|
+
form: form,
|
228
|
+
className: (0, _classnames.default)(prefixCls, props.className),
|
229
|
+
schema: gridSchema,
|
230
|
+
onSubmit: onFilter
|
231
|
+
}));
|
232
|
+
});
|
233
|
+
exports.AdvancedFilter = AdvancedFilter;
|
234
|
+
AdvancedFilter.defaultProps = {
|
235
|
+
triggerType: 'change',
|
236
|
+
layout: 'horizontal',
|
237
|
+
labelAlign: 'right',
|
238
|
+
labelCol: 6,
|
239
|
+
wrapperCol: 18
|
240
|
+
};
|
241
|
+
var _default = AdvancedFilter;
|
242
|
+
exports.default = _default;
|
@@ -0,0 +1,125 @@
|
|
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 _core = require("@formily/core");
|
13
|
+
|
14
|
+
var _reactive = require("@formily/reactive");
|
15
|
+
|
16
|
+
var _formily = require("@teamix/formily");
|
17
|
+
|
18
|
+
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
19
|
+
|
20
|
+
var _utils = require("@teamix/utils");
|
21
|
+
|
22
|
+
var _SchemaForm = _interopRequireDefault(require("../SchemaForm"));
|
23
|
+
|
24
|
+
var _utils2 = require("../utils");
|
25
|
+
|
26
|
+
require("./index.scss");
|
27
|
+
|
28
|
+
var _excluded = ["form", "initialValues", "schema", "scope", "components", "children", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "onChange", "onSubmit", "onSubmitFailed"];
|
29
|
+
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
31
|
+
|
32
|
+
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); }
|
33
|
+
|
34
|
+
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; }
|
35
|
+
|
36
|
+
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; }
|
37
|
+
|
38
|
+
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; }
|
39
|
+
|
40
|
+
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; }
|
41
|
+
|
42
|
+
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; }
|
43
|
+
|
44
|
+
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; }
|
45
|
+
|
46
|
+
var ProForm = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
47
|
+
var outerForm = _ref.form,
|
48
|
+
initialValues = _ref.initialValues,
|
49
|
+
schema = _ref.schema,
|
50
|
+
scope = _ref.scope,
|
51
|
+
components = _ref.components,
|
52
|
+
children = _ref.children,
|
53
|
+
layout = _ref.layout,
|
54
|
+
labelAlign = _ref.labelAlign,
|
55
|
+
wrapperAlign = _ref.wrapperAlign,
|
56
|
+
labelCol = _ref.labelCol,
|
57
|
+
wrapperCol = _ref.wrapperCol,
|
58
|
+
breakpoints = _ref.breakpoints,
|
59
|
+
onChange = _ref.onChange,
|
60
|
+
onSubmit = _ref.onSubmit,
|
61
|
+
onSubmitFailed = _ref.onSubmitFailed,
|
62
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
63
|
+
|
64
|
+
var form = (0, _react.useMemo)(function () {
|
65
|
+
return outerForm || (0, _core.createForm)();
|
66
|
+
}, []);
|
67
|
+
var getTeamixLayout = (0, _react.useMemo)(function () {
|
68
|
+
return breakpoints ? {
|
69
|
+
breakpoints: breakpoints,
|
70
|
+
layout: layout,
|
71
|
+
labelAlign: labelAlign,
|
72
|
+
wrapperAlign: wrapperAlign,
|
73
|
+
labelCol: labelCol,
|
74
|
+
wrapperCol: wrapperCol
|
75
|
+
} : {
|
76
|
+
breakpoints: [480],
|
77
|
+
layout: (0, _utils2.mergeArrayValue)(['vertical'], layout),
|
78
|
+
labelAlign: (0, _utils2.mergeArrayValue)(['left'], labelAlign),
|
79
|
+
wrapperAlign: (0, _utils2.mergeArrayValue)(['left'], wrapperAlign),
|
80
|
+
labelCol: (0, _utils2.mergeArrayValue)([24], labelCol),
|
81
|
+
wrapperCol: (0, _utils2.mergeArrayValue)([24], wrapperCol)
|
82
|
+
};
|
83
|
+
}, [breakpoints, layout, labelAlign, wrapperAlign, labelCol, wrapperCol]);
|
84
|
+
var formChildren = (0, _react.useMemo)(function () {
|
85
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_SchemaForm.default, {
|
86
|
+
schema: schema,
|
87
|
+
scope: scope,
|
88
|
+
components: components
|
89
|
+
}), children);
|
90
|
+
}, [schema, scope, components, children]); // 添加onChange
|
91
|
+
|
92
|
+
(0, _react.useEffect)(function () {
|
93
|
+
form.addEffects('onChange', function () {
|
94
|
+
(0, _core.onFormValuesChange)(function (form) {
|
95
|
+
if (onChange) {
|
96
|
+
onChange((0, _reactive.toJS)(form.values));
|
97
|
+
}
|
98
|
+
});
|
99
|
+
});
|
100
|
+
}, [form, onChange]); // 从组件属性设置初始值(会触发onFormValuesChange,需先注册onFormValuesChange)
|
101
|
+
|
102
|
+
(0, _react.useEffect)(function () {
|
103
|
+
if ((0, _utils.isObj)(initialValues)) {
|
104
|
+
form.setInitialValues(initialValues);
|
105
|
+
}
|
106
|
+
}, []);
|
107
|
+
return outerForm === false ?
|
108
|
+
/*#__PURE__*/
|
109
|
+
// 特殊表单,无需渲染form实例,例如FormDialog等
|
110
|
+
_react.default.createElement(_formily.FormLayout, _objectSpread(_objectSpread({}, otherProps), getTeamixLayout), formChildren) : /*#__PURE__*/_react.default.createElement(_formily.Form, _objectSpread(_objectSpread(_objectSpread({}, otherProps), getTeamixLayout), {}, {
|
111
|
+
form: form,
|
112
|
+
onAutoSubmit: onSubmit,
|
113
|
+
onAutoSubmitFailed: onSubmitFailed
|
114
|
+
}), formChildren);
|
115
|
+
});
|
116
|
+
ProForm.defaultProps = {
|
117
|
+
colon: false,
|
118
|
+
labelAlign: 'left',
|
119
|
+
tooltipIcon: /*#__PURE__*/_react.default.createElement(_icon.default, {
|
120
|
+
type: "info-circle-line",
|
121
|
+
size: "small"
|
122
|
+
})
|
123
|
+
};
|
124
|
+
var _default = ProForm;
|
125
|
+
exports.default = _default;
|