@teamix/pro 1.5.0-beta.1 → 1.5.1-aplha.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/dist/pro.css +1 -1
- package/dist/pro.js +84670 -60159
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +11 -0
- package/es/actions/dialog-component.js +1 -7
- package/es/actions/dialog-form.js +5 -3
- package/es/actions/dialog.js +1 -1
- package/es/actions/index.js +66 -32
- package/es/actions/request.js +2 -2
- package/es/card/card-container.js +9 -9
- package/es/card/divider.js +2 -6
- package/es/card/index.js +16 -10
- package/es/card/selectable.js +2 -6
- package/es/card/tab.js +2 -6
- package/es/form/Components/Editable/index.js +1 -1
- package/es/form/Components/FormGroup/index.js +5 -3
- package/es/form/Components/LightFilter/index.js +8 -2
- package/es/form/Components/ProField/index.js +2 -6
- package/es/form/Components/Text/index.js +2 -6
- package/es/form/Filter/AdvancedFilter.js +18 -15
- package/es/form/Filter/LightFilter.js +13 -10
- package/es/form/Filter/SimpleFilter.js +10 -6
- package/es/form/Filter/index.js +7 -10
- package/es/form/Filter/index2.js +21 -17
- package/es/form/Filter/layout.scss +1 -1
- package/es/form/ProForm/addCascadeEffect.js +225 -0
- package/es/form/ProForm/index.js +12 -7
- package/es/form/ProForm/useFormDisplayValues.js +1 -1
- package/es/form/SchemaForm/reactions.js +2 -1
- package/es/form/utils.js +8 -1
- package/es/index.js +2 -1
- package/es/info/components/InfoGroup/index.js +2 -6
- package/es/info/components/InfoValueItem/index.js +23 -21
- package/es/info/components/tableInfo/index.js +5 -4
- package/es/info/index.js +8 -5
- package/es/nocode/index.js +2 -2
- package/es/nocode/pages/index.js +4 -3
- package/es/nocode/pages/playground.js +3 -7
- package/es/nocode/pages/renderer.js +4 -8
- package/es/nocode/playground.js +2 -6
- package/es/page-header/index.js +12 -7
- package/es/sidebar/components/sidebar-container/index.js +23 -11
- package/es/sidebar/components/sidebar-container/index.scss +21 -14
- package/es/sidebar/components/tree/index.js +26 -12
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +2 -6
- package/es/sidebar/components/tree-node/components/IconAction/index.js +4 -2
- package/es/sidebar/components/tree-node/index.js +22 -19
- package/es/sidebar/index.js +3 -5
- package/es/sidebar/utils/index.js +11 -11
- package/es/table/components/Layout/index.js +14 -10
- package/es/table/components/Pagination/index.js +10 -14
- package/es/table/components/QuickAction/index.js +4 -2
- package/es/table/components/ToolBar/DensityIcon.js +3 -3
- package/es/table/components/ToolBar/FilterColumnIcon.js +2 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +6 -57
- package/es/table/components/ToolBar/RefreshIcon.js +2 -1
- package/es/table/components/ToolBar/index.js +98 -19
- package/es/table/components/ToolBar/index.scss +22 -2
- package/es/table/index.js +38 -28
- package/es/table/utils/columnRender.js +27 -25
- package/es/table/utils/genProColumnToColumn.js +1 -1
- package/es/table/utils/index.js +2 -2
- package/es/table/utils/pureColumnRender.js +4 -2
- package/es/table/utils/pureGenProColumnToColumn.js +1 -1
- package/es/templates/List/index.js +4 -8
- package/es/templates/index.js +2 -1
- package/es/timeline/ProTimeLineItem/index.js +2 -6
- package/es/timeline/index.js +3 -7
- package/es/utils/message.js +3 -7
- package/lib/actions/dialog-component.js +1 -7
- package/lib/actions/dialog-form.js +5 -3
- package/lib/actions/dialog.js +1 -1
- package/lib/actions/index.js +65 -32
- package/lib/card/card-container.js +5 -7
- package/lib/card/divider.js +2 -6
- package/lib/card/index.js +16 -9
- package/lib/card/selectable.js +2 -6
- package/lib/card/tab.js +2 -6
- package/lib/form/Components/Editable/index.js +1 -1
- package/lib/form/Components/FormGroup/index.js +5 -3
- package/lib/form/Components/LightFilter/index.js +8 -2
- package/lib/form/Components/ProField/index.js +2 -6
- package/lib/form/Components/Text/index.js +2 -6
- package/lib/form/Filter/AdvancedFilter.js +17 -14
- package/lib/form/Filter/LightFilter.js +12 -9
- package/lib/form/Filter/SimpleFilter.js +8 -5
- package/lib/form/Filter/index.js +6 -9
- package/lib/form/Filter/index2.js +21 -17
- package/lib/form/Filter/layout.scss +1 -1
- package/lib/form/ProForm/addCascadeEffect.js +235 -0
- package/lib/form/ProForm/index.js +13 -7
- package/lib/form/typing.js +1 -5
- package/lib/form/utils.js +7 -0
- package/lib/index.js +2 -1
- package/lib/info/components/InfoGroup/index.js +2 -6
- package/lib/info/components/InfoValueItem/index.js +23 -21
- package/lib/info/components/tableInfo/index.js +5 -4
- package/lib/info/index.js +8 -5
- package/lib/info/typing.js +1 -5
- package/lib/nocode/pages/index.js +2 -2
- package/lib/nocode/pages/playground.js +3 -7
- package/lib/nocode/pages/renderer.js +4 -8
- package/lib/nocode/playground.js +2 -6
- package/lib/page-header/index.js +12 -6
- package/lib/sidebar/components/sidebar-container/index.js +23 -11
- package/lib/sidebar/components/sidebar-container/index.scss +21 -14
- package/lib/sidebar/components/tree/index.js +26 -12
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +2 -6
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +4 -2
- package/lib/sidebar/components/tree-node/index.js +22 -19
- package/lib/sidebar/index.js +3 -5
- package/lib/sidebar/typing.js +1 -5
- package/lib/sidebar/utils/index.js +11 -11
- package/lib/table/components/Layout/index.js +15 -11
- package/lib/table/components/Pagination/index.js +10 -14
- package/lib/table/components/QuickAction/index.js +4 -2
- package/lib/table/components/ToolBar/DensityIcon.js +3 -3
- package/lib/table/components/ToolBar/FilterColumnIcon.js +2 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +9 -63
- package/lib/table/components/ToolBar/RefreshIcon.js +2 -1
- package/lib/table/components/ToolBar/index.js +107 -18
- package/lib/table/components/ToolBar/index.scss +22 -2
- package/lib/table/index.js +39 -29
- package/lib/table/typing.js +1 -5
- package/lib/table/utils/columnRender.js +27 -25
- package/lib/table/utils/pureColumnRender.js +3 -1
- package/lib/templates/List/index.js +4 -8
- package/lib/timeline/ProTimeLineItem/index.js +2 -6
- package/lib/timeline/index.js +3 -7
- package/lib/timeline/typing.js +1 -5
- package/lib/utils/message.js +3 -7
- package/package.json +1 -1
- package/es/actions/base.d.ts +0 -24
- package/es/actions/confirm.d.ts +0 -7
- package/es/actions/danger-confirm.d.ts +0 -7
- package/es/actions/danger-pop-confirm.d.ts +0 -5
- package/es/actions/dialog-component.d.ts +0 -10
- package/es/actions/dialog-form.d.ts +0 -29
- package/es/actions/dialog-info.d.ts +0 -9
- package/es/actions/dialog-table.d.ts +0 -9
- package/es/actions/dialog.d.ts +0 -40
- package/es/actions/drawer-form.d.ts +0 -6
- package/es/actions/drawer-info.d.ts +0 -6
- package/es/actions/drawer-table.d.ts +0 -6
- package/es/actions/drawer.d.ts +0 -6
- package/es/actions/error.d.ts +0 -7
- package/es/actions/index.d.ts +0 -107
- package/es/actions/link.d.ts +0 -8
- package/es/actions/notice.d.ts +0 -7
- package/es/actions/pop-confirm.d.ts +0 -9
- package/es/actions/request.d.ts +0 -9
- package/es/actions/utils.d.ts +0 -1
- package/es/card/card-container.d.ts +0 -18
- package/es/card/divider.d.ts +0 -6
- package/es/card/index.d.ts +0 -109
- package/es/card/selectable.d.ts +0 -13
- package/es/card/tab.d.ts +0 -6
- package/es/card/utils.d.ts +0 -9
- package/es/field/index.d.ts +0 -3
- package/es/form/Components/Editable/index.d.ts +0 -20
- package/es/form/Components/FormGroup/index.d.ts +0 -13
- package/es/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/es/form/Components/LightFilter/index.d.ts +0 -17
- package/es/form/Components/ProField/index.d.ts +0 -2
- package/es/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/es/form/Components/Text/index.d.ts +0 -7
- package/es/form/Filter/AdvancedFilter.d.ts +0 -7
- package/es/form/Filter/Layout.d.ts +0 -5
- package/es/form/Filter/LightFilter.d.ts +0 -7
- package/es/form/Filter/SimpleFilter.d.ts +0 -7
- package/es/form/Filter/index.d.ts +0 -9
- package/es/form/Filter/index2.d.ts +0 -13
- package/es/form/Filter/useBindUrl.d.ts +0 -2
- package/es/form/Filter/useSpecialProps.d.ts +0 -6
- package/es/form/ProForm/customComponent.d.ts +0 -3
- package/es/form/ProForm/index.d.ts +0 -5
- package/es/form/ProForm/useAutoLayout.d.ts +0 -9
- package/es/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/es/form/ProForm/useFieldRequest.d.ts +0 -5
- package/es/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/es/form/ProForm/useInitialRequest.d.ts +0 -6
- package/es/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/es/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/es/form/SchemaForm/adapterType.d.ts +0 -5
- package/es/form/SchemaForm/index.d.ts +0 -4
- package/es/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/es/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/es/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/es/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/es/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/es/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/es/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/es/form/SchemaForm/initializeRules.d.ts +0 -11
- package/es/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/es/form/SchemaForm/reactions.d.ts +0 -6
- package/es/form/docs/ActionResponse.d.ts +0 -7
- package/es/form/fieldTypeMap.d.ts +0 -7
- package/es/form/index.d.ts +0 -125
- package/es/form/locales/validate.d.ts +0 -159
- package/es/form/schemaNameMap.d.ts +0 -5
- package/es/form/typing.d.ts +0 -172
- package/es/form/utils.d.ts +0 -55
- package/es/form/warning.d.ts +0 -3
- package/es/hooks/index.d.ts +0 -2
- package/es/index-without-icon.d.ts +0 -32
- package/es/index.d.ts +0 -32
- package/es/info/components/InfoGroup/index.d.ts +0 -5
- package/es/info/components/InfoValueItem/index.d.ts +0 -5
- package/es/info/components/ProInfoItem/index.d.ts +0 -5
- package/es/info/components/baseInfo/index.d.ts +0 -8
- package/es/info/components/headerInfo/index.d.ts +0 -8
- package/es/info/components/tableInfo/index.d.ts +0 -7
- package/es/info/index.d.ts +0 -10
- package/es/info/typing.d.ts +0 -218
- package/es/info/utils/index.d.ts +0 -20
- package/es/info/utils/layout.d.ts +0 -2
- package/es/info/utils/utils.d.ts +0 -1
- package/es/layout/index.d.ts +0 -2
- package/es/nocode/configurators/Card.d.ts +0 -3
- package/es/nocode/configurators/PageHeader.d.ts +0 -3
- package/es/nocode/configurators/ProTable.d.ts +0 -3
- package/es/nocode/configurators/common.d.ts +0 -280
- package/es/nocode/configurators/index.d.ts +0 -15
- package/es/nocode/configurators/map.d.ts +0 -2
- package/es/nocode/index.d.ts +0 -8
- package/es/nocode/pages/editor.d.ts +0 -12
- package/es/nocode/pages/index.d.ts +0 -14
- package/es/nocode/pages/playground.d.ts +0 -11
- package/es/nocode/pages/renderer.d.ts +0 -10
- package/es/nocode/playground.d.ts +0 -14
- package/es/page-container/index.d.ts +0 -3
- package/es/page-header/index.d.ts +0 -74
- package/es/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/es/sidebar/components/tree/index.d.ts +0 -6
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/es/sidebar/components/tree-node/index.d.ts +0 -7
- package/es/sidebar/index.d.ts +0 -7
- package/es/sidebar/typing.d.ts +0 -137
- package/es/sidebar/utils/action-ref.d.ts +0 -3
- package/es/sidebar/utils/index.d.ts +0 -361
- package/es/skeleton/index.d.ts +0 -3
- package/es/table/components/EmptyContent/index.d.ts +0 -2
- package/es/table/components/Filter/index.d.ts +0 -9
- package/es/table/components/Layout/index.d.ts +0 -5
- package/es/table/components/Pagination/index.d.ts +0 -7
- package/es/table/components/QuickAction/index.d.ts +0 -10
- package/es/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/es/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/es/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/es/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/es/table/components/ToolBar/index.d.ts +0 -5
- package/es/table/index.d.ts +0 -5
- package/es/table/typing.d.ts +0 -299
- package/es/table/utils/columnRender.d.ts +0 -13
- package/es/table/utils/genProColumnToColumn.d.ts +0 -13
- package/es/table/utils/getTableProps.d.ts +0 -2
- package/es/table/utils/getTableSortIcons.d.ts +0 -3
- package/es/table/utils/index.d.ts +0 -19
- package/es/table/utils/pureColumnRender.d.ts +0 -9
- package/es/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/es/table/utils/useTableSelection.d.ts +0 -3
- package/es/templates/Detail/index.d.ts +0 -2
- package/es/templates/Form/index.d.ts +0 -2
- package/es/templates/List/index.d.ts +0 -9
- package/es/templates/index.d.ts +0 -3
- package/es/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/es/timeline/index.d.ts +0 -10
- package/es/timeline/typing.d.ts +0 -106
- package/es/utils/index.d.ts +0 -3
- package/es/utils/message.d.ts +0 -3
- package/lib/actions/base.d.ts +0 -24
- package/lib/actions/confirm.d.ts +0 -7
- package/lib/actions/danger-confirm.d.ts +0 -7
- package/lib/actions/danger-pop-confirm.d.ts +0 -5
- package/lib/actions/dialog-component.d.ts +0 -10
- package/lib/actions/dialog-form.d.ts +0 -29
- package/lib/actions/dialog-info.d.ts +0 -9
- package/lib/actions/dialog-table.d.ts +0 -9
- package/lib/actions/dialog.d.ts +0 -40
- package/lib/actions/drawer-form.d.ts +0 -6
- package/lib/actions/drawer-info.d.ts +0 -6
- package/lib/actions/drawer-table.d.ts +0 -6
- package/lib/actions/drawer.d.ts +0 -6
- package/lib/actions/error.d.ts +0 -7
- package/lib/actions/index.d.ts +0 -107
- package/lib/actions/link.d.ts +0 -8
- package/lib/actions/notice.d.ts +0 -7
- package/lib/actions/pop-confirm.d.ts +0 -9
- package/lib/actions/request.d.ts +0 -9
- package/lib/actions/utils.d.ts +0 -1
- package/lib/card/card-container.d.ts +0 -18
- package/lib/card/divider.d.ts +0 -6
- package/lib/card/index.d.ts +0 -109
- package/lib/card/selectable.d.ts +0 -13
- package/lib/card/tab.d.ts +0 -6
- package/lib/card/utils.d.ts +0 -9
- package/lib/field/index.d.ts +0 -3
- package/lib/form/Components/Editable/index.d.ts +0 -20
- package/lib/form/Components/FormGroup/index.d.ts +0 -13
- package/lib/form/Components/LightFilter/componentMap.d.ts +0 -3
- package/lib/form/Components/LightFilter/index.d.ts +0 -17
- package/lib/form/Components/ProField/index.d.ts +0 -2
- package/lib/form/Components/ProField/mapDateFormat.d.ts +0 -3
- package/lib/form/Components/Text/index.d.ts +0 -7
- package/lib/form/Filter/AdvancedFilter.d.ts +0 -7
- package/lib/form/Filter/Layout.d.ts +0 -5
- package/lib/form/Filter/LightFilter.d.ts +0 -7
- package/lib/form/Filter/SimpleFilter.d.ts +0 -7
- package/lib/form/Filter/index.d.ts +0 -9
- package/lib/form/Filter/index2.d.ts +0 -13
- package/lib/form/Filter/useBindUrl.d.ts +0 -2
- package/lib/form/Filter/useSpecialProps.d.ts +0 -6
- package/lib/form/ProForm/customComponent.d.ts +0 -3
- package/lib/form/ProForm/index.d.ts +0 -5
- package/lib/form/ProForm/useAutoLayout.d.ts +0 -9
- package/lib/form/ProForm/useAutoSubmit.d.ts +0 -6
- package/lib/form/ProForm/useFieldRequest.d.ts +0 -5
- package/lib/form/ProForm/useFormDisplayValues.d.ts +0 -4
- package/lib/form/ProForm/useInitialRequest.d.ts +0 -6
- package/lib/form/SchemaForm/adapterComponent.d.ts +0 -5
- package/lib/form/SchemaForm/adapterDecorator.d.ts +0 -6
- package/lib/form/SchemaForm/adapterType.d.ts +0 -5
- package/lib/form/SchemaForm/index.d.ts +0 -4
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +0 -3
- package/lib/form/SchemaForm/initializeDataSource.d.ts +0 -15
- package/lib/form/SchemaForm/initializeFormButton.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +0 -3
- package/lib/form/SchemaForm/initializeFormStep.d.ts +0 -5
- package/lib/form/SchemaForm/initializeFormTab.d.ts +0 -3
- package/lib/form/SchemaForm/initializeReactions.d.ts +0 -2
- package/lib/form/SchemaForm/initializeRequest.d.ts +0 -11
- package/lib/form/SchemaForm/initializeRules.d.ts +0 -11
- package/lib/form/SchemaForm/initializeSelectTable.d.ts +0 -3
- package/lib/form/SchemaForm/reactions.d.ts +0 -6
- package/lib/form/docs/ActionResponse.d.ts +0 -7
- package/lib/form/fieldTypeMap.d.ts +0 -7
- package/lib/form/index.d.ts +0 -125
- package/lib/form/locales/validate.d.ts +0 -159
- package/lib/form/schemaNameMap.d.ts +0 -5
- package/lib/form/typing.d.ts +0 -172
- package/lib/form/utils.d.ts +0 -55
- package/lib/form/warning.d.ts +0 -3
- package/lib/hooks/index.d.ts +0 -2
- package/lib/index-without-icon.d.ts +0 -32
- package/lib/index.d.ts +0 -32
- package/lib/info/components/InfoGroup/index.d.ts +0 -5
- package/lib/info/components/InfoValueItem/index.d.ts +0 -5
- package/lib/info/components/ProInfoItem/index.d.ts +0 -5
- package/lib/info/components/baseInfo/index.d.ts +0 -8
- package/lib/info/components/headerInfo/index.d.ts +0 -8
- package/lib/info/components/tableInfo/index.d.ts +0 -7
- package/lib/info/index.d.ts +0 -10
- package/lib/info/typing.d.ts +0 -218
- package/lib/info/utils/index.d.ts +0 -20
- package/lib/info/utils/layout.d.ts +0 -2
- package/lib/info/utils/utils.d.ts +0 -1
- package/lib/layout/index.d.ts +0 -2
- package/lib/nocode/configurators/Card.d.ts +0 -3
- package/lib/nocode/configurators/PageHeader.d.ts +0 -3
- package/lib/nocode/configurators/ProTable.d.ts +0 -3
- package/lib/nocode/configurators/common.d.ts +0 -280
- package/lib/nocode/configurators/index.d.ts +0 -15
- package/lib/nocode/configurators/map.d.ts +0 -2
- package/lib/nocode/index.d.ts +0 -8
- package/lib/nocode/pages/editor.d.ts +0 -12
- package/lib/nocode/pages/index.d.ts +0 -14
- package/lib/nocode/pages/playground.d.ts +0 -11
- package/lib/nocode/pages/renderer.d.ts +0 -10
- package/lib/nocode/playground.d.ts +0 -14
- package/lib/page-container/index.d.ts +0 -3
- package/lib/page-header/index.d.ts +0 -74
- package/lib/sidebar/components/sidebar-container/index.d.ts +0 -5
- package/lib/sidebar/components/tree/index.d.ts +0 -6
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
- package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
- package/lib/sidebar/components/tree-node/index.d.ts +0 -7
- package/lib/sidebar/index.d.ts +0 -7
- package/lib/sidebar/typing.d.ts +0 -137
- package/lib/sidebar/utils/action-ref.d.ts +0 -3
- package/lib/sidebar/utils/index.d.ts +0 -361
- package/lib/skeleton/index.d.ts +0 -3
- package/lib/table/components/EmptyContent/index.d.ts +0 -2
- package/lib/table/components/Filter/index.d.ts +0 -9
- package/lib/table/components/Layout/index.d.ts +0 -5
- package/lib/table/components/Pagination/index.d.ts +0 -7
- package/lib/table/components/QuickAction/index.d.ts +0 -10
- package/lib/table/components/ToolBar/DensityIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/Fullscreen.d.ts +0 -10
- package/lib/table/components/ToolBar/RefreshIcon.d.ts +0 -4
- package/lib/table/components/ToolBar/index.d.ts +0 -5
- package/lib/table/index.d.ts +0 -5
- package/lib/table/typing.d.ts +0 -299
- package/lib/table/utils/columnRender.d.ts +0 -13
- package/lib/table/utils/genProColumnToColumn.d.ts +0 -13
- package/lib/table/utils/getTableProps.d.ts +0 -2
- package/lib/table/utils/getTableSortIcons.d.ts +0 -3
- package/lib/table/utils/index.d.ts +0 -19
- package/lib/table/utils/pureColumnRender.d.ts +0 -9
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +0 -7
- package/lib/table/utils/useTableSelection.d.ts +0 -3
- package/lib/templates/Detail/index.d.ts +0 -2
- package/lib/templates/Form/index.d.ts +0 -2
- package/lib/templates/List/index.d.ts +0 -9
- package/lib/templates/index.d.ts +0 -3
- package/lib/timeline/ProTimeLineItem/index.d.ts +0 -5
- package/lib/timeline/index.d.ts +0 -10
- package/lib/timeline/typing.d.ts +0 -106
- package/lib/utils/index.d.ts +0 -3
- package/lib/utils/message.d.ts +0 -3
@@ -1,10 +1,6 @@
|
|
1
1
|
var _excluded = ["children", "className"];
|
2
2
|
|
3
|
-
function
|
4
|
-
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
6
|
-
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
8
4
|
|
9
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
10
6
|
|
@@ -21,7 +17,7 @@ var Text = function Text(_ref) {
|
|
21
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
22
18
|
|
23
19
|
var prefixCls = usePrefixCls('teamix-pro-form-text');
|
24
|
-
return /*#__PURE__*/React.createElement("span",
|
20
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
25
21
|
className: cls(prefixCls(), className)
|
26
22
|
}, otherProps), children);
|
27
23
|
};
|
@@ -1,5 +1,7 @@
|
|
1
1
|
var _excluded = ["schema", "onSubmit", "onReset", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "gridProps", "forceClear"];
|
2
2
|
|
3
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
|
+
|
3
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
4
6
|
|
5
7
|
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."); }
|
@@ -26,23 +28,24 @@ import React, { memo, useEffect, useMemo } from 'react';
|
|
26
28
|
import { usePrefixCls, getMessage, cls, isBool } from '@teamix/utils';
|
27
29
|
import ProForm from '../ProForm';
|
28
30
|
import { mergeArrayValue } from '../utils';
|
31
|
+
|
29
32
|
/**
|
30
33
|
* 高级筛选
|
31
34
|
*/
|
32
|
-
|
33
35
|
var AdvancedFilter = /*#__PURE__*/memo(function (props) {
|
34
|
-
var
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
36
|
+
var _ref = props,
|
37
|
+
schema = _ref.schema,
|
38
|
+
onSubmit = _ref.onSubmit,
|
39
|
+
onReset = _ref.onReset,
|
40
|
+
layout = _ref.layout,
|
41
|
+
labelAlign = _ref.labelAlign,
|
42
|
+
wrapperAlign = _ref.wrapperAlign,
|
43
|
+
labelCol = _ref.labelCol,
|
44
|
+
wrapperCol = _ref.wrapperCol,
|
45
|
+
breakpoints = _ref.breakpoints,
|
46
|
+
gridProps = _ref.gridProps,
|
47
|
+
forceClear = _ref.forceClear,
|
48
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
46
49
|
|
47
50
|
var prefixCls = usePrefixCls('teamix-pro-form-query-filter-advanced');
|
48
51
|
var gridSchema = useMemo(function () {
|
@@ -109,11 +112,11 @@ var AdvancedFilter = /*#__PURE__*/memo(function (props) {
|
|
109
112
|
wrapperCol: wrapperCol
|
110
113
|
};
|
111
114
|
}, [breakpoints, layout, labelAlign, wrapperAlign, labelCol, wrapperCol]);
|
112
|
-
return /*#__PURE__*/React.createElement(ProForm,
|
115
|
+
return /*#__PURE__*/React.createElement(ProForm, _extends({
|
113
116
|
className: cls(prefixCls(), props.className),
|
114
117
|
schema: gridSchema,
|
115
118
|
feedbackLayout: "popover"
|
116
|
-
}, otherProps
|
119
|
+
}, otherProps, getTeamixLayout, {
|
117
120
|
onSubmit: onSubmit
|
118
121
|
}));
|
119
122
|
});
|
@@ -1,5 +1,7 @@
|
|
1
1
|
var _excluded = ["form", "schema", "onSubmit", "onChange", "defaultFilterValue", "filterValues", "activeFilterValueRef"];
|
2
2
|
|
3
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
|
+
|
3
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
6
|
|
5
7
|
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; }
|
@@ -14,21 +16,22 @@ import React, { memo, useMemo, useCallback, useRef, useEffect } from 'react';
|
|
14
16
|
import { observable } from '@formily/reactive';
|
15
17
|
import { usePrefixCls, cls } from '@teamix/utils';
|
16
18
|
import ProForm from '../ProForm';
|
19
|
+
|
17
20
|
/**
|
18
21
|
* 轻量筛选
|
19
22
|
*/
|
20
|
-
|
21
23
|
var LightFilter = /*#__PURE__*/memo(function (props) {
|
22
24
|
var _schema$;
|
23
25
|
|
24
|
-
var
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
var _ref = props,
|
27
|
+
form = _ref.form,
|
28
|
+
schema = _ref.schema,
|
29
|
+
onSubmit = _ref.onSubmit,
|
30
|
+
onChange = _ref.onChange,
|
31
|
+
defaultFilterValue = _ref.defaultFilterValue,
|
32
|
+
filterValues = _ref.filterValues,
|
33
|
+
activeFilterValueRef = _ref.activeFilterValueRef,
|
34
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
32
35
|
|
33
36
|
var filterValue = useRef(defaultFilterValue || (schema === null || schema === void 0 ? void 0 : (_schema$ = schema[0]) === null || _schema$ === void 0 ? void 0 : _schema$.name));
|
34
37
|
var prefixCls = usePrefixCls('teamix-pro-form-query-filter-light');
|
@@ -88,7 +91,7 @@ var LightFilter = /*#__PURE__*/memo(function (props) {
|
|
88
91
|
useEffect(function () {
|
89
92
|
lightFilterObs.onFilter = onFilter;
|
90
93
|
}, [onFilter]);
|
91
|
-
return /*#__PURE__*/React.createElement(ProForm,
|
94
|
+
return /*#__PURE__*/React.createElement(ProForm, _extends({}, otherProps, {
|
92
95
|
scope: _objectSpread(_objectSpread({}, otherProps === null || otherProps === void 0 ? void 0 : otherProps.scope), {}, {
|
93
96
|
lightFilterObs: lightFilterObs
|
94
97
|
}),
|
@@ -1,5 +1,7 @@
|
|
1
1
|
var _excluded = ["schema", "onChange", "onSubmit"];
|
2
2
|
|
3
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
|
+
|
3
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
6
|
|
5
7
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
@@ -12,8 +14,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
12
14
|
|
13
15
|
import React, { memo, useCallback, useEffect, useMemo, useRef } from 'react';
|
14
16
|
import { usePrefixCls, cls, isValid } from '@teamix/utils';
|
15
|
-
import ProForm from '../ProForm';
|
17
|
+
import ProForm from '../ProForm';
|
16
18
|
|
19
|
+
// 初始化Search组件,内置部分属性
|
17
20
|
var initializeSearch = function initializeSearch(schema) {
|
18
21
|
var searchName = '';
|
19
22
|
var initializedSchema = schema.map(function (item) {
|
@@ -44,10 +47,11 @@ var initializeSearch = function initializeSearch(schema) {
|
|
44
47
|
var SimpleFilter = /*#__PURE__*/memo(function (props) {
|
45
48
|
var searchValue = useRef(undefined);
|
46
49
|
|
47
|
-
var
|
48
|
-
|
49
|
-
|
50
|
-
|
50
|
+
var _ref = props,
|
51
|
+
schema = _ref.schema,
|
52
|
+
onChange = _ref.onChange,
|
53
|
+
onSubmit = _ref.onSubmit,
|
54
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
51
55
|
|
52
56
|
var prefixCls = usePrefixCls('teamix-pro-form-query-filter-simple');
|
53
57
|
|
@@ -89,7 +93,7 @@ var SimpleFilter = /*#__PURE__*/memo(function (props) {
|
|
89
93
|
var searchDefaultValue = (_props$form$initialVa = props.form.initialValues) === null || _props$form$initialVa === void 0 ? void 0 : (_props$form$initialVa2 = _props$form$initialVa[searchName]) === null || _props$form$initialVa2 === void 0 ? void 0 : _props$form$initialVa2[1];
|
90
94
|
searchValue.current = isValid(searchDefaultValue) ? searchDefaultValue : '';
|
91
95
|
}, []);
|
92
|
-
return /*#__PURE__*/React.createElement(ProForm,
|
96
|
+
return /*#__PURE__*/React.createElement(ProForm, _extends({}, otherProps, {
|
93
97
|
className: cls(prefixCls(), props.className),
|
94
98
|
schema: simpleSchema,
|
95
99
|
feedbackLayout: "popover",
|
package/es/form/Filter/index.js
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
var _excluded = ["addonAfter", "addonBefore", "mode", "purePanel", "expand", "formRef", "defaultFilterValue", "filterValues", "filterDebounce", "bindUrl", "onFilter", "onInit", "onReset", "onExpand", "onChange", "form"];
|
2
2
|
|
3
|
-
function
|
4
|
-
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
6
|
-
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
8
4
|
|
9
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
10
6
|
|
@@ -50,10 +46,10 @@ import { QueryFilterLayout } from './Layout';
|
|
50
46
|
import useSpecialProps from './useSpecialProps';
|
51
47
|
import useBindUrl from './useBindUrl';
|
52
48
|
import './index.scss';
|
49
|
+
|
53
50
|
/**
|
54
51
|
* 查询筛选
|
55
52
|
*/
|
56
|
-
|
57
53
|
var QueryFilter = /*#__PURE__*/memo(function (props) {
|
58
54
|
var addonAfter = props.addonAfter,
|
59
55
|
addonBefore = props.addonBefore,
|
@@ -514,8 +510,9 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
|
|
514
510
|
inlineContent: mode === 'panel' ? /*#__PURE__*/React.createElement("div", {
|
515
511
|
className: cls(prefixCls('inline', {
|
516
512
|
'inline-hidden': purePanel || hasRequired
|
517
|
-
})
|
518
|
-
|
513
|
+
}) // hasRequired 为辅助检测
|
514
|
+
)
|
515
|
+
}, /*#__PURE__*/React.createElement(LightFilter, _extends({}, otherProps, {
|
519
516
|
defaultFilterValue: defaultFilterValue,
|
520
517
|
filterValues: filterValues,
|
521
518
|
activeFilterValueRef: activeFilterValueRef,
|
@@ -523,13 +520,13 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
|
|
523
520
|
onChange: onLightChange
|
524
521
|
}))) : /*#__PURE__*/React.createElement("div", {
|
525
522
|
className: prefixCls('inline')
|
526
|
-
}, /*#__PURE__*/React.createElement(SimpleFilter,
|
523
|
+
}, /*#__PURE__*/React.createElement(SimpleFilter, _extends({}, otherProps, {
|
527
524
|
form: simpleForm,
|
528
525
|
onChange: onSimpleChange,
|
529
526
|
onSubmit: onSimpleFilter,
|
530
527
|
onInitialComplete: onInitialComplete
|
531
528
|
}))),
|
532
|
-
panelContent: mode === 'panel' ? /*#__PURE__*/React.createElement(AdvancedFilter,
|
529
|
+
panelContent: mode === 'panel' ? /*#__PURE__*/React.createElement(AdvancedFilter, _extends({}, otherProps, {
|
533
530
|
form: advancedForm,
|
534
531
|
onChange: onAdvancedChange,
|
535
532
|
onSubmit: onAdvancedFilter,
|
package/es/form/Filter/index2.js
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
var _excluded = ["schema", "triggerType", "onFilter"];
|
2
2
|
|
3
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
|
+
|
3
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
4
6
|
|
5
7
|
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."); }
|
@@ -49,10 +51,11 @@ var getEventProps = function getEventProps(triggerType, onFilter) {
|
|
49
51
|
|
50
52
|
|
51
53
|
var SimpleFilter = /*#__PURE__*/memo(function (props) {
|
52
|
-
var
|
53
|
-
|
54
|
-
|
55
|
-
|
54
|
+
var _ref = props,
|
55
|
+
schema = _ref.schema,
|
56
|
+
triggerType = _ref.triggerType,
|
57
|
+
onFilter = _ref.onFilter,
|
58
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
56
59
|
|
57
60
|
var prefixCls = usePrefixCls('teamix-pro-form-filter-simple');
|
58
61
|
var simpleSchema = useMemo(function () {
|
@@ -74,11 +77,11 @@ var SimpleFilter = /*#__PURE__*/memo(function (props) {
|
|
74
77
|
}];
|
75
78
|
}, [schema, triggerType]);
|
76
79
|
var eventProps = getEventProps(triggerType, onFilter);
|
77
|
-
return /*#__PURE__*/React.createElement(ProForm,
|
80
|
+
return /*#__PURE__*/React.createElement(ProForm, _extends({
|
78
81
|
feedbackLayout: "popover",
|
79
82
|
breakpoints: [],
|
80
83
|
inset: true
|
81
|
-
}, otherProps
|
84
|
+
}, otherProps, eventProps, {
|
82
85
|
className: cls(prefixCls(), props.className),
|
83
86
|
schema: simpleSchema
|
84
87
|
}));
|
@@ -94,15 +97,16 @@ var AdvancedFilter = /*#__PURE__*/memo(function (props) {
|
|
94
97
|
var form = useMemo(function () {
|
95
98
|
return (props === null || props === void 0 ? void 0 : props.form) || createForm();
|
96
99
|
}, []);
|
97
|
-
var
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
100
|
+
var _ref2 = props,
|
101
|
+
schema = _ref2.schema,
|
102
|
+
triggerType = _ref2.triggerType,
|
103
|
+
onFilter = _ref2.onFilter,
|
104
|
+
onReset = _ref2.onReset,
|
105
|
+
layout = _ref2.layout,
|
106
|
+
labelAlign = _ref2.labelAlign,
|
107
|
+
wrapperAlign = _ref2.wrapperAlign,
|
108
|
+
labelCol = _ref2.labelCol,
|
109
|
+
wrapperCol = _ref2.wrapperCol;
|
106
110
|
var prefixCls = usePrefixCls('teamix-pro-form-filter-advanced');
|
107
111
|
var gridSchema = useMemo(function () {
|
108
112
|
return [{
|
@@ -159,9 +163,9 @@ var AdvancedFilter = /*#__PURE__*/memo(function (props) {
|
|
159
163
|
};
|
160
164
|
}, [layout, labelAlign, wrapperAlign, labelCol, wrapperCol]);
|
161
165
|
var eventProps = getEventProps(triggerType, onFilter);
|
162
|
-
return /*#__PURE__*/React.createElement(ProForm,
|
166
|
+
return /*#__PURE__*/React.createElement(ProForm, _extends({
|
163
167
|
feedbackLayout: "popover"
|
164
|
-
}, props
|
168
|
+
}, props, eventProps, getTeamixLayout, {
|
165
169
|
form: form,
|
166
170
|
className: cls(prefixCls(), props.className),
|
167
171
|
schema: gridSchema,
|
@@ -0,0 +1,225 @@
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
2
|
+
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
4
|
+
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
|
7
|
+
import { onFieldReact, onFieldValueChange } from '@formily/core';
|
8
|
+
var OP_MAPS = {
|
9
|
+
'*': function _() {
|
10
|
+
return true;
|
11
|
+
},
|
12
|
+
'=': function _(l, r) {
|
13
|
+
return l === r;
|
14
|
+
},
|
15
|
+
'==': function _(l, r) {
|
16
|
+
return l === r;
|
17
|
+
},
|
18
|
+
'!': function _(l, r) {
|
19
|
+
return l !== r;
|
20
|
+
},
|
21
|
+
'!=': function _(l, r) {
|
22
|
+
return l != r;
|
23
|
+
},
|
24
|
+
'>': function _(l, r) {
|
25
|
+
return l > r;
|
26
|
+
},
|
27
|
+
'<': function _(l, r) {
|
28
|
+
return l < r;
|
29
|
+
},
|
30
|
+
'>=': function _(l, r) {
|
31
|
+
return l >= r;
|
32
|
+
},
|
33
|
+
'<=': function _(l, r) {
|
34
|
+
return l <= r;
|
35
|
+
},
|
36
|
+
ied: function ied(l, r) {
|
37
|
+
if (Array.isArray(l) || typeof l === 'string' && r) {
|
38
|
+
return l.includes(r);
|
39
|
+
} else {
|
40
|
+
return false;
|
41
|
+
}
|
42
|
+
},
|
43
|
+
eed: function eed(l, r) {
|
44
|
+
if (Array.isArray(l) || typeof l === 'string' && r) {
|
45
|
+
return !l.includes(r);
|
46
|
+
} else {
|
47
|
+
return true;
|
48
|
+
}
|
49
|
+
},
|
50
|
+
i: function i(l, r) {
|
51
|
+
if (Array.isArray(r) || typeof r === 'string' && l) {
|
52
|
+
return r.includes(l);
|
53
|
+
} else {
|
54
|
+
return false;
|
55
|
+
}
|
56
|
+
},
|
57
|
+
e: function e(l, r) {
|
58
|
+
if (Array.isArray(r) || typeof r === 'string' && l) {
|
59
|
+
return !r.includes(l);
|
60
|
+
} else {
|
61
|
+
return true;
|
62
|
+
}
|
63
|
+
},
|
64
|
+
isEmpty: function isEmpty(l, r) {
|
65
|
+
return l === null || l === undefined || l === '' || Array.isArray(l) && l.length === 0;
|
66
|
+
},
|
67
|
+
notEmpty: function notEmpty(l, r) {
|
68
|
+
return l !== null && l !== undefined && l !== '' && (!Array.isArray(l) || l.length !== 0);
|
69
|
+
}
|
70
|
+
};
|
71
|
+
|
72
|
+
var getParsedValue = function getParsedValue(value, scope) {
|
73
|
+
if (typeof value === 'string' && value.startsWith('${') && value.endsWith('}')) {
|
74
|
+
return scope.$form.getValuesIn(value.slice(2, value.length - 1));
|
75
|
+
} else if (typeof value === 'string' && value.startsWith('{{') && value.endsWith('}}')) {
|
76
|
+
var code = value.slice(2, value.length - 2);
|
77
|
+
|
78
|
+
try {
|
79
|
+
return new Function("with(this){ return ".concat(code, " }")).call(scope);
|
80
|
+
} catch (e) {
|
81
|
+
return undefined;
|
82
|
+
}
|
83
|
+
} else {
|
84
|
+
return value;
|
85
|
+
}
|
86
|
+
};
|
87
|
+
|
88
|
+
var bingo = function bingo(bingoItem, scope) {
|
89
|
+
var _bingoItem$when = bingoItem.when,
|
90
|
+
when = _bingoItem$when === void 0 ? [] : _bingoItem$when,
|
91
|
+
_bingoItem$logic = bingoItem.logic,
|
92
|
+
logic = _bingoItem$logic === void 0 ? '&&' : _bingoItem$logic;
|
93
|
+
var result = logic === '&&';
|
94
|
+
when.forEach(function (_ref) {
|
95
|
+
var left = _ref.left,
|
96
|
+
op = _ref.op,
|
97
|
+
right = _ref.right;
|
98
|
+
var leftValue = scope.$form.getValuesIn(left);
|
99
|
+
var rightValue = getParsedValue(right, scope);
|
100
|
+
var itemResult = OP_MAPS[op](leftValue, rightValue);
|
101
|
+
|
102
|
+
if (logic === '&&') {
|
103
|
+
result = result && itemResult;
|
104
|
+
} else {
|
105
|
+
result = result || itemResult;
|
106
|
+
}
|
107
|
+
});
|
108
|
+
return result;
|
109
|
+
};
|
110
|
+
|
111
|
+
var loopAddFieldEffect = function loopAddFieldEffect(schema, form, scope) {
|
112
|
+
if (Array.isArray(schema)) {
|
113
|
+
schema === null || schema === void 0 ? void 0 : schema.forEach(function (item) {
|
114
|
+
if (item.name) {
|
115
|
+
var _item$cascade, _item$onChange;
|
116
|
+
|
117
|
+
(_item$cascade = item.cascade) === null || _item$cascade === void 0 ? void 0 : _item$cascade.forEach(function (cascade) {
|
118
|
+
onFieldReact(item.name, function (field) {
|
119
|
+
var contextScope = _objectSpread(_objectSpread({}, scope), {}, {
|
120
|
+
$form: form,
|
121
|
+
$self: field,
|
122
|
+
$values: form.values
|
123
|
+
});
|
124
|
+
|
125
|
+
var _cascade$state = cascade.state,
|
126
|
+
state = _cascade$state === void 0 ? {} : _cascade$state,
|
127
|
+
_cascade$props = cascade.props,
|
128
|
+
props = _cascade$props === void 0 ? {} : _cascade$props,
|
129
|
+
dataSourceFilter = cascade.dataSourceFilter,
|
130
|
+
dataSourceHide = cascade.dataSourceHide;
|
131
|
+
|
132
|
+
if (bingo(cascade, contextScope)) {
|
133
|
+
if (dataSourceFilter || dataSourceHide) {
|
134
|
+
var sourceDataSource = field.getState()._sourceDataSource;
|
135
|
+
|
136
|
+
if (!sourceDataSource) {
|
137
|
+
var dataSource = field.getState().dataSource;
|
138
|
+
field.setState({
|
139
|
+
_sourceDataSource: dataSource
|
140
|
+
});
|
141
|
+
sourceDataSource = dataSource;
|
142
|
+
}
|
143
|
+
|
144
|
+
if (sourceDataSource) {
|
145
|
+
var nextDataSource = sourceDataSource.filter(function (item) {
|
146
|
+
if (Array.isArray(dataSourceFilter)) {
|
147
|
+
return dataSourceFilter.includes(item.value);
|
148
|
+
}
|
149
|
+
|
150
|
+
if (Array.isArray(dataSourceHide)) {
|
151
|
+
return !dataSourceFilter.includes(item.value);
|
152
|
+
}
|
153
|
+
});
|
154
|
+
field.setDataSource(nextDataSource);
|
155
|
+
var value = field.getState().value;
|
156
|
+
|
157
|
+
if (!nextDataSource.some(function (item) {
|
158
|
+
return item.value === value;
|
159
|
+
})) {
|
160
|
+
field.setValue(undefined);
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
var nextState = {};
|
166
|
+
Object.keys(state).forEach(function (stateKey) {
|
167
|
+
nextState[stateKey] = getParsedValue(state[stateKey], contextScope);
|
168
|
+
});
|
169
|
+
field.setState(nextState);
|
170
|
+
var nextProps = {};
|
171
|
+
Object.keys(props).forEach(function (propsKey) {
|
172
|
+
nextProps[propsKey] = getParsedValue(props[propsKey], contextScope);
|
173
|
+
});
|
174
|
+
field.setComponentProps(nextProps);
|
175
|
+
} else {
|
176
|
+
var formState = form.getState();
|
177
|
+
|
178
|
+
if (dataSourceFilter || dataSourceHide) {
|
179
|
+
var _sourceDataSource = field.getState()._sourceDataSource;
|
180
|
+
|
181
|
+
_sourceDataSource && field.setDataSource(_sourceDataSource);
|
182
|
+
}
|
183
|
+
|
184
|
+
var _nextState = {};
|
185
|
+
Object.keys(state).forEach(function (stateKey) {
|
186
|
+
_nextState[stateKey] = stateKey in item ? item[stateKey] : formState[stateKey];
|
187
|
+
});
|
188
|
+
field.setState(_nextState);
|
189
|
+
var _nextProps = {};
|
190
|
+
Object.keys(props).forEach(function (propsKey) {
|
191
|
+
_nextProps[propsKey] = item.props ? item.props[propsKey] : undefined;
|
192
|
+
});
|
193
|
+
field.setComponentProps(_nextProps);
|
194
|
+
}
|
195
|
+
});
|
196
|
+
});
|
197
|
+
(_item$onChange = item.onChange) === null || _item$onChange === void 0 ? void 0 : _item$onChange.forEach(function (onChange) {
|
198
|
+
onFieldValueChange(item.name, function (field) {
|
199
|
+
var contextScope = _objectSpread(_objectSpread({}, scope), {}, {
|
200
|
+
$form: form,
|
201
|
+
$self: field,
|
202
|
+
$values: form.values
|
203
|
+
});
|
204
|
+
|
205
|
+
var values = onChange.values;
|
206
|
+
|
207
|
+
if (bingo(onChange, contextScope)) {
|
208
|
+
Object.keys(values).forEach(function (valuesKey) {
|
209
|
+
form.setValuesIn(valuesKey, getParsedValue(values[valuesKey], contextScope));
|
210
|
+
});
|
211
|
+
}
|
212
|
+
});
|
213
|
+
});
|
214
|
+
} else if (item.children) {
|
215
|
+
loopAddFieldEffect(item.children, form, scope);
|
216
|
+
}
|
217
|
+
});
|
218
|
+
}
|
219
|
+
};
|
220
|
+
|
221
|
+
export default (function (form, schema, scope) {
|
222
|
+
form.addEffects('cascade', function () {
|
223
|
+
loopAddFieldEffect(schema, form, scope);
|
224
|
+
});
|
225
|
+
});
|
package/es/form/ProForm/index.js
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
var _excluded = ["form", "initialValues", "initialRequest", "scope", "context", "components", "onChange", "onChangeType", "onSubmit", "onSubmitFailed", "onInitialComplete", "className", "validateFirst", "schema", "children"];
|
2
2
|
|
3
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
|
+
|
3
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
6
|
|
5
7
|
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; }
|
@@ -17,6 +19,7 @@ import { toJS } from '@formily/reactive';
|
|
17
19
|
import { Form, Upload, SelectTable, FormLayout, FormItem, ArrayCollapse, ArrayCards, ArrayItems, ArrayTable, Space, FormGrid, FormTab, FormCollapse, FormStep, Editable, FormDialog, FormDrawer, FormButtonGroup, Submit, Reset } from '@teamix/formily';
|
18
20
|
import { Affix } from '@alicloudfe/components';
|
19
21
|
import ProFieldComponents from '../Components/ProField';
|
22
|
+
import addCascadeEffect from './addCascadeEffect';
|
20
23
|
import { EditableDialog, EditableDrawer, EditablePopover } from '../Components/Editable';
|
21
24
|
import FormGroup from '../Components/FormGroup';
|
22
25
|
import LightFilter from '../Components/LightFilter';
|
@@ -80,17 +83,19 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
80
83
|
globalComponents = _ref2.components,
|
81
84
|
globalScope = _ref2.scope;
|
82
85
|
|
86
|
+
var mergedScope = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, context), globalScope), scope), {}, {
|
87
|
+
context: context
|
88
|
+
});
|
89
|
+
|
83
90
|
var form = useMemo(function () {
|
84
|
-
|
91
|
+
var nextForm = outerForm || createForm({
|
85
92
|
validateFirst: validateFirst
|
86
93
|
});
|
94
|
+
addCascadeEffect(nextForm, schema, mergedScope);
|
95
|
+
return nextForm;
|
87
96
|
}, [outerForm]);
|
88
97
|
var prefixCls = usePrefixCls('teamix-pro-form'); // 由于Actions需要,解构context供使用。原context键名的上下文继续保留。
|
89
98
|
|
90
|
-
var mergedScope = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, context), globalScope), scope), {}, {
|
91
|
-
context: context
|
92
|
-
});
|
93
|
-
|
94
99
|
var mergedComponents = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, globalComponents), components), formilyComponents), ProFieldComponents);
|
95
100
|
|
96
101
|
var onAutoSubmit = useAutoSubmit(onSubmit, context);
|
@@ -135,9 +140,9 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
135
140
|
// 配置国际化
|
136
141
|
setValidateLanguage(getLanguage() || 'zh-cn');
|
137
142
|
}, []);
|
138
|
-
return /*#__PURE__*/React.createElement(Form,
|
143
|
+
return /*#__PURE__*/React.createElement(Form, _extends({
|
139
144
|
className: cls(prefixCls(), className)
|
140
|
-
}, otherProps
|
145
|
+
}, otherProps, autoTeamixLayout, {
|
141
146
|
form: form,
|
142
147
|
onAutoSubmit: onAutoSubmit,
|
143
148
|
onAutoSubmitFailed: onSubmitFailed
|
@@ -14,6 +14,7 @@ import { useForm } from '@formily/react';
|
|
14
14
|
import { toJS } from '@formily/reactive';
|
15
15
|
import { isArr, isPlainObj, isUsable, getValueByValue } from '@teamix/utils';
|
16
16
|
import fieldTypeMap from '../fieldTypeMap';
|
17
|
+
|
17
18
|
/**
|
18
19
|
* 获取表单值的可显示值
|
19
20
|
* @returns 如果某字段有dataSource,则返回value对应label
|
@@ -25,7 +26,6 @@ import fieldTypeMap from '../fieldTypeMap';
|
|
25
26
|
};
|
26
27
|
console.log(getDisplayValues(example));
|
27
28
|
*/
|
28
|
-
|
29
29
|
var getDisplayValues = function getDisplayValues(form, values) {
|
30
30
|
var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
31
31
|
var displayValues; // 拼接路径
|
@@ -10,8 +10,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
10
10
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
12
12
|
|
13
|
-
import { isFn, isPlainObj, doCommonRequest, getValueByValue } from '@teamix/utils';
|
13
|
+
import { isFn, isPlainObj, doCommonRequest, getValueByValue } from '@teamix/utils';
|
14
14
|
|
15
|
+
// 配置请求
|
15
16
|
var $request = function $request(field, context, _ref, type) {
|
16
17
|
var _field$data;
|
17
18
|
|
package/es/form/utils.js
CHANGED
@@ -28,13 +28,13 @@ import { isVoidField } from '@formily/core';
|
|
28
28
|
import { useFormLayout, useFormShallowLayout } from '@teamix/formily';
|
29
29
|
import { isArr, isObj, getValueByValue, isPlainObj } from '@teamix/utils';
|
30
30
|
import schemaNameMap from './schemaNameMap';
|
31
|
+
|
31
32
|
/**
|
32
33
|
* 映射字段size,主要是default转medium
|
33
34
|
* @param props component的props
|
34
35
|
* @param field 当前字段实例
|
35
36
|
* @returns 映射后的字段属性
|
36
37
|
*/
|
37
|
-
|
38
38
|
var mapSize = function mapSize(props, field) {
|
39
39
|
var layout = _objectSpread(_objectSpread({}, useFormShallowLayout()), useFormLayout());
|
40
40
|
|
@@ -121,6 +121,13 @@ var mapMode = function mapMode(props, field) {
|
|
121
121
|
mode: (field === null || field === void 0 ? void 0 : field.readPretty) ? 'read' : 'edit'
|
122
122
|
});
|
123
123
|
};
|
124
|
+
/**
|
125
|
+
* 创建字段名称
|
126
|
+
* @param prefix 字段名称前缀,接收字段component名称,默认为FieldName
|
127
|
+
* @param suffix 字段后缀,唯一标识
|
128
|
+
* @returns 字段唯一名称
|
129
|
+
*/
|
130
|
+
|
124
131
|
|
125
132
|
var getFieldName = function getFieldName() {
|
126
133
|
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'FieldName';
|