@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,284 @@
|
|
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
|
+
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; }
|
14
|
+
|
15
|
+
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; }
|
16
|
+
|
17
|
+
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; }
|
18
|
+
|
19
|
+
/**
|
20
|
+
* 筛选列
|
21
|
+
*/
|
22
|
+
import { Button, Dropdown, Menu } from '@alicloudfe/components';
|
23
|
+
import TeamixIcon from '@teamix/icon';
|
24
|
+
import { baseClass, getMessage } from '@teamix/utils';
|
25
|
+
import React, { useState, useEffect } from 'react';
|
26
|
+
import { cloneDeep } from '../../utils';
|
27
|
+
import './index.scss';
|
28
|
+
var CheckboxItem = Menu.CheckboxItem; // const { Tooltip } = Balloon;
|
29
|
+
|
30
|
+
var cls = baseClass('teamix-pro-table-toolbar-filter-column');
|
31
|
+
|
32
|
+
var processColumns = function processColumns(columns) {
|
33
|
+
return columns.map(function (item) {
|
34
|
+
if (item.columnFilters === false) {
|
35
|
+
return item;
|
36
|
+
}
|
37
|
+
|
38
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
39
|
+
columnFilters: true
|
40
|
+
});
|
41
|
+
});
|
42
|
+
};
|
43
|
+
|
44
|
+
var FilterColumnIcon = function FilterColumnIcon(props) {
|
45
|
+
var _props$columns = props.columns,
|
46
|
+
columns = _props$columns === void 0 ? [] : _props$columns,
|
47
|
+
actionRef = props.actionRef;
|
48
|
+
|
49
|
+
var _useState = useState(true),
|
50
|
+
_useState2 = _slicedToArray(_useState, 2),
|
51
|
+
allVisible = _useState2[0],
|
52
|
+
setAllVisible = _useState2[1];
|
53
|
+
|
54
|
+
var _useState3 = useState(false),
|
55
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
56
|
+
indeterminate = _useState4[0],
|
57
|
+
setIndeterminate = _useState4[1];
|
58
|
+
|
59
|
+
var _useState5 = useState(processColumns(columns)),
|
60
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
61
|
+
newColumns = _useState6[0],
|
62
|
+
setNewColumns = _useState6[1]; // const [fullscreen, setFullscreen] = useState<boolean>(false);
|
63
|
+
// tooltip 开关
|
64
|
+
|
65
|
+
|
66
|
+
var _useState7 = useState(false),
|
67
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
68
|
+
tooltipVisible = _useState8[0],
|
69
|
+
setTooltipVisible = _useState8[1]; // dropdown 开关
|
70
|
+
|
71
|
+
|
72
|
+
var _useState9 = useState(false),
|
73
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
74
|
+
dropdownVisible = _useState10[0],
|
75
|
+
setDropdownVisible = _useState10[1];
|
76
|
+
|
77
|
+
useEffect(function () {
|
78
|
+
setNewColumns(processColumns(columns));
|
79
|
+
}, [columns]); // useEffect(() => {
|
80
|
+
// console.log("这个函数被触发");
|
81
|
+
// setTimeout(() => {
|
82
|
+
// setFullscreen(actionRef?.current?.getState?.().fullScreenState ?? false);
|
83
|
+
// }, 0)
|
84
|
+
// }, [])
|
85
|
+
// // 销毁监听函数
|
86
|
+
// useEffect(() => {
|
87
|
+
// return () => {
|
88
|
+
// actionRef.current?.off?.('filterColumnIcon');
|
89
|
+
// };
|
90
|
+
// }, []);
|
91
|
+
// // 监听全屏变化
|
92
|
+
// actionRef.current?.on?.(
|
93
|
+
// (state: boolean) => {
|
94
|
+
// setFullscreen(state);
|
95
|
+
// },
|
96
|
+
// 'fullScreenState',
|
97
|
+
// 'filterColumnIcon',
|
98
|
+
// );
|
99
|
+
// 全选
|
100
|
+
|
101
|
+
var onChangeAllColumns = function onChangeAllColumns(check) {
|
102
|
+
setAllVisible(check);
|
103
|
+
var keyNewColumns = cloneDeep(newColumns);
|
104
|
+
keyNewColumns.map(function (item) {
|
105
|
+
item.columnFilters = check;
|
106
|
+
return item;
|
107
|
+
});
|
108
|
+
notifyTableRender(keyNewColumns);
|
109
|
+
}; // 重置
|
110
|
+
|
111
|
+
|
112
|
+
var restColumns = function restColumns(e) {
|
113
|
+
e.stopPropagation();
|
114
|
+
var keyNewColumns = processColumns(columns);
|
115
|
+
notifyTableRender(keyNewColumns);
|
116
|
+
}; // 修改
|
117
|
+
|
118
|
+
|
119
|
+
var onChangeColumns = function onChangeColumns(check, dataIndex) {
|
120
|
+
var keyNewColumns = cloneDeep(newColumns);
|
121
|
+
keyNewColumns.map(function (item) {
|
122
|
+
if (item.dataIndex === dataIndex) {
|
123
|
+
item.columnFilters = check;
|
124
|
+
}
|
125
|
+
|
126
|
+
return item;
|
127
|
+
});
|
128
|
+
notifyTableRender(keyNewColumns);
|
129
|
+
}; // 向上
|
130
|
+
|
131
|
+
|
132
|
+
var moveUp = function moveUp(e, dataIndex) {
|
133
|
+
e.stopPropagation();
|
134
|
+
var keyNewColumns = cloneDeep(newColumns);
|
135
|
+
var index = keyNewColumns.findIndex(function (_ref) {
|
136
|
+
var index = _ref.dataIndex;
|
137
|
+
return index === dataIndex;
|
138
|
+
});
|
139
|
+
|
140
|
+
if (index != 0) {
|
141
|
+
keyNewColumns[index] = keyNewColumns.splice(index - 1, 1, keyNewColumns[index])[0];
|
142
|
+
} else {
|
143
|
+
keyNewColumns.push(keyNewColumns.shift());
|
144
|
+
}
|
145
|
+
|
146
|
+
notifyTableRender(keyNewColumns);
|
147
|
+
}; // 向下
|
148
|
+
|
149
|
+
|
150
|
+
var moveDown = function moveDown(e, dataIndex) {
|
151
|
+
e.stopPropagation();
|
152
|
+
var keyNewColumns = cloneDeep(newColumns);
|
153
|
+
var index = keyNewColumns.findIndex(function (_ref2) {
|
154
|
+
var index = _ref2.dataIndex;
|
155
|
+
return index === dataIndex;
|
156
|
+
});
|
157
|
+
|
158
|
+
if (index != keyNewColumns.length - 1) {
|
159
|
+
keyNewColumns[index] = keyNewColumns.splice(index + 1, 1, keyNewColumns[index])[0];
|
160
|
+
} else {
|
161
|
+
keyNewColumns.unshift(keyNewColumns.splice(index, 1)[0]);
|
162
|
+
}
|
163
|
+
|
164
|
+
notifyTableRender(keyNewColumns);
|
165
|
+
}; // 通知表格渲染
|
166
|
+
|
167
|
+
|
168
|
+
var notifyTableRender = function notifyTableRender(columns) {
|
169
|
+
var _actionRef$current, _actionRef$current$se;
|
170
|
+
|
171
|
+
calculateSelectAllState(columns);
|
172
|
+
setNewColumns(columns);
|
173
|
+
(_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$se = _actionRef$current.setColumn) === null || _actionRef$current$se === void 0 ? void 0 : _actionRef$current$se.call(_actionRef$current, columns);
|
174
|
+
}; // 计算全选状态
|
175
|
+
|
176
|
+
|
177
|
+
var calculateSelectAllState = function calculateSelectAllState(columns) {
|
178
|
+
var flag = columns.reduce(function (acc, cur) {
|
179
|
+
if (cur.columnFilters === true) {
|
180
|
+
acc++;
|
181
|
+
}
|
182
|
+
|
183
|
+
return acc;
|
184
|
+
}, 0);
|
185
|
+
|
186
|
+
if (flag === columns.length) {
|
187
|
+
setAllVisible(true);
|
188
|
+
setIndeterminate(false);
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
|
192
|
+
if (flag === 0) {
|
193
|
+
setAllVisible(false);
|
194
|
+
setIndeterminate(false);
|
195
|
+
return;
|
196
|
+
}
|
197
|
+
|
198
|
+
setIndeterminate(true);
|
199
|
+
};
|
200
|
+
|
201
|
+
var renderDropdown = function renderDropdown() {
|
202
|
+
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Dropdown, {
|
203
|
+
trigger: /*#__PURE__*/React.createElement(Button, {
|
204
|
+
iconSize: "small",
|
205
|
+
className: "teamix-pro-table-toolbar-icon"
|
206
|
+
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
207
|
+
size: "small",
|
208
|
+
type: "set-line"
|
209
|
+
})),
|
210
|
+
visible: dropdownVisible,
|
211
|
+
onVisibleChange: function onVisibleChange(state) {
|
212
|
+
setTooltipVisible(false);
|
213
|
+
setDropdownVisible(state);
|
214
|
+
},
|
215
|
+
triggerType: ['click'],
|
216
|
+
align: "tr br"
|
217
|
+
}, /*#__PURE__*/React.createElement("div", {
|
218
|
+
className: cls()
|
219
|
+
}, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(CheckboxItem, {
|
220
|
+
indeterminate: indeterminate,
|
221
|
+
checked: allVisible,
|
222
|
+
onChange: onChangeAllColumns
|
223
|
+
}, getMessage('selectAll'), /*#__PURE__*/React.createElement(Button, {
|
224
|
+
onClick: restColumns,
|
225
|
+
className: cls({
|
226
|
+
reset: true
|
227
|
+
}),
|
228
|
+
text: true,
|
229
|
+
type: "primary"
|
230
|
+
}, getMessage('reset'))), /*#__PURE__*/React.createElement(Menu.Divider, {
|
231
|
+
key: "divider"
|
232
|
+
}), newColumns.map(function (_ref3, index) {
|
233
|
+
var _newColumns$find;
|
234
|
+
|
235
|
+
var dataIndex = _ref3.dataIndex,
|
236
|
+
title = _ref3.title,
|
237
|
+
columnFiltersDisabled = _ref3.columnFiltersDisabled;
|
238
|
+
return /*#__PURE__*/React.createElement(CheckboxItem, {
|
239
|
+
key: index,
|
240
|
+
checked: (_newColumns$find = newColumns.find(function (_ref4) {
|
241
|
+
var key = _ref4.dataIndex;
|
242
|
+
return key === dataIndex;
|
243
|
+
})) === null || _newColumns$find === void 0 ? void 0 : _newColumns$find.columnFilters,
|
244
|
+
onChange: function onChange(check) {
|
245
|
+
return onChangeColumns(check, dataIndex);
|
246
|
+
},
|
247
|
+
disabled: columnFiltersDisabled
|
248
|
+
}, title, /*#__PURE__*/React.createElement("div", {
|
249
|
+
className: cls({
|
250
|
+
sort: true
|
251
|
+
})
|
252
|
+
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
253
|
+
size: "small",
|
254
|
+
type: "arrow-down-line",
|
255
|
+
onClick: function onClick(e) {
|
256
|
+
return moveDown(e, dataIndex);
|
257
|
+
}
|
258
|
+
}), /*#__PURE__*/React.createElement(TeamixIcon, {
|
259
|
+
size: "small",
|
260
|
+
type: "arrow-up-line",
|
261
|
+
onClick: function onClick(e) {
|
262
|
+
return moveUp(e, dataIndex);
|
263
|
+
}
|
264
|
+
})));
|
265
|
+
})))));
|
266
|
+
};
|
267
|
+
|
268
|
+
return renderDropdown(); // <Tooltip
|
269
|
+
// trigger={renderDropdown()}
|
270
|
+
// align={fullscreen ? 'b' : 't'}
|
271
|
+
// popupProps={{
|
272
|
+
// offset: fullscreen ? [5, 20] : [5, -18],
|
273
|
+
// animation: { in: 'fadeIn', out: 'fadeOut' },
|
274
|
+
// visible: tooltipVisible && !dropdownVisible,
|
275
|
+
// onVisibleChange: (state) => {
|
276
|
+
// setTooltipVisible(state);
|
277
|
+
// },
|
278
|
+
// }}
|
279
|
+
// >
|
280
|
+
// {getMessage('customColumnSetting')}
|
281
|
+
// </Tooltip>
|
282
|
+
};
|
283
|
+
|
284
|
+
export default FilterColumnIcon;
|
@@ -0,0 +1,89 @@
|
|
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
|
+
* 全屏展示 Icon
|
15
|
+
*/
|
16
|
+
import { Button } from '@alicloudfe/components';
|
17
|
+
import TeamixIcon from '@teamix/icon';
|
18
|
+
import { baseClass } from '@teamix/utils';
|
19
|
+
import React, { useEffect, useState } from 'react';
|
20
|
+
import './index.scss';
|
21
|
+
var cls = baseClass('teamix-pro-table-toolbar-icon');
|
22
|
+
|
23
|
+
var FullScreenIcon = function FullScreenIcon(props) {
|
24
|
+
var _actionRef$current3, _actionRef$current3$o;
|
25
|
+
|
26
|
+
var actionRef = props.actionRef;
|
27
|
+
|
28
|
+
var _useState = useState(false),
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
30
|
+
visible = _useState2[0],
|
31
|
+
setVisible = _useState2[1];
|
32
|
+
|
33
|
+
var _useState3 = useState(false),
|
34
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
35
|
+
fullscreen = _useState4[0],
|
36
|
+
setFullscreen = _useState4[1]; // 点击全屏
|
37
|
+
|
38
|
+
|
39
|
+
var allScreenHandle = function allScreenHandle() {
|
40
|
+
setVisible(false);
|
41
|
+
setTimeout(function () {
|
42
|
+
var _actionRef$current, _actionRef$current$fu;
|
43
|
+
|
44
|
+
(_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$fu = _actionRef$current.fullScreen) === null || _actionRef$current$fu === void 0 ? void 0 : _actionRef$current$fu.call(_actionRef$current);
|
45
|
+
}, 0);
|
46
|
+
}; // 销毁监听函数
|
47
|
+
|
48
|
+
|
49
|
+
useEffect(function () {
|
50
|
+
return function () {
|
51
|
+
var _actionRef$current2, _actionRef$current2$o;
|
52
|
+
|
53
|
+
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$o = _actionRef$current2.off) === null || _actionRef$current2$o === void 0 ? void 0 : _actionRef$current2$o.call(_actionRef$current2, 'fullscreenIcon');
|
54
|
+
};
|
55
|
+
}, []); // 监听全屏变化
|
56
|
+
|
57
|
+
(_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$o = _actionRef$current3.on) === null || _actionRef$current3$o === void 0 ? void 0 : _actionRef$current3$o.call(_actionRef$current3, function (state) {
|
58
|
+
setFullscreen(state);
|
59
|
+
}, 'fullScreenState', 'fullscreenIcon');
|
60
|
+
return /*#__PURE__*/React.createElement(Button, {
|
61
|
+
iconSize: "small",
|
62
|
+
className: cls(),
|
63
|
+
onClick: allScreenHandle
|
64
|
+
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
65
|
+
size: "small",
|
66
|
+
type: fullscreen ? 'close-line' : 'full-screen-line'
|
67
|
+
})) // <Balloon.Tooltip
|
68
|
+
// trigger={
|
69
|
+
// <Button iconSize="small" className={cls()} onClick={allScreenHandle}>
|
70
|
+
// <TeamixIcon
|
71
|
+
// size="small"
|
72
|
+
// type={fullscreen ? 'close-line' : 'full-screen-line'}
|
73
|
+
// />
|
74
|
+
// </Button>
|
75
|
+
// }
|
76
|
+
// align={fullscreen ? 'b' : 't'}
|
77
|
+
// popupProps={{
|
78
|
+
// visible: visible,
|
79
|
+
// onVisibleChange: (state) => {
|
80
|
+
// setVisible(state);
|
81
|
+
// },
|
82
|
+
// }}
|
83
|
+
// >
|
84
|
+
// {getMessage('fullScreen')}
|
85
|
+
// </Balloon.Tooltip>
|
86
|
+
;
|
87
|
+
};
|
88
|
+
|
89
|
+
export default FullScreenIcon;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './index.scss';
|
3
|
+
import { ProTableActionType } from '../../typing';
|
4
|
+
declare type ProTableFullScreenProps = {
|
5
|
+
children: React.ReactNode;
|
6
|
+
visible: boolean;
|
7
|
+
actionRef: React.MutableRefObject<ProTableActionType | undefined>;
|
8
|
+
};
|
9
|
+
declare const FullScreen: React.FC<ProTableFullScreenProps>;
|
10
|
+
export default FullScreen;
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import React, { useEffect } from 'react';
|
2
|
+
import { Message, Overlay } from '@alicloudfe/components';
|
3
|
+
import './index.scss';
|
4
|
+
import { getMessage } from '@teamix/utils';
|
5
|
+
|
6
|
+
var FullScreen = function FullScreen(props) {
|
7
|
+
var children = props.children,
|
8
|
+
visible = props.visible,
|
9
|
+
actionRef = props.actionRef;
|
10
|
+
|
11
|
+
function closeByESC(e) {
|
12
|
+
if (visible && e.code === 'Escape') {
|
13
|
+
var _actionRef$current, _actionRef$current$se, _actionRef$current2, _actionRef$current2$f;
|
14
|
+
|
15
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$se = _actionRef$current.setFullScreenState) === null || _actionRef$current$se === void 0 ? void 0 : _actionRef$current$se.call(_actionRef$current, false);
|
16
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$f = _actionRef$current2.fullScreen) === null || _actionRef$current2$f === void 0 ? void 0 : _actionRef$current2$f.call(_actionRef$current2);
|
17
|
+
}
|
18
|
+
} // 监听esc按钮
|
19
|
+
|
20
|
+
|
21
|
+
useEffect(function () {
|
22
|
+
var _actionRef$current3, _actionRef$current3$s;
|
23
|
+
|
24
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$s = _actionRef$current3.setFullScreenState) === null || _actionRef$current3$s === void 0 ? void 0 : _actionRef$current3$s.call(_actionRef$current3, visible);
|
25
|
+
window.addEventListener('keydown', closeByESC);
|
26
|
+
return function () {
|
27
|
+
window.removeEventListener('keydown', closeByESC);
|
28
|
+
};
|
29
|
+
}, [visible]); // 全屏开启之后
|
30
|
+
|
31
|
+
var afterOpen = function afterOpen() {
|
32
|
+
Message.show({
|
33
|
+
type: 'notice',
|
34
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, getMessage('press')), /*#__PURE__*/React.createElement("span", {
|
35
|
+
className: "teamix-pro-table-full-screen-message-esc"
|
36
|
+
}, /*#__PURE__*/React.createElement("span", {
|
37
|
+
className: "teamix-pro-table-full-screen-message-esc-title"
|
38
|
+
}, "esc")), /*#__PURE__*/React.createElement("span", null, getMessage('toExitFullScreen'))),
|
39
|
+
className: 'teamix-pro-table-full-screen-message'
|
40
|
+
});
|
41
|
+
};
|
42
|
+
|
43
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/React.createElement(Overlay, {
|
44
|
+
canCloseByOutSideClick: false,
|
45
|
+
align: "cc cc",
|
46
|
+
cache: true,
|
47
|
+
disableScroll: true,
|
48
|
+
shouldUpdatePosition: true,
|
49
|
+
animation: {
|
50
|
+
in: 'fadeIn',
|
51
|
+
out: 'fadeOut'
|
52
|
+
},
|
53
|
+
visible: visible,
|
54
|
+
wrapperStyle: {
|
55
|
+
zIndex: 999
|
56
|
+
},
|
57
|
+
afterOpen: afterOpen,
|
58
|
+
onRequestClose: function onRequestClose() {
|
59
|
+
var _actionRef$current4, _actionRef$current4$f;
|
60
|
+
|
61
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$f = _actionRef$current4.fullScreen) === null || _actionRef$current4$f === void 0 ? void 0 : _actionRef$current4$f.call(_actionRef$current4);
|
62
|
+
}
|
63
|
+
}, /*#__PURE__*/React.createElement("div", {
|
64
|
+
className: "teamix-pro-table-full-screen"
|
65
|
+
}, children)));
|
66
|
+
};
|
67
|
+
|
68
|
+
export default FullScreen;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* 刷新
|
3
|
+
*/
|
4
|
+
import { Button, Balloon } from '@alicloudfe/components';
|
5
|
+
import TeamixIcon from '@teamix/icon';
|
6
|
+
import { baseClass, getMessage } from '@teamix/utils';
|
7
|
+
import React from 'react';
|
8
|
+
import './index.scss';
|
9
|
+
var cls = baseClass('teamix-pro-table-toolbar-icon');
|
10
|
+
|
11
|
+
var LayoutIcon = function LayoutIcon(props) {
|
12
|
+
var actionRef = props.actionRef; // const [fullscreen, setFullscreen] = useState<boolean>(false);
|
13
|
+
// // 销毁监听函数
|
14
|
+
// useEffect(() => {
|
15
|
+
// return () => {
|
16
|
+
// actionRef.current?.off?.('refreshIcon');
|
17
|
+
// };
|
18
|
+
// }, []);
|
19
|
+
// // 监听全屏变化
|
20
|
+
// actionRef.current?.on?.(
|
21
|
+
// (state: boolean) => {
|
22
|
+
// setFullscreen(state);
|
23
|
+
// },
|
24
|
+
// 'fullScreenState',
|
25
|
+
// 'refreshIcon',
|
26
|
+
// );
|
27
|
+
|
28
|
+
return /*#__PURE__*/React.createElement(Balloon.Tooltip, {
|
29
|
+
trigger: /*#__PURE__*/React.createElement(Button, {
|
30
|
+
iconSize: "small",
|
31
|
+
className: cls(),
|
32
|
+
onClick: function onClick() {
|
33
|
+
var _actionRef$current, _actionRef$current$re;
|
34
|
+
|
35
|
+
return (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$re = _actionRef$current.refresh) === null || _actionRef$current$re === void 0 ? void 0 : _actionRef$current$re.call(_actionRef$current);
|
36
|
+
}
|
37
|
+
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
38
|
+
size: "small",
|
39
|
+
type: "refresh-line"
|
40
|
+
})),
|
41
|
+
align: "t"
|
42
|
+
}, getMessage('refresh'));
|
43
|
+
};
|
44
|
+
|
45
|
+
export default LayoutIcon;
|
@@ -0,0 +1,79 @@
|
|
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
|
+
import { baseClass } from '@teamix/utils';
|
8
|
+
import React from 'react';
|
9
|
+
import FullScreenIcon from './FullScreenIcon';
|
10
|
+
import FilterColumnIcon from './FilterColumnIcon';
|
11
|
+
import DensityIcon from './DensityIcon';
|
12
|
+
import RefreshIcon from './RefreshIcon';
|
13
|
+
import './index.scss';
|
14
|
+
var cls = baseClass('teamix-pro-table-toolbar');
|
15
|
+
var presetToolBarMap = {
|
16
|
+
refresh: RefreshIcon,
|
17
|
+
density: DensityIcon,
|
18
|
+
filtercolumn: FilterColumnIcon,
|
19
|
+
fullscreen: FullScreenIcon
|
20
|
+
};
|
21
|
+
var presetToolBarName = ['refresh', 'density', 'filtercolumn', 'fullscreen'];
|
22
|
+
var presetToolBar = [{
|
23
|
+
name: 'refresh',
|
24
|
+
type: 'preset',
|
25
|
+
component: RefreshIcon
|
26
|
+
}, {
|
27
|
+
name: 'density',
|
28
|
+
type: 'preset',
|
29
|
+
component: DensityIcon
|
30
|
+
}, {
|
31
|
+
name: 'filterColumn',
|
32
|
+
type: 'preset',
|
33
|
+
component: FilterColumnIcon
|
34
|
+
}, {
|
35
|
+
name: 'fullScreen',
|
36
|
+
type: 'preset',
|
37
|
+
component: FullScreenIcon
|
38
|
+
}];
|
39
|
+
|
40
|
+
var ToolBar = function ToolBar(props) {
|
41
|
+
var toolBar = props.toolBar;
|
42
|
+
var toolBarList = toolBar !== false ? presetToolBar : [];
|
43
|
+
|
44
|
+
if (Array.isArray(toolBar)) {
|
45
|
+
toolBarList = toolBar.map(function (item, index) {
|
46
|
+
if (typeof item === 'string' && presetToolBarName.includes(item.toLowerCase())) {
|
47
|
+
return {
|
48
|
+
type: 'preset',
|
49
|
+
name: item,
|
50
|
+
component: presetToolBarMap[item.toLowerCase()]
|
51
|
+
};
|
52
|
+
}
|
53
|
+
|
54
|
+
return {
|
55
|
+
type: 'custom',
|
56
|
+
name: "custom".concat(index),
|
57
|
+
component: item
|
58
|
+
};
|
59
|
+
});
|
60
|
+
}
|
61
|
+
|
62
|
+
return /*#__PURE__*/React.createElement("div", {
|
63
|
+
className: cls()
|
64
|
+
}, toolBarList.map(function (_ref) {
|
65
|
+
var type = _ref.type,
|
66
|
+
name = _ref.name,
|
67
|
+
Component = _ref.component;
|
68
|
+
return /*#__PURE__*/React.createElement("span", {
|
69
|
+
className: cls(_defineProperty({}, name, true)),
|
70
|
+
key: name
|
71
|
+
}, type === 'preset' && /*#__PURE__*/React.createElement(Component, _objectSpread({}, props)), type === 'custom' && /*#__PURE__*/React.createElement("div", {
|
72
|
+
className: cls({
|
73
|
+
custom: true
|
74
|
+
})
|
75
|
+
}, Component));
|
76
|
+
}));
|
77
|
+
};
|
78
|
+
|
79
|
+
export default ToolBar;
|