@teamix/pro 1.6.0-beta.4 → 1.6.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/pro.all.min.css +1 -0
- package/dist/pro.css +1 -1
- package/dist/pro.js +70007 -54355
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +9 -0
- package/dist/pro.xconsole.min.css +1 -0
- package/es/actions/base.d.ts +24 -0
- package/es/actions/base.js +1 -1
- package/es/actions/confirm.d.ts +7 -0
- package/es/actions/danger-confirm.d.ts +7 -0
- package/es/actions/danger-pop-confirm.d.ts +5 -0
- package/es/actions/dialog-component.d.ts +10 -0
- package/es/actions/dialog-component.js +4 -1
- package/es/actions/dialog-form.d.ts +29 -0
- package/es/actions/dialog-form.js +8 -8
- package/es/actions/dialog-info.d.ts +9 -0
- package/es/actions/dialog-table.d.ts +9 -0
- package/es/actions/dialog.d.ts +40 -0
- package/es/actions/dialog.js +8 -7
- package/es/actions/drawer-form.d.ts +6 -0
- package/es/actions/drawer-info.d.ts +6 -0
- package/es/actions/drawer-table.d.ts +6 -0
- package/es/actions/drawer.d.ts +6 -0
- package/es/actions/error.d.ts +7 -0
- package/es/actions/index.d.ts +114 -0
- package/es/actions/index.js +69 -60
- package/es/actions/index.scss +10 -1
- package/es/actions/link.d.ts +8 -0
- package/es/actions/link.js +4 -3
- package/es/actions/notice.d.ts +7 -0
- package/es/actions/pop-confirm.d.ts +9 -0
- package/es/actions/quick.d.ts +2 -0
- package/es/actions/quick.js +26 -0
- package/es/actions/request.d.ts +9 -0
- package/es/actions/request.js +4 -3
- package/es/actions/utils.d.ts +1 -0
- package/es/card/card-container.d.ts +18 -0
- package/es/card/card-container.js +5 -12
- package/es/card/divider.d.ts +6 -0
- package/es/card/divider.js +4 -2
- package/es/card/index.d.ts +109 -0
- package/es/card/index.js +11 -22
- package/es/card/index.scss +15 -0
- package/es/card/selectable.d.ts +13 -0
- package/es/card/selectable.js +4 -2
- package/es/card/tab.d.ts +6 -0
- package/es/card/tab.js +4 -2
- package/es/card/utils.d.ts +9 -0
- package/es/card/xconsole.scss +3 -0
- package/es/field/index.d.ts +3 -0
- package/es/form/Components/Editable/index.d.ts +20 -0
- package/es/form/Components/Editable/index.js +2 -2
- package/es/form/Components/FormGroup/index.d.ts +14 -0
- package/es/form/Components/FormGroup/index.js +3 -4
- package/es/form/Components/FormItem2/animation.scss +72 -0
- package/es/form/Components/FormItem2/grid.scss +173 -0
- package/es/form/Components/FormItem2/index.d.ts +41 -0
- package/es/form/Components/FormItem2/index.js +286 -0
- package/es/form/Components/FormItem2/main.scss +413 -0
- package/es/form/Components/FormItem2/scss/variable.scss +118 -0
- package/es/form/Components/FormItem2/style.d.ts +1 -0
- package/es/form/Components/FormItem2/style.js +1 -0
- package/es/form/Components/LightFilter/componentMap.d.ts +3 -0
- package/es/form/Components/LightFilter/index.d.ts +17 -0
- package/es/form/Components/LightFilter/index.js +2 -11
- package/es/form/Components/LightFilter/index.scss +4 -0
- package/es/form/Components/ProField/index.d.ts +2 -0
- package/es/form/Components/ProField/index.js +4 -2
- package/es/form/Components/ProField/mapDateFormat.d.ts +3 -0
- package/es/form/Components/Text/index.d.ts +8 -0
- package/es/form/Components/Text/index.js +4 -2
- package/es/form/Components/__builtins__/empty.d.ts +1 -0
- package/es/form/Components/__builtins__/empty.js +51 -0
- package/es/form/Components/__builtins__/hooks/index.d.ts +2 -0
- package/es/form/Components/__builtins__/hooks/index.js +2 -0
- package/es/form/Components/__builtins__/hooks/useClickAway.d.ts +5 -0
- package/es/form/Components/__builtins__/hooks/useClickAway.js +37 -0
- package/es/form/Components/__builtins__/hooks/usePrefixCls.d.ts +3 -0
- package/es/form/Components/__builtins__/hooks/usePrefixCls.js +8 -0
- package/es/form/Components/__builtins__/icons.d.ts +20 -0
- package/es/form/Components/__builtins__/icons.js +153 -0
- package/es/form/Components/__builtins__/index.d.ts +8 -0
- package/es/form/Components/__builtins__/index.js +8 -0
- package/es/form/Components/__builtins__/loading.d.ts +1 -0
- package/es/form/Components/__builtins__/loading.js +41 -0
- package/es/form/Components/__builtins__/mapSize.d.ts +1 -0
- package/es/form/Components/__builtins__/mapSize.js +13 -0
- package/es/form/Components/__builtins__/mapStatus.d.ts +2 -0
- package/es/form/Components/__builtins__/mapStatus.js +20 -0
- package/es/form/Components/__builtins__/moment.d.ts +2 -0
- package/es/form/Components/__builtins__/moment.js +47 -0
- package/es/form/Components/__builtins__/pickDataProps.d.ts +1 -0
- package/es/form/Components/__builtins__/pickDataProps.js +9 -0
- package/es/form/Components/form-layout/index.d.ts +74 -0
- package/es/form/Components/form-layout/index.js +71 -0
- package/es/form/Components/form-layout/main.scss +0 -0
- package/es/form/Components/form-layout/style.d.ts +1 -0
- package/es/form/Components/form-layout/style.js +3 -0
- package/es/form/Components/form-layout/useResponsiveFormLayout.d.ts +18 -0
- package/es/form/Components/form-layout/useResponsiveFormLayout.js +87 -0
- package/es/form/Filter/AdvancedFilter.d.ts +7 -0
- package/es/form/Filter/AdvancedFilter.js +16 -18
- package/es/form/Filter/Layout.d.ts +5 -0
- package/es/form/Filter/LightFilter.d.ts +7 -0
- package/es/form/Filter/LightFilter.js +9 -13
- package/es/form/Filter/SimpleFilter.d.ts +7 -0
- package/es/form/Filter/SimpleFilter.js +5 -8
- package/es/form/Filter/index.d.ts +9 -0
- package/es/form/Filter/index.js +19 -25
- package/es/form/Filter/index.scss +1 -0
- package/es/form/Filter/index2.d.ts +13 -0
- package/es/form/Filter/index2.js +20 -25
- package/es/form/Filter/index2.scss +1 -0
- package/es/form/Filter/useBindUrl.d.ts +2 -0
- package/es/form/Filter/useBindUrl.js +0 -3
- package/es/form/Filter/useSpecialProps.d.ts +6 -0
- package/es/form/Filter/useSpecialProps.js +0 -1
- package/es/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/es/form/ProForm/customComponent.d.ts +3 -0
- package/es/form/ProForm/index.d.ts +5 -0
- package/es/form/ProForm/index.js +21 -17
- package/es/form/ProForm/useAutoLayout.d.ts +9 -0
- package/es/form/ProForm/useAutoLayout.js +0 -4
- package/es/form/ProForm/useAutoSubmit.d.ts +6 -0
- package/es/form/ProForm/useAutoSubmit.js +4 -3
- package/es/form/ProForm/useFieldRequest.d.ts +5 -0
- package/es/form/ProForm/useFormDisplayValues.d.ts +4 -0
- package/es/form/ProForm/useFormDisplayValues.js +0 -1
- package/es/form/ProForm/useInitialRequest.d.ts +6 -0
- package/es/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/es/form/SchemaForm/adapterComponent.js +0 -1
- package/es/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/es/form/SchemaForm/adapterDecorator.js +0 -1
- package/es/form/SchemaForm/adapterType.d.ts +5 -0
- package/es/form/SchemaForm/adapterType.js +0 -1
- package/es/form/SchemaForm/index.d.ts +4 -0
- package/es/form/SchemaForm/index.js +0 -13
- package/es/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/es/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/es/form/SchemaForm/initializeDataSource.d.ts +15 -0
- package/es/form/SchemaForm/initializeDataSource.js +0 -7
- package/es/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormButton.js +0 -2
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/es/form/SchemaForm/initializeFormStep.d.ts +5 -0
- package/es/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/es/form/SchemaForm/initializeReactions.d.ts +2 -0
- package/es/form/SchemaForm/initializeReactions.js +0 -1
- package/es/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/es/form/SchemaForm/initializeRules.d.ts +11 -0
- package/es/form/SchemaForm/initializeSelectTable.d.ts +3 -0
- package/es/form/SchemaForm/initializeSelectTable.js +0 -1
- package/es/form/SchemaForm/reactions.d.ts +6 -0
- package/es/form/SchemaForm/reactions.js +0 -5
- package/es/form/docs/ActionResponse.d.ts +8 -0
- package/es/form/fieldTypeMap.d.ts +7 -0
- package/es/form/index.d.ts +125 -0
- package/es/form/index.js +0 -4
- package/es/form/locales/validate.d.ts +159 -0
- package/es/form/schemaNameMap.d.ts +5 -0
- package/es/form/typing.d.ts +194 -0
- package/es/form/utils/parseSchema.d.ts +3 -0
- package/es/form/utils/parseSchema.js +38 -0
- package/es/form/utils.d.ts +55 -0
- package/es/form/utils.js +0 -12
- package/es/form/warning.d.ts +3 -0
- package/es/form/warning.js +0 -2
- package/es/global.scss +3 -1
- package/es/hooks/index.d.ts +2 -0
- package/es/image/index.d.ts +22 -0
- package/es/image/index.js +73 -0
- package/es/image/index.scss +3 -0
- package/es/index-without-icon.d.ts +32 -0
- package/es/index.d.ts +34 -0
- package/es/index.js +14 -3
- package/es/info/components/InfoGroup/index.d.ts +5 -0
- package/es/info/components/InfoGroup/index.js +4 -2
- package/es/info/components/InfoValueItem/index.d.ts +5 -0
- package/es/info/components/InfoValueItem/index.js +20 -32
- package/es/info/components/ProInfoItem/index.d.ts +5 -0
- package/es/info/components/ProInfoItem/index.js +0 -1
- package/es/info/components/baseInfo/index.d.ts +8 -0
- package/es/info/components/baseInfo/index.js +4 -5
- package/es/info/components/headerInfo/index.d.ts +8 -0
- package/es/info/components/tableInfo/index.d.ts +7 -0
- package/es/info/components/tableInfo/index.js +4 -6
- package/es/info/index.d.ts +6 -0
- package/es/info/index.js +17 -21
- package/es/info/typing.d.ts +220 -0
- package/es/info/utils/index.d.ts +20 -0
- package/es/info/utils/index.js +0 -3
- package/es/info/utils/layout.d.ts +2 -0
- package/es/info/utils/utils.d.ts +1 -0
- package/es/layout/index.d.ts +2 -0
- package/es/layout/index.js +0 -2
- package/es/next-xconsole.scss +34 -0
- package/es/nocode/configurators/Card.d.ts +3 -0
- package/es/nocode/configurators/PageHeader.d.ts +3 -0
- package/es/nocode/configurators/ProTable.d.ts +3 -0
- package/es/nocode/configurators/ProTable.js +1 -22
- package/es/nocode/configurators/common.d.ts +280 -0
- package/es/nocode/configurators/index.d.ts +15 -0
- package/es/nocode/configurators/index.js +1 -0
- package/es/nocode/configurators/map.d.ts +2 -0
- package/es/nocode/index.d.ts +8 -0
- package/es/nocode/index.js +0 -2
- package/es/nocode/pages/editor.d.ts +12 -0
- package/es/nocode/pages/index.d.ts +14 -0
- package/es/nocode/pages/index.js +1 -29
- package/es/nocode/pages/playground.d.ts +11 -0
- package/es/nocode/pages/playground.js +5 -3
- package/es/nocode/pages/renderer.d.ts +10 -0
- package/es/nocode/pages/renderer.js +6 -4
- package/es/nocode/playground.d.ts +14 -0
- package/es/nocode/playground.js +4 -2
- package/es/page-container/index.d.ts +3 -0
- package/es/page-header/index.d.ts +74 -0
- package/es/page-header/index.js +13 -23
- package/es/page-header/index.scss +2 -1
- package/es/page-header/xconsole.scss +5 -0
- package/es/sidebar/components/sidebar-container/index.d.ts +5 -0
- package/es/sidebar/components/sidebar-container/index.js +7 -10
- package/es/sidebar/components/tree/index.d.ts +6 -0
- package/es/sidebar/components/tree/index.js +24 -28
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +4 -3
- package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
- package/es/sidebar/components/tree-node/components/IconAction/index.js +2 -4
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
- package/es/sidebar/components/tree-node/components/IconSwitch/index.js +0 -1
- package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/es/sidebar/components/tree-node/index.d.ts +7 -0
- package/es/sidebar/components/tree-node/index.js +16 -29
- package/es/sidebar/index.d.ts +9 -0
- package/es/sidebar/index.js +13 -18
- package/es/sidebar/typing.d.ts +145 -0
- package/es/sidebar/utils/action-ref.d.ts +3 -0
- package/es/sidebar/utils/index.d.ts +364 -0
- package/es/sidebar/utils/index.js +18 -19
- package/es/skeleton/index.d.ts +3 -0
- package/es/table/components/CardView/index.d.ts +5 -0
- package/es/table/components/CardView/index.js +387 -0
- package/es/table/components/CardView/index.scss +46 -0
- package/es/table/components/EmptyContent/index.d.ts +2 -0
- package/es/table/components/Filter/index.d.ts +12 -0
- package/es/table/components/Filter/index.js +110 -79
- package/es/table/components/Layout/index.d.ts +5 -0
- package/es/table/components/Layout/index.js +16 -16
- package/es/table/components/Layout/index.scss +1 -0
- package/es/table/components/LoadMore/index.d.ts +20 -0
- package/es/table/components/LoadMore/index.js +88 -0
- package/es/table/components/LoadMore/index.scss +19 -0
- package/es/table/components/Pagination/index.d.ts +8 -0
- package/es/table/components/Pagination/index.js +48 -31
- package/es/table/components/QuickAction/index.d.ts +11 -0
- package/es/table/components/QuickAction/index.js +2 -3
- package/es/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/es/table/components/ToolBar/CardSwitch.js +52 -0
- package/es/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/es/table/components/ToolBar/DensityIcon.js +2 -7
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FilterColumnIcon.js +41 -35
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +0 -1
- package/es/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/es/table/components/ToolBar/Fullscreen.js +10 -3
- package/es/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/es/table/components/ToolBar/RefreshIcon.js +162 -26
- package/es/table/components/ToolBar/index.d.ts +5 -0
- package/es/table/components/ToolBar/index.js +65 -33
- package/es/table/components/ToolBar/index.scss +27 -1
- package/es/table/index.d.ts +6 -0
- package/es/table/index.js +308 -137
- package/es/table/index.scss +8 -0
- package/es/table/typing.d.ts +426 -0
- package/es/table/utils/columnRender.d.ts +13 -0
- package/es/table/utils/columnRender.js +32 -37
- package/es/table/utils/genProColumnToColumn.d.ts +13 -0
- package/es/table/utils/genProColumnToColumn.js +10 -3
- package/es/table/utils/getTableProps.d.ts +2 -0
- package/es/table/utils/getTableSortIcons.d.ts +3 -0
- package/es/table/utils/index.d.ts +19 -0
- package/es/table/utils/index.js +0 -6
- package/es/table/utils/pureColumnRender.d.ts +9 -0
- package/es/table/utils/pureColumnRender.js +1 -9
- package/es/table/utils/pureGenProColumnToColumn.d.ts +7 -0
- package/es/table/utils/useTableSelection.d.ts +3 -0
- package/es/table/utils/util.d.ts +5 -0
- package/es/table/utils/util.js +19 -0
- package/es/templates/Detail/index.d.ts +2 -0
- package/es/templates/Form/index.d.ts +2 -0
- package/es/templates/List/index.d.ts +9 -0
- package/es/templates/List/index.js +6 -4
- package/es/templates/index.d.ts +3 -0
- package/es/templates/index.js +1 -2
- package/es/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/es/timeline/ProTimeLineItem/index.js +5 -9
- package/es/timeline/index.d.ts +10 -0
- package/es/timeline/index.js +5 -5
- package/es/timeline/typing.d.ts +107 -0
- package/es/utils/aspect.d.ts +2 -0
- package/es/utils/aspect.js +60 -0
- package/es/utils/index.d.ts +3 -0
- package/es/utils/message.d.ts +3 -0
- package/es/utils/message.js +5 -3
- package/es/xconsole.scss +527 -0
- package/lib/actions/base.d.ts +24 -0
- package/lib/actions/base.js +1 -1
- package/lib/actions/confirm.d.ts +7 -0
- package/lib/actions/danger-confirm.d.ts +7 -0
- package/lib/actions/danger-pop-confirm.d.ts +5 -0
- package/lib/actions/dialog-component.d.ts +10 -0
- package/lib/actions/dialog-component.js +4 -1
- package/lib/actions/dialog-form.d.ts +29 -0
- package/lib/actions/dialog-form.js +7 -9
- package/lib/actions/dialog-info.d.ts +9 -0
- package/lib/actions/dialog-table.d.ts +9 -0
- package/lib/actions/dialog.d.ts +40 -0
- package/lib/actions/dialog.js +7 -8
- package/lib/actions/drawer-form.d.ts +6 -0
- package/lib/actions/drawer-info.d.ts +6 -0
- package/lib/actions/drawer-table.d.ts +6 -0
- package/lib/actions/drawer.d.ts +6 -0
- package/lib/actions/error.d.ts +7 -0
- package/lib/actions/index.d.ts +114 -0
- package/lib/actions/index.js +89 -58
- package/lib/actions/index.scss +10 -1
- package/lib/actions/link.d.ts +8 -0
- package/lib/actions/link.js +2 -3
- package/lib/actions/notice.d.ts +7 -0
- package/lib/actions/pop-confirm.d.ts +9 -0
- package/lib/actions/quick.d.ts +2 -0
- package/lib/actions/quick.js +33 -0
- package/lib/actions/request.d.ts +9 -0
- package/lib/actions/request.js +2 -3
- package/lib/actions/utils.d.ts +1 -0
- package/lib/card/card-container.d.ts +18 -0
- package/lib/card/card-container.js +4 -6
- package/lib/card/divider.d.ts +6 -0
- package/lib/card/divider.js +4 -2
- package/lib/card/index.d.ts +109 -0
- package/lib/card/index.js +10 -20
- package/lib/card/index.scss +15 -0
- package/lib/card/selectable.d.ts +13 -0
- package/lib/card/selectable.js +4 -2
- package/lib/card/tab.d.ts +6 -0
- package/lib/card/tab.js +4 -2
- package/lib/card/utils.d.ts +9 -0
- package/lib/card/xconsole.scss +3 -0
- package/lib/field/index.d.ts +3 -0
- package/lib/form/Components/Editable/index.d.ts +20 -0
- package/lib/form/Components/Editable/index.js +2 -2
- package/lib/form/Components/FormGroup/index.d.ts +14 -0
- package/lib/form/Components/FormGroup/index.js +3 -4
- package/lib/form/Components/FormItem2/animation.scss +72 -0
- package/lib/form/Components/FormItem2/grid.scss +173 -0
- package/lib/form/Components/FormItem2/index.d.ts +41 -0
- package/lib/form/Components/FormItem2/index.js +299 -0
- package/lib/form/Components/FormItem2/main.scss +413 -0
- package/lib/form/Components/FormItem2/scss/variable.scss +118 -0
- package/lib/form/Components/FormItem2/style.d.ts +1 -0
- package/lib/form/Components/FormItem2/style.js +3 -0
- package/lib/form/Components/LightFilter/componentMap.d.ts +3 -0
- package/lib/form/Components/LightFilter/index.d.ts +17 -0
- package/lib/form/Components/LightFilter/index.js +2 -11
- package/lib/form/Components/LightFilter/index.scss +4 -0
- package/lib/form/Components/ProField/index.d.ts +2 -0
- package/lib/form/Components/ProField/index.js +4 -2
- package/lib/form/Components/ProField/mapDateFormat.d.ts +3 -0
- package/lib/form/Components/Text/index.d.ts +8 -0
- package/lib/form/Components/Text/index.js +4 -2
- package/lib/form/Components/__builtins__/empty.d.ts +1 -0
- package/lib/form/Components/__builtins__/empty.js +59 -0
- package/lib/form/Components/__builtins__/hooks/index.d.ts +2 -0
- package/lib/form/Components/__builtins__/hooks/index.js +27 -0
- package/lib/form/Components/__builtins__/hooks/useClickAway.d.ts +5 -0
- package/lib/form/Components/__builtins__/hooks/useClickAway.js +44 -0
- package/lib/form/Components/__builtins__/hooks/usePrefixCls.d.ts +3 -0
- package/lib/form/Components/__builtins__/hooks/usePrefixCls.js +15 -0
- package/lib/form/Components/__builtins__/icons.d.ts +20 -0
- package/lib/form/Components/__builtins__/icons.js +174 -0
- package/lib/form/Components/__builtins__/index.d.ts +8 -0
- package/lib/form/Components/__builtins__/index.js +93 -0
- package/lib/form/Components/__builtins__/loading.d.ts +1 -0
- package/lib/form/Components/__builtins__/loading.js +48 -0
- package/lib/form/Components/__builtins__/mapSize.d.ts +1 -0
- package/lib/form/Components/__builtins__/mapSize.js +20 -0
- package/lib/form/Components/__builtins__/mapStatus.d.ts +2 -0
- package/lib/form/Components/__builtins__/mapStatus.js +27 -0
- package/lib/form/Components/__builtins__/moment.d.ts +2 -0
- package/lib/form/Components/__builtins__/moment.js +56 -0
- package/lib/form/Components/__builtins__/pickDataProps.d.ts +1 -0
- package/lib/form/Components/__builtins__/pickDataProps.js +16 -0
- package/lib/form/Components/form-layout/index.d.ts +74 -0
- package/lib/form/Components/form-layout/index.js +88 -0
- package/lib/form/Components/form-layout/main.scss +0 -0
- package/lib/form/Components/form-layout/style.d.ts +1 -0
- package/lib/form/Components/form-layout/style.js +3 -0
- package/lib/form/Components/form-layout/useResponsiveFormLayout.d.ts +18 -0
- package/lib/form/Components/form-layout/useResponsiveFormLayout.js +94 -0
- package/lib/form/Filter/AdvancedFilter.d.ts +7 -0
- package/lib/form/Filter/AdvancedFilter.js +16 -18
- package/lib/form/Filter/Layout.d.ts +5 -0
- package/lib/form/Filter/LightFilter.d.ts +7 -0
- package/lib/form/Filter/LightFilter.js +9 -13
- package/lib/form/Filter/SimpleFilter.d.ts +7 -0
- package/lib/form/Filter/SimpleFilter.js +5 -8
- package/lib/form/Filter/index.d.ts +9 -0
- package/lib/form/Filter/index.js +19 -25
- package/lib/form/Filter/index.scss +1 -0
- package/lib/form/Filter/index2.d.ts +13 -0
- package/lib/form/Filter/index2.js +20 -25
- package/lib/form/Filter/index2.scss +1 -0
- package/lib/form/Filter/useBindUrl.d.ts +2 -0
- package/lib/form/Filter/useBindUrl.js +0 -3
- package/lib/form/Filter/useSpecialProps.d.ts +6 -0
- package/lib/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/lib/form/ProForm/customComponent.d.ts +3 -0
- package/lib/form/ProForm/index.d.ts +5 -0
- package/lib/form/ProForm/index.js +20 -16
- package/lib/form/ProForm/useAutoLayout.d.ts +9 -0
- package/lib/form/ProForm/useAutoLayout.js +0 -4
- package/lib/form/ProForm/useAutoSubmit.d.ts +6 -0
- package/lib/form/ProForm/useAutoSubmit.js +2 -3
- package/lib/form/ProForm/useFieldRequest.d.ts +5 -0
- package/lib/form/ProForm/useFormDisplayValues.d.ts +4 -0
- package/lib/form/ProForm/useFormDisplayValues.js +0 -1
- package/lib/form/ProForm/useInitialRequest.d.ts +6 -0
- package/lib/form/SchemaForm/adapterComponent.d.ts +5 -0
- package/lib/form/SchemaForm/adapterComponent.js +0 -1
- package/lib/form/SchemaForm/adapterDecorator.d.ts +6 -0
- package/lib/form/SchemaForm/adapterType.d.ts +5 -0
- package/lib/form/SchemaForm/adapterType.js +0 -1
- package/lib/form/SchemaForm/index.d.ts +4 -0
- package/lib/form/SchemaForm/index.js +0 -13
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +3 -0
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +3 -0
- package/lib/form/SchemaForm/initializeDataSource.d.ts +15 -0
- package/lib/form/SchemaForm/initializeDataSource.js +2 -9
- package/lib/form/SchemaForm/initializeFormButton.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormButton.js +0 -2
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +3 -0
- package/lib/form/SchemaForm/initializeFormStep.d.ts +5 -0
- package/lib/form/SchemaForm/initializeFormTab.d.ts +3 -0
- package/lib/form/SchemaForm/initializeReactions.d.ts +2 -0
- package/lib/form/SchemaForm/initializeReactions.js +0 -1
- package/lib/form/SchemaForm/initializeRequest.d.ts +11 -0
- package/lib/form/SchemaForm/initializeRules.d.ts +11 -0
- package/lib/form/SchemaForm/initializeSelectTable.d.ts +3 -0
- package/lib/form/SchemaForm/reactions.d.ts +6 -0
- package/lib/form/SchemaForm/reactions.js +0 -5
- package/lib/form/docs/ActionResponse.d.ts +8 -0
- package/lib/form/fieldTypeMap.d.ts +7 -0
- package/lib/form/index.d.ts +125 -0
- package/lib/form/locales/validate.d.ts +159 -0
- package/lib/form/schemaNameMap.d.ts +5 -0
- package/lib/form/typing.d.ts +194 -0
- package/lib/form/typing.js +5 -1
- package/lib/form/utils/parseSchema.d.ts +3 -0
- package/lib/form/utils/parseSchema.js +45 -0
- package/lib/form/utils.d.ts +55 -0
- package/lib/form/utils.js +0 -11
- package/lib/form/warning.d.ts +3 -0
- package/lib/form/warning.js +0 -2
- package/lib/global.scss +3 -1
- package/lib/hooks/index.d.ts +2 -0
- package/lib/image/index.d.ts +22 -0
- package/lib/image/index.js +83 -0
- package/lib/image/index.scss +3 -0
- package/lib/index-without-icon.d.ts +32 -0
- package/lib/index.d.ts +34 -0
- package/lib/index.js +31 -2
- package/lib/info/components/InfoGroup/index.d.ts +5 -0
- package/lib/info/components/InfoGroup/index.js +4 -2
- package/lib/info/components/InfoValueItem/index.d.ts +5 -0
- package/lib/info/components/InfoValueItem/index.js +20 -32
- package/lib/info/components/ProInfoItem/index.d.ts +5 -0
- package/lib/info/components/ProInfoItem/index.js +0 -1
- package/lib/info/components/baseInfo/index.d.ts +8 -0
- package/lib/info/components/baseInfo/index.js +4 -5
- package/lib/info/components/headerInfo/index.d.ts +8 -0
- package/lib/info/components/tableInfo/index.d.ts +7 -0
- package/lib/info/components/tableInfo/index.js +4 -6
- package/lib/info/index.d.ts +6 -0
- package/lib/info/index.js +16 -20
- package/lib/info/typing.d.ts +220 -0
- package/lib/info/typing.js +5 -1
- package/lib/info/utils/index.d.ts +20 -0
- package/lib/info/utils/index.js +0 -3
- package/lib/info/utils/layout.d.ts +2 -0
- package/lib/info/utils/utils.d.ts +1 -0
- package/lib/layout/index.d.ts +2 -0
- package/lib/next-xconsole.scss +34 -0
- package/lib/nocode/configurators/Card.d.ts +3 -0
- package/lib/nocode/configurators/PageHeader.d.ts +3 -0
- package/lib/nocode/configurators/ProTable.d.ts +3 -0
- package/lib/nocode/configurators/ProTable.js +1 -22
- package/lib/nocode/configurators/common.d.ts +280 -0
- package/lib/nocode/configurators/index.d.ts +15 -0
- package/lib/nocode/configurators/index.js +1 -0
- package/lib/nocode/configurators/map.d.ts +2 -0
- package/lib/nocode/index.d.ts +8 -0
- package/lib/nocode/pages/editor.d.ts +12 -0
- package/lib/nocode/pages/index.d.ts +14 -0
- package/lib/nocode/pages/index.js +2 -27
- package/lib/nocode/pages/playground.d.ts +11 -0
- package/lib/nocode/pages/playground.js +5 -3
- package/lib/nocode/pages/renderer.d.ts +10 -0
- package/lib/nocode/pages/renderer.js +6 -4
- package/lib/nocode/playground.d.ts +14 -0
- package/lib/nocode/playground.js +4 -2
- package/lib/page-container/index.d.ts +3 -0
- package/lib/page-header/index.d.ts +74 -0
- package/lib/page-header/index.js +11 -22
- package/lib/page-header/index.scss +2 -1
- package/lib/page-header/xconsole.scss +5 -0
- package/lib/sidebar/components/sidebar-container/index.d.ts +5 -0
- package/lib/sidebar/components/sidebar-container/index.js +7 -10
- package/lib/sidebar/components/tree/index.d.ts +6 -0
- package/lib/sidebar/components/tree/index.js +24 -28
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +4 -3
- package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +2 -4
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +0 -1
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/lib/sidebar/components/tree-node/index.d.ts +7 -0
- package/lib/sidebar/components/tree-node/index.js +16 -29
- package/lib/sidebar/index.d.ts +9 -0
- package/lib/sidebar/index.js +20 -18
- package/lib/sidebar/typing.d.ts +145 -0
- package/lib/sidebar/typing.js +5 -1
- package/lib/sidebar/utils/action-ref.d.ts +3 -0
- package/lib/sidebar/utils/index.d.ts +364 -0
- package/lib/sidebar/utils/index.js +18 -19
- package/lib/skeleton/index.d.ts +3 -0
- package/lib/table/components/CardView/index.d.ts +5 -0
- package/lib/table/components/CardView/index.js +397 -0
- package/lib/table/components/CardView/index.scss +46 -0
- package/lib/table/components/EmptyContent/index.d.ts +2 -0
- package/lib/table/components/Filter/index.d.ts +12 -0
- package/lib/table/components/Filter/index.js +109 -78
- package/lib/table/components/Layout/index.d.ts +5 -0
- package/lib/table/components/Layout/index.js +17 -17
- package/lib/table/components/Layout/index.scss +1 -0
- package/lib/table/components/LoadMore/index.d.ts +20 -0
- package/lib/table/components/LoadMore/index.js +99 -0
- package/lib/table/components/LoadMore/index.scss +19 -0
- package/lib/table/components/Pagination/index.d.ts +8 -0
- package/lib/table/components/Pagination/index.js +47 -30
- package/lib/table/components/QuickAction/index.d.ts +11 -0
- package/lib/table/components/QuickAction/index.js +2 -3
- package/lib/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/lib/table/components/ToolBar/CardSwitch.js +60 -0
- package/lib/table/components/ToolBar/DensityIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/DensityIcon.js +2 -7
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FilterColumnIcon.js +40 -34
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +0 -1
- package/lib/table/components/ToolBar/Fullscreen.d.ts +10 -0
- package/lib/table/components/ToolBar/Fullscreen.js +10 -3
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +4 -0
- package/lib/table/components/ToolBar/RefreshIcon.js +164 -29
- package/lib/table/components/ToolBar/index.d.ts +5 -0
- package/lib/table/components/ToolBar/index.js +64 -32
- package/lib/table/components/ToolBar/index.scss +27 -1
- package/lib/table/index.d.ts +6 -0
- package/lib/table/index.js +307 -136
- package/lib/table/index.scss +8 -0
- package/lib/table/typing.d.ts +426 -0
- package/lib/table/typing.js +5 -1
- package/lib/table/utils/columnRender.d.ts +13 -0
- package/lib/table/utils/columnRender.js +32 -36
- package/lib/table/utils/genProColumnToColumn.d.ts +13 -0
- package/lib/table/utils/genProColumnToColumn.js +10 -3
- package/lib/table/utils/getTableProps.d.ts +2 -0
- package/lib/table/utils/getTableSortIcons.d.ts +3 -0
- package/lib/table/utils/index.d.ts +19 -0
- package/lib/table/utils/index.js +0 -6
- package/lib/table/utils/pureColumnRender.d.ts +9 -0
- package/lib/table/utils/pureColumnRender.js +1 -9
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +7 -0
- package/lib/table/utils/useTableSelection.d.ts +3 -0
- package/lib/table/utils/util.d.ts +5 -0
- package/lib/table/utils/util.js +25 -0
- package/lib/templates/Detail/index.d.ts +2 -0
- package/lib/templates/Form/index.d.ts +2 -0
- package/lib/templates/List/index.d.ts +9 -0
- package/lib/templates/List/index.js +6 -4
- package/lib/templates/index.d.ts +3 -0
- package/lib/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/lib/timeline/ProTimeLineItem/index.js +5 -9
- package/lib/timeline/index.d.ts +10 -0
- package/lib/timeline/index.js +5 -5
- package/lib/timeline/typing.d.ts +107 -0
- package/lib/timeline/typing.js +5 -1
- package/lib/utils/aspect.d.ts +2 -0
- package/lib/utils/aspect.js +67 -0
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/message.d.ts +3 -0
- package/lib/utils/message.js +5 -3
- package/lib/xconsole.scss +527 -0
- package/package.json +9 -8
|
@@ -14,11 +14,13 @@ var _utils2 = require("../../utils");
|
|
|
14
14
|
var _hooks = require("@teamix/hooks");
|
|
15
15
|
var _actionRef = require("../../utils/action-ref");
|
|
16
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"];
|
|
17
|
+
var _excluded = ["dataSource", "selectedKeys", "checkedKeys", "defaultExpandedKeys", "defaultExpandAll", "expandedKeys", "onSelect", "onCheck", "isNodeBlock", "searchKey", "actionRef", "onBeforeRenderNodeEvent", "beforeRenderNode", "className", "expandAll", "onDataSourceChange", "expandLevel", "defaultSelectedKeys", "defaultCheckedKeys"];
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
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
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
|
|
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; }
|
|
22
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); }
|
|
23
25
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
24
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."); }
|
|
@@ -54,8 +56,9 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
54
56
|
onDataSourceChange = props.onDataSourceChange,
|
|
55
57
|
_props$expandLevel = props.expandLevel,
|
|
56
58
|
expandLevel = _props$expandLevel === void 0 ? 1 : _props$expandLevel,
|
|
59
|
+
defaultSelectedKeys = props.defaultSelectedKeys,
|
|
60
|
+
defaultCheckedKeys = props.defaultCheckedKeys,
|
|
57
61
|
others = _objectWithoutProperties(props, _excluded);
|
|
58
|
-
|
|
59
62
|
// 使用 beforeRenderNode 处理 dataSource
|
|
60
63
|
var processDataSource = function processDataSource(dataSource) {
|
|
61
64
|
var newDataSource = (0, _lodash.default)(dataSource);
|
|
@@ -71,7 +74,6 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
71
74
|
}
|
|
72
75
|
return newDataSource;
|
|
73
76
|
};
|
|
74
|
-
|
|
75
77
|
// 自动展开父节点。过滤时用
|
|
76
78
|
var _useState = (0, _react.useState)(false),
|
|
77
79
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -89,38 +91,41 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
89
91
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
90
92
|
dataSource = _useState8[0],
|
|
91
93
|
setDataSource = _useState8[1];
|
|
92
|
-
var _useState9 = (0, _react.useState)(selectedKeysProp),
|
|
94
|
+
var _useState9 = (0, _react.useState)(selectedKeysProp !== null && selectedKeysProp !== void 0 ? selectedKeysProp : defaultSelectedKeys),
|
|
93
95
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
94
96
|
selectedKeys = _useState10[0],
|
|
95
97
|
setSelectedKeys = _useState10[1];
|
|
96
|
-
var _useState11 = (0, _react.useState)(checkedKeysProp),
|
|
98
|
+
var _useState11 = (0, _react.useState)(checkedKeysProp !== null && checkedKeysProp !== void 0 ? checkedKeysProp : defaultCheckedKeys),
|
|
97
99
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
98
100
|
checkedKeys = _useState12[0],
|
|
99
101
|
setCheckedKeys = _useState12[1];
|
|
100
102
|
(0, _react.useEffect)(function () {
|
|
101
103
|
setDefaultExpandedKeys();
|
|
102
104
|
}, []);
|
|
103
|
-
|
|
104
105
|
// 监听 selectedKeys,用于受控
|
|
105
106
|
(0, _react.useEffect)(function () {
|
|
106
|
-
|
|
107
|
+
if (selectedKeysProp) {
|
|
108
|
+
setSelectedKeys(selectedKeysProp);
|
|
109
|
+
}
|
|
107
110
|
}, [selectedKeysProp]);
|
|
108
|
-
|
|
111
|
+
// 监听 selectedKeys,用于受控
|
|
112
|
+
(0, _react.useEffect)(function () {
|
|
113
|
+
if (checkedKeysProp) {
|
|
114
|
+
setCheckedKeys(checkedKeysProp);
|
|
115
|
+
}
|
|
116
|
+
}, [checkedKeysProp]);
|
|
109
117
|
// 更新外部传入的 dataSource
|
|
110
118
|
(0, _hooks.useUpdateEffect)(function () {
|
|
111
119
|
setDataSource(processDataSource(dataSourceProp !== null && dataSourceProp !== void 0 ? dataSourceProp : []));
|
|
112
120
|
}, [dataSourceProp]);
|
|
113
|
-
|
|
114
121
|
// 监听展开全部事件
|
|
115
122
|
(0, _hooks.useUpdateEffect)(function () {
|
|
116
123
|
onChangeExpandAll();
|
|
117
124
|
}, [expandAll]);
|
|
118
|
-
|
|
119
125
|
// 监听展开层级事件
|
|
120
126
|
(0, _hooks.useUpdateEffect)(function () {
|
|
121
127
|
onChangeExpandLevel();
|
|
122
128
|
}, [expandLevel]);
|
|
123
|
-
|
|
124
129
|
// 监听 DataSource 变化事件
|
|
125
130
|
(0, _react.useEffect)(function () {
|
|
126
131
|
onDataSourceChange === null || onDataSourceChange === void 0 ? void 0 : onDataSourceChange(dataSource);
|
|
@@ -132,7 +137,6 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
132
137
|
onChangeExpandLevel();
|
|
133
138
|
}
|
|
134
139
|
}, [dataSource]);
|
|
135
|
-
|
|
136
140
|
// 展开全部事件
|
|
137
141
|
var onChangeExpandAll = function onChangeExpandAll() {
|
|
138
142
|
if (expandAll) {
|
|
@@ -141,13 +145,11 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
141
145
|
setExpandedKeys([]);
|
|
142
146
|
}
|
|
143
147
|
};
|
|
144
|
-
|
|
145
148
|
// 展开层级事件
|
|
146
149
|
var onChangeExpandLevel = function onChangeExpandLevel() {
|
|
147
150
|
var keys = (0, _utils2.getTreeLevelKey)(dataSource, expandLevel - 1);
|
|
148
151
|
setExpandedKeys(keys);
|
|
149
152
|
};
|
|
150
|
-
|
|
151
153
|
// 绑定actionRef
|
|
152
154
|
(0, _actionRef.useActionType)(actionRef, {
|
|
153
155
|
setTreeNode: function setTreeNode(treeNode) {
|
|
@@ -166,7 +168,6 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
166
168
|
setDataSource(newDataSource);
|
|
167
169
|
}
|
|
168
170
|
});
|
|
169
|
-
|
|
170
171
|
// dataSource 是否为一层结构
|
|
171
172
|
var hasChildren = (0, _react.useMemo)(function () {
|
|
172
173
|
var flag = false;
|
|
@@ -178,18 +179,15 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
178
179
|
});
|
|
179
180
|
return flag;
|
|
180
181
|
}, [dataSource]);
|
|
181
|
-
|
|
182
182
|
// 组件第一次加载时不执行过滤
|
|
183
183
|
(0, _hooks.useUpdateEffect)(function () {
|
|
184
184
|
filterDataSource(searchKey !== null && searchKey !== void 0 ? searchKey : '');
|
|
185
185
|
}, [searchKey]);
|
|
186
|
-
|
|
187
186
|
// expandedKeys 更新
|
|
188
187
|
(0, _hooks.useUpdateEffect)(function () {
|
|
189
188
|
var _ref4;
|
|
190
189
|
setExpandedKeys((_ref4 = expandedKeysProp !== null && expandedKeysProp !== void 0 ? expandedKeysProp : defaultExpandedKeys) !== null && _ref4 !== void 0 ? _ref4 : []);
|
|
191
190
|
}, [expandedKeysProp, defaultExpandedKeys]);
|
|
192
|
-
|
|
193
191
|
// 设置默认节点展开
|
|
194
192
|
var setDefaultExpandedKeys = function setDefaultExpandedKeys() {
|
|
195
193
|
if (defaultExpandAll) {
|
|
@@ -199,7 +197,6 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
199
197
|
setExpandedKeys((_ref5 = expandedKeysProp !== null && expandedKeysProp !== void 0 ? expandedKeysProp : defaultExpandedKeys) !== null && _ref5 !== void 0 ? _ref5 : []);
|
|
200
198
|
}
|
|
201
199
|
};
|
|
202
|
-
|
|
203
200
|
// 是否占满节点
|
|
204
201
|
var getIsNodeBlock = function getIsNodeBlock() {
|
|
205
202
|
if (isNodeBlock && typeof isNodeBlock === 'boolean') {
|
|
@@ -213,7 +210,6 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
213
210
|
}
|
|
214
211
|
return false;
|
|
215
212
|
};
|
|
216
|
-
|
|
217
213
|
// 过滤
|
|
218
214
|
var filterDataSource = function filterDataSource(value) {
|
|
219
215
|
var searchDataSource = processDataSource(dataSourceProp !== null && dataSourceProp !== void 0 ? dataSourceProp : []);
|
|
@@ -242,7 +238,6 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
242
238
|
var filterTreeNode = function filterTreeNode(node) {
|
|
243
239
|
return matchedKeys && matchedKeys.indexOf(node.props.eventKey) > -1;
|
|
244
240
|
};
|
|
245
|
-
|
|
246
241
|
/** 节点是否包含搜索项 */
|
|
247
242
|
var hasSearchValue = function hasSearchValue(key, item) {
|
|
248
243
|
var _item$label;
|
|
@@ -255,23 +250,24 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
255
250
|
}
|
|
256
251
|
return false;
|
|
257
252
|
};
|
|
258
|
-
|
|
259
253
|
// 树节点点击回调
|
|
260
254
|
var onSelectChange = function onSelectChange(value, extra) {
|
|
261
255
|
var _extra$event, _extra$event$target, _extra$event$target$c;
|
|
262
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')) {
|
|
263
257
|
return;
|
|
264
258
|
}
|
|
265
|
-
|
|
259
|
+
if (!selectedKeys) {
|
|
260
|
+
setSelectedKeys(value);
|
|
261
|
+
}
|
|
266
262
|
onSelect === null || onSelect === void 0 ? void 0 : onSelect(value, extra);
|
|
267
263
|
};
|
|
268
|
-
|
|
269
264
|
// 树节点选中回调
|
|
270
265
|
var onCheckChange = function onCheckChange(value, extra) {
|
|
271
|
-
|
|
266
|
+
if (!checkedKeysProp) {
|
|
267
|
+
setCheckedKeys(value);
|
|
268
|
+
}
|
|
272
269
|
onCheck === null || onCheck === void 0 ? void 0 : onCheck(value, extra);
|
|
273
270
|
};
|
|
274
|
-
|
|
275
271
|
// 节点展开回调
|
|
276
272
|
var handleExpand = function handleExpand(key) {
|
|
277
273
|
setExpandedKeys(key);
|
|
@@ -282,7 +278,7 @@ var ProSidebarTree = function ProSidebarTree(props) {
|
|
|
282
278
|
'': true,
|
|
283
279
|
'is-list': !hasChildren
|
|
284
280
|
})
|
|
285
|
-
}, /*#__PURE__*/_react.default.createElement(_components.Tree,
|
|
281
|
+
}, /*#__PURE__*/_react.default.createElement(_components.Tree, _objectSpread({
|
|
286
282
|
isLabelBlock: true,
|
|
287
283
|
checkedKeys: checkedKeys,
|
|
288
284
|
selectedKeys: selectedKeys,
|
|
@@ -0,0 +1,15 @@
|
|
|
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;
|
|
@@ -11,7 +11,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
require("./index.scss");
|
|
12
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
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
|
|
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; }
|
|
15
17
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
16
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."); }
|
|
17
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); }
|
|
@@ -34,11 +36,10 @@ var ProHoverTooltip = function ProHoverTooltip(props) {
|
|
|
34
36
|
(0, _react.useEffect)(function () {
|
|
35
37
|
setVisible(visibleProp !== null && visibleProp !== void 0 ? visibleProp : false);
|
|
36
38
|
}, [visibleProp]);
|
|
37
|
-
|
|
38
39
|
// 渲染触发器
|
|
39
40
|
var renderTrigger = function renderTrigger() {
|
|
40
41
|
if (tooltip) {
|
|
41
|
-
return /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip,
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({
|
|
42
43
|
align: "t",
|
|
43
44
|
trigger: /*#__PURE__*/_react.default.createElement("span", null, trigger)
|
|
44
45
|
}, tooltipProps), tooltip);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ProActionConfig } from '../../../../..';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './index.scss';
|
|
4
|
+
export declare type ProIconActionProps = {
|
|
5
|
+
trigger: React.ReactNode;
|
|
6
|
+
icon: React.ReactNode;
|
|
7
|
+
action: ProActionConfig;
|
|
8
|
+
visible?: boolean;
|
|
9
|
+
tooltip?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
declare const ProIconAction: React.FC<ProIconActionProps>;
|
|
12
|
+
export default ProIconAction;
|
|
@@ -14,7 +14,6 @@ require("./index.scss");
|
|
|
14
14
|
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); }
|
|
15
15
|
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; }
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
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); }
|
|
18
17
|
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; }
|
|
19
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20
19
|
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; }
|
|
@@ -40,7 +39,6 @@ var ProIconAction = function ProIconAction(props) {
|
|
|
40
39
|
var wrapperClassName = (_popupProps$wrapperCl = popupProps === null || popupProps === void 0 ? void 0 : popupProps.wrapperClassName) !== null && _popupProps$wrapperCl !== void 0 ? _popupProps$wrapperCl : '';
|
|
41
40
|
var _beforeOpen = popupProps === null || popupProps === void 0 ? void 0 : popupProps.beforeOpen;
|
|
42
41
|
var _beforeClose = popupProps === null || popupProps === void 0 ? void 0 : popupProps.beforeClose;
|
|
43
|
-
|
|
44
42
|
// 获取浮层类单独特殊配置
|
|
45
43
|
var getPopProps = function getPopProps() {
|
|
46
44
|
if (!action.type || action.type.includes('pop-confirm')) {
|
|
@@ -74,13 +72,13 @@ var ProIconAction = function ProIconAction(props) {
|
|
|
74
72
|
}, action), getPopProps()));
|
|
75
73
|
var getTrigger = function getTrigger() {
|
|
76
74
|
if (icon && typeof icon === 'string') {
|
|
77
|
-
return /*#__PURE__*/_react.default.createElement(_icon.default,
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement(_icon.default, _objectSpread({
|
|
78
76
|
className: cls(),
|
|
79
77
|
size: "small",
|
|
80
78
|
type: icon
|
|
81
79
|
}, processAction));
|
|
82
80
|
}
|
|
83
|
-
return /*#__PURE__*/_react.default.createElement("span", processAction, icon !== null && icon !== void 0 ? icon : trigger);
|
|
81
|
+
return /*#__PURE__*/_react.default.createElement("span", _objectSpread({}, processAction), icon !== null && icon !== void 0 ? icon : trigger);
|
|
84
82
|
};
|
|
85
83
|
return /*#__PURE__*/_react.default.createElement(_HoverTooltip.default, {
|
|
86
84
|
trigger: getTrigger(),
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TooltipProps } from '@alicloudfe/components/types/balloon';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './index.scss';
|
|
4
|
+
export declare type ProIconSwitchProps = {
|
|
5
|
+
/** 默认状态 */
|
|
6
|
+
visible?: boolean;
|
|
7
|
+
/** tooltip 显示隐藏 */
|
|
8
|
+
tooltipVisible?: boolean;
|
|
9
|
+
/** 未激活状态下的icon */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
/** 激活状态下的 icon */
|
|
12
|
+
activeIcon?: React.ReactNode;
|
|
13
|
+
/** tooltip */
|
|
14
|
+
tooltip?: React.ReactNode;
|
|
15
|
+
/** cancelTooltip */
|
|
16
|
+
cancelTooltip?: React.ReactNode;
|
|
17
|
+
/** tooltip 配置 */
|
|
18
|
+
tooltipProps?: TooltipProps;
|
|
19
|
+
/** 状态改变的回调 */
|
|
20
|
+
onChange?: (state: boolean) => void;
|
|
21
|
+
};
|
|
22
|
+
declare const ProIconSwitch: React.FC<ProIconSwitchProps>;
|
|
23
|
+
export default ProIconSwitch;
|
|
@@ -36,7 +36,6 @@ var ProIconSwitch = function ProIconSwitch(props) {
|
|
|
36
36
|
(0, _react.useEffect)(function () {
|
|
37
37
|
setVisible(visibleProp !== null && visibleProp !== void 0 ? visibleProp : true);
|
|
38
38
|
}, [visibleProp]);
|
|
39
|
-
|
|
40
39
|
// 点击操作
|
|
41
40
|
var clickHandle = function clickHandle(e, state) {
|
|
42
41
|
e.stopPropagation();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProSidebarDataSource, ProSidebarDataSourceItem } from '../../typing';
|
|
3
|
+
import { ProSidebarProps } from '../..';
|
|
4
|
+
declare const ProSideBarTreeNode: React.FC<ProSidebarDataSourceItem>;
|
|
5
|
+
export declare function renderTreeNode(data: ProSidebarDataSource): JSX.Element[];
|
|
6
|
+
export declare function renderTreeNodeDependenceValue(data: ProSidebarDataSource, onBeforeRenderNodeEvent: ProSidebarProps['onBeforeRenderNodeEvent'], checkedKeys: any[], selectedKeys: any[], allData?: ProSidebarDataSource): JSX.Element[];
|
|
7
|
+
export default ProSideBarTreeNode;
|
|
@@ -20,12 +20,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20
20
|
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); }
|
|
21
21
|
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; }
|
|
22
22
|
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); }
|
|
23
|
+
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; }
|
|
24
|
+
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; }
|
|
23
25
|
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
26
|
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
27
|
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 _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; }
|
|
27
|
-
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; }
|
|
28
|
-
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); }
|
|
29
28
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
30
29
|
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."); }
|
|
31
30
|
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); }
|
|
@@ -45,7 +44,6 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
|
45
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
46
45
|
extraVisible = _useState2[0],
|
|
47
46
|
setExtraVisible = _useState2[1];
|
|
48
|
-
|
|
49
47
|
// 获取 extra 区域渲染组件
|
|
50
48
|
var getExtraComponent = function getExtraComponent(type, action, props, others) {
|
|
51
49
|
var _ref = others !== null && others !== void 0 ? others : {},
|
|
@@ -54,19 +52,19 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
|
54
52
|
if (type === 'action') {
|
|
55
53
|
return /*#__PURE__*/_react.default.createElement(_HoverTooltip.default, {
|
|
56
54
|
visible: !hover || extraVisible,
|
|
57
|
-
trigger: /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup,
|
|
55
|
+
trigger: /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, _objectSpread({
|
|
58
56
|
type: "text",
|
|
59
57
|
actions: action
|
|
60
58
|
}, props))
|
|
61
59
|
});
|
|
62
60
|
}
|
|
63
61
|
if (type === 'iconSwitch') {
|
|
64
|
-
return /*#__PURE__*/_react.default.createElement(_IconSwitch.default,
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_IconSwitch.default, _objectSpread({
|
|
65
63
|
tooltipVisible: !hover || extraVisible
|
|
66
64
|
}, props));
|
|
67
65
|
}
|
|
68
66
|
if (type === 'iconAction') {
|
|
69
|
-
return /*#__PURE__*/_react.default.createElement(_IconAction.default,
|
|
67
|
+
return /*#__PURE__*/_react.default.createElement(_IconAction.default, _objectSpread({
|
|
70
68
|
visible: !hover || extraVisible,
|
|
71
69
|
action: action
|
|
72
70
|
}, props));
|
|
@@ -79,14 +77,11 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
|
79
77
|
});
|
|
80
78
|
}
|
|
81
79
|
};
|
|
82
|
-
|
|
83
80
|
// 渲染 extra 区域
|
|
84
81
|
var renderExtra = function renderExtra() {
|
|
85
82
|
var result = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
86
|
-
|
|
87
83
|
// extra 是否是 action 配置
|
|
88
84
|
var isActionGroupProps = Array.isArray(extra) && ! /*#__PURE__*/(0, _react.isValidElement)(extra === null || extra === void 0 ? void 0 : extra[0]) && Array.isArray(extra === null || extra === void 0 ? void 0 : extra[0]);
|
|
89
|
-
|
|
90
85
|
// 直接渲染 action
|
|
91
86
|
if (isActionGroupProps) {
|
|
92
87
|
result = /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, {
|
|
@@ -94,7 +89,6 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
|
94
89
|
type: "text"
|
|
95
90
|
});
|
|
96
91
|
}
|
|
97
|
-
|
|
98
92
|
// 大杂烩
|
|
99
93
|
if (extra && Array.isArray(extra)) {
|
|
100
94
|
result = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, extra.map(function (item, index) {
|
|
@@ -104,13 +98,12 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
|
104
98
|
className: cls('item-content-extra-item')
|
|
105
99
|
}, item);
|
|
106
100
|
}
|
|
107
|
-
var
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
others = _objectWithoutProperties(_ref2, _excluded);
|
|
101
|
+
var type = item.type,
|
|
102
|
+
_item$action = item.action,
|
|
103
|
+
action = _item$action === void 0 ? {} : _item$action,
|
|
104
|
+
_item$props = item.props,
|
|
105
|
+
props = _item$props === void 0 ? {} : _item$props,
|
|
106
|
+
others = _objectWithoutProperties(item, _excluded);
|
|
114
107
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
115
108
|
key: index,
|
|
116
109
|
className: cls('item-content-extra-item')
|
|
@@ -119,7 +112,6 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
|
119
112
|
}
|
|
120
113
|
return result;
|
|
121
114
|
};
|
|
122
|
-
|
|
123
115
|
// 鼠标移入
|
|
124
116
|
var onMouseEnter = function onMouseEnter(e) {
|
|
125
117
|
var _e$target, _e$target$closest;
|
|
@@ -128,7 +120,6 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
|
128
120
|
}
|
|
129
121
|
setExtraVisible(true);
|
|
130
122
|
};
|
|
131
|
-
|
|
132
123
|
// 鼠标移出
|
|
133
124
|
var onMouseLeave = function onMouseLeave(e) {
|
|
134
125
|
var _e$target2, _e$target2$closest;
|
|
@@ -137,7 +128,6 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
|
137
128
|
}
|
|
138
129
|
setExtraVisible(false);
|
|
139
130
|
};
|
|
140
|
-
|
|
141
131
|
// 获取 ProFieldRender
|
|
142
132
|
var getFieldRender = function getFieldRender() {
|
|
143
133
|
if (typeof render === 'function') {
|
|
@@ -148,7 +138,6 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
|
148
138
|
emptyText: '-'
|
|
149
139
|
}, render);
|
|
150
140
|
};
|
|
151
|
-
|
|
152
141
|
// 获取 tag 参数
|
|
153
142
|
var getTags = function getTags(tags) {
|
|
154
143
|
if ( /*#__PURE__*/(0, _react.isValidElement)(tags)) {
|
|
@@ -173,7 +162,7 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
|
173
162
|
onMouseLeave: onMouseLeave
|
|
174
163
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
175
164
|
className: cls('item-context-front')
|
|
176
|
-
}, /*#__PURE__*/_react.default.createElement(_proField.default,
|
|
165
|
+
}, /*#__PURE__*/_react.default.createElement(_proField.default, _objectSpread({
|
|
177
166
|
value: label,
|
|
178
167
|
type: valueType,
|
|
179
168
|
render: getFieldRender()
|
|
@@ -183,20 +172,18 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
|
|
183
172
|
className: cls('item-content-extra')
|
|
184
173
|
}, renderExtra()));
|
|
185
174
|
};
|
|
186
|
-
|
|
187
175
|
// 渲染树节点
|
|
188
176
|
function renderTreeNode(data) {
|
|
189
177
|
return data.map(function (item) {
|
|
190
178
|
var _getTreeNodeProps = (0, _.getTreeNodeProps)(item),
|
|
191
179
|
nodeProps = _getTreeNodeProps.nodeProps,
|
|
192
180
|
labelProps = _getTreeNodeProps.labelProps;
|
|
193
|
-
return /*#__PURE__*/_react.default.createElement(_components.Tree.Node,
|
|
181
|
+
return /*#__PURE__*/_react.default.createElement(_components.Tree.Node, _objectSpread({
|
|
194
182
|
key: item.value,
|
|
195
|
-
label: /*#__PURE__*/_react.default.createElement(ProSideBarTreeNode, labelProps)
|
|
183
|
+
label: /*#__PURE__*/_react.default.createElement(ProSideBarTreeNode, _objectSpread({}, labelProps))
|
|
196
184
|
}, nodeProps), item.children && item.children.length > 0 && renderTreeNode(item.children));
|
|
197
185
|
});
|
|
198
186
|
}
|
|
199
|
-
|
|
200
187
|
// 渲染树节点 依赖 value
|
|
201
188
|
function renderTreeNodeDependenceValue(data, onBeforeRenderNodeEvent, checkedKeys, selectedKeys, allData) {
|
|
202
189
|
return data.map(function (item) {
|
|
@@ -207,9 +194,9 @@ function renderTreeNodeDependenceValue(data, onBeforeRenderNodeEvent, checkedKey
|
|
|
207
194
|
var _getTreeNodeProps2 = (0, _.getTreeNodeProps)(newProps),
|
|
208
195
|
nodeProps = _getTreeNodeProps2.nodeProps,
|
|
209
196
|
labelProps = _getTreeNodeProps2.labelProps;
|
|
210
|
-
return /*#__PURE__*/_react.default.createElement(_components.Tree.Node,
|
|
197
|
+
return /*#__PURE__*/_react.default.createElement(_components.Tree.Node, _objectSpread({
|
|
211
198
|
key: item.value,
|
|
212
|
-
label: /*#__PURE__*/_react.default.createElement(ProSideBarTreeNode, labelProps)
|
|
199
|
+
label: /*#__PURE__*/_react.default.createElement(ProSideBarTreeNode, _objectSpread({}, labelProps))
|
|
213
200
|
}, nodeProps), item.children && item.children.length > 0 && renderTreeNodeDependenceValue(item.children, onBeforeRenderNodeEvent, checkedKeys, selectedKeys, allData !== null && allData !== void 0 ? allData : data));
|
|
214
201
|
});
|
|
215
202
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
import { ProSidebarProps } from './typing';
|
|
4
|
+
export * from './typing';
|
|
5
|
+
export * from './utils';
|
|
6
|
+
import ProIconSwitch from './components/tree-node/components/IconSwitch';
|
|
7
|
+
declare const ProSidebar: React.FC<ProSidebarProps>;
|
|
8
|
+
export default ProSidebar;
|
|
9
|
+
export { ProIconSwitch };
|