@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
package/es/page-header/index.js
CHANGED
@@ -1,19 +1,14 @@
|
|
1
1
|
var _excluded = ["text", "children"],
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
_excluded2 = ["color", "title", "num", "className"],
|
3
|
+
_excluded3 = ["title", "titleTooltip", "description", "icon", "iconColor", "iconBackgroundType", "iconBackgroundColor", "goback", "operation", "extra", "image", "loading", "breadcrumb", "tags", "data", "info", "children", "className", "style", "tabs"];
|
5
4
|
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; }
|
6
|
-
|
7
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; }
|
8
|
-
|
9
6
|
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; }
|
10
|
-
|
7
|
+
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); }
|
11
8
|
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
9
|
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
10
|
import React from 'react';
|
16
|
-
import {
|
11
|
+
import { useNavigate } from '@teamix/router';
|
17
12
|
import classnames from 'classnames';
|
18
13
|
import TeamixIcon from '@teamix/icon';
|
19
14
|
import { Breadcrumb, Balloon } from '@alicloudfe/components';
|
@@ -25,58 +20,48 @@ import ProInfo from '../info';
|
|
25
20
|
import './index.scss';
|
26
21
|
var cls = usePrefixCls('teamix-pro-page-header');
|
27
22
|
var Tooltip = Balloon.Tooltip;
|
28
|
-
|
29
23
|
var renderNav = function renderNav(breadcrumbs) {
|
30
24
|
if (breadcrumbs && breadcrumbs.length) {
|
31
25
|
return /*#__PURE__*/React.createElement(Breadcrumb, null, breadcrumbs.map(function (b, i) {
|
32
26
|
var text = b.text,
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
return /*#__PURE__*/React.createElement(Breadcrumb.Item, _objectSpread({
|
27
|
+
children = b.children,
|
28
|
+
others = _objectWithoutProperties(b, _excluded);
|
29
|
+
return /*#__PURE__*/React.createElement(Breadcrumb.Item, _extends({
|
37
30
|
key: i
|
38
31
|
}, others), text || children);
|
39
32
|
}));
|
40
33
|
}
|
41
|
-
|
42
34
|
return null;
|
43
35
|
};
|
44
|
-
|
45
36
|
var renderActionGroup = function renderActionGroup(group, defaultProps) {
|
46
37
|
var buttonType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'primary';
|
47
|
-
|
48
38
|
if (!group) {
|
49
39
|
return null;
|
50
40
|
}
|
51
|
-
|
52
41
|
var actionGroup = group;
|
53
|
-
|
54
42
|
if (actionGroup.actions instanceof Array && actionGroup.actions.length) {
|
55
43
|
var actions = actionGroup.actions.map(function (item) {
|
56
44
|
return Object.assign({
|
57
45
|
type: buttonType
|
58
46
|
}, item);
|
59
47
|
});
|
60
|
-
return /*#__PURE__*/React.createElement(ProActionGroup,
|
48
|
+
return /*#__PURE__*/React.createElement(ProActionGroup, _extends({}, defaultProps, actionGroup, {
|
61
49
|
actions: actions
|
62
50
|
}));
|
63
51
|
}
|
64
|
-
|
65
52
|
return group;
|
66
53
|
};
|
67
|
-
|
68
54
|
var getColorAndStyle = function getColorAndStyle(color, backgroundColor, backgroundType) {
|
69
55
|
var _classnames;
|
70
|
-
|
71
56
|
var isColorPresetColor = isPresetColor(color);
|
72
57
|
var isBgColorPresetColor = isPresetColor(backgroundColor);
|
73
58
|
var className = classnames((_classnames = {}, _defineProperty(_classnames, "".concat(getColorClassName(color)), isColorPresetColor), _defineProperty(_classnames, "".concat(getBackgroundColorClassName(backgroundColor)), isBgColorPresetColor), _defineProperty(_classnames, "".concat(cls("bg-type-".concat(backgroundType))), !!backgroundType), _classnames));
|
74
59
|
var styleColor = isColorPresetColor ? getColor(color) : color;
|
75
|
-
var styleBgColor = isBgColorPresetColor ? getColor(backgroundColor) : backgroundColor;
|
60
|
+
var styleBgColor = isBgColorPresetColor ? getColor(backgroundColor) : backgroundColor;
|
61
|
+
// debugger;
|
76
62
|
// console.log('color', color);
|
77
63
|
// console.log('backgroundColor', backgroundColor);
|
78
64
|
// console.log('styleBgColor', styleBgColor);
|
79
|
-
|
80
65
|
var style = {
|
81
66
|
color: styleColor,
|
82
67
|
backgroundColor: styleBgColor
|
@@ -86,24 +71,20 @@ var getColorAndStyle = function getColorAndStyle(color, backgroundColor, backgro
|
|
86
71
|
style: style
|
87
72
|
};
|
88
73
|
};
|
89
|
-
|
90
74
|
var renderData = function renderData(data) {
|
91
75
|
if (!data) {
|
92
76
|
return null;
|
93
77
|
}
|
94
|
-
|
95
78
|
return /*#__PURE__*/React.createElement(React.Fragment, null, data.map(function (item, i) {
|
96
79
|
var color = item.color,
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
80
|
+
title = item.title,
|
81
|
+
num = item.num,
|
82
|
+
customClassName = item.className,
|
83
|
+
others = _objectWithoutProperties(item, _excluded2);
|
102
84
|
var _getColorAndStyle = getColorAndStyle(color),
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
return /*#__PURE__*/React.createElement("div", _objectSpread({
|
85
|
+
className = _getColorAndStyle.className,
|
86
|
+
style = _getColorAndStyle.style;
|
87
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
107
88
|
key: i,
|
108
89
|
className: classnames(cls('data-item'), customClassName)
|
109
90
|
}, others), /*#__PURE__*/React.createElement("div", {
|
@@ -114,85 +95,76 @@ var renderData = function renderData(data) {
|
|
114
95
|
}, num));
|
115
96
|
}));
|
116
97
|
};
|
117
|
-
|
118
98
|
var renderInfo = function renderInfo(info) {
|
119
99
|
if (info === null || info === void 0 ? void 0 : info.columns) {
|
120
|
-
return /*#__PURE__*/React.createElement(ProInfo,
|
100
|
+
return /*#__PURE__*/React.createElement(ProInfo, _extends({
|
121
101
|
type: "header"
|
122
102
|
}, info));
|
123
103
|
}
|
124
|
-
|
125
104
|
return info;
|
126
105
|
};
|
127
|
-
|
128
106
|
var renderTabs = function renderTabs(tabs) {
|
129
107
|
if (tabs) {
|
130
|
-
return /*#__PURE__*/React.createElement(CapsuleTab,
|
108
|
+
return /*#__PURE__*/React.createElement(CapsuleTab, tabs);
|
131
109
|
}
|
132
|
-
|
133
110
|
return null;
|
134
111
|
};
|
135
|
-
|
136
112
|
var ProPageHeader = function ProPageHeader(props) {
|
137
113
|
var title = props.title,
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
114
|
+
titleTooltip = props.titleTooltip,
|
115
|
+
description = props.description,
|
116
|
+
icon = props.icon,
|
117
|
+
iconColor = props.iconColor,
|
118
|
+
_props$iconBackground = props.iconBackgroundType,
|
119
|
+
iconBackgroundType = _props$iconBackground === void 0 ? 'square' : _props$iconBackground,
|
120
|
+
iconBackgroundColor = props.iconBackgroundColor,
|
121
|
+
goback = props.goback,
|
122
|
+
operation = props.operation,
|
123
|
+
extra = props.extra,
|
124
|
+
image = props.image,
|
125
|
+
loading = props.loading,
|
126
|
+
breadcrumb = props.breadcrumb,
|
127
|
+
tags = props.tags,
|
128
|
+
data = props.data,
|
129
|
+
info = props.info,
|
130
|
+
children = props.children,
|
131
|
+
className = props.className,
|
132
|
+
style = props.style,
|
133
|
+
tabs = props.tabs,
|
134
|
+
others = _objectWithoutProperties(props, _excluded3);
|
135
|
+
|
136
|
+
// const history = useHistory();
|
137
|
+
// console.log('history', history);
|
138
|
+
var navigate = useNavigate();
|
139
|
+
// console.log('navigate', useNavigate);
|
159
140
|
|
160
|
-
var history = useHistory();
|
161
141
|
var backgroundImage = image ? "url('".concat(image, "')") : undefined;
|
162
|
-
|
163
142
|
var showList = function showList(list) {
|
164
143
|
var _list$actions;
|
165
|
-
|
166
144
|
if (loading) {
|
167
145
|
return !!list;
|
168
146
|
}
|
169
|
-
|
170
147
|
return list && (list.length > 0 || (list === null || list === void 0 ? void 0 : (_list$actions = list.actions) === null || _list$actions === void 0 ? void 0 : _list$actions.length) > 0);
|
171
148
|
};
|
172
|
-
|
173
149
|
var renderTitle = function renderTitle() {
|
174
150
|
var _getColorAndStyle2 = getColorAndStyle(iconColor, iconBackgroundColor, iconBackgroundType),
|
175
|
-
|
176
|
-
|
177
|
-
|
151
|
+
iconClass = _getColorAndStyle2.className,
|
152
|
+
iconStyle = _getColorAndStyle2.style;
|
178
153
|
var onBack = function onBack(e) {
|
179
154
|
if (!goback) {
|
180
155
|
return;
|
181
156
|
}
|
182
|
-
|
183
157
|
if (typeof goback === 'function') {
|
184
158
|
goback(e);
|
185
159
|
return;
|
186
160
|
}
|
187
|
-
|
188
161
|
if (goback === true) {
|
189
|
-
history.go(-1);
|
162
|
+
// history.go(-1);
|
163
|
+
navigate(-1);
|
190
164
|
return;
|
191
165
|
}
|
192
|
-
|
193
|
-
goToLink(goback, history);
|
166
|
+
goToLink(goback, navigate);
|
194
167
|
};
|
195
|
-
|
196
168
|
return /*#__PURE__*/React.createElement(React.Fragment, null, goback && /*#__PURE__*/React.createElement(TeamixIcon, {
|
197
169
|
className: cls('goback'),
|
198
170
|
onClick: onBack,
|
@@ -215,8 +187,7 @@ var ProPageHeader = function ProPageHeader(props) {
|
|
215
187
|
align: "t"
|
216
188
|
}, titleTooltip)), renderTags(tags, 'large'), renderTabs(tabs !== null && tabs !== void 0 ? tabs : {}));
|
217
189
|
};
|
218
|
-
|
219
|
-
return /*#__PURE__*/React.createElement("header", _objectSpread({
|
190
|
+
return /*#__PURE__*/React.createElement("header", _extends({
|
220
191
|
className: classnames(cls(), className),
|
221
192
|
style: _objectSpread({
|
222
193
|
backgroundImage: loading ? undefined : backgroundImage
|
@@ -250,5 +221,8 @@ var ProPageHeader = function ProPageHeader(props) {
|
|
250
221
|
className: classnames(cls('section'), cls('info'))
|
251
222
|
}, !loading && renderInfo(info), loading && /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Header, null)), children);
|
252
223
|
};
|
224
|
+
export default ProPageHeader;
|
253
225
|
|
254
|
-
|
226
|
+
/**
|
227
|
+
* @deprecated 建议使用 ProPageHeaderBreadcrumbItem 代替
|
228
|
+
*/
|
@@ -1,35 +1,17 @@
|
|
1
1
|
var _excluded = ["children", "searchPlaceholder", "showSearch", "searchProps", "customSearch", "searchOnChange", "message", "messageProps", "customMessage", "scrollArea", "showExpandAll", "showExpandLevel", "onExpandAllChange", "onExpandLevelChange", "expandLevel", "expandLevelState", "expandAllState", "isTree"];
|
2
|
-
|
3
2
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
4
|
-
|
5
3
|
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."); }
|
6
|
-
|
7
4
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
8
|
-
|
9
5
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
10
|
-
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
12
|
-
|
13
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
14
|
-
|
15
|
-
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; }
|
16
|
-
|
6
|
+
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
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
18
|
-
|
19
8
|
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."); }
|
20
|
-
|
21
9
|
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); }
|
22
|
-
|
23
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
24
|
-
|
25
11
|
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; }
|
26
|
-
|
27
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
28
|
-
|
29
13
|
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; }
|
30
|
-
|
31
14
|
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; }
|
32
|
-
|
33
15
|
import { Button, MenuButton, Message } from '@alicloudfe/components';
|
34
16
|
import { ProCard } from '../../../card';
|
35
17
|
import ProField from '@teamix/pro-field';
|
@@ -38,60 +20,54 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
38
20
|
import './index.scss';
|
39
21
|
import TeamixIcon from '@teamix/icon';
|
40
22
|
var cls = usePrefixCls('teamix-pro-sidebar-container');
|
41
|
-
|
42
23
|
var ProSidebarContainer = function ProSidebarContainer(props) {
|
43
24
|
var children = props.children,
|
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
|
-
|
25
|
+
searchPlaceholder = props.searchPlaceholder,
|
26
|
+
_props$showSearch = props.showSearch,
|
27
|
+
showSearch = _props$showSearch === void 0 ? true : _props$showSearch,
|
28
|
+
_props$searchProps = props.searchProps,
|
29
|
+
searchProps = _props$searchProps === void 0 ? {} : _props$searchProps,
|
30
|
+
customSearch = props.customSearch,
|
31
|
+
searchOnChange = props.searchOnChange,
|
32
|
+
message = props.message,
|
33
|
+
_props$messageProps = props.messageProps,
|
34
|
+
messageProps = _props$messageProps === void 0 ? {} : _props$messageProps,
|
35
|
+
customMessage = props.customMessage,
|
36
|
+
scrollArea = props.scrollArea,
|
37
|
+
showExpandAll = props.showExpandAll,
|
38
|
+
showExpandLevel = props.showExpandLevel,
|
39
|
+
onExpandAllChange = props.onExpandAllChange,
|
40
|
+
onExpandLevelChange = props.onExpandLevelChange,
|
41
|
+
_props$expandLevel = props.expandLevel,
|
42
|
+
expandLevel = _props$expandLevel === void 0 ? 1 : _props$expandLevel,
|
43
|
+
_props$expandLevelSta = props.expandLevelState,
|
44
|
+
expandLevelStateProp = _props$expandLevelSta === void 0 ? 1 : _props$expandLevelSta,
|
45
|
+
_props$expandAllState = props.expandAllState,
|
46
|
+
expandAllStateProp = _props$expandAllState === void 0 ? false : _props$expandAllState,
|
47
|
+
isTree = props.isTree,
|
48
|
+
others = _objectWithoutProperties(props, _excluded);
|
69
49
|
var ref = useRef();
|
70
|
-
|
71
50
|
var _useState = useState('auto'),
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
52
|
+
treeHeight = _useState2[0],
|
53
|
+
setTreeHeight = _useState2[1];
|
76
54
|
|
55
|
+
// 展开全部状态
|
77
56
|
var _useState3 = useState(false),
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
57
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
58
|
+
expandAllState = _useState4[0],
|
59
|
+
setExpandAllState = _useState4[1];
|
82
60
|
|
61
|
+
// 展开层级状态
|
83
62
|
var _useState5 = useState(1),
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
63
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
64
|
+
expandLevelState = _useState6[0],
|
65
|
+
setExpandLevelState = _useState6[1];
|
88
66
|
useEffect(function () {
|
89
67
|
// 设置滚动区域
|
90
68
|
if (scrollArea === 'tree') {
|
91
69
|
var _ref$current$offsetTo, _ref$current;
|
92
|
-
|
93
70
|
var remainHeight = (_ref$current$offsetTo = ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.offsetTop) !== null && _ref$current$offsetTo !== void 0 ? _ref$current$offsetTo : 0 + 40;
|
94
|
-
|
95
71
|
if (remainHeight > 0) {
|
96
72
|
setTreeHeight("calc(100% - ".concat(remainHeight, "px + 16px)"));
|
97
73
|
}
|
@@ -108,13 +84,14 @@ var ProSidebarContainer = function ProSidebarContainer(props) {
|
|
108
84
|
setTimeout(function () {
|
109
85
|
onExpandAllChange === null || onExpandAllChange === void 0 ? void 0 : onExpandAllChange(expandAllStateProp);
|
110
86
|
});
|
111
|
-
}, [expandAllStateProp]);
|
87
|
+
}, [expandAllStateProp]);
|
112
88
|
|
89
|
+
// 渲染搜索区域
|
113
90
|
var renderSearch = function renderSearch() {
|
114
91
|
if (customSearch || showSearch) {
|
115
92
|
return /*#__PURE__*/React.createElement("div", {
|
116
93
|
className: cls('search')
|
117
|
-
}, !!customSearch && customSearch, showSearch && /*#__PURE__*/React.createElement(ProField,
|
94
|
+
}, !!customSearch && customSearch, showSearch && /*#__PURE__*/React.createElement(ProField, _extends({
|
118
95
|
mode: "edit",
|
119
96
|
type: "text",
|
120
97
|
placeholder: searchPlaceholder,
|
@@ -122,32 +99,29 @@ var ProSidebarContainer = function ProSidebarContainer(props) {
|
|
122
99
|
onChange: searchOnChange
|
123
100
|
}, searchProps)));
|
124
101
|
}
|
125
|
-
|
126
102
|
return null;
|
127
|
-
};
|
128
|
-
|
103
|
+
};
|
129
104
|
|
105
|
+
// 渲染通知区域
|
130
106
|
var renderNotice = function renderNotice() {
|
131
107
|
if (message || customMessage) {
|
132
108
|
return /*#__PURE__*/React.createElement("div", {
|
133
109
|
className: cls('notice')
|
134
|
-
}, message && /*#__PURE__*/React.createElement(Message,
|
110
|
+
}, message && /*#__PURE__*/React.createElement(Message, _extends({
|
135
111
|
type: "notice",
|
136
112
|
closeable: true
|
137
|
-
}, messageProps
|
113
|
+
}, messageProps, {
|
138
114
|
onClose: function onClose() {
|
139
115
|
var _ref$current$offsetTo2, _ref$current2;
|
140
|
-
|
141
116
|
var remainHeight = (_ref$current$offsetTo2 = ref === null || ref === void 0 ? void 0 : (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.offsetTop) !== null && _ref$current$offsetTo2 !== void 0 ? _ref$current$offsetTo2 : 0 + 40;
|
142
117
|
setTreeHeight("calc(100% - ".concat(remainHeight, "px + 56px)"));
|
143
118
|
}
|
144
119
|
}), message), !!customMessage && customMessage);
|
145
120
|
}
|
146
|
-
|
147
121
|
return null;
|
148
|
-
};
|
149
|
-
|
122
|
+
};
|
150
123
|
|
124
|
+
// 渲染折叠区
|
151
125
|
var renderFold = function renderFold() {
|
152
126
|
if (showExpandAll || showExpandLevel) {
|
153
127
|
return /*#__PURE__*/React.createElement("div", {
|
@@ -177,13 +151,12 @@ var ProSidebarContainer = function ProSidebarContainer(props) {
|
|
177
151
|
})));
|
178
152
|
}
|
179
153
|
};
|
180
|
-
|
181
154
|
return /*#__PURE__*/React.createElement("div", {
|
182
155
|
className: cls({
|
183
156
|
'': true,
|
184
157
|
'not-is-tree': !isTree
|
185
158
|
})
|
186
|
-
}, /*#__PURE__*/React.createElement(ProCard,
|
159
|
+
}, /*#__PURE__*/React.createElement(ProCard, _extends({
|
187
160
|
bordered: false,
|
188
161
|
compacted: true
|
189
162
|
}, others), renderSearch(), renderNotice(), renderFold(), /*#__PURE__*/React.createElement("div", {
|
@@ -194,5 +167,4 @@ var ProSidebarContainer = function ProSidebarContainer(props) {
|
|
194
167
|
}
|
195
168
|
}, children)));
|
196
169
|
};
|
197
|
-
|
198
170
|
export default ProSidebarContainer;
|