@teamix/pro 1.5.0 → 1.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/pro.css +1 -1
- package/dist/pro.js +39986 -40902
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +2 -6
- package/es/actions/base.js +8 -21
- package/es/actions/dialog-component.js +3 -13
- package/es/actions/dialog-form.js +41 -79
- package/es/actions/dialog-info.js +1 -5
- package/es/actions/dialog.js +57 -96
- package/es/actions/index.js +94 -161
- package/es/actions/link.js +3 -6
- package/es/actions/request.js +12 -28
- package/es/actions/utils.js +1 -9
- package/es/card/card-container.js +11 -9
- package/es/card/divider.js +2 -9
- package/es/card/index.js +69 -97
- package/es/card/selectable.js +6 -17
- package/es/card/tab.js +3 -14
- package/es/card/utils.js +0 -2
- package/es/form/Components/Editable/index.js +17 -56
- package/es/form/Components/FormGroup/index.js +11 -25
- package/es/form/Components/LightFilter/index.js +22 -33
- package/es/form/Components/ProField/index.js +4 -18
- package/es/form/Components/ProField/mapDateFormat.js +2 -28
- package/es/form/Components/Text/index.js +4 -15
- package/es/form/Filter/AdvancedFilter.js +16 -29
- package/es/form/Filter/Layout.js +11 -24
- package/es/form/Filter/LightFilter.js +17 -24
- package/es/form/Filter/SimpleFilter.js +12 -23
- package/es/form/Filter/index.js +113 -161
- package/es/form/Filter/index2.js +22 -34
- package/es/form/Filter/useBindUrl.js +18 -43
- package/es/form/Filter/useSpecialProps.js +8 -12
- package/es/form/ProForm/addCascadeEffect.js +10 -32
- package/es/form/ProForm/customComponent.js +0 -5
- package/es/form/ProForm/index.js +26 -34
- package/es/form/ProForm/useAutoLayout.js +21 -38
- package/es/form/ProForm/useAutoSubmit.js +3 -9
- package/es/form/ProForm/useFieldRequest.js +0 -5
- package/es/form/ProForm/useFormDisplayValues.js +12 -27
- package/es/form/ProForm/useInitialRequest.js +0 -5
- package/es/form/SchemaForm/adapterComponent.js +1 -3
- package/es/form/SchemaForm/adapterDecorator.js +1 -8
- package/es/form/SchemaForm/adapterType.js +1 -2
- package/es/form/SchemaForm/index.js +82 -105
- package/es/form/SchemaForm/initializeArrayCards.js +0 -6
- package/es/form/SchemaForm/initializeArrayCollapse.js +0 -6
- package/es/form/SchemaForm/initializeArrayItems.js +2 -9
- package/es/form/SchemaForm/initializeArrayTable.js +21 -34
- package/es/form/SchemaForm/initializeDataSource.js +2 -6
- package/es/form/SchemaForm/initializeFormButton.js +14 -29
- package/es/form/SchemaForm/initializeFormCollapse.js +8 -18
- package/es/form/SchemaForm/initializeFormGroup.js +10 -20
- package/es/form/SchemaForm/initializeFormStep.js +11 -23
- package/es/form/SchemaForm/initializeFormTab.js +10 -20
- package/es/form/SchemaForm/initializeReactions.js +9 -32
- package/es/form/SchemaForm/initializeRequest.js +2 -16
- package/es/form/SchemaForm/initializeRules.js +4 -22
- package/es/form/SchemaForm/initializeSelectTable.js +8 -33
- package/es/form/SchemaForm/reactions.js +19 -29
- package/es/form/index.js +4 -9
- package/es/form/utils.js +15 -48
- package/es/form/warning.js +3 -6
- package/es/index-without-icon.js +4 -3
- package/es/index.js +8 -8
- package/es/info/components/InfoGroup/index.js +23 -36
- package/es/info/components/InfoValueItem/index.js +85 -126
- package/es/info/components/ProInfoItem/index.js +13 -20
- package/es/info/components/baseInfo/index.js +14 -23
- package/es/info/components/headerInfo/index.js +8 -20
- package/es/info/components/tableInfo/index.js +22 -50
- package/es/info/index.js +59 -82
- package/es/info/utils/index.js +3 -11
- package/es/layout/index.js +2 -0
- package/es/nocode/configurators/common.js +5 -6
- package/es/nocode/configurators/index.js +1 -3
- package/es/nocode/index.js +7 -5
- package/es/nocode/pages/editor.js +5 -9
- package/es/nocode/pages/index.js +6 -3
- package/es/nocode/pages/playground.js +21 -40
- package/es/nocode/pages/renderer.js +13 -48
- package/es/nocode/playground.js +12 -27
- package/es/page-header/index.js +54 -80
- package/es/sidebar/components/sidebar-container/index.js +46 -74
- package/es/sidebar/components/tree/index.js +92 -130
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +13 -29
- package/es/sidebar/components/tree-node/components/IconAction/index.js +12 -36
- package/es/sidebar/components/tree-node/components/IconSwitch/index.js +12 -24
- package/es/sidebar/components/tree-node/index.js +54 -83
- package/es/sidebar/index.js +73 -87
- package/es/sidebar/utils/action-ref.js +2 -7
- package/es/sidebar/utils/index.js +59 -108
- package/es/table/components/Filter/index.js +41 -72
- package/es/table/components/Layout/index.js +34 -49
- package/es/table/components/Pagination/index.js +35 -66
- package/es/table/components/QuickAction/index.js +6 -13
- package/es/table/components/ToolBar/DensityIcon.js +23 -31
- package/es/table/components/ToolBar/FilterColumnIcon.js +45 -91
- package/es/table/components/ToolBar/FullScreenIcon.js +2 -5
- package/es/table/components/ToolBar/Fullscreen.js +15 -25
- package/es/table/components/ToolBar/RefreshIcon.js +4 -5
- package/es/table/components/ToolBar/index.js +20 -40
- package/es/table/index.js +237 -354
- package/es/table/utils/columnRender.js +52 -87
- package/es/table/utils/genProColumnToColumn.js +3 -13
- package/es/table/utils/index.js +18 -45
- package/es/table/utils/pureColumnRender.js +26 -50
- package/es/table/utils/pureGenProColumnToColumn.js +2 -10
- package/es/table/utils/useTableSelection.js +6 -33
- package/es/templates/List/index.js +6 -15
- package/es/templates/index.js +2 -1
- package/es/timeline/ProTimeLineItem/index.js +30 -66
- package/es/timeline/index.js +11 -25
- package/es/utils/message.js +3 -10
- package/lib/actions/base.js +8 -24
- package/lib/actions/confirm.js +0 -5
- package/lib/actions/danger-confirm.js +0 -5
- package/lib/actions/danger-pop-confirm.js +0 -4
- package/lib/actions/dialog-component.js +3 -19
- package/lib/actions/dialog-form.js +41 -92
- package/lib/actions/dialog-info.js +1 -10
- package/lib/actions/dialog-table.js +0 -5
- package/lib/actions/dialog.js +56 -112
- package/lib/actions/drawer-form.js +0 -3
- package/lib/actions/drawer-info.js +0 -3
- package/lib/actions/drawer-table.js +0 -3
- package/lib/actions/drawer.js +0 -4
- package/lib/actions/error.js +0 -5
- package/lib/actions/index.js +93 -191
- package/lib/actions/link.js +3 -11
- package/lib/actions/notice.js +0 -5
- package/lib/actions/pop-confirm.js +0 -5
- package/lib/actions/request.js +10 -33
- package/lib/actions/utils.js +1 -9
- package/lib/card/card-container.js +6 -13
- package/lib/card/divider.js +2 -11
- package/lib/card/index.js +67 -123
- package/lib/card/selectable.js +6 -24
- package/lib/card/tab.js +3 -18
- package/lib/card/utils.js +0 -6
- package/lib/field/index.js +0 -6
- package/lib/form/Components/Editable/index.js +16 -66
- package/lib/form/Components/FormGroup/index.js +11 -31
- package/lib/form/Components/LightFilter/index.js +22 -45
- package/lib/form/Components/ProField/index.js +4 -25
- package/lib/form/Components/ProField/mapDateFormat.js +2 -32
- package/lib/form/Components/Text/index.js +4 -20
- package/lib/form/Filter/AdvancedFilter.js +16 -37
- package/lib/form/Filter/Layout.js +11 -33
- package/lib/form/Filter/LightFilter.js +17 -32
- package/lib/form/Filter/SimpleFilter.js +10 -29
- package/lib/form/Filter/index.js +112 -181
- package/lib/form/Filter/index2.js +22 -44
- package/lib/form/Filter/useBindUrl.js +18 -47
- package/lib/form/Filter/useSpecialProps.js +6 -13
- package/lib/form/ProForm/addCascadeEffect.js +10 -35
- package/lib/form/ProForm/customComponent.js +0 -8
- package/lib/form/ProForm/index.js +26 -57
- package/lib/form/ProForm/useAutoLayout.js +21 -41
- package/lib/form/ProForm/useAutoSubmit.js +3 -11
- package/lib/form/ProForm/useFieldRequest.js +0 -8
- package/lib/form/ProForm/useFormDisplayValues.js +12 -33
- package/lib/form/ProForm/useInitialRequest.js +0 -6
- package/lib/form/SchemaForm/adapterComponent.js +1 -6
- package/lib/form/SchemaForm/adapterDecorator.js +0 -12
- package/lib/form/SchemaForm/adapterType.js +1 -5
- package/lib/form/SchemaForm/index.js +82 -135
- package/lib/form/SchemaForm/initializeArrayCards.js +0 -7
- package/lib/form/SchemaForm/initializeArrayCollapse.js +0 -7
- package/lib/form/SchemaForm/initializeArrayItems.js +2 -10
- package/lib/form/SchemaForm/initializeArrayTable.js +21 -34
- package/lib/form/SchemaForm/initializeDataSource.js +2 -8
- package/lib/form/SchemaForm/initializeFormButton.js +14 -30
- package/lib/form/SchemaForm/initializeFormCollapse.js +8 -18
- package/lib/form/SchemaForm/initializeFormGroup.js +10 -20
- package/lib/form/SchemaForm/initializeFormStep.js +11 -23
- package/lib/form/SchemaForm/initializeFormTab.js +10 -20
- package/lib/form/SchemaForm/initializeReactions.js +9 -36
- package/lib/form/SchemaForm/initializeRequest.js +2 -18
- package/lib/form/SchemaForm/initializeRules.js +4 -24
- package/lib/form/SchemaForm/initializeSelectTable.js +7 -36
- package/lib/form/SchemaForm/reactions.js +17 -32
- package/lib/form/docs/ActionResponse.js +0 -5
- package/lib/form/index.js +0 -25
- package/lib/form/typing.js +1 -5
- package/lib/form/utils.js +14 -60
- package/lib/form/warning.js +3 -7
- package/lib/hooks/index.js +0 -5
- package/lib/index-without-icon.js +2 -36
- package/lib/index.js +1 -39
- package/lib/info/components/InfoGroup/index.js +23 -46
- package/lib/info/components/InfoValueItem/index.js +85 -141
- package/lib/info/components/ProInfoItem/index.js +14 -29
- package/lib/info/components/baseInfo/index.js +15 -36
- package/lib/info/components/headerInfo/index.js +8 -31
- package/lib/info/components/tableInfo/index.js +22 -62
- package/lib/info/index.js +59 -97
- package/lib/info/typing.js +1 -5
- package/lib/info/utils/index.js +3 -19
- package/lib/info/utils/utils.js +0 -1
- package/lib/nocode/configurators/PageHeader.js +0 -2
- package/lib/nocode/configurators/ProTable.js +0 -2
- package/lib/nocode/configurators/common.js +5 -10
- package/lib/nocode/configurators/index.js +1 -10
- package/lib/nocode/configurators/map.js +0 -5
- package/lib/nocode/index.js +0 -11
- package/lib/nocode/pages/editor.js +5 -19
- package/lib/nocode/pages/index.js +2 -9
- package/lib/nocode/pages/playground.js +21 -57
- package/lib/nocode/pages/renderer.js +13 -59
- package/lib/nocode/playground.js +12 -39
- package/lib/page-container/index.js +0 -6
- package/lib/page-header/index.js +53 -93
- package/lib/sidebar/components/sidebar-container/index.js +46 -86
- package/lib/sidebar/components/tree/index.js +92 -144
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +13 -37
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +12 -47
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +12 -34
- package/lib/sidebar/components/tree-node/index.js +54 -99
- package/lib/sidebar/index.js +73 -103
- package/lib/sidebar/typing.js +1 -5
- package/lib/sidebar/utils/action-ref.js +2 -8
- package/lib/sidebar/utils/index.js +59 -116
- package/lib/skeleton/index.js +0 -6
- package/lib/table/components/EmptyContent/index.js +0 -6
- package/lib/table/components/Filter/index.js +41 -82
- package/lib/table/components/Layout/index.js +35 -63
- package/lib/table/components/Pagination/index.js +35 -76
- package/lib/table/components/QuickAction/index.js +6 -17
- package/lib/table/components/ToolBar/DensityIcon.js +23 -42
- package/lib/table/components/ToolBar/FilterColumnIcon.js +45 -103
- package/lib/table/components/ToolBar/FullScreenIcon.js +3 -12
- package/lib/table/components/ToolBar/Fullscreen.js +15 -32
- package/lib/table/components/ToolBar/RefreshIcon.js +5 -12
- package/lib/table/components/ToolBar/index.js +20 -56
- package/lib/table/index.js +238 -378
- package/lib/table/typing.js +1 -5
- package/lib/table/utils/columnRender.js +51 -100
- package/lib/table/utils/genProColumnToColumn.js +3 -18
- package/lib/table/utils/getTableProps.js +0 -2
- package/lib/table/utils/getTableSortIcons.js +0 -5
- package/lib/table/utils/index.js +16 -53
- package/lib/table/utils/pureColumnRender.js +26 -61
- package/lib/table/utils/pureGenProColumnToColumn.js +2 -11
- package/lib/table/utils/useTableSelection.js +6 -35
- package/lib/templates/Detail/index.js +0 -5
- package/lib/templates/Form/index.js +0 -5
- package/lib/templates/List/index.js +6 -25
- package/lib/templates/index.js +0 -6
- package/lib/timeline/ProTimeLineItem/index.js +30 -77
- package/lib/timeline/index.js +11 -36
- package/lib/timeline/typing.js +1 -5
- package/lib/utils/index.js +0 -6
- package/lib/utils/message.js +3 -15
- package/package.json +5 -6
- package/es/actions/base.d.ts +0 -24
- package/es/actions/confirm.d.ts +0 -7
- package/es/actions/danger-confirm.d.ts +0 -7
- package/es/actions/danger-pop-confirm.d.ts +0 -5
- package/es/actions/dialog-component.d.ts +0 -10
- package/es/actions/dialog-form.d.ts +0 -29
- package/es/actions/dialog-info.d.ts +0 -9
- package/es/actions/dialog-table.d.ts +0 -9
- package/es/actions/dialog.d.ts +0 -40
- package/es/actions/drawer-form.d.ts +0 -6
- package/es/actions/drawer-info.d.ts +0 -6
- package/es/actions/drawer-table.d.ts +0 -6
- package/es/actions/drawer.d.ts +0 -6
- package/es/actions/error.d.ts +0 -7
- package/es/actions/index.d.ts +0 -107
- package/es/actions/link.d.ts +0 -8
- package/es/actions/notice.d.ts +0 -7
- package/es/actions/pop-confirm.d.ts +0 -9
- package/es/actions/request.d.ts +0 -9
- package/es/actions/utils.d.ts +0 -1
- package/es/card/card-container.d.ts +0 -18
- package/es/card/divider.d.ts +0 -6
- package/es/card/index.d.ts +0 -109
- package/es/card/selectable.d.ts +0 -13
- package/es/card/tab.d.ts +0 -6
- package/es/card/utils.d.ts +0 -9
- package/es/field/index.d.ts +0 -3
- package/es/form/Components/Editable/index.d.ts +0 -20
- package/es/form/Components/FormGroup/index.d.ts +0 -13
- package/es/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/es/form/Components/LightFilter/index.d.ts +0 -17
- package/es/form/Components/ProField/index.d.ts +0 -2
- package/es/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/es/form/Components/Text/index.d.ts +0 -7
- package/es/form/Filter/AdvancedFilter.d.ts +0 -7
- package/es/form/Filter/Layout.d.ts +0 -5
- package/es/form/Filter/LightFilter.d.ts +0 -7
- package/es/form/Filter/SimpleFilter.d.ts +0 -7
- package/es/form/Filter/index.d.ts +0 -9
- package/es/form/Filter/index2.d.ts +0 -13
- package/es/form/Filter/useBindUrl.d.ts +0 -2
- package/es/form/Filter/useSpecialProps.d.ts +0 -6
- package/es/form/ProForm/addCascadeEffect.d.ts +0 -2
- package/es/form/ProForm/customComponent.d.ts +0 -3
- package/es/form/ProForm/index.d.ts +0 -5
- package/es/form/ProForm/useAutoLayout.d.ts +0 -9
- package/es/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/es/form/ProForm/useFieldRequest.d.ts +0 -5
- package/es/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/es/form/ProForm/useInitialRequest.d.ts +0 -6
- package/es/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/es/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/es/form/SchemaForm/adapterType.d.ts +0 -5
- package/es/form/SchemaForm/index.d.ts +0 -4
- package/es/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/es/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/es/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/es/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/es/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/es/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/es/form/SchemaForm/initializeRules.d.ts +0 -11
- package/es/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/es/form/SchemaForm/reactions.d.ts +0 -6
- package/es/form/docs/ActionResponse.d.ts +0 -7
- package/es/form/fieldTypeMap.d.ts +0 -7
- package/es/form/index.d.ts +0 -125
- package/es/form/locales/validate.d.ts +0 -159
- package/es/form/schemaNameMap.d.ts +0 -5
- package/es/form/typing.d.ts +0 -192
- package/es/form/utils.d.ts +0 -55
- package/es/form/warning.d.ts +0 -3
- package/es/hooks/index.d.ts +0 -2
- package/es/index-without-icon.d.ts +0 -32
- package/es/index.d.ts +0 -32
- package/es/info/components/InfoGroup/index.d.ts +0 -5
- package/es/info/components/InfoValueItem/index.d.ts +0 -5
- package/es/info/components/ProInfoItem/index.d.ts +0 -5
- package/es/info/components/baseInfo/index.d.ts +0 -8
- package/es/info/components/headerInfo/index.d.ts +0 -8
- package/es/info/components/tableInfo/index.d.ts +0 -7
- package/es/info/index.d.ts +0 -10
- package/es/info/typing.d.ts +0 -218
- package/es/info/utils/index.d.ts +0 -20
- package/es/info/utils/layout.d.ts +0 -2
- package/es/info/utils/utils.d.ts +0 -1
- package/es/layout/index.d.ts +0 -2
- package/es/nocode/configurators/Card.d.ts +0 -3
- package/es/nocode/configurators/PageHeader.d.ts +0 -3
- package/es/nocode/configurators/ProTable.d.ts +0 -3
- package/es/nocode/configurators/common.d.ts +0 -280
- package/es/nocode/configurators/index.d.ts +0 -15
- package/es/nocode/configurators/map.d.ts +0 -2
- package/es/nocode/index.d.ts +0 -8
- package/es/nocode/pages/editor.d.ts +0 -12
- package/es/nocode/pages/index.d.ts +0 -14
- package/es/nocode/pages/playground.d.ts +0 -11
- package/es/nocode/pages/renderer.d.ts +0 -10
- package/es/nocode/playground.d.ts +0 -14
- package/es/page-container/index.d.ts +0 -3
- package/es/page-header/index.d.ts +0 -74
- package/es/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/es/sidebar/components/tree/index.d.ts +0 -6
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/es/sidebar/components/tree-node/index.d.ts +0 -7
- package/es/sidebar/index.d.ts +0 -7
- package/es/sidebar/typing.d.ts +0 -141
- package/es/sidebar/utils/action-ref.d.ts +0 -3
- package/es/sidebar/utils/index.d.ts +0 -361
- package/es/skeleton/index.d.ts +0 -3
- package/es/table/components/EmptyContent/index.d.ts +0 -2
- package/es/table/components/Filter/index.d.ts +0 -9
- package/es/table/components/Layout/index.d.ts +0 -5
- package/es/table/components/Pagination/index.d.ts +0 -7
- package/es/table/components/QuickAction/index.d.ts +0 -10
- package/es/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/es/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/es/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/es/table/components/ToolBar/index.d.ts +0 -5
- package/es/table/index.d.ts +0 -5
- package/es/table/typing.d.ts +0 -302
- package/es/table/utils/columnRender.d.ts +0 -13
- package/es/table/utils/genProColumnToColumn.d.ts +0 -13
- package/es/table/utils/getTableProps.d.ts +0 -2
- package/es/table/utils/getTableSortIcons.d.ts +0 -3
- package/es/table/utils/index.d.ts +0 -19
- package/es/table/utils/pureColumnRender.d.ts +0 -9
- package/es/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/es/table/utils/useTableSelection.d.ts +0 -3
- package/es/templates/Detail/index.d.ts +0 -2
- package/es/templates/Form/index.d.ts +0 -2
- package/es/templates/List/index.d.ts +0 -9
- package/es/templates/index.d.ts +0 -3
- package/es/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/es/timeline/index.d.ts +0 -10
- package/es/timeline/typing.d.ts +0 -106
- package/es/utils/index.d.ts +0 -3
- package/es/utils/message.d.ts +0 -3
- package/lib/actions/base.d.ts +0 -24
- package/lib/actions/confirm.d.ts +0 -7
- package/lib/actions/danger-confirm.d.ts +0 -7
- package/lib/actions/danger-pop-confirm.d.ts +0 -5
- package/lib/actions/dialog-component.d.ts +0 -10
- package/lib/actions/dialog-form.d.ts +0 -29
- package/lib/actions/dialog-info.d.ts +0 -9
- package/lib/actions/dialog-table.d.ts +0 -9
- package/lib/actions/dialog.d.ts +0 -40
- package/lib/actions/drawer-form.d.ts +0 -6
- package/lib/actions/drawer-info.d.ts +0 -6
- package/lib/actions/drawer-table.d.ts +0 -6
- package/lib/actions/drawer.d.ts +0 -6
- package/lib/actions/error.d.ts +0 -7
- package/lib/actions/index.d.ts +0 -107
- package/lib/actions/link.d.ts +0 -8
- package/lib/actions/notice.d.ts +0 -7
- package/lib/actions/pop-confirm.d.ts +0 -9
- package/lib/actions/request.d.ts +0 -9
- package/lib/actions/utils.d.ts +0 -1
- package/lib/card/card-container.d.ts +0 -18
- package/lib/card/divider.d.ts +0 -6
- package/lib/card/index.d.ts +0 -109
- package/lib/card/selectable.d.ts +0 -13
- package/lib/card/tab.d.ts +0 -6
- package/lib/card/utils.d.ts +0 -9
- package/lib/field/index.d.ts +0 -3
- package/lib/form/Components/Editable/index.d.ts +0 -20
- package/lib/form/Components/FormGroup/index.d.ts +0 -13
- package/lib/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/lib/form/Components/LightFilter/index.d.ts +0 -17
- package/lib/form/Components/ProField/index.d.ts +0 -2
- package/lib/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/lib/form/Components/Text/index.d.ts +0 -7
- package/lib/form/Filter/AdvancedFilter.d.ts +0 -7
- package/lib/form/Filter/Layout.d.ts +0 -5
- package/lib/form/Filter/LightFilter.d.ts +0 -7
- package/lib/form/Filter/SimpleFilter.d.ts +0 -7
- package/lib/form/Filter/index.d.ts +0 -9
- package/lib/form/Filter/index2.d.ts +0 -13
- package/lib/form/Filter/useBindUrl.d.ts +0 -2
- package/lib/form/Filter/useSpecialProps.d.ts +0 -6
- package/lib/form/ProForm/addCascadeEffect.d.ts +0 -2
- package/lib/form/ProForm/customComponent.d.ts +0 -3
- package/lib/form/ProForm/index.d.ts +0 -5
- package/lib/form/ProForm/useAutoLayout.d.ts +0 -9
- package/lib/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/lib/form/ProForm/useFieldRequest.d.ts +0 -5
- package/lib/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/lib/form/ProForm/useInitialRequest.d.ts +0 -6
- package/lib/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/lib/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/lib/form/SchemaForm/adapterType.d.ts +0 -5
- package/lib/form/SchemaForm/index.d.ts +0 -4
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/lib/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/lib/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/lib/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/lib/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/lib/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/lib/form/SchemaForm/initializeRules.d.ts +0 -11
- package/lib/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/lib/form/SchemaForm/reactions.d.ts +0 -6
- package/lib/form/docs/ActionResponse.d.ts +0 -7
- package/lib/form/fieldTypeMap.d.ts +0 -7
- package/lib/form/index.d.ts +0 -125
- package/lib/form/locales/validate.d.ts +0 -159
- package/lib/form/schemaNameMap.d.ts +0 -5
- package/lib/form/typing.d.ts +0 -192
- package/lib/form/utils.d.ts +0 -55
- package/lib/form/warning.d.ts +0 -3
- package/lib/hooks/index.d.ts +0 -2
- package/lib/index-without-icon.d.ts +0 -32
- package/lib/index.d.ts +0 -32
- package/lib/info/components/InfoGroup/index.d.ts +0 -5
- package/lib/info/components/InfoValueItem/index.d.ts +0 -5
- package/lib/info/components/ProInfoItem/index.d.ts +0 -5
- package/lib/info/components/baseInfo/index.d.ts +0 -8
- package/lib/info/components/headerInfo/index.d.ts +0 -8
- package/lib/info/components/tableInfo/index.d.ts +0 -7
- package/lib/info/index.d.ts +0 -10
- package/lib/info/typing.d.ts +0 -218
- package/lib/info/utils/index.d.ts +0 -20
- package/lib/info/utils/layout.d.ts +0 -2
- package/lib/info/utils/utils.d.ts +0 -1
- package/lib/layout/index.d.ts +0 -2
- package/lib/nocode/configurators/Card.d.ts +0 -3
- package/lib/nocode/configurators/PageHeader.d.ts +0 -3
- package/lib/nocode/configurators/ProTable.d.ts +0 -3
- package/lib/nocode/configurators/common.d.ts +0 -280
- package/lib/nocode/configurators/index.d.ts +0 -15
- package/lib/nocode/configurators/map.d.ts +0 -2
- package/lib/nocode/index.d.ts +0 -8
- package/lib/nocode/pages/editor.d.ts +0 -12
- package/lib/nocode/pages/index.d.ts +0 -14
- package/lib/nocode/pages/playground.d.ts +0 -11
- package/lib/nocode/pages/renderer.d.ts +0 -10
- package/lib/nocode/playground.d.ts +0 -14
- package/lib/page-container/index.d.ts +0 -3
- package/lib/page-header/index.d.ts +0 -74
- package/lib/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/lib/sidebar/components/tree/index.d.ts +0 -6
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/lib/sidebar/components/tree-node/index.d.ts +0 -7
- package/lib/sidebar/index.d.ts +0 -7
- package/lib/sidebar/typing.d.ts +0 -141
- package/lib/sidebar/utils/action-ref.d.ts +0 -3
- package/lib/sidebar/utils/index.d.ts +0 -361
- package/lib/skeleton/index.d.ts +0 -3
- package/lib/table/components/EmptyContent/index.d.ts +0 -2
- package/lib/table/components/Filter/index.d.ts +0 -9
- package/lib/table/components/Layout/index.d.ts +0 -5
- package/lib/table/components/Pagination/index.d.ts +0 -7
- package/lib/table/components/QuickAction/index.d.ts +0 -10
- package/lib/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/index.d.ts +0 -5
- package/lib/table/index.d.ts +0 -5
- package/lib/table/typing.d.ts +0 -302
- package/lib/table/utils/columnRender.d.ts +0 -13
- package/lib/table/utils/genProColumnToColumn.d.ts +0 -13
- package/lib/table/utils/getTableProps.d.ts +0 -2
- package/lib/table/utils/getTableSortIcons.d.ts +0 -3
- package/lib/table/utils/index.d.ts +0 -19
- package/lib/table/utils/pureColumnRender.d.ts +0 -9
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/lib/table/utils/useTableSelection.d.ts +0 -3
- package/lib/templates/Detail/index.d.ts +0 -2
- package/lib/templates/Form/index.d.ts +0 -2
- package/lib/templates/List/index.d.ts +0 -9
- package/lib/templates/index.d.ts +0 -3
- package/lib/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/lib/timeline/index.d.ts +0 -10
- package/lib/timeline/typing.d.ts +0 -106
- package/lib/utils/index.d.ts +0 -3
- package/lib/utils/message.d.ts +0 -3
|
@@ -1,50 +1,30 @@
|
|
|
1
1
|
var _excluded = ["selectable", "checkable", "editable", "draggable", "disabled", "checkboxDisabled", "isLeaf", "treeNodeProps"];
|
|
2
|
-
|
|
3
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
-
|
|
5
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
|
|
7
4
|
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; }
|
|
8
|
-
|
|
9
5
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
-
|
|
11
6
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
|
-
|
|
13
7
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
|
-
|
|
15
|
-
function _extends() { _extends = Object.assign
|
|
16
|
-
|
|
8
|
+
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
9
|
+
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); }
|
|
17
10
|
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; }
|
|
18
|
-
|
|
19
11
|
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; }
|
|
20
|
-
|
|
21
12
|
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; }
|
|
22
|
-
|
|
23
13
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
24
|
-
|
|
25
14
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
26
|
-
|
|
27
15
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
28
|
-
|
|
29
16
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
30
|
-
|
|
31
17
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
32
|
-
|
|
33
18
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
34
|
-
|
|
35
19
|
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; }
|
|
36
|
-
|
|
37
20
|
export function loop(data, func, aliasMap) {
|
|
38
21
|
var level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
39
|
-
|
|
40
22
|
var _ref = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
23
|
+
_ref$children = _ref.children,
|
|
24
|
+
children = _ref$children === void 0 ? 'children' : _ref$children;
|
|
44
25
|
if (data && data.length > 0) {
|
|
45
26
|
data.forEach(function (item) {
|
|
46
27
|
func(item, level, data);
|
|
47
|
-
|
|
48
28
|
if (Array.isArray(item[children])) {
|
|
49
29
|
loop(item[children], func, {
|
|
50
30
|
children: children
|
|
@@ -53,6 +33,7 @@ export function loop(data, func, aliasMap) {
|
|
|
53
33
|
});
|
|
54
34
|
}
|
|
55
35
|
}
|
|
36
|
+
|
|
56
37
|
/**
|
|
57
38
|
* 深度遍历并查找节点(只保留二级路径)
|
|
58
39
|
* @param data 数据
|
|
@@ -60,38 +41,30 @@ export function loop(data, func, aliasMap) {
|
|
|
60
41
|
* @param aliasMap 标识
|
|
61
42
|
* @returns
|
|
62
43
|
*/
|
|
63
|
-
|
|
64
44
|
export function findNodeWithoutPath(data, predicate, aliasMap) {
|
|
65
45
|
var _ref2 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
46
|
+
_ref2$children = _ref2.children,
|
|
47
|
+
children = _ref2$children === void 0 ? 'children' : _ref2$children;
|
|
48
|
+
// 如果已经没有节点了,结束递归
|
|
70
49
|
if (!(data && data.length)) {
|
|
71
50
|
return [];
|
|
72
51
|
}
|
|
73
|
-
|
|
74
52
|
var newChildren = [];
|
|
75
|
-
|
|
76
53
|
var _iterator = _createForOfIteratorHelper(data),
|
|
77
|
-
|
|
78
|
-
|
|
54
|
+
_step;
|
|
79
55
|
try {
|
|
80
56
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
81
|
-
var
|
|
82
|
-
|
|
83
|
-
if (predicate(node)) {
|
|
57
|
+
var _node = _step.value;
|
|
58
|
+
if (predicate(_node)) {
|
|
84
59
|
var _node$children;
|
|
85
|
-
|
|
86
60
|
// 如果节点符合条件,直接加入新的节点集
|
|
87
|
-
newChildren.push(
|
|
88
|
-
|
|
61
|
+
newChildren.push(_node);
|
|
62
|
+
_node.children = findNodeWithoutPath((_node$children = _node[children]) !== null && _node$children !== void 0 ? _node$children : [], predicate);
|
|
89
63
|
} else {
|
|
90
64
|
var _node$children2;
|
|
91
|
-
|
|
92
65
|
// 如果当前节点不符合条件,递归过滤子节点,
|
|
93
66
|
// 把符合条件的子节点提升上来,并入新节点集
|
|
94
|
-
newChildren.push.apply(newChildren, _toConsumableArray(findNodeWithoutPath((_node$children2 =
|
|
67
|
+
newChildren.push.apply(newChildren, _toConsumableArray(findNodeWithoutPath((_node$children2 = _node[children]) !== null && _node$children2 !== void 0 ? _node$children2 : [], predicate)));
|
|
95
68
|
}
|
|
96
69
|
}
|
|
97
70
|
} catch (err) {
|
|
@@ -99,9 +72,9 @@ export function findNodeWithoutPath(data, predicate, aliasMap) {
|
|
|
99
72
|
} finally {
|
|
100
73
|
_iterator.f();
|
|
101
74
|
}
|
|
102
|
-
|
|
103
75
|
return newChildren;
|
|
104
76
|
}
|
|
77
|
+
|
|
105
78
|
/**
|
|
106
79
|
* 深度遍历并查找节点(保留全部路径)
|
|
107
80
|
* @param data 数据
|
|
@@ -109,47 +82,40 @@ export function findNodeWithoutPath(data, predicate, aliasMap) {
|
|
|
109
82
|
* @param aliasMap 标识
|
|
110
83
|
* @returns
|
|
111
84
|
*/
|
|
112
|
-
|
|
113
85
|
export function findNodeWithPath(data, predicate, aliasMap) {
|
|
114
86
|
var _ref3 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
87
|
+
_ref3$children = _ref3.children,
|
|
88
|
+
children = _ref3$children === void 0 ? 'children' : _ref3$children;
|
|
118
89
|
var getNodes = function getNodes(result, node) {
|
|
119
90
|
if (predicate(node)) {
|
|
120
91
|
result.push(node);
|
|
121
92
|
return result;
|
|
122
93
|
}
|
|
123
|
-
|
|
124
94
|
if (Array.isArray(node[children])) {
|
|
125
95
|
var nodes = node[children].reduce(getNodes, []);
|
|
126
|
-
|
|
127
96
|
if (nodes.length) {
|
|
128
97
|
result.push(_objectSpread(_objectSpread({}, node), {}, {
|
|
129
98
|
nodes: nodes
|
|
130
99
|
}));
|
|
131
100
|
}
|
|
132
101
|
}
|
|
133
|
-
|
|
134
102
|
return result;
|
|
135
103
|
};
|
|
136
|
-
|
|
137
104
|
return data.reduce(getNodes, []);
|
|
138
105
|
}
|
|
106
|
+
|
|
139
107
|
/**
|
|
140
108
|
* 获取树所有节点 key
|
|
141
109
|
* @param data 数据
|
|
142
110
|
* @param aliasMap 标识
|
|
143
111
|
* @returns
|
|
144
112
|
*/
|
|
145
|
-
|
|
146
113
|
export function getAllNodeKey(data, aliasMap) {
|
|
147
114
|
var _ref4 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
115
|
+
_ref4$key = _ref4.key,
|
|
116
|
+
key = _ref4$key === void 0 ? 'value' : _ref4$key,
|
|
117
|
+
_ref4$children = _ref4.children,
|
|
118
|
+
children = _ref4$children === void 0 ? 'children' : _ref4$children;
|
|
153
119
|
var keyList = [];
|
|
154
120
|
loop(data, function (node) {
|
|
155
121
|
keyList.push(node[key]);
|
|
@@ -158,6 +124,7 @@ export function getAllNodeKey(data, aliasMap) {
|
|
|
158
124
|
});
|
|
159
125
|
return keyList;
|
|
160
126
|
}
|
|
127
|
+
|
|
161
128
|
/**
|
|
162
129
|
* 获取当前节点的层级
|
|
163
130
|
* @param data 数据
|
|
@@ -165,14 +132,12 @@ export function getAllNodeKey(data, aliasMap) {
|
|
|
165
132
|
* @param aliasMap 标识
|
|
166
133
|
* @returns
|
|
167
134
|
*/
|
|
168
|
-
|
|
169
135
|
export function getTreeNodeLevel(data, value, aliasMap) {
|
|
170
136
|
var _ref5 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
137
|
+
_ref5$key = _ref5.key,
|
|
138
|
+
key = _ref5$key === void 0 ? 'value' : _ref5$key,
|
|
139
|
+
_ref5$children = _ref5.children,
|
|
140
|
+
children = _ref5$children === void 0 ? 'children' : _ref5$children;
|
|
176
141
|
var result = 0;
|
|
177
142
|
loop(data, function (item, level) {
|
|
178
143
|
if (item[key] === value) {
|
|
@@ -183,18 +148,17 @@ export function getTreeNodeLevel(data, value, aliasMap) {
|
|
|
183
148
|
});
|
|
184
149
|
return result;
|
|
185
150
|
}
|
|
151
|
+
|
|
186
152
|
/**
|
|
187
153
|
* 获取树的层级
|
|
188
154
|
* @param data 数据
|
|
189
155
|
* @param aliasMap 标识
|
|
190
156
|
* @returns
|
|
191
157
|
*/
|
|
192
|
-
|
|
193
158
|
export function getTreeLevel(data, aliasMap) {
|
|
194
159
|
var _ref6 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
160
|
+
_ref6$children = _ref6.children,
|
|
161
|
+
children = _ref6$children === void 0 ? 'children' : _ref6$children;
|
|
198
162
|
var result = 0;
|
|
199
163
|
loop(data, function (item, level) {
|
|
200
164
|
if (result < level) {
|
|
@@ -205,6 +169,7 @@ export function getTreeLevel(data, aliasMap) {
|
|
|
205
169
|
});
|
|
206
170
|
return result + 1;
|
|
207
171
|
}
|
|
172
|
+
|
|
208
173
|
/**
|
|
209
174
|
* 获取树层级对应的所有 key
|
|
210
175
|
* @param data
|
|
@@ -212,16 +177,14 @@ export function getTreeLevel(data, aliasMap) {
|
|
|
212
177
|
* @param aliasMap
|
|
213
178
|
* @returns
|
|
214
179
|
*/
|
|
215
|
-
|
|
216
180
|
export function getTreeLevelKey(data, level, aliasMap) {
|
|
217
181
|
var _ref7 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
182
|
+
_ref7$key = _ref7.key,
|
|
183
|
+
key = _ref7$key === void 0 ? 'value' : _ref7$key,
|
|
184
|
+
_ref7$children = _ref7.children,
|
|
185
|
+
children = _ref7$children === void 0 ? 'children' : _ref7$children;
|
|
186
|
+
var result = [];
|
|
187
|
+
// TODO 此处可做性能优化
|
|
225
188
|
loop(data, function (item, currentLevel) {
|
|
226
189
|
if (currentLevel + 1 <= level) {
|
|
227
190
|
result.push(item === null || item === void 0 ? void 0 : item[key]);
|
|
@@ -231,6 +194,7 @@ export function getTreeLevelKey(data, level, aliasMap) {
|
|
|
231
194
|
});
|
|
232
195
|
return result;
|
|
233
196
|
}
|
|
197
|
+
|
|
234
198
|
/**
|
|
235
199
|
* 深度遍历并查找节点(展开查找到的字节点路径)
|
|
236
200
|
* @param nodes 数据
|
|
@@ -238,38 +202,29 @@ export function getTreeLevelKey(data, level, aliasMap) {
|
|
|
238
202
|
* @param aliasMap 标识
|
|
239
203
|
* @returns
|
|
240
204
|
*/
|
|
241
|
-
|
|
242
205
|
export function filterTreeData(nodes, predicate, aliasMap) {
|
|
243
206
|
if (!(nodes && nodes.length)) {
|
|
244
207
|
return {
|
|
245
208
|
filterTreeValue: []
|
|
246
209
|
};
|
|
247
210
|
}
|
|
248
|
-
|
|
249
211
|
var _ref8 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
212
|
+
_ref8$children = _ref8.children,
|
|
213
|
+
children = _ref8$children === void 0 ? 'children' : _ref8$children;
|
|
253
214
|
var filterTreeValue = [];
|
|
254
|
-
|
|
255
215
|
var _iterator2 = _createForOfIteratorHelper(nodes),
|
|
256
|
-
|
|
257
|
-
|
|
216
|
+
_step2;
|
|
258
217
|
try {
|
|
259
218
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
260
|
-
var
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
if (predicate(node)) {
|
|
265
|
-
var _node$children3;
|
|
266
|
-
|
|
219
|
+
var _node2 = _step2.value;
|
|
220
|
+
var others = _extends({}, (_objectDestructuringEmpty(_node2), _node2));
|
|
221
|
+
if (predicate(_node2)) {
|
|
222
|
+
var _node2$children;
|
|
267
223
|
filterTreeValue.push(_objectSpread(_objectSpread({}, others), {}, {
|
|
268
|
-
children: filterTreeData((
|
|
224
|
+
children: filterTreeData((_node2$children = _node2[children]) !== null && _node2$children !== void 0 ? _node2$children : [], predicate, aliasMap).filterTreeValue
|
|
269
225
|
}));
|
|
270
226
|
} else {
|
|
271
|
-
var subs = filterTreeData(
|
|
272
|
-
|
|
227
|
+
var subs = filterTreeData(_node2[children], predicate, aliasMap);
|
|
273
228
|
if (subs && subs.filterTreeValue.length) {
|
|
274
229
|
filterTreeValue.push(_objectSpread(_objectSpread({}, others), {}, {
|
|
275
230
|
children: subs.filterTreeValue
|
|
@@ -282,28 +237,26 @@ export function filterTreeData(nodes, predicate, aliasMap) {
|
|
|
282
237
|
} finally {
|
|
283
238
|
_iterator2.f();
|
|
284
239
|
}
|
|
285
|
-
|
|
286
240
|
return {
|
|
287
241
|
filterTreeValue: filterTreeValue
|
|
288
242
|
};
|
|
289
243
|
}
|
|
244
|
+
|
|
290
245
|
/**
|
|
291
246
|
* 获取TreeNodeProps
|
|
292
247
|
* @param item
|
|
293
248
|
*/
|
|
294
|
-
|
|
295
249
|
export function getTreeNodeProps(item) {
|
|
296
250
|
var selectable = item.selectable,
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
251
|
+
checkable = item.checkable,
|
|
252
|
+
editable = item.editable,
|
|
253
|
+
draggable = item.draggable,
|
|
254
|
+
disabled = item.disabled,
|
|
255
|
+
checkboxDisabled = item.checkboxDisabled,
|
|
256
|
+
isLeaf = item.isLeaf,
|
|
257
|
+
_item$treeNodeProps = item.treeNodeProps,
|
|
258
|
+
treeNodeProps = _item$treeNodeProps === void 0 ? {} : _item$treeNodeProps,
|
|
259
|
+
others = _objectWithoutProperties(item, _excluded);
|
|
307
260
|
var nodeProps = _objectSpread({
|
|
308
261
|
selectable: selectable,
|
|
309
262
|
checkable: checkable,
|
|
@@ -313,13 +266,11 @@ export function getTreeNodeProps(item) {
|
|
|
313
266
|
checkboxDisabled: checkboxDisabled,
|
|
314
267
|
isLeaf: isLeaf
|
|
315
268
|
}, treeNodeProps);
|
|
316
|
-
|
|
317
269
|
return {
|
|
318
270
|
nodeProps: Object.fromEntries(Object.entries(nodeProps).filter(function (_ref9) {
|
|
319
271
|
var _ref10 = _slicedToArray(_ref9, 2),
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
272
|
+
_ = _ref10[0],
|
|
273
|
+
v = _ref10[1];
|
|
323
274
|
return v !== undefined;
|
|
324
275
|
})),
|
|
325
276
|
labelProps: others
|
|
@@ -1,29 +1,16 @@
|
|
|
1
1
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
-
|
|
3
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
3
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
-
|
|
7
4
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
-
|
|
9
5
|
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; }
|
|
10
|
-
|
|
11
6
|
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; }
|
|
12
|
-
|
|
13
7
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
-
|
|
15
8
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
16
|
-
|
|
17
9
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
|
-
|
|
19
10
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
20
|
-
|
|
21
11
|
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; }
|
|
22
|
-
|
|
23
12
|
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; }
|
|
24
|
-
|
|
25
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
|
-
|
|
27
14
|
// 表格项列筛选
|
|
28
15
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
29
16
|
import TeamixIcon from '@teamix/icon';
|
|
@@ -33,46 +20,41 @@ import './index.scss';
|
|
|
33
20
|
var CheckboxItem = Menu.CheckboxItem;
|
|
34
21
|
var cls = usePrefixCls('teamix-pro-table-toolbar-filter');
|
|
35
22
|
var RadioItem = Menu.RadioItem;
|
|
36
|
-
|
|
37
23
|
var Filter = function Filter(props) {
|
|
38
24
|
var column = props.column,
|
|
39
|
-
|
|
25
|
+
actionRef = props.actionRef;
|
|
40
26
|
var _column$filtersWidth = column.filtersWidth,
|
|
41
|
-
|
|
27
|
+
filtersWidth = _column$filtersWidth === void 0 ? 130 : _column$filtersWidth;
|
|
42
28
|
|
|
29
|
+
// 选中过滤项
|
|
43
30
|
var _useState = useState([]),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
+
selected = _useState2[0],
|
|
33
|
+
setSelected = _useState2[1];
|
|
48
34
|
var _useState3 = useState(false),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
36
|
+
visible = _useState4[0],
|
|
37
|
+
setVisible = _useState4[1];
|
|
53
38
|
useEffect(function () {
|
|
54
39
|
var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3, _actionRef$current$ge4, _actionRef$current$ge5;
|
|
55
|
-
|
|
56
40
|
// 从全局状态中读取上次存储的条件
|
|
57
41
|
var rules = (_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$ge3 = _actionRef$current$ge2.call(_actionRef$current)) === null || _actionRef$current$ge3 === void 0 ? void 0 : (_actionRef$current$ge4 = _actionRef$current$ge3.filterRules) === null || _actionRef$current$ge4 === void 0 ? void 0 : (_actionRef$current$ge5 = _actionRef$current$ge4[column.dataIndex]) === null || _actionRef$current$ge5 === void 0 ? void 0 : _actionRef$current$ge5.rules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : [];
|
|
58
42
|
setSelected(rules);
|
|
59
|
-
}, []);
|
|
43
|
+
}, []);
|
|
60
44
|
|
|
45
|
+
// 获取过滤项
|
|
61
46
|
var filters = useMemo(function () {
|
|
62
47
|
if (Array.isArray(column.filters)) {
|
|
63
48
|
return column.filters;
|
|
64
49
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
var filters = column.dataSource;
|
|
51
|
+
// 转换 valueEnum 为 options
|
|
68
52
|
if (!Array.isArray(column.dataSource)) {
|
|
69
53
|
filters = Object.entries(column.dataSource).map(function (_ref) {
|
|
70
54
|
var _nv$label, _nv$color;
|
|
71
|
-
|
|
72
55
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
56
|
+
k = _ref2[0],
|
|
57
|
+
v = _ref2[1];
|
|
76
58
|
var nv = v;
|
|
77
59
|
return _objectSpread(_objectSpread({
|
|
78
60
|
value: k
|
|
@@ -81,18 +63,18 @@ var Filter = function Filter(props) {
|
|
|
81
63
|
color: (_nv$color = nv.color) !== null && _nv$color !== void 0 ? _nv$color : k
|
|
82
64
|
});
|
|
83
65
|
});
|
|
84
|
-
}
|
|
85
|
-
|
|
66
|
+
}
|
|
67
|
+
// console.log(filters);
|
|
86
68
|
|
|
87
69
|
return filters;
|
|
88
|
-
}, []);
|
|
70
|
+
}, []);
|
|
89
71
|
|
|
72
|
+
// 渲染单选
|
|
90
73
|
var renderSingle = function renderSingle() {
|
|
91
74
|
return filters === null || filters === void 0 ? void 0 : filters.map(function (_ref3) {
|
|
92
75
|
var _value$toString;
|
|
93
|
-
|
|
94
76
|
var label = _ref3.label,
|
|
95
|
-
|
|
77
|
+
value = _ref3.value;
|
|
96
78
|
var valueStr = (_value$toString = value === null || value === void 0 ? void 0 : value.toString()) !== null && _value$toString !== void 0 ? _value$toString : '';
|
|
97
79
|
return /*#__PURE__*/React.createElement(RadioItem, {
|
|
98
80
|
id: valueStr,
|
|
@@ -103,15 +85,14 @@ var Filter = function Filter(props) {
|
|
|
103
85
|
}
|
|
104
86
|
}, label);
|
|
105
87
|
});
|
|
106
|
-
};
|
|
107
|
-
|
|
88
|
+
};
|
|
108
89
|
|
|
90
|
+
// 渲染多选
|
|
109
91
|
var renderMultiple = function renderMultiple() {
|
|
110
92
|
return filters === null || filters === void 0 ? void 0 : filters.map(function (_ref4) {
|
|
111
93
|
var _value$toString2;
|
|
112
|
-
|
|
113
94
|
var label = _ref4.label,
|
|
114
|
-
|
|
95
|
+
value = _ref4.value;
|
|
115
96
|
var valueStr = (_value$toString2 = value === null || value === void 0 ? void 0 : value.toString()) !== null && _value$toString2 !== void 0 ? _value$toString2 : '';
|
|
116
97
|
return /*#__PURE__*/React.createElement(CheckboxItem, {
|
|
117
98
|
key: valueStr,
|
|
@@ -127,17 +108,15 @@ var Filter = function Filter(props) {
|
|
|
127
108
|
}
|
|
128
109
|
}, label);
|
|
129
110
|
});
|
|
130
|
-
};
|
|
131
|
-
|
|
111
|
+
};
|
|
132
112
|
|
|
113
|
+
// 渲染选择区域
|
|
133
114
|
var renderSelect = function renderSelect() {
|
|
134
115
|
if (column.filterMode === 'multiple') {
|
|
135
116
|
return renderMultiple();
|
|
136
117
|
}
|
|
137
|
-
|
|
138
118
|
return renderSingle();
|
|
139
119
|
};
|
|
140
|
-
|
|
141
120
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
142
121
|
trigger: /*#__PURE__*/React.createElement(TeamixIcon, {
|
|
143
122
|
size: "small",
|
|
@@ -173,37 +152,33 @@ var Filter = function Filter(props) {
|
|
|
173
152
|
}),
|
|
174
153
|
onClick: function onClick() {
|
|
175
154
|
var _actionRef$current2, _actionRef$current2$f, _actionRef$current$ge6, _actionRef$current3, _actionRef$current3$g, _actionRef$current3$g2, _actionRef$current4, _actionRef$current4$s, _actionRef$current5, _actionRef$current6, _actionRef$current6$r, _actionRef$current7, _actionRef$current7$r, _actionRef$current8, _actionRef$current8$c;
|
|
155
|
+
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$f = _actionRef$current2.filterDataSource) === null || _actionRef$current2$f === void 0 ? void 0 : _actionRef$current2$f.call(_actionRef$current2, column.dataIndex);
|
|
176
156
|
|
|
177
|
-
|
|
178
|
-
|
|
157
|
+
// 先获取此列的param
|
|
179
158
|
var param = '';
|
|
180
|
-
|
|
181
159
|
if (column.beforeFilter) {
|
|
182
160
|
var _column$beforeFilter;
|
|
183
|
-
|
|
184
161
|
param = (_column$beforeFilter = column.beforeFilter) === null || _column$beforeFilter === void 0 ? void 0 : _column$beforeFilter.call(column, selected);
|
|
185
162
|
} else {
|
|
186
163
|
param = selected.join(',');
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
var rules = (_actionRef$current$ge6 = (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$g = _actionRef$current3.getState) === null || _actionRef$current3$g === void 0 ? void 0 : (_actionRef$current3$g2 = _actionRef$current3$g.call(_actionRef$current3)) === null || _actionRef$current3$g2 === void 0 ? void 0 : _actionRef$current3$g2.filterRules) !== null && _actionRef$current$ge6 !== void 0 ? _actionRef$current$ge6 : {}; // 再设置所有的列筛选状态
|
|
164
|
+
}
|
|
191
165
|
|
|
166
|
+
// 需要带上其他所有的信息
|
|
167
|
+
var rules = (_actionRef$current$ge6 = (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$g = _actionRef$current3.getState) === null || _actionRef$current3$g === void 0 ? void 0 : (_actionRef$current3$g2 = _actionRef$current3$g.call(_actionRef$current3)) === null || _actionRef$current3$g2 === void 0 ? void 0 : _actionRef$current3$g2.filterRules) !== null && _actionRef$current$ge6 !== void 0 ? _actionRef$current$ge6 : {};
|
|
168
|
+
// 再设置所有的列筛选状态
|
|
192
169
|
(_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFilterRules) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
|
|
193
170
|
rules: selected,
|
|
194
171
|
params: param
|
|
195
172
|
})));
|
|
196
173
|
var targetPageKey = 'currentPage';
|
|
197
174
|
var pageInfo = (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : _actionRef$current5.pageInfo;
|
|
198
|
-
|
|
199
175
|
if (pageInfo && (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey)) {
|
|
200
176
|
targetPageKey = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
177
|
+
}
|
|
178
|
+
// 发送请求
|
|
204
179
|
(_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$r = _actionRef$current6.request) === null || _actionRef$current6$r === void 0 ? void 0 : _actionRef$current6$r.call(_actionRef$current6, _defineProperty({}, targetPageKey, 1));
|
|
205
|
-
(_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$r = _actionRef$current7.resetPage) === null || _actionRef$current7$r === void 0 ? void 0 : _actionRef$current7$r.call(_actionRef$current7);
|
|
206
|
-
|
|
180
|
+
(_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$r = _actionRef$current7.resetPage) === null || _actionRef$current7$r === void 0 ? void 0 : _actionRef$current7$r.call(_actionRef$current7);
|
|
181
|
+
// 清空表格选择
|
|
207
182
|
(_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$c = _actionRef$current8.clearRowSelection) === null || _actionRef$current8$c === void 0 ? void 0 : _actionRef$current8$c.call(_actionRef$current8);
|
|
208
183
|
setVisible(false);
|
|
209
184
|
}
|
|
@@ -215,7 +190,6 @@ var Filter = function Filter(props) {
|
|
|
215
190
|
}),
|
|
216
191
|
onClick: function onClick() {
|
|
217
192
|
var _actionRef$current$ge7, _actionRef$current9, _actionRef$current9$g, _actionRef$current9$g2, _actionRef$current10, _actionRef$current10$, _actionRef$current11, _actionRef$current11$;
|
|
218
|
-
|
|
219
193
|
setSelected([]);
|
|
220
194
|
var rules = (_actionRef$current$ge7 = (_actionRef$current9 = actionRef.current) === null || _actionRef$current9 === void 0 ? void 0 : (_actionRef$current9$g = _actionRef$current9.getState) === null || _actionRef$current9$g === void 0 ? void 0 : (_actionRef$current9$g2 = _actionRef$current9$g.call(_actionRef$current9)) === null || _actionRef$current9$g2 === void 0 ? void 0 : _actionRef$current9$g2.filterRules) !== null && _actionRef$current$ge7 !== void 0 ? _actionRef$current$ge7 : {};
|
|
221
195
|
(_actionRef$current10 = actionRef.current) === null || _actionRef$current10 === void 0 ? void 0 : (_actionRef$current10$ = _actionRef$current10.setFilterRules) === null || _actionRef$current10$ === void 0 ? void 0 : _actionRef$current10$.call(_actionRef$current10, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
|
|
@@ -223,26 +197,21 @@ var Filter = function Filter(props) {
|
|
|
223
197
|
params: ''
|
|
224
198
|
})));
|
|
225
199
|
(_actionRef$current11 = actionRef.current) === null || _actionRef$current11 === void 0 ? void 0 : (_actionRef$current11$ = _actionRef$current11.filterDataSource) === null || _actionRef$current11$ === void 0 ? void 0 : _actionRef$current11$.call(_actionRef$current11, column.dataIndex);
|
|
226
|
-
|
|
227
200
|
if (selected.length > 0) {
|
|
228
201
|
var _actionRef$current12, _actionRef$current13, _actionRef$current13$, _actionRef$current14, _actionRef$current14$, _actionRef$current15, _actionRef$current15$;
|
|
229
|
-
|
|
230
202
|
var targetPageKey = 'currentPage';
|
|
231
203
|
var pageInfo = (_actionRef$current12 = actionRef.current) === null || _actionRef$current12 === void 0 ? void 0 : _actionRef$current12.pageInfo;
|
|
232
|
-
|
|
233
204
|
if (pageInfo && (pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey)) {
|
|
234
205
|
targetPageKey = pageInfo === null || pageInfo === void 0 ? void 0 : pageInfo.targetPageKey;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
206
|
+
}
|
|
207
|
+
// 发送请求
|
|
238
208
|
(_actionRef$current13 = actionRef.current) === null || _actionRef$current13 === void 0 ? void 0 : (_actionRef$current13$ = _actionRef$current13.request) === null || _actionRef$current13$ === void 0 ? void 0 : _actionRef$current13$.call(_actionRef$current13, _defineProperty({}, targetPageKey, 1));
|
|
239
|
-
(_actionRef$current14 = actionRef.current) === null || _actionRef$current14 === void 0 ? void 0 : (_actionRef$current14$ = _actionRef$current14.resetPage) === null || _actionRef$current14$ === void 0 ? void 0 : _actionRef$current14$.call(_actionRef$current14);
|
|
240
|
-
|
|
209
|
+
(_actionRef$current14 = actionRef.current) === null || _actionRef$current14 === void 0 ? void 0 : (_actionRef$current14$ = _actionRef$current14.resetPage) === null || _actionRef$current14$ === void 0 ? void 0 : _actionRef$current14$.call(_actionRef$current14);
|
|
210
|
+
// 清空表格选择
|
|
241
211
|
(_actionRef$current15 = actionRef.current) === null || _actionRef$current15 === void 0 ? void 0 : (_actionRef$current15$ = _actionRef$current15.clearRowSelection) === null || _actionRef$current15$ === void 0 ? void 0 : _actionRef$current15$.call(_actionRef$current15);
|
|
242
|
-
}
|
|
243
|
-
|
|
212
|
+
}
|
|
213
|
+
// setVisible(!visible);
|
|
244
214
|
}
|
|
245
215
|
}, getMessage('reset'))))));
|
|
246
216
|
};
|
|
247
|
-
|
|
248
217
|
export default Filter;
|