@teamix/pro 1.6.0-beta.4 → 1.6.0-beta.6
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/pro.all.min.css +1 -0
- package/dist/pro.css +1 -1
- package/dist/pro.js +70007 -54355
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +9 -0
- package/dist/pro.xconsole.min.css +1 -0
- package/es/actions/base.d.ts +24 -0
- package/es/actions/base.js +1 -1
- package/es/actions/confirm.d.ts +7 -0
- package/es/actions/danger-confirm.d.ts +7 -0
- package/es/actions/danger-pop-confirm.d.ts +5 -0
- package/es/actions/dialog-component.d.ts +10 -0
- package/es/actions/dialog-component.js +4 -1
- package/es/actions/dialog-form.d.ts +29 -0
- package/es/actions/dialog-form.js +8 -8
- package/es/actions/dialog-info.d.ts +9 -0
- package/es/actions/dialog-table.d.ts +9 -0
- package/es/actions/dialog.d.ts +40 -0
- package/es/actions/dialog.js +8 -7
- package/es/actions/drawer-form.d.ts +6 -0
- package/es/actions/drawer-info.d.ts +6 -0
- package/es/actions/drawer-table.d.ts +6 -0
- package/es/actions/drawer.d.ts +6 -0
- package/es/actions/error.d.ts +7 -0
- package/es/actions/index.d.ts +114 -0
- package/es/actions/index.js +69 -60
- package/es/actions/index.scss +10 -1
- package/es/actions/link.d.ts +8 -0
- package/es/actions/link.js +4 -3
- package/es/actions/notice.d.ts +7 -0
- package/es/actions/pop-confirm.d.ts +9 -0
- package/es/actions/quick.d.ts +2 -0
- package/es/actions/quick.js +26 -0
- package/es/actions/request.d.ts +9 -0
- package/es/actions/request.js +4 -3
- package/es/actions/utils.d.ts +1 -0
- package/es/card/card-container.d.ts +18 -0
- package/es/card/card-container.js +5 -12
- package/es/card/divider.d.ts +6 -0
- package/es/card/divider.js +4 -2
- package/es/card/index.d.ts +109 -0
- package/es/card/index.js +11 -22
- package/es/card/index.scss +15 -0
- package/es/card/selectable.d.ts +13 -0
- package/es/card/selectable.js +4 -2
- package/es/card/tab.d.ts +6 -0
- package/es/card/tab.js +4 -2
- package/es/card/utils.d.ts +9 -0
- package/es/card/xconsole.scss +3 -0
- package/es/field/index.d.ts +3 -0
- package/es/form/Components/Editable/index.d.ts +20 -0
- package/es/form/Components/Editable/index.js +2 -2
- package/es/form/Components/FormGroup/index.d.ts +14 -0
- package/es/form/Components/FormGroup/index.js +3 -4
- package/es/form/Components/FormItem2/animation.scss +72 -0
- package/es/form/Components/FormItem2/grid.scss +173 -0
- package/es/form/Components/FormItem2/index.d.ts +41 -0
- package/es/form/Components/FormItem2/index.js +286 -0
- package/es/form/Components/FormItem2/main.scss +413 -0
- package/es/form/Components/FormItem2/scss/variable.scss +118 -0
- package/es/form/Components/FormItem2/style.d.ts +1 -0
- package/es/form/Components/FormItem2/style.js +1 -0
- package/es/form/Components/LightFilter/componentMap.d.ts +3 -0
- package/es/form/Components/LightFilter/index.d.ts +17 -0
- package/es/form/Components/LightFilter/index.js +2 -11
- package/es/form/Components/LightFilter/index.scss +4 -0
- package/es/form/Components/ProField/index.d.ts +2 -0
- package/es/form/Components/ProField/index.js +4 -2
- package/es/form/Components/ProField/mapDateFormat.d.ts +3 -0
- package/es/form/Components/Text/index.d.ts +8 -0
- package/es/form/Components/Text/index.js +4 -2
- package/es/form/Components/__builtins__/empty.d.ts +1 -0
- package/es/form/Components/__builtins__/empty.js +51 -0
- package/es/form/Components/__builtins__/hooks/index.d.ts +2 -0
- package/es/form/Components/__builtins__/hooks/index.js +2 -0
- package/es/form/Components/__builtins__/hooks/useClickAway.d.ts +5 -0
- package/es/form/Components/__builtins__/hooks/useClickAway.js +37 -0
- package/es/form/Components/__builtins__/hooks/usePrefixCls.d.ts +3 -0
- package/es/form/Components/__builtins__/hooks/usePrefixCls.js +8 -0
- package/es/form/Components/__builtins__/icons.d.ts +20 -0
- package/es/form/Components/__builtins__/icons.js +153 -0
- package/es/form/Components/__builtins__/index.d.ts +8 -0
- package/es/form/Components/__builtins__/index.js +8 -0
- package/es/form/Components/__builtins__/loading.d.ts +1 -0
- package/es/form/Components/__builtins__/loading.js +41 -0
- package/es/form/Components/__builtins__/mapSize.d.ts +1 -0
- package/es/form/Components/__builtins__/mapSize.js +13 -0
- package/es/form/Components/__builtins__/mapStatus.d.ts +2 -0
- package/es/form/Components/__builtins__/mapStatus.js +20 -0
- package/es/form/Components/__builtins__/moment.d.ts +2 -0
- package/es/form/Components/__builtins__/moment.js +47 -0
- package/es/form/Components/__builtins__/pickDataProps.d.ts +1 -0
- package/es/form/Components/__builtins__/pickDataProps.js +9 -0
- package/es/form/Components/form-layout/index.d.ts +74 -0
- package/es/form/Components/form-layout/index.js +71 -0
- package/es/form/Components/form-layout/main.scss +0 -0
- package/es/form/Components/form-layout/style.d.ts +1 -0
- package/es/form/Components/form-layout/style.js +3 -0
- package/es/form/Components/form-layout/useResponsiveFormLayout.d.ts +18 -0
- package/es/form/Components/form-layout/useResponsiveFormLayout.js +87 -0
- package/es/form/Filter/AdvancedFilter.d.ts +7 -0
- package/es/form/Filter/AdvancedFilter.js +16 -18
- package/es/form/Filter/Layout.d.ts +5 -0
- package/es/form/Filter/LightFilter.d.ts +7 -0
- package/es/form/Filter/LightFilter.js +9 -13
- package/es/form/Filter/SimpleFilter.d.ts +7 -0
- package/es/form/Filter/SimpleFilter.js +5 -8
- package/es/form/Filter/index.d.ts +9 -0
- package/es/form/Filter/index.js +19 -25
- package/es/form/Filter/index.scss +1 -0
- package/es/form/Filter/index2.d.ts +13 -0
- package/es/form/Filter/index2.js +20 -25
- package/es/form/Filter/index2.scss +1 -0
- package/es/form/Filter/useBindUrl.d.ts +2 -0
- package/es/form/Filter/useBindUrl.js +0 -3
- package/es/form/Filter/useSpecialProps.d.ts +6 -0
- package/es/form/Filter/useSpecialProps.js +0 -1
- package/es/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/es/form/ProForm/customComponent.d.ts +3 -0
- package/es/form/ProForm/index.d.ts +5 -0
- package/es/form/ProForm/index.js +21 -17
- package/es/form/ProForm/useAutoLayout.d.ts +9 -0
- package/es/form/ProForm/useAutoLayout.js +0 -4
- package/es/form/ProForm/useAutoSubmit.d.ts +6 -0
- package/es/form/ProForm/useAutoSubmit.js +4 -3
- package/es/form/ProForm/useFieldRequest.d.ts +5 -0
- package/es/form/ProForm/useFormDisplayValues.d.ts +4 -0
- package/es/form/ProForm/useFormDisplayValues.js +0 -1
- package/es/form/ProForm/useInitialRequest.d.ts +6 -0
- package/es/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/es/form/SchemaForm/adapterComponent.js +0 -1
- package/es/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/es/form/SchemaForm/adapterDecorator.js +0 -1
- package/es/form/SchemaForm/adapterType.d.ts +5 -0
- package/es/form/SchemaForm/adapterType.js +0 -1
- package/es/form/SchemaForm/index.d.ts +4 -0
- package/es/form/SchemaForm/index.js +0 -13
- package/es/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/es/form/SchemaForm/initializeDataSource.d.ts +15 -0
- package/es/form/SchemaForm/initializeDataSource.js +0 -7
- package/es/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormButton.js +0 -2
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormStep.d.ts +5 -0
- package/es/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/es/form/SchemaForm/initializeReactions.d.ts +2 -0
- package/es/form/SchemaForm/initializeReactions.js +0 -1
- package/es/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/es/form/SchemaForm/initializeRules.d.ts +11 -0
- package/es/form/SchemaForm/initializeSelectTable.d.ts +3 -0
- package/es/form/SchemaForm/initializeSelectTable.js +0 -1
- package/es/form/SchemaForm/reactions.d.ts +6 -0
- package/es/form/SchemaForm/reactions.js +0 -5
- package/es/form/docs/ActionResponse.d.ts +8 -0
- package/es/form/fieldTypeMap.d.ts +7 -0
- package/es/form/index.d.ts +125 -0
- package/es/form/index.js +0 -4
- package/es/form/locales/validate.d.ts +159 -0
- package/es/form/schemaNameMap.d.ts +5 -0
- package/es/form/typing.d.ts +194 -0
- package/es/form/utils/parseSchema.d.ts +3 -0
- package/es/form/utils/parseSchema.js +38 -0
- package/es/form/utils.d.ts +55 -0
- package/es/form/utils.js +0 -12
- package/es/form/warning.d.ts +3 -0
- package/es/form/warning.js +0 -2
- package/es/global.scss +3 -1
- package/es/hooks/index.d.ts +2 -0
- package/es/image/index.d.ts +22 -0
- package/es/image/index.js +73 -0
- package/es/image/index.scss +3 -0
- package/es/index-without-icon.d.ts +32 -0
- package/es/index.d.ts +34 -0
- package/es/index.js +14 -3
- package/es/info/components/InfoGroup/index.d.ts +5 -0
- package/es/info/components/InfoGroup/index.js +4 -2
- package/es/info/components/InfoValueItem/index.d.ts +5 -0
- package/es/info/components/InfoValueItem/index.js +20 -32
- package/es/info/components/ProInfoItem/index.d.ts +5 -0
- package/es/info/components/ProInfoItem/index.js +0 -1
- package/es/info/components/baseInfo/index.d.ts +8 -0
- package/es/info/components/baseInfo/index.js +4 -5
- package/es/info/components/headerInfo/index.d.ts +8 -0
- package/es/info/components/tableInfo/index.d.ts +7 -0
- package/es/info/components/tableInfo/index.js +4 -6
- package/es/info/index.d.ts +6 -0
- package/es/info/index.js +17 -21
- package/es/info/typing.d.ts +220 -0
- package/es/info/utils/index.d.ts +20 -0
- package/es/info/utils/index.js +0 -3
- package/es/info/utils/layout.d.ts +2 -0
- package/es/info/utils/utils.d.ts +1 -0
- package/es/layout/index.d.ts +2 -0
- package/es/layout/index.js +0 -2
- package/es/next-xconsole.scss +34 -0
- package/es/nocode/configurators/Card.d.ts +3 -0
- package/es/nocode/configurators/PageHeader.d.ts +3 -0
- package/es/nocode/configurators/ProTable.d.ts +3 -0
- package/es/nocode/configurators/ProTable.js +1 -22
- package/es/nocode/configurators/common.d.ts +280 -0
- package/es/nocode/configurators/index.d.ts +15 -0
- package/es/nocode/configurators/index.js +1 -0
- package/es/nocode/configurators/map.d.ts +2 -0
- package/es/nocode/index.d.ts +8 -0
- package/es/nocode/index.js +0 -2
- package/es/nocode/pages/editor.d.ts +12 -0
- package/es/nocode/pages/index.d.ts +14 -0
- package/es/nocode/pages/index.js +1 -29
- package/es/nocode/pages/playground.d.ts +11 -0
- package/es/nocode/pages/playground.js +5 -3
- package/es/nocode/pages/renderer.d.ts +10 -0
- package/es/nocode/pages/renderer.js +6 -4
- package/es/nocode/playground.d.ts +14 -0
- package/es/nocode/playground.js +4 -2
- package/es/page-container/index.d.ts +3 -0
- package/es/page-header/index.d.ts +74 -0
- package/es/page-header/index.js +13 -23
- package/es/page-header/index.scss +2 -1
- package/es/page-header/xconsole.scss +5 -0
- package/es/sidebar/components/sidebar-container/index.d.ts +5 -0
- package/es/sidebar/components/sidebar-container/index.js +7 -10
- package/es/sidebar/components/tree/index.d.ts +6 -0
- package/es/sidebar/components/tree/index.js +24 -28
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +4 -3
- package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
- package/es/sidebar/components/tree-node/components/IconAction/index.js +2 -4
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
- package/es/sidebar/components/tree-node/components/IconSwitch/index.js +0 -1
- package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/es/sidebar/components/tree-node/index.d.ts +7 -0
- package/es/sidebar/components/tree-node/index.js +16 -29
- package/es/sidebar/index.d.ts +9 -0
- package/es/sidebar/index.js +13 -18
- package/es/sidebar/typing.d.ts +145 -0
- package/es/sidebar/utils/action-ref.d.ts +3 -0
- package/es/sidebar/utils/index.d.ts +364 -0
- package/es/sidebar/utils/index.js +18 -19
- package/es/skeleton/index.d.ts +3 -0
- package/es/table/components/CardView/index.d.ts +5 -0
- package/es/table/components/CardView/index.js +387 -0
- package/es/table/components/CardView/index.scss +46 -0
- package/es/table/components/EmptyContent/index.d.ts +2 -0
- package/es/table/components/Filter/index.d.ts +12 -0
- package/es/table/components/Filter/index.js +110 -79
- package/es/table/components/Layout/index.d.ts +5 -0
- package/es/table/components/Layout/index.js +16 -16
- package/es/table/components/Layout/index.scss +1 -0
- package/es/table/components/LoadMore/index.d.ts +20 -0
- package/es/table/components/LoadMore/index.js +88 -0
- package/es/table/components/LoadMore/index.scss +19 -0
- package/es/table/components/Pagination/index.d.ts +8 -0
- package/es/table/components/Pagination/index.js +48 -31
- package/es/table/components/QuickAction/index.d.ts +11 -0
- package/es/table/components/QuickAction/index.js +2 -3
- package/es/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/es/table/components/ToolBar/CardSwitch.js +52 -0
- package/es/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/es/table/components/ToolBar/DensityIcon.js +2 -7
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FilterColumnIcon.js +41 -35
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +0 -1
- package/es/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/es/table/components/ToolBar/Fullscreen.js +10 -3
- package/es/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/es/table/components/ToolBar/RefreshIcon.js +162 -26
- package/es/table/components/ToolBar/index.d.ts +5 -0
- package/es/table/components/ToolBar/index.js +65 -33
- package/es/table/components/ToolBar/index.scss +27 -1
- package/es/table/index.d.ts +6 -0
- package/es/table/index.js +308 -137
- package/es/table/index.scss +8 -0
- package/es/table/typing.d.ts +426 -0
- package/es/table/utils/columnRender.d.ts +13 -0
- package/es/table/utils/columnRender.js +32 -37
- package/es/table/utils/genProColumnToColumn.d.ts +13 -0
- package/es/table/utils/genProColumnToColumn.js +10 -3
- package/es/table/utils/getTableProps.d.ts +2 -0
- package/es/table/utils/getTableSortIcons.d.ts +3 -0
- package/es/table/utils/index.d.ts +19 -0
- package/es/table/utils/index.js +0 -6
- package/es/table/utils/pureColumnRender.d.ts +9 -0
- package/es/table/utils/pureColumnRender.js +1 -9
- package/es/table/utils/pureGenProColumnToColumn.d.ts +7 -0
- package/es/table/utils/useTableSelection.d.ts +3 -0
- package/es/table/utils/util.d.ts +5 -0
- package/es/table/utils/util.js +19 -0
- package/es/templates/Detail/index.d.ts +2 -0
- package/es/templates/Form/index.d.ts +2 -0
- package/es/templates/List/index.d.ts +9 -0
- package/es/templates/List/index.js +6 -4
- package/es/templates/index.d.ts +3 -0
- package/es/templates/index.js +1 -2
- package/es/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/es/timeline/ProTimeLineItem/index.js +5 -9
- package/es/timeline/index.d.ts +10 -0
- package/es/timeline/index.js +5 -5
- package/es/timeline/typing.d.ts +107 -0
- package/es/utils/aspect.d.ts +2 -0
- package/es/utils/aspect.js +60 -0
- package/es/utils/index.d.ts +3 -0
- package/es/utils/message.d.ts +3 -0
- package/es/utils/message.js +5 -3
- package/es/xconsole.scss +527 -0
- package/lib/actions/base.d.ts +24 -0
- package/lib/actions/base.js +1 -1
- package/lib/actions/confirm.d.ts +7 -0
- package/lib/actions/danger-confirm.d.ts +7 -0
- package/lib/actions/danger-pop-confirm.d.ts +5 -0
- package/lib/actions/dialog-component.d.ts +10 -0
- package/lib/actions/dialog-component.js +4 -1
- package/lib/actions/dialog-form.d.ts +29 -0
- package/lib/actions/dialog-form.js +7 -9
- package/lib/actions/dialog-info.d.ts +9 -0
- package/lib/actions/dialog-table.d.ts +9 -0
- package/lib/actions/dialog.d.ts +40 -0
- package/lib/actions/dialog.js +7 -8
- package/lib/actions/drawer-form.d.ts +6 -0
- package/lib/actions/drawer-info.d.ts +6 -0
- package/lib/actions/drawer-table.d.ts +6 -0
- package/lib/actions/drawer.d.ts +6 -0
- package/lib/actions/error.d.ts +7 -0
- package/lib/actions/index.d.ts +114 -0
- package/lib/actions/index.js +89 -58
- package/lib/actions/index.scss +10 -1
- package/lib/actions/link.d.ts +8 -0
- package/lib/actions/link.js +2 -3
- package/lib/actions/notice.d.ts +7 -0
- package/lib/actions/pop-confirm.d.ts +9 -0
- package/lib/actions/quick.d.ts +2 -0
- package/lib/actions/quick.js +33 -0
- package/lib/actions/request.d.ts +9 -0
- package/lib/actions/request.js +2 -3
- package/lib/actions/utils.d.ts +1 -0
- package/lib/card/card-container.d.ts +18 -0
- package/lib/card/card-container.js +4 -6
- package/lib/card/divider.d.ts +6 -0
- package/lib/card/divider.js +4 -2
- package/lib/card/index.d.ts +109 -0
- package/lib/card/index.js +10 -20
- package/lib/card/index.scss +15 -0
- package/lib/card/selectable.d.ts +13 -0
- package/lib/card/selectable.js +4 -2
- package/lib/card/tab.d.ts +6 -0
- package/lib/card/tab.js +4 -2
- package/lib/card/utils.d.ts +9 -0
- package/lib/card/xconsole.scss +3 -0
- package/lib/field/index.d.ts +3 -0
- package/lib/form/Components/Editable/index.d.ts +20 -0
- package/lib/form/Components/Editable/index.js +2 -2
- package/lib/form/Components/FormGroup/index.d.ts +14 -0
- package/lib/form/Components/FormGroup/index.js +3 -4
- package/lib/form/Components/FormItem2/animation.scss +72 -0
- package/lib/form/Components/FormItem2/grid.scss +173 -0
- package/lib/form/Components/FormItem2/index.d.ts +41 -0
- package/lib/form/Components/FormItem2/index.js +299 -0
- package/lib/form/Components/FormItem2/main.scss +413 -0
- package/lib/form/Components/FormItem2/scss/variable.scss +118 -0
- package/lib/form/Components/FormItem2/style.d.ts +1 -0
- package/lib/form/Components/FormItem2/style.js +3 -0
- package/lib/form/Components/LightFilter/componentMap.d.ts +3 -0
- package/lib/form/Components/LightFilter/index.d.ts +17 -0
- package/lib/form/Components/LightFilter/index.js +2 -11
- package/lib/form/Components/LightFilter/index.scss +4 -0
- package/lib/form/Components/ProField/index.d.ts +2 -0
- package/lib/form/Components/ProField/index.js +4 -2
- package/lib/form/Components/ProField/mapDateFormat.d.ts +3 -0
- package/lib/form/Components/Text/index.d.ts +8 -0
- package/lib/form/Components/Text/index.js +4 -2
- package/lib/form/Components/__builtins__/empty.d.ts +1 -0
- package/lib/form/Components/__builtins__/empty.js +59 -0
- package/lib/form/Components/__builtins__/hooks/index.d.ts +2 -0
- package/lib/form/Components/__builtins__/hooks/index.js +27 -0
- package/lib/form/Components/__builtins__/hooks/useClickAway.d.ts +5 -0
- package/lib/form/Components/__builtins__/hooks/useClickAway.js +44 -0
- package/lib/form/Components/__builtins__/hooks/usePrefixCls.d.ts +3 -0
- package/lib/form/Components/__builtins__/hooks/usePrefixCls.js +15 -0
- package/lib/form/Components/__builtins__/icons.d.ts +20 -0
- package/lib/form/Components/__builtins__/icons.js +174 -0
- package/lib/form/Components/__builtins__/index.d.ts +8 -0
- package/lib/form/Components/__builtins__/index.js +93 -0
- package/lib/form/Components/__builtins__/loading.d.ts +1 -0
- package/lib/form/Components/__builtins__/loading.js +48 -0
- package/lib/form/Components/__builtins__/mapSize.d.ts +1 -0
- package/lib/form/Components/__builtins__/mapSize.js +20 -0
- package/lib/form/Components/__builtins__/mapStatus.d.ts +2 -0
- package/lib/form/Components/__builtins__/mapStatus.js +27 -0
- package/lib/form/Components/__builtins__/moment.d.ts +2 -0
- package/lib/form/Components/__builtins__/moment.js +56 -0
- package/lib/form/Components/__builtins__/pickDataProps.d.ts +1 -0
- package/lib/form/Components/__builtins__/pickDataProps.js +16 -0
- package/lib/form/Components/form-layout/index.d.ts +74 -0
- package/lib/form/Components/form-layout/index.js +88 -0
- package/lib/form/Components/form-layout/main.scss +0 -0
- package/lib/form/Components/form-layout/style.d.ts +1 -0
- package/lib/form/Components/form-layout/style.js +3 -0
- package/lib/form/Components/form-layout/useResponsiveFormLayout.d.ts +18 -0
- package/lib/form/Components/form-layout/useResponsiveFormLayout.js +94 -0
- package/lib/form/Filter/AdvancedFilter.d.ts +7 -0
- package/lib/form/Filter/AdvancedFilter.js +16 -18
- package/lib/form/Filter/Layout.d.ts +5 -0
- package/lib/form/Filter/LightFilter.d.ts +7 -0
- package/lib/form/Filter/LightFilter.js +9 -13
- package/lib/form/Filter/SimpleFilter.d.ts +7 -0
- package/lib/form/Filter/SimpleFilter.js +5 -8
- package/lib/form/Filter/index.d.ts +9 -0
- package/lib/form/Filter/index.js +19 -25
- package/lib/form/Filter/index.scss +1 -0
- package/lib/form/Filter/index2.d.ts +13 -0
- package/lib/form/Filter/index2.js +20 -25
- package/lib/form/Filter/index2.scss +1 -0
- package/lib/form/Filter/useBindUrl.d.ts +2 -0
- package/lib/form/Filter/useBindUrl.js +0 -3
- package/lib/form/Filter/useSpecialProps.d.ts +6 -0
- package/lib/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/lib/form/ProForm/customComponent.d.ts +3 -0
- package/lib/form/ProForm/index.d.ts +5 -0
- package/lib/form/ProForm/index.js +20 -16
- package/lib/form/ProForm/useAutoLayout.d.ts +9 -0
- package/lib/form/ProForm/useAutoLayout.js +0 -4
- package/lib/form/ProForm/useAutoSubmit.d.ts +6 -0
- package/lib/form/ProForm/useAutoSubmit.js +2 -3
- package/lib/form/ProForm/useFieldRequest.d.ts +5 -0
- package/lib/form/ProForm/useFormDisplayValues.d.ts +4 -0
- package/lib/form/ProForm/useFormDisplayValues.js +0 -1
- package/lib/form/ProForm/useInitialRequest.d.ts +6 -0
- package/lib/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/lib/form/SchemaForm/adapterComponent.js +0 -1
- package/lib/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/lib/form/SchemaForm/adapterType.d.ts +5 -0
- package/lib/form/SchemaForm/adapterType.js +0 -1
- package/lib/form/SchemaForm/index.d.ts +4 -0
- package/lib/form/SchemaForm/index.js +0 -13
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/lib/form/SchemaForm/initializeDataSource.d.ts +15 -0
- package/lib/form/SchemaForm/initializeDataSource.js +2 -9
- package/lib/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormButton.js +0 -2
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormStep.d.ts +5 -0
- package/lib/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/lib/form/SchemaForm/initializeReactions.d.ts +2 -0
- package/lib/form/SchemaForm/initializeReactions.js +0 -1
- package/lib/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/lib/form/SchemaForm/initializeRules.d.ts +11 -0
- package/lib/form/SchemaForm/initializeSelectTable.d.ts +3 -0
- package/lib/form/SchemaForm/reactions.d.ts +6 -0
- package/lib/form/SchemaForm/reactions.js +0 -5
- package/lib/form/docs/ActionResponse.d.ts +8 -0
- package/lib/form/fieldTypeMap.d.ts +7 -0
- package/lib/form/index.d.ts +125 -0
- package/lib/form/locales/validate.d.ts +159 -0
- package/lib/form/schemaNameMap.d.ts +5 -0
- package/lib/form/typing.d.ts +194 -0
- package/lib/form/typing.js +5 -1
- package/lib/form/utils/parseSchema.d.ts +3 -0
- package/lib/form/utils/parseSchema.js +45 -0
- package/lib/form/utils.d.ts +55 -0
- package/lib/form/utils.js +0 -11
- package/lib/form/warning.d.ts +3 -0
- package/lib/form/warning.js +0 -2
- package/lib/global.scss +3 -1
- package/lib/hooks/index.d.ts +2 -0
- package/lib/image/index.d.ts +22 -0
- package/lib/image/index.js +83 -0
- package/lib/image/index.scss +3 -0
- package/lib/index-without-icon.d.ts +32 -0
- package/lib/index.d.ts +34 -0
- package/lib/index.js +31 -2
- package/lib/info/components/InfoGroup/index.d.ts +5 -0
- package/lib/info/components/InfoGroup/index.js +4 -2
- package/lib/info/components/InfoValueItem/index.d.ts +5 -0
- package/lib/info/components/InfoValueItem/index.js +20 -32
- package/lib/info/components/ProInfoItem/index.d.ts +5 -0
- package/lib/info/components/ProInfoItem/index.js +0 -1
- package/lib/info/components/baseInfo/index.d.ts +8 -0
- package/lib/info/components/baseInfo/index.js +4 -5
- package/lib/info/components/headerInfo/index.d.ts +8 -0
- package/lib/info/components/tableInfo/index.d.ts +7 -0
- package/lib/info/components/tableInfo/index.js +4 -6
- package/lib/info/index.d.ts +6 -0
- package/lib/info/index.js +16 -20
- package/lib/info/typing.d.ts +220 -0
- package/lib/info/typing.js +5 -1
- package/lib/info/utils/index.d.ts +20 -0
- package/lib/info/utils/index.js +0 -3
- package/lib/info/utils/layout.d.ts +2 -0
- package/lib/info/utils/utils.d.ts +1 -0
- package/lib/layout/index.d.ts +2 -0
- package/lib/next-xconsole.scss +34 -0
- package/lib/nocode/configurators/Card.d.ts +3 -0
- package/lib/nocode/configurators/PageHeader.d.ts +3 -0
- package/lib/nocode/configurators/ProTable.d.ts +3 -0
- package/lib/nocode/configurators/ProTable.js +1 -22
- package/lib/nocode/configurators/common.d.ts +280 -0
- package/lib/nocode/configurators/index.d.ts +15 -0
- package/lib/nocode/configurators/index.js +1 -0
- package/lib/nocode/configurators/map.d.ts +2 -0
- package/lib/nocode/index.d.ts +8 -0
- package/lib/nocode/pages/editor.d.ts +12 -0
- package/lib/nocode/pages/index.d.ts +14 -0
- package/lib/nocode/pages/index.js +2 -27
- package/lib/nocode/pages/playground.d.ts +11 -0
- package/lib/nocode/pages/playground.js +5 -3
- package/lib/nocode/pages/renderer.d.ts +10 -0
- package/lib/nocode/pages/renderer.js +6 -4
- package/lib/nocode/playground.d.ts +14 -0
- package/lib/nocode/playground.js +4 -2
- package/lib/page-container/index.d.ts +3 -0
- package/lib/page-header/index.d.ts +74 -0
- package/lib/page-header/index.js +11 -22
- package/lib/page-header/index.scss +2 -1
- package/lib/page-header/xconsole.scss +5 -0
- package/lib/sidebar/components/sidebar-container/index.d.ts +5 -0
- package/lib/sidebar/components/sidebar-container/index.js +7 -10
- package/lib/sidebar/components/tree/index.d.ts +6 -0
- package/lib/sidebar/components/tree/index.js +24 -28
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +4 -3
- package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +2 -4
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +0 -1
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/lib/sidebar/components/tree-node/index.d.ts +7 -0
- package/lib/sidebar/components/tree-node/index.js +16 -29
- package/lib/sidebar/index.d.ts +9 -0
- package/lib/sidebar/index.js +20 -18
- package/lib/sidebar/typing.d.ts +145 -0
- package/lib/sidebar/typing.js +5 -1
- package/lib/sidebar/utils/action-ref.d.ts +3 -0
- package/lib/sidebar/utils/index.d.ts +364 -0
- package/lib/sidebar/utils/index.js +18 -19
- package/lib/skeleton/index.d.ts +3 -0
- package/lib/table/components/CardView/index.d.ts +5 -0
- package/lib/table/components/CardView/index.js +397 -0
- package/lib/table/components/CardView/index.scss +46 -0
- package/lib/table/components/EmptyContent/index.d.ts +2 -0
- package/lib/table/components/Filter/index.d.ts +12 -0
- package/lib/table/components/Filter/index.js +109 -78
- package/lib/table/components/Layout/index.d.ts +5 -0
- package/lib/table/components/Layout/index.js +17 -17
- package/lib/table/components/Layout/index.scss +1 -0
- package/lib/table/components/LoadMore/index.d.ts +20 -0
- package/lib/table/components/LoadMore/index.js +99 -0
- package/lib/table/components/LoadMore/index.scss +19 -0
- package/lib/table/components/Pagination/index.d.ts +8 -0
- package/lib/table/components/Pagination/index.js +47 -30
- package/lib/table/components/QuickAction/index.d.ts +11 -0
- package/lib/table/components/QuickAction/index.js +2 -3
- package/lib/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/lib/table/components/ToolBar/CardSwitch.js +60 -0
- package/lib/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/DensityIcon.js +2 -7
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FilterColumnIcon.js +40 -34
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +0 -1
- package/lib/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/lib/table/components/ToolBar/Fullscreen.js +10 -3
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/RefreshIcon.js +164 -29
- package/lib/table/components/ToolBar/index.d.ts +5 -0
- package/lib/table/components/ToolBar/index.js +64 -32
- package/lib/table/components/ToolBar/index.scss +27 -1
- package/lib/table/index.d.ts +6 -0
- package/lib/table/index.js +307 -136
- package/lib/table/index.scss +8 -0
- package/lib/table/typing.d.ts +426 -0
- package/lib/table/typing.js +5 -1
- package/lib/table/utils/columnRender.d.ts +13 -0
- package/lib/table/utils/columnRender.js +32 -36
- package/lib/table/utils/genProColumnToColumn.d.ts +13 -0
- package/lib/table/utils/genProColumnToColumn.js +10 -3
- package/lib/table/utils/getTableProps.d.ts +2 -0
- package/lib/table/utils/getTableSortIcons.d.ts +3 -0
- package/lib/table/utils/index.d.ts +19 -0
- package/lib/table/utils/index.js +0 -6
- package/lib/table/utils/pureColumnRender.d.ts +9 -0
- package/lib/table/utils/pureColumnRender.js +1 -9
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +7 -0
- package/lib/table/utils/useTableSelection.d.ts +3 -0
- package/lib/table/utils/util.d.ts +5 -0
- package/lib/table/utils/util.js +25 -0
- package/lib/templates/Detail/index.d.ts +2 -0
- package/lib/templates/Form/index.d.ts +2 -0
- package/lib/templates/List/index.d.ts +9 -0
- package/lib/templates/List/index.js +6 -4
- package/lib/templates/index.d.ts +3 -0
- package/lib/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/lib/timeline/ProTimeLineItem/index.js +5 -9
- package/lib/timeline/index.d.ts +10 -0
- package/lib/timeline/index.js +5 -5
- package/lib/timeline/typing.d.ts +107 -0
- package/lib/timeline/typing.js +5 -1
- package/lib/utils/aspect.d.ts +2 -0
- package/lib/utils/aspect.js +67 -0
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/message.d.ts +3 -0
- package/lib/utils/message.js +5 -3
- package/lib/xconsole.scss +527 -0
- package/package.json +9 -8
package/lib/table/index.scss
CHANGED
@@ -89,6 +89,14 @@ $fullscreenPadding: 24px;
|
|
89
89
|
color: var(--table-sort-color-current, #0064c8);
|
90
90
|
}
|
91
91
|
}
|
92
|
+
.next-table-empty {
|
93
|
+
padding: 0;
|
94
|
+
}
|
95
|
+
.next-table-wrap-empty {
|
96
|
+
.next-table-body tr td{
|
97
|
+
border-bottom: 0;
|
98
|
+
}
|
99
|
+
}
|
92
100
|
}
|
93
101
|
|
94
102
|
.teamix-pro-table-footer-suction {
|
@@ -0,0 +1,426 @@
|
|
1
|
+
/**
|
2
|
+
* ProTable 类型定义
|
3
|
+
*/
|
4
|
+
import { ColumnProps, TableProps } from '@alicloudfe/components/types/table';
|
5
|
+
import { ProFieldType, ProFieldRenderProps, ProFieldDataSourceItem, EmptyContentProps } from '../field';
|
6
|
+
import { QueryFilterProps, ProFormType } from '../form';
|
7
|
+
import { ProActionGroupProps, ProActionButtonProps } from '../actions';
|
8
|
+
import { PaginationProps } from '@alicloudfe/components/types/pagination';
|
9
|
+
import { HeaderProps as ProTableHeaderProps } from '../field';
|
10
|
+
import { Method, AxiosRequestConfig } from 'axios';
|
11
|
+
import React from 'react';
|
12
|
+
import { ProCardProps } from '../card';
|
13
|
+
declare type IFieldRenderProps = keyof ProFieldRenderProps;
|
14
|
+
/** 列record函数 */
|
15
|
+
declare type ProTableCellFunProp = (value: any, index: number, record: any, ...others: any) => any;
|
16
|
+
declare type ITableCellRender = {
|
17
|
+
[key in IFieldRenderProps]?: ProFieldRenderProps[key] | ProTableCellFunProp;
|
18
|
+
} | ((...other: any) => React.ReactNode);
|
19
|
+
declare type TDataService = {
|
20
|
+
/** 翻页器总数 */
|
21
|
+
total?: string | number;
|
22
|
+
/** 表格数据 */
|
23
|
+
data?: any;
|
24
|
+
};
|
25
|
+
export declare type responsivePaginationType = 'mini' | 'small' | 'simple' | 'normal';
|
26
|
+
export declare type ProTableColumnProps = {
|
27
|
+
/**
|
28
|
+
* 会在 title 之后展示一个 icon,hover 之后提示一些信息
|
29
|
+
*/
|
30
|
+
tooltip?: string;
|
31
|
+
/**
|
32
|
+
* title 之后展示一个 icon 设置,可传 TeamixIcon 对应的 type,也可以是自定义 Icon
|
33
|
+
*/
|
34
|
+
tooltipIcon?: React.ReactNode;
|
35
|
+
/** 对应 ProField 里面的 type */
|
36
|
+
valueType?: ProFieldType;
|
37
|
+
/** 是否隐藏表格列,列配置也不显示 */
|
38
|
+
hidden?: boolean;
|
39
|
+
/** 【列配置】是否默认隐藏表格列,但列配置显示 */
|
40
|
+
columnFilters?: boolean;
|
41
|
+
/** 【列配置】是否禁用隐藏列 */
|
42
|
+
columnFiltersDisabled?: boolean;
|
43
|
+
/** 渲染单元格内容字段 */
|
44
|
+
render?: ITableCellRender;
|
45
|
+
/** 枚举值 */
|
46
|
+
dataSource?: ProFieldDataSourceItem[] | ProTableCellFunProp;
|
47
|
+
/** 表头的过滤菜单项,当值为 true 时,自动使用 dataSource 生成 */
|
48
|
+
filters?: boolean | ProTableColumnsFilterItemProps[];
|
49
|
+
/** 表头的过滤菜单项过滤方式 single 单选 multiple 多选 */
|
50
|
+
filtersMode?: 'single' | 'multiple';
|
51
|
+
/** 表头的过滤菜单项在搜索之前的参数操作 */
|
52
|
+
beforeFilter?: (rules: string[]) => string;
|
53
|
+
/** 表头的过滤菜单宽度 */
|
54
|
+
filtersWidth?: string | number;
|
55
|
+
/** 操作组配置 */
|
56
|
+
actionSchema?: ProActionGroupProps;
|
57
|
+
/** 指定列对应的字段,支持`a.b`形式的快速取值 和 数组取值 */
|
58
|
+
dataIndex?: string | string[];
|
59
|
+
/** 指定 valueType 为日期时间格式时,可以格式化日期时间 */
|
60
|
+
format?: string;
|
61
|
+
/** 多级表头 **/
|
62
|
+
children?: ProTableColumnProps[];
|
63
|
+
/** ProField 其他配置项 */
|
64
|
+
props?: any;
|
65
|
+
} & Omit<ColumnProps, 'filters' | 'dataIndex' | 'filtersMode' | 'children'>;
|
66
|
+
export declare type ProColumnProps = ProTableColumnProps;
|
67
|
+
export declare type ProTableProps = {
|
68
|
+
/** ProColums 定义,取代 Table 的 columns */
|
69
|
+
columns: ProTableColumnProps[];
|
70
|
+
/** 请求地址 */
|
71
|
+
url?: string;
|
72
|
+
/** 请求方法 */
|
73
|
+
method?: Method;
|
74
|
+
/** 请求参数 */
|
75
|
+
params?: {
|
76
|
+
[propName: string]: any;
|
77
|
+
};
|
78
|
+
/** sort 排序请求参数处理函数 */
|
79
|
+
formatSort?: (sort: object) => object;
|
80
|
+
/** 如需自定义调用参数格式,则可以设定此值在请求前对 params 进行自定义,如果返回false则可以阻止请求 */
|
81
|
+
formatParams?: ((params: any) => typeof params) | string;
|
82
|
+
/** 对返回值的 data,total 进行映射处理 */
|
83
|
+
formatResult?: TDataService | ((res: any) => TDataService) | string;
|
84
|
+
/** 请求成功后经过 formatResult 转换后的回调 */
|
85
|
+
onFormatResult?: (data: any[]) => void;
|
86
|
+
/** 是否第一次加载时就发起请求 */
|
87
|
+
requestWhenMount?: boolean;
|
88
|
+
/** 内部请求每次成功后的回调 */
|
89
|
+
onSuccess?: (res: any) => void;
|
90
|
+
/** 内部请求失败时的回调 */
|
91
|
+
onError?: (error: Error) => void;
|
92
|
+
/** 自定义的请求配置 */
|
93
|
+
requestConfig?: AxiosRequestConfig;
|
94
|
+
/** 翻页页数的请求参数名 */
|
95
|
+
pageKey?: string;
|
96
|
+
/** 翻页器页数对应字段 */
|
97
|
+
pageSizeKey?: string;
|
98
|
+
/** 翻页器每页显示的条数 */
|
99
|
+
pageSize?: number;
|
100
|
+
/** 每页显示选择器可选值 */
|
101
|
+
pageSizeList?: PaginationProps['pageSizeList'];
|
102
|
+
/** 透传给翻页器的属性 */
|
103
|
+
paginationProps?: PaginationProps;
|
104
|
+
/** 是否显示翻页器 */
|
105
|
+
showPagination?: boolean;
|
106
|
+
/** 手动指定响应式翻页器的 type */
|
107
|
+
responsivePaginationType?: responsivePaginationType;
|
108
|
+
/** 是否使用内置的 rowSelection */
|
109
|
+
useRowSelection?: boolean;
|
110
|
+
/** 内置 rowSelection 变化时的回调 */
|
111
|
+
onChangeRowSelection?: (selectedRowKeys: string[]) => void;
|
112
|
+
/** 获取内置 rowSelection */
|
113
|
+
getRowSelection?: (rowSelection: innerRowSelectionType) => void;
|
114
|
+
/** 表格底部(左侧)配置 */
|
115
|
+
footerAction?: ProActionGroupProps | React.ReactNode;
|
116
|
+
/** 表格底部(右层)配置 */
|
117
|
+
footer?: React.ReactNode;
|
118
|
+
/**
|
119
|
+
* @deprecated 已废弃 建议用 dataFilter 中的 filterDebounce 代替
|
120
|
+
* 筛选区自动搜索的防抖时间(毫秒)
|
121
|
+
*/
|
122
|
+
filterDebounce?: number;
|
123
|
+
/** ProTable action 的引用,便于手动触发一些方法 */
|
124
|
+
actionRef?: React.MutableRefObject<ProTableActionType | undefined>;
|
125
|
+
/** 是否首次加载渲染骨架屏 */
|
126
|
+
showSkeleton?: boolean;
|
127
|
+
/** 渲染骨架屏条数 */
|
128
|
+
skeletonSize?: number;
|
129
|
+
/** 表格主题 className */
|
130
|
+
tableClassName?: string;
|
131
|
+
/** 非全屏模式下是否吸底 默认状态下取用 ProPageContainer 作为参照物。如果传入了 Dom,则取用 Dom 作为参照物 */
|
132
|
+
footerSuction?: boolean | Element;
|
133
|
+
/** 当满足条件时开启自动刷新,返回值为自动刷新间隔时间,如果返回 0 或 false 则停止自动刷新,每次触发翻页、搜索都将重置时间 */
|
134
|
+
autoRefresh?: ((dataSource: any[]) => number | boolean) | boolean;
|
135
|
+
/** 自动刷新配置 */
|
136
|
+
autoRefreshProps?: {
|
137
|
+
/** 可选间隔列表 **/
|
138
|
+
dataSource?: {
|
139
|
+
label?: React.ReactNode;
|
140
|
+
value?: number;
|
141
|
+
}[];
|
142
|
+
};
|
143
|
+
/** 自定义请求方法,必需返回 success,data 字段,如果需要手动分页 total 也是必需的 */
|
144
|
+
customRequest?: (params: any) => Promise<{
|
145
|
+
success: boolean;
|
146
|
+
data: any[];
|
147
|
+
total?: number;
|
148
|
+
}>;
|
149
|
+
/** 翻页时是否保留之前批量选择数据 */
|
150
|
+
reserveSelectedRecords?: boolean;
|
151
|
+
/** 默认漏斗过滤条件 */
|
152
|
+
defaultFilterParams?: {
|
153
|
+
[key: string]: any[] | any;
|
154
|
+
};
|
155
|
+
/** 禁用掉批量选择中的全选 */
|
156
|
+
disableSelectAll?: boolean;
|
157
|
+
/** 接收外部传来的 context,eg: dialog-table */
|
158
|
+
context?: any;
|
159
|
+
/** 是否固定表格主体(开启后横向滚动条会固定在底部) */
|
160
|
+
fixedTableBody?: boolean;
|
161
|
+
/** 用于埋点 */
|
162
|
+
'data-teamix-spm'?: string;
|
163
|
+
/** 是否切换卡片视角 **/
|
164
|
+
switchCardView?: boolean;
|
165
|
+
/** 卡片视角配置 **/
|
166
|
+
cardViewProps?: ProTableCardProps;
|
167
|
+
/** 默认展示维度 **/
|
168
|
+
defaultView?: 'table' | 'card';
|
169
|
+
/** 空状态配置 **/
|
170
|
+
emptyProps?: EmptyContentProps;
|
171
|
+
/** 是否绑定 url **/
|
172
|
+
bindUrl?: boolean;
|
173
|
+
/** 绑定 url 配置 **/
|
174
|
+
bindUrlProps?: ProTableBindUrlProps;
|
175
|
+
/** 当前页数据被删除完后,是否跳转回第一页 **/
|
176
|
+
autoRedirect?: boolean;
|
177
|
+
/** 使用超大数据模式 **/
|
178
|
+
useMaxData?: boolean;
|
179
|
+
} & Omit<TableProps, 'columns'> & ProTableTopAreaProps;
|
180
|
+
export declare type rowSelectionType = {
|
181
|
+
getProps?: (record: any, index: number) => any;
|
182
|
+
onChange?: (selectedRowKeys: Array<any>, records: Array<any>) => void;
|
183
|
+
onSelect?: (selected: boolean, record: any, records: Array<any>) => void;
|
184
|
+
onSelectAll?: (selected: boolean, records: Array<any>) => void;
|
185
|
+
selectedRowKeys?: Array<any>;
|
186
|
+
selectedRecords?: any[];
|
187
|
+
mode?: 'single' | 'multiple';
|
188
|
+
titleProps?: () => any;
|
189
|
+
columnProps?: () => any;
|
190
|
+
titleAddons?: () => any;
|
191
|
+
};
|
192
|
+
export declare type innerRowSelectionType = {
|
193
|
+
rowSelection: rowSelectionType;
|
194
|
+
selectedRowKeys: string[];
|
195
|
+
setSelectedRowKeys: (selectedRowKeys: string[]) => void;
|
196
|
+
selectedRecords: any[];
|
197
|
+
setSelectedRecords: (selectedRecords: any[]) => void;
|
198
|
+
};
|
199
|
+
export declare type ProTableActionType = {
|
200
|
+
/** 全屏展示 */
|
201
|
+
fullScreen?: () => boolean;
|
202
|
+
/** 设置显示列 */
|
203
|
+
setColumn?: (newColumns: ProColumnProps[], update?: boolean) => void;
|
204
|
+
/** 表格尺寸 */
|
205
|
+
size?: 'small' | 'medium';
|
206
|
+
/** 设置表格大小 */
|
207
|
+
setSize?: (mode: 'small' | 'medium') => void;
|
208
|
+
/** 刷新表格 */
|
209
|
+
refresh?: (params?: any) => void;
|
210
|
+
/*** 表格内部请求方法 */
|
211
|
+
request?: (params?: any) => void;
|
212
|
+
/** 重置表格 */
|
213
|
+
reset?: () => void;
|
214
|
+
/** 表格选择相关属性 */
|
215
|
+
rowSelection?: innerRowSelectionType | rowSelectionType;
|
216
|
+
/** 清空表格选择 */
|
217
|
+
clearRowSelection?: () => void;
|
218
|
+
/** 过滤 DataSource */
|
219
|
+
filterDataSource?: (dataIndex: string) => void;
|
220
|
+
/** 翻页器当前信息 */
|
221
|
+
pageInfo?: {
|
222
|
+
/** 总数 */
|
223
|
+
total?: number;
|
224
|
+
/** 当前页 */
|
225
|
+
current?: number;
|
226
|
+
/** 每页数据量 */
|
227
|
+
pageSize?: number;
|
228
|
+
/** 翻页页数的请求参数名*/
|
229
|
+
targetPageKey?: string;
|
230
|
+
/** 翻页单页数量的请求参数名 */
|
231
|
+
targetPageSizeKey?: string;
|
232
|
+
};
|
233
|
+
/** 重置翻页器为1,不发送请求 */
|
234
|
+
resetPage?: () => void;
|
235
|
+
nextPage?: () => void;
|
236
|
+
/** 获取数据过滤区表单实例 */
|
237
|
+
dataFilterForm?: ProFormType;
|
238
|
+
/** 用于在 mount 的时候获取到表单 ref */
|
239
|
+
dataFilterFormRef?: React.MutableRefObject<ProFormType>;
|
240
|
+
normalDataFilterForm?: ProFormType;
|
241
|
+
fullscreenDataFilterForm?: ProFormType;
|
242
|
+
filterEnableRef?: any;
|
243
|
+
/** 表格当前的数据 */
|
244
|
+
data?: any[];
|
245
|
+
/** 切换视角 **/
|
246
|
+
switchView?: (view: 'card' | 'table') => void;
|
247
|
+
/** 设置数据源 **/
|
248
|
+
setData?: (data: any[]) => void;
|
249
|
+
setCardViewScrollPosition?: (scrollTop: number) => void;
|
250
|
+
/** 刷新定时器间隔时间 */
|
251
|
+
setAutoRefreshTimers?: (timers: number) => void;
|
252
|
+
/** 清除刷新定时器 */
|
253
|
+
clearAutoRefreshTimers?: () => void;
|
254
|
+
} & ProTableActionTypeMutations;
|
255
|
+
/** action State 定义 */
|
256
|
+
export declare type ProTableActionTypeMutations = {
|
257
|
+
/** 获取state 状态 */
|
258
|
+
getState?: () => ProTableActionTypeState;
|
259
|
+
/** 设置state 状态 */
|
260
|
+
setState?: (key: string, value: any) => void;
|
261
|
+
/** 设置全屏状态 */
|
262
|
+
setFullScreenState?: (state: boolean) => void;
|
263
|
+
/** 绑定state监听事件 */
|
264
|
+
on?: (...args: any) => void;
|
265
|
+
/** 销毁监听事件 */
|
266
|
+
off?: (...args: any) => void;
|
267
|
+
/** 设置 列 过滤规则 */
|
268
|
+
setFilterRules?: (rules: ProTableColumnsFilterRulesItem) => void;
|
269
|
+
/** 获取 列 过滤规则 */
|
270
|
+
getFilterRules?: () => object;
|
271
|
+
/** 重新计算表格maxHeight高度 */
|
272
|
+
resetTableMaxBodyHeight?: (offset: number) => void;
|
273
|
+
/** 列筛选规则 */
|
274
|
+
filterColumns?: any[];
|
275
|
+
/** 获取所有 on 监听事件 */
|
276
|
+
getCallback?: () => any;
|
277
|
+
};
|
278
|
+
/** action Mutations 定义 */
|
279
|
+
export declare type ProTableActionTypeState = {
|
280
|
+
fullScreenState: boolean;
|
281
|
+
filterRules: ProTableColumnsFilterRulesItem;
|
282
|
+
filterColumns: ProTableColumnProps[];
|
283
|
+
[key: string]: any;
|
284
|
+
};
|
285
|
+
export declare type ProTableDataFilterProps = {
|
286
|
+
searchUndefined?: boolean;
|
287
|
+
/** 搜索时是否传入值为空字符串的参数,默认不传 */
|
288
|
+
searchEmptyString?: boolean;
|
289
|
+
/** 自定义内容 */
|
290
|
+
content?: React.ReactNode;
|
291
|
+
} & QueryFilterProps;
|
292
|
+
export declare type dataFilterProps = ProTableDataFilterProps;
|
293
|
+
export declare type ProTableTopAreaProps = {
|
294
|
+
/** 标题区 */
|
295
|
+
header?: ProTableHeaderProps;
|
296
|
+
/** 主操作区 */
|
297
|
+
mainAction?: ProActionGroupProps | React.ReactNode;
|
298
|
+
/** 工具栏区 */
|
299
|
+
toolBar?: boolean | ProTableToolBarItem[];
|
300
|
+
/** 是否开启工具栏自适应 */
|
301
|
+
toolBarAutoWidth?: boolean;
|
302
|
+
/** 快捷操作区 */
|
303
|
+
extra?: ProActionButtonProps | React.ReactNode | React.ReactNode[];
|
304
|
+
/** 数据过滤区 */
|
305
|
+
dataFilter?: ProTableDataFilterProps;
|
306
|
+
/** 数据过滤区下方自定义区域 */
|
307
|
+
afterDataFilter?: React.ReactNode;
|
308
|
+
/** 传给 QueryFilter 的 formRef */
|
309
|
+
dataFilterFormRef?: any;
|
310
|
+
/** 排序、筛选列展示状态 */
|
311
|
+
filterColumnType?: 'dialog' | 'dropdown' | 'auto';
|
312
|
+
};
|
313
|
+
/** 单个工具栏 */
|
314
|
+
export declare type ProTableToolBarItem = React.ReactNode | 'refresh' | 'density' | 'filterColumn' | 'fullscreen';
|
315
|
+
export declare type toolBarItem = ProTableToolBarItem;
|
316
|
+
export declare type ProTableLayoutProps = {
|
317
|
+
actionRef: React.MutableRefObject<ProTableActionType | undefined>;
|
318
|
+
columns?: ProTableColumnProps[];
|
319
|
+
rowSelection?: innerRowSelectionType | rowSelectionType;
|
320
|
+
fullScreenState?: boolean;
|
321
|
+
dataTeamixSpm?: string;
|
322
|
+
switchCardView?: boolean;
|
323
|
+
defaultView?: 'table' | 'card';
|
324
|
+
autoRefresh?: ProTableProps['autoRefresh'];
|
325
|
+
autoRefreshProps?: ProTableProps['autoRefreshProps'];
|
326
|
+
bindUrl?: ProTableProps['bindUrl'];
|
327
|
+
bindUrlProps?: ProTableProps['bindUrlProps'];
|
328
|
+
} & ProTableTopAreaProps;
|
329
|
+
/** columns 列过滤 */
|
330
|
+
export declare type ProTableColumnsFilterItemProps = {
|
331
|
+
/** 绑定值 */
|
332
|
+
value?: string | boolean | number;
|
333
|
+
/** 显示值 */
|
334
|
+
label?: React.ReactNode;
|
335
|
+
};
|
336
|
+
/** columns 列过滤规则 item (action ref state用) */
|
337
|
+
export declare type ProTableColumnsFilterRulesItem = {
|
338
|
+
[key: string]: {
|
339
|
+
/** 原始规则 */
|
340
|
+
rules: string[];
|
341
|
+
/** 处理过后的作为params的规则 */
|
342
|
+
params: string;
|
343
|
+
};
|
344
|
+
};
|
345
|
+
/** 非全屏模式下的吸底 useState类型定义 */
|
346
|
+
export declare type parentPositionProps = {
|
347
|
+
offsetLeft: number;
|
348
|
+
offsetRight: number;
|
349
|
+
};
|
350
|
+
/** card props **/
|
351
|
+
export declare type ProTableCardProps = {
|
352
|
+
/** 标题 dataIndex **/
|
353
|
+
title?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps) | ((index: number, record: any) => ProTableColumnProps['dataIndex'] | ProTableColumnProps);
|
354
|
+
/** 副标题 dataIndex **/
|
355
|
+
subTitle?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps) | ((index: number, record: any) => ProTableColumnProps['dataIndex'] | ProTableColumnProps);
|
356
|
+
/** 内容区域 dataIndex **/
|
357
|
+
content?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[] | ((index: number, record: any) => (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[]);
|
358
|
+
/** extra 区域 **/
|
359
|
+
extra?: (ProActionGroupProps | React.ReactNode | ProTableColumnProps['dataIndex'])[] | ((index: number, record: any) => (ProActionGroupProps | React.ReactNode | ProTableColumnProps['dataIndex'])[]);
|
360
|
+
/** 标签区域 **/
|
361
|
+
tags?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[] | ((index: number, record: any) => (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[]);
|
362
|
+
/** 分页器条数 **/
|
363
|
+
pageSize?: 12 | 24 | 48 | 96 | number;
|
364
|
+
/** 卡片区域滚动高度 **/
|
365
|
+
scrollHeight?: number | string;
|
366
|
+
/** 自动加载下一页 **/
|
367
|
+
autoLoadNextPage?: boolean;
|
368
|
+
/** 滚动容器 用于监听触底事件 **/
|
369
|
+
scrollDom?: HTMLElement;
|
370
|
+
/** 触底事件 **/
|
371
|
+
onScrollBottom?: () => void;
|
372
|
+
/** 使用表格分页 **/
|
373
|
+
useTablePagination?: boolean;
|
374
|
+
/** 使用响应式 **/
|
375
|
+
cardResponsiveProps?: {
|
376
|
+
xxs?: number;
|
377
|
+
xs?: number;
|
378
|
+
s?: number;
|
379
|
+
m?: number;
|
380
|
+
l?: number;
|
381
|
+
xl?: number;
|
382
|
+
};
|
383
|
+
/** 卡片配置 **/
|
384
|
+
cardProps?: {
|
385
|
+
[key in keyof ProCardProps]?: ProCardProps[key] | ((index: number, record: any) => ProCardProps[key]);
|
386
|
+
};
|
387
|
+
/** 是否展示卡片骨架 **/
|
388
|
+
showSkeleton?: boolean;
|
389
|
+
};
|
390
|
+
/** card 视角 Props (内部组件) **/
|
391
|
+
export declare type ProTableCardViewProps = {
|
392
|
+
/** 卡片视角配置 **/
|
393
|
+
cardViewProps?: ProTableCardProps;
|
394
|
+
/** 数据源 **/
|
395
|
+
dataSource?: any[];
|
396
|
+
/** 原始 columns **/
|
397
|
+
originColumns?: any[];
|
398
|
+
/** 处理过后的 columns **/
|
399
|
+
columns?: any[];
|
400
|
+
/** 加载动画 **/
|
401
|
+
loading?: boolean;
|
402
|
+
/** 上下文 **/
|
403
|
+
context?: any;
|
404
|
+
actionRef?: React.MutableRefObject<ProTableActionType | undefined>;
|
405
|
+
/** 卡片区域滚动高度 **/
|
406
|
+
scrollHeight?: number | string;
|
407
|
+
/** 骨架屏状态 **/
|
408
|
+
showSkeleton?: boolean;
|
409
|
+
/** ProCard 卡片配置 **/
|
410
|
+
cardProps?: ProTableCardProps['cardProps'];
|
411
|
+
/** 表格分页器参数 **/
|
412
|
+
tablePaginationProps?: PaginationProps;
|
413
|
+
/** 空数据配置 **/
|
414
|
+
emptyProps?: ProTableProps['emptyProps'];
|
415
|
+
/** 自定义渲染空数据 **/
|
416
|
+
emptyContent?: ProTableProps['emptyContent'];
|
417
|
+
};
|
418
|
+
export declare type ProTableBindUrlProps = {
|
419
|
+
/** 翻页器区域 **/
|
420
|
+
pagination?: boolean;
|
421
|
+
/** 搜索区域 **/
|
422
|
+
filters?: boolean;
|
423
|
+
/** 表格标题过滤器区域 **/
|
424
|
+
headerFilters?: boolean;
|
425
|
+
};
|
426
|
+
export {};
|
package/lib/table/typing.js
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* 渲染列的逻辑函数
|
3
|
+
*/
|
4
|
+
import React from 'react';
|
5
|
+
import { ProTableColumnProps, ProTableActionType, ProTableProps } from '../typing';
|
6
|
+
/**
|
7
|
+
* 增加了 icon 的功能 render title
|
8
|
+
*/
|
9
|
+
export declare const renderColumnsTitle: (item: ProTableColumnProps, actionRef: React.MutableRefObject<ProTableActionType | undefined>, bindUrl?: ProTableProps['bindUrl'], bindUrlProps?: ProTableProps['bindUrlProps']) => JSX.Element;
|
10
|
+
/**
|
11
|
+
* 负责单元格的具体渲染
|
12
|
+
*/
|
13
|
+
export declare const renderCell: (value: any, item: ProTableColumnProps, index: number, record: any, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string) => JSX.Element;
|
@@ -23,14 +23,13 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
23
23
|
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; }
|
24
24
|
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; }
|
25
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
26
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
27
26
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
28
27
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
29
28
|
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; }
|
30
29
|
/**
|
31
30
|
* 增加了 icon 的功能 render title
|
32
31
|
*/
|
33
|
-
var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
32
|
+
var renderColumnsTitle = function renderColumnsTitle(item, actionRef, bindUrl, bindUrlProps) {
|
34
33
|
var filterMode = item.filterMode,
|
35
34
|
filters = item.filters,
|
36
35
|
dataSource = item.dataSource,
|
@@ -42,18 +41,17 @@ var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
42
41
|
var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2;
|
43
42
|
var selectedItem = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : _actionRef$current$ge2.call(_actionRef$current).filterRules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
|
44
43
|
if (Object.keys(selectedItem).length > 0) {
|
45
|
-
var _selectedItem;
|
46
|
-
if ((_selectedItem = selectedItem[dataIndex]) === null || _selectedItem === void 0 ? void 0 : _selectedItem.params) {
|
47
|
-
var
|
44
|
+
var _selectedItem$dataInd;
|
45
|
+
if ((_selectedItem$dataInd = selectedItem[dataIndex]) === null || _selectedItem$dataInd === void 0 ? void 0 : _selectedItem$dataInd.params) {
|
46
|
+
var _targetFilters$find;
|
48
47
|
// 找到对应的 label
|
49
|
-
var targetFilters =
|
48
|
+
var targetFilters = filters !== null && filters !== void 0 ? filters : [];
|
50
49
|
if (filters === true) {
|
51
|
-
|
52
|
-
targetFilters = (_ref2 = dataSource) !== null && _ref2 !== void 0 ? _ref2 : [];
|
50
|
+
targetFilters = dataSource !== null && dataSource !== void 0 ? dataSource : [];
|
53
51
|
}
|
54
52
|
var label = (_targetFilters$find = targetFilters.find(function (item) {
|
55
|
-
var
|
56
|
-
return item.value === ((
|
53
|
+
var _selectedItem$dataInd2;
|
54
|
+
return item.value === ((_selectedItem$dataInd2 = selectedItem[dataIndex]) === null || _selectedItem$dataInd2 === void 0 ? void 0 : _selectedItem$dataInd2.params);
|
57
55
|
})) === null || _targetFilters$find === void 0 ? void 0 : _targetFilters$find.label;
|
58
56
|
var value = "".concat(item.title, " (").concat(label, ")");
|
59
57
|
return /*#__PURE__*/_react.default.createElement(_field.default, {
|
@@ -88,15 +86,19 @@ var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
88
86
|
icon: item.tooltipIcon
|
89
87
|
}), item.filters && /*#__PURE__*/_react.default.createElement(_Filter.default, {
|
90
88
|
column: item,
|
91
|
-
actionRef: actionRef
|
89
|
+
actionRef: actionRef,
|
90
|
+
bindUrl: bindUrl,
|
91
|
+
bindUrlProps: bindUrlProps
|
92
92
|
}));
|
93
93
|
};
|
94
|
-
|
95
94
|
/**
|
96
95
|
* 负责单元格的具体渲染
|
97
96
|
*/
|
98
97
|
exports.renderColumnsTitle = renderColumnsTitle;
|
99
|
-
var renderCell = function renderCell(value, item, index, record, actionRef, context
|
98
|
+
var renderCell = function renderCell(value, item, index, record, actionRef, /** 接收外部比如 dialog-table 传过来的 context,用于弹窗关闭等 */
|
99
|
+
context,
|
100
|
+
// 用于埋点
|
101
|
+
dataTeamixSpm) {
|
100
102
|
var _actionSchema$actions;
|
101
103
|
var _item$valueType = item.valueType,
|
102
104
|
valueType = _item$valueType === void 0 ? 'text' : _item$valueType,
|
@@ -104,12 +106,10 @@ var renderCell = function renderCell(value, item, index, record, actionRef, cont
|
|
104
106
|
actionSchema = item.actionSchema,
|
105
107
|
dataIndex = item.dataIndex,
|
106
108
|
format = item.format;
|
107
|
-
|
108
109
|
// 如果没传 dataIndex,返回 null
|
109
110
|
if (!dataIndex) {
|
110
111
|
value = null;
|
111
112
|
}
|
112
|
-
|
113
113
|
// 处理 dataIndex 为数组的情况
|
114
114
|
if (Array.isArray(dataIndex)) {
|
115
115
|
value = dataIndex.map(function (item) {
|
@@ -150,7 +150,6 @@ var renderCell = function renderCell(value, item, index, record, actionRef, cont
|
|
150
150
|
});
|
151
151
|
}
|
152
152
|
}
|
153
|
-
|
154
153
|
// 渲染操作组
|
155
154
|
if (actionSchema && ((_actionSchema$actions = actionSchema.actions) === null || _actionSchema$actions === void 0 ? void 0 : _actionSchema$actions.length)) {
|
156
155
|
// 默认 context
|
@@ -160,13 +159,13 @@ var renderCell = function renderCell(value, item, index, record, actionRef, cont
|
|
160
159
|
record: record,
|
161
160
|
action: actionRef.current
|
162
161
|
}, context);
|
163
|
-
return /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup,
|
162
|
+
return /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, _objectSpread(_objectSpread({
|
164
163
|
type: "text"
|
165
|
-
}, actionSchema, {
|
166
|
-
context: _objectSpread(_objectSpread({}, defaultContext), actionSchema.context)
|
164
|
+
}, actionSchema), {}, {
|
165
|
+
context: _objectSpread(_objectSpread({}, defaultContext), actionSchema.context),
|
166
|
+
"data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-columnAction") : undefined
|
167
167
|
}));
|
168
168
|
}
|
169
|
-
|
170
169
|
// dataSource可传函数
|
171
170
|
if (typeof item.dataSource === 'function') {
|
172
171
|
var _item$dataSource;
|
@@ -174,10 +173,10 @@ var renderCell = function renderCell(value, item, index, record, actionRef, cont
|
|
174
173
|
} else {
|
175
174
|
var _item$dataSource2;
|
176
175
|
newDataSource = ((_item$dataSource2 = item.dataSource) !== null && _item$dataSource2 !== void 0 ? _item$dataSource2 : []).map(function (item) {
|
177
|
-
return Object.fromEntries(Object.entries(item).map(function (
|
178
|
-
var
|
179
|
-
k =
|
180
|
-
v =
|
176
|
+
return Object.fromEntries(Object.entries(item).map(function (_ref) {
|
177
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
178
|
+
k = _ref2[0],
|
179
|
+
v = _ref2[1];
|
181
180
|
return [k, (0, _utils.getTargetValue)(v, _objectSpread(_objectSpread({}, record), {}, {
|
182
181
|
record: record,
|
183
182
|
value: value,
|
@@ -186,9 +185,8 @@ var renderCell = function renderCell(value, item, index, record, actionRef, cont
|
|
186
185
|
}));
|
187
186
|
});
|
188
187
|
}
|
189
|
-
|
190
188
|
// 渲染 ProField
|
191
|
-
return /*#__PURE__*/_react.default.createElement(_field.default,
|
189
|
+
return /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread({
|
192
190
|
type: valueType || 'text',
|
193
191
|
value: value,
|
194
192
|
render: newRender,
|
@@ -196,7 +194,6 @@ var renderCell = function renderCell(value, item, index, record, actionRef, cont
|
|
196
194
|
format: format
|
197
195
|
}, props));
|
198
196
|
};
|
199
|
-
|
200
197
|
/**
|
201
198
|
* 处理 render 配置项是函数的情况
|
202
199
|
* @param render ProFieldRender
|
@@ -213,10 +210,10 @@ var processRenderFunction = function processRenderFunction() {
|
|
213
210
|
var record = arguments.length > 3 ? arguments[3] : undefined;
|
214
211
|
// 当 ProField render 类型为 function 时。需要表格预先处理以塞入 record
|
215
212
|
var external = ['linkOnClick', 'link', 'value', 'renderEdit', 'descriptionRenderEdit', 'editPopConfirmProps', 'descriptionEditPopConfirmProps', 'editOnClick', 'descriptionEditOnClick', 'extra', 'prefixExtra'];
|
216
|
-
return Object.fromEntries(Object.entries(render).map(function (
|
217
|
-
var
|
218
|
-
k =
|
219
|
-
v =
|
213
|
+
return Object.fromEntries(Object.entries(render).map(function (_ref3) {
|
214
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
215
|
+
k = _ref4[0],
|
216
|
+
v = _ref4[1];
|
220
217
|
if (typeof v === 'function') {
|
221
218
|
var _v;
|
222
219
|
if (external.includes(k)) {
|
@@ -232,7 +229,6 @@ var processRenderFunction = function processRenderFunction() {
|
|
232
229
|
return [k, v];
|
233
230
|
}));
|
234
231
|
};
|
235
|
-
|
236
232
|
/**
|
237
233
|
* 处理 render 数据,取出 {{xxx}} 匹配值
|
238
234
|
* @param render ProFieldRender
|
@@ -247,10 +243,10 @@ var processBuriedPoint = function processBuriedPoint() {
|
|
247
243
|
return Object.fromEntries([
|
248
244
|
// 默认 ellipsis、descriptionEllipsis 为 true
|
249
245
|
// emptyText 默认为 '-'
|
250
|
-
['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (
|
251
|
-
var
|
252
|
-
k =
|
253
|
-
v =
|
246
|
+
['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (_ref5) {
|
247
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
248
|
+
k = _ref6[0],
|
249
|
+
v = _ref6[1];
|
254
250
|
return [k, (0, _utils.getTargetValue)(v, _objectSpread(_objectSpread({}, record), {}, {
|
255
251
|
record: record,
|
256
252
|
value: value,
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ProTableColumnProps, ProTableActionType, ProTableProps } from '../typing';
|
3
|
+
import { ColumnProps } from '@alicloudfe/components/types/table';
|
4
|
+
declare type FixedColumnProps = ColumnProps & {
|
5
|
+
wordBreak?: string;
|
6
|
+
};
|
7
|
+
/**
|
8
|
+
* ProColumn => Column
|
9
|
+
*/
|
10
|
+
export default function genProColumnToColumn(columns: ProTableColumnProps[],
|
11
|
+
/** 是否渲染骨架屏 */
|
12
|
+
showSkeleton: boolean, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string, bindUrl?: ProTableProps['bindUrl'], bindUrlProps?: ProTableProps['bindUrlProps']): FixedColumnProps[];
|
13
|
+
export {};
|