@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/es/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 {};
|
@@ -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;
|
@@ -8,7 +8,6 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
8
8
|
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; }
|
9
9
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
11
|
-
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); }
|
12
11
|
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; }
|
13
12
|
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; }
|
14
13
|
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; }
|
@@ -20,11 +19,10 @@ import { getTargetValue } from '@teamix/utils';
|
|
20
19
|
import { ProActionGroup } from '../../actions';
|
21
20
|
import ProField, { LabelIconTip } from '../../field';
|
22
21
|
import Filter from '../components/Filter';
|
23
|
-
|
24
22
|
/**
|
25
23
|
* 增加了 icon 的功能 render title
|
26
24
|
*/
|
27
|
-
export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
25
|
+
export var renderColumnsTitle = function renderColumnsTitle(item, actionRef, bindUrl, bindUrlProps) {
|
28
26
|
var filterMode = item.filterMode,
|
29
27
|
filters = item.filters,
|
30
28
|
dataSource = item.dataSource,
|
@@ -36,18 +34,17 @@ export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
36
34
|
var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2;
|
37
35
|
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 : {};
|
38
36
|
if (Object.keys(selectedItem).length > 0) {
|
39
|
-
var _selectedItem;
|
40
|
-
if ((_selectedItem = selectedItem[dataIndex]) === null || _selectedItem === void 0 ? void 0 : _selectedItem.params) {
|
41
|
-
var
|
37
|
+
var _selectedItem$dataInd;
|
38
|
+
if ((_selectedItem$dataInd = selectedItem[dataIndex]) === null || _selectedItem$dataInd === void 0 ? void 0 : _selectedItem$dataInd.params) {
|
39
|
+
var _targetFilters$find;
|
42
40
|
// 找到对应的 label
|
43
|
-
var targetFilters =
|
41
|
+
var targetFilters = filters !== null && filters !== void 0 ? filters : [];
|
44
42
|
if (filters === true) {
|
45
|
-
|
46
|
-
targetFilters = (_ref2 = dataSource) !== null && _ref2 !== void 0 ? _ref2 : [];
|
43
|
+
targetFilters = dataSource !== null && dataSource !== void 0 ? dataSource : [];
|
47
44
|
}
|
48
45
|
var label = (_targetFilters$find = targetFilters.find(function (item) {
|
49
|
-
var
|
50
|
-
return item.value === ((
|
46
|
+
var _selectedItem$dataInd2;
|
47
|
+
return item.value === ((_selectedItem$dataInd2 = selectedItem[dataIndex]) === null || _selectedItem$dataInd2 === void 0 ? void 0 : _selectedItem$dataInd2.params);
|
51
48
|
})) === null || _targetFilters$find === void 0 ? void 0 : _targetFilters$find.label;
|
52
49
|
var value = "".concat(item.title, " (").concat(label, ")");
|
53
50
|
return /*#__PURE__*/React.createElement(ProField, {
|
@@ -82,14 +79,18 @@ export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
82
79
|
icon: item.tooltipIcon
|
83
80
|
}), item.filters && /*#__PURE__*/React.createElement(Filter, {
|
84
81
|
column: item,
|
85
|
-
actionRef: actionRef
|
82
|
+
actionRef: actionRef,
|
83
|
+
bindUrl: bindUrl,
|
84
|
+
bindUrlProps: bindUrlProps
|
86
85
|
}));
|
87
86
|
};
|
88
|
-
|
89
87
|
/**
|
90
88
|
* 负责单元格的具体渲染
|
91
89
|
*/
|
92
|
-
export var renderCell = function renderCell(value, item, index, record, actionRef, context
|
90
|
+
export var renderCell = function renderCell(value, item, index, record, actionRef, /** 接收外部比如 dialog-table 传过来的 context,用于弹窗关闭等 */
|
91
|
+
context,
|
92
|
+
// 用于埋点
|
93
|
+
dataTeamixSpm) {
|
93
94
|
var _actionSchema$actions;
|
94
95
|
var _item$valueType = item.valueType,
|
95
96
|
valueType = _item$valueType === void 0 ? 'text' : _item$valueType,
|
@@ -97,12 +98,10 @@ export var renderCell = function renderCell(value, item, index, record, actionRe
|
|
97
98
|
actionSchema = item.actionSchema,
|
98
99
|
dataIndex = item.dataIndex,
|
99
100
|
format = item.format;
|
100
|
-
|
101
101
|
// 如果没传 dataIndex,返回 null
|
102
102
|
if (!dataIndex) {
|
103
103
|
value = null;
|
104
104
|
}
|
105
|
-
|
106
105
|
// 处理 dataIndex 为数组的情况
|
107
106
|
if (Array.isArray(dataIndex)) {
|
108
107
|
value = dataIndex.map(function (item) {
|
@@ -143,7 +142,6 @@ export var renderCell = function renderCell(value, item, index, record, actionRe
|
|
143
142
|
});
|
144
143
|
}
|
145
144
|
}
|
146
|
-
|
147
145
|
// 渲染操作组
|
148
146
|
if (actionSchema && ((_actionSchema$actions = actionSchema.actions) === null || _actionSchema$actions === void 0 ? void 0 : _actionSchema$actions.length)) {
|
149
147
|
// 默认 context
|
@@ -153,13 +151,13 @@ export var renderCell = function renderCell(value, item, index, record, actionRe
|
|
153
151
|
record: record,
|
154
152
|
action: actionRef.current
|
155
153
|
}, context);
|
156
|
-
return /*#__PURE__*/React.createElement(ProActionGroup,
|
154
|
+
return /*#__PURE__*/React.createElement(ProActionGroup, _objectSpread(_objectSpread({
|
157
155
|
type: "text"
|
158
|
-
}, actionSchema, {
|
159
|
-
context: _objectSpread(_objectSpread({}, defaultContext), actionSchema.context)
|
156
|
+
}, actionSchema), {}, {
|
157
|
+
context: _objectSpread(_objectSpread({}, defaultContext), actionSchema.context),
|
158
|
+
"data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-columnAction") : undefined
|
160
159
|
}));
|
161
160
|
}
|
162
|
-
|
163
161
|
// dataSource可传函数
|
164
162
|
if (typeof item.dataSource === 'function') {
|
165
163
|
var _item$dataSource;
|
@@ -167,10 +165,10 @@ export var renderCell = function renderCell(value, item, index, record, actionRe
|
|
167
165
|
} else {
|
168
166
|
var _item$dataSource2;
|
169
167
|
newDataSource = ((_item$dataSource2 = item.dataSource) !== null && _item$dataSource2 !== void 0 ? _item$dataSource2 : []).map(function (item) {
|
170
|
-
return Object.fromEntries(Object.entries(item).map(function (
|
171
|
-
var
|
172
|
-
k =
|
173
|
-
v =
|
168
|
+
return Object.fromEntries(Object.entries(item).map(function (_ref) {
|
169
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
170
|
+
k = _ref2[0],
|
171
|
+
v = _ref2[1];
|
174
172
|
return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
|
175
173
|
record: record,
|
176
174
|
value: value,
|
@@ -179,9 +177,8 @@ export var renderCell = function renderCell(value, item, index, record, actionRe
|
|
179
177
|
}));
|
180
178
|
});
|
181
179
|
}
|
182
|
-
|
183
180
|
// 渲染 ProField
|
184
|
-
return /*#__PURE__*/React.createElement(ProField,
|
181
|
+
return /*#__PURE__*/React.createElement(ProField, _objectSpread({
|
185
182
|
type: valueType || 'text',
|
186
183
|
value: value,
|
187
184
|
render: newRender,
|
@@ -189,7 +186,6 @@ export var renderCell = function renderCell(value, item, index, record, actionRe
|
|
189
186
|
format: format
|
190
187
|
}, props));
|
191
188
|
};
|
192
|
-
|
193
189
|
/**
|
194
190
|
* 处理 render 配置项是函数的情况
|
195
191
|
* @param render ProFieldRender
|
@@ -205,10 +201,10 @@ var processRenderFunction = function processRenderFunction() {
|
|
205
201
|
var record = arguments.length > 3 ? arguments[3] : undefined;
|
206
202
|
// 当 ProField render 类型为 function 时。需要表格预先处理以塞入 record
|
207
203
|
var external = ['linkOnClick', 'link', 'value', 'renderEdit', 'descriptionRenderEdit', 'editPopConfirmProps', 'descriptionEditPopConfirmProps', 'editOnClick', 'descriptionEditOnClick', 'extra', 'prefixExtra'];
|
208
|
-
return Object.fromEntries(Object.entries(render).map(function (
|
209
|
-
var
|
210
|
-
k =
|
211
|
-
v =
|
204
|
+
return Object.fromEntries(Object.entries(render).map(function (_ref3) {
|
205
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
206
|
+
k = _ref4[0],
|
207
|
+
v = _ref4[1];
|
212
208
|
if (typeof v === 'function') {
|
213
209
|
var _v;
|
214
210
|
if (external.includes(k)) {
|
@@ -224,7 +220,6 @@ var processRenderFunction = function processRenderFunction() {
|
|
224
220
|
return [k, v];
|
225
221
|
}));
|
226
222
|
};
|
227
|
-
|
228
223
|
/**
|
229
224
|
* 处理 render 数据,取出 {{xxx}} 匹配值
|
230
225
|
* @param render ProFieldRender
|
@@ -239,10 +234,10 @@ var processBuriedPoint = function processBuriedPoint() {
|
|
239
234
|
return Object.fromEntries([
|
240
235
|
// 默认 ellipsis、descriptionEllipsis 为 true
|
241
236
|
// emptyText 默认为 '-'
|
242
|
-
['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (
|
243
|
-
var
|
244
|
-
k =
|
245
|
-
v =
|
237
|
+
['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (_ref5) {
|
238
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
239
|
+
k = _ref6[0],
|
240
|
+
v = _ref6[1];
|
246
241
|
return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
|
247
242
|
record: record,
|
248
243
|
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 {};
|