@teamix/pro 1.5.0 → 1.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/pro.css +1 -1
- package/dist/pro.js +39986 -40902
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +2 -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 +69 -97
- 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/useBindUrl.js +18 -43
- package/es/form/Filter/useSpecialProps.js +8 -12
- package/es/form/ProForm/addCascadeEffect.js +10 -32
- package/es/form/ProForm/customComponent.js +0 -5
- package/es/form/ProForm/index.js +26 -34
- 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 -8
- 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 +46 -74
- package/es/sidebar/components/tree/index.js +92 -130
- 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 +54 -83
- 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 +23 -31
- package/es/table/components/ToolBar/FilterColumnIcon.js +45 -91
- package/es/table/components/ToolBar/FullScreenIcon.js +2 -5
- 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 +20 -40
- package/es/table/index.js +237 -354
- 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 +67 -123
- 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/useBindUrl.js +18 -47
- package/lib/form/Filter/useSpecialProps.js +6 -13
- package/lib/form/ProForm/addCascadeEffect.js +10 -35
- package/lib/form/ProForm/customComponent.js +0 -8
- package/lib/form/ProForm/index.js +26 -57
- 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 +1 -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 +46 -86
- package/lib/sidebar/components/tree/index.js +92 -144
- 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 +54 -99
- 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 +23 -42
- package/lib/table/components/ToolBar/FilterColumnIcon.js +45 -103
- package/lib/table/components/ToolBar/FullScreenIcon.js +3 -12
- 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 +20 -56
- package/lib/table/index.js +238 -378
- 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/addCascadeEffect.d.ts +0 -2
- 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 -192
- 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 -141
- 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 -302
- 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/addCascadeEffect.d.ts +0 -2
- 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 -192
- 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 -141
- 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 -302
- 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
|
@@ -4,37 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _utils = require("@teamix/utils");
|
|
9
|
-
|
|
10
8
|
var _pureGenProColumnToColumn = _interopRequireDefault(require("../../table/utils/pureGenProColumnToColumn"));
|
|
11
|
-
|
|
12
9
|
var _excluded = ["name", "children", "props"];
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
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; }
|
|
17
|
-
|
|
18
12
|
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; }
|
|
19
|
-
|
|
20
13
|
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; }
|
|
21
|
-
|
|
22
14
|
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; }
|
|
23
|
-
|
|
24
15
|
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; }
|
|
25
|
-
|
|
26
16
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
-
|
|
28
17
|
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."); }
|
|
29
|
-
|
|
30
18
|
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); }
|
|
31
|
-
|
|
32
19
|
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; }
|
|
33
|
-
|
|
34
20
|
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; }
|
|
35
|
-
|
|
36
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
-
|
|
38
22
|
/**
|
|
39
23
|
* 将可被 ProForm 识别的上下文转换为仅被 ProTable 识别的上下文
|
|
40
24
|
* @param value
|
|
@@ -43,41 +27,33 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
43
27
|
var adapterContext = function adapterContext(value) {
|
|
44
28
|
if ((0, _utils.isStr)(value)) {
|
|
45
29
|
var contextReg = /^\{\{.*?\}\}$/;
|
|
46
|
-
|
|
47
30
|
if (contextReg.test(value)) {
|
|
48
31
|
return "\0".concat(value, "\0");
|
|
49
32
|
}
|
|
50
|
-
|
|
51
33
|
return value;
|
|
52
34
|
}
|
|
53
|
-
|
|
54
35
|
if ((0, _utils.isPlainObj)(value)) {
|
|
55
36
|
var temp = {};
|
|
56
37
|
Object.entries(value).forEach(function (_ref) {
|
|
57
38
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
39
|
+
key = _ref2[0],
|
|
40
|
+
val = _ref2[1];
|
|
61
41
|
temp[key] = adapterContext(val);
|
|
62
42
|
});
|
|
63
43
|
return temp;
|
|
64
44
|
}
|
|
65
|
-
|
|
66
45
|
if ((0, _utils.isArr)(value)) {
|
|
67
46
|
return value.map(function (item) {
|
|
68
47
|
return adapterContext(item);
|
|
69
48
|
});
|
|
70
49
|
}
|
|
71
|
-
|
|
72
50
|
return value;
|
|
73
51
|
};
|
|
74
|
-
|
|
75
52
|
var initializeTableColumn = function initializeTableColumn(item) {
|
|
76
53
|
var name = item.name,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
54
|
+
children = item.children,
|
|
55
|
+
props = item.props,
|
|
56
|
+
otherProps = _objectWithoutProperties(item, _excluded);
|
|
81
57
|
return {
|
|
82
58
|
name: name,
|
|
83
59
|
component: 'SelectTable.Column',
|
|
@@ -87,23 +63,19 @@ var initializeTableColumn = function initializeTableColumn(item) {
|
|
|
87
63
|
props: _objectSpread(_objectSpread({}, otherProps), props)
|
|
88
64
|
};
|
|
89
65
|
};
|
|
90
|
-
|
|
91
66
|
var initialize = function initialize(item) {
|
|
92
67
|
var _props$columns;
|
|
93
|
-
|
|
94
68
|
var _item$children = item.children,
|
|
95
|
-
|
|
96
|
-
|
|
69
|
+
children = _item$children === void 0 ? [] : _item$children,
|
|
70
|
+
props = item.props;
|
|
97
71
|
var prefixCls = (0, _utils.usePrefixCls)('teamix-pro-form-select-table-column-tree');
|
|
98
72
|
var columns = props === null || props === void 0 ? void 0 : (_props$columns = props.columns) === null || _props$columns === void 0 ? void 0 : _props$columns.map(function (value, index) {
|
|
99
73
|
var column = adapterContext(value);
|
|
100
|
-
|
|
101
74
|
if ((props === null || props === void 0 ? void 0 : props.isTree) && index === 0) {
|
|
102
75
|
return _objectSpread(_objectSpread({}, column), {}, {
|
|
103
76
|
className: (0, _utils.cls)(prefixCls(), column.className)
|
|
104
77
|
});
|
|
105
78
|
}
|
|
106
|
-
|
|
107
79
|
return column;
|
|
108
80
|
});
|
|
109
81
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -115,6 +87,5 @@ var initialize = function initialize(item) {
|
|
|
115
87
|
})
|
|
116
88
|
});
|
|
117
89
|
};
|
|
118
|
-
|
|
119
90
|
var _default = initialize;
|
|
120
91
|
exports.default = _default;
|
|
@@ -4,42 +4,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.$validator = exports.$request = exports.$dataSource = exports.$common = void 0;
|
|
7
|
-
|
|
8
7
|
var _utils = require("@teamix/utils");
|
|
9
|
-
|
|
10
8
|
var _excluded = ["extraConfig", "onComplete"];
|
|
11
|
-
|
|
12
9
|
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; }
|
|
13
|
-
|
|
14
10
|
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; }
|
|
15
|
-
|
|
16
11
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
|
|
18
12
|
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; }
|
|
19
|
-
|
|
20
13
|
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; }
|
|
21
|
-
|
|
22
14
|
// 配置请求
|
|
23
15
|
var $request = function $request(field, context, _ref, type) {
|
|
24
16
|
var _field$data;
|
|
25
|
-
|
|
26
17
|
var extraConfig = _ref.extraConfig,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
onComplete = _ref.onComplete,
|
|
19
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
20
|
var requestConfig = rest;
|
|
31
21
|
var params = requestConfig.params,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var beforeRequestResult = (0, _utils.isFn)(beforeRequest) ? beforeRequest(field, context) : {};
|
|
36
|
-
|
|
22
|
+
beforeRequest = requestConfig.beforeRequest,
|
|
23
|
+
formatResult = requestConfig.formatResult,
|
|
24
|
+
onSuccess = requestConfig.onSuccess;
|
|
25
|
+
var beforeRequestResult = (0, _utils.isFn)(beforeRequest) ? beforeRequest(field, context) : {};
|
|
26
|
+
// 通过字段 data 的 refresh 主动触发的请求刷新
|
|
37
27
|
var refresh = (_field$data = field.data) === null || _field$data === void 0 ? void 0 : _field$data.refresh;
|
|
38
|
-
var refreshResult = (0, _utils.isPlainObj)(refresh) ? refresh : {};
|
|
39
|
-
|
|
40
|
-
var mergedParams = _objectSpread(_objectSpread(_objectSpread({}, params), beforeRequestResult), refreshResult); // 执行通用数据请求
|
|
28
|
+
var refreshResult = (0, _utils.isPlainObj)(refresh) ? refresh : {};
|
|
41
29
|
|
|
30
|
+
// 合并请求参数
|
|
31
|
+
var mergedParams = _objectSpread(_objectSpread(_objectSpread({}, params), beforeRequestResult), refreshResult);
|
|
42
32
|
|
|
33
|
+
// 执行通用数据请求
|
|
43
34
|
return (0, _utils.doCommonRequest)(_objectSpread(_objectSpread({}, requestConfig), {}, {
|
|
44
35
|
params: mergedParams,
|
|
45
36
|
beforeRequest: function beforeRequest() {
|
|
@@ -55,24 +46,21 @@ var $request = function $request(field, context, _ref, type) {
|
|
|
55
46
|
field: field,
|
|
56
47
|
params: mergedParams
|
|
57
48
|
}));
|
|
58
|
-
};
|
|
59
|
-
|
|
49
|
+
};
|
|
60
50
|
|
|
51
|
+
// 通用请求配置上下文
|
|
61
52
|
exports.$request = $request;
|
|
62
|
-
|
|
63
53
|
var $common = function $common(services, context, requestConfig) {
|
|
64
54
|
return function (field) {
|
|
65
55
|
return services(field, context, requestConfig, 'request').then(function (res) {
|
|
66
56
|
var _requestConfig$onComp;
|
|
67
|
-
|
|
68
57
|
return requestConfig === null || requestConfig === void 0 ? void 0 : (_requestConfig$onComp = requestConfig.onComplete) === null || _requestConfig$onComp === void 0 ? void 0 : _requestConfig$onComp.call(requestConfig, res, field, context);
|
|
69
58
|
});
|
|
70
59
|
};
|
|
71
|
-
};
|
|
72
|
-
|
|
60
|
+
};
|
|
73
61
|
|
|
62
|
+
// 配置校验
|
|
74
63
|
exports.$common = $common;
|
|
75
|
-
|
|
76
64
|
var $validator = function $validator(services, context, requestConfig) {
|
|
77
65
|
return function (value, rules, _ref2) {
|
|
78
66
|
var field = _ref2.field;
|
|
@@ -84,11 +72,10 @@ var $validator = function $validator(services, context, requestConfig) {
|
|
|
84
72
|
}
|
|
85
73
|
});
|
|
86
74
|
};
|
|
87
|
-
};
|
|
88
|
-
|
|
75
|
+
};
|
|
89
76
|
|
|
77
|
+
// 配置DataSource
|
|
90
78
|
exports.$validator = $validator;
|
|
91
|
-
|
|
92
79
|
var $dataSource = function $dataSource(services, context, requestConfig) {
|
|
93
80
|
return function (field) {
|
|
94
81
|
field.setState({
|
|
@@ -96,7 +83,6 @@ var $dataSource = function $dataSource(services, context, requestConfig) {
|
|
|
96
83
|
});
|
|
97
84
|
return services(field, context, requestConfig, 'dataSource').then(function (res) {
|
|
98
85
|
var _requestConfig$extraC, _requestConfig$onComp2;
|
|
99
|
-
|
|
100
86
|
var isValueInDataSource = (0, _utils.getValueByValue)(res, field.value);
|
|
101
87
|
var clearResult = !isValueInDataSource && (requestConfig === null || requestConfig === void 0 ? void 0 : (_requestConfig$extraC = requestConfig.extraConfig) === null || _requestConfig$extraC === void 0 ? void 0 : _requestConfig$extraC.clearInvalidValue) !== false ? {
|
|
102
88
|
value: undefined
|
|
@@ -113,5 +99,4 @@ var $dataSource = function $dataSource(services, context, requestConfig) {
|
|
|
113
99
|
});
|
|
114
100
|
};
|
|
115
101
|
};
|
|
116
|
-
|
|
117
102
|
exports.$dataSource = $dataSource;
|
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ActionResponse = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
require("./ActionResponse.less");
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
var ActionResponse = function ActionResponse(props) {
|
|
15
11
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
16
12
|
className: "as-wrapper"
|
|
@@ -20,5 +16,4 @@ var ActionResponse = function ActionResponse(props) {
|
|
|
20
16
|
className: "as-response"
|
|
21
17
|
}, "Response\uFF1A", props.response));
|
|
22
18
|
};
|
|
23
|
-
|
|
24
19
|
exports.ActionResponse = ActionResponse;
|
package/lib/form/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -131,9 +130,7 @@ Object.defineProperty(exports, "useForm", {
|
|
|
131
130
|
return originalFormilyReact.useForm;
|
|
132
131
|
}
|
|
133
132
|
});
|
|
134
|
-
|
|
135
133
|
var _typing = require("./typing");
|
|
136
|
-
|
|
137
134
|
Object.keys(_typing).forEach(function (key) {
|
|
138
135
|
if (key === "default" || key === "__esModule") return;
|
|
139
136
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -145,52 +142,30 @@ Object.keys(_typing).forEach(function (key) {
|
|
|
145
142
|
}
|
|
146
143
|
});
|
|
147
144
|
});
|
|
148
|
-
|
|
149
145
|
var _formilyCore = _interopRequireWildcard(require("@formily/core"));
|
|
150
|
-
|
|
151
146
|
exports.formilyCore = _formilyCore;
|
|
152
|
-
|
|
153
147
|
var _formilyReactive = _interopRequireWildcard(require("@formily/reactive"));
|
|
154
|
-
|
|
155
148
|
exports.formilyReactive = _formilyReactive;
|
|
156
|
-
|
|
157
149
|
var _formilyTeamix = _interopRequireWildcard(require("@teamix/formily"));
|
|
158
|
-
|
|
159
150
|
exports.formilyTeamix = _formilyTeamix;
|
|
160
|
-
|
|
161
151
|
var originalFormilyReact = _interopRequireWildcard(require("@formily/react"));
|
|
162
|
-
|
|
163
152
|
var _useFormDisplayValues = require("./ProForm/useFormDisplayValues");
|
|
164
|
-
|
|
165
153
|
var _useFieldRequest = _interopRequireDefault(require("./ProForm/useFieldRequest"));
|
|
166
|
-
|
|
167
154
|
var _customComponent = require("./ProForm/customComponent");
|
|
168
|
-
|
|
169
155
|
var _Filter = require("./Filter");
|
|
170
|
-
|
|
171
156
|
var _Layout = require("./Filter/Layout");
|
|
172
|
-
|
|
173
157
|
var _index = require("./Filter/index2");
|
|
174
|
-
|
|
175
158
|
var _ProForm = _interopRequireDefault(require("./ProForm"));
|
|
176
|
-
|
|
177
159
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
178
|
-
|
|
179
160
|
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); }
|
|
180
|
-
|
|
181
161
|
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; }
|
|
182
|
-
|
|
183
162
|
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; }
|
|
184
|
-
|
|
185
163
|
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; }
|
|
186
|
-
|
|
187
164
|
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; }
|
|
188
|
-
|
|
189
165
|
var formilyReact = _objectSpread(_objectSpread({}, originalFormilyReact), {}, {
|
|
190
166
|
useFieldRequest: _useFieldRequest.default,
|
|
191
167
|
useFormDisplayValues: _useFormDisplayValues.useFormDisplayValues
|
|
192
168
|
});
|
|
193
|
-
|
|
194
169
|
exports.formilyReact = formilyReact;
|
|
195
170
|
var _default = _ProForm.default;
|
|
196
171
|
exports.default = _default;
|
package/lib/form/typing.js
CHANGED
package/lib/form/utils.js
CHANGED
|
@@ -4,43 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.mergeArrayValue = exports.mapStatus = exports.mapSize = exports.mapSchemaName = exports.mapMode = exports.mapDataSource = exports.initializeRequestExpression = exports.getFieldName = void 0;
|
|
7
|
-
|
|
8
7
|
var _core = require("@formily/core");
|
|
9
|
-
|
|
10
8
|
var _formily = require("@teamix/formily");
|
|
11
|
-
|
|
12
9
|
var _utils = require("@teamix/utils");
|
|
13
|
-
|
|
14
10
|
var _schemaNameMap = _interopRequireDefault(require("./schemaNameMap"));
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
12
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
|
-
|
|
20
13
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
|
-
|
|
22
14
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
23
|
-
|
|
24
15
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
25
|
-
|
|
26
16
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
-
|
|
28
17
|
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."); }
|
|
29
|
-
|
|
30
18
|
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); }
|
|
31
|
-
|
|
32
19
|
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; }
|
|
33
|
-
|
|
34
20
|
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; }
|
|
35
|
-
|
|
36
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
-
|
|
38
22
|
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; }
|
|
39
|
-
|
|
40
23
|
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; }
|
|
41
|
-
|
|
42
24
|
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; }
|
|
43
|
-
|
|
44
25
|
/**
|
|
45
26
|
* 映射字段size,主要是default转medium
|
|
46
27
|
* @param props component的props
|
|
@@ -49,125 +30,105 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
49
30
|
*/
|
|
50
31
|
var mapSize = function mapSize(props, field) {
|
|
51
32
|
var layout = _objectSpread(_objectSpread({}, (0, _formily.useFormShallowLayout)()), (0, _formily.useFormLayout)());
|
|
52
|
-
|
|
53
33
|
var takeSize = function takeSize() {
|
|
54
34
|
return layout.size === 'default' ? 'medium' : layout.size;
|
|
55
35
|
};
|
|
56
|
-
|
|
57
36
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
58
37
|
size: props.size || takeSize()
|
|
59
38
|
});
|
|
60
39
|
};
|
|
40
|
+
|
|
61
41
|
/**
|
|
62
42
|
* 映射字段state
|
|
63
43
|
* @param props component的props
|
|
64
44
|
* @param field 当前字段实例
|
|
65
45
|
* @returns 映射后的字段属性
|
|
66
46
|
*/
|
|
67
|
-
|
|
68
|
-
|
|
69
47
|
exports.mapSize = mapSize;
|
|
70
|
-
|
|
71
48
|
var mapStatus = function mapStatus(props, field) {
|
|
72
49
|
var _field$data;
|
|
73
|
-
|
|
74
50
|
var takeStatus = function takeStatus() {
|
|
75
51
|
var _field$warnings, _field$decoratorProps, _field$decoratorProps2;
|
|
76
|
-
|
|
77
52
|
if (!field) return;
|
|
78
53
|
if (field['loading'] || field['validating']) return 'loading';
|
|
79
54
|
if (field['invalid']) return 'error';
|
|
80
55
|
if ((_field$warnings = field['warnings']) === null || _field$warnings === void 0 ? void 0 : _field$warnings.length) return 'warning';
|
|
81
56
|
if (((_field$decoratorProps = field.decoratorProps) === null || _field$decoratorProps === void 0 ? void 0 : _field$decoratorProps.feedbackStatus) === 'pending') return 'loading'; // 新增
|
|
82
|
-
|
|
83
57
|
return (_field$decoratorProps2 = field.decoratorProps) === null || _field$decoratorProps2 === void 0 ? void 0 : _field$decoratorProps2.feedbackStatus;
|
|
84
58
|
};
|
|
85
|
-
|
|
86
59
|
var takeState = function takeState(state) {
|
|
87
60
|
if (state === 'validating' || state === 'pending') return 'loading';
|
|
88
61
|
return state;
|
|
89
62
|
};
|
|
90
|
-
|
|
91
63
|
var state = takeState(props.state) || takeStatus();
|
|
92
64
|
var result = {
|
|
93
65
|
state: state
|
|
94
|
-
};
|
|
95
|
-
|
|
66
|
+
};
|
|
67
|
+
// 当组件处于loading状态时,仅可读不可写。
|
|
96
68
|
if (state === 'loading' && ((_field$data = field.data) === null || _field$data === void 0 ? void 0 : _field$data.readOnlyOnLoading)) {
|
|
97
69
|
result.readOnly = true;
|
|
98
70
|
}
|
|
99
|
-
|
|
100
71
|
return _objectSpread(_objectSpread({}, props), result);
|
|
101
72
|
};
|
|
102
|
-
|
|
103
73
|
exports.mapStatus = mapStatus;
|
|
104
|
-
|
|
105
74
|
var patchDataSource = function patchDataSource() {
|
|
106
75
|
var dataSource = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
107
|
-
|
|
108
76
|
var removeEmptyChildren = function removeEmptyChildren(data) {
|
|
109
77
|
var result = _objectSpread({}, data);
|
|
110
|
-
|
|
111
78
|
if (!result.children || result.children.length === 0) {
|
|
112
79
|
delete result.children;
|
|
113
80
|
} else {
|
|
114
81
|
result.children = result.children.map(removeEmptyChildren);
|
|
115
82
|
}
|
|
116
|
-
|
|
117
83
|
return result;
|
|
118
84
|
};
|
|
119
|
-
|
|
120
85
|
return (0, _utils.isArr)(dataSource) ? dataSource.map(removeEmptyChildren) : [];
|
|
121
86
|
};
|
|
122
|
-
|
|
123
87
|
var mapDataSource = function mapDataSource(props, field) {
|
|
124
88
|
var _props$dataSource;
|
|
125
|
-
|
|
126
89
|
if ((0, _core.isVoidField)(field)) {
|
|
127
90
|
return props;
|
|
128
91
|
}
|
|
129
|
-
|
|
130
92
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
131
93
|
dataSource: patchDataSource((_props$dataSource = props.dataSource) !== null && _props$dataSource !== void 0 ? _props$dataSource : field === null || field === void 0 ? void 0 : field.dataSource)
|
|
132
94
|
});
|
|
133
95
|
};
|
|
134
|
-
|
|
135
96
|
exports.mapDataSource = mapDataSource;
|
|
136
|
-
|
|
137
97
|
var mapMode = function mapMode(props, field) {
|
|
138
98
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
139
99
|
mode: (field === null || field === void 0 ? void 0 : field.readPretty) ? 'read' : 'edit'
|
|
140
100
|
});
|
|
141
101
|
};
|
|
142
102
|
|
|
103
|
+
/**
|
|
104
|
+
* 创建字段名称
|
|
105
|
+
* @param prefix 字段名称前缀,接收字段component名称,默认为FieldName
|
|
106
|
+
* @param suffix 字段后缀,唯一标识
|
|
107
|
+
* @returns 字段唯一名称
|
|
108
|
+
*/
|
|
143
109
|
exports.mapMode = mapMode;
|
|
144
|
-
|
|
145
110
|
var getFieldName = function getFieldName() {
|
|
146
111
|
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'FieldName';
|
|
147
112
|
var suffix = arguments.length > 1 ? arguments[1] : undefined;
|
|
148
113
|
return "".concat(prefix, "-").concat(suffix);
|
|
149
114
|
};
|
|
115
|
+
|
|
150
116
|
/**
|
|
151
117
|
* 将ProForm的key映射为formily的key,然后筛除掉无效的key/value
|
|
152
118
|
* @param obj
|
|
153
119
|
* @returns
|
|
154
120
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
121
|
exports.getFieldName = getFieldName;
|
|
158
|
-
|
|
159
122
|
var mapSchemaName = function mapSchemaName(obj) {
|
|
160
123
|
var temp = {};
|
|
161
124
|
Object.entries(obj).map(function (_ref) {
|
|
162
125
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
126
|
+
key = _ref2[0],
|
|
127
|
+
value = _ref2[1];
|
|
166
128
|
var newKey = (0, _utils.getValueByValue)(_schemaNameMap.default, key, {
|
|
167
129
|
inputKey: 'proForm',
|
|
168
130
|
outputKey: 'formily'
|
|
169
131
|
}) || key;
|
|
170
|
-
|
|
171
132
|
if (value !== undefined && value !== null) {
|
|
172
133
|
if ((0, _utils.isArr)(value)) {
|
|
173
134
|
if (value.length) {
|
|
@@ -184,33 +145,28 @@ var mapSchemaName = function mapSchemaName(obj) {
|
|
|
184
145
|
});
|
|
185
146
|
return temp;
|
|
186
147
|
};
|
|
148
|
+
|
|
187
149
|
/**
|
|
188
150
|
* 合并数组或非数组,不移除无效值
|
|
189
151
|
* @param arr 数组
|
|
190
152
|
* @param v 数组或其他
|
|
191
153
|
* @returns 合并数组或合并其他值
|
|
192
154
|
*/
|
|
193
|
-
|
|
194
|
-
|
|
195
155
|
exports.mapSchemaName = mapSchemaName;
|
|
196
|
-
|
|
197
156
|
var mergeArrayValue = function mergeArrayValue(arr, v) {
|
|
198
157
|
if ((0, _utils.isArr)(v)) {
|
|
199
158
|
return [].concat(_toConsumableArray(arr), _toConsumableArray(v));
|
|
200
159
|
}
|
|
201
|
-
|
|
202
160
|
return [].concat(_toConsumableArray(arr), [v]);
|
|
203
161
|
};
|
|
162
|
+
|
|
204
163
|
/**
|
|
205
164
|
* 初始化请求配置为表达式
|
|
206
165
|
* @param config 请求配置
|
|
207
166
|
* @param suffix scope名称后缀
|
|
208
167
|
* @returns 表达式和scope上下文
|
|
209
168
|
*/
|
|
210
|
-
|
|
211
|
-
|
|
212
169
|
exports.mergeArrayValue = mergeArrayValue;
|
|
213
|
-
|
|
214
170
|
var initializeRequestExpression = function initializeRequestExpression(config, mode, suffix) {
|
|
215
171
|
if ((0, _utils.isPlainObj)(config)) {
|
|
216
172
|
var requestConfigName = "$requestConfig_".concat(suffix);
|
|
@@ -219,8 +175,6 @@ var initializeRequestExpression = function initializeRequestExpression(config, m
|
|
|
219
175
|
scope: _defineProperty({}, requestConfigName, config)
|
|
220
176
|
};
|
|
221
177
|
}
|
|
222
|
-
|
|
223
178
|
return {};
|
|
224
179
|
};
|
|
225
|
-
|
|
226
180
|
exports.initializeRequestExpression = initializeRequestExpression;
|
package/lib/form/warning.js
CHANGED
|
@@ -4,21 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
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; }
|
|
9
|
-
|
|
10
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; }
|
|
11
|
-
|
|
12
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; }
|
|
13
|
-
|
|
14
10
|
var warning = function warning(item) {
|
|
15
|
-
var newItem = _objectSpread({}, item);
|
|
11
|
+
var newItem = _objectSpread({}, item);
|
|
12
|
+
|
|
13
|
+
// if (xxx) {
|
|
16
14
|
// console.warn('xxx');
|
|
17
15
|
// }
|
|
18
16
|
|
|
19
|
-
|
|
20
17
|
return newItem;
|
|
21
18
|
};
|
|
22
|
-
|
|
23
19
|
var _default = warning;
|
|
24
20
|
exports.default = _default;
|
package/lib/hooks/index.js
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var hooks = _interopRequireWildcard(require("@teamix/hooks"));
|
|
11
|
-
|
|
12
9
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
|
|
14
10
|
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; }
|
|
15
|
-
|
|
16
11
|
var _default = hooks;
|
|
17
12
|
exports.default = _default;
|