@teamix/pro 1.5.0 → 1.6.0-beta.1
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.css +1 -1
- package/dist/pro.js +39987 -40903
- 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 +55 -81
- 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 +54 -94
- 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,57 +1,46 @@
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
|
-
|
3
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
4
|
-
|
5
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
6
|
-
|
7
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
8
|
-
|
9
5
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
10
|
-
|
11
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
12
|
-
|
13
7
|
import TeamixIcon from '@teamix/icon';
|
14
8
|
import { usePrefixCls } from '@teamix/utils';
|
15
9
|
import React, { isValidElement, useEffect, useState } from 'react';
|
16
10
|
import ProHoverTooltip from '../HoverTooltip';
|
17
11
|
import './index.scss';
|
18
12
|
var cls = usePrefixCls('teamix-pro-icon-switch');
|
19
|
-
|
20
13
|
var ProIconSwitch = function ProIconSwitch(props) {
|
21
14
|
var visibleProp = props.visible,
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
15
|
+
icon = props.icon,
|
16
|
+
activeIcon = props.activeIcon,
|
17
|
+
onChange = props.onChange,
|
18
|
+
tooltipVisible = props.tooltipVisible,
|
19
|
+
tooltipProps = props.tooltipProps,
|
20
|
+
tooltip = props.tooltip,
|
21
|
+
cancelTooltip = props.cancelTooltip;
|
30
22
|
var _useState = useState(visibleProp !== null && visibleProp !== void 0 ? visibleProp : false),
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
24
|
+
visible = _useState2[0],
|
25
|
+
setVisible = _useState2[1];
|
35
26
|
useEffect(function () {
|
36
27
|
setVisible(visibleProp !== null && visibleProp !== void 0 ? visibleProp : true);
|
37
|
-
}, [visibleProp]);
|
28
|
+
}, [visibleProp]);
|
38
29
|
|
30
|
+
// 点击操作
|
39
31
|
var clickHandle = function clickHandle(e, state) {
|
40
32
|
e.stopPropagation();
|
41
33
|
setVisible(state);
|
42
34
|
onChange === null || onChange === void 0 ? void 0 : onChange(state);
|
43
35
|
};
|
44
|
-
|
45
36
|
if (visible) {
|
46
37
|
if ( /*#__PURE__*/isValidElement(icon)) {
|
47
38
|
return icon;
|
48
39
|
}
|
49
40
|
}
|
50
|
-
|
51
41
|
if ( /*#__PURE__*/isValidElement(activeIcon)) {
|
52
42
|
return activeIcon;
|
53
43
|
}
|
54
|
-
|
55
44
|
return /*#__PURE__*/React.createElement(ProHoverTooltip, {
|
56
45
|
visible: tooltipVisible,
|
57
46
|
tooltip: visible ? cancelTooltip !== null && cancelTooltip !== void 0 ? cancelTooltip : tooltip : tooltip,
|
@@ -69,5 +58,4 @@ var ProIconSwitch = function ProIconSwitch(props) {
|
|
69
58
|
})
|
70
59
|
});
|
71
60
|
};
|
72
|
-
|
73
61
|
export default ProIconSwitch;
|
@@ -1,29 +1,17 @@
|
|
1
1
|
var _excluded = ["type", "action", "props"];
|
2
|
-
|
3
2
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
4
|
-
|
5
|
-
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; }
|
6
|
-
|
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; }
|
8
|
-
|
9
3
|
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
4
|
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
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
14
|
-
|
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; }
|
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; }
|
8
|
+
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); }
|
15
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
16
|
-
|
17
10
|
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
11
|
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
12
|
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
13
|
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
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
26
|
-
|
27
15
|
import { Tree } from '@alicloudfe/components';
|
28
16
|
import { ProActionGroup } from '../../../actions';
|
29
17
|
import { usePrefixCls } from '@teamix/utils';
|
@@ -34,50 +22,44 @@ import ProIconAction from './components/IconAction';
|
|
34
22
|
import ProIconSwitch from './components/IconSwitch';
|
35
23
|
import ProHoverTooltip from './components/HoverTooltip';
|
36
24
|
var cls = usePrefixCls('teamix-pro-sidebar-tree');
|
37
|
-
|
38
25
|
var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
39
26
|
var tag = props.tag,
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
27
|
+
render = props.render,
|
28
|
+
_props$valueType = props.valueType,
|
29
|
+
valueType = _props$valueType === void 0 ? 'text' : _props$valueType,
|
30
|
+
fieldProps = props.fieldProps,
|
31
|
+
extra = props.extra,
|
32
|
+
label = props.label;
|
47
33
|
var _useState = useState(false),
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
35
|
+
extraVisible = _useState2[0],
|
36
|
+
setExtraVisible = _useState2[1];
|
52
37
|
|
38
|
+
// 获取 extra 区域渲染组件
|
53
39
|
var getExtraComponent = function getExtraComponent(type, action, props, others) {
|
54
40
|
var _ref = others !== null && others !== void 0 ? others : {},
|
55
|
-
|
56
|
-
|
57
|
-
|
41
|
+
_ref$hover = _ref.hover,
|
42
|
+
hover = _ref$hover === void 0 ? true : _ref$hover;
|
58
43
|
if (type === 'action') {
|
59
44
|
return /*#__PURE__*/React.createElement(ProHoverTooltip, {
|
60
45
|
visible: !hover || extraVisible,
|
61
|
-
trigger: /*#__PURE__*/React.createElement(ProActionGroup,
|
46
|
+
trigger: /*#__PURE__*/React.createElement(ProActionGroup, _extends({
|
62
47
|
type: "text",
|
63
48
|
actions: action
|
64
49
|
}, props))
|
65
50
|
});
|
66
51
|
}
|
67
|
-
|
68
52
|
if (type === 'iconSwitch') {
|
69
|
-
return /*#__PURE__*/React.createElement(ProIconSwitch,
|
53
|
+
return /*#__PURE__*/React.createElement(ProIconSwitch, _extends({
|
70
54
|
tooltipVisible: !hover || extraVisible
|
71
55
|
}, props));
|
72
56
|
}
|
73
|
-
|
74
57
|
if (type === 'iconAction') {
|
75
|
-
return /*#__PURE__*/React.createElement(ProIconAction,
|
58
|
+
return /*#__PURE__*/React.createElement(ProIconAction, _extends({
|
76
59
|
visible: !hover || extraVisible,
|
77
60
|
action: action
|
78
61
|
}, props));
|
79
62
|
}
|
80
|
-
|
81
63
|
if (type === 'custom') {
|
82
64
|
return /*#__PURE__*/React.createElement(ProHoverTooltip, {
|
83
65
|
className: cls('extra-custom'),
|
@@ -85,22 +67,24 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
85
67
|
trigger: others.trigger
|
86
68
|
});
|
87
69
|
}
|
88
|
-
};
|
89
|
-
|
70
|
+
};
|
90
71
|
|
72
|
+
// 渲染 extra 区域
|
91
73
|
var renderExtra = function renderExtra() {
|
92
|
-
var result = /*#__PURE__*/React.createElement(React.Fragment, null);
|
74
|
+
var result = /*#__PURE__*/React.createElement(React.Fragment, null);
|
93
75
|
|
94
|
-
|
76
|
+
// extra 是否是 action 配置
|
77
|
+
var isActionGroupProps = Array.isArray(extra) && ! /*#__PURE__*/isValidElement(extra === null || extra === void 0 ? void 0 : extra[0]) && Array.isArray(extra === null || extra === void 0 ? void 0 : extra[0]);
|
95
78
|
|
79
|
+
// 直接渲染 action
|
96
80
|
if (isActionGroupProps) {
|
97
81
|
result = /*#__PURE__*/React.createElement(ProActionGroup, {
|
98
82
|
actions: extra,
|
99
83
|
type: "text"
|
100
84
|
});
|
101
|
-
}
|
102
|
-
|
85
|
+
}
|
103
86
|
|
87
|
+
// 大杂烩
|
104
88
|
if (extra && Array.isArray(extra)) {
|
105
89
|
result = /*#__PURE__*/React.createElement(React.Fragment, null, extra.map(function (item, index) {
|
106
90
|
if ( /*#__PURE__*/isValidElement(item) || typeof item === 'string') {
|
@@ -109,64 +93,56 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
109
93
|
className: cls('item-content-extra-item')
|
110
94
|
}, item);
|
111
95
|
}
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
96
|
+
var _ref2 = item,
|
97
|
+
type = _ref2.type,
|
98
|
+
_ref2$action = _ref2.action,
|
99
|
+
action = _ref2$action === void 0 ? {} : _ref2$action,
|
100
|
+
_ref2$props = _ref2.props,
|
101
|
+
props = _ref2$props === void 0 ? {} : _ref2$props,
|
102
|
+
others = _objectWithoutProperties(_ref2, _excluded);
|
120
103
|
return /*#__PURE__*/React.createElement("span", {
|
121
104
|
key: index,
|
122
105
|
className: cls('item-content-extra-item')
|
123
106
|
}, getExtraComponent(type, action, props, others));
|
124
107
|
}));
|
125
108
|
}
|
126
|
-
|
127
109
|
return result;
|
128
|
-
};
|
129
|
-
|
110
|
+
};
|
130
111
|
|
112
|
+
// 鼠标移入
|
131
113
|
var onMouseEnter = function onMouseEnter(e) {
|
132
114
|
var _e$target, _e$target$closest;
|
133
|
-
|
134
115
|
if (e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : (_e$target$closest = _e$target.closest) === null || _e$target$closest === void 0 ? void 0 : _e$target$closest.call(_e$target, '.teamix-pro-sidebar-delete-overlay')) {
|
135
116
|
return;
|
136
117
|
}
|
137
|
-
|
138
118
|
setExtraVisible(true);
|
139
|
-
};
|
140
|
-
|
119
|
+
};
|
141
120
|
|
121
|
+
// 鼠标移出
|
142
122
|
var onMouseLeave = function onMouseLeave(e) {
|
143
123
|
var _e$target2, _e$target2$closest;
|
144
|
-
|
145
124
|
if (e === null || e === void 0 ? void 0 : (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : (_e$target2$closest = _e$target2.closest) === null || _e$target2$closest === void 0 ? void 0 : _e$target2$closest.call(_e$target2, '.teamix-pro-sidebar-delete-overlay')) {
|
146
125
|
return;
|
147
126
|
}
|
148
|
-
|
149
127
|
setExtraVisible(false);
|
150
|
-
};
|
151
|
-
|
128
|
+
};
|
152
129
|
|
130
|
+
// 获取 ProFieldRender
|
153
131
|
var getFieldRender = function getFieldRender() {
|
154
132
|
if (typeof render === 'function') {
|
155
133
|
return render;
|
156
134
|
}
|
157
|
-
|
158
135
|
return _objectSpread({
|
159
136
|
ellipsis: true,
|
160
137
|
emptyText: '-'
|
161
138
|
}, render);
|
162
|
-
};
|
163
|
-
|
139
|
+
};
|
164
140
|
|
141
|
+
// 获取 tag 参数
|
165
142
|
var getTags = function getTags(tags) {
|
166
143
|
if ( /*#__PURE__*/isValidElement(tags)) {
|
167
144
|
return tags;
|
168
145
|
}
|
169
|
-
|
170
146
|
if (Array.isArray(tags)) {
|
171
147
|
return tags.map(function (item) {
|
172
148
|
return _objectSpread({
|
@@ -174,21 +150,19 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
174
150
|
}, item);
|
175
151
|
});
|
176
152
|
}
|
177
|
-
|
178
153
|
if (_typeof(tags) === 'object') {
|
179
154
|
return _objectSpread({
|
180
155
|
size: 'small'
|
181
156
|
}, tags);
|
182
157
|
}
|
183
158
|
};
|
184
|
-
|
185
159
|
return /*#__PURE__*/React.createElement("div", {
|
186
160
|
className: cls('item-context'),
|
187
161
|
onMouseEnter: onMouseEnter,
|
188
162
|
onMouseLeave: onMouseLeave
|
189
163
|
}, /*#__PURE__*/React.createElement("div", {
|
190
164
|
className: cls('item-context-front')
|
191
|
-
}, /*#__PURE__*/React.createElement(ProField,
|
165
|
+
}, /*#__PURE__*/React.createElement(ProField, _extends({
|
192
166
|
value: label,
|
193
167
|
type: valueType,
|
194
168
|
render: getFieldRender()
|
@@ -197,37 +171,34 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
197
171
|
}, renderTags(getTags(tag)))), /*#__PURE__*/React.createElement("div", {
|
198
172
|
className: cls('item-content-extra')
|
199
173
|
}, renderExtra()));
|
200
|
-
};
|
201
|
-
|
174
|
+
};
|
202
175
|
|
176
|
+
// 渲染树节点
|
203
177
|
export function renderTreeNode(data) {
|
204
178
|
return data.map(function (item) {
|
205
179
|
var _getTreeNodeProps = getTreeNodeProps(item),
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
return /*#__PURE__*/React.createElement(Tree.Node, _objectSpread({
|
180
|
+
nodeProps = _getTreeNodeProps.nodeProps,
|
181
|
+
labelProps = _getTreeNodeProps.labelProps;
|
182
|
+
return /*#__PURE__*/React.createElement(Tree.Node, _extends({
|
210
183
|
key: item.value,
|
211
|
-
label: /*#__PURE__*/React.createElement(ProSideBarTreeNode,
|
184
|
+
label: /*#__PURE__*/React.createElement(ProSideBarTreeNode, labelProps)
|
212
185
|
}, nodeProps), item.children && item.children.length > 0 && renderTreeNode(item.children));
|
213
186
|
});
|
214
|
-
}
|
187
|
+
}
|
215
188
|
|
189
|
+
// 渲染树节点 依赖 value
|
216
190
|
export function renderTreeNodeDependenceValue(data, onBeforeRenderNodeEvent, checkedKeys, selectedKeys, allData) {
|
217
191
|
return data.map(function (item) {
|
218
192
|
var newProps = item;
|
219
|
-
|
220
193
|
if (onBeforeRenderNodeEvent) {
|
221
194
|
newProps = onBeforeRenderNodeEvent(item, checkedKeys, selectedKeys, allData !== null && allData !== void 0 ? allData : data);
|
222
195
|
}
|
223
|
-
|
224
196
|
var _getTreeNodeProps2 = getTreeNodeProps(newProps),
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
return /*#__PURE__*/React.createElement(Tree.Node, _objectSpread({
|
197
|
+
nodeProps = _getTreeNodeProps2.nodeProps,
|
198
|
+
labelProps = _getTreeNodeProps2.labelProps;
|
199
|
+
return /*#__PURE__*/React.createElement(Tree.Node, _extends({
|
229
200
|
key: item.value,
|
230
|
-
label: /*#__PURE__*/React.createElement(ProSideBarTreeNode,
|
201
|
+
label: /*#__PURE__*/React.createElement(ProSideBarTreeNode, labelProps)
|
231
202
|
}, nodeProps), item.children && item.children.length > 0 && renderTreeNodeDependenceValue(item.children, onBeforeRenderNodeEvent, checkedKeys, selectedKeys, allData !== null && allData !== void 0 ? allData : data));
|
232
203
|
});
|
233
204
|
}
|
package/es/sidebar/index.js
CHANGED
@@ -1,27 +1,14 @@
|
|
1
1
|
var _excluded = ["selectedKeys", "checkedKeys", "dataSource", "className", "style", "searchOnChange", "showSearch", "onSelect", "onCheck", "treeProps", "cardProps", "actionRef", "onBeforeRenderNodeEvent", "beforeRenderNode", "url", "method", "params", "data", "extendParams", "beforeRequest", "successMsg", "errorMsg", "formatParams", "formatResult", "onSuccess", "onError", "link", "scrollArea", "onExpandAllChange", "onExpandLevelChange"];
|
2
|
-
|
3
|
-
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; }
|
4
|
-
|
5
|
-
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; }
|
6
|
-
|
2
|
+
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); }
|
7
3
|
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; }
|
8
|
-
|
9
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
10
|
-
|
11
5
|
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."); }
|
12
|
-
|
13
6
|
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); }
|
14
|
-
|
15
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
16
|
-
|
17
8
|
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; }
|
18
|
-
|
19
9
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
20
|
-
|
21
10
|
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; }
|
22
|
-
|
23
11
|
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; }
|
24
|
-
|
25
12
|
import React, { useEffect, useRef, useState } from 'react';
|
26
13
|
import './index.scss';
|
27
14
|
import { usePrefixCls, doCommonRequest } from '@teamix/utils';
|
@@ -33,82 +20,82 @@ import debounce from 'lodash.debounce';
|
|
33
20
|
export * from './typing';
|
34
21
|
export * from './utils';
|
35
22
|
var cls = usePrefixCls('teamix-pro-sidebar');
|
36
|
-
|
37
23
|
var ProSidebar = function ProSidebar(props) {
|
38
24
|
var selectedKeys = props.selectedKeys,
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
25
|
+
checkedKeys = props.checkedKeys,
|
26
|
+
dataSourceProp = props.dataSource,
|
27
|
+
_props$className = props.className,
|
28
|
+
className = _props$className === void 0 ? '' : _props$className,
|
29
|
+
style = props.style,
|
30
|
+
searchOnChange = props.searchOnChange,
|
31
|
+
_props$showSearch = props.showSearch,
|
32
|
+
showSearch = _props$showSearch === void 0 ? true : _props$showSearch,
|
33
|
+
onSelect = props.onSelect,
|
34
|
+
onCheck = props.onCheck,
|
35
|
+
treeProps = props.treeProps,
|
36
|
+
cardProps = props.cardProps,
|
37
|
+
actionRefProp = props.actionRef,
|
38
|
+
onBeforeRenderNodeEvent = props.onBeforeRenderNodeEvent,
|
39
|
+
beforeRenderNode = props.beforeRenderNode,
|
40
|
+
_props$url = props.url,
|
41
|
+
url = _props$url === void 0 ? '' : _props$url,
|
42
|
+
_props$method = props.method,
|
43
|
+
method = _props$method === void 0 ? 'post' : _props$method,
|
44
|
+
params = props.params,
|
45
|
+
data = props.data,
|
46
|
+
extendParams = props.extendParams,
|
47
|
+
beforeRequest = props.beforeRequest,
|
48
|
+
successMsg = props.successMsg,
|
49
|
+
errorMsg = props.errorMsg,
|
50
|
+
formatParams = props.formatParams,
|
51
|
+
formatResult = props.formatResult,
|
52
|
+
onSuccess = props.onSuccess,
|
53
|
+
onError = props.onError,
|
54
|
+
link = props.link,
|
55
|
+
_props$scrollArea = props.scrollArea,
|
56
|
+
scrollArea = _props$scrollArea === void 0 ? 'all' : _props$scrollArea,
|
57
|
+
onExpandAllChangeProp = props.onExpandAllChange,
|
58
|
+
onExpandLevelChangeProp = props.onExpandLevelChange,
|
59
|
+
others = _objectWithoutProperties(props, _excluded);
|
60
|
+
|
61
|
+
// 搜索的关键词
|
76
62
|
var _useState = useState(),
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
63
|
+
_useState2 = _slicedToArray(_useState, 2),
|
64
|
+
searchKey = _useState2[0],
|
65
|
+
setSearchKey = _useState2[1];
|
81
66
|
|
67
|
+
// loading 状态
|
82
68
|
var _useState3 = useState(true),
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
69
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
70
|
+
loading = _useState4[0],
|
71
|
+
setLoading = _useState4[1];
|
87
72
|
|
73
|
+
// 数据源
|
88
74
|
var _useState5 = useState(dataSourceProp !== null && dataSourceProp !== void 0 ? dataSourceProp : []),
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
75
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
76
|
+
dataSource = _useState6[0],
|
77
|
+
setDataSource = _useState6[1];
|
93
78
|
|
79
|
+
// 展开全部状态
|
94
80
|
var _useState7 = useState(false),
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
81
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
82
|
+
expandAllState = _useState8[0],
|
83
|
+
setExpandAllState = _useState8[1];
|
99
84
|
|
85
|
+
// 展开层级状态
|
100
86
|
var _useState9 = useState(0),
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
87
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
88
|
+
expandLevelState = _useState10[0],
|
89
|
+
setExpandLevelState = _useState10[1];
|
105
90
|
|
91
|
+
// 树层级
|
106
92
|
var _useState11 = useState(0),
|
107
|
-
|
108
|
-
|
109
|
-
|
93
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
94
|
+
expandLevel = _useState12[0],
|
95
|
+
setExpandLevel = _useState12[1];
|
96
|
+
var actionRef = useRef();
|
110
97
|
|
111
|
-
|
98
|
+
// const requestDataKey = method.toLowerCase() === 'get' ? 'params' : 'data';
|
112
99
|
|
113
100
|
var requestConfig = {
|
114
101
|
url: url,
|
@@ -134,8 +121,9 @@ var ProSidebar = function ProSidebar(props) {
|
|
134
121
|
}, []);
|
135
122
|
useEffect(function () {
|
136
123
|
setDataSource(dataSourceProp !== null && dataSourceProp !== void 0 ? dataSourceProp : []);
|
137
|
-
}, [dataSourceProp]);
|
124
|
+
}, [dataSourceProp]);
|
138
125
|
|
126
|
+
// 请求数据
|
139
127
|
var request = function request() {
|
140
128
|
setLoading(true);
|
141
129
|
doCommonRequest(requestConfig).then(function (resp) {
|
@@ -144,37 +132,36 @@ var ProSidebar = function ProSidebar(props) {
|
|
144
132
|
setLoading(false);
|
145
133
|
});
|
146
134
|
};
|
147
|
-
|
148
135
|
useActionType(actionRefProp !== null && actionRefProp !== void 0 ? actionRefProp : actionRef, {
|
149
136
|
refresh: function refresh() {
|
150
137
|
request();
|
151
138
|
}
|
152
|
-
});
|
139
|
+
});
|
153
140
|
|
141
|
+
// 展开全部变化回调
|
154
142
|
var onExpandAllChange = function onExpandAllChange(status) {
|
155
143
|
setExpandAllState(status);
|
156
144
|
onExpandAllChangeProp === null || onExpandAllChangeProp === void 0 ? void 0 : onExpandAllChangeProp(status);
|
157
|
-
};
|
158
|
-
|
145
|
+
};
|
159
146
|
|
147
|
+
// 展开层级回调
|
160
148
|
var onExpandLevelChange = function onExpandLevelChange(level) {
|
161
149
|
setExpandLevelState(level);
|
162
150
|
onExpandLevelChangeProp === null || onExpandLevelChangeProp === void 0 ? void 0 : onExpandLevelChangeProp(level);
|
163
|
-
};
|
164
|
-
|
151
|
+
};
|
165
152
|
|
153
|
+
// DataSource 变化回调。用于更新层级
|
166
154
|
var onDataSourceChange = function onDataSourceChange(dataSource) {
|
167
155
|
var level = getTreeLevel(dataSource);
|
168
156
|
setExpandLevel(level);
|
169
157
|
};
|
170
|
-
|
171
158
|
return /*#__PURE__*/React.createElement("div", {
|
172
159
|
className: "".concat(cls(_defineProperty({
|
173
160
|
'': true,
|
174
161
|
'scroll-tree': scrollArea === 'tree'
|
175
162
|
}, "deep-".concat(expandLevel), true)), " ").concat(className),
|
176
163
|
style: style
|
177
|
-
}, /*#__PURE__*/React.createElement(ProSidebarContainer,
|
164
|
+
}, /*#__PURE__*/React.createElement(ProSidebarContainer, _extends({
|
178
165
|
searchOnChange: debounce(function (value) {
|
179
166
|
if (showSearch) {
|
180
167
|
searchOnChange === null || searchOnChange === void 0 ? void 0 : searchOnChange(value);
|
@@ -187,7 +174,7 @@ var ProSidebar = function ProSidebar(props) {
|
|
187
174
|
scrollArea: scrollArea,
|
188
175
|
expandLevel: expandLevel,
|
189
176
|
isTree: getTreeLevel(dataSource) > 1 ? true : false
|
190
|
-
}, others
|
177
|
+
}, others, cardProps), loading && /*#__PURE__*/React.createElement(ProSkeletonRaw.SideBar, null), !loading && /*#__PURE__*/React.createElement(ProSidebarTree, _extends({
|
191
178
|
dataSource: dataSource,
|
192
179
|
searchKey: searchKey,
|
193
180
|
onSelect: onSelect,
|
@@ -202,5 +189,4 @@ var ProSidebar = function ProSidebar(props) {
|
|
202
189
|
onDataSourceChange: onDataSourceChange
|
203
190
|
}, treeProps))));
|
204
191
|
};
|
205
|
-
|
206
192
|
export default ProSidebar;
|
@@ -1,15 +1,10 @@
|
|
1
1
|
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; }
|
2
|
-
|
3
2
|
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; }
|
4
|
-
|
5
3
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
-
|
7
4
|
export function useActionType(ref, action) {
|
8
5
|
var _ref$current;
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
var oldActions = (_ref$current = ref.current) !== null && _ref$current !== void 0 ? _ref$current : {};
|
7
|
+
// 合并自定义事件
|
12
8
|
var userAction = _objectSpread(_objectSpread({}, oldActions), action);
|
13
|
-
|
14
9
|
ref.current = userAction;
|
15
10
|
}
|