@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["filters", "dataIndex"];
|
|
1
|
+
var _excluded = ["filters", "dataIndex", "children"];
|
|
2
2
|
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; }
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -14,9 +14,15 @@ import { getLanguage } from '@teamix/utils';
|
|
|
14
14
|
export default function genProColumnToColumn(columns, /** 是否渲染骨架屏 */
|
|
15
15
|
showSkeleton, actionRef) {
|
|
16
16
|
var context = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
17
|
+
var
|
|
18
|
+
// 用于埋点
|
|
19
|
+
dataTeamixSpm = arguments.length > 4 ? arguments[4] : undefined;
|
|
20
|
+
var bindUrl = arguments.length > 5 ? arguments[5] : undefined;
|
|
21
|
+
var bindUrlProps = arguments.length > 6 ? arguments[6] : undefined;
|
|
17
22
|
return columns.map(function (columnProps) {
|
|
18
23
|
var filters = columnProps.filters,
|
|
19
24
|
dataIndex = columnProps.dataIndex,
|
|
25
|
+
children = columnProps.children,
|
|
20
26
|
others = _objectWithoutProperties(columnProps, _excluded);
|
|
21
27
|
if (showSkeleton) {
|
|
22
28
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
@@ -34,10 +40,11 @@ showSkeleton, actionRef) {
|
|
|
34
40
|
align: columnProps.valueType === 'money' ? 'right' : 'left',
|
|
35
41
|
wordBreak: getLanguage() === 'en-us' ? 'word' : 'all'
|
|
36
42
|
}, others), {}, {
|
|
43
|
+
children: children ? genProColumnToColumn(children, showSkeleton, actionRef, context) : undefined,
|
|
37
44
|
dataIndex: dataIndex === null || dataIndex === void 0 ? void 0 : dataIndex.toString(),
|
|
38
|
-
title: renderColumnsTitle(columnProps, actionRef),
|
|
45
|
+
title: renderColumnsTitle(columnProps, actionRef, bindUrl, bindUrlProps),
|
|
39
46
|
cell: function cell(value, index, record) {
|
|
40
|
-
return renderCell(value, columnProps, index, record, actionRef, context);
|
|
47
|
+
return renderCell(value, columnProps, index, record, actionRef, context, dataTeamixSpm);
|
|
41
48
|
}
|
|
42
49
|
});
|
|
43
50
|
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ProTableActionType } from '../typing';
|
|
3
|
+
import { ProTableProps, ProTableColumnProps } from '..';
|
|
4
|
+
export declare function actionRefUseStateOn(callback: any, state: string, ...args: any): void;
|
|
5
|
+
/** table 组件内监听 不对外暴露 */
|
|
6
|
+
export declare function on(fun: any, key: string): void;
|
|
7
|
+
/** table 组件内销毁监听 不对外暴露 */
|
|
8
|
+
export declare function off(key: string): void;
|
|
9
|
+
/** table 组件内触发事件 不对外暴露 */
|
|
10
|
+
export declare function emit(key: string, ...args: any): void;
|
|
11
|
+
export declare function initActionRef(ref: React.MutableRefObject<ProTableActionType | undefined>, action: ProTableActionType): void;
|
|
12
|
+
export declare function useActionType<T>(ref: React.MutableRefObject<ProTableActionType | undefined>, action: ProTableActionType): void;
|
|
13
|
+
export declare function cloneDeep<T>(obj: T): T;
|
|
14
|
+
/**
|
|
15
|
+
* 处理默认过滤参数
|
|
16
|
+
* @param columns
|
|
17
|
+
* @param ref
|
|
18
|
+
*/
|
|
19
|
+
export declare function processDefaultFilter(columns: ProTableColumnProps[], ref: React.MutableRefObject<ProTableActionType | undefined>, defaultFilterParams: ProTableProps['defaultFilterParams']): void;
|
package/es/table/utils/index.js
CHANGED
|
@@ -10,7 +10,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
10
10
|
import cloneDeepLodash from 'lodash.clonedeep';
|
|
11
11
|
// 所有 ProTable 组件公用一套组件内事件转发机制
|
|
12
12
|
var tableCallback = {};
|
|
13
|
-
|
|
14
13
|
// 组件内对全局状态的更改
|
|
15
14
|
var getMutations = function getMutations(actionRef) {
|
|
16
15
|
var _actionRef$current2, _actionRef$current2$g, _actionRef$current2$g2;
|
|
@@ -51,7 +50,6 @@ var getMutations = function getMutations(actionRef) {
|
|
|
51
50
|
}
|
|
52
51
|
};
|
|
53
52
|
};
|
|
54
|
-
|
|
55
53
|
// 调用绑定的监听函数
|
|
56
54
|
export function actionRefUseStateOn(callback, state) {
|
|
57
55
|
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
@@ -68,19 +66,16 @@ export function actionRefUseStateOn(callback, state) {
|
|
|
68
66
|
});
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
|
-
|
|
72
69
|
/** table 组件内监听 不对外暴露 */
|
|
73
70
|
export function on(fun, key) {
|
|
74
71
|
tableCallback[key] = fun;
|
|
75
72
|
}
|
|
76
|
-
|
|
77
73
|
/** table 组件内销毁监听 不对外暴露 */
|
|
78
74
|
export function off(key) {
|
|
79
75
|
if (tableCallback[key]) {
|
|
80
76
|
delete tableCallback[key];
|
|
81
77
|
}
|
|
82
78
|
}
|
|
83
|
-
|
|
84
79
|
/** table 组件内触发事件 不对外暴露 */
|
|
85
80
|
export function emit(key) {
|
|
86
81
|
var fun = tableCallback[key];
|
|
@@ -101,7 +96,6 @@ export function useActionType(ref, action) {
|
|
|
101
96
|
export function cloneDeep(obj) {
|
|
102
97
|
return cloneDeepLodash(obj);
|
|
103
98
|
}
|
|
104
|
-
|
|
105
99
|
/**
|
|
106
100
|
* 处理默认过滤参数
|
|
107
101
|
* @param columns
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ProTableColumnProps } from '../typing';
|
|
2
|
+
/**
|
|
3
|
+
* 增加了 icon 的功能 render title
|
|
4
|
+
*/
|
|
5
|
+
export declare const renderColumnsTitle: (item: ProTableColumnProps) => JSX.Element;
|
|
6
|
+
/**
|
|
7
|
+
* 负责单元格的具体渲染
|
|
8
|
+
*/
|
|
9
|
+
export declare const renderCell: (value: any, item: ProTableColumnProps, index: number, record: any) => JSX.Element;
|
|
@@ -2,7 +2,6 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
|
|
|
2
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
3
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4
4
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
5
|
-
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); }
|
|
6
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
6
|
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."); }
|
|
8
7
|
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); }
|
|
@@ -28,7 +27,6 @@ export var renderColumnsTitle = function renderColumnsTitle(item) {
|
|
|
28
27
|
icon: item.tooltipIcon
|
|
29
28
|
}));
|
|
30
29
|
};
|
|
31
|
-
|
|
32
30
|
/**
|
|
33
31
|
* 负责单元格的具体渲染
|
|
34
32
|
*/
|
|
@@ -38,12 +36,10 @@ export var renderCell = function renderCell(value, item, index, record) {
|
|
|
38
36
|
render = item.render,
|
|
39
37
|
dataIndex = item.dataIndex,
|
|
40
38
|
format = item.format;
|
|
41
|
-
|
|
42
39
|
// 如果没传 dataIndex,返回 null
|
|
43
40
|
if (!dataIndex) {
|
|
44
41
|
value = null;
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
// 处理 dataIndex 为数组的情况
|
|
48
44
|
if (Array.isArray(dataIndex)) {
|
|
49
45
|
value = dataIndex.map(function (item) {
|
|
@@ -84,7 +80,6 @@ export var renderCell = function renderCell(value, item, index, record) {
|
|
|
84
80
|
});
|
|
85
81
|
}
|
|
86
82
|
}
|
|
87
|
-
|
|
88
83
|
// dataSource可传函数
|
|
89
84
|
if (typeof item.dataSource === 'function') {
|
|
90
85
|
var _item$dataSource;
|
|
@@ -104,9 +99,8 @@ export var renderCell = function renderCell(value, item, index, record) {
|
|
|
104
99
|
}));
|
|
105
100
|
});
|
|
106
101
|
}
|
|
107
|
-
|
|
108
102
|
// 渲染 ProField
|
|
109
|
-
return /*#__PURE__*/React.createElement(ProField,
|
|
103
|
+
return /*#__PURE__*/React.createElement(ProField, _objectSpread({
|
|
110
104
|
type: valueType || 'text',
|
|
111
105
|
value: value,
|
|
112
106
|
render: newRender,
|
|
@@ -114,7 +108,6 @@ export var renderCell = function renderCell(value, item, index, record) {
|
|
|
114
108
|
format: format
|
|
115
109
|
}, props));
|
|
116
110
|
};
|
|
117
|
-
|
|
118
111
|
/**
|
|
119
112
|
* 处理 render 配置项是函数的情况
|
|
120
113
|
* @param render ProFieldRender
|
|
@@ -149,7 +142,6 @@ var processRenderFunction = function processRenderFunction() {
|
|
|
149
142
|
return [k, v];
|
|
150
143
|
}));
|
|
151
144
|
};
|
|
152
|
-
|
|
153
145
|
/**
|
|
154
146
|
* 处理 render 数据,取出 {{xxx}} 匹配值
|
|
155
147
|
* @param render ProFieldRender
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProTableColumnProps } from '../typing';
|
|
2
|
+
import { ColumnProps } from '@alicloudfe/components/types/table';
|
|
3
|
+
/**
|
|
4
|
+
* ProColumn => Column,去掉操作列,过滤器相关逻辑
|
|
5
|
+
* 用于非 ProTable 比如 selectTable
|
|
6
|
+
*/
|
|
7
|
+
export default function genProColumnToColumn(columns: ProTableColumnProps[]): ColumnProps[] | any[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
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; }
|
|
3
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
export function getUrlStateFilter(urlState, actionRef) {
|
|
5
|
+
var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3, _actionRef$current2, _actionRef$current2$s;
|
|
6
|
+
var filters = Object.keys(urlState).filter(function (item) {
|
|
7
|
+
return /^filter.+$/.test(item);
|
|
8
|
+
});
|
|
9
|
+
var urlStateParams = Object.fromEntries(filters.map(function (item) {
|
|
10
|
+
var _item$split, _urlState$item, _urlState$item$join, _urlState$item$split, _urlState$item2, _urlState$item2$split;
|
|
11
|
+
return [(_item$split = item.split('filter')) === null || _item$split === void 0 ? void 0 : _item$split[1], {
|
|
12
|
+
params: Array.isArray(urlState === null || urlState === void 0 ? void 0 : urlState[item]) ? urlState === null || urlState === void 0 ? void 0 : (_urlState$item = urlState[item]) === null || _urlState$item === void 0 ? void 0 : (_urlState$item$join = _urlState$item.join) === null || _urlState$item$join === void 0 ? void 0 : _urlState$item$join.call(_urlState$item, ',') : urlState === null || urlState === void 0 ? void 0 : urlState[item],
|
|
13
|
+
rules: Array.isArray(urlState === null || urlState === void 0 ? void 0 : urlState[item]) ? urlState === null || urlState === void 0 ? void 0 : urlState[item] : (_urlState$item$split = urlState === null || urlState === void 0 ? void 0 : (_urlState$item2 = urlState[item]) === null || _urlState$item2 === void 0 ? void 0 : (_urlState$item2$split = _urlState$item2.split) === null || _urlState$item2$split === void 0 ? void 0 : _urlState$item2$split.call(_urlState$item2, ',')) !== null && _urlState$item$split !== void 0 ? _urlState$item$split : []
|
|
14
|
+
}];
|
|
15
|
+
}));
|
|
16
|
+
var rules = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : (_actionRef$current$ge3 = _actionRef$current$ge2.call(_actionRef$current)) === null || _actionRef$current$ge3 === void 0 ? void 0 : _actionRef$current$ge3.filterRules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
|
|
17
|
+
// 再设置所有的列筛选状态
|
|
18
|
+
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$s = _actionRef$current2.setFilterRules) === null || _actionRef$current2$s === void 0 ? void 0 : _actionRef$current2$s.call(_actionRef$current2, _objectSpread(_objectSpread({}, rules), urlStateParams));
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PageProps } from '../../page-container';
|
|
2
|
+
import { ProPageHeaderProps } from '../../page-header';
|
|
3
|
+
import { ProTableProps } from '../../table';
|
|
4
|
+
export declare type ListPageProps = PageProps<{
|
|
5
|
+
header: ProPageHeaderProps;
|
|
6
|
+
content: ProTableProps;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const ListPage: (props: ListPageProps) => JSX.Element;
|
|
9
|
+
export default ListPage;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
var _excluded = ["loading", "pageProps"];
|
|
2
|
-
function
|
|
2
|
+
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; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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; }
|
|
3
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
6
|
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; }
|
|
5
7
|
import React from 'react';
|
|
@@ -18,17 +20,17 @@ export var ListPage = function ListPage(props) {
|
|
|
18
20
|
var contentProps = (pageProps === null || pageProps === void 0 ? void 0 : pageProps.content) || {
|
|
19
21
|
columns: []
|
|
20
22
|
};
|
|
21
|
-
return /*#__PURE__*/React.createElement(PageContainer,
|
|
23
|
+
return /*#__PURE__*/React.createElement(PageContainer, _objectSpread({
|
|
22
24
|
header: /*#__PURE__*/React.createElement(EditableContainer, {
|
|
23
25
|
id: "header",
|
|
24
26
|
component: "PageHeader"
|
|
25
|
-
}, /*#__PURE__*/React.createElement(PageHeader,
|
|
27
|
+
}, /*#__PURE__*/React.createElement(PageHeader, _objectSpread({
|
|
26
28
|
loading: loading
|
|
27
29
|
}, headerProps))),
|
|
28
30
|
content: /*#__PURE__*/React.createElement(EditableContainer, {
|
|
29
31
|
id: "content",
|
|
30
32
|
component: "ProTable"
|
|
31
|
-
}, /*#__PURE__*/React.createElement(ProTable,
|
|
33
|
+
}, /*#__PURE__*/React.createElement(ProTable, _objectSpread({
|
|
32
34
|
loading: loading
|
|
33
35
|
}, contentProps)))
|
|
34
36
|
}, others));
|
package/es/templates/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
var _excluded = ["_comment", "_shape", "status", "image", "icon", "title", "subTitle", "time", "timeLeft", "content", "animation", "discription", "tags", "collapsible", "defaultCollapsed", "collapsed", "onCollapse", "dotRender"];
|
|
2
|
-
function
|
|
2
|
+
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; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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; }
|
|
3
5
|
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
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
7
|
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."); }
|
|
@@ -40,7 +42,6 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
|
40
42
|
dotRender = props.dotRender,
|
|
41
43
|
others = _objectWithoutProperties(props, _excluded);
|
|
42
44
|
var timeRight = time !== null && time !== void 0 ? time : subTitle; // 兼容 subTitle
|
|
43
|
-
|
|
44
45
|
/** 内容去折叠相关 */
|
|
45
46
|
var _useState = useState(defaultCollapsed !== undefined ? defaultCollapsed : false),
|
|
46
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -56,10 +57,9 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
|
56
57
|
}
|
|
57
58
|
setInnerCollapseState(!collapseState);
|
|
58
59
|
};
|
|
59
|
-
|
|
60
60
|
/** 对枚举参数进行处理 */
|
|
61
61
|
var formatTime = function formatTime(time) {
|
|
62
|
-
if (typeof time === 'string') return dateFormat(time, '', 'YYYY-MM-DD
|
|
62
|
+
if (typeof time === 'string') return dateFormat(time, '', 'YYYY-MM-DD HH:mm:ss');
|
|
63
63
|
return time;
|
|
64
64
|
};
|
|
65
65
|
var formatShape = function formatShape() {
|
|
@@ -70,7 +70,6 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
|
70
70
|
if (['success', 'fail', 'process', 'warning', 'wait'].includes(status)) return status;
|
|
71
71
|
return 'wait';
|
|
72
72
|
};
|
|
73
|
-
|
|
74
73
|
/**一些复用常数 */
|
|
75
74
|
var circle = formatShape() === 'circle';
|
|
76
75
|
var dot = formatShape() === 'dot';
|
|
@@ -79,7 +78,6 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
|
79
78
|
var error = formatStatus() === 'fail';
|
|
80
79
|
var warning = formatStatus() === 'warning';
|
|
81
80
|
var wait = formatStatus() === 'wait';
|
|
82
|
-
|
|
83
81
|
/**对元素进行渲染 */
|
|
84
82
|
var renderImage = function renderImage() {
|
|
85
83
|
if (typeof image === 'string') {
|
|
@@ -151,7 +149,6 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
|
151
149
|
}))
|
|
152
150
|
}, content))));
|
|
153
151
|
}, [_shape, timeLeft, image, title, tags, timeRight, discription, content, collapsible, collapsed, defaultCollapsed, onCollapseChanged]);
|
|
154
|
-
|
|
155
152
|
/**
|
|
156
153
|
* 重新渲染 timeline 节点
|
|
157
154
|
* */
|
|
@@ -180,7 +177,6 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
|
180
177
|
size: "small"
|
|
181
178
|
}));
|
|
182
179
|
};
|
|
183
|
-
|
|
184
180
|
// shape 取 circle
|
|
185
181
|
var renderCircle = function renderCircle() {
|
|
186
182
|
if (dotRender) return /*#__PURE__*/React.createElement("div", {
|
|
@@ -238,7 +234,7 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
|
238
234
|
}))
|
|
239
235
|
}, !_comment && renderStateNode()));
|
|
240
236
|
}, [_shape, icon, status, dotRender]);
|
|
241
|
-
return /*#__PURE__*/React.createElement(TimelineItem,
|
|
237
|
+
return /*#__PURE__*/React.createElement(TimelineItem, _objectSpread({
|
|
242
238
|
title: renderTitle(),
|
|
243
239
|
dot: renderNode(),
|
|
244
240
|
timeLeft: renderTimeLeft(),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProTimeLineProps } from './typing';
|
|
3
|
+
import ProTimeLineItem from './ProTimeLineItem';
|
|
4
|
+
import './index.scss';
|
|
5
|
+
interface ProTimelineProperties {
|
|
6
|
+
/** ProTimeLineItem */
|
|
7
|
+
Item: typeof ProTimeLineItem;
|
|
8
|
+
}
|
|
9
|
+
declare const ProTimeline: React.FC<ProTimeLineProps> & ProTimelineProperties;
|
|
10
|
+
export { ProTimeline, ProTimeLineItem };
|
package/es/timeline/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
var _excluded = ["items", "comment", "shape", "fold", "children"];
|
|
2
|
-
function
|
|
2
|
+
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; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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; }
|
|
3
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
6
|
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; }
|
|
5
7
|
import React, { useMemo } from 'react';
|
|
@@ -16,7 +18,6 @@ var ProTimeline = function ProTimeline(props) {
|
|
|
16
18
|
fold = props.fold,
|
|
17
19
|
children = props.children,
|
|
18
20
|
others = _objectWithoutProperties(props, _excluded);
|
|
19
|
-
|
|
20
21
|
// 判断渲染组件是不是 ProTimelineItem, 并返回筛选后的children
|
|
21
22
|
var renderChildren = useMemo(function () {
|
|
22
23
|
return React.Children.map(children, function (child) {
|
|
@@ -35,7 +36,7 @@ var ProTimeline = function ProTimeline(props) {
|
|
|
35
36
|
// 传递了 item 采用 item 渲染数组的方式
|
|
36
37
|
if (items) {
|
|
37
38
|
return items.map(function (item, index) {
|
|
38
|
-
return /*#__PURE__*/React.createElement(ProTimeLineItem,
|
|
39
|
+
return /*#__PURE__*/React.createElement(ProTimeLineItem, _objectSpread({
|
|
39
40
|
key: index,
|
|
40
41
|
_shape: shape,
|
|
41
42
|
_comment: comment
|
|
@@ -45,10 +46,9 @@ var ProTimeline = function ProTimeline(props) {
|
|
|
45
46
|
return renderChildren;
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
|
-
|
|
49
49
|
// 渲染 ProTimelineItem
|
|
50
50
|
var renderProTimeline = function renderProTimeline() {
|
|
51
|
-
return /*#__PURE__*/React.createElement(Timeline,
|
|
51
|
+
return /*#__PURE__*/React.createElement(Timeline, _objectSpread({
|
|
52
52
|
fold: fold
|
|
53
53
|
}, others), renderItem());
|
|
54
54
|
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ProTagItem } from '../field';
|
|
3
|
+
export declare type ProTimeLineItemStatus = 'success' | 'fail' | 'process' | 'warning' | 'wait';
|
|
4
|
+
export declare type FoldProps = {
|
|
5
|
+
/**
|
|
6
|
+
* 折叠区域
|
|
7
|
+
*/
|
|
8
|
+
foldArea: [number, number];
|
|
9
|
+
/**
|
|
10
|
+
* 是否展示折叠图标
|
|
11
|
+
*/
|
|
12
|
+
foldShow: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare type ProTimeLineProps = {
|
|
15
|
+
/**
|
|
16
|
+
* 时间线:节点展示类型
|
|
17
|
+
*/
|
|
18
|
+
shape?: 'circle' | 'dot';
|
|
19
|
+
/**
|
|
20
|
+
* 内部渲染自组件
|
|
21
|
+
*/
|
|
22
|
+
items?: ProTimeLineItemProps[];
|
|
23
|
+
/**
|
|
24
|
+
* 时间线: 自定义折叠选项
|
|
25
|
+
*/
|
|
26
|
+
fold?: FoldProps[];
|
|
27
|
+
/**
|
|
28
|
+
* 是否为评论型 timeline
|
|
29
|
+
*/
|
|
30
|
+
comment?: boolean;
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
};
|
|
33
|
+
export declare type ProTimeLineItemProps = {
|
|
34
|
+
/**
|
|
35
|
+
* 是否为评论型 timeline
|
|
36
|
+
*/
|
|
37
|
+
_comment?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 时间线:节点展示类型
|
|
40
|
+
*/
|
|
41
|
+
_shape?: 'circle' | 'dot';
|
|
42
|
+
/**
|
|
43
|
+
* 节点状态
|
|
44
|
+
*/
|
|
45
|
+
status?: string | ProTimeLineItemStatus;
|
|
46
|
+
/**
|
|
47
|
+
* 图标
|
|
48
|
+
*/
|
|
49
|
+
icon?: string;
|
|
50
|
+
/**
|
|
51
|
+
* 节点的内容
|
|
52
|
+
*/
|
|
53
|
+
content?: ReactNode;
|
|
54
|
+
/**
|
|
55
|
+
* 节点标题
|
|
56
|
+
*/
|
|
57
|
+
title?: ReactNode;
|
|
58
|
+
/**
|
|
59
|
+
* 自定义渲染
|
|
60
|
+
*/
|
|
61
|
+
dotRender?: (index?: number, status?: string) => ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* 节点副标题
|
|
64
|
+
* @deprecated 弃用,请使用 `time`
|
|
65
|
+
*/
|
|
66
|
+
subTitle?: ReactNode;
|
|
67
|
+
/**
|
|
68
|
+
* 右侧时间
|
|
69
|
+
*/
|
|
70
|
+
time?: ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* 节点对应描述
|
|
73
|
+
*/
|
|
74
|
+
discription?: ReactNode;
|
|
75
|
+
/**
|
|
76
|
+
* 节点的标签
|
|
77
|
+
*/
|
|
78
|
+
tags?: ProTagItem[] | ReactNode;
|
|
79
|
+
/**
|
|
80
|
+
* 左侧展示时间
|
|
81
|
+
*/
|
|
82
|
+
timeLeft?: ReactNode;
|
|
83
|
+
/**
|
|
84
|
+
* 头像
|
|
85
|
+
*/
|
|
86
|
+
image?: string | ReactNode;
|
|
87
|
+
/**
|
|
88
|
+
* animation 动画
|
|
89
|
+
*/
|
|
90
|
+
animation?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* 卡片是否可折叠
|
|
93
|
+
*/
|
|
94
|
+
collapsible?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* 默认是否折叠,用于非受控模式
|
|
97
|
+
*/
|
|
98
|
+
defaultCollapsed?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* 是否折叠,受控模式
|
|
101
|
+
*/
|
|
102
|
+
collapsed?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* 折叠状态改变的回调函数
|
|
105
|
+
*/
|
|
106
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
107
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
9
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
12
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
13
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
15
|
+
import React from 'react';
|
|
16
|
+
export function ProComponentAspect(WrapComponent, componentName) {
|
|
17
|
+
return /*#__PURE__*/function (_React$Component) {
|
|
18
|
+
_inherits(ProComponent, _React$Component);
|
|
19
|
+
var _super = _createSuper(ProComponent);
|
|
20
|
+
function ProComponent() {
|
|
21
|
+
var _this;
|
|
22
|
+
_classCallCheck(this, ProComponent);
|
|
23
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24
|
+
args[_key] = arguments[_key];
|
|
25
|
+
}
|
|
26
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
27
|
+
_this.state = {
|
|
28
|
+
name: 'alien'
|
|
29
|
+
};
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
_createClass(ProComponent, [{
|
|
33
|
+
key: "componentDidMount",
|
|
34
|
+
value: function componentDidMount() {
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
if (!!window.ProComponentBeforeAspectDebugger) {
|
|
37
|
+
console.log('HOC', componentName);
|
|
38
|
+
console.log('Props', this.props);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
key: "render",
|
|
43
|
+
value: function render() {
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
if (window.ProComponentBeforeAspect) {
|
|
46
|
+
var _window$ProComponentB, _window;
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
var props = (_window$ProComponentB = (_window = window).ProComponentBeforeAspect) === null || _window$ProComponentB === void 0 ? void 0 : _window$ProComponentB.call(_window, componentName, this.props);
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
if (!!window.ProComponentBeforeAspectDebugger) {
|
|
51
|
+
console.log('NewProps', props);
|
|
52
|
+
}
|
|
53
|
+
return /*#__PURE__*/React.createElement(WrapComponent, _objectSpread({}, props));
|
|
54
|
+
}
|
|
55
|
+
return /*#__PURE__*/React.createElement(WrapComponent, _objectSpread({}, this.props));
|
|
56
|
+
}
|
|
57
|
+
}]);
|
|
58
|
+
return ProComponent;
|
|
59
|
+
}(React.Component);
|
|
60
|
+
}
|
package/es/utils/message.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
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; }
|
|
3
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import { Message } from '@alicloudfe/components';
|
|
4
6
|
export var renderProMessage = function renderProMessage(message, defaultProps) {
|
|
@@ -6,7 +8,7 @@ export var renderProMessage = function renderProMessage(message, defaultProps) {
|
|
|
6
8
|
return null;
|
|
7
9
|
}
|
|
8
10
|
if (typeof message === 'string') {
|
|
9
|
-
return /*#__PURE__*/React.createElement(Message, defaultProps, message);
|
|
11
|
+
return /*#__PURE__*/React.createElement(Message, _objectSpread({}, defaultProps), message);
|
|
10
12
|
}
|
|
11
|
-
return /*#__PURE__*/React.createElement(Message,
|
|
13
|
+
return /*#__PURE__*/React.createElement(Message, _objectSpread(_objectSpread({}, defaultProps), message));
|
|
12
14
|
};
|