@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,241 @@
|
|
1
|
+
var _excluded = ["header", "mainAction", "quickAction", "actionRef", "dataFilter", "dataFilterForm", "rowSelection"];
|
2
|
+
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
4
|
+
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
6
|
+
|
7
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
8
|
+
|
9
|
+
function _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); }
|
10
|
+
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
12
|
+
|
13
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
14
|
+
|
15
|
+
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); }
|
16
|
+
|
17
|
+
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; }
|
18
|
+
|
19
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
20
|
+
|
21
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
22
|
+
|
23
|
+
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; }
|
24
|
+
|
25
|
+
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; }
|
26
|
+
|
27
|
+
import React, { useEffect, useState } from 'react';
|
28
|
+
import { Header, baseClass } from '@teamix/utils';
|
29
|
+
import { Button, Badge } from '@alicloudfe/components';
|
30
|
+
import TeamixIcon from '@teamix/icon';
|
31
|
+
import { ActionGroup } from '../../../actions';
|
32
|
+
import { SimpleFilter, AdvancedFilter, toJS } from '../../../form';
|
33
|
+
import { getMessage } from '@teamix/utils';
|
34
|
+
import ToolBar from '../ToolBar';
|
35
|
+
import QuickAction from '../QuickAction';
|
36
|
+
import isEmpty from 'lodash.isempty';
|
37
|
+
import './index.scss';
|
38
|
+
var cls = baseClass('teamix-pro-table-layout');
|
39
|
+
|
40
|
+
var Layout = function Layout(props) {
|
41
|
+
var header = props.header,
|
42
|
+
mainAction = props.mainAction,
|
43
|
+
quickAction = props.quickAction,
|
44
|
+
actionRef = props.actionRef,
|
45
|
+
dataFilter = props.dataFilter,
|
46
|
+
dataFilterForm = props.dataFilterForm,
|
47
|
+
rowSelection = props.rowSelection,
|
48
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
49
|
+
|
50
|
+
var mode = (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.mode) || 'inline';
|
51
|
+
|
52
|
+
var _useState = useState((dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand) || false),
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
54
|
+
expand = _useState2[0],
|
55
|
+
setExpand = _useState2[1];
|
56
|
+
|
57
|
+
var _useState3 = useState(false),
|
58
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
59
|
+
hasDot = _useState4[0],
|
60
|
+
setHasDot = _useState4[1];
|
61
|
+
|
62
|
+
useEffect(function () {
|
63
|
+
if (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand) {
|
64
|
+
setExpand(dataFilter.expand);
|
65
|
+
}
|
66
|
+
}, [dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand]); // 渲染主操作区
|
67
|
+
|
68
|
+
var renderMainAction = function renderMainAction() {
|
69
|
+
var _mainAction$actions;
|
70
|
+
|
71
|
+
if (_typeof(mainAction) === 'object' && (mainAction === null || mainAction === void 0 ? void 0 : (_mainAction$actions = mainAction.actions) === null || _mainAction$actions === void 0 ? void 0 : _mainAction$actions.length) > 0) {
|
72
|
+
// 默认 context
|
73
|
+
var defaultContext = {
|
74
|
+
action: actionRef.current,
|
75
|
+
rowSelection: rowSelection
|
76
|
+
};
|
77
|
+
return /*#__PURE__*/React.createElement("div", {
|
78
|
+
className: cls('main-action')
|
79
|
+
}, /*#__PURE__*/React.createElement(ActionGroup, _objectSpread(_objectSpread({}, mainAction), {}, {
|
80
|
+
context: _objectSpread(_objectSpread({}, defaultContext), mainAction.context)
|
81
|
+
})));
|
82
|
+
} else return mainAction;
|
83
|
+
}; // 渲染 mode='inline' 数据过滤区
|
84
|
+
|
85
|
+
|
86
|
+
var renderInlineFilter = function renderInlineFilter() {
|
87
|
+
var _dataFilter$schema;
|
88
|
+
|
89
|
+
if (dataFilter && (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) > 0) {
|
90
|
+
return /*#__PURE__*/React.createElement("div", {
|
91
|
+
className: cls('inline-filter')
|
92
|
+
}, /*#__PURE__*/React.createElement(SimpleFilter, _objectSpread({
|
93
|
+
form: dataFilterForm
|
94
|
+
}, dataFilter)));
|
95
|
+
}
|
96
|
+
}; // 渲染 mode='panel' 数据过滤区
|
97
|
+
|
98
|
+
|
99
|
+
var renderPanelFilter = function renderPanelFilter() {
|
100
|
+
var _dataFilter$schema2;
|
101
|
+
|
102
|
+
if (dataFilter && (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema2 = dataFilter.schema) === null || _dataFilter$schema2 === void 0 ? void 0 : _dataFilter$schema2.length) > 0) {
|
103
|
+
return /*#__PURE__*/React.createElement("div", {
|
104
|
+
className: cls('panel-filter'),
|
105
|
+
style: {
|
106
|
+
display: expand ? 'block' : 'none'
|
107
|
+
}
|
108
|
+
}, /*#__PURE__*/React.createElement(AdvancedFilter, _objectSpread({
|
109
|
+
form: dataFilterForm
|
110
|
+
}, dataFilter)));
|
111
|
+
}
|
112
|
+
}; // 渲染过滤器按钮
|
113
|
+
|
114
|
+
|
115
|
+
var renderFilterBtn = function renderFilterBtn() {
|
116
|
+
var handleBtnClick = function handleBtnClick() {
|
117
|
+
setExpand(!expand);
|
118
|
+
var filterValues = Object.values(toJS(dataFilterForm === null || dataFilterForm === void 0 ? void 0 : dataFilterForm.values)).filter(function (v) {
|
119
|
+
return !isEmpty(v);
|
120
|
+
}); // console.log('filterValues', filterValues);
|
121
|
+
|
122
|
+
if (filterValues && (filterValues === null || filterValues === void 0 ? void 0 : filterValues.length) > 0) {
|
123
|
+
setHasDot(true);
|
124
|
+
} else {
|
125
|
+
setHasDot(false);
|
126
|
+
} // 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
127
|
+
|
128
|
+
|
129
|
+
setTimeout(function () {
|
130
|
+
var _actionRef$current, _actionRef$current$ge;
|
131
|
+
|
132
|
+
if ((_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge = _actionRef$current.getState) === null || _actionRef$current$ge === void 0 ? void 0 : _actionRef$current$ge.call(_actionRef$current).fullScreenState) {
|
133
|
+
var _actionRef$current2, _actionRef$current2$r;
|
134
|
+
|
135
|
+
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$r = _actionRef$current2.resetTableMaxBodyHeight) === null || _actionRef$current2$r === void 0 ? void 0 : _actionRef$current2$r.call(_actionRef$current2);
|
136
|
+
}
|
137
|
+
});
|
138
|
+
};
|
139
|
+
|
140
|
+
if (mode === 'panel') {
|
141
|
+
if (expand === false && hasDot) {
|
142
|
+
return /*#__PURE__*/React.createElement(Badge, {
|
143
|
+
dot: true,
|
144
|
+
className: cls('filter-btn')
|
145
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
146
|
+
onClick: handleBtnClick,
|
147
|
+
style: {
|
148
|
+
minWidth: 'unset'
|
149
|
+
}
|
150
|
+
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
151
|
+
type: expand ? 'up-line' : 'filter-line'
|
152
|
+
}), getMessage('filter')));
|
153
|
+
} else return /*#__PURE__*/React.createElement(Button, {
|
154
|
+
onClick: handleBtnClick,
|
155
|
+
className: cls('filter-btn'),
|
156
|
+
style: {
|
157
|
+
minWidth: 'unset'
|
158
|
+
}
|
159
|
+
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
160
|
+
type: expand ? 'up-line' : 'filter-line'
|
161
|
+
}), getMessage('filter'));
|
162
|
+
}
|
163
|
+
}; // 区域组合渲染
|
164
|
+
|
165
|
+
|
166
|
+
var renderLayout = function renderLayout() {
|
167
|
+
if (header && mainAction) {
|
168
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
169
|
+
className: cls('wrapper')
|
170
|
+
}, /*#__PURE__*/React.createElement("div", {
|
171
|
+
className: cls('left')
|
172
|
+
}, header && /*#__PURE__*/React.createElement(Header, _objectSpread({}, header))), /*#__PURE__*/React.createElement("div", {
|
173
|
+
className: cls('right')
|
174
|
+
}, quickAction && /*#__PURE__*/React.createElement(QuickAction, {
|
175
|
+
actionRef: actionRef,
|
176
|
+
quickAction: quickAction,
|
177
|
+
rowSelection: rowSelection
|
178
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
179
|
+
className: cls('wrapper')
|
180
|
+
}, /*#__PURE__*/React.createElement("div", {
|
181
|
+
className: cls('left')
|
182
|
+
}, mainAction && renderMainAction(), mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/React.createElement("div", {
|
183
|
+
className: cls('right')
|
184
|
+
}, /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
185
|
+
actionRef: actionRef
|
186
|
+
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
187
|
+
} else if (header && !mainAction) {
|
188
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
189
|
+
className: cls('wrapper')
|
190
|
+
}, /*#__PURE__*/React.createElement("div", {
|
191
|
+
className: cls('left')
|
192
|
+
}, header && /*#__PURE__*/React.createElement(Header, _objectSpread({}, header)), mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/React.createElement("div", {
|
193
|
+
className: cls('right')
|
194
|
+
}, quickAction && /*#__PURE__*/React.createElement(QuickAction, {
|
195
|
+
actionRef: actionRef,
|
196
|
+
quickAction: quickAction,
|
197
|
+
rowSelection: rowSelection
|
198
|
+
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
199
|
+
actionRef: actionRef
|
200
|
+
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
201
|
+
} else if (!header && mainAction) {
|
202
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
203
|
+
className: cls('wrapper')
|
204
|
+
}, /*#__PURE__*/React.createElement("div", {
|
205
|
+
className: cls('left')
|
206
|
+
}, mainAction && renderMainAction(), mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/React.createElement("div", {
|
207
|
+
className: cls('right')
|
208
|
+
}, quickAction && /*#__PURE__*/React.createElement(QuickAction, {
|
209
|
+
actionRef: actionRef,
|
210
|
+
quickAction: quickAction,
|
211
|
+
rowSelection: rowSelection
|
212
|
+
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
213
|
+
actionRef: actionRef
|
214
|
+
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
215
|
+
} else if (!header && !mainAction) {
|
216
|
+
if (!dataFilterForm && !quickAction) {
|
217
|
+
return null;
|
218
|
+
}
|
219
|
+
|
220
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
221
|
+
className: cls('wrapper')
|
222
|
+
}, /*#__PURE__*/React.createElement("div", {
|
223
|
+
className: cls('left')
|
224
|
+
}, mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/React.createElement("div", {
|
225
|
+
className: cls('right')
|
226
|
+
}, quickAction && /*#__PURE__*/React.createElement(QuickAction, {
|
227
|
+
actionRef: actionRef,
|
228
|
+
quickAction: quickAction,
|
229
|
+
rowSelection: rowSelection
|
230
|
+
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
231
|
+
actionRef: actionRef
|
232
|
+
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
233
|
+
}
|
234
|
+
};
|
235
|
+
|
236
|
+
return /*#__PURE__*/React.createElement("div", {
|
237
|
+
className: cls()
|
238
|
+
}, renderLayout());
|
239
|
+
};
|
240
|
+
|
241
|
+
export default /*#__PURE__*/React.memo(Layout);
|
@@ -0,0 +1,39 @@
|
|
1
|
+
$prefix: 'teamix-pro-table-layout';
|
2
|
+
|
3
|
+
.theme-hybridcloud-dark {
|
4
|
+
--panel-filter-bg: #1f1f1f;
|
5
|
+
}
|
6
|
+
|
7
|
+
.#{$prefix} {
|
8
|
+
&-wrapper {
|
9
|
+
display: flex;
|
10
|
+
justify-content: space-between;
|
11
|
+
margin-bottom: 8px;
|
12
|
+
&:not(:first-child) {
|
13
|
+
margin-top: 8px;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
&-left {
|
17
|
+
display: flex;
|
18
|
+
align-items: center;
|
19
|
+
justify-content: flex-start;
|
20
|
+
}
|
21
|
+
&-right {
|
22
|
+
display: flex;
|
23
|
+
align-items: center;
|
24
|
+
justify-content: flex-end;
|
25
|
+
}
|
26
|
+
&-inline-filter:not(:first-child) {
|
27
|
+
margin-left: 8px;
|
28
|
+
display: flex;
|
29
|
+
align-items: center;
|
30
|
+
}
|
31
|
+
&-filter-btn:not(:first-child) {
|
32
|
+
margin-left: 8px;
|
33
|
+
}
|
34
|
+
&-panel-filter {
|
35
|
+
margin: 8px 0;
|
36
|
+
padding: 16px;
|
37
|
+
background: var(--panel-filter-bg, #fff);
|
38
|
+
}
|
39
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { IActionButton } from '../../../actions';
|
3
|
+
import { ProTableActionType, innerRowSelectionType, rowSelectionType } from '../../typing';
|
4
|
+
interface QuickActionProps {
|
5
|
+
quickAction?: IActionButton | React.ReactNode | React.ReactNode[];
|
6
|
+
actionRef: React.MutableRefObject<ProTableActionType | undefined>;
|
7
|
+
rowSelection?: innerRowSelectionType | rowSelectionType;
|
8
|
+
}
|
9
|
+
declare const QuickAction: React.FC<QuickActionProps>;
|
10
|
+
export default QuickAction;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
2
|
+
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
4
|
+
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
|
7
|
+
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); }
|
8
|
+
|
9
|
+
import React from 'react';
|
10
|
+
import { Box } from '@alicloudfe/components';
|
11
|
+
import ActionButton from '../../../actions';
|
12
|
+
|
13
|
+
var QuickAction = function QuickAction(props) {
|
14
|
+
var quickAction = props.quickAction,
|
15
|
+
actionRef = props.actionRef,
|
16
|
+
rowSelection = props.rowSelection; // 如果传对象的话,默认为主要文字类型的 ActionButton
|
17
|
+
|
18
|
+
if (_typeof(quickAction) === 'object') {
|
19
|
+
// 默认 context
|
20
|
+
var defaultContext = {
|
21
|
+
action: actionRef.current,
|
22
|
+
rowSelection: rowSelection
|
23
|
+
};
|
24
|
+
return /*#__PURE__*/React.createElement("div", {
|
25
|
+
className: "teamix-pro-table-layout-quick-action"
|
26
|
+
}, /*#__PURE__*/React.createElement(ActionButton, _objectSpread(_objectSpread({
|
27
|
+
type: "primary",
|
28
|
+
text: true
|
29
|
+
}, quickAction), {}, {
|
30
|
+
context: _objectSpread(_objectSpread({}, defaultContext), quickAction.context)
|
31
|
+
})));
|
32
|
+
}
|
33
|
+
|
34
|
+
if (Array.isArray(quickAction)) {
|
35
|
+
return /*#__PURE__*/React.createElement("div", {
|
36
|
+
className: "teamix-pro-table-layout-quick-action"
|
37
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
38
|
+
direction: "row",
|
39
|
+
spacing: 8,
|
40
|
+
align: "center"
|
41
|
+
}, quickAction.map(function (item, index) {
|
42
|
+
return /*#__PURE__*/React.createElement("div", {
|
43
|
+
key: index
|
44
|
+
}, item);
|
45
|
+
})));
|
46
|
+
}
|
47
|
+
|
48
|
+
return /*#__PURE__*/React.createElement("div", {
|
49
|
+
className: "teamix-pro-table-layout-quick-action"
|
50
|
+
}, quickAction);
|
51
|
+
};
|
52
|
+
|
53
|
+
export default QuickAction;
|
File without changes
|
@@ -0,0 +1,117 @@
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
|
+
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
4
|
+
|
5
|
+
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); }
|
6
|
+
|
7
|
+
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; }
|
8
|
+
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
10
|
+
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
12
|
+
|
13
|
+
/**
|
14
|
+
* 更改 Table 疏密度 Icon
|
15
|
+
*/
|
16
|
+
import { Button, Dropdown, Menu } from '@alicloudfe/components';
|
17
|
+
import TeamixIcon from '@teamix/icon';
|
18
|
+
import { baseClass, getMessage } from '@teamix/utils';
|
19
|
+
import React, { useState } from 'react';
|
20
|
+
import './index.scss';
|
21
|
+
var RadioItem = Menu.RadioItem;
|
22
|
+
var cls = baseClass('teamix-pro-table-toolbar-icon');
|
23
|
+
|
24
|
+
var DensityIcon = function DensityIcon(props) {
|
25
|
+
var actionRef = props.actionRef;
|
26
|
+
|
27
|
+
var _useState = useState('medium'),
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
29
|
+
size = _useState2[0],
|
30
|
+
setSize = _useState2[1]; // const [fullscreen, setFullscreen] = useState<boolean>(false);
|
31
|
+
// tooltip 开关
|
32
|
+
|
33
|
+
|
34
|
+
var _useState3 = useState(false),
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
36
|
+
tooltipVisible = _useState4[0],
|
37
|
+
setTooltipVisible = _useState4[1]; // dropdown 开关
|
38
|
+
|
39
|
+
|
40
|
+
var _useState5 = useState(false),
|
41
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
42
|
+
dropdownVisible = _useState6[0],
|
43
|
+
setDropdownVisible = _useState6[1]; // 设置大小
|
44
|
+
|
45
|
+
|
46
|
+
var radioOnchange = function radioOnchange(mode) {
|
47
|
+
var _actionRef$current, _actionRef$current$se;
|
48
|
+
|
49
|
+
setSize(mode);
|
50
|
+
(_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$se = _actionRef$current.setSize) === null || _actionRef$current$se === void 0 ? void 0 : _actionRef$current$se.call(_actionRef$current, mode);
|
51
|
+
}; // // 销毁监听函数
|
52
|
+
// useEffect(() => {
|
53
|
+
// return () => {
|
54
|
+
// actionRef.current?.off?.('densityIcon');
|
55
|
+
// };
|
56
|
+
// }, []);
|
57
|
+
// // 监听全屏变化
|
58
|
+
// actionRef.current?.on?.(
|
59
|
+
// (state: boolean) => {
|
60
|
+
// setFullscreen(state);
|
61
|
+
// },
|
62
|
+
// 'fullScreenState',
|
63
|
+
// 'densityIcon',
|
64
|
+
// );
|
65
|
+
|
66
|
+
|
67
|
+
var renderDropdown = function renderDropdown() {
|
68
|
+
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Dropdown // safeNode={() => sizeMenuRef.current || document}
|
69
|
+
, {
|
70
|
+
// safeNode={() => sizeMenuRef.current || document}
|
71
|
+
trigger: /*#__PURE__*/React.createElement(Button, {
|
72
|
+
iconSize: "small",
|
73
|
+
className: cls()
|
74
|
+
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
75
|
+
size: "small",
|
76
|
+
type: "space-line"
|
77
|
+
})),
|
78
|
+
visible: dropdownVisible,
|
79
|
+
onVisibleChange: function onVisibleChange(state) {
|
80
|
+
setTooltipVisible(false);
|
81
|
+
setDropdownVisible(state);
|
82
|
+
},
|
83
|
+
triggerType: ['click'],
|
84
|
+
// key={index}
|
85
|
+
align: "tr br"
|
86
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(RadioItem, {
|
87
|
+
key: "medium",
|
88
|
+
checked: size === 'medium',
|
89
|
+
onChange: function onChange(checked) {
|
90
|
+
return radioOnchange('medium');
|
91
|
+
}
|
92
|
+
}, getMessage('default')), /*#__PURE__*/React.createElement(RadioItem, {
|
93
|
+
key: "small",
|
94
|
+
checked: size === 'small',
|
95
|
+
onChange: function onChange(checked) {
|
96
|
+
return radioOnchange('small');
|
97
|
+
}
|
98
|
+
}, getMessage('compact'))))));
|
99
|
+
};
|
100
|
+
|
101
|
+
return renderDropdown(); // <Balloon.Tooltip
|
102
|
+
// trigger={renderDropdown()}
|
103
|
+
// align={fullscreen ? 'b' : 't'}
|
104
|
+
// popupProps={{
|
105
|
+
// offset: fullscreen ? [5, 20] : [5, -18],
|
106
|
+
// animation: { in: 'fadeIn', out: 'fadeOut' },
|
107
|
+
// visible: tooltipVisible && !dropdownVisible,
|
108
|
+
// onVisibleChange: (state) => {
|
109
|
+
// setTooltipVisible(state);
|
110
|
+
// },
|
111
|
+
// }}
|
112
|
+
// >
|
113
|
+
// {getMessage('density')}
|
114
|
+
// </Balloon.Tooltip>
|
115
|
+
};
|
116
|
+
|
117
|
+
export default DensityIcon;
|