@teamix/pro 1.6.0-beta.5 → 2.0.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -2
- package/es/index-without-icon.d.ts +13 -13
- package/es/index-without-icon.js +31 -31
- package/es/index.d.ts +21 -32
- package/es/index.js +40 -36
- package/es/nocode/configurators/PageHeader.js +1 -1
- package/es/nocode/configurators/ProTable.js +1 -1
- package/es/nocode/configurators/index.js +1 -1
- package/es/nocode/configurators/map.js +3 -3
- package/es/nocode/index.js +8 -6
- package/es/nocode/pages/editor.js +1 -1
- package/es/nocode/pages/index.js +7 -4
- package/es/nocode/pages/playground.js +9 -11
- package/es/nocode/pages/renderer.d.ts +1 -1
- package/es/nocode/pages/renderer.js +12 -12
- package/es/nocode/playground.js +5 -7
- package/es/templates/Detail/index.d.ts +1 -0
- package/es/templates/Detail/index.js +1 -1
- package/es/templates/Form/index.d.ts +1 -0
- package/es/templates/Form/index.js +1 -1
- package/es/templates/List/index.d.ts +6 -3
- package/es/templates/List/index.js +7 -9
- package/es/templates/index.js +3 -3
- package/lib/index-without-icon.d.ts +13 -13
- package/lib/index-without-icon.js +57 -57
- package/lib/index.d.ts +21 -32
- package/lib/index.js +57 -170
- package/lib/nocode/pages/index.js +1 -1
- package/lib/nocode/pages/playground.js +5 -7
- package/lib/nocode/pages/renderer.d.ts +1 -1
- package/lib/nocode/pages/renderer.js +12 -12
- package/lib/nocode/playground.js +4 -6
- package/lib/templates/Detail/index.d.ts +1 -0
- package/lib/templates/Form/index.d.ts +1 -0
- package/lib/templates/List/index.d.ts +6 -3
- package/lib/templates/List/index.js +6 -8
- package/package.json +17 -6
- package/dist/pro.all.min.css +0 -1
- package/dist/pro.css +0 -1
- package/dist/pro.js +0 -115784
- package/dist/pro.min.js.LICENSE.txt +0 -47
- package/dist/pro.xconsole.min.css +0 -1
- package/es/actions/base.d.ts +0 -24
- package/es/actions/base.js +0 -64
- package/es/actions/confirm.d.ts +0 -7
- package/es/actions/confirm.js +0 -11
- package/es/actions/danger-confirm.d.ts +0 -7
- package/es/actions/danger-confirm.js +0 -14
- package/es/actions/danger-pop-confirm.d.ts +0 -5
- package/es/actions/danger-pop-confirm.js +0 -10
- package/es/actions/dialog-component.d.ts +0 -10
- package/es/actions/dialog-component.js +0 -19
- package/es/actions/dialog-form.d.ts +0 -29
- package/es/actions/dialog-form.js +0 -211
- package/es/actions/dialog-info.d.ts +0 -9
- package/es/actions/dialog-info.js +0 -19
- package/es/actions/dialog-table.d.ts +0 -9
- package/es/actions/dialog-table.js +0 -10
- package/es/actions/dialog.d.ts +0 -40
- package/es/actions/dialog.js +0 -223
- package/es/actions/drawer-form.d.ts +0 -6
- package/es/actions/drawer-form.js +0 -7
- package/es/actions/drawer-info.d.ts +0 -6
- package/es/actions/drawer-info.js +0 -7
- package/es/actions/drawer-table.d.ts +0 -6
- package/es/actions/drawer-table.js +0 -7
- package/es/actions/drawer.d.ts +0 -6
- package/es/actions/drawer.js +0 -7
- package/es/actions/error.d.ts +0 -7
- package/es/actions/error.js +0 -11
- package/es/actions/index.d.ts +0 -114
- package/es/actions/index.js +0 -436
- package/es/actions/index.scss +0 -141
- package/es/actions/link.d.ts +0 -8
- package/es/actions/link.js +0 -15
- package/es/actions/notice.d.ts +0 -7
- package/es/actions/notice.js +0 -11
- package/es/actions/pop-confirm.d.ts +0 -9
- package/es/actions/pop-confirm.js +0 -9
- package/es/actions/quick.d.ts +0 -2
- package/es/actions/quick.js +0 -26
- package/es/actions/request.d.ts +0 -9
- package/es/actions/request.js +0 -48
- package/es/actions/utils.d.ts +0 -1
- package/es/actions/utils.js +0 -19
- package/es/card/card-container.d.ts +0 -18
- package/es/card/card-container.js +0 -19
- package/es/card/divider.d.ts +0 -6
- package/es/card/divider.js +0 -11
- package/es/card/index.d.ts +0 -109
- package/es/card/index.js +0 -284
- package/es/card/index.scss +0 -313
- package/es/card/selectable.d.ts +0 -13
- package/es/card/selectable.js +0 -36
- package/es/card/tab.d.ts +0 -6
- package/es/card/tab.js +0 -18
- package/es/card/utils.d.ts +0 -9
- package/es/card/utils.js +0 -28
- package/es/card/xconsole.scss +0 -3
- package/es/field/index.d.ts +0 -3
- package/es/field/index.js +0 -3
- package/es/form/Components/Editable/index.d.ts +0 -20
- package/es/form/Components/Editable/index.js +0 -193
- package/es/form/Components/FormGroup/index.d.ts +0 -14
- package/es/form/Components/FormGroup/index.js +0 -78
- package/es/form/Components/FormGroup/index.scss +0 -23
- package/es/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/es/form/Components/LightFilter/componentMap.js +0 -7
- package/es/form/Components/LightFilter/index.d.ts +0 -17
- package/es/form/Components/LightFilter/index.js +0 -122
- package/es/form/Components/LightFilter/index.scss +0 -89
- package/es/form/Components/ProField/index.d.ts +0 -2
- package/es/form/Components/ProField/index.js +0 -31
- package/es/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/es/form/Components/ProField/mapDateFormat.js +0 -86
- package/es/form/Components/Text/index.d.ts +0 -8
- package/es/form/Components/Text/index.js +0 -20
- package/es/form/Components/Text/index.scss +0 -8
- package/es/form/Filter/AdvancedFilter.d.ts +0 -7
- package/es/form/Filter/AdvancedFilter.js +0 -112
- package/es/form/Filter/Layout.d.ts +0 -5
- package/es/form/Filter/Layout.js +0 -68
- package/es/form/Filter/LightFilter.d.ts +0 -7
- package/es/form/Filter/LightFilter.js +0 -94
- package/es/form/Filter/SimpleFilter.d.ts +0 -7
- package/es/form/Filter/SimpleFilter.js +0 -88
- package/es/form/Filter/index.d.ts +0 -9
- package/es/form/Filter/index.js +0 -511
- package/es/form/Filter/index.scss +0 -48
- package/es/form/Filter/index2.d.ts +0 -13
- package/es/form/Filter/index2.js +0 -162
- package/es/form/Filter/index2.scss +0 -26
- package/es/form/Filter/layout.scss +0 -40
- package/es/form/Filter/useBindUrl.d.ts +0 -2
- package/es/form/Filter/useBindUrl.js +0 -90
- package/es/form/Filter/useSpecialProps.d.ts +0 -6
- package/es/form/Filter/useSpecialProps.js +0 -32
- package/es/form/ProForm/addCascadeEffect.d.ts +0 -2
- package/es/form/ProForm/addCascadeEffect.js +0 -203
- package/es/form/ProForm/customComponent.d.ts +0 -3
- package/es/form/ProForm/customComponent.js +0 -16
- package/es/form/ProForm/index.d.ts +0 -5
- package/es/form/ProForm/index.js +0 -155
- package/es/form/ProForm/index.scss +0 -411
- package/es/form/ProForm/useAutoLayout.d.ts +0 -9
- package/es/form/ProForm/useAutoLayout.js +0 -93
- package/es/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/es/form/ProForm/useAutoSubmit.js +0 -23
- package/es/form/ProForm/useFieldRequest.d.ts +0 -5
- package/es/form/ProForm/useFieldRequest.js +0 -14
- package/es/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/es/form/ProForm/useFormDisplayValues.js +0 -78
- package/es/form/ProForm/useInitialRequest.d.ts +0 -6
- package/es/form/ProForm/useInitialRequest.js +0 -10
- package/es/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/es/form/SchemaForm/adapterComponent.js +0 -14
- package/es/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/es/form/SchemaForm/adapterDecorator.js +0 -20
- package/es/form/SchemaForm/adapterType.d.ts +0 -5
- package/es/form/SchemaForm/adapterType.js +0 -52
- package/es/form/SchemaForm/index.d.ts +0 -4
- package/es/form/SchemaForm/index.js +0 -209
- package/es/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayCards.js +0 -18
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayCollapse.js +0 -18
- package/es/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayItems.js +0 -31
- package/es/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayTable.js +0 -78
- package/es/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/es/form/SchemaForm/initializeDataSource.js +0 -19
- package/es/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormButton.js +0 -74
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormCollapse.js +0 -33
- package/es/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormGroup.js +0 -36
- package/es/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/es/form/SchemaForm/initializeFormStep.js +0 -50
- package/es/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormTab.js +0 -43
- package/es/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/es/form/SchemaForm/initializeReactions.js +0 -65
- package/es/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/es/form/SchemaForm/initializeRequest.js +0 -38
- package/es/form/SchemaForm/initializeRules.d.ts +0 -11
- package/es/form/SchemaForm/initializeRules.js +0 -46
- package/es/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/es/form/SchemaForm/initializeSelectTable.js +0 -83
- package/es/form/SchemaForm/reactions.d.ts +0 -6
- package/es/form/SchemaForm/reactions.js +0 -88
- package/es/form/docs/ActionResponse.d.ts +0 -8
- package/es/form/docs/ActionResponse.js +0 -11
- package/es/form/docs/ActionResponse.less +0 -25
- package/es/form/fieldTypeMap.d.ts +0 -7
- package/es/form/fieldTypeMap.js +0 -46
- package/es/form/global.scss +0 -14
- package/es/form/index.d.ts +0 -125
- package/es/form/index.js +0 -44
- package/es/form/locales/validate.d.ts +0 -159
- package/es/form/locales/validate.js +0 -158
- package/es/form/schemaNameMap.d.ts +0 -5
- package/es/form/schemaNameMap.js +0 -50
- package/es/form/typing.d.ts +0 -194
- package/es/form/typing.js +0 -1
- package/es/form/utils/parseSchema.d.ts +0 -3
- package/es/form/utils/parseSchema.js +0 -38
- package/es/form/utils.d.ts +0 -55
- package/es/form/utils.js +0 -155
- package/es/form/warning.d.ts +0 -3
- package/es/form/warning.js +0 -11
- package/es/image/index.d.ts +0 -22
- package/es/image/index.js +0 -73
- package/es/image/index.scss +0 -3
- package/es/info/components/InfoGroup/index.d.ts +0 -5
- package/es/info/components/InfoGroup/index.js +0 -86
- package/es/info/components/InfoGroup/index.scss +0 -64
- package/es/info/components/InfoValueItem/index.d.ts +0 -5
- package/es/info/components/InfoValueItem/index.js +0 -302
- package/es/info/components/InfoValueItem/index.scss +0 -26
- package/es/info/components/ProInfoItem/index.d.ts +0 -5
- package/es/info/components/ProInfoItem/index.js +0 -92
- package/es/info/components/ProInfoItem/index.scss +0 -76
- package/es/info/components/baseInfo/index.d.ts +0 -8
- package/es/info/components/baseInfo/index.js +0 -95
- package/es/info/components/baseInfo/index.scss +0 -6
- package/es/info/components/headerInfo/index.d.ts +0 -8
- package/es/info/components/headerInfo/index.js +0 -68
- package/es/info/components/headerInfo/index.scss +0 -3
- package/es/info/components/tableInfo/index.d.ts +0 -7
- package/es/info/components/tableInfo/index.js +0 -154
- package/es/info/components/tableInfo/index.scss +0 -18
- package/es/info/index.d.ts +0 -6
- package/es/info/index.js +0 -182
- package/es/info/index.scss +0 -9
- package/es/info/typing.d.ts +0 -220
- package/es/info/typing.js +0 -1
- package/es/info/utils/index.d.ts +0 -20
- package/es/info/utils/index.js +0 -49
- package/es/info/utils/layout.d.ts +0 -2
- package/es/info/utils/layout.js +0 -58
- package/es/info/utils/utils.d.ts +0 -1
- package/es/info/utils/utils.js +0 -13
- package/es/layout/index.d.ts +0 -2
- package/es/layout/index.js +0 -3
- package/es/page-container/index.d.ts +0 -3
- package/es/page-container/index.js +0 -3
- package/es/page-header/index.d.ts +0 -74
- package/es/page-header/index.js +0 -218
- package/es/page-header/index.scss +0 -193
- package/es/page-header/xconsole.scss +0 -5
- package/es/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/es/sidebar/components/sidebar-container/index.js +0 -167
- package/es/sidebar/components/sidebar-container/index.scss +0 -73
- package/es/sidebar/components/tree/index.d.ts +0 -6
- package/es/sidebar/components/tree/index.js +0 -288
- package/es/sidebar/components/tree/index.scss +0 -10
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +0 -47
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.scss +0 -7
- package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/es/sidebar/components/tree-node/components/IconAction/index.js +0 -79
- package/es/sidebar/components/tree-node/components/IconAction/index.scss +0 -7
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/es/sidebar/components/tree-node/components/IconSwitch/index.js +0 -60
- package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +0 -7
- package/es/sidebar/components/tree-node/index.d.ts +0 -7
- package/es/sidebar/components/tree-node/index.js +0 -192
- package/es/sidebar/components/tree-node/index.scss +0 -68
- package/es/sidebar/index.d.ts +0 -9
- package/es/sidebar/index.js +0 -187
- package/es/sidebar/index.scss +0 -38
- package/es/sidebar/typing.d.ts +0 -145
- package/es/sidebar/typing.js +0 -1
- package/es/sidebar/utils/action-ref.d.ts +0 -3
- package/es/sidebar/utils/action-ref.js +0 -10
- package/es/sidebar/utils/index.d.ts +0 -364
- package/es/sidebar/utils/index.js +0 -277
- package/es/skeleton/index.d.ts +0 -3
- package/es/skeleton/index.js +0 -3
- package/es/table/components/CardView/index.d.ts +0 -5
- package/es/table/components/CardView/index.js +0 -387
- package/es/table/components/CardView/index.scss +0 -46
- package/es/table/components/EmptyContent/index.d.ts +0 -2
- package/es/table/components/EmptyContent/index.js +0 -11
- package/es/table/components/Filter/index.d.ts +0 -12
- package/es/table/components/Filter/index.js +0 -248
- package/es/table/components/Filter/index.scss +0 -27
- package/es/table/components/Layout/index.d.ts +0 -5
- package/es/table/components/Layout/index.js +0 -175
- package/es/table/components/Layout/index.scss +0 -48
- package/es/table/components/LoadMore/index.d.ts +0 -20
- package/es/table/components/LoadMore/index.js +0 -88
- package/es/table/components/LoadMore/index.scss +0 -19
- package/es/table/components/Pagination/index.d.ts +0 -8
- package/es/table/components/Pagination/index.js +0 -244
- package/es/table/components/Pagination/index.scss +0 -55
- package/es/table/components/QuickAction/index.d.ts +0 -11
- package/es/table/components/QuickAction/index.js +0 -45
- package/es/table/components/ToolBar/CardSwitch.d.ts +0 -8
- package/es/table/components/ToolBar/CardSwitch.js +0 -52
- package/es/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/es/table/components/ToolBar/DensityIcon.js +0 -107
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FilterColumnIcon.js +0 -362
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FullScreenIcon.js +0 -29
- package/es/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/es/table/components/ToolBar/Fullscreen.js +0 -100
- package/es/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/es/table/components/ToolBar/RefreshIcon.js +0 -180
- package/es/table/components/ToolBar/index.d.ts +0 -5
- package/es/table/components/ToolBar/index.js +0 -174
- package/es/table/components/ToolBar/index.scss +0 -177
- package/es/table/index.d.ts +0 -6
- package/es/table/index.js +0 -1154
- package/es/table/index.scss +0 -158
- package/es/table/typing.d.ts +0 -426
- package/es/table/typing.js +0 -1
- package/es/table/utils/columnRender.d.ts +0 -13
- package/es/table/utils/columnRender.js +0 -247
- package/es/table/utils/genProColumnToColumn.d.ts +0 -13
- package/es/table/utils/genProColumnToColumn.js +0 -51
- package/es/table/utils/getTableProps.d.ts +0 -2
- package/es/table/utils/getTableProps.js +0 -4
- package/es/table/utils/getTableSortIcons.d.ts +0 -3
- package/es/table/utils/getTableSortIcons.js +0 -21
- package/es/table/utils/index.d.ts +0 -19
- package/es/table/utils/index.js +0 -128
- package/es/table/utils/pureColumnRender.d.ts +0 -9
- package/es/table/utils/pureColumnRender.js +0 -169
- package/es/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/es/table/utils/pureGenProColumnToColumn.js +0 -28
- package/es/table/utils/useTableSelection.d.ts +0 -3
- package/es/table/utils/useTableSelection.js +0 -80
- package/es/table/utils/util.d.ts +0 -5
- package/es/table/utils/util.js +0 -19
- package/es/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/es/timeline/ProTimeLineItem/index.js +0 -245
- package/es/timeline/ProTimeLineItem/index.scss +0 -235
- package/es/timeline/index.d.ts +0 -10
- package/es/timeline/index.js +0 -63
- package/es/timeline/index.scss +0 -7
- package/es/timeline/typing.d.ts +0 -107
- package/es/timeline/typing.js +0 -1
- package/es/utils/aspect.d.ts +0 -2
- package/es/utils/aspect.js +0 -57
- package/es/utils/index.d.ts +0 -3
- package/es/utils/index.js +0 -3
- package/es/utils/message.d.ts +0 -3
- package/es/utils/message.js +0 -14
- package/lib/actions/base.d.ts +0 -24
- package/lib/actions/base.js +0 -72
- package/lib/actions/confirm.d.ts +0 -7
- package/lib/actions/confirm.js +0 -20
- package/lib/actions/danger-confirm.d.ts +0 -7
- package/lib/actions/danger-confirm.js +0 -23
- package/lib/actions/danger-pop-confirm.d.ts +0 -5
- package/lib/actions/danger-pop-confirm.js +0 -18
- package/lib/actions/dialog-component.d.ts +0 -10
- package/lib/actions/dialog-component.js +0 -28
- package/lib/actions/dialog-form.d.ts +0 -29
- package/lib/actions/dialog-form.js +0 -220
- package/lib/actions/dialog-info.d.ts +0 -9
- package/lib/actions/dialog-info.js +0 -28
- package/lib/actions/dialog-table.d.ts +0 -9
- package/lib/actions/dialog-table.js +0 -19
- package/lib/actions/dialog.d.ts +0 -40
- package/lib/actions/dialog.js +0 -232
- package/lib/actions/drawer-form.d.ts +0 -6
- package/lib/actions/drawer-form.js +0 -15
- package/lib/actions/drawer-info.d.ts +0 -6
- package/lib/actions/drawer-info.js +0 -15
- package/lib/actions/drawer-table.d.ts +0 -6
- package/lib/actions/drawer-table.js +0 -15
- package/lib/actions/drawer.d.ts +0 -6
- package/lib/actions/drawer.js +0 -16
- package/lib/actions/error.d.ts +0 -7
- package/lib/actions/error.js +0 -20
- package/lib/actions/index.d.ts +0 -114
- package/lib/actions/index.js +0 -474
- package/lib/actions/index.scss +0 -141
- package/lib/actions/link.d.ts +0 -8
- package/lib/actions/link.js +0 -21
- package/lib/actions/notice.d.ts +0 -7
- package/lib/actions/notice.js +0 -20
- package/lib/actions/pop-confirm.d.ts +0 -9
- package/lib/actions/pop-confirm.js +0 -18
- package/lib/actions/quick.d.ts +0 -2
- package/lib/actions/quick.js +0 -33
- package/lib/actions/request.d.ts +0 -9
- package/lib/actions/request.js +0 -55
- package/lib/actions/utils.d.ts +0 -1
- package/lib/actions/utils.js +0 -25
- package/lib/card/card-container.d.ts +0 -18
- package/lib/card/card-container.js +0 -28
- package/lib/card/divider.d.ts +0 -6
- package/lib/card/divider.js +0 -19
- package/lib/card/index.d.ts +0 -109
- package/lib/card/index.js +0 -310
- package/lib/card/index.scss +0 -313
- package/lib/card/selectable.d.ts +0 -13
- package/lib/card/selectable.js +0 -44
- package/lib/card/tab.d.ts +0 -6
- package/lib/card/tab.js +0 -26
- package/lib/card/utils.d.ts +0 -9
- package/lib/card/utils.js +0 -35
- package/lib/card/xconsole.scss +0 -3
- package/lib/field/index.d.ts +0 -3
- package/lib/field/index.js +0 -24
- package/lib/form/Components/Editable/index.d.ts +0 -20
- package/lib/form/Components/Editable/index.js +0 -205
- package/lib/form/Components/FormGroup/index.d.ts +0 -14
- package/lib/form/Components/FormGroup/index.js +0 -86
- package/lib/form/Components/FormGroup/index.scss +0 -23
- package/lib/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/lib/form/Components/LightFilter/componentMap.js +0 -14
- package/lib/form/Components/LightFilter/index.d.ts +0 -17
- package/lib/form/Components/LightFilter/index.js +0 -133
- package/lib/form/Components/LightFilter/index.scss +0 -89
- package/lib/form/Components/ProField/index.d.ts +0 -2
- package/lib/form/Components/ProField/index.js +0 -39
- package/lib/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/lib/form/Components/ProField/mapDateFormat.js +0 -94
- package/lib/form/Components/Text/index.d.ts +0 -8
- package/lib/form/Components/Text/index.js +0 -28
- package/lib/form/Components/Text/index.scss +0 -8
- package/lib/form/Filter/AdvancedFilter.d.ts +0 -7
- package/lib/form/Filter/AdvancedFilter.js +0 -123
- package/lib/form/Filter/Layout.d.ts +0 -5
- package/lib/form/Filter/Layout.js +0 -78
- package/lib/form/Filter/LightFilter.d.ts +0 -7
- package/lib/form/Filter/LightFilter.js +0 -105
- package/lib/form/Filter/SimpleFilter.d.ts +0 -7
- package/lib/form/Filter/SimpleFilter.js +0 -99
- package/lib/form/Filter/index.d.ts +0 -9
- package/lib/form/Filter/index.js +0 -526
- package/lib/form/Filter/index.scss +0 -48
- package/lib/form/Filter/index2.d.ts +0 -13
- package/lib/form/Filter/index2.js +0 -174
- package/lib/form/Filter/index2.scss +0 -26
- package/lib/form/Filter/layout.scss +0 -40
- package/lib/form/Filter/useBindUrl.d.ts +0 -2
- package/lib/form/Filter/useBindUrl.js +0 -97
- package/lib/form/Filter/useSpecialProps.d.ts +0 -6
- package/lib/form/Filter/useSpecialProps.js +0 -39
- package/lib/form/ProForm/addCascadeEffect.d.ts +0 -2
- package/lib/form/ProForm/addCascadeEffect.js +0 -210
- package/lib/form/ProForm/customComponent.d.ts +0 -3
- package/lib/form/ProForm/customComponent.js +0 -22
- package/lib/form/ProForm/index.d.ts +0 -5
- package/lib/form/ProForm/index.js +0 -166
- package/lib/form/ProForm/index.scss +0 -411
- package/lib/form/ProForm/useAutoLayout.d.ts +0 -9
- package/lib/form/ProForm/useAutoLayout.js +0 -100
- package/lib/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/lib/form/ProForm/useAutoSubmit.js +0 -28
- package/lib/form/ProForm/useFieldRequest.d.ts +0 -5
- package/lib/form/ProForm/useFieldRequest.js +0 -21
- package/lib/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/lib/form/ProForm/useFormDisplayValues.js +0 -86
- package/lib/form/ProForm/useInitialRequest.d.ts +0 -6
- package/lib/form/ProForm/useInitialRequest.js +0 -17
- package/lib/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/lib/form/SchemaForm/adapterComponent.js +0 -21
- package/lib/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/lib/form/SchemaForm/adapterDecorator.js +0 -24
- package/lib/form/SchemaForm/adapterType.d.ts +0 -5
- package/lib/form/SchemaForm/adapterType.js +0 -59
- package/lib/form/SchemaForm/index.d.ts +0 -4
- package/lib/form/SchemaForm/index.js +0 -220
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayCards.js +0 -25
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayCollapse.js +0 -25
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayItems.js +0 -38
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayTable.js +0 -85
- package/lib/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/lib/form/SchemaForm/initializeDataSource.js +0 -26
- package/lib/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormButton.js +0 -81
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormCollapse.js +0 -40
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormGroup.js +0 -43
- package/lib/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/lib/form/SchemaForm/initializeFormStep.js +0 -57
- package/lib/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormTab.js +0 -50
- package/lib/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/lib/form/SchemaForm/initializeReactions.js +0 -73
- package/lib/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/lib/form/SchemaForm/initializeRequest.js +0 -45
- package/lib/form/SchemaForm/initializeRules.d.ts +0 -11
- package/lib/form/SchemaForm/initializeRules.js +0 -53
- package/lib/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/lib/form/SchemaForm/initializeSelectTable.js +0 -91
- package/lib/form/SchemaForm/reactions.d.ts +0 -6
- package/lib/form/SchemaForm/reactions.js +0 -97
- package/lib/form/docs/ActionResponse.d.ts +0 -8
- package/lib/form/docs/ActionResponse.js +0 -19
- package/lib/form/docs/ActionResponse.less +0 -25
- package/lib/form/fieldTypeMap.d.ts +0 -7
- package/lib/form/fieldTypeMap.js +0 -54
- package/lib/form/global.scss +0 -14
- package/lib/form/index.d.ts +0 -125
- package/lib/form/index.js +0 -171
- package/lib/form/locales/validate.d.ts +0 -159
- package/lib/form/locales/validate.js +0 -165
- package/lib/form/schemaNameMap.d.ts +0 -5
- package/lib/form/schemaNameMap.js +0 -57
- package/lib/form/typing.d.ts +0 -194
- package/lib/form/typing.js +0 -5
- package/lib/form/utils/parseSchema.d.ts +0 -3
- package/lib/form/utils/parseSchema.js +0 -45
- package/lib/form/utils.d.ts +0 -55
- package/lib/form/utils.js +0 -169
- package/lib/form/warning.d.ts +0 -3
- package/lib/form/warning.js +0 -18
- package/lib/image/index.d.ts +0 -22
- package/lib/image/index.js +0 -83
- package/lib/image/index.scss +0 -3
- package/lib/info/components/InfoGroup/index.d.ts +0 -5
- package/lib/info/components/InfoGroup/index.js +0 -97
- package/lib/info/components/InfoGroup/index.scss +0 -64
- package/lib/info/components/InfoValueItem/index.d.ts +0 -5
- package/lib/info/components/InfoValueItem/index.js +0 -313
- package/lib/info/components/InfoValueItem/index.scss +0 -26
- package/lib/info/components/ProInfoItem/index.d.ts +0 -5
- package/lib/info/components/ProInfoItem/index.js +0 -100
- package/lib/info/components/ProInfoItem/index.scss +0 -76
- package/lib/info/components/baseInfo/index.d.ts +0 -8
- package/lib/info/components/baseInfo/index.js +0 -103
- package/lib/info/components/baseInfo/index.scss +0 -6
- package/lib/info/components/headerInfo/index.d.ts +0 -8
- package/lib/info/components/headerInfo/index.js +0 -76
- package/lib/info/components/headerInfo/index.scss +0 -3
- package/lib/info/components/tableInfo/index.d.ts +0 -7
- package/lib/info/components/tableInfo/index.js +0 -164
- package/lib/info/components/tableInfo/index.scss +0 -18
- package/lib/info/index.d.ts +0 -6
- package/lib/info/index.js +0 -205
- package/lib/info/index.scss +0 -9
- package/lib/info/typing.d.ts +0 -220
- package/lib/info/typing.js +0 -5
- package/lib/info/utils/index.d.ts +0 -20
- package/lib/info/utils/index.js +0 -60
- package/lib/info/utils/layout.d.ts +0 -2
- package/lib/info/utils/layout.js +0 -65
- package/lib/info/utils/utils.d.ts +0 -1
- package/lib/info/utils/utils.js +0 -19
- package/lib/layout/index.d.ts +0 -2
- package/lib/layout/index.js +0 -10
- package/lib/page-container/index.d.ts +0 -3
- package/lib/page-container/index.js +0 -24
- package/lib/page-header/index.d.ts +0 -74
- package/lib/page-header/index.js +0 -224
- package/lib/page-header/index.scss +0 -193
- package/lib/page-header/xconsole.scss +0 -5
- package/lib/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/lib/sidebar/components/sidebar-container/index.js +0 -178
- package/lib/sidebar/components/sidebar-container/index.scss +0 -73
- package/lib/sidebar/components/tree/index.d.ts +0 -6
- package/lib/sidebar/components/tree/index.js +0 -298
- package/lib/sidebar/components/tree/index.scss +0 -10
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +0 -57
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.scss +0 -7
- package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +0 -90
- package/lib/sidebar/components/tree-node/components/IconAction/index.scss +0 -7
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +0 -71
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +0 -7
- package/lib/sidebar/components/tree-node/index.d.ts +0 -7
- package/lib/sidebar/components/tree-node/index.js +0 -204
- package/lib/sidebar/components/tree-node/index.scss +0 -68
- package/lib/sidebar/index.d.ts +0 -9
- package/lib/sidebar/index.js +0 -228
- package/lib/sidebar/index.scss +0 -38
- package/lib/sidebar/typing.d.ts +0 -145
- package/lib/sidebar/typing.js +0 -5
- package/lib/sidebar/utils/action-ref.d.ts +0 -3
- package/lib/sidebar/utils/action-ref.js +0 -16
- package/lib/sidebar/utils/index.d.ts +0 -364
- package/lib/sidebar/utils/index.js +0 -291
- package/lib/skeleton/index.d.ts +0 -3
- package/lib/skeleton/index.js +0 -24
- package/lib/table/components/CardView/index.d.ts +0 -5
- package/lib/table/components/CardView/index.js +0 -397
- package/lib/table/components/CardView/index.scss +0 -46
- package/lib/table/components/EmptyContent/index.d.ts +0 -2
- package/lib/table/components/EmptyContent/index.js +0 -19
- package/lib/table/components/Filter/index.d.ts +0 -12
- package/lib/table/components/Filter/index.js +0 -258
- package/lib/table/components/Filter/index.scss +0 -27
- package/lib/table/components/Layout/index.d.ts +0 -5
- package/lib/table/components/Layout/index.js +0 -185
- package/lib/table/components/Layout/index.scss +0 -48
- package/lib/table/components/LoadMore/index.d.ts +0 -20
- package/lib/table/components/LoadMore/index.js +0 -99
- package/lib/table/components/LoadMore/index.scss +0 -19
- package/lib/table/components/Pagination/index.d.ts +0 -8
- package/lib/table/components/Pagination/index.js +0 -253
- package/lib/table/components/Pagination/index.scss +0 -55
- package/lib/table/components/QuickAction/index.d.ts +0 -11
- package/lib/table/components/QuickAction/index.js +0 -53
- package/lib/table/components/ToolBar/CardSwitch.d.ts +0 -8
- package/lib/table/components/ToolBar/CardSwitch.js +0 -60
- package/lib/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/DensityIcon.js +0 -114
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FilterColumnIcon.js +0 -370
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FullScreenIcon.js +0 -38
- package/lib/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/lib/table/components/ToolBar/Fullscreen.js +0 -110
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/RefreshIcon.js +0 -188
- package/lib/table/components/ToolBar/index.d.ts +0 -5
- package/lib/table/components/ToolBar/index.js +0 -185
- package/lib/table/components/ToolBar/index.scss +0 -177
- package/lib/table/index.d.ts +0 -6
- package/lib/table/index.js +0 -1176
- package/lib/table/index.scss +0 -158
- package/lib/table/typing.d.ts +0 -426
- package/lib/table/typing.js +0 -5
- package/lib/table/utils/columnRender.d.ts +0 -13
- package/lib/table/utils/columnRender.js +0 -256
- package/lib/table/utils/genProColumnToColumn.d.ts +0 -13
- package/lib/table/utils/genProColumnToColumn.js +0 -58
- package/lib/table/utils/getTableProps.d.ts +0 -2
- package/lib/table/utils/getTableProps.js +0 -11
- package/lib/table/utils/getTableSortIcons.d.ts +0 -3
- package/lib/table/utils/getTableSortIcons.js +0 -29
- package/lib/table/utils/index.d.ts +0 -19
- package/lib/table/utils/index.js +0 -142
- package/lib/table/utils/pureColumnRender.d.ts +0 -9
- package/lib/table/utils/pureColumnRender.js +0 -178
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/lib/table/utils/pureGenProColumnToColumn.js +0 -34
- package/lib/table/utils/useTableSelection.d.ts +0 -3
- package/lib/table/utils/useTableSelection.js +0 -83
- package/lib/table/utils/util.d.ts +0 -5
- package/lib/table/utils/util.js +0 -25
- package/lib/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/lib/timeline/ProTimeLineItem/index.js +0 -255
- package/lib/timeline/ProTimeLineItem/index.scss +0 -235
- package/lib/timeline/index.d.ts +0 -10
- package/lib/timeline/index.js +0 -79
- package/lib/timeline/index.scss +0 -7
- package/lib/timeline/typing.d.ts +0 -107
- package/lib/timeline/typing.js +0 -5
- package/lib/utils/aspect.d.ts +0 -2
- package/lib/utils/aspect.js +0 -64
- package/lib/utils/index.d.ts +0 -3
- package/lib/utils/index.js +0 -24
- package/lib/utils/message.d.ts +0 -3
- package/lib/utils/message.js +0 -22
- /package/dist/{fonts/txddinmedium.woff → static/txddinmedium.df41cfe2.woff} +0 -0
@@ -1,178 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
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
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.default = void 0;
|
8
|
-
var _components = require("@alicloudfe/components");
|
9
|
-
var _card = require("../../../card");
|
10
|
-
var _proField = _interopRequireDefault(require("@teamix/pro-field"));
|
11
|
-
var _utils = require("@teamix/utils");
|
12
|
-
var _react = _interopRequireWildcard(require("react"));
|
13
|
-
require("./index.scss");
|
14
|
-
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
15
|
-
var _excluded = ["children", "searchPlaceholder", "showSearch", "searchProps", "customSearch", "searchOnChange", "message", "messageProps", "customMessage", "scrollArea", "showExpandAll", "showExpandLevel", "onExpandAllChange", "onExpandLevelChange", "expandLevel", "expandLevelState", "expandAllState", "isTree"];
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
17
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
20
|
-
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."); }
|
21
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
22
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
23
|
-
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; }
|
24
|
-
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; }
|
25
|
-
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; }
|
26
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
27
|
-
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."); }
|
28
|
-
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); }
|
29
|
-
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; }
|
30
|
-
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; }
|
31
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
32
|
-
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; }
|
33
|
-
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; }
|
34
|
-
var cls = (0, _utils.usePrefixCls)('teamix-pro-sidebar-container');
|
35
|
-
var ProSidebarContainer = function ProSidebarContainer(props) {
|
36
|
-
var children = props.children,
|
37
|
-
searchPlaceholder = props.searchPlaceholder,
|
38
|
-
_props$showSearch = props.showSearch,
|
39
|
-
showSearch = _props$showSearch === void 0 ? true : _props$showSearch,
|
40
|
-
_props$searchProps = props.searchProps,
|
41
|
-
searchProps = _props$searchProps === void 0 ? {} : _props$searchProps,
|
42
|
-
customSearch = props.customSearch,
|
43
|
-
searchOnChange = props.searchOnChange,
|
44
|
-
message = props.message,
|
45
|
-
_props$messageProps = props.messageProps,
|
46
|
-
messageProps = _props$messageProps === void 0 ? {} : _props$messageProps,
|
47
|
-
customMessage = props.customMessage,
|
48
|
-
scrollArea = props.scrollArea,
|
49
|
-
showExpandAll = props.showExpandAll,
|
50
|
-
showExpandLevel = props.showExpandLevel,
|
51
|
-
onExpandAllChange = props.onExpandAllChange,
|
52
|
-
onExpandLevelChange = props.onExpandLevelChange,
|
53
|
-
_props$expandLevel = props.expandLevel,
|
54
|
-
expandLevel = _props$expandLevel === void 0 ? 1 : _props$expandLevel,
|
55
|
-
_props$expandLevelSta = props.expandLevelState,
|
56
|
-
expandLevelStateProp = _props$expandLevelSta === void 0 ? 1 : _props$expandLevelSta,
|
57
|
-
_props$expandAllState = props.expandAllState,
|
58
|
-
expandAllStateProp = _props$expandAllState === void 0 ? false : _props$expandAllState,
|
59
|
-
isTree = props.isTree,
|
60
|
-
others = _objectWithoutProperties(props, _excluded);
|
61
|
-
var ref = (0, _react.useRef)();
|
62
|
-
var _useState = (0, _react.useState)('auto'),
|
63
|
-
_useState2 = _slicedToArray(_useState, 2),
|
64
|
-
treeHeight = _useState2[0],
|
65
|
-
setTreeHeight = _useState2[1];
|
66
|
-
// 展开全部状态
|
67
|
-
var _useState3 = (0, _react.useState)(false),
|
68
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
69
|
-
expandAllState = _useState4[0],
|
70
|
-
setExpandAllState = _useState4[1];
|
71
|
-
// 展开层级状态
|
72
|
-
var _useState5 = (0, _react.useState)(1),
|
73
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
74
|
-
expandLevelState = _useState6[0],
|
75
|
-
setExpandLevelState = _useState6[1];
|
76
|
-
(0, _react.useEffect)(function () {
|
77
|
-
// 设置滚动区域
|
78
|
-
if (scrollArea === 'tree') {
|
79
|
-
var _ref$current$offsetTo, _ref$current;
|
80
|
-
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;
|
81
|
-
if (remainHeight > 0) {
|
82
|
-
setTreeHeight("calc(100% - ".concat(remainHeight, "px + 16px)"));
|
83
|
-
}
|
84
|
-
}
|
85
|
-
}, []);
|
86
|
-
(0, _react.useEffect)(function () {
|
87
|
-
setExpandLevelState(expandLevelStateProp);
|
88
|
-
setTimeout(function () {
|
89
|
-
onExpandLevelChange === null || onExpandLevelChange === void 0 ? void 0 : onExpandLevelChange(expandLevelStateProp);
|
90
|
-
});
|
91
|
-
}, [expandLevelStateProp]);
|
92
|
-
(0, _react.useEffect)(function () {
|
93
|
-
setExpandAllState(expandAllStateProp);
|
94
|
-
setTimeout(function () {
|
95
|
-
onExpandAllChange === null || onExpandAllChange === void 0 ? void 0 : onExpandAllChange(expandAllStateProp);
|
96
|
-
});
|
97
|
-
}, [expandAllStateProp]);
|
98
|
-
// 渲染搜索区域
|
99
|
-
var renderSearch = function renderSearch() {
|
100
|
-
if (customSearch || showSearch) {
|
101
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
102
|
-
className: cls('search')
|
103
|
-
}, !!customSearch && customSearch, showSearch && /*#__PURE__*/_react.default.createElement(_proField.default, _objectSpread({
|
104
|
-
mode: "edit",
|
105
|
-
type: "text",
|
106
|
-
placeholder: searchPlaceholder,
|
107
|
-
innerBeforeIcon: "search-line",
|
108
|
-
onChange: searchOnChange
|
109
|
-
}, searchProps)));
|
110
|
-
}
|
111
|
-
return null;
|
112
|
-
};
|
113
|
-
// 渲染通知区域
|
114
|
-
var renderNotice = function renderNotice() {
|
115
|
-
if (message || customMessage) {
|
116
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
117
|
-
className: cls('notice')
|
118
|
-
}, message && /*#__PURE__*/_react.default.createElement(_components.Message, _objectSpread(_objectSpread({
|
119
|
-
type: "notice",
|
120
|
-
closeable: true
|
121
|
-
}, messageProps), {}, {
|
122
|
-
onClose: function onClose() {
|
123
|
-
var _ref$current$offsetTo2, _ref$current2;
|
124
|
-
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;
|
125
|
-
setTreeHeight("calc(100% - ".concat(remainHeight, "px + 56px)"));
|
126
|
-
}
|
127
|
-
}), message), !!customMessage && customMessage);
|
128
|
-
}
|
129
|
-
return null;
|
130
|
-
};
|
131
|
-
// 渲染折叠区
|
132
|
-
var renderFold = function renderFold() {
|
133
|
-
if (showExpandAll || showExpandLevel) {
|
134
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
135
|
-
className: cls('fold')
|
136
|
-
}, showExpandAll && /*#__PURE__*/_react.default.createElement(_components.Button, {
|
137
|
-
type: "primary",
|
138
|
-
text: true,
|
139
|
-
onClick: function onClick() {
|
140
|
-
var visible = !expandAllState;
|
141
|
-
setExpandAllState(visible);
|
142
|
-
onExpandAllChange === null || onExpandAllChange === void 0 ? void 0 : onExpandAllChange(visible);
|
143
|
-
}
|
144
|
-
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
145
|
-
type: expandAllState ? 'menu-unfold-line' : 'menu-fold-line'
|
146
|
-
}), expandAllState ? '全部收起' : '全部展开'), showExpandLevel && /*#__PURE__*/_react.default.createElement(_components.MenuButton, {
|
147
|
-
text: true,
|
148
|
-
type: "secondary",
|
149
|
-
label: "\u5C55\u793A".concat(expandLevelState, "\u7EA7"),
|
150
|
-
onItemClick: function onItemClick(key) {
|
151
|
-
setExpandLevelState(key);
|
152
|
-
onExpandLevelChange === null || onExpandLevelChange === void 0 ? void 0 : onExpandLevelChange(key);
|
153
|
-
}
|
154
|
-
}, _toConsumableArray(new Array(expandLevel)).fill(1).map(function (item, index) {
|
155
|
-
return /*#__PURE__*/_react.default.createElement(_components.MenuButton.Item, {
|
156
|
-
key: index + 1
|
157
|
-
}, "\u5C55\u793A", index + 1, "\u7EA7");
|
158
|
-
})));
|
159
|
-
}
|
160
|
-
};
|
161
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
162
|
-
className: cls({
|
163
|
-
'': true,
|
164
|
-
'not-is-tree': !isTree
|
165
|
-
})
|
166
|
-
}, /*#__PURE__*/_react.default.createElement(_card.ProCard, _objectSpread({
|
167
|
-
bordered: false,
|
168
|
-
compacted: true
|
169
|
-
}, others), renderSearch(), renderNotice(), renderFold(), /*#__PURE__*/_react.default.createElement("div", {
|
170
|
-
className: cls('context'),
|
171
|
-
ref: ref,
|
172
|
-
style: {
|
173
|
-
height: treeHeight
|
174
|
-
}
|
175
|
-
}, children)));
|
176
|
-
};
|
177
|
-
var _default = ProSidebarContainer;
|
178
|
-
exports.default = _default;
|
@@ -1,73 +0,0 @@
|
|
1
|
-
.teamix-pro-sidebar-container {
|
2
|
-
min-width: 180px;
|
3
|
-
|
4
|
-
.teamix-pro-card.compacted > .next-card-header {
|
5
|
-
padding: 16px 0px;
|
6
|
-
margin: 0;
|
7
|
-
|
8
|
-
}
|
9
|
-
|
10
|
-
.next-card .next-card-header-extra {
|
11
|
-
margin-top: 2px;
|
12
|
-
}
|
13
|
-
|
14
|
-
&-search {
|
15
|
-
margin-bottom: var(--s-2);
|
16
|
-
}
|
17
|
-
|
18
|
-
&-search-has-message {
|
19
|
-
margin-bottom: var(--s-1);
|
20
|
-
}
|
21
|
-
|
22
|
-
&-notice {
|
23
|
-
margin-bottom: var(--s-1);
|
24
|
-
}
|
25
|
-
|
26
|
-
&-fold {
|
27
|
-
margin-bottom: var(--s-1);
|
28
|
-
}
|
29
|
-
|
30
|
-
|
31
|
-
&.teamix-pro-sidebar-container &-context {
|
32
|
-
//overflow-y: hidden;
|
33
|
-
|
34
|
-
&:hover {
|
35
|
-
overflow-y: auto;
|
36
|
-
}
|
37
|
-
|
38
|
-
.next-tree-switcher.next-noop-line.next-noop-line-noroot {
|
39
|
-
flex-shrink: 0;
|
40
|
-
}
|
41
|
-
|
42
|
-
}
|
43
|
-
|
44
|
-
|
45
|
-
&-not-is-tree {
|
46
|
-
|
47
|
-
.teamix-pro-card.compacted > .next-card-header {
|
48
|
-
padding: 16px 8px;
|
49
|
-
margin: 0;
|
50
|
-
}
|
51
|
-
|
52
|
-
.teamix-pro-sidebar-container-context {
|
53
|
-
padding: 0;
|
54
|
-
}
|
55
|
-
|
56
|
-
.teamix-pro-sidebar-container-search {
|
57
|
-
padding: 0 8px;
|
58
|
-
}
|
59
|
-
|
60
|
-
.teamix-pro-sidebar-container-search-has-message {
|
61
|
-
padding: 0 8px;
|
62
|
-
}
|
63
|
-
|
64
|
-
.teamix-pro-sidebar-container-notice {
|
65
|
-
padding: 0 8px;
|
66
|
-
}
|
67
|
-
|
68
|
-
.teamix-pro-sidebar-container-fold {
|
69
|
-
padding: 0 8px;
|
70
|
-
}
|
71
|
-
|
72
|
-
}
|
73
|
-
}
|
@@ -1,298 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
var _components = require("@alicloudfe/components");
|
8
|
-
var _utils = require("@teamix/utils");
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
10
|
-
var _treeNode = require("../tree-node");
|
11
|
-
require("./index.scss");
|
12
|
-
require("../tree-node/index.scss");
|
13
|
-
var _utils2 = require("../../utils");
|
14
|
-
var _hooks = require("@teamix/hooks");
|
15
|
-
var _actionRef = require("../../utils/action-ref");
|
16
|
-
var _lodash = _interopRequireDefault(require("lodash.clonedeep"));
|
17
|
-
var _excluded = ["dataSource", "selectedKeys", "checkedKeys", "defaultExpandedKeys", "defaultExpandAll", "expandedKeys", "onSelect", "onCheck", "isNodeBlock", "searchKey", "actionRef", "onBeforeRenderNodeEvent", "beforeRenderNode", "className", "expandAll", "onDataSourceChange", "expandLevel", "defaultSelectedKeys", "defaultCheckedKeys"];
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
20
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
21
|
-
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; }
|
22
|
-
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; }
|
23
|
-
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; }
|
24
|
-
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); }
|
25
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
26
|
-
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."); }
|
27
|
-
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; }
|
28
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
29
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
30
|
-
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."); }
|
31
|
-
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); }
|
32
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
33
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
34
|
-
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; }
|
35
|
-
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; }
|
36
|
-
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; }
|
37
|
-
var cls = (0, _utils.usePrefixCls)('teamix-pro-sidebar-tree');
|
38
|
-
var ProSidebarTree = function ProSidebarTree(props) {
|
39
|
-
var _ref;
|
40
|
-
var dataSourceProp = props.dataSource,
|
41
|
-
selectedKeysProp = props.selectedKeys,
|
42
|
-
checkedKeysProp = props.checkedKeys,
|
43
|
-
defaultExpandedKeys = props.defaultExpandedKeys,
|
44
|
-
defaultExpandAll = props.defaultExpandAll,
|
45
|
-
expandedKeysProp = props.expandedKeys,
|
46
|
-
onSelect = props.onSelect,
|
47
|
-
onCheck = props.onCheck,
|
48
|
-
isNodeBlock = props.isNodeBlock,
|
49
|
-
searchKey = props.searchKey,
|
50
|
-
actionRef = props.actionRef,
|
51
|
-
onBeforeRenderNodeEvent = props.onBeforeRenderNodeEvent,
|
52
|
-
beforeRenderNode = props.beforeRenderNode,
|
53
|
-
_props$className = props.className,
|
54
|
-
className = _props$className === void 0 ? '' : _props$className,
|
55
|
-
expandAll = props.expandAll,
|
56
|
-
onDataSourceChange = props.onDataSourceChange,
|
57
|
-
_props$expandLevel = props.expandLevel,
|
58
|
-
expandLevel = _props$expandLevel === void 0 ? 1 : _props$expandLevel,
|
59
|
-
defaultSelectedKeys = props.defaultSelectedKeys,
|
60
|
-
defaultCheckedKeys = props.defaultCheckedKeys,
|
61
|
-
others = _objectWithoutProperties(props, _excluded);
|
62
|
-
// 使用 beforeRenderNode 处理 dataSource
|
63
|
-
var processDataSource = function processDataSource(dataSource) {
|
64
|
-
var newDataSource = (0, _lodash.default)(dataSource);
|
65
|
-
if (beforeRenderNode) {
|
66
|
-
(0, _utils2.loop)(newDataSource, function (item, level) {
|
67
|
-
var _beforeRenderNode;
|
68
|
-
var newItem = (_beforeRenderNode = beforeRenderNode === null || beforeRenderNode === void 0 ? void 0 : beforeRenderNode(item, level, dataSource)) !== null && _beforeRenderNode !== void 0 ? _beforeRenderNode : {};
|
69
|
-
var allItemKeys = Array.from(new Set([].concat(_toConsumableArray(Object.keys(item)), _toConsumableArray(Object.keys(newItem)))));
|
70
|
-
allItemKeys.forEach(function (key) {
|
71
|
-
item[key] = newItem[key];
|
72
|
-
});
|
73
|
-
});
|
74
|
-
}
|
75
|
-
return newDataSource;
|
76
|
-
};
|
77
|
-
// 自动展开父节点。过滤时用
|
78
|
-
var _useState = (0, _react.useState)(false),
|
79
|
-
_useState2 = _slicedToArray(_useState, 2),
|
80
|
-
autoExpandParent = _useState2[0],
|
81
|
-
setAutoExpandParent = _useState2[1];
|
82
|
-
var _useState3 = (0, _react.useState)(),
|
83
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
84
|
-
matchedKeys = _useState4[0],
|
85
|
-
setMatchedKeys = _useState4[1];
|
86
|
-
var _useState5 = (0, _react.useState)((_ref = expandedKeysProp !== null && expandedKeysProp !== void 0 ? expandedKeysProp : defaultExpandedKeys) !== null && _ref !== void 0 ? _ref : []),
|
87
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
88
|
-
expandedKeys = _useState6[0],
|
89
|
-
setExpandedKeys = _useState6[1];
|
90
|
-
var _useState7 = (0, _react.useState)(processDataSource(dataSourceProp !== null && dataSourceProp !== void 0 ? dataSourceProp : [])),
|
91
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
92
|
-
dataSource = _useState8[0],
|
93
|
-
setDataSource = _useState8[1];
|
94
|
-
var _useState9 = (0, _react.useState)(selectedKeysProp !== null && selectedKeysProp !== void 0 ? selectedKeysProp : defaultSelectedKeys),
|
95
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
96
|
-
selectedKeys = _useState10[0],
|
97
|
-
setSelectedKeys = _useState10[1];
|
98
|
-
var _useState11 = (0, _react.useState)(checkedKeysProp !== null && checkedKeysProp !== void 0 ? checkedKeysProp : defaultCheckedKeys),
|
99
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
100
|
-
checkedKeys = _useState12[0],
|
101
|
-
setCheckedKeys = _useState12[1];
|
102
|
-
(0, _react.useEffect)(function () {
|
103
|
-
setDefaultExpandedKeys();
|
104
|
-
}, []);
|
105
|
-
// 监听 selectedKeys,用于受控
|
106
|
-
(0, _react.useEffect)(function () {
|
107
|
-
if (selectedKeysProp) {
|
108
|
-
setSelectedKeys(selectedKeysProp);
|
109
|
-
}
|
110
|
-
}, [selectedKeysProp]);
|
111
|
-
// 监听 selectedKeys,用于受控
|
112
|
-
(0, _react.useEffect)(function () {
|
113
|
-
if (checkedKeysProp) {
|
114
|
-
setCheckedKeys(checkedKeysProp);
|
115
|
-
}
|
116
|
-
}, [checkedKeysProp]);
|
117
|
-
// 更新外部传入的 dataSource
|
118
|
-
(0, _hooks.useUpdateEffect)(function () {
|
119
|
-
setDataSource(processDataSource(dataSourceProp !== null && dataSourceProp !== void 0 ? dataSourceProp : []));
|
120
|
-
}, [dataSourceProp]);
|
121
|
-
// 监听展开全部事件
|
122
|
-
(0, _hooks.useUpdateEffect)(function () {
|
123
|
-
onChangeExpandAll();
|
124
|
-
}, [expandAll]);
|
125
|
-
// 监听展开层级事件
|
126
|
-
(0, _hooks.useUpdateEffect)(function () {
|
127
|
-
onChangeExpandLevel();
|
128
|
-
}, [expandLevel]);
|
129
|
-
// 监听 DataSource 变化事件
|
130
|
-
(0, _react.useEffect)(function () {
|
131
|
-
onDataSourceChange === null || onDataSourceChange === void 0 ? void 0 : onDataSourceChange(dataSource);
|
132
|
-
// 更新层级状态
|
133
|
-
if (expandAll) {
|
134
|
-
onChangeExpandAll();
|
135
|
-
}
|
136
|
-
if (expandLevel > 1) {
|
137
|
-
onChangeExpandLevel();
|
138
|
-
}
|
139
|
-
}, [dataSource]);
|
140
|
-
// 展开全部事件
|
141
|
-
var onChangeExpandAll = function onChangeExpandAll() {
|
142
|
-
if (expandAll) {
|
143
|
-
setExpandedKeys((0, _utils2.getAllNodeKey)(dataSource));
|
144
|
-
} else {
|
145
|
-
setExpandedKeys([]);
|
146
|
-
}
|
147
|
-
};
|
148
|
-
// 展开层级事件
|
149
|
-
var onChangeExpandLevel = function onChangeExpandLevel() {
|
150
|
-
var keys = (0, _utils2.getTreeLevelKey)(dataSource, expandLevel - 1);
|
151
|
-
setExpandedKeys(keys);
|
152
|
-
};
|
153
|
-
// 绑定actionRef
|
154
|
-
(0, _actionRef.useActionType)(actionRef, {
|
155
|
-
setTreeNode: function setTreeNode(treeNode) {
|
156
|
-
var newDataSource = (0, _lodash.default)(dataSource);
|
157
|
-
// TODO 此处可做性能优化
|
158
|
-
(0, _utils2.loop)(newDataSource, function (item) {
|
159
|
-
if (item.value === treeNode.value) {
|
160
|
-
Object.entries(treeNode).forEach(function (_ref2) {
|
161
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
162
|
-
key = _ref3[0],
|
163
|
-
value = _ref3[1];
|
164
|
-
item[key] = value;
|
165
|
-
});
|
166
|
-
}
|
167
|
-
});
|
168
|
-
setDataSource(newDataSource);
|
169
|
-
}
|
170
|
-
});
|
171
|
-
// dataSource 是否为一层结构
|
172
|
-
var hasChildren = (0, _react.useMemo)(function () {
|
173
|
-
var flag = false;
|
174
|
-
// TODO 此处可做性能优化
|
175
|
-
dataSource.forEach(function (item) {
|
176
|
-
if (item.children && item.children.length > 0) {
|
177
|
-
flag = true;
|
178
|
-
}
|
179
|
-
});
|
180
|
-
return flag;
|
181
|
-
}, [dataSource]);
|
182
|
-
// 组件第一次加载时不执行过滤
|
183
|
-
(0, _hooks.useUpdateEffect)(function () {
|
184
|
-
filterDataSource(searchKey !== null && searchKey !== void 0 ? searchKey : '');
|
185
|
-
}, [searchKey]);
|
186
|
-
// expandedKeys 更新
|
187
|
-
(0, _hooks.useUpdateEffect)(function () {
|
188
|
-
var _ref4;
|
189
|
-
setExpandedKeys((_ref4 = expandedKeysProp !== null && expandedKeysProp !== void 0 ? expandedKeysProp : defaultExpandedKeys) !== null && _ref4 !== void 0 ? _ref4 : []);
|
190
|
-
}, [expandedKeysProp, defaultExpandedKeys]);
|
191
|
-
// 设置默认节点展开
|
192
|
-
var setDefaultExpandedKeys = function setDefaultExpandedKeys() {
|
193
|
-
if (defaultExpandAll) {
|
194
|
-
setExpandedKeys((0, _utils2.getAllNodeKey)(dataSource));
|
195
|
-
} else {
|
196
|
-
var _ref5;
|
197
|
-
setExpandedKeys((_ref5 = expandedKeysProp !== null && expandedKeysProp !== void 0 ? expandedKeysProp : defaultExpandedKeys) !== null && _ref5 !== void 0 ? _ref5 : []);
|
198
|
-
}
|
199
|
-
};
|
200
|
-
// 是否占满节点
|
201
|
-
var getIsNodeBlock = function getIsNodeBlock() {
|
202
|
-
if (isNodeBlock && typeof isNodeBlock === 'boolean') {
|
203
|
-
return {
|
204
|
-
defaultPaddingLeft: 8,
|
205
|
-
indent: 16
|
206
|
-
};
|
207
|
-
}
|
208
|
-
if (isNodeBlock && _typeof(isNodeBlock) === 'object') {
|
209
|
-
return isNodeBlock;
|
210
|
-
}
|
211
|
-
return false;
|
212
|
-
};
|
213
|
-
// 过滤
|
214
|
-
var filterDataSource = function filterDataSource(value) {
|
215
|
-
var searchDataSource = processDataSource(dataSourceProp !== null && dataSourceProp !== void 0 ? dataSourceProp : []);
|
216
|
-
var expandedKeys = [];
|
217
|
-
if (!value) {
|
218
|
-
// TODO 过滤清空数据之后状态会丢失
|
219
|
-
setDataSource(searchDataSource);
|
220
|
-
// 数据过滤清空时展开状态继承用户传入的默认状态
|
221
|
-
setDefaultExpandedKeys();
|
222
|
-
return;
|
223
|
-
}
|
224
|
-
var _filterTreeData = (0, _utils2.filterTreeData)(searchDataSource, function (node) {
|
225
|
-
var _node$label;
|
226
|
-
return ((_node$label = node === null || node === void 0 ? void 0 : node.label) !== null && _node$label !== void 0 ? _node$label : '').includes(value);
|
227
|
-
}),
|
228
|
-
filterTreeValue = _filterTreeData.filterTreeValue;
|
229
|
-
(0, _utils2.loop)(filterTreeValue, function (item) {
|
230
|
-
hasSearchValue(value, item) && expandedKeys.push(String(item['value']));
|
231
|
-
}, {
|
232
|
-
children: 'children'
|
233
|
-
});
|
234
|
-
setMatchedKeys(matchedKeys);
|
235
|
-
handleExpand(expandedKeys);
|
236
|
-
setDataSource(filterTreeValue);
|
237
|
-
};
|
238
|
-
var filterTreeNode = function filterTreeNode(node) {
|
239
|
-
return matchedKeys && matchedKeys.indexOf(node.props.eventKey) > -1;
|
240
|
-
};
|
241
|
-
/** 节点是否包含搜索项 */
|
242
|
-
var hasSearchValue = function hasSearchValue(key, item) {
|
243
|
-
var _item$label;
|
244
|
-
if (((_item$label = item === null || item === void 0 ? void 0 : item.label) !== null && _item$label !== void 0 ? _item$label : '').includes(key)) {
|
245
|
-
return true;
|
246
|
-
} else if (Array.isArray(item['children'])) {
|
247
|
-
return item['children'].some(function (child) {
|
248
|
-
return hasSearchValue(key, child);
|
249
|
-
});
|
250
|
-
}
|
251
|
-
return false;
|
252
|
-
};
|
253
|
-
// 树节点点击回调
|
254
|
-
var onSelectChange = function onSelectChange(value, extra) {
|
255
|
-
var _extra$event, _extra$event$target, _extra$event$target$c;
|
256
|
-
if (extra === null || extra === void 0 ? void 0 : (_extra$event = extra.event) === null || _extra$event === void 0 ? void 0 : (_extra$event$target = _extra$event.target) === null || _extra$event$target === void 0 ? void 0 : (_extra$event$target$c = _extra$event$target.closest) === null || _extra$event$target$c === void 0 ? void 0 : _extra$event$target$c.call(_extra$event$target, '.teamix-pro-sidebar-delete-overlay')) {
|
257
|
-
return;
|
258
|
-
}
|
259
|
-
if (!selectedKeys) {
|
260
|
-
setSelectedKeys(value);
|
261
|
-
}
|
262
|
-
onSelect === null || onSelect === void 0 ? void 0 : onSelect(value, extra);
|
263
|
-
};
|
264
|
-
// 树节点选中回调
|
265
|
-
var onCheckChange = function onCheckChange(value, extra) {
|
266
|
-
if (!checkedKeysProp) {
|
267
|
-
setCheckedKeys(value);
|
268
|
-
}
|
269
|
-
onCheck === null || onCheck === void 0 ? void 0 : onCheck(value, extra);
|
270
|
-
};
|
271
|
-
// 节点展开回调
|
272
|
-
var handleExpand = function handleExpand(key) {
|
273
|
-
setExpandedKeys(key);
|
274
|
-
setAutoExpandParent(false);
|
275
|
-
};
|
276
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
277
|
-
className: cls({
|
278
|
-
'': true,
|
279
|
-
'is-list': !hasChildren
|
280
|
-
})
|
281
|
-
}, /*#__PURE__*/_react.default.createElement(_components.Tree, _objectSpread({
|
282
|
-
isLabelBlock: true,
|
283
|
-
checkedKeys: checkedKeys,
|
284
|
-
selectedKeys: selectedKeys,
|
285
|
-
isNodeBlock: getIsNodeBlock(),
|
286
|
-
filterTreeNode: filterTreeNode,
|
287
|
-
expandedKeys: expandedKeys,
|
288
|
-
onExpand: handleExpand,
|
289
|
-
autoExpandParent: autoExpandParent,
|
290
|
-
onSelect: onSelectChange,
|
291
|
-
onCheck: onCheckChange,
|
292
|
-
className: "".concat(cls({
|
293
|
-
checkable: others.checkable
|
294
|
-
}), " ").concat(className)
|
295
|
-
}, others), !onBeforeRenderNodeEvent && (0, _treeNode.renderTreeNode)(dataSource), onBeforeRenderNodeEvent && (0, _treeNode.renderTreeNodeDependenceValue)(dataSource, onBeforeRenderNodeEvent, checkedKeys, selectedKeys)));
|
296
|
-
};
|
297
|
-
var _default = ProSidebarTree;
|
298
|
-
exports.default = _default;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { TooltipProps } from '@alicloudfe/components/types/balloon';
|
2
|
-
import React from 'react';
|
3
|
-
import './index.scss';
|
4
|
-
export declare type ProHoverTooltipProps = {
|
5
|
-
/** 触发器 */
|
6
|
-
trigger?: React.ReactNode;
|
7
|
-
/** 显示隐藏 */
|
8
|
-
visible?: boolean;
|
9
|
-
/** tooltip */
|
10
|
-
tooltip?: React.ReactNode;
|
11
|
-
/** tooltip 配置 */
|
12
|
-
tooltipProps?: TooltipProps;
|
13
|
-
} & React.HTMLAttributes<HTMLElement>;
|
14
|
-
declare const ProHoverTooltip: React.FC<ProHoverTooltipProps>;
|
15
|
-
export default ProHoverTooltip;
|
@@ -1,57 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
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
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.default = void 0;
|
8
|
-
var _components = require("@alicloudfe/components");
|
9
|
-
var _utils = require("@teamix/utils");
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
11
|
-
require("./index.scss");
|
12
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
14
|
-
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; }
|
15
|
-
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; }
|
16
|
-
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; }
|
17
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
18
|
-
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."); }
|
19
|
-
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
|
-
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; }
|
21
|
-
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; }
|
22
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
23
|
-
var cls = (0, _utils.usePrefixCls)('teamix-pro-hover-tooltip');
|
24
|
-
var ProHoverTooltip = function ProHoverTooltip(props) {
|
25
|
-
var trigger = props.trigger,
|
26
|
-
visibleProp = props.visible,
|
27
|
-
tooltip = props.tooltip,
|
28
|
-
_props$tooltipProps = props.tooltipProps,
|
29
|
-
tooltipProps = _props$tooltipProps === void 0 ? {} : _props$tooltipProps,
|
30
|
-
_props$className = props.className,
|
31
|
-
className = _props$className === void 0 ? '' : _props$className;
|
32
|
-
var _useState = (0, _react.useState)(visibleProp !== null && visibleProp !== void 0 ? visibleProp : false),
|
33
|
-
_useState2 = _slicedToArray(_useState, 2),
|
34
|
-
visible = _useState2[0],
|
35
|
-
setVisible = _useState2[1];
|
36
|
-
(0, _react.useEffect)(function () {
|
37
|
-
setVisible(visibleProp !== null && visibleProp !== void 0 ? visibleProp : false);
|
38
|
-
}, [visibleProp]);
|
39
|
-
// 渲染触发器
|
40
|
-
var renderTrigger = function renderTrigger() {
|
41
|
-
if (tooltip) {
|
42
|
-
return /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({
|
43
|
-
align: "t",
|
44
|
-
trigger: /*#__PURE__*/_react.default.createElement("span", null, trigger)
|
45
|
-
}, tooltipProps), tooltip);
|
46
|
-
}
|
47
|
-
return trigger;
|
48
|
-
};
|
49
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
50
|
-
className: "".concat(cls({
|
51
|
-
'': true,
|
52
|
-
hidden: !visible
|
53
|
-
}), " ").concat(className)
|
54
|
-
}, renderTrigger());
|
55
|
-
};
|
56
|
-
var _default = ProHoverTooltip;
|
57
|
-
exports.default = _default;
|