@teamix/pro 1.0.25 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.css +1 -1
- package/dist/all.js +10401 -14141
- package/dist/all.min.css +1 -1
- package/dist/all.min.js +1 -1
- package/es/actions/base.d.ts +13 -0
- package/es/actions/base.js +23 -0
- package/es/actions/confirm.d.ts +7 -0
- package/es/actions/confirm.js +11 -0
- package/es/actions/danger-confirm.d.ts +7 -0
- package/es/actions/danger-confirm.js +14 -0
- package/es/actions/dialog-component.d.ts +10 -0
- package/es/actions/dialog-component.js +25 -0
- package/es/actions/dialog-form.d.ts +15 -0
- package/es/actions/dialog-form.js +129 -0
- package/es/actions/dialog-table.d.ts +4 -0
- package/es/actions/dialog-table.js +1 -0
- package/es/actions/dialog.d.ts +17 -0
- package/es/actions/dialog.js +197 -0
- package/es/actions/drawer-form.d.ts +6 -0
- package/es/actions/drawer-form.js +7 -0
- package/es/actions/drawer-table.d.ts +2 -0
- package/es/actions/drawer-table.js +1 -0
- package/es/actions/drawer.d.ts +6 -0
- package/es/actions/drawer.js +7 -0
- package/es/actions/error.d.ts +7 -0
- package/es/actions/error.js +11 -0
- package/es/actions/index.d.ts +76 -0
- package/es/actions/index.js +317 -0
- package/es/actions/index.scss +34 -0
- package/es/actions/link.d.ts +14 -0
- package/es/actions/link.js +45 -0
- package/es/actions/notice.d.ts +7 -0
- package/es/actions/notice.js +11 -0
- package/es/actions/request.d.ts +9 -0
- package/es/actions/request.js +60 -0
- package/es/card/index.d.ts +30 -0
- package/es/card/index.js +159 -0
- package/es/card/index.scss +98 -0
- package/es/field/index.d.ts +3 -0
- package/es/field/index.js +3 -0
- package/es/form/Components/Editable/index.d.ts +20 -0
- package/es/form/Components/Editable/index.js +228 -0
- package/es/form/Components/FormGroup/index.d.ts +13 -0
- package/es/form/Components/FormGroup/index.js +89 -0
- package/es/form/Components/FormGroup/index.scss +23 -0
- package/es/form/Components/ProField/index.d.ts +150 -0
- package/es/form/Components/ProField/index.js +53 -0
- package/es/form/Components/Query/index.d.ts +4 -0
- package/es/form/Components/Query/index.js +70 -0
- package/es/form/Components/Query/index.scss +90 -0
- package/es/form/Components/QueryFilter/index.d.ts +3 -0
- package/es/form/Components/QueryFilter/index.js +111 -0
- package/es/form/Components/Search/index.d.ts +11 -0
- package/es/form/Components/Search/index.js +89 -0
- package/es/form/Filter/index.d.ts +16 -0
- package/es/form/Filter/index.js +218 -0
- package/es/form/ProForm/index.d.ts +5 -0
- package/es/form/ProForm/index.js +100 -0
- package/es/form/ProForm/index.scss +248 -0
- package/es/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/es/form/SchemaForm/adapterComponent.js +17 -0
- package/es/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/es/form/SchemaForm/adapterDecorator.js +28 -0
- package/es/form/SchemaForm/adapterType.d.ts +5 -0
- package/es/form/SchemaForm/adapterType.js +54 -0
- package/es/form/SchemaForm/index.d.ts +4 -0
- package/es/form/SchemaForm/index.js +258 -0
- package/es/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCards.js +69 -0
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCollapse.js +78 -0
- package/es/form/SchemaForm/initializeArrayIcon.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayIcon.js +50 -0
- package/es/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayItems.js +97 -0
- package/es/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayTable.js +66 -0
- package/es/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormButton.js +75 -0
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormCollapse.js +43 -0
- package/es/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormGroup.js +46 -0
- package/es/form/SchemaForm/initializeFormStep.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormStep.js +48 -0
- package/es/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormTab.js +53 -0
- package/es/form/SchemaForm/initializeProField.d.ts +5 -0
- package/es/form/SchemaForm/initializeProField.js +69 -0
- package/es/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/es/form/SchemaForm/initializeRequest.js +25 -0
- package/es/form/SchemaForm/reactions.d.ts +4 -0
- package/es/form/SchemaForm/reactions.js +62 -0
- package/es/form/index.d.ts +20 -0
- package/es/form/index.js +24 -0
- package/es/form/typing.d.ts +78 -0
- package/es/form/typing.js +1 -0
- package/es/form/utils.d.ts +9 -0
- package/es/form/utils.js +108 -0
- package/es/form/warning.d.ts +3 -0
- package/es/form/warning.js +20 -0
- package/es/hooks/index.d.ts +2 -0
- package/es/hooks/index.js +2 -0
- package/es/index.d.ts +24 -23
- package/es/index.js +25 -24
- package/es/info/components/FormItem/index.d.ts +5 -0
- package/es/info/components/FormItem/index.js +63 -0
- package/es/info/components/FormItem/index.scss +49 -0
- package/es/info/components/InfoGroup/index.d.ts +5 -0
- package/es/info/components/InfoGroup/index.js +16 -0
- package/es/info/components/InfoGroup/index.scss +8 -0
- package/es/info/components/InfoValueItem/index.d.ts +5 -0
- package/es/info/components/InfoValueItem/index.js +211 -0
- package/es/info/components/InfoValueItem/index.scss +21 -0
- package/es/info/components/baseInfo/index.d.ts +7 -0
- package/es/info/components/baseInfo/index.js +72 -0
- package/es/info/components/baseInfo/index.scss +3 -0
- package/es/info/components/headerInfo/index.d.ts +7 -0
- package/es/info/components/headerInfo/index.js +84 -0
- package/es/info/components/headerInfo/index.scss +0 -0
- package/es/info/components/tableInfo/index.d.ts +8 -0
- package/es/info/components/tableInfo/index.js +172 -0
- package/es/info/components/tableInfo/index.scss +18 -0
- package/es/info/index.d.ts +9 -0
- package/es/info/index.js +85 -0
- package/es/info/index.scss +8 -0
- package/es/info/typing.d.ts +143 -0
- package/es/info/typing.js +1 -0
- package/es/info/utils/index.d.ts +3 -0
- package/es/info/utils/index.js +12 -0
- package/es/info/utils/layout.d.ts +2 -0
- package/es/info/utils/layout.js +58 -0
- package/es/info/utils/useInfoRequest.d.ts +14 -0
- package/es/info/utils/useInfoRequest.js +73 -0
- package/es/info/utils/utils.d.ts +1 -0
- package/es/info/utils/utils.js +13 -0
- package/es/layout/index.d.ts +3 -0
- package/es/layout/index.js +3 -0
- package/es/nocode/configurators/Card.d.ts +3 -0
- package/es/nocode/configurators/Card.js +109 -0
- package/es/nocode/configurators/PageHeader.d.ts +3 -0
- package/es/nocode/configurators/PageHeader.js +196 -0
- package/es/nocode/configurators/ProTable.d.ts +3 -0
- package/es/nocode/configurators/ProTable.js +317 -0
- package/es/nocode/configurators/common.d.ts +176 -0
- package/es/nocode/configurators/common.js +314 -0
- package/es/nocode/configurators/index.d.ts +15 -0
- package/es/nocode/configurators/index.js +27 -0
- package/es/nocode/configurators/map.d.ts +2 -0
- package/es/nocode/configurators/map.js +8 -0
- package/es/nocode/index.d.ts +8 -0
- package/es/nocode/index.js +11 -0
- package/es/nocode/index.scss +93 -0
- package/es/nocode/pages/editor.d.ts +12 -0
- package/es/nocode/pages/editor.js +40 -0
- package/es/nocode/pages/index.d.ts +14 -0
- package/es/nocode/pages/index.js +41 -0
- package/es/nocode/pages/playground.d.ts +11 -0
- package/es/nocode/pages/playground.js +130 -0
- package/es/nocode/pages/renderer.d.ts +10 -0
- package/es/nocode/pages/renderer.js +144 -0
- package/es/nocode/playground.d.ts +14 -0
- package/es/nocode/playground.js +68 -0
- package/es/page-container/index.d.ts +3 -0
- package/es/page-container/index.js +3 -0
- package/es/page-header/index.d.ts +42 -0
- package/es/page-header/index.js +222 -0
- package/es/page-header/index.scss +171 -0
- package/es/skeleton/index.d.ts +3 -0
- package/es/skeleton/index.js +3 -0
- package/es/table/components/Filter/index.d.ts +9 -0
- package/es/table/components/Filter/index.js +231 -0
- package/es/table/components/Filter/index.scss +23 -0
- package/es/table/components/Layout/index.d.ts +5 -0
- package/es/table/components/Layout/index.js +241 -0
- package/es/table/components/Layout/index.scss +39 -0
- package/es/table/components/QuickAction/index.d.ts +10 -0
- package/es/table/components/QuickAction/index.js +53 -0
- package/es/table/components/QuickAction/index.scss +0 -0
- package/es/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/es/table/components/ToolBar/DensityIcon.js +117 -0
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FilterColumnIcon.js +284 -0
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +89 -0
- package/es/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/es/table/components/ToolBar/Fullscreen.js +68 -0
- package/es/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/es/table/components/ToolBar/RefreshIcon.js +45 -0
- package/es/table/components/ToolBar/index.d.ts +5 -0
- package/es/table/components/ToolBar/index.js +79 -0
- package/es/table/components/ToolBar/index.scss +110 -0
- package/es/table/index.d.ts +7 -0
- package/es/table/index.js +620 -0
- package/es/table/index.scss +104 -0
- package/es/table/typing.d.ts +222 -0
- package/es/table/typing.js +1 -0
- package/es/table/utils/columnRender.d.ts +13 -0
- package/es/table/utils/columnRender.js +185 -0
- package/es/table/utils/genProColumnToColumn.d.ts +9 -0
- package/es/table/utils/genProColumnToColumn.js +51 -0
- package/es/table/utils/getTableProps.d.ts +2 -0
- package/es/table/utils/getTableProps.js +4 -0
- package/es/table/utils/getTableSortIcons.d.ts +3 -0
- package/es/table/utils/getTableSortIcons.js +21 -0
- package/es/table/utils/index.d.ts +4 -0
- package/es/table/utils/index.js +100 -0
- package/es/table/utils/useTableSelection.d.ts +3 -0
- package/es/table/utils/useTableSelection.js +107 -0
- package/es/templates/Detail/index.d.ts +2 -0
- package/es/templates/Detail/index.js +5 -0
- package/es/templates/Detail/index.scss +3 -0
- package/es/templates/Form/index.d.ts +2 -0
- package/es/templates/Form/index.js +5 -0
- package/es/templates/Form/index.scss +3 -0
- package/es/templates/List/index.d.ts +9 -0
- package/es/templates/List/index.js +45 -0
- package/es/templates/List/index.scss +3 -0
- package/es/templates/index.d.ts +5 -0
- package/es/templates/index.js +7 -0
- package/es/templates/index.scss +3 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.js +2 -0
- package/lib/actions/base.d.ts +13 -0
- package/lib/actions/base.js +33 -0
- package/lib/actions/confirm.d.ts +7 -0
- package/lib/actions/confirm.js +25 -0
- package/lib/actions/danger-confirm.d.ts +7 -0
- package/lib/actions/danger-confirm.js +28 -0
- package/lib/actions/dialog-component.d.ts +10 -0
- package/lib/actions/dialog-component.js +39 -0
- package/lib/actions/dialog-form.d.ts +15 -0
- package/lib/actions/dialog-form.js +152 -0
- package/lib/actions/dialog-table.d.ts +4 -0
- package/lib/actions/dialog-table.js +5 -0
- package/lib/actions/dialog.d.ts +17 -0
- package/lib/actions/dialog.js +219 -0
- package/lib/actions/drawer-form.d.ts +6 -0
- package/lib/actions/drawer-form.js +18 -0
- package/lib/actions/drawer-table.d.ts +2 -0
- package/lib/actions/drawer-table.js +5 -0
- package/lib/actions/drawer.d.ts +6 -0
- package/lib/actions/drawer.js +20 -0
- package/lib/actions/error.d.ts +7 -0
- package/lib/actions/error.js +25 -0
- package/lib/actions/index.d.ts +76 -0
- package/lib/actions/index.js +356 -0
- package/lib/actions/index.scss +34 -0
- package/lib/actions/link.d.ts +14 -0
- package/lib/actions/link.js +60 -0
- package/lib/actions/notice.d.ts +7 -0
- package/lib/actions/notice.js +25 -0
- package/lib/actions/request.d.ts +9 -0
- package/lib/actions/request.js +75 -0
- package/lib/card/index.d.ts +30 -0
- package/lib/card/index.js +179 -0
- package/lib/card/index.scss +98 -0
- package/lib/field/index.d.ts +3 -0
- package/lib/field/index.js +30 -0
- package/lib/form/Components/Editable/index.d.ts +20 -0
- package/lib/form/Components/Editable/index.js +251 -0
- package/lib/form/Components/FormGroup/index.d.ts +13 -0
- package/lib/form/Components/FormGroup/index.js +103 -0
- package/lib/form/Components/FormGroup/index.scss +23 -0
- package/lib/form/Components/ProField/index.d.ts +150 -0
- package/lib/form/Components/ProField/index.js +68 -0
- package/lib/form/Components/Query/index.d.ts +4 -0
- package/lib/form/Components/Query/index.js +91 -0
- package/lib/form/Components/Query/index.scss +90 -0
- package/lib/form/Components/QueryFilter/index.d.ts +3 -0
- package/lib/form/Components/QueryFilter/index.js +130 -0
- package/lib/form/Components/Search/index.d.ts +11 -0
- package/lib/form/Components/Search/index.js +103 -0
- package/lib/form/Filter/index.d.ts +16 -0
- package/lib/form/Filter/index.js +242 -0
- package/lib/form/ProForm/index.d.ts +5 -0
- package/lib/form/ProForm/index.js +125 -0
- package/lib/form/ProForm/index.scss +248 -0
- package/lib/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/lib/form/SchemaForm/adapterComponent.js +27 -0
- package/lib/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/lib/form/SchemaForm/adapterDecorator.js +34 -0
- package/lib/form/SchemaForm/adapterType.d.ts +5 -0
- package/lib/form/SchemaForm/adapterType.js +64 -0
- package/lib/form/SchemaForm/index.d.ts +4 -0
- package/lib/form/SchemaForm/index.js +301 -0
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCards.js +76 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.js +85 -0
- package/lib/form/SchemaForm/initializeArrayIcon.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayIcon.js +61 -0
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayItems.js +104 -0
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayTable.js +73 -0
- package/lib/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormButton.js +82 -0
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormCollapse.js +50 -0
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormGroup.js +53 -0
- package/lib/form/SchemaForm/initializeFormStep.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormStep.js +55 -0
- package/lib/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormTab.js +60 -0
- package/lib/form/SchemaForm/initializeProField.d.ts +5 -0
- package/lib/form/SchemaForm/initializeProField.js +76 -0
- package/lib/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/lib/form/SchemaForm/initializeRequest.js +34 -0
- package/lib/form/SchemaForm/reactions.d.ts +4 -0
- package/lib/form/SchemaForm/reactions.js +72 -0
- package/lib/form/index.d.ts +20 -0
- package/lib/form/index.js +149 -0
- package/lib/form/typing.d.ts +78 -0
- package/lib/form/typing.js +5 -0
- package/lib/form/utils.d.ts +9 -0
- package/lib/form/utils.js +124 -0
- package/lib/form/warning.d.ts +3 -0
- package/lib/form/warning.js +28 -0
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.js +17 -0
- package/lib/index.d.ts +24 -23
- package/lib/index.js +79 -61
- package/lib/info/components/FormItem/index.d.ts +5 -0
- package/lib/info/components/FormItem/index.js +78 -0
- package/lib/info/components/FormItem/index.scss +49 -0
- package/lib/info/components/InfoGroup/index.d.ts +5 -0
- package/lib/info/components/InfoGroup/index.js +27 -0
- package/lib/info/components/InfoGroup/index.scss +8 -0
- package/lib/info/components/InfoValueItem/index.d.ts +5 -0
- package/lib/info/components/InfoValueItem/index.js +237 -0
- package/lib/info/components/InfoValueItem/index.scss +21 -0
- package/lib/info/components/baseInfo/index.d.ts +7 -0
- package/lib/info/components/baseInfo/index.js +99 -0
- package/lib/info/components/baseInfo/index.scss +3 -0
- package/lib/info/components/headerInfo/index.d.ts +7 -0
- package/lib/info/components/headerInfo/index.js +111 -0
- package/lib/info/components/headerInfo/index.scss +0 -0
- package/lib/info/components/tableInfo/index.d.ts +8 -0
- package/lib/info/components/tableInfo/index.js +193 -0
- package/lib/info/components/tableInfo/index.scss +18 -0
- package/lib/info/index.d.ts +9 -0
- package/lib/info/index.js +121 -0
- package/lib/info/index.scss +8 -0
- package/lib/info/typing.d.ts +143 -0
- package/lib/info/typing.js +5 -0
- package/lib/info/utils/index.d.ts +3 -0
- package/lib/info/utils/index.js +19 -0
- package/lib/info/utils/layout.d.ts +2 -0
- package/lib/info/utils/layout.js +65 -0
- package/lib/info/utils/useInfoRequest.d.ts +14 -0
- package/lib/info/utils/useInfoRequest.js +82 -0
- package/lib/info/utils/utils.d.ts +1 -0
- package/lib/info/utils/utils.js +20 -0
- package/lib/layout/index.d.ts +3 -0
- package/lib/layout/index.js +30 -0
- package/lib/nocode/configurators/Card.d.ts +3 -0
- package/lib/nocode/configurators/Card.js +116 -0
- package/lib/nocode/configurators/PageHeader.d.ts +3 -0
- package/lib/nocode/configurators/PageHeader.js +205 -0
- package/lib/nocode/configurators/ProTable.d.ts +3 -0
- package/lib/nocode/configurators/ProTable.js +326 -0
- package/lib/nocode/configurators/common.d.ts +176 -0
- package/lib/nocode/configurators/common.js +325 -0
- package/lib/nocode/configurators/index.d.ts +15 -0
- package/lib/nocode/configurators/index.js +44 -0
- package/lib/nocode/configurators/map.d.ts +2 -0
- package/lib/nocode/configurators/map.js +21 -0
- package/lib/nocode/index.d.ts +8 -0
- package/lib/nocode/index.js +76 -0
- package/lib/nocode/index.scss +93 -0
- package/lib/nocode/pages/editor.d.ts +12 -0
- package/lib/nocode/pages/editor.js +58 -0
- package/lib/nocode/pages/index.d.ts +14 -0
- package/lib/nocode/pages/index.js +93 -0
- package/lib/nocode/pages/playground.d.ts +11 -0
- package/lib/nocode/pages/playground.js +158 -0
- package/lib/nocode/pages/renderer.d.ts +10 -0
- package/lib/nocode/pages/renderer.js +164 -0
- package/lib/nocode/playground.d.ts +14 -0
- package/lib/nocode/playground.js +91 -0
- package/lib/page-container/index.d.ts +3 -0
- package/lib/page-container/index.js +30 -0
- package/lib/page-header/index.d.ts +42 -0
- package/lib/page-header/index.js +240 -0
- package/lib/page-header/index.scss +171 -0
- package/lib/skeleton/index.d.ts +3 -0
- package/lib/skeleton/index.js +30 -0
- package/lib/table/components/Filter/index.d.ts +9 -0
- package/lib/table/components/Filter/index.js +252 -0
- package/lib/table/components/Filter/index.scss +23 -0
- package/lib/table/components/Layout/index.d.ts +5 -0
- package/lib/table/components/Layout/index.js +265 -0
- package/lib/table/components/Layout/index.scss +39 -0
- package/lib/table/components/QuickAction/index.d.ts +10 -0
- package/lib/table/components/QuickAction/index.js +65 -0
- package/lib/table/components/QuickAction/index.scss +0 -0
- package/lib/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/DensityIcon.js +135 -0
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FilterColumnIcon.js +303 -0
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +107 -0
- package/lib/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/lib/table/components/ToolBar/Fullscreen.js +85 -0
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/RefreshIcon.js +60 -0
- package/lib/table/components/ToolBar/index.d.ts +5 -0
- package/lib/table/components/ToolBar/index.js +96 -0
- package/lib/table/components/ToolBar/index.scss +110 -0
- package/lib/table/index.d.ts +7 -0
- package/lib/table/index.js +681 -0
- package/lib/table/index.scss +104 -0
- package/lib/table/typing.d.ts +222 -0
- package/lib/table/typing.js +5 -0
- package/lib/table/utils/columnRender.d.ts +13 -0
- package/lib/table/utils/columnRender.js +201 -0
- package/lib/table/utils/genProColumnToColumn.d.ts +9 -0
- package/lib/table/utils/genProColumnToColumn.js +62 -0
- package/lib/table/utils/getTableProps.d.ts +2 -0
- package/lib/table/utils/getTableProps.js +13 -0
- package/lib/table/utils/getTableSortIcons.d.ts +3 -0
- package/lib/table/utils/getTableSortIcons.js +34 -0
- package/lib/table/utils/index.d.ts +4 -0
- package/lib/table/utils/index.js +112 -0
- package/lib/table/utils/useTableSelection.d.ts +3 -0
- package/lib/table/utils/useTableSelection.js +112 -0
- package/lib/templates/Detail/index.d.ts +2 -0
- package/lib/templates/Detail/index.js +18 -0
- package/lib/templates/Detail/index.scss +3 -0
- package/lib/templates/Form/index.d.ts +2 -0
- package/lib/templates/Form/index.js +18 -0
- package/lib/templates/Form/index.scss +3 -0
- package/lib/templates/List/index.d.ts +9 -0
- package/lib/templates/List/index.js +67 -0
- package/lib/templates/List/index.scss +3 -0
- package/lib/templates/index.d.ts +5 -0
- package/lib/templates/index.js +59 -0
- package/lib/templates/index.scss +3 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +17 -0
- package/package.json +21 -11
@@ -0,0 +1,65 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _components = require("@alicloudfe/components");
|
11
|
+
|
12
|
+
var _actions = _interopRequireDefault(require("../../../actions"));
|
13
|
+
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
|
+
|
16
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
17
|
+
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
19
|
+
|
20
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
21
|
+
|
22
|
+
function _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); }
|
23
|
+
|
24
|
+
var QuickAction = function QuickAction(props) {
|
25
|
+
var quickAction = props.quickAction,
|
26
|
+
actionRef = props.actionRef,
|
27
|
+
rowSelection = props.rowSelection; // 如果传对象的话,默认为主要文字类型的 ActionButton
|
28
|
+
|
29
|
+
if (_typeof(quickAction) === 'object') {
|
30
|
+
// 默认 context
|
31
|
+
var defaultContext = {
|
32
|
+
action: actionRef.current,
|
33
|
+
rowSelection: rowSelection
|
34
|
+
};
|
35
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
36
|
+
className: "teamix-pro-table-layout-quick-action"
|
37
|
+
}, /*#__PURE__*/_react.default.createElement(_actions.default, _objectSpread(_objectSpread({
|
38
|
+
type: "primary",
|
39
|
+
text: true
|
40
|
+
}, quickAction), {}, {
|
41
|
+
context: _objectSpread(_objectSpread({}, defaultContext), quickAction.context)
|
42
|
+
})));
|
43
|
+
}
|
44
|
+
|
45
|
+
if (Array.isArray(quickAction)) {
|
46
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
47
|
+
className: "teamix-pro-table-layout-quick-action"
|
48
|
+
}, /*#__PURE__*/_react.default.createElement(_components.Box, {
|
49
|
+
direction: "row",
|
50
|
+
spacing: 8,
|
51
|
+
align: "center"
|
52
|
+
}, quickAction.map(function (item, index) {
|
53
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
54
|
+
key: index
|
55
|
+
}, item);
|
56
|
+
})));
|
57
|
+
}
|
58
|
+
|
59
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
60
|
+
className: "teamix-pro-table-layout-quick-action"
|
61
|
+
}, quickAction);
|
62
|
+
};
|
63
|
+
|
64
|
+
var _default = QuickAction;
|
65
|
+
exports.default = _default;
|
File without changes
|
@@ -0,0 +1,135 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _components = require("@alicloudfe/components");
|
11
|
+
|
12
|
+
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
13
|
+
|
14
|
+
var _utils = require("@teamix/utils");
|
15
|
+
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
17
|
+
|
18
|
+
require("./index.scss");
|
19
|
+
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
21
|
+
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
23
|
+
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
|
+
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
27
|
+
|
28
|
+
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."); }
|
29
|
+
|
30
|
+
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); }
|
31
|
+
|
32
|
+
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; }
|
33
|
+
|
34
|
+
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; }
|
35
|
+
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
37
|
+
|
38
|
+
var RadioItem = _components.Menu.RadioItem;
|
39
|
+
var cls = (0, _utils.baseClass)('teamix-pro-table-toolbar-icon');
|
40
|
+
|
41
|
+
var DensityIcon = function DensityIcon(props) {
|
42
|
+
var actionRef = props.actionRef;
|
43
|
+
|
44
|
+
var _useState = (0, _react.useState)('medium'),
|
45
|
+
_useState2 = _slicedToArray(_useState, 2),
|
46
|
+
size = _useState2[0],
|
47
|
+
setSize = _useState2[1]; // const [fullscreen, setFullscreen] = useState<boolean>(false);
|
48
|
+
// tooltip 开关
|
49
|
+
|
50
|
+
|
51
|
+
var _useState3 = (0, _react.useState)(false),
|
52
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
53
|
+
tooltipVisible = _useState4[0],
|
54
|
+
setTooltipVisible = _useState4[1]; // dropdown 开关
|
55
|
+
|
56
|
+
|
57
|
+
var _useState5 = (0, _react.useState)(false),
|
58
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
59
|
+
dropdownVisible = _useState6[0],
|
60
|
+
setDropdownVisible = _useState6[1]; // 设置大小
|
61
|
+
|
62
|
+
|
63
|
+
var radioOnchange = function radioOnchange(mode) {
|
64
|
+
var _actionRef$current, _actionRef$current$se;
|
65
|
+
|
66
|
+
setSize(mode);
|
67
|
+
(_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);
|
68
|
+
}; // // 销毁监听函数
|
69
|
+
// useEffect(() => {
|
70
|
+
// return () => {
|
71
|
+
// actionRef.current?.off?.('densityIcon');
|
72
|
+
// };
|
73
|
+
// }, []);
|
74
|
+
// // 监听全屏变化
|
75
|
+
// actionRef.current?.on?.(
|
76
|
+
// (state: boolean) => {
|
77
|
+
// setFullscreen(state);
|
78
|
+
// },
|
79
|
+
// 'fullScreenState',
|
80
|
+
// 'densityIcon',
|
81
|
+
// );
|
82
|
+
|
83
|
+
|
84
|
+
var renderDropdown = function renderDropdown() {
|
85
|
+
return /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_components.Dropdown // safeNode={() => sizeMenuRef.current || document}
|
86
|
+
, {
|
87
|
+
// safeNode={() => sizeMenuRef.current || document}
|
88
|
+
trigger: /*#__PURE__*/_react.default.createElement(_components.Button, {
|
89
|
+
iconSize: "small",
|
90
|
+
className: cls()
|
91
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
92
|
+
size: "small",
|
93
|
+
type: "space-line"
|
94
|
+
})),
|
95
|
+
visible: dropdownVisible,
|
96
|
+
onVisibleChange: function onVisibleChange(state) {
|
97
|
+
setTooltipVisible(false);
|
98
|
+
setDropdownVisible(state);
|
99
|
+
},
|
100
|
+
triggerType: ['click'],
|
101
|
+
// key={index}
|
102
|
+
align: "tr br"
|
103
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_components.Menu, null, /*#__PURE__*/_react.default.createElement(RadioItem, {
|
104
|
+
key: "medium",
|
105
|
+
checked: size === 'medium',
|
106
|
+
onChange: function onChange(checked) {
|
107
|
+
return radioOnchange('medium');
|
108
|
+
}
|
109
|
+
}, (0, _utils.getMessage)('default')), /*#__PURE__*/_react.default.createElement(RadioItem, {
|
110
|
+
key: "small",
|
111
|
+
checked: size === 'small',
|
112
|
+
onChange: function onChange(checked) {
|
113
|
+
return radioOnchange('small');
|
114
|
+
}
|
115
|
+
}, (0, _utils.getMessage)('compact'))))));
|
116
|
+
};
|
117
|
+
|
118
|
+
return renderDropdown(); // <Balloon.Tooltip
|
119
|
+
// trigger={renderDropdown()}
|
120
|
+
// align={fullscreen ? 'b' : 't'}
|
121
|
+
// popupProps={{
|
122
|
+
// offset: fullscreen ? [5, 20] : [5, -18],
|
123
|
+
// animation: { in: 'fadeIn', out: 'fadeOut' },
|
124
|
+
// visible: tooltipVisible && !dropdownVisible,
|
125
|
+
// onVisibleChange: (state) => {
|
126
|
+
// setTooltipVisible(state);
|
127
|
+
// },
|
128
|
+
// }}
|
129
|
+
// >
|
130
|
+
// {getMessage('density')}
|
131
|
+
// </Balloon.Tooltip>
|
132
|
+
};
|
133
|
+
|
134
|
+
var _default = DensityIcon;
|
135
|
+
exports.default = _default;
|
@@ -0,0 +1,303 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _components = require("@alicloudfe/components");
|
11
|
+
|
12
|
+
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
13
|
+
|
14
|
+
var _utils = require("@teamix/utils");
|
15
|
+
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
17
|
+
|
18
|
+
var _utils2 = require("../../utils");
|
19
|
+
|
20
|
+
require("./index.scss");
|
21
|
+
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
23
|
+
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
25
|
+
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
27
|
+
|
28
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
29
|
+
|
30
|
+
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."); }
|
31
|
+
|
32
|
+
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); }
|
33
|
+
|
34
|
+
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; }
|
35
|
+
|
36
|
+
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; }
|
37
|
+
|
38
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
39
|
+
|
40
|
+
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; }
|
41
|
+
|
42
|
+
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; }
|
43
|
+
|
44
|
+
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; }
|
45
|
+
|
46
|
+
var CheckboxItem = _components.Menu.CheckboxItem; // const { Tooltip } = Balloon;
|
47
|
+
|
48
|
+
var cls = (0, _utils.baseClass)('teamix-pro-table-toolbar-filter-column');
|
49
|
+
|
50
|
+
var processColumns = function processColumns(columns) {
|
51
|
+
return columns.map(function (item) {
|
52
|
+
if (item.columnFilters === false) {
|
53
|
+
return item;
|
54
|
+
}
|
55
|
+
|
56
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
57
|
+
columnFilters: true
|
58
|
+
});
|
59
|
+
});
|
60
|
+
};
|
61
|
+
|
62
|
+
var FilterColumnIcon = function FilterColumnIcon(props) {
|
63
|
+
var _props$columns = props.columns,
|
64
|
+
columns = _props$columns === void 0 ? [] : _props$columns,
|
65
|
+
actionRef = props.actionRef;
|
66
|
+
|
67
|
+
var _useState = (0, _react.useState)(true),
|
68
|
+
_useState2 = _slicedToArray(_useState, 2),
|
69
|
+
allVisible = _useState2[0],
|
70
|
+
setAllVisible = _useState2[1];
|
71
|
+
|
72
|
+
var _useState3 = (0, _react.useState)(false),
|
73
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
74
|
+
indeterminate = _useState4[0],
|
75
|
+
setIndeterminate = _useState4[1];
|
76
|
+
|
77
|
+
var _useState5 = (0, _react.useState)(processColumns(columns)),
|
78
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
79
|
+
newColumns = _useState6[0],
|
80
|
+
setNewColumns = _useState6[1]; // const [fullscreen, setFullscreen] = useState<boolean>(false);
|
81
|
+
// tooltip 开关
|
82
|
+
|
83
|
+
|
84
|
+
var _useState7 = (0, _react.useState)(false),
|
85
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
86
|
+
tooltipVisible = _useState8[0],
|
87
|
+
setTooltipVisible = _useState8[1]; // dropdown 开关
|
88
|
+
|
89
|
+
|
90
|
+
var _useState9 = (0, _react.useState)(false),
|
91
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
92
|
+
dropdownVisible = _useState10[0],
|
93
|
+
setDropdownVisible = _useState10[1];
|
94
|
+
|
95
|
+
(0, _react.useEffect)(function () {
|
96
|
+
setNewColumns(processColumns(columns));
|
97
|
+
}, [columns]); // useEffect(() => {
|
98
|
+
// console.log("这个函数被触发");
|
99
|
+
// setTimeout(() => {
|
100
|
+
// setFullscreen(actionRef?.current?.getState?.().fullScreenState ?? false);
|
101
|
+
// }, 0)
|
102
|
+
// }, [])
|
103
|
+
// // 销毁监听函数
|
104
|
+
// useEffect(() => {
|
105
|
+
// return () => {
|
106
|
+
// actionRef.current?.off?.('filterColumnIcon');
|
107
|
+
// };
|
108
|
+
// }, []);
|
109
|
+
// // 监听全屏变化
|
110
|
+
// actionRef.current?.on?.(
|
111
|
+
// (state: boolean) => {
|
112
|
+
// setFullscreen(state);
|
113
|
+
// },
|
114
|
+
// 'fullScreenState',
|
115
|
+
// 'filterColumnIcon',
|
116
|
+
// );
|
117
|
+
// 全选
|
118
|
+
|
119
|
+
var onChangeAllColumns = function onChangeAllColumns(check) {
|
120
|
+
setAllVisible(check);
|
121
|
+
var keyNewColumns = (0, _utils2.cloneDeep)(newColumns);
|
122
|
+
keyNewColumns.map(function (item) {
|
123
|
+
item.columnFilters = check;
|
124
|
+
return item;
|
125
|
+
});
|
126
|
+
notifyTableRender(keyNewColumns);
|
127
|
+
}; // 重置
|
128
|
+
|
129
|
+
|
130
|
+
var restColumns = function restColumns(e) {
|
131
|
+
e.stopPropagation();
|
132
|
+
var keyNewColumns = processColumns(columns);
|
133
|
+
notifyTableRender(keyNewColumns);
|
134
|
+
}; // 修改
|
135
|
+
|
136
|
+
|
137
|
+
var onChangeColumns = function onChangeColumns(check, dataIndex) {
|
138
|
+
var keyNewColumns = (0, _utils2.cloneDeep)(newColumns);
|
139
|
+
keyNewColumns.map(function (item) {
|
140
|
+
if (item.dataIndex === dataIndex) {
|
141
|
+
item.columnFilters = check;
|
142
|
+
}
|
143
|
+
|
144
|
+
return item;
|
145
|
+
});
|
146
|
+
notifyTableRender(keyNewColumns);
|
147
|
+
}; // 向上
|
148
|
+
|
149
|
+
|
150
|
+
var moveUp = function moveUp(e, dataIndex) {
|
151
|
+
e.stopPropagation();
|
152
|
+
var keyNewColumns = (0, _utils2.cloneDeep)(newColumns);
|
153
|
+
var index = keyNewColumns.findIndex(function (_ref) {
|
154
|
+
var index = _ref.dataIndex;
|
155
|
+
return index === dataIndex;
|
156
|
+
});
|
157
|
+
|
158
|
+
if (index != 0) {
|
159
|
+
keyNewColumns[index] = keyNewColumns.splice(index - 1, 1, keyNewColumns[index])[0];
|
160
|
+
} else {
|
161
|
+
keyNewColumns.push(keyNewColumns.shift());
|
162
|
+
}
|
163
|
+
|
164
|
+
notifyTableRender(keyNewColumns);
|
165
|
+
}; // 向下
|
166
|
+
|
167
|
+
|
168
|
+
var moveDown = function moveDown(e, dataIndex) {
|
169
|
+
e.stopPropagation();
|
170
|
+
var keyNewColumns = (0, _utils2.cloneDeep)(newColumns);
|
171
|
+
var index = keyNewColumns.findIndex(function (_ref2) {
|
172
|
+
var index = _ref2.dataIndex;
|
173
|
+
return index === dataIndex;
|
174
|
+
});
|
175
|
+
|
176
|
+
if (index != keyNewColumns.length - 1) {
|
177
|
+
keyNewColumns[index] = keyNewColumns.splice(index + 1, 1, keyNewColumns[index])[0];
|
178
|
+
} else {
|
179
|
+
keyNewColumns.unshift(keyNewColumns.splice(index, 1)[0]);
|
180
|
+
}
|
181
|
+
|
182
|
+
notifyTableRender(keyNewColumns);
|
183
|
+
}; // 通知表格渲染
|
184
|
+
|
185
|
+
|
186
|
+
var notifyTableRender = function notifyTableRender(columns) {
|
187
|
+
var _actionRef$current, _actionRef$current$se;
|
188
|
+
|
189
|
+
calculateSelectAllState(columns);
|
190
|
+
setNewColumns(columns);
|
191
|
+
(_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);
|
192
|
+
}; // 计算全选状态
|
193
|
+
|
194
|
+
|
195
|
+
var calculateSelectAllState = function calculateSelectAllState(columns) {
|
196
|
+
var flag = columns.reduce(function (acc, cur) {
|
197
|
+
if (cur.columnFilters === true) {
|
198
|
+
acc++;
|
199
|
+
}
|
200
|
+
|
201
|
+
return acc;
|
202
|
+
}, 0);
|
203
|
+
|
204
|
+
if (flag === columns.length) {
|
205
|
+
setAllVisible(true);
|
206
|
+
setIndeterminate(false);
|
207
|
+
return;
|
208
|
+
}
|
209
|
+
|
210
|
+
if (flag === 0) {
|
211
|
+
setAllVisible(false);
|
212
|
+
setIndeterminate(false);
|
213
|
+
return;
|
214
|
+
}
|
215
|
+
|
216
|
+
setIndeterminate(true);
|
217
|
+
};
|
218
|
+
|
219
|
+
var renderDropdown = function renderDropdown() {
|
220
|
+
return /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_components.Dropdown, {
|
221
|
+
trigger: /*#__PURE__*/_react.default.createElement(_components.Button, {
|
222
|
+
iconSize: "small",
|
223
|
+
className: "teamix-pro-table-toolbar-icon"
|
224
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
225
|
+
size: "small",
|
226
|
+
type: "set-line"
|
227
|
+
})),
|
228
|
+
visible: dropdownVisible,
|
229
|
+
onVisibleChange: function onVisibleChange(state) {
|
230
|
+
setTooltipVisible(false);
|
231
|
+
setDropdownVisible(state);
|
232
|
+
},
|
233
|
+
triggerType: ['click'],
|
234
|
+
align: "tr br"
|
235
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
236
|
+
className: cls()
|
237
|
+
}, /*#__PURE__*/_react.default.createElement(_components.Menu, null, /*#__PURE__*/_react.default.createElement(CheckboxItem, {
|
238
|
+
indeterminate: indeterminate,
|
239
|
+
checked: allVisible,
|
240
|
+
onChange: onChangeAllColumns
|
241
|
+
}, (0, _utils.getMessage)('selectAll'), /*#__PURE__*/_react.default.createElement(_components.Button, {
|
242
|
+
onClick: restColumns,
|
243
|
+
className: cls({
|
244
|
+
reset: true
|
245
|
+
}),
|
246
|
+
text: true,
|
247
|
+
type: "primary"
|
248
|
+
}, (0, _utils.getMessage)('reset'))), /*#__PURE__*/_react.default.createElement(_components.Menu.Divider, {
|
249
|
+
key: "divider"
|
250
|
+
}), newColumns.map(function (_ref3, index) {
|
251
|
+
var _newColumns$find;
|
252
|
+
|
253
|
+
var dataIndex = _ref3.dataIndex,
|
254
|
+
title = _ref3.title,
|
255
|
+
columnFiltersDisabled = _ref3.columnFiltersDisabled;
|
256
|
+
return /*#__PURE__*/_react.default.createElement(CheckboxItem, {
|
257
|
+
key: index,
|
258
|
+
checked: (_newColumns$find = newColumns.find(function (_ref4) {
|
259
|
+
var key = _ref4.dataIndex;
|
260
|
+
return key === dataIndex;
|
261
|
+
})) === null || _newColumns$find === void 0 ? void 0 : _newColumns$find.columnFilters,
|
262
|
+
onChange: function onChange(check) {
|
263
|
+
return onChangeColumns(check, dataIndex);
|
264
|
+
},
|
265
|
+
disabled: columnFiltersDisabled
|
266
|
+
}, title, /*#__PURE__*/_react.default.createElement("div", {
|
267
|
+
className: cls({
|
268
|
+
sort: true
|
269
|
+
})
|
270
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
271
|
+
size: "small",
|
272
|
+
type: "arrow-down-line",
|
273
|
+
onClick: function onClick(e) {
|
274
|
+
return moveDown(e, dataIndex);
|
275
|
+
}
|
276
|
+
}), /*#__PURE__*/_react.default.createElement(_icon.default, {
|
277
|
+
size: "small",
|
278
|
+
type: "arrow-up-line",
|
279
|
+
onClick: function onClick(e) {
|
280
|
+
return moveUp(e, dataIndex);
|
281
|
+
}
|
282
|
+
})));
|
283
|
+
})))));
|
284
|
+
};
|
285
|
+
|
286
|
+
return renderDropdown(); // <Tooltip
|
287
|
+
// trigger={renderDropdown()}
|
288
|
+
// align={fullscreen ? 'b' : 't'}
|
289
|
+
// popupProps={{
|
290
|
+
// offset: fullscreen ? [5, 20] : [5, -18],
|
291
|
+
// animation: { in: 'fadeIn', out: 'fadeOut' },
|
292
|
+
// visible: tooltipVisible && !dropdownVisible,
|
293
|
+
// onVisibleChange: (state) => {
|
294
|
+
// setTooltipVisible(state);
|
295
|
+
// },
|
296
|
+
// }}
|
297
|
+
// >
|
298
|
+
// {getMessage('customColumnSetting')}
|
299
|
+
// </Tooltip>
|
300
|
+
};
|
301
|
+
|
302
|
+
var _default = FilterColumnIcon;
|
303
|
+
exports.default = _default;
|
@@ -0,0 +1,107 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _components = require("@alicloudfe/components");
|
11
|
+
|
12
|
+
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
13
|
+
|
14
|
+
var _utils = require("@teamix/utils");
|
15
|
+
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
17
|
+
|
18
|
+
require("./index.scss");
|
19
|
+
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
21
|
+
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
23
|
+
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
|
+
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
27
|
+
|
28
|
+
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."); }
|
29
|
+
|
30
|
+
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); }
|
31
|
+
|
32
|
+
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; }
|
33
|
+
|
34
|
+
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; }
|
35
|
+
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
37
|
+
|
38
|
+
var cls = (0, _utils.baseClass)('teamix-pro-table-toolbar-icon');
|
39
|
+
|
40
|
+
var FullScreenIcon = function FullScreenIcon(props) {
|
41
|
+
var _actionRef$current3, _actionRef$current3$o;
|
42
|
+
|
43
|
+
var actionRef = props.actionRef;
|
44
|
+
|
45
|
+
var _useState = (0, _react.useState)(false),
|
46
|
+
_useState2 = _slicedToArray(_useState, 2),
|
47
|
+
visible = _useState2[0],
|
48
|
+
setVisible = _useState2[1];
|
49
|
+
|
50
|
+
var _useState3 = (0, _react.useState)(false),
|
51
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
52
|
+
fullscreen = _useState4[0],
|
53
|
+
setFullscreen = _useState4[1]; // 点击全屏
|
54
|
+
|
55
|
+
|
56
|
+
var allScreenHandle = function allScreenHandle() {
|
57
|
+
setVisible(false);
|
58
|
+
setTimeout(function () {
|
59
|
+
var _actionRef$current, _actionRef$current$fu;
|
60
|
+
|
61
|
+
(_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);
|
62
|
+
}, 0);
|
63
|
+
}; // 销毁监听函数
|
64
|
+
|
65
|
+
|
66
|
+
(0, _react.useEffect)(function () {
|
67
|
+
return function () {
|
68
|
+
var _actionRef$current2, _actionRef$current2$o;
|
69
|
+
|
70
|
+
(_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');
|
71
|
+
};
|
72
|
+
}, []); // 监听全屏变化
|
73
|
+
|
74
|
+
(_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) {
|
75
|
+
setFullscreen(state);
|
76
|
+
}, 'fullScreenState', 'fullscreenIcon');
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_components.Button, {
|
78
|
+
iconSize: "small",
|
79
|
+
className: cls(),
|
80
|
+
onClick: allScreenHandle
|
81
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
82
|
+
size: "small",
|
83
|
+
type: fullscreen ? 'close-line' : 'full-screen-line'
|
84
|
+
})) // <Balloon.Tooltip
|
85
|
+
// trigger={
|
86
|
+
// <Button iconSize="small" className={cls()} onClick={allScreenHandle}>
|
87
|
+
// <TeamixIcon
|
88
|
+
// size="small"
|
89
|
+
// type={fullscreen ? 'close-line' : 'full-screen-line'}
|
90
|
+
// />
|
91
|
+
// </Button>
|
92
|
+
// }
|
93
|
+
// align={fullscreen ? 'b' : 't'}
|
94
|
+
// popupProps={{
|
95
|
+
// visible: visible,
|
96
|
+
// onVisibleChange: (state) => {
|
97
|
+
// setVisible(state);
|
98
|
+
// },
|
99
|
+
// }}
|
100
|
+
// >
|
101
|
+
// {getMessage('fullScreen')}
|
102
|
+
// </Balloon.Tooltip>
|
103
|
+
;
|
104
|
+
};
|
105
|
+
|
106
|
+
var _default = FullScreenIcon;
|
107
|
+
exports.default = _default;
|
@@ -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;
|