@teamix/pro 1.6.0-beta.5 → 2.0.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -2
- package/es/index-without-icon.d.ts +13 -13
- package/es/index-without-icon.js +31 -31
- package/es/index.d.ts +21 -32
- package/es/index.js +40 -36
- package/es/nocode/configurators/PageHeader.js +1 -1
- package/es/nocode/configurators/ProTable.js +1 -1
- package/es/nocode/configurators/index.js +1 -1
- package/es/nocode/configurators/map.js +3 -3
- package/es/nocode/index.js +8 -6
- package/es/nocode/pages/editor.js +1 -1
- package/es/nocode/pages/index.js +7 -4
- package/es/nocode/pages/playground.js +9 -11
- package/es/nocode/pages/renderer.d.ts +1 -1
- package/es/nocode/pages/renderer.js +12 -12
- package/es/nocode/playground.js +5 -7
- package/es/templates/Detail/index.d.ts +1 -0
- package/es/templates/Detail/index.js +1 -1
- package/es/templates/Form/index.d.ts +1 -0
- package/es/templates/Form/index.js +1 -1
- package/es/templates/List/index.d.ts +6 -3
- package/es/templates/List/index.js +7 -9
- package/es/templates/index.js +3 -3
- package/lib/index-without-icon.d.ts +13 -13
- package/lib/index-without-icon.js +57 -57
- package/lib/index.d.ts +21 -32
- package/lib/index.js +57 -170
- package/lib/nocode/pages/index.js +1 -1
- package/lib/nocode/pages/playground.js +5 -7
- package/lib/nocode/pages/renderer.d.ts +1 -1
- package/lib/nocode/pages/renderer.js +12 -12
- package/lib/nocode/playground.js +4 -6
- package/lib/templates/Detail/index.d.ts +1 -0
- package/lib/templates/Form/index.d.ts +1 -0
- package/lib/templates/List/index.d.ts +6 -3
- package/lib/templates/List/index.js +6 -8
- package/package.json +17 -6
- package/dist/pro.all.min.css +0 -1
- package/dist/pro.css +0 -1
- package/dist/pro.js +0 -115784
- package/dist/pro.min.js.LICENSE.txt +0 -47
- package/dist/pro.xconsole.min.css +0 -1
- package/es/actions/base.d.ts +0 -24
- package/es/actions/base.js +0 -64
- package/es/actions/confirm.d.ts +0 -7
- package/es/actions/confirm.js +0 -11
- package/es/actions/danger-confirm.d.ts +0 -7
- package/es/actions/danger-confirm.js +0 -14
- package/es/actions/danger-pop-confirm.d.ts +0 -5
- package/es/actions/danger-pop-confirm.js +0 -10
- package/es/actions/dialog-component.d.ts +0 -10
- package/es/actions/dialog-component.js +0 -19
- package/es/actions/dialog-form.d.ts +0 -29
- package/es/actions/dialog-form.js +0 -211
- package/es/actions/dialog-info.d.ts +0 -9
- package/es/actions/dialog-info.js +0 -19
- package/es/actions/dialog-table.d.ts +0 -9
- package/es/actions/dialog-table.js +0 -10
- package/es/actions/dialog.d.ts +0 -40
- package/es/actions/dialog.js +0 -223
- package/es/actions/drawer-form.d.ts +0 -6
- package/es/actions/drawer-form.js +0 -7
- package/es/actions/drawer-info.d.ts +0 -6
- package/es/actions/drawer-info.js +0 -7
- package/es/actions/drawer-table.d.ts +0 -6
- package/es/actions/drawer-table.js +0 -7
- package/es/actions/drawer.d.ts +0 -6
- package/es/actions/drawer.js +0 -7
- package/es/actions/error.d.ts +0 -7
- package/es/actions/error.js +0 -11
- package/es/actions/index.d.ts +0 -114
- package/es/actions/index.js +0 -436
- package/es/actions/index.scss +0 -141
- package/es/actions/link.d.ts +0 -8
- package/es/actions/link.js +0 -15
- package/es/actions/notice.d.ts +0 -7
- package/es/actions/notice.js +0 -11
- package/es/actions/pop-confirm.d.ts +0 -9
- package/es/actions/pop-confirm.js +0 -9
- package/es/actions/quick.d.ts +0 -2
- package/es/actions/quick.js +0 -26
- package/es/actions/request.d.ts +0 -9
- package/es/actions/request.js +0 -48
- package/es/actions/utils.d.ts +0 -1
- package/es/actions/utils.js +0 -19
- package/es/card/card-container.d.ts +0 -18
- package/es/card/card-container.js +0 -19
- package/es/card/divider.d.ts +0 -6
- package/es/card/divider.js +0 -11
- package/es/card/index.d.ts +0 -109
- package/es/card/index.js +0 -284
- package/es/card/index.scss +0 -313
- package/es/card/selectable.d.ts +0 -13
- package/es/card/selectable.js +0 -36
- package/es/card/tab.d.ts +0 -6
- package/es/card/tab.js +0 -18
- package/es/card/utils.d.ts +0 -9
- package/es/card/utils.js +0 -28
- package/es/card/xconsole.scss +0 -3
- package/es/field/index.d.ts +0 -3
- package/es/field/index.js +0 -3
- package/es/form/Components/Editable/index.d.ts +0 -20
- package/es/form/Components/Editable/index.js +0 -193
- package/es/form/Components/FormGroup/index.d.ts +0 -14
- package/es/form/Components/FormGroup/index.js +0 -78
- package/es/form/Components/FormGroup/index.scss +0 -23
- package/es/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/es/form/Components/LightFilter/componentMap.js +0 -7
- package/es/form/Components/LightFilter/index.d.ts +0 -17
- package/es/form/Components/LightFilter/index.js +0 -122
- package/es/form/Components/LightFilter/index.scss +0 -89
- package/es/form/Components/ProField/index.d.ts +0 -2
- package/es/form/Components/ProField/index.js +0 -31
- package/es/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/es/form/Components/ProField/mapDateFormat.js +0 -86
- package/es/form/Components/Text/index.d.ts +0 -8
- package/es/form/Components/Text/index.js +0 -20
- package/es/form/Components/Text/index.scss +0 -8
- package/es/form/Filter/AdvancedFilter.d.ts +0 -7
- package/es/form/Filter/AdvancedFilter.js +0 -112
- package/es/form/Filter/Layout.d.ts +0 -5
- package/es/form/Filter/Layout.js +0 -68
- package/es/form/Filter/LightFilter.d.ts +0 -7
- package/es/form/Filter/LightFilter.js +0 -94
- package/es/form/Filter/SimpleFilter.d.ts +0 -7
- package/es/form/Filter/SimpleFilter.js +0 -88
- package/es/form/Filter/index.d.ts +0 -9
- package/es/form/Filter/index.js +0 -511
- package/es/form/Filter/index.scss +0 -48
- package/es/form/Filter/index2.d.ts +0 -13
- package/es/form/Filter/index2.js +0 -162
- package/es/form/Filter/index2.scss +0 -26
- package/es/form/Filter/layout.scss +0 -40
- package/es/form/Filter/useBindUrl.d.ts +0 -2
- package/es/form/Filter/useBindUrl.js +0 -90
- package/es/form/Filter/useSpecialProps.d.ts +0 -6
- package/es/form/Filter/useSpecialProps.js +0 -32
- package/es/form/ProForm/addCascadeEffect.d.ts +0 -2
- package/es/form/ProForm/addCascadeEffect.js +0 -203
- package/es/form/ProForm/customComponent.d.ts +0 -3
- package/es/form/ProForm/customComponent.js +0 -16
- package/es/form/ProForm/index.d.ts +0 -5
- package/es/form/ProForm/index.js +0 -155
- package/es/form/ProForm/index.scss +0 -411
- package/es/form/ProForm/useAutoLayout.d.ts +0 -9
- package/es/form/ProForm/useAutoLayout.js +0 -93
- package/es/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/es/form/ProForm/useAutoSubmit.js +0 -23
- package/es/form/ProForm/useFieldRequest.d.ts +0 -5
- package/es/form/ProForm/useFieldRequest.js +0 -14
- package/es/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/es/form/ProForm/useFormDisplayValues.js +0 -78
- package/es/form/ProForm/useInitialRequest.d.ts +0 -6
- package/es/form/ProForm/useInitialRequest.js +0 -10
- package/es/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/es/form/SchemaForm/adapterComponent.js +0 -14
- package/es/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/es/form/SchemaForm/adapterDecorator.js +0 -20
- package/es/form/SchemaForm/adapterType.d.ts +0 -5
- package/es/form/SchemaForm/adapterType.js +0 -52
- package/es/form/SchemaForm/index.d.ts +0 -4
- package/es/form/SchemaForm/index.js +0 -209
- package/es/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayCards.js +0 -18
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayCollapse.js +0 -18
- package/es/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayItems.js +0 -31
- package/es/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayTable.js +0 -78
- package/es/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/es/form/SchemaForm/initializeDataSource.js +0 -19
- package/es/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormButton.js +0 -74
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormCollapse.js +0 -33
- package/es/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormGroup.js +0 -36
- package/es/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/es/form/SchemaForm/initializeFormStep.js +0 -50
- package/es/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormTab.js +0 -43
- package/es/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/es/form/SchemaForm/initializeReactions.js +0 -65
- package/es/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/es/form/SchemaForm/initializeRequest.js +0 -38
- package/es/form/SchemaForm/initializeRules.d.ts +0 -11
- package/es/form/SchemaForm/initializeRules.js +0 -46
- package/es/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/es/form/SchemaForm/initializeSelectTable.js +0 -83
- package/es/form/SchemaForm/reactions.d.ts +0 -6
- package/es/form/SchemaForm/reactions.js +0 -88
- package/es/form/docs/ActionResponse.d.ts +0 -8
- package/es/form/docs/ActionResponse.js +0 -11
- package/es/form/docs/ActionResponse.less +0 -25
- package/es/form/fieldTypeMap.d.ts +0 -7
- package/es/form/fieldTypeMap.js +0 -46
- package/es/form/global.scss +0 -14
- package/es/form/index.d.ts +0 -125
- package/es/form/index.js +0 -44
- package/es/form/locales/validate.d.ts +0 -159
- package/es/form/locales/validate.js +0 -158
- package/es/form/schemaNameMap.d.ts +0 -5
- package/es/form/schemaNameMap.js +0 -50
- package/es/form/typing.d.ts +0 -194
- package/es/form/typing.js +0 -1
- package/es/form/utils/parseSchema.d.ts +0 -3
- package/es/form/utils/parseSchema.js +0 -38
- package/es/form/utils.d.ts +0 -55
- package/es/form/utils.js +0 -155
- package/es/form/warning.d.ts +0 -3
- package/es/form/warning.js +0 -11
- package/es/image/index.d.ts +0 -22
- package/es/image/index.js +0 -73
- package/es/image/index.scss +0 -3
- package/es/info/components/InfoGroup/index.d.ts +0 -5
- package/es/info/components/InfoGroup/index.js +0 -86
- package/es/info/components/InfoGroup/index.scss +0 -64
- package/es/info/components/InfoValueItem/index.d.ts +0 -5
- package/es/info/components/InfoValueItem/index.js +0 -302
- package/es/info/components/InfoValueItem/index.scss +0 -26
- package/es/info/components/ProInfoItem/index.d.ts +0 -5
- package/es/info/components/ProInfoItem/index.js +0 -92
- package/es/info/components/ProInfoItem/index.scss +0 -76
- package/es/info/components/baseInfo/index.d.ts +0 -8
- package/es/info/components/baseInfo/index.js +0 -95
- package/es/info/components/baseInfo/index.scss +0 -6
- package/es/info/components/headerInfo/index.d.ts +0 -8
- package/es/info/components/headerInfo/index.js +0 -68
- package/es/info/components/headerInfo/index.scss +0 -3
- package/es/info/components/tableInfo/index.d.ts +0 -7
- package/es/info/components/tableInfo/index.js +0 -154
- package/es/info/components/tableInfo/index.scss +0 -18
- package/es/info/index.d.ts +0 -6
- package/es/info/index.js +0 -182
- package/es/info/index.scss +0 -9
- package/es/info/typing.d.ts +0 -220
- package/es/info/typing.js +0 -1
- package/es/info/utils/index.d.ts +0 -20
- package/es/info/utils/index.js +0 -49
- package/es/info/utils/layout.d.ts +0 -2
- package/es/info/utils/layout.js +0 -58
- package/es/info/utils/utils.d.ts +0 -1
- package/es/info/utils/utils.js +0 -13
- package/es/layout/index.d.ts +0 -2
- package/es/layout/index.js +0 -3
- package/es/page-container/index.d.ts +0 -3
- package/es/page-container/index.js +0 -3
- package/es/page-header/index.d.ts +0 -74
- package/es/page-header/index.js +0 -218
- package/es/page-header/index.scss +0 -193
- package/es/page-header/xconsole.scss +0 -5
- package/es/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/es/sidebar/components/sidebar-container/index.js +0 -167
- package/es/sidebar/components/sidebar-container/index.scss +0 -73
- package/es/sidebar/components/tree/index.d.ts +0 -6
- package/es/sidebar/components/tree/index.js +0 -288
- package/es/sidebar/components/tree/index.scss +0 -10
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +0 -47
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.scss +0 -7
- package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/es/sidebar/components/tree-node/components/IconAction/index.js +0 -79
- package/es/sidebar/components/tree-node/components/IconAction/index.scss +0 -7
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/es/sidebar/components/tree-node/components/IconSwitch/index.js +0 -60
- package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +0 -7
- package/es/sidebar/components/tree-node/index.d.ts +0 -7
- package/es/sidebar/components/tree-node/index.js +0 -192
- package/es/sidebar/components/tree-node/index.scss +0 -68
- package/es/sidebar/index.d.ts +0 -9
- package/es/sidebar/index.js +0 -187
- package/es/sidebar/index.scss +0 -38
- package/es/sidebar/typing.d.ts +0 -145
- package/es/sidebar/typing.js +0 -1
- package/es/sidebar/utils/action-ref.d.ts +0 -3
- package/es/sidebar/utils/action-ref.js +0 -10
- package/es/sidebar/utils/index.d.ts +0 -364
- package/es/sidebar/utils/index.js +0 -277
- package/es/skeleton/index.d.ts +0 -3
- package/es/skeleton/index.js +0 -3
- package/es/table/components/CardView/index.d.ts +0 -5
- package/es/table/components/CardView/index.js +0 -387
- package/es/table/components/CardView/index.scss +0 -46
- package/es/table/components/EmptyContent/index.d.ts +0 -2
- package/es/table/components/EmptyContent/index.js +0 -11
- package/es/table/components/Filter/index.d.ts +0 -12
- package/es/table/components/Filter/index.js +0 -248
- package/es/table/components/Filter/index.scss +0 -27
- package/es/table/components/Layout/index.d.ts +0 -5
- package/es/table/components/Layout/index.js +0 -175
- package/es/table/components/Layout/index.scss +0 -48
- package/es/table/components/LoadMore/index.d.ts +0 -20
- package/es/table/components/LoadMore/index.js +0 -88
- package/es/table/components/LoadMore/index.scss +0 -19
- package/es/table/components/Pagination/index.d.ts +0 -8
- package/es/table/components/Pagination/index.js +0 -244
- package/es/table/components/Pagination/index.scss +0 -55
- package/es/table/components/QuickAction/index.d.ts +0 -11
- package/es/table/components/QuickAction/index.js +0 -45
- package/es/table/components/ToolBar/CardSwitch.d.ts +0 -8
- package/es/table/components/ToolBar/CardSwitch.js +0 -52
- package/es/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/es/table/components/ToolBar/DensityIcon.js +0 -107
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FilterColumnIcon.js +0 -362
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FullScreenIcon.js +0 -29
- package/es/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/es/table/components/ToolBar/Fullscreen.js +0 -100
- package/es/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/es/table/components/ToolBar/RefreshIcon.js +0 -180
- package/es/table/components/ToolBar/index.d.ts +0 -5
- package/es/table/components/ToolBar/index.js +0 -174
- package/es/table/components/ToolBar/index.scss +0 -177
- package/es/table/index.d.ts +0 -6
- package/es/table/index.js +0 -1154
- package/es/table/index.scss +0 -158
- package/es/table/typing.d.ts +0 -426
- package/es/table/typing.js +0 -1
- package/es/table/utils/columnRender.d.ts +0 -13
- package/es/table/utils/columnRender.js +0 -247
- package/es/table/utils/genProColumnToColumn.d.ts +0 -13
- package/es/table/utils/genProColumnToColumn.js +0 -51
- package/es/table/utils/getTableProps.d.ts +0 -2
- package/es/table/utils/getTableProps.js +0 -4
- package/es/table/utils/getTableSortIcons.d.ts +0 -3
- package/es/table/utils/getTableSortIcons.js +0 -21
- package/es/table/utils/index.d.ts +0 -19
- package/es/table/utils/index.js +0 -128
- package/es/table/utils/pureColumnRender.d.ts +0 -9
- package/es/table/utils/pureColumnRender.js +0 -169
- package/es/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/es/table/utils/pureGenProColumnToColumn.js +0 -28
- package/es/table/utils/useTableSelection.d.ts +0 -3
- package/es/table/utils/useTableSelection.js +0 -80
- package/es/table/utils/util.d.ts +0 -5
- package/es/table/utils/util.js +0 -19
- package/es/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/es/timeline/ProTimeLineItem/index.js +0 -245
- package/es/timeline/ProTimeLineItem/index.scss +0 -235
- package/es/timeline/index.d.ts +0 -10
- package/es/timeline/index.js +0 -63
- package/es/timeline/index.scss +0 -7
- package/es/timeline/typing.d.ts +0 -107
- package/es/timeline/typing.js +0 -1
- package/es/utils/aspect.d.ts +0 -2
- package/es/utils/aspect.js +0 -57
- package/es/utils/index.d.ts +0 -3
- package/es/utils/index.js +0 -3
- package/es/utils/message.d.ts +0 -3
- package/es/utils/message.js +0 -14
- package/lib/actions/base.d.ts +0 -24
- package/lib/actions/base.js +0 -72
- package/lib/actions/confirm.d.ts +0 -7
- package/lib/actions/confirm.js +0 -20
- package/lib/actions/danger-confirm.d.ts +0 -7
- package/lib/actions/danger-confirm.js +0 -23
- package/lib/actions/danger-pop-confirm.d.ts +0 -5
- package/lib/actions/danger-pop-confirm.js +0 -18
- package/lib/actions/dialog-component.d.ts +0 -10
- package/lib/actions/dialog-component.js +0 -28
- package/lib/actions/dialog-form.d.ts +0 -29
- package/lib/actions/dialog-form.js +0 -220
- package/lib/actions/dialog-info.d.ts +0 -9
- package/lib/actions/dialog-info.js +0 -28
- package/lib/actions/dialog-table.d.ts +0 -9
- package/lib/actions/dialog-table.js +0 -19
- package/lib/actions/dialog.d.ts +0 -40
- package/lib/actions/dialog.js +0 -232
- package/lib/actions/drawer-form.d.ts +0 -6
- package/lib/actions/drawer-form.js +0 -15
- package/lib/actions/drawer-info.d.ts +0 -6
- package/lib/actions/drawer-info.js +0 -15
- package/lib/actions/drawer-table.d.ts +0 -6
- package/lib/actions/drawer-table.js +0 -15
- package/lib/actions/drawer.d.ts +0 -6
- package/lib/actions/drawer.js +0 -16
- package/lib/actions/error.d.ts +0 -7
- package/lib/actions/error.js +0 -20
- package/lib/actions/index.d.ts +0 -114
- package/lib/actions/index.js +0 -474
- package/lib/actions/index.scss +0 -141
- package/lib/actions/link.d.ts +0 -8
- package/lib/actions/link.js +0 -21
- package/lib/actions/notice.d.ts +0 -7
- package/lib/actions/notice.js +0 -20
- package/lib/actions/pop-confirm.d.ts +0 -9
- package/lib/actions/pop-confirm.js +0 -18
- package/lib/actions/quick.d.ts +0 -2
- package/lib/actions/quick.js +0 -33
- package/lib/actions/request.d.ts +0 -9
- package/lib/actions/request.js +0 -55
- package/lib/actions/utils.d.ts +0 -1
- package/lib/actions/utils.js +0 -25
- package/lib/card/card-container.d.ts +0 -18
- package/lib/card/card-container.js +0 -28
- package/lib/card/divider.d.ts +0 -6
- package/lib/card/divider.js +0 -19
- package/lib/card/index.d.ts +0 -109
- package/lib/card/index.js +0 -310
- package/lib/card/index.scss +0 -313
- package/lib/card/selectable.d.ts +0 -13
- package/lib/card/selectable.js +0 -44
- package/lib/card/tab.d.ts +0 -6
- package/lib/card/tab.js +0 -26
- package/lib/card/utils.d.ts +0 -9
- package/lib/card/utils.js +0 -35
- package/lib/card/xconsole.scss +0 -3
- package/lib/field/index.d.ts +0 -3
- package/lib/field/index.js +0 -24
- package/lib/form/Components/Editable/index.d.ts +0 -20
- package/lib/form/Components/Editable/index.js +0 -205
- package/lib/form/Components/FormGroup/index.d.ts +0 -14
- package/lib/form/Components/FormGroup/index.js +0 -86
- package/lib/form/Components/FormGroup/index.scss +0 -23
- package/lib/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/lib/form/Components/LightFilter/componentMap.js +0 -14
- package/lib/form/Components/LightFilter/index.d.ts +0 -17
- package/lib/form/Components/LightFilter/index.js +0 -133
- package/lib/form/Components/LightFilter/index.scss +0 -89
- package/lib/form/Components/ProField/index.d.ts +0 -2
- package/lib/form/Components/ProField/index.js +0 -39
- package/lib/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/lib/form/Components/ProField/mapDateFormat.js +0 -94
- package/lib/form/Components/Text/index.d.ts +0 -8
- package/lib/form/Components/Text/index.js +0 -28
- package/lib/form/Components/Text/index.scss +0 -8
- package/lib/form/Filter/AdvancedFilter.d.ts +0 -7
- package/lib/form/Filter/AdvancedFilter.js +0 -123
- package/lib/form/Filter/Layout.d.ts +0 -5
- package/lib/form/Filter/Layout.js +0 -78
- package/lib/form/Filter/LightFilter.d.ts +0 -7
- package/lib/form/Filter/LightFilter.js +0 -105
- package/lib/form/Filter/SimpleFilter.d.ts +0 -7
- package/lib/form/Filter/SimpleFilter.js +0 -99
- package/lib/form/Filter/index.d.ts +0 -9
- package/lib/form/Filter/index.js +0 -526
- package/lib/form/Filter/index.scss +0 -48
- package/lib/form/Filter/index2.d.ts +0 -13
- package/lib/form/Filter/index2.js +0 -174
- package/lib/form/Filter/index2.scss +0 -26
- package/lib/form/Filter/layout.scss +0 -40
- package/lib/form/Filter/useBindUrl.d.ts +0 -2
- package/lib/form/Filter/useBindUrl.js +0 -97
- package/lib/form/Filter/useSpecialProps.d.ts +0 -6
- package/lib/form/Filter/useSpecialProps.js +0 -39
- package/lib/form/ProForm/addCascadeEffect.d.ts +0 -2
- package/lib/form/ProForm/addCascadeEffect.js +0 -210
- package/lib/form/ProForm/customComponent.d.ts +0 -3
- package/lib/form/ProForm/customComponent.js +0 -22
- package/lib/form/ProForm/index.d.ts +0 -5
- package/lib/form/ProForm/index.js +0 -166
- package/lib/form/ProForm/index.scss +0 -411
- package/lib/form/ProForm/useAutoLayout.d.ts +0 -9
- package/lib/form/ProForm/useAutoLayout.js +0 -100
- package/lib/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/lib/form/ProForm/useAutoSubmit.js +0 -28
- package/lib/form/ProForm/useFieldRequest.d.ts +0 -5
- package/lib/form/ProForm/useFieldRequest.js +0 -21
- package/lib/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/lib/form/ProForm/useFormDisplayValues.js +0 -86
- package/lib/form/ProForm/useInitialRequest.d.ts +0 -6
- package/lib/form/ProForm/useInitialRequest.js +0 -17
- package/lib/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/lib/form/SchemaForm/adapterComponent.js +0 -21
- package/lib/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/lib/form/SchemaForm/adapterDecorator.js +0 -24
- package/lib/form/SchemaForm/adapterType.d.ts +0 -5
- package/lib/form/SchemaForm/adapterType.js +0 -59
- package/lib/form/SchemaForm/index.d.ts +0 -4
- package/lib/form/SchemaForm/index.js +0 -220
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayCards.js +0 -25
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayCollapse.js +0 -25
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayItems.js +0 -38
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayTable.js +0 -85
- package/lib/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/lib/form/SchemaForm/initializeDataSource.js +0 -26
- package/lib/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormButton.js +0 -81
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormCollapse.js +0 -40
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormGroup.js +0 -43
- package/lib/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/lib/form/SchemaForm/initializeFormStep.js +0 -57
- package/lib/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormTab.js +0 -50
- package/lib/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/lib/form/SchemaForm/initializeReactions.js +0 -73
- package/lib/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/lib/form/SchemaForm/initializeRequest.js +0 -45
- package/lib/form/SchemaForm/initializeRules.d.ts +0 -11
- package/lib/form/SchemaForm/initializeRules.js +0 -53
- package/lib/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/lib/form/SchemaForm/initializeSelectTable.js +0 -91
- package/lib/form/SchemaForm/reactions.d.ts +0 -6
- package/lib/form/SchemaForm/reactions.js +0 -97
- package/lib/form/docs/ActionResponse.d.ts +0 -8
- package/lib/form/docs/ActionResponse.js +0 -19
- package/lib/form/docs/ActionResponse.less +0 -25
- package/lib/form/fieldTypeMap.d.ts +0 -7
- package/lib/form/fieldTypeMap.js +0 -54
- package/lib/form/global.scss +0 -14
- package/lib/form/index.d.ts +0 -125
- package/lib/form/index.js +0 -171
- package/lib/form/locales/validate.d.ts +0 -159
- package/lib/form/locales/validate.js +0 -165
- package/lib/form/schemaNameMap.d.ts +0 -5
- package/lib/form/schemaNameMap.js +0 -57
- package/lib/form/typing.d.ts +0 -194
- package/lib/form/typing.js +0 -5
- package/lib/form/utils/parseSchema.d.ts +0 -3
- package/lib/form/utils/parseSchema.js +0 -45
- package/lib/form/utils.d.ts +0 -55
- package/lib/form/utils.js +0 -169
- package/lib/form/warning.d.ts +0 -3
- package/lib/form/warning.js +0 -18
- package/lib/image/index.d.ts +0 -22
- package/lib/image/index.js +0 -83
- package/lib/image/index.scss +0 -3
- package/lib/info/components/InfoGroup/index.d.ts +0 -5
- package/lib/info/components/InfoGroup/index.js +0 -97
- package/lib/info/components/InfoGroup/index.scss +0 -64
- package/lib/info/components/InfoValueItem/index.d.ts +0 -5
- package/lib/info/components/InfoValueItem/index.js +0 -313
- package/lib/info/components/InfoValueItem/index.scss +0 -26
- package/lib/info/components/ProInfoItem/index.d.ts +0 -5
- package/lib/info/components/ProInfoItem/index.js +0 -100
- package/lib/info/components/ProInfoItem/index.scss +0 -76
- package/lib/info/components/baseInfo/index.d.ts +0 -8
- package/lib/info/components/baseInfo/index.js +0 -103
- package/lib/info/components/baseInfo/index.scss +0 -6
- package/lib/info/components/headerInfo/index.d.ts +0 -8
- package/lib/info/components/headerInfo/index.js +0 -76
- package/lib/info/components/headerInfo/index.scss +0 -3
- package/lib/info/components/tableInfo/index.d.ts +0 -7
- package/lib/info/components/tableInfo/index.js +0 -164
- package/lib/info/components/tableInfo/index.scss +0 -18
- package/lib/info/index.d.ts +0 -6
- package/lib/info/index.js +0 -205
- package/lib/info/index.scss +0 -9
- package/lib/info/typing.d.ts +0 -220
- package/lib/info/typing.js +0 -5
- package/lib/info/utils/index.d.ts +0 -20
- package/lib/info/utils/index.js +0 -60
- package/lib/info/utils/layout.d.ts +0 -2
- package/lib/info/utils/layout.js +0 -65
- package/lib/info/utils/utils.d.ts +0 -1
- package/lib/info/utils/utils.js +0 -19
- package/lib/layout/index.d.ts +0 -2
- package/lib/layout/index.js +0 -10
- package/lib/page-container/index.d.ts +0 -3
- package/lib/page-container/index.js +0 -24
- package/lib/page-header/index.d.ts +0 -74
- package/lib/page-header/index.js +0 -224
- package/lib/page-header/index.scss +0 -193
- package/lib/page-header/xconsole.scss +0 -5
- package/lib/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/lib/sidebar/components/sidebar-container/index.js +0 -178
- package/lib/sidebar/components/sidebar-container/index.scss +0 -73
- package/lib/sidebar/components/tree/index.d.ts +0 -6
- package/lib/sidebar/components/tree/index.js +0 -298
- package/lib/sidebar/components/tree/index.scss +0 -10
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +0 -57
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.scss +0 -7
- package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +0 -90
- package/lib/sidebar/components/tree-node/components/IconAction/index.scss +0 -7
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +0 -71
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +0 -7
- package/lib/sidebar/components/tree-node/index.d.ts +0 -7
- package/lib/sidebar/components/tree-node/index.js +0 -204
- package/lib/sidebar/components/tree-node/index.scss +0 -68
- package/lib/sidebar/index.d.ts +0 -9
- package/lib/sidebar/index.js +0 -228
- package/lib/sidebar/index.scss +0 -38
- package/lib/sidebar/typing.d.ts +0 -145
- package/lib/sidebar/typing.js +0 -5
- package/lib/sidebar/utils/action-ref.d.ts +0 -3
- package/lib/sidebar/utils/action-ref.js +0 -16
- package/lib/sidebar/utils/index.d.ts +0 -364
- package/lib/sidebar/utils/index.js +0 -291
- package/lib/skeleton/index.d.ts +0 -3
- package/lib/skeleton/index.js +0 -24
- package/lib/table/components/CardView/index.d.ts +0 -5
- package/lib/table/components/CardView/index.js +0 -397
- package/lib/table/components/CardView/index.scss +0 -46
- package/lib/table/components/EmptyContent/index.d.ts +0 -2
- package/lib/table/components/EmptyContent/index.js +0 -19
- package/lib/table/components/Filter/index.d.ts +0 -12
- package/lib/table/components/Filter/index.js +0 -258
- package/lib/table/components/Filter/index.scss +0 -27
- package/lib/table/components/Layout/index.d.ts +0 -5
- package/lib/table/components/Layout/index.js +0 -185
- package/lib/table/components/Layout/index.scss +0 -48
- package/lib/table/components/LoadMore/index.d.ts +0 -20
- package/lib/table/components/LoadMore/index.js +0 -99
- package/lib/table/components/LoadMore/index.scss +0 -19
- package/lib/table/components/Pagination/index.d.ts +0 -8
- package/lib/table/components/Pagination/index.js +0 -253
- package/lib/table/components/Pagination/index.scss +0 -55
- package/lib/table/components/QuickAction/index.d.ts +0 -11
- package/lib/table/components/QuickAction/index.js +0 -53
- package/lib/table/components/ToolBar/CardSwitch.d.ts +0 -8
- package/lib/table/components/ToolBar/CardSwitch.js +0 -60
- package/lib/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/DensityIcon.js +0 -114
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FilterColumnIcon.js +0 -370
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FullScreenIcon.js +0 -38
- package/lib/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/lib/table/components/ToolBar/Fullscreen.js +0 -110
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/RefreshIcon.js +0 -188
- package/lib/table/components/ToolBar/index.d.ts +0 -5
- package/lib/table/components/ToolBar/index.js +0 -185
- package/lib/table/components/ToolBar/index.scss +0 -177
- package/lib/table/index.d.ts +0 -6
- package/lib/table/index.js +0 -1176
- package/lib/table/index.scss +0 -158
- package/lib/table/typing.d.ts +0 -426
- package/lib/table/typing.js +0 -5
- package/lib/table/utils/columnRender.d.ts +0 -13
- package/lib/table/utils/columnRender.js +0 -256
- package/lib/table/utils/genProColumnToColumn.d.ts +0 -13
- package/lib/table/utils/genProColumnToColumn.js +0 -58
- package/lib/table/utils/getTableProps.d.ts +0 -2
- package/lib/table/utils/getTableProps.js +0 -11
- package/lib/table/utils/getTableSortIcons.d.ts +0 -3
- package/lib/table/utils/getTableSortIcons.js +0 -29
- package/lib/table/utils/index.d.ts +0 -19
- package/lib/table/utils/index.js +0 -142
- package/lib/table/utils/pureColumnRender.d.ts +0 -9
- package/lib/table/utils/pureColumnRender.js +0 -178
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/lib/table/utils/pureGenProColumnToColumn.js +0 -34
- package/lib/table/utils/useTableSelection.d.ts +0 -3
- package/lib/table/utils/useTableSelection.js +0 -83
- package/lib/table/utils/util.d.ts +0 -5
- package/lib/table/utils/util.js +0 -25
- package/lib/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/lib/timeline/ProTimeLineItem/index.js +0 -255
- package/lib/timeline/ProTimeLineItem/index.scss +0 -235
- package/lib/timeline/index.d.ts +0 -10
- package/lib/timeline/index.js +0 -79
- package/lib/timeline/index.scss +0 -7
- package/lib/timeline/typing.d.ts +0 -107
- package/lib/timeline/typing.js +0 -5
- package/lib/utils/aspect.d.ts +0 -2
- package/lib/utils/aspect.js +0 -64
- package/lib/utils/index.d.ts +0 -3
- package/lib/utils/index.js +0 -24
- package/lib/utils/message.d.ts +0 -3
- package/lib/utils/message.js +0 -22
- /package/dist/{fonts/txddinmedium.woff → static/txddinmedium.df41cfe2.woff} +0 -0
@@ -1,28 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
var _utils = require("@teamix/utils");
|
8
|
-
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; }
|
9
|
-
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; }
|
10
|
-
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; }
|
11
|
-
var useAutoSubmit = function useAutoSubmit(onSubmit, context) {
|
12
|
-
if ((0, _utils.isObj)(onSubmit)) {
|
13
|
-
var history = (0, _utils.useRealHistory)();
|
14
|
-
var submitConfig = onSubmit;
|
15
|
-
return function (values) {
|
16
|
-
return (0, _utils.doCommonRequest)(_objectSpread(_objectSpread({
|
17
|
-
method: 'POST'
|
18
|
-
}, submitConfig), {}, {
|
19
|
-
params: _objectSpread(_objectSpread({}, values), submitConfig.params || {})
|
20
|
-
}), _objectSpread({
|
21
|
-
fields: values
|
22
|
-
}, context), history);
|
23
|
-
};
|
24
|
-
}
|
25
|
-
return onSubmit;
|
26
|
-
};
|
27
|
-
var _default = useAutoSubmit;
|
28
|
-
exports.default = _default;
|
@@ -1,21 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
var _react = require("@formily/react");
|
8
|
-
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; }
|
9
|
-
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; }
|
10
|
-
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; }
|
11
|
-
var _default = function _default() {
|
12
|
-
var field = (0, _react.useField)();
|
13
|
-
var refresh = function refresh() {
|
14
|
-
field.data.refresh = _objectSpread({}, field.data.refresh);
|
15
|
-
};
|
16
|
-
return {
|
17
|
-
refresh: refresh,
|
18
|
-
field: field
|
19
|
-
};
|
20
|
-
};
|
21
|
-
exports.default = _default;
|
@@ -1,86 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.useFormDisplayValues = exports.getFormDisplayValues = void 0;
|
7
|
-
var _react = require("@formily/react");
|
8
|
-
var _reactive = require("@formily/reactive");
|
9
|
-
var _utils = require("@teamix/utils");
|
10
|
-
var _fieldTypeMap = _interopRequireDefault(require("../fieldTypeMap"));
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
13
|
-
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
|
-
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); }
|
15
|
-
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
|
-
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; }
|
17
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
18
|
-
/**
|
19
|
-
* 获取表单值的可显示值
|
20
|
-
* @returns 如果某字段有dataSource,则返回value对应label
|
21
|
-
* @example const example = {
|
22
|
-
a: [
|
23
|
-
[{ b: 'a.0.0.b', c: 'a.0.0.c' }, { d: 'a.0.1.d' }],
|
24
|
-
{ e: [{ f: { g: [{ h: 'a.1.e.0.f.g.0.h' }] } }, 'a.1.e.1'] },
|
25
|
-
],
|
26
|
-
};
|
27
|
-
console.log(getDisplayValues(example));
|
28
|
-
*/
|
29
|
-
var getDisplayValues = function getDisplayValues(form, values) {
|
30
|
-
var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
31
|
-
var displayValues;
|
32
|
-
// 拼接路径
|
33
|
-
var connectPath = function connectPath(path) {
|
34
|
-
return prefix ? "".concat(prefix, ".").concat(path) : "".concat(path);
|
35
|
-
};
|
36
|
-
// 根据值路径获取地址
|
37
|
-
var getAddress = function getAddress(path) {
|
38
|
-
return form.indexes[path];
|
39
|
-
};
|
40
|
-
// 当前field
|
41
|
-
var field = form.query(getAddress(prefix)).take();
|
42
|
-
// 是否真实字段值(自定义组件、布局组件、自增数组组件为非真实字段)
|
43
|
-
var isFieldValue = Object.keys(_fieldTypeMap.default).includes(field === null || field === void 0 ? void 0 : field.component[0]);
|
44
|
-
// 判断值的类型,递归获取每个值在该结构中的完整路径
|
45
|
-
if (!(0, _utils.isUsable)(values)) {
|
46
|
-
displayValues = {};
|
47
|
-
} else if ((0, _utils.isPlainObj)(values) && !isFieldValue) {
|
48
|
-
// 如果值是布局对象的值
|
49
|
-
displayValues = {};
|
50
|
-
Object.entries(values).forEach(function (_ref) {
|
51
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
52
|
-
key = _ref2[0],
|
53
|
-
value = _ref2[1];
|
54
|
-
displayValues[key] = getDisplayValues(form, value, connectPath(key));
|
55
|
-
});
|
56
|
-
} else if ((0, _utils.isArr)(values) && !isFieldValue) {
|
57
|
-
// 如果值是自增数组的值
|
58
|
-
// ArrayItems为字符串数组时,由于form.indexes中对应address为最后一个组件,无法正常获取displayName
|
59
|
-
// 例如:arrayItemsString.0: "arrayItemsString.0.ArrayItemsRemove"
|
60
|
-
displayValues = [];
|
61
|
-
values.map(function (value, index) {
|
62
|
-
displayValues[index] = getDisplayValues(form, value, connectPath(index));
|
63
|
-
});
|
64
|
-
} else {
|
65
|
-
var _values$value;
|
66
|
-
// 通过值的完整路径获取字段address(从form实例的indexes中),然后获取该字段的value在该字段dataSource中对应的label
|
67
|
-
var realValue = (_values$value = values === null || values === void 0 ? void 0 : values.value) !== null && _values$value !== void 0 ? _values$value : values; // 针对单个字段的值是对象,例如Select的useDetailValue
|
68
|
-
var displayValue = (0, _utils.getValueByValue)(field === null || field === void 0 ? void 0 : field.dataSource, realValue);
|
69
|
-
displayValues = {
|
70
|
-
title: field === null || field === void 0 ? void 0 : field.title,
|
71
|
-
component: field === null || field === void 0 ? void 0 : field.component[0],
|
72
|
-
value: values,
|
73
|
-
displayValue: displayValue
|
74
|
-
};
|
75
|
-
}
|
76
|
-
return displayValues;
|
77
|
-
};
|
78
|
-
var useFormDisplayValues = function useFormDisplayValues() {
|
79
|
-
var form = (0, _react.useForm)();
|
80
|
-
return getDisplayValues(form, (0, _reactive.toJS)(form.values));
|
81
|
-
};
|
82
|
-
exports.useFormDisplayValues = useFormDisplayValues;
|
83
|
-
var getFormDisplayValues = function getFormDisplayValues(form) {
|
84
|
-
return getDisplayValues(form, (0, _reactive.toJS)(form.values));
|
85
|
-
};
|
86
|
-
exports.getFormDisplayValues = getFormDisplayValues;
|
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
var _utils = require("@teamix/utils");
|
8
|
-
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; }
|
9
|
-
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; }
|
10
|
-
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; }
|
11
|
-
var useInitialRequest = function useInitialRequest(initialRequest, context) {
|
12
|
-
return (0, _utils.doCommonRequest)(_objectSpread({
|
13
|
-
method: 'GET'
|
14
|
-
}, initialRequest), context);
|
15
|
-
};
|
16
|
-
var _default = useInitialRequest;
|
17
|
-
exports.default = _default;
|
@@ -1,21 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
var _componentMap;
|
8
|
-
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; }
|
9
|
-
/**
|
10
|
-
* Formily组件在ProForm的别名
|
11
|
-
*/
|
12
|
-
var componentMap = (_componentMap = {
|
13
|
-
FormFlex: 'Space'
|
14
|
-
}, _defineProperty(_componentMap, 'Editable.Dialog', 'EditableDialog'), _defineProperty(_componentMap, 'Editable.Drawer', 'EditableDrawer'), _defineProperty(_componentMap, 'Editable.Popover', 'EditablePopover'), _defineProperty(_componentMap, 'FormDrawer.Footer', 'FormDrawerFooter'), _defineProperty(_componentMap, 'FormDialog.Footer', 'FormDialogFooter'), _componentMap);
|
15
|
-
var _default = function _default(component) {
|
16
|
-
if (componentMap[component]) {
|
17
|
-
return componentMap[component];
|
18
|
-
}
|
19
|
-
return component;
|
20
|
-
};
|
21
|
-
exports.default = _default;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
var _fieldTypeMap = _interopRequireDefault(require("../fieldTypeMap"));
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
10
|
-
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."); }
|
11
|
-
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); }
|
12
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
13
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
14
|
-
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; }
|
15
|
-
var _default = function _default(decorator, component) {
|
16
|
-
if (decorator !== undefined) {
|
17
|
-
return decorator;
|
18
|
-
}
|
19
|
-
if ([].concat(_toConsumableArray(Object.keys(_fieldTypeMap.default)), ['Upload', 'SelectTable', 'ArrayCards', 'ArrayCollapse', 'ArrayTable', 'ArrayItems']).includes(component)) {
|
20
|
-
return 'FormItem';
|
21
|
-
}
|
22
|
-
return decorator;
|
23
|
-
};
|
24
|
-
exports.default = _default;
|
@@ -1,59 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
var _typeMap;
|
8
|
-
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; }
|
9
|
-
/**
|
10
|
-
* 组件的默认type类型,未指定类型为void
|
11
|
-
*/
|
12
|
-
var typeMap = (_typeMap = {
|
13
|
-
Input: 'string',
|
14
|
-
Password: 'string',
|
15
|
-
TextArea: 'string',
|
16
|
-
NumberPicker: 'number',
|
17
|
-
Percent: 'number',
|
18
|
-
Money: 'number',
|
19
|
-
Select: 'string',
|
20
|
-
MenuSelect: 'string',
|
21
|
-
MultipleSelect: 'array',
|
22
|
-
TreeSelect: 'string',
|
23
|
-
Cascader: 'string',
|
24
|
-
MultipleCascader: 'array',
|
25
|
-
ArbitraryCascader: 'string',
|
26
|
-
Radio: 'string',
|
27
|
-
Checkbox: 'boolean',
|
28
|
-
Switch: 'boolean',
|
29
|
-
DatePicker: 'string',
|
30
|
-
TimePicker: 'string',
|
31
|
-
DateTimePicker: 'string',
|
32
|
-
WeekPicker: 'string',
|
33
|
-
MonthPicker: 'string',
|
34
|
-
YearPicker: 'string',
|
35
|
-
QuarterPicker: 'string',
|
36
|
-
DateRangePicker: 'array',
|
37
|
-
TimeRangePicker: 'array',
|
38
|
-
DateTimeRangePicker: 'array',
|
39
|
-
WeekRangePicker: 'array',
|
40
|
-
MonthRangePicker: 'array',
|
41
|
-
YearRangePicker: 'array',
|
42
|
-
QuarterRangePicker: 'array',
|
43
|
-
Transfer: 'array',
|
44
|
-
Upload: 'object',
|
45
|
-
ColorPicker: 'string',
|
46
|
-
ColorRadio: 'string',
|
47
|
-
IconPicker: 'string',
|
48
|
-
JsonInput: 'object',
|
49
|
-
TagPicker: 'string',
|
50
|
-
MultipleTagPicker: 'array',
|
51
|
-
Range: 'string',
|
52
|
-
Search: 'array',
|
53
|
-
SelectGroup: 'array',
|
54
|
-
SelectTable: 'array'
|
55
|
-
}, _defineProperty(_typeMap, 'SelectTable.Column', 'string'), _defineProperty(_typeMap, "ArrayCollapse", 'array'), _defineProperty(_typeMap, "ArrayCards", 'array'), _defineProperty(_typeMap, "ArrayTable", 'array'), _defineProperty(_typeMap, "ArrayItems", 'array'), _defineProperty(_typeMap, 'Editable.Popover', 'object'), _defineProperty(_typeMap, 'Editable.Dialog', 'object'), _defineProperty(_typeMap, 'Editable.Drawer', 'object'), _typeMap);
|
56
|
-
var _default = function _default(type, component) {
|
57
|
-
return type || typeMap[component] || 'void';
|
58
|
-
};
|
59
|
-
exports.default = _default;
|
@@ -1,220 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.default = void 0;
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
9
|
-
var _react2 = require("@formily/react");
|
10
|
-
var _utils = require("@teamix/utils");
|
11
|
-
var _adapterType = _interopRequireDefault(require("./adapterType"));
|
12
|
-
var _adapterComponent = _interopRequireDefault(require("./adapterComponent"));
|
13
|
-
var _adapterDecorator = _interopRequireDefault(require("./adapterDecorator"));
|
14
|
-
var _initializeRequest2 = _interopRequireDefault(require("./initializeRequest"));
|
15
|
-
var _initializeReactions = _interopRequireDefault(require("./initializeReactions"));
|
16
|
-
var _initializeDataSource2 = _interopRequireDefault(require("./initializeDataSource"));
|
17
|
-
var _initializeRules2 = _interopRequireDefault(require("./initializeRules"));
|
18
|
-
var _initializeArrayCards = _interopRequireDefault(require("./initializeArrayCards"));
|
19
|
-
var _initializeArrayCollapse = _interopRequireDefault(require("./initializeArrayCollapse"));
|
20
|
-
var _initializeArrayTable = _interopRequireDefault(require("./initializeArrayTable"));
|
21
|
-
var _initializeArrayItems = _interopRequireDefault(require("./initializeArrayItems"));
|
22
|
-
var _initializeFormButton = _interopRequireDefault(require("./initializeFormButton"));
|
23
|
-
var _initializeFormGroup = _interopRequireDefault(require("./initializeFormGroup"));
|
24
|
-
var _initializeFormStep = _interopRequireDefault(require("./initializeFormStep"));
|
25
|
-
var _initializeFormTab = _interopRequireDefault(require("./initializeFormTab"));
|
26
|
-
var _initializeFormCollapse = _interopRequireDefault(require("./initializeFormCollapse"));
|
27
|
-
var _initializeSelectTable = _interopRequireDefault(require("./initializeSelectTable"));
|
28
|
-
var _reactions = require("./reactions");
|
29
|
-
var _fieldTypeMap = _interopRequireDefault(require("../fieldTypeMap"));
|
30
|
-
var _utils2 = require("../utils");
|
31
|
-
var _warning = _interopRequireDefault(require("../warning"));
|
32
|
-
var _excluded = ["type", "name", "component", "props", "decorator", "decoratorProps", "dataSource", "reactions", "rules", "children", "items", "tooltip", "request", "data"];
|
33
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
34
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
35
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
36
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
37
|
-
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."); }
|
38
|
-
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; }
|
39
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
40
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
41
|
-
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."); }
|
42
|
-
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); }
|
43
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
44
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
45
|
-
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; }
|
46
|
-
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; }
|
47
|
-
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; }
|
48
|
-
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; }
|
49
|
-
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; }
|
50
|
-
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; }
|
51
|
-
var _default = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
52
|
-
var schema = _ref.schema,
|
53
|
-
scope = _ref.scope,
|
54
|
-
components = _ref.components;
|
55
|
-
var schemaScopeRef = (0, _react.useRef)({});
|
56
|
-
// 创建 SchemaField
|
57
|
-
var SchemaField = (0, _react.useMemo)(function () {
|
58
|
-
return (0, _react2.createSchemaField)();
|
59
|
-
}, []);
|
60
|
-
// 格式化 schema
|
61
|
-
var formatSchema = (0, _react.useCallback)(function (schema) {
|
62
|
-
var parentSuffix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
63
|
-
var schemaProperties = {};
|
64
|
-
schema === null || schema === void 0 ? void 0 : schema.forEach(function (item, index) {
|
65
|
-
var suffix = "".concat(parentSuffix).concat(index);
|
66
|
-
var newItem = (0, _warning.default)(item);
|
67
|
-
var _newItem = newItem,
|
68
|
-
originalComponent = _newItem.component;
|
69
|
-
// 根据component的不同,初始化为内置的item
|
70
|
-
if (originalComponent) {
|
71
|
-
if (Object.keys(_fieldTypeMap.default).includes(originalComponent)) {
|
72
|
-
// ProField接管组件
|
73
|
-
} else {
|
74
|
-
// 未接管组件,判断是否为Formily组件别名
|
75
|
-
newItem = _objectSpread(_objectSpread({}, newItem), {}, {
|
76
|
-
component: (0, _adapterComponent.default)(originalComponent)
|
77
|
-
});
|
78
|
-
}
|
79
|
-
// 初始化高级组件 - FormButtonGroup/Subimt/Reset
|
80
|
-
if (['FormButtonGroup', 'Submit', 'Reset'].includes(originalComponent)) {
|
81
|
-
newItem = (0, _initializeFormButton.default)(newItem);
|
82
|
-
}
|
83
|
-
// 初始化高级组件 - ArrayCards
|
84
|
-
if (['ArrayCards'].includes(originalComponent)) {
|
85
|
-
newItem = (0, _initializeArrayCards.default)(newItem);
|
86
|
-
}
|
87
|
-
// 初始化高级组件 - ArrayCollapse
|
88
|
-
if (['ArrayCollapse'].includes(originalComponent)) {
|
89
|
-
newItem = (0, _initializeArrayCollapse.default)(newItem);
|
90
|
-
}
|
91
|
-
// 初始化高级组件 - ArrayTable
|
92
|
-
if (['ArrayTable'].includes(originalComponent)) {
|
93
|
-
newItem = (0, _initializeArrayTable.default)(newItem);
|
94
|
-
}
|
95
|
-
// 初始化高级组件 - ArrayItems
|
96
|
-
if (['ArrayItems'].includes(originalComponent)) {
|
97
|
-
newItem = (0, _initializeArrayItems.default)(newItem);
|
98
|
-
}
|
99
|
-
// 初始化布局组件 - FormStep
|
100
|
-
if (['FormStep'].includes(originalComponent)) {
|
101
|
-
newItem = (0, _initializeFormStep.default)(newItem);
|
102
|
-
}
|
103
|
-
// 初始化布局组件 - FormGroup
|
104
|
-
if (['FormGroup'].includes(originalComponent)) {
|
105
|
-
newItem = (0, _initializeFormGroup.default)(newItem);
|
106
|
-
}
|
107
|
-
// 初始化布局组件 - FormTab
|
108
|
-
if (['FormTab'].includes(originalComponent)) {
|
109
|
-
newItem = (0, _initializeFormTab.default)(newItem);
|
110
|
-
}
|
111
|
-
// 初始化布局组件 - FormCollapse
|
112
|
-
if (['FormCollapse'].includes(originalComponent)) {
|
113
|
-
newItem = (0, _initializeFormCollapse.default)(newItem);
|
114
|
-
}
|
115
|
-
// 初始化选择表格 - SelectTable
|
116
|
-
if (['SelectTable'].includes(originalComponent)) {
|
117
|
-
newItem = (0, _initializeSelectTable.default)(newItem);
|
118
|
-
}
|
119
|
-
}
|
120
|
-
var _newItem2 = newItem,
|
121
|
-
type = _newItem2.type,
|
122
|
-
name = _newItem2.name,
|
123
|
-
component = _newItem2.component,
|
124
|
-
props = _newItem2.props,
|
125
|
-
decorator = _newItem2.decorator,
|
126
|
-
decoratorProps = _newItem2.decoratorProps,
|
127
|
-
dataSource = _newItem2.dataSource,
|
128
|
-
reactions = _newItem2.reactions,
|
129
|
-
rules = _newItem2.rules,
|
130
|
-
children = _newItem2.children,
|
131
|
-
items = _newItem2.items,
|
132
|
-
tooltip = _newItem2.tooltip,
|
133
|
-
request = _newItem2.request,
|
134
|
-
data = _newItem2.data,
|
135
|
-
otherProps = _objectWithoutProperties(_newItem2, _excluded);
|
136
|
-
// 默认字段名
|
137
|
-
var defaultName = !name ? (0, _utils2.getFieldName)(component === null || component === void 0 ? void 0 : component.replace(/\./g, ''), suffix) : name;
|
138
|
-
// 默认类型
|
139
|
-
var defaultType = (0, _adapterType.default)(type, originalComponent);
|
140
|
-
// 默认装饰组件
|
141
|
-
var defaultDecorator = (0, _adapterDecorator.default)(decorator, originalComponent);
|
142
|
-
// 默认装饰组件属性
|
143
|
-
var tooltipProps = tooltip ? {
|
144
|
-
tooltip: tooltip
|
145
|
-
} : {};
|
146
|
-
var defaultDecoratorProps = _objectSpread(_objectSpread({}, tooltipProps), decoratorProps);
|
147
|
-
// 初始化request
|
148
|
-
var _initializeRequest = (0, _initializeRequest2.default)(request, "".concat(suffix, "r")),
|
149
|
-
requestReactions = _initializeRequest.reactions,
|
150
|
-
requestScope = _initializeRequest.scope;
|
151
|
-
// 初始化dataSource
|
152
|
-
var _initializeDataSource = (0, _initializeDataSource2.default)(dataSource, "".concat(suffix, "d")),
|
153
|
-
defaultDataSource = _initializeDataSource.dataSource,
|
154
|
-
dataSourceReactions = _initializeDataSource.reactions,
|
155
|
-
dataSourceScope = _initializeDataSource.scope,
|
156
|
-
dataSourceData = _initializeDataSource.data,
|
157
|
-
dataSourceProps = _initializeDataSource.props;
|
158
|
-
// 初始化rules validator
|
159
|
-
var _initializeRules = (0, _initializeRules2.default)(rules, "".concat(suffix, "v")),
|
160
|
-
defaultRules = _initializeRules.rules,
|
161
|
-
rulesScope = _initializeRules.scope;
|
162
|
-
// 合并reactions,初始化reactions
|
163
|
-
var defaultReactions = (0, _initializeReactions.default)(reactions, [].concat(_toConsumableArray(requestReactions), _toConsumableArray(dataSourceReactions)));
|
164
|
-
// 合并scope
|
165
|
-
Object.entries(_objectSpread(_objectSpread(_objectSpread({}, requestScope), dataSourceScope), rulesScope)).map(function (_ref2) {
|
166
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
167
|
-
k = _ref3[0],
|
168
|
-
v = _ref3[1];
|
169
|
-
schemaScopeRef.current[k] = v;
|
170
|
-
});
|
171
|
-
// 合并字段属性
|
172
|
-
var defaultProps = _objectSpread(_objectSpread(_objectSpread({}, props), dataSourceProps), {}, {
|
173
|
-
className: (0, _utils.cls)(props === null || props === void 0 ? void 0 : props.className, dataSourceProps === null || dataSourceProps === void 0 ? void 0 : dataSourceProps.className)
|
174
|
-
});
|
175
|
-
var formatParam = (0, _utils2.mapSchemaName)(_objectSpread(_objectSpread({}, otherProps), {}, {
|
176
|
-
type: defaultType,
|
177
|
-
component: component,
|
178
|
-
props: defaultProps,
|
179
|
-
decorator: defaultDecorator,
|
180
|
-
decoratorProps: defaultDecoratorProps,
|
181
|
-
rules: defaultRules,
|
182
|
-
reactions: defaultReactions,
|
183
|
-
dataSource: defaultDataSource,
|
184
|
-
data: _objectSpread(_objectSpread(_objectSpread({}, data), dataSourceData), {}, {
|
185
|
-
__placeholder: true
|
186
|
-
})
|
187
|
-
}));
|
188
|
-
// 递归子组件
|
189
|
-
var recursiveProperties = (children === null || children === void 0 ? void 0 : children.length) ? {
|
190
|
-
properties: formatSchema(children, suffix)
|
191
|
-
} : {};
|
192
|
-
// 递归items(类似子组件,会先由各initialize方法格式化为固定形式,type不同不统一处理)
|
193
|
-
// 例如:[{ name: 'items', type: 'object', children: items }]
|
194
|
-
var recursiveItems = items ? formatSchema([items], suffix) : {};
|
195
|
-
// 配置组件属性
|
196
|
-
if ((0, _utils.isUsable)(item)) {
|
197
|
-
schemaProperties[defaultName] = _objectSpread(_objectSpread(_objectSpread({}, formatParam), recursiveProperties), recursiveItems);
|
198
|
-
}
|
199
|
-
});
|
200
|
-
return schemaProperties;
|
201
|
-
}, []);
|
202
|
-
var formilySchema = (0, _react.useMemo)(function () {
|
203
|
-
return {
|
204
|
-
type: 'object',
|
205
|
-
properties: formatSchema(schema)
|
206
|
-
};
|
207
|
-
}, [schema]);
|
208
|
-
var mergedScope = _objectSpread(_objectSpread({}, scope), {}, {
|
209
|
-
$request: _reactions.$request,
|
210
|
-
$common: _reactions.$common,
|
211
|
-
$dataSource: _reactions.$dataSource,
|
212
|
-
$validator: _reactions.$validator
|
213
|
-
}, schemaScopeRef.current);
|
214
|
-
return /*#__PURE__*/_react.default.createElement(SchemaField, {
|
215
|
-
schema: formilySchema,
|
216
|
-
components: components,
|
217
|
-
scope: mergedScope
|
218
|
-
});
|
219
|
-
});
|
220
|
-
exports.default = _default;
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
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; }
|
8
|
-
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; }
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
10
|
-
var initializeItems = function initializeItems(items) {
|
11
|
-
if (items) {
|
12
|
-
return _objectSpread(_objectSpread({}, items), {}, {
|
13
|
-
name: 'items'
|
14
|
-
});
|
15
|
-
}
|
16
|
-
return items;
|
17
|
-
};
|
18
|
-
var initialize = function initialize(item) {
|
19
|
-
var items = item.items;
|
20
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
21
|
-
items: items ? initializeItems(items) : {}
|
22
|
-
});
|
23
|
-
};
|
24
|
-
var _default = initialize;
|
25
|
-
exports.default = _default;
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
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; }
|
8
|
-
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; }
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
10
|
-
var initializeItems = function initializeItems(items) {
|
11
|
-
if (items) {
|
12
|
-
return _objectSpread(_objectSpread({}, items), {}, {
|
13
|
-
name: 'items'
|
14
|
-
});
|
15
|
-
}
|
16
|
-
return items;
|
17
|
-
};
|
18
|
-
var initialize = function initialize(item) {
|
19
|
-
var items = item.items;
|
20
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
21
|
-
items: items ? initializeItems(items) : {}
|
22
|
-
});
|
23
|
-
};
|
24
|
-
var _default = initialize;
|
25
|
-
exports.default = _default;
|