@teamix/pro 1.5.0-beta.1 → 1.6.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/pro.css +1 -1
- package/dist/pro.js +77100 -67703
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +13 -6
- package/es/actions/base.js +8 -21
- package/es/actions/dialog-component.js +3 -13
- package/es/actions/dialog-form.js +41 -79
- package/es/actions/dialog-info.js +1 -5
- package/es/actions/dialog.js +57 -96
- package/es/actions/index.js +94 -161
- package/es/actions/link.js +3 -6
- package/es/actions/request.js +12 -28
- package/es/actions/utils.js +1 -9
- package/es/card/card-container.js +11 -9
- package/es/card/divider.js +2 -9
- package/es/card/index.js +70 -98
- package/es/card/selectable.js +6 -17
- package/es/card/tab.js +3 -14
- package/es/card/utils.js +0 -2
- package/es/form/Components/Editable/index.js +17 -56
- package/es/form/Components/FormGroup/index.js +11 -25
- package/es/form/Components/LightFilter/index.js +22 -33
- package/es/form/Components/ProField/index.js +4 -18
- package/es/form/Components/ProField/mapDateFormat.js +2 -28
- package/es/form/Components/Text/index.js +4 -15
- package/es/form/Filter/AdvancedFilter.js +16 -29
- package/es/form/Filter/Layout.js +11 -24
- package/es/form/Filter/LightFilter.js +17 -24
- package/es/form/Filter/SimpleFilter.js +12 -23
- package/es/form/Filter/index.js +113 -161
- package/es/form/Filter/index2.js +22 -34
- package/es/form/Filter/layout.scss +1 -1
- package/es/form/Filter/useBindUrl.js +18 -43
- package/es/form/Filter/useSpecialProps.js +8 -12
- package/es/form/ProForm/addCascadeEffect.js +203 -0
- package/es/form/ProForm/customComponent.js +0 -5
- package/es/form/ProForm/index.js +33 -38
- package/es/form/ProForm/useAutoLayout.js +21 -38
- package/es/form/ProForm/useAutoSubmit.js +3 -9
- package/es/form/ProForm/useFieldRequest.js +0 -5
- package/es/form/ProForm/useFormDisplayValues.js +12 -27
- package/es/form/ProForm/useInitialRequest.js +0 -5
- package/es/form/SchemaForm/adapterComponent.js +1 -3
- package/es/form/SchemaForm/adapterDecorator.js +1 -8
- package/es/form/SchemaForm/adapterType.js +1 -2
- package/es/form/SchemaForm/index.js +82 -105
- package/es/form/SchemaForm/initializeArrayCards.js +0 -6
- package/es/form/SchemaForm/initializeArrayCollapse.js +0 -6
- package/es/form/SchemaForm/initializeArrayItems.js +2 -9
- package/es/form/SchemaForm/initializeArrayTable.js +21 -34
- package/es/form/SchemaForm/initializeDataSource.js +2 -6
- package/es/form/SchemaForm/initializeFormButton.js +14 -29
- package/es/form/SchemaForm/initializeFormCollapse.js +8 -18
- package/es/form/SchemaForm/initializeFormGroup.js +10 -20
- package/es/form/SchemaForm/initializeFormStep.js +11 -23
- package/es/form/SchemaForm/initializeFormTab.js +10 -20
- package/es/form/SchemaForm/initializeReactions.js +9 -32
- package/es/form/SchemaForm/initializeRequest.js +2 -16
- package/es/form/SchemaForm/initializeRules.js +4 -22
- package/es/form/SchemaForm/initializeSelectTable.js +8 -33
- package/es/form/SchemaForm/reactions.js +19 -29
- package/es/form/index.js +4 -9
- package/es/form/utils.js +15 -48
- package/es/form/warning.js +3 -6
- package/es/index-without-icon.js +4 -3
- package/es/index.js +8 -7
- package/es/info/components/InfoGroup/index.js +23 -36
- package/es/info/components/InfoValueItem/index.js +85 -126
- package/es/info/components/ProInfoItem/index.js +13 -20
- package/es/info/components/baseInfo/index.js +14 -23
- package/es/info/components/headerInfo/index.js +8 -20
- package/es/info/components/tableInfo/index.js +22 -50
- package/es/info/index.js +59 -82
- package/es/info/utils/index.js +3 -11
- package/es/layout/index.js +2 -0
- package/es/nocode/configurators/common.js +5 -6
- package/es/nocode/configurators/index.js +1 -3
- package/es/nocode/index.js +7 -5
- package/es/nocode/pages/editor.js +5 -9
- package/es/nocode/pages/index.js +6 -3
- package/es/nocode/pages/playground.js +21 -40
- package/es/nocode/pages/renderer.js +13 -48
- package/es/nocode/playground.js +12 -27
- package/es/page-header/index.js +54 -80
- package/es/sidebar/components/sidebar-container/index.js +59 -71
- package/es/sidebar/components/sidebar-container/index.scss +21 -14
- package/es/sidebar/components/tree/index.js +107 -127
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +13 -29
- package/es/sidebar/components/tree-node/components/IconAction/index.js +12 -36
- package/es/sidebar/components/tree-node/components/IconSwitch/index.js +12 -24
- package/es/sidebar/components/tree-node/index.js +55 -84
- package/es/sidebar/index.js +73 -87
- package/es/sidebar/utils/action-ref.js +2 -7
- package/es/sidebar/utils/index.js +59 -108
- package/es/table/components/Filter/index.js +41 -72
- package/es/table/components/Layout/index.js +34 -49
- package/es/table/components/Pagination/index.js +35 -66
- package/es/table/components/QuickAction/index.js +6 -13
- package/es/table/components/ToolBar/DensityIcon.js +24 -31
- package/es/table/components/ToolBar/FilterColumnIcon.js +47 -91
- package/es/table/components/ToolBar/FullScreenIcon.js +7 -61
- package/es/table/components/ToolBar/Fullscreen.js +15 -25
- package/es/table/components/ToolBar/RefreshIcon.js +4 -5
- package/es/table/components/ToolBar/index.js +88 -25
- package/es/table/components/ToolBar/index.scss +22 -2
- package/es/table/index.js +242 -356
- package/es/table/utils/columnRender.js +52 -87
- package/es/table/utils/genProColumnToColumn.js +3 -13
- package/es/table/utils/index.js +18 -45
- package/es/table/utils/pureColumnRender.js +26 -50
- package/es/table/utils/pureGenProColumnToColumn.js +2 -10
- package/es/table/utils/useTableSelection.js +6 -33
- package/es/templates/List/index.js +6 -15
- package/es/templates/index.js +2 -1
- package/es/timeline/ProTimeLineItem/index.js +30 -66
- package/es/timeline/index.js +11 -25
- package/es/utils/message.js +3 -10
- package/lib/actions/base.js +8 -24
- package/lib/actions/confirm.js +0 -5
- package/lib/actions/danger-confirm.js +0 -5
- package/lib/actions/danger-pop-confirm.js +0 -4
- package/lib/actions/dialog-component.js +3 -19
- package/lib/actions/dialog-form.js +41 -92
- package/lib/actions/dialog-info.js +1 -10
- package/lib/actions/dialog-table.js +0 -5
- package/lib/actions/dialog.js +56 -112
- package/lib/actions/drawer-form.js +0 -3
- package/lib/actions/drawer-info.js +0 -3
- package/lib/actions/drawer-table.js +0 -3
- package/lib/actions/drawer.js +0 -4
- package/lib/actions/error.js +0 -5
- package/lib/actions/index.js +93 -191
- package/lib/actions/link.js +3 -11
- package/lib/actions/notice.js +0 -5
- package/lib/actions/pop-confirm.js +0 -5
- package/lib/actions/request.js +10 -33
- package/lib/actions/utils.js +1 -9
- package/lib/card/card-container.js +6 -13
- package/lib/card/divider.js +2 -11
- package/lib/card/index.js +68 -124
- package/lib/card/selectable.js +6 -24
- package/lib/card/tab.js +3 -18
- package/lib/card/utils.js +0 -6
- package/lib/field/index.js +0 -6
- package/lib/form/Components/Editable/index.js +16 -66
- package/lib/form/Components/FormGroup/index.js +11 -31
- package/lib/form/Components/LightFilter/index.js +22 -45
- package/lib/form/Components/ProField/index.js +4 -25
- package/lib/form/Components/ProField/mapDateFormat.js +2 -32
- package/lib/form/Components/Text/index.js +4 -20
- package/lib/form/Filter/AdvancedFilter.js +16 -37
- package/lib/form/Filter/Layout.js +11 -33
- package/lib/form/Filter/LightFilter.js +17 -32
- package/lib/form/Filter/SimpleFilter.js +10 -29
- package/lib/form/Filter/index.js +112 -181
- package/lib/form/Filter/index2.js +22 -44
- package/lib/form/Filter/layout.scss +1 -1
- package/lib/form/Filter/useBindUrl.js +18 -47
- package/lib/form/Filter/useSpecialProps.js +6 -13
- package/lib/form/ProForm/addCascadeEffect.js +210 -0
- package/lib/form/ProForm/customComponent.js +0 -8
- package/lib/form/ProForm/index.js +33 -60
- package/lib/form/ProForm/useAutoLayout.js +21 -41
- package/lib/form/ProForm/useAutoSubmit.js +3 -11
- package/lib/form/ProForm/useFieldRequest.js +0 -8
- package/lib/form/ProForm/useFormDisplayValues.js +12 -33
- package/lib/form/ProForm/useInitialRequest.js +0 -6
- package/lib/form/SchemaForm/adapterComponent.js +1 -6
- package/lib/form/SchemaForm/adapterDecorator.js +0 -12
- package/lib/form/SchemaForm/adapterType.js +1 -5
- package/lib/form/SchemaForm/index.js +82 -135
- package/lib/form/SchemaForm/initializeArrayCards.js +0 -7
- package/lib/form/SchemaForm/initializeArrayCollapse.js +0 -7
- package/lib/form/SchemaForm/initializeArrayItems.js +2 -10
- package/lib/form/SchemaForm/initializeArrayTable.js +21 -34
- package/lib/form/SchemaForm/initializeDataSource.js +2 -8
- package/lib/form/SchemaForm/initializeFormButton.js +14 -30
- package/lib/form/SchemaForm/initializeFormCollapse.js +8 -18
- package/lib/form/SchemaForm/initializeFormGroup.js +10 -20
- package/lib/form/SchemaForm/initializeFormStep.js +11 -23
- package/lib/form/SchemaForm/initializeFormTab.js +10 -20
- package/lib/form/SchemaForm/initializeReactions.js +9 -36
- package/lib/form/SchemaForm/initializeRequest.js +2 -18
- package/lib/form/SchemaForm/initializeRules.js +4 -24
- package/lib/form/SchemaForm/initializeSelectTable.js +7 -36
- package/lib/form/SchemaForm/reactions.js +17 -32
- package/lib/form/docs/ActionResponse.js +0 -5
- package/lib/form/index.js +0 -25
- package/lib/form/typing.js +1 -5
- package/lib/form/utils.js +14 -60
- package/lib/form/warning.js +3 -7
- package/lib/hooks/index.js +0 -5
- package/lib/index-without-icon.js +2 -36
- package/lib/index.js +2 -39
- package/lib/info/components/InfoGroup/index.js +23 -46
- package/lib/info/components/InfoValueItem/index.js +85 -141
- package/lib/info/components/ProInfoItem/index.js +14 -29
- package/lib/info/components/baseInfo/index.js +15 -36
- package/lib/info/components/headerInfo/index.js +8 -31
- package/lib/info/components/tableInfo/index.js +22 -62
- package/lib/info/index.js +59 -97
- package/lib/info/typing.js +1 -5
- package/lib/info/utils/index.js +3 -19
- package/lib/info/utils/utils.js +0 -1
- package/lib/nocode/configurators/PageHeader.js +0 -2
- package/lib/nocode/configurators/ProTable.js +0 -2
- package/lib/nocode/configurators/common.js +5 -10
- package/lib/nocode/configurators/index.js +1 -10
- package/lib/nocode/configurators/map.js +0 -5
- package/lib/nocode/index.js +0 -11
- package/lib/nocode/pages/editor.js +5 -19
- package/lib/nocode/pages/index.js +2 -9
- package/lib/nocode/pages/playground.js +21 -57
- package/lib/nocode/pages/renderer.js +13 -59
- package/lib/nocode/playground.js +12 -39
- package/lib/page-container/index.js +0 -6
- package/lib/page-header/index.js +53 -93
- package/lib/sidebar/components/sidebar-container/index.js +59 -83
- package/lib/sidebar/components/sidebar-container/index.scss +21 -14
- package/lib/sidebar/components/tree/index.js +107 -141
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +13 -37
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +12 -47
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +12 -34
- package/lib/sidebar/components/tree-node/index.js +55 -100
- package/lib/sidebar/index.js +73 -103
- package/lib/sidebar/typing.js +1 -5
- package/lib/sidebar/utils/action-ref.js +2 -8
- package/lib/sidebar/utils/index.js +59 -116
- package/lib/skeleton/index.js +0 -6
- package/lib/table/components/EmptyContent/index.js +0 -6
- package/lib/table/components/Filter/index.js +41 -82
- package/lib/table/components/Layout/index.js +35 -63
- package/lib/table/components/Pagination/index.js +35 -76
- package/lib/table/components/QuickAction/index.js +6 -17
- package/lib/table/components/ToolBar/DensityIcon.js +24 -42
- package/lib/table/components/ToolBar/FilterColumnIcon.js +47 -103
- package/lib/table/components/ToolBar/FullScreenIcon.js +10 -73
- package/lib/table/components/ToolBar/Fullscreen.js +15 -32
- package/lib/table/components/ToolBar/RefreshIcon.js +5 -12
- package/lib/table/components/ToolBar/index.js +91 -34
- package/lib/table/components/ToolBar/index.scss +22 -2
- package/lib/table/index.js +243 -380
- package/lib/table/typing.js +1 -5
- package/lib/table/utils/columnRender.js +51 -100
- package/lib/table/utils/genProColumnToColumn.js +3 -18
- package/lib/table/utils/getTableProps.js +0 -2
- package/lib/table/utils/getTableSortIcons.js +0 -5
- package/lib/table/utils/index.js +16 -53
- package/lib/table/utils/pureColumnRender.js +26 -61
- package/lib/table/utils/pureGenProColumnToColumn.js +2 -11
- package/lib/table/utils/useTableSelection.js +6 -35
- package/lib/templates/Detail/index.js +0 -5
- package/lib/templates/Form/index.js +0 -5
- package/lib/templates/List/index.js +6 -25
- package/lib/templates/index.js +0 -6
- package/lib/timeline/ProTimeLineItem/index.js +30 -77
- package/lib/timeline/index.js +11 -36
- package/lib/timeline/typing.js +1 -5
- package/lib/utils/index.js +0 -6
- package/lib/utils/message.js +3 -15
- package/package.json +5 -6
- package/es/actions/base.d.ts +0 -24
- package/es/actions/confirm.d.ts +0 -7
- package/es/actions/danger-confirm.d.ts +0 -7
- package/es/actions/danger-pop-confirm.d.ts +0 -5
- package/es/actions/dialog-component.d.ts +0 -10
- package/es/actions/dialog-form.d.ts +0 -29
- package/es/actions/dialog-info.d.ts +0 -9
- package/es/actions/dialog-table.d.ts +0 -9
- package/es/actions/dialog.d.ts +0 -40
- package/es/actions/drawer-form.d.ts +0 -6
- package/es/actions/drawer-info.d.ts +0 -6
- package/es/actions/drawer-table.d.ts +0 -6
- package/es/actions/drawer.d.ts +0 -6
- package/es/actions/error.d.ts +0 -7
- package/es/actions/index.d.ts +0 -107
- package/es/actions/link.d.ts +0 -8
- package/es/actions/notice.d.ts +0 -7
- package/es/actions/pop-confirm.d.ts +0 -9
- package/es/actions/request.d.ts +0 -9
- package/es/actions/utils.d.ts +0 -1
- package/es/card/card-container.d.ts +0 -18
- package/es/card/divider.d.ts +0 -6
- package/es/card/index.d.ts +0 -109
- package/es/card/selectable.d.ts +0 -13
- package/es/card/tab.d.ts +0 -6
- package/es/card/utils.d.ts +0 -9
- package/es/field/index.d.ts +0 -3
- package/es/form/Components/Editable/index.d.ts +0 -20
- package/es/form/Components/FormGroup/index.d.ts +0 -13
- package/es/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/es/form/Components/LightFilter/index.d.ts +0 -17
- package/es/form/Components/ProField/index.d.ts +0 -2
- package/es/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/es/form/Components/Text/index.d.ts +0 -7
- package/es/form/Filter/AdvancedFilter.d.ts +0 -7
- package/es/form/Filter/Layout.d.ts +0 -5
- package/es/form/Filter/LightFilter.d.ts +0 -7
- package/es/form/Filter/SimpleFilter.d.ts +0 -7
- package/es/form/Filter/index.d.ts +0 -9
- package/es/form/Filter/index2.d.ts +0 -13
- package/es/form/Filter/useBindUrl.d.ts +0 -2
- package/es/form/Filter/useSpecialProps.d.ts +0 -6
- package/es/form/ProForm/customComponent.d.ts +0 -3
- package/es/form/ProForm/index.d.ts +0 -5
- package/es/form/ProForm/useAutoLayout.d.ts +0 -9
- package/es/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/es/form/ProForm/useFieldRequest.d.ts +0 -5
- package/es/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/es/form/ProForm/useInitialRequest.d.ts +0 -6
- package/es/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/es/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/es/form/SchemaForm/adapterType.d.ts +0 -5
- package/es/form/SchemaForm/index.d.ts +0 -4
- package/es/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/es/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/es/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/es/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/es/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/es/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/es/form/SchemaForm/initializeRules.d.ts +0 -11
- package/es/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/es/form/SchemaForm/reactions.d.ts +0 -6
- package/es/form/docs/ActionResponse.d.ts +0 -7
- package/es/form/fieldTypeMap.d.ts +0 -7
- package/es/form/index.d.ts +0 -125
- package/es/form/locales/validate.d.ts +0 -159
- package/es/form/schemaNameMap.d.ts +0 -5
- package/es/form/typing.d.ts +0 -172
- package/es/form/utils.d.ts +0 -55
- package/es/form/warning.d.ts +0 -3
- package/es/hooks/index.d.ts +0 -2
- package/es/index-without-icon.d.ts +0 -32
- package/es/index.d.ts +0 -32
- package/es/info/components/InfoGroup/index.d.ts +0 -5
- package/es/info/components/InfoValueItem/index.d.ts +0 -5
- package/es/info/components/ProInfoItem/index.d.ts +0 -5
- package/es/info/components/baseInfo/index.d.ts +0 -8
- package/es/info/components/headerInfo/index.d.ts +0 -8
- package/es/info/components/tableInfo/index.d.ts +0 -7
- package/es/info/index.d.ts +0 -10
- package/es/info/typing.d.ts +0 -218
- package/es/info/utils/index.d.ts +0 -20
- package/es/info/utils/layout.d.ts +0 -2
- package/es/info/utils/utils.d.ts +0 -1
- package/es/layout/index.d.ts +0 -2
- package/es/nocode/configurators/Card.d.ts +0 -3
- package/es/nocode/configurators/PageHeader.d.ts +0 -3
- package/es/nocode/configurators/ProTable.d.ts +0 -3
- package/es/nocode/configurators/common.d.ts +0 -280
- package/es/nocode/configurators/index.d.ts +0 -15
- package/es/nocode/configurators/map.d.ts +0 -2
- package/es/nocode/index.d.ts +0 -8
- package/es/nocode/pages/editor.d.ts +0 -12
- package/es/nocode/pages/index.d.ts +0 -14
- package/es/nocode/pages/playground.d.ts +0 -11
- package/es/nocode/pages/renderer.d.ts +0 -10
- package/es/nocode/playground.d.ts +0 -14
- package/es/page-container/index.d.ts +0 -3
- package/es/page-header/index.d.ts +0 -74
- package/es/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/es/sidebar/components/tree/index.d.ts +0 -6
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/es/sidebar/components/tree-node/index.d.ts +0 -7
- package/es/sidebar/index.d.ts +0 -7
- package/es/sidebar/typing.d.ts +0 -137
- package/es/sidebar/utils/action-ref.d.ts +0 -3
- package/es/sidebar/utils/index.d.ts +0 -361
- package/es/skeleton/index.d.ts +0 -3
- package/es/table/components/EmptyContent/index.d.ts +0 -2
- package/es/table/components/Filter/index.d.ts +0 -9
- package/es/table/components/Layout/index.d.ts +0 -5
- package/es/table/components/Pagination/index.d.ts +0 -7
- package/es/table/components/QuickAction/index.d.ts +0 -10
- package/es/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/es/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/es/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/es/table/components/ToolBar/index.d.ts +0 -5
- package/es/table/index.d.ts +0 -5
- package/es/table/typing.d.ts +0 -299
- package/es/table/utils/columnRender.d.ts +0 -13
- package/es/table/utils/genProColumnToColumn.d.ts +0 -13
- package/es/table/utils/getTableProps.d.ts +0 -2
- package/es/table/utils/getTableSortIcons.d.ts +0 -3
- package/es/table/utils/index.d.ts +0 -19
- package/es/table/utils/pureColumnRender.d.ts +0 -9
- package/es/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/es/table/utils/useTableSelection.d.ts +0 -3
- package/es/templates/Detail/index.d.ts +0 -2
- package/es/templates/Form/index.d.ts +0 -2
- package/es/templates/List/index.d.ts +0 -9
- package/es/templates/index.d.ts +0 -3
- package/es/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/es/timeline/index.d.ts +0 -10
- package/es/timeline/typing.d.ts +0 -106
- package/es/utils/index.d.ts +0 -3
- package/es/utils/message.d.ts +0 -3
- package/lib/actions/base.d.ts +0 -24
- package/lib/actions/confirm.d.ts +0 -7
- package/lib/actions/danger-confirm.d.ts +0 -7
- package/lib/actions/danger-pop-confirm.d.ts +0 -5
- package/lib/actions/dialog-component.d.ts +0 -10
- package/lib/actions/dialog-form.d.ts +0 -29
- package/lib/actions/dialog-info.d.ts +0 -9
- package/lib/actions/dialog-table.d.ts +0 -9
- package/lib/actions/dialog.d.ts +0 -40
- package/lib/actions/drawer-form.d.ts +0 -6
- package/lib/actions/drawer-info.d.ts +0 -6
- package/lib/actions/drawer-table.d.ts +0 -6
- package/lib/actions/drawer.d.ts +0 -6
- package/lib/actions/error.d.ts +0 -7
- package/lib/actions/index.d.ts +0 -107
- package/lib/actions/link.d.ts +0 -8
- package/lib/actions/notice.d.ts +0 -7
- package/lib/actions/pop-confirm.d.ts +0 -9
- package/lib/actions/request.d.ts +0 -9
- package/lib/actions/utils.d.ts +0 -1
- package/lib/card/card-container.d.ts +0 -18
- package/lib/card/divider.d.ts +0 -6
- package/lib/card/index.d.ts +0 -109
- package/lib/card/selectable.d.ts +0 -13
- package/lib/card/tab.d.ts +0 -6
- package/lib/card/utils.d.ts +0 -9
- package/lib/field/index.d.ts +0 -3
- package/lib/form/Components/Editable/index.d.ts +0 -20
- package/lib/form/Components/FormGroup/index.d.ts +0 -13
- package/lib/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/lib/form/Components/LightFilter/index.d.ts +0 -17
- package/lib/form/Components/ProField/index.d.ts +0 -2
- package/lib/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/lib/form/Components/Text/index.d.ts +0 -7
- package/lib/form/Filter/AdvancedFilter.d.ts +0 -7
- package/lib/form/Filter/Layout.d.ts +0 -5
- package/lib/form/Filter/LightFilter.d.ts +0 -7
- package/lib/form/Filter/SimpleFilter.d.ts +0 -7
- package/lib/form/Filter/index.d.ts +0 -9
- package/lib/form/Filter/index2.d.ts +0 -13
- package/lib/form/Filter/useBindUrl.d.ts +0 -2
- package/lib/form/Filter/useSpecialProps.d.ts +0 -6
- package/lib/form/ProForm/customComponent.d.ts +0 -3
- package/lib/form/ProForm/index.d.ts +0 -5
- package/lib/form/ProForm/useAutoLayout.d.ts +0 -9
- package/lib/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/lib/form/ProForm/useFieldRequest.d.ts +0 -5
- package/lib/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/lib/form/ProForm/useInitialRequest.d.ts +0 -6
- package/lib/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/lib/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/lib/form/SchemaForm/adapterType.d.ts +0 -5
- package/lib/form/SchemaForm/index.d.ts +0 -4
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/lib/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/lib/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/lib/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/lib/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/lib/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/lib/form/SchemaForm/initializeRules.d.ts +0 -11
- package/lib/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/lib/form/SchemaForm/reactions.d.ts +0 -6
- package/lib/form/docs/ActionResponse.d.ts +0 -7
- package/lib/form/fieldTypeMap.d.ts +0 -7
- package/lib/form/index.d.ts +0 -125
- package/lib/form/locales/validate.d.ts +0 -159
- package/lib/form/schemaNameMap.d.ts +0 -5
- package/lib/form/typing.d.ts +0 -172
- package/lib/form/utils.d.ts +0 -55
- package/lib/form/warning.d.ts +0 -3
- package/lib/hooks/index.d.ts +0 -2
- package/lib/index-without-icon.d.ts +0 -32
- package/lib/index.d.ts +0 -32
- package/lib/info/components/InfoGroup/index.d.ts +0 -5
- package/lib/info/components/InfoValueItem/index.d.ts +0 -5
- package/lib/info/components/ProInfoItem/index.d.ts +0 -5
- package/lib/info/components/baseInfo/index.d.ts +0 -8
- package/lib/info/components/headerInfo/index.d.ts +0 -8
- package/lib/info/components/tableInfo/index.d.ts +0 -7
- package/lib/info/index.d.ts +0 -10
- package/lib/info/typing.d.ts +0 -218
- package/lib/info/utils/index.d.ts +0 -20
- package/lib/info/utils/layout.d.ts +0 -2
- package/lib/info/utils/utils.d.ts +0 -1
- package/lib/layout/index.d.ts +0 -2
- package/lib/nocode/configurators/Card.d.ts +0 -3
- package/lib/nocode/configurators/PageHeader.d.ts +0 -3
- package/lib/nocode/configurators/ProTable.d.ts +0 -3
- package/lib/nocode/configurators/common.d.ts +0 -280
- package/lib/nocode/configurators/index.d.ts +0 -15
- package/lib/nocode/configurators/map.d.ts +0 -2
- package/lib/nocode/index.d.ts +0 -8
- package/lib/nocode/pages/editor.d.ts +0 -12
- package/lib/nocode/pages/index.d.ts +0 -14
- package/lib/nocode/pages/playground.d.ts +0 -11
- package/lib/nocode/pages/renderer.d.ts +0 -10
- package/lib/nocode/playground.d.ts +0 -14
- package/lib/page-container/index.d.ts +0 -3
- package/lib/page-header/index.d.ts +0 -74
- package/lib/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/lib/sidebar/components/tree/index.d.ts +0 -6
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/lib/sidebar/components/tree-node/index.d.ts +0 -7
- package/lib/sidebar/index.d.ts +0 -7
- package/lib/sidebar/typing.d.ts +0 -137
- package/lib/sidebar/utils/action-ref.d.ts +0 -3
- package/lib/sidebar/utils/index.d.ts +0 -361
- package/lib/skeleton/index.d.ts +0 -3
- package/lib/table/components/EmptyContent/index.d.ts +0 -2
- package/lib/table/components/Filter/index.d.ts +0 -9
- package/lib/table/components/Layout/index.d.ts +0 -5
- package/lib/table/components/Pagination/index.d.ts +0 -7
- package/lib/table/components/QuickAction/index.d.ts +0 -10
- package/lib/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/index.d.ts +0 -5
- package/lib/table/index.d.ts +0 -5
- package/lib/table/typing.d.ts +0 -299
- package/lib/table/utils/columnRender.d.ts +0 -13
- package/lib/table/utils/genProColumnToColumn.d.ts +0 -13
- package/lib/table/utils/getTableProps.d.ts +0 -2
- package/lib/table/utils/getTableSortIcons.d.ts +0 -3
- package/lib/table/utils/index.d.ts +0 -19
- package/lib/table/utils/pureColumnRender.d.ts +0 -9
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/lib/table/utils/useTableSelection.d.ts +0 -3
- package/lib/templates/Detail/index.d.ts +0 -2
- package/lib/templates/Form/index.d.ts +0 -2
- package/lib/templates/List/index.d.ts +0 -9
- package/lib/templates/index.d.ts +0 -3
- package/lib/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/lib/timeline/index.d.ts +0 -10
- package/lib/timeline/typing.d.ts +0 -106
- package/lib/utils/index.d.ts +0 -3
- package/lib/utils/message.d.ts +0 -3
@@ -1,29 +1,17 @@
|
|
1
1
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
2
|
-
|
3
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."); }
|
4
|
-
|
5
3
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
6
|
-
|
7
4
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
8
|
-
|
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); }
|
9
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
10
|
-
|
11
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."); }
|
12
|
-
|
13
8
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
14
|
-
|
15
9
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
16
|
-
|
17
10
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
18
|
-
|
19
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
20
|
-
|
21
12
|
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
|
-
|
23
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
24
|
-
|
25
14
|
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
|
-
|
27
15
|
/**
|
28
16
|
* 渲染列的逻辑函数,用于非 ProTable 比如 selectTable
|
29
17
|
*/
|
@@ -33,7 +21,6 @@ import ProField, { LabelIconTip } from '../../field';
|
|
33
21
|
/**
|
34
22
|
* 增加了 icon 的功能 render title
|
35
23
|
*/
|
36
|
-
|
37
24
|
export var renderColumnsTitle = function renderColumnsTitle(item) {
|
38
25
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelIconTip, {
|
39
26
|
label: item.title,
|
@@ -41,22 +28,23 @@ export var renderColumnsTitle = function renderColumnsTitle(item) {
|
|
41
28
|
icon: item.tooltipIcon
|
42
29
|
}));
|
43
30
|
};
|
31
|
+
|
44
32
|
/**
|
45
33
|
* 负责单元格的具体渲染
|
46
34
|
*/
|
47
|
-
|
48
35
|
export var renderCell = function renderCell(value, item, index, record) {
|
49
36
|
var _item$valueType = item.valueType,
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
37
|
+
valueType = _item$valueType === void 0 ? 'text' : _item$valueType,
|
38
|
+
render = item.render,
|
39
|
+
dataIndex = item.dataIndex,
|
40
|
+
format = item.format;
|
54
41
|
|
42
|
+
// 如果没传 dataIndex,返回 null
|
55
43
|
if (!dataIndex) {
|
56
44
|
value = null;
|
57
|
-
}
|
58
|
-
|
45
|
+
}
|
59
46
|
|
47
|
+
// 处理 dataIndex 为数组的情况
|
60
48
|
if (Array.isArray(dataIndex)) {
|
61
49
|
value = dataIndex.map(function (item) {
|
62
50
|
return getTargetValue("{{".concat(item, "}}"), _objectSpread(_objectSpread({}, record), {}, {
|
@@ -64,18 +52,16 @@ export var renderCell = function renderCell(value, item, index, record) {
|
|
64
52
|
}));
|
65
53
|
});
|
66
54
|
}
|
67
|
-
|
68
55
|
var newRender = null;
|
69
56
|
var newDataSource = null;
|
70
|
-
var props = item.props;
|
71
|
-
|
57
|
+
var props = item.props;
|
58
|
+
// 如果 render 直接传函数
|
72
59
|
if (typeof render === 'function') {
|
73
60
|
newRender = function newRender() {
|
74
61
|
return render === null || render === void 0 ? void 0 : render(value, index, record);
|
75
62
|
};
|
76
63
|
} else {
|
77
64
|
newRender = processBuriedPoint(processRenderFunction(render, value, index, record), record, value, index);
|
78
|
-
|
79
65
|
if (valueType === 'selectGroup') {
|
80
66
|
newRender = _objectSpread(_objectSpread({
|
81
67
|
maxShowNumber: 'auto',
|
@@ -92,28 +78,24 @@ export var renderCell = function renderCell(value, item, index, record) {
|
|
92
78
|
}
|
93
79
|
}, props);
|
94
80
|
}
|
95
|
-
|
96
81
|
if ((render === null || render === void 0 ? void 0 : render.type) === 'step') {
|
97
82
|
newRender = _objectSpread(_objectSpread({}, newRender), {}, {
|
98
83
|
ellipsis: false
|
99
84
|
});
|
100
85
|
}
|
101
|
-
}
|
102
|
-
|
86
|
+
}
|
103
87
|
|
88
|
+
// dataSource可传函数
|
104
89
|
if (typeof item.dataSource === 'function') {
|
105
90
|
var _item$dataSource;
|
106
|
-
|
107
91
|
newDataSource = (_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.call(item, value, index, record);
|
108
92
|
} else {
|
109
93
|
var _item$dataSource2;
|
110
|
-
|
111
94
|
newDataSource = ((_item$dataSource2 = item.dataSource) !== null && _item$dataSource2 !== void 0 ? _item$dataSource2 : []).map(function (item) {
|
112
95
|
return Object.fromEntries(Object.entries(item).map(function (_ref) {
|
113
96
|
var _ref2 = _slicedToArray(_ref, 2),
|
114
|
-
|
115
|
-
|
116
|
-
|
97
|
+
k = _ref2[0],
|
98
|
+
v = _ref2[1];
|
117
99
|
return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
|
118
100
|
record: record,
|
119
101
|
value: value,
|
@@ -121,10 +103,10 @@ export var renderCell = function renderCell(value, item, index, record) {
|
|
121
103
|
}))];
|
122
104
|
}));
|
123
105
|
});
|
124
|
-
}
|
125
|
-
|
106
|
+
}
|
126
107
|
|
127
|
-
|
108
|
+
// 渲染 ProField
|
109
|
+
return /*#__PURE__*/React.createElement(ProField, _extends({
|
128
110
|
type: valueType || 'text',
|
129
111
|
value: value,
|
130
112
|
render: newRender,
|
@@ -132,6 +114,7 @@ export var renderCell = function renderCell(value, item, index, record) {
|
|
132
114
|
format: format
|
133
115
|
}, props));
|
134
116
|
};
|
117
|
+
|
135
118
|
/**
|
136
119
|
* 处理 render 配置项是函数的情况
|
137
120
|
* @param render ProFieldRender
|
@@ -140,7 +123,6 @@ export var renderCell = function renderCell(value, item, index, record) {
|
|
140
123
|
* @param record table cell record
|
141
124
|
* @returns
|
142
125
|
*/
|
143
|
-
|
144
126
|
var processRenderFunction = function processRenderFunction() {
|
145
127
|
var render = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
146
128
|
var value = arguments.length > 1 ? arguments[1] : undefined;
|
@@ -150,48 +132,42 @@ var processRenderFunction = function processRenderFunction() {
|
|
150
132
|
var external = ['linkOnClick', 'link', 'value', 'renderEdit', 'descriptionRenderEdit', 'editPopConfirmProps', 'descriptionEditPopConfirmProps', 'editOnClick', 'descriptionEditOnClick', 'extra', 'prefixExtra'];
|
151
133
|
return Object.fromEntries(Object.entries(render).map(function (_ref3) {
|
152
134
|
var _ref4 = _slicedToArray(_ref3, 2),
|
153
|
-
|
154
|
-
|
155
|
-
|
135
|
+
k = _ref4[0],
|
136
|
+
v = _ref4[1];
|
156
137
|
if (typeof v === 'function') {
|
157
138
|
var _v;
|
158
|
-
|
159
139
|
if (external.includes(k)) {
|
160
140
|
return [k, function () {
|
161
141
|
for (var _len = arguments.length, others = new Array(_len), _key = 0; _key < _len; _key++) {
|
162
142
|
others[_key] = arguments[_key];
|
163
143
|
}
|
164
|
-
|
165
144
|
return v === null || v === void 0 ? void 0 : v.apply(void 0, [value, index, record].concat(others));
|
166
145
|
}];
|
167
146
|
}
|
168
|
-
|
169
147
|
return [k, (_v = v === null || v === void 0 ? void 0 : v(value, index, record)) !== null && _v !== void 0 ? _v : ''];
|
170
148
|
}
|
171
|
-
|
172
149
|
return [k, v];
|
173
150
|
}));
|
174
151
|
};
|
152
|
+
|
175
153
|
/**
|
176
154
|
* 处理 render 数据,取出 {{xxx}} 匹配值
|
177
155
|
* @param render ProFieldRender
|
178
156
|
* @param record table cell record
|
179
157
|
* @returns
|
180
158
|
*/
|
181
|
-
|
182
|
-
|
183
159
|
var processBuriedPoint = function processBuriedPoint() {
|
184
160
|
var render = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
185
161
|
var record = arguments.length > 1 ? arguments[1] : undefined;
|
186
162
|
var value = arguments.length > 2 ? arguments[2] : undefined;
|
187
163
|
var index = arguments.length > 3 ? arguments[3] : undefined;
|
188
|
-
return Object.fromEntries([
|
164
|
+
return Object.fromEntries([
|
165
|
+
// 默认 ellipsis、descriptionEllipsis 为 true
|
189
166
|
// emptyText 默认为 '-'
|
190
167
|
['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (_ref5) {
|
191
168
|
var _ref6 = _slicedToArray(_ref5, 2),
|
192
|
-
|
193
|
-
|
194
|
-
|
169
|
+
k = _ref6[0],
|
170
|
+
v = _ref6[1];
|
195
171
|
return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
|
196
172
|
record: record,
|
197
173
|
value: value,
|
@@ -1,27 +1,19 @@
|
|
1
1
|
var _excluded = ["filters", "dataIndex"];
|
2
|
-
|
3
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; }
|
4
|
-
|
5
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; }
|
6
|
-
|
7
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; }
|
8
|
-
|
9
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; }
|
10
|
-
|
11
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; }
|
12
|
-
|
13
7
|
import { renderColumnsTitle, renderCell } from './pureColumnRender';
|
14
8
|
/**
|
15
9
|
* ProColumn => Column,去掉操作列,过滤器相关逻辑
|
16
10
|
* 用于非 ProTable 比如 selectTable
|
17
11
|
*/
|
18
|
-
|
19
12
|
export default function genProColumnToColumn(columns) {
|
20
13
|
return columns.map(function (columnProps) {
|
21
14
|
var filters = columnProps.filters,
|
22
|
-
|
23
|
-
|
24
|
-
|
15
|
+
dataIndex = columnProps.dataIndex,
|
16
|
+
others = _objectWithoutProperties(columnProps, _excluded);
|
25
17
|
return _objectSpread(_objectSpread({
|
26
18
|
// 金钱样式默认右对齐
|
27
19
|
align: columnProps.valueType === 'money' ? 'right' : 'left'
|
@@ -1,50 +1,33 @@
|
|
1
1
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
2
|
-
|
3
2
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
4
|
-
|
5
3
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
-
|
7
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
8
|
-
|
9
5
|
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."); }
|
10
|
-
|
11
6
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
12
|
-
|
13
7
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
14
|
-
|
15
8
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
16
|
-
|
17
9
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
18
|
-
|
19
10
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
20
|
-
|
21
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
22
|
-
|
23
12
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
24
|
-
|
25
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
26
|
-
|
27
14
|
/**
|
28
15
|
* 处理表格 rowSelection hooks
|
29
16
|
* 除了基本 rowSelection 之外返回平铺后的 selectedRowKeys、selectedRecords
|
30
17
|
*/
|
31
18
|
import { useState } from 'react';
|
32
19
|
import { getDeepValue } from '@teamix/utils';
|
33
|
-
|
34
20
|
function useTableSelection() {
|
35
21
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
36
22
|
var primaryKey = arguments.length > 1 ? arguments[1] : undefined;
|
37
|
-
|
38
23
|
var _useState = useState([]),
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
25
|
+
selectedRowKeys = _useState2[0],
|
26
|
+
setSelectedRowKeys = _useState2[1];
|
43
27
|
var _useState3 = useState([]),
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
28
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
29
|
+
selectedRecords = _useState4[0],
|
30
|
+
setSelectedRecords = _useState4[1];
|
48
31
|
function onChange(value, records) {
|
49
32
|
if (primaryKey) {
|
50
33
|
var newValue = value.filter(function (v) {
|
@@ -53,21 +36,17 @@ function useTableSelection() {
|
|
53
36
|
var deleteValue = selectedRowKeys.filter(function (v) {
|
54
37
|
return !value.includes(v);
|
55
38
|
});
|
56
|
-
|
57
39
|
var nextSelectedRecords = _toConsumableArray(selectedRecords);
|
58
|
-
|
59
40
|
if (newValue.length > 0) {
|
60
41
|
newValue.forEach(function (v) {
|
61
42
|
var nextRecords = records.find(function (n) {
|
62
43
|
return getDeepValue(primaryKey, n) === v;
|
63
44
|
});
|
64
|
-
|
65
45
|
if (nextRecords) {
|
66
46
|
nextSelectedRecords.push(nextRecords);
|
67
47
|
}
|
68
48
|
});
|
69
49
|
}
|
70
|
-
|
71
50
|
if (deleteValue.length > 0) {
|
72
51
|
deleteValue.forEach(function (v) {
|
73
52
|
nextSelectedRecords = nextSelectedRecords.filter(function (n) {
|
@@ -75,26 +54,21 @@ function useTableSelection() {
|
|
75
54
|
});
|
76
55
|
});
|
77
56
|
}
|
78
|
-
|
79
57
|
setSelectedRecords(nextSelectedRecords);
|
80
58
|
} else {
|
81
59
|
setSelectedRecords(records);
|
82
60
|
}
|
83
|
-
|
84
61
|
setSelectedRowKeys(value);
|
85
|
-
|
86
62
|
if (config.onChange) {
|
87
63
|
config.onChange(value, records);
|
88
64
|
}
|
89
65
|
}
|
90
|
-
|
91
66
|
var rowSelection = _objectSpread(_objectSpread({
|
92
67
|
selectedRowKeys: selectedRowKeys,
|
93
68
|
selectedRecords: selectedRecords
|
94
69
|
}, config), {}, {
|
95
70
|
onChange: onChange
|
96
71
|
});
|
97
|
-
|
98
72
|
return {
|
99
73
|
rowSelection: rowSelection,
|
100
74
|
selectedRowKeys: selectedRowKeys,
|
@@ -103,5 +77,4 @@ function useTableSelection() {
|
|
103
77
|
setSelectedRecords: setSelectedRecords
|
104
78
|
};
|
105
79
|
}
|
106
|
-
|
107
80
|
export default useTableSelection;
|
@@ -1,24 +1,15 @@
|
|
1
1
|
var _excluded = ["loading", "pageProps"];
|
2
|
-
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
|
-
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
6
|
-
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
8
|
-
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
9
3
|
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; }
|
10
|
-
|
11
4
|
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; }
|
12
|
-
|
13
5
|
import React from 'react';
|
14
6
|
import PageContainer, { EditableContainer } from '../../page-container';
|
15
7
|
import PageHeader from '../../page-header';
|
16
8
|
import ProTable from '../../table';
|
17
9
|
export var ListPage = function ListPage(props) {
|
18
10
|
var loading = props.loading,
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
pageProps = props.pageProps,
|
12
|
+
others = _objectWithoutProperties(props, _excluded);
|
22
13
|
var headerDefaultProps = {
|
23
14
|
title: '',
|
24
15
|
breadcrumb: []
|
@@ -27,17 +18,17 @@ export var ListPage = function ListPage(props) {
|
|
27
18
|
var contentProps = (pageProps === null || pageProps === void 0 ? void 0 : pageProps.content) || {
|
28
19
|
columns: []
|
29
20
|
};
|
30
|
-
return /*#__PURE__*/React.createElement(PageContainer,
|
21
|
+
return /*#__PURE__*/React.createElement(PageContainer, _extends({
|
31
22
|
header: /*#__PURE__*/React.createElement(EditableContainer, {
|
32
23
|
id: "header",
|
33
24
|
component: "PageHeader"
|
34
|
-
}, /*#__PURE__*/React.createElement(PageHeader,
|
25
|
+
}, /*#__PURE__*/React.createElement(PageHeader, _extends({
|
35
26
|
loading: loading
|
36
27
|
}, headerProps))),
|
37
28
|
content: /*#__PURE__*/React.createElement(EditableContainer, {
|
38
29
|
id: "content",
|
39
30
|
component: "ProTable"
|
40
|
-
}, /*#__PURE__*/React.createElement(ProTable,
|
31
|
+
}, /*#__PURE__*/React.createElement(ProTable, _extends({
|
41
32
|
loading: loading
|
42
33
|
}, contentProps)))
|
43
34
|
}, others));
|
package/es/templates/index.js
CHANGED
@@ -1,29 +1,14 @@
|
|
1
1
|
var _excluded = ["_comment", "_shape", "status", "image", "icon", "title", "subTitle", "time", "timeLeft", "content", "animation", "discription", "tags", "collapsible", "defaultCollapsed", "collapsed", "onCollapse", "dotRender"];
|
2
|
-
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
|
-
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
6
|
-
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
8
|
-
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
9
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
10
|
-
|
11
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
12
|
-
|
13
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
14
|
-
|
15
6
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
16
|
-
|
17
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
18
|
-
|
19
8
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
20
|
-
|
21
9
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
22
|
-
|
23
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
24
|
-
|
25
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
26
|
-
|
27
12
|
import React, { useCallback, useState } from 'react';
|
28
13
|
import './index.scss';
|
29
14
|
import { Icon, Timeline } from '@alicloudfe/components';
|
@@ -33,71 +18,60 @@ import { renderTags } from '../../field';
|
|
33
18
|
import TeamixIcon from '@teamix/icon';
|
34
19
|
var TimelineItem = Timeline.Item;
|
35
20
|
var cls = usePrefixCls('teamix-pro-timeline');
|
36
|
-
|
37
21
|
var ProTimeLineItem = function ProTimeLineItem(props) {
|
38
22
|
var _props$_comment = props._comment,
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
23
|
+
_comment = _props$_comment === void 0 ? false : _props$_comment,
|
24
|
+
_shape = props._shape,
|
25
|
+
status = props.status,
|
26
|
+
image = props.image,
|
27
|
+
icon = props.icon,
|
28
|
+
title = props.title,
|
29
|
+
subTitle = props.subTitle,
|
30
|
+
time = props.time,
|
31
|
+
timeLeft = props.timeLeft,
|
32
|
+
content = props.content,
|
33
|
+
animation = props.animation,
|
34
|
+
discription = props.discription,
|
35
|
+
tags = props.tags,
|
36
|
+
collapsible = props.collapsible,
|
37
|
+
defaultCollapsed = props.defaultCollapsed,
|
38
|
+
collapsed = props.collapsed,
|
39
|
+
onCollapse = props.onCollapse,
|
40
|
+
dotRender = props.dotRender,
|
41
|
+
others = _objectWithoutProperties(props, _excluded);
|
59
42
|
var timeRight = time !== null && time !== void 0 ? time : subTitle; // 兼容 subTitle
|
60
43
|
|
61
44
|
/** 内容去折叠相关 */
|
62
|
-
|
63
45
|
var _useState = useState(defaultCollapsed !== undefined ? defaultCollapsed : false),
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
46
|
+
_useState2 = _slicedToArray(_useState, 2),
|
47
|
+
innerCollapseState = _useState2[0],
|
48
|
+
setInnerCollapseState = _useState2[1];
|
68
49
|
var hasCollapse = collapsible === true || defaultCollapsed !== undefined || collapsed !== undefined;
|
69
50
|
var collapseState = collapsed !== undefined ? collapsed : innerCollapseState;
|
70
51
|
var showContent = hasCollapse ? !collapseState : true;
|
71
|
-
|
72
52
|
var onCollapseChanged = function onCollapseChanged() {
|
73
53
|
onCollapse && onCollapse(!collapseState);
|
74
|
-
|
75
54
|
if (collapsed !== undefined) {
|
76
55
|
return;
|
77
56
|
}
|
78
|
-
|
79
57
|
setInnerCollapseState(!collapseState);
|
80
58
|
};
|
81
|
-
/** 对枚举参数进行处理 */
|
82
|
-
|
83
59
|
|
60
|
+
/** 对枚举参数进行处理 */
|
84
61
|
var formatTime = function formatTime(time) {
|
85
62
|
if (typeof time === 'string') return dateFormat(time, '', 'YYYY-MM-DD hh:mm:ss');
|
86
63
|
return time;
|
87
64
|
};
|
88
|
-
|
89
65
|
var formatShape = function formatShape() {
|
90
66
|
if (['dot', 'circle'].includes(_shape)) return _shape;
|
91
67
|
return 'dot';
|
92
68
|
};
|
93
|
-
|
94
69
|
var formatStatus = function formatStatus() {
|
95
70
|
if (['success', 'fail', 'process', 'warning', 'wait'].includes(status)) return status;
|
96
71
|
return 'wait';
|
97
72
|
};
|
98
|
-
/**一些复用常数 */
|
99
|
-
|
100
73
|
|
74
|
+
/**一些复用常数 */
|
101
75
|
var circle = formatShape() === 'circle';
|
102
76
|
var dot = formatShape() === 'dot';
|
103
77
|
var process = formatStatus() === 'process';
|
@@ -105,8 +79,8 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
105
79
|
var error = formatStatus() === 'fail';
|
106
80
|
var warning = formatStatus() === 'warning';
|
107
81
|
var wait = formatStatus() === 'wait';
|
108
|
-
/**对元素进行渲染 */
|
109
82
|
|
83
|
+
/**对元素进行渲染 */
|
110
84
|
var renderImage = function renderImage() {
|
111
85
|
if (typeof image === 'string') {
|
112
86
|
return /*#__PURE__*/React.createElement("img", {
|
@@ -114,18 +88,14 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
114
88
|
alt: ""
|
115
89
|
});
|
116
90
|
}
|
117
|
-
|
118
91
|
return image;
|
119
92
|
};
|
120
|
-
|
121
93
|
var renderTag = function renderTag() {
|
122
94
|
if (_typeof(tags) === 'object') {
|
123
95
|
return renderTags(tags, 'small');
|
124
96
|
}
|
125
|
-
|
126
97
|
return tags;
|
127
98
|
};
|
128
|
-
|
129
99
|
var renderTimeLeft = useCallback(function () {
|
130
100
|
return timeLeft && /*#__PURE__*/React.createElement("span", {
|
131
101
|
className: classnames(cls({
|
@@ -181,10 +151,10 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
181
151
|
}))
|
182
152
|
}, content))));
|
183
153
|
}, [_shape, timeLeft, image, title, tags, timeRight, discription, content, collapsible, collapsed, defaultCollapsed, onCollapseChanged]);
|
154
|
+
|
184
155
|
/**
|
185
156
|
* 重新渲染 timeline 节点
|
186
157
|
* */
|
187
|
-
|
188
158
|
var renderNode = useCallback(function () {
|
189
159
|
// shape 取 dot
|
190
160
|
var renderDot = function renderDot() {
|
@@ -209,14 +179,13 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
209
179
|
type: icon,
|
210
180
|
size: "small"
|
211
181
|
}));
|
212
|
-
};
|
213
|
-
|
182
|
+
};
|
214
183
|
|
184
|
+
// shape 取 circle
|
215
185
|
var renderCircle = function renderCircle() {
|
216
186
|
if (dotRender) return /*#__PURE__*/React.createElement("div", {
|
217
187
|
className: classnames(cls('item-render-wrapper'))
|
218
188
|
}, dotRender());
|
219
|
-
|
220
189
|
var renderCircleItem = function renderCircleItem() {
|
221
190
|
// 有传入 icon 渲染 icon
|
222
191
|
if (icon) return /*#__PURE__*/React.createElement(Icon, {
|
@@ -244,7 +213,6 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
244
213
|
size: "small"
|
245
214
|
});
|
246
215
|
};
|
247
|
-
|
248
216
|
return /*#__PURE__*/React.createElement("div", {
|
249
217
|
className: classnames(cls({
|
250
218
|
'item-render-wrapper-circle': true,
|
@@ -256,15 +224,12 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
256
224
|
}))
|
257
225
|
}, renderCircleItem());
|
258
226
|
};
|
259
|
-
|
260
227
|
var renderStateNode = function renderStateNode() {
|
261
228
|
if (circle) {
|
262
229
|
return renderCircle();
|
263
230
|
}
|
264
|
-
|
265
231
|
return renderDot();
|
266
232
|
};
|
267
|
-
|
268
233
|
return /*#__PURE__*/React.createElement("div", {
|
269
234
|
className: classnames(cls('item'))
|
270
235
|
}, /*#__PURE__*/React.createElement("div", {
|
@@ -273,13 +238,12 @@ var ProTimeLineItem = function ProTimeLineItem(props) {
|
|
273
238
|
}))
|
274
239
|
}, !_comment && renderStateNode()));
|
275
240
|
}, [_shape, icon, status, dotRender]);
|
276
|
-
return /*#__PURE__*/React.createElement(TimelineItem,
|
241
|
+
return /*#__PURE__*/React.createElement(TimelineItem, _extends({
|
277
242
|
title: renderTitle(),
|
278
243
|
dot: renderNode(),
|
279
244
|
timeLeft: renderTimeLeft(),
|
280
245
|
animation: animation
|
281
246
|
}, others));
|
282
247
|
};
|
283
|
-
|
284
248
|
ProTimeLineItem.displayName = 'ProTimeLineItem';
|
285
249
|
export default ProTimeLineItem;
|