@teamix/pro 1.4.25-bugfix → 1.4.25-bugfix.2
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.all.min.css +1 -0
- package/dist/pro.css +1 -1
- package/dist/pro.js +78506 -59443
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +13 -6
- package/dist/pro.xconsole.min.css +1 -0
- package/es/actions/base.js +8 -21
- package/es/actions/dialog-component.js +2 -9
- package/es/actions/dialog-form.js +37 -75
- package/es/actions/dialog-info.js +1 -5
- package/es/actions/dialog.js +57 -95
- package/es/actions/index.d.ts +7 -0
- package/es/actions/index.js +93 -153
- package/es/actions/index.scss +6 -1
- package/es/actions/link.js +3 -5
- package/es/actions/quick.d.ts +2 -0
- package/es/actions/quick.js +26 -0
- package/es/actions/request.js +12 -27
- package/es/actions/utils.js +1 -9
- package/es/card/card-container.js +0 -5
- package/es/card/divider.js +0 -5
- package/es/card/index.js +61 -100
- package/es/card/index.scss +15 -0
- package/es/card/selectable.js +4 -13
- package/es/card/tab.js +1 -10
- package/es/card/utils.js +0 -2
- package/es/card/xconsole.scss +3 -0
- package/es/form/Components/Editable/index.js +16 -55
- package/es/form/Components/FormGroup/index.d.ts +1 -0
- package/es/form/Components/FormGroup/index.js +7 -22
- package/es/form/Components/LightFilter/index.js +15 -35
- package/es/form/Components/ProField/index.js +2 -14
- package/es/form/Components/ProField/mapDateFormat.js +2 -28
- package/es/form/Components/Text/index.d.ts +1 -0
- package/es/form/Components/Text/index.js +2 -11
- package/es/form/Filter/AdvancedFilter.js +11 -26
- package/es/form/Filter/Layout.js +11 -24
- package/es/form/Filter/LightFilter.js +13 -24
- package/es/form/Filter/SimpleFilter.js +7 -21
- package/es/form/Filter/index.js +117 -171
- package/es/form/Filter/index2.js +11 -28
- package/es/form/Filter/layout.scss +1 -1
- package/es/form/Filter/useBindUrl.js +18 -46
- package/es/form/Filter/useSpecialProps.js +8 -13
- package/es/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/es/form/ProForm/addCascadeEffect.js +203 -0
- package/es/form/ProForm/customComponent.js +0 -5
- package/es/form/ProForm/index.js +30 -38
- package/es/form/ProForm/useAutoLayout.js +21 -42
- package/es/form/ProForm/useAutoSubmit.js +3 -8
- package/es/form/ProForm/useFieldRequest.js +0 -5
- package/es/form/ProForm/useFormDisplayValues.js +12 -28
- package/es/form/ProForm/useInitialRequest.js +0 -5
- package/es/form/SchemaForm/adapterComponent.js +0 -3
- package/es/form/SchemaForm/adapterDecorator.d.ts +1 -1
- package/es/form/SchemaForm/adapterDecorator.js +0 -8
- package/es/form/SchemaForm/adapterType.js +0 -2
- package/es/form/SchemaForm/index.js +78 -114
- 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 -31
- 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 -33
- package/es/form/SchemaForm/initializeRequest.js +2 -16
- package/es/form/SchemaForm/initializeRules.js +4 -22
- package/es/form/SchemaForm/initializeSelectTable.js +7 -33
- package/es/form/SchemaForm/reactions.js +19 -34
- package/es/form/docs/ActionResponse.d.ts +1 -0
- package/es/form/index.d.ts +9 -9
- package/es/form/index.js +0 -9
- package/es/form/typing.d.ts +26 -4
- package/es/form/utils.d.ts +1 -1
- package/es/form/utils.js +4 -49
- package/es/form/warning.js +2 -7
- package/es/global.scss +3 -1
- package/es/index-without-icon.js +4 -3
- package/es/index.d.ts +1 -1
- package/es/index.js +18 -8
- package/es/info/components/InfoGroup/index.js +21 -32
- package/es/info/components/InfoValueItem/index.js +66 -119
- package/es/info/components/ProInfoItem/index.js +13 -21
- package/es/info/components/baseInfo/index.js +17 -27
- package/es/info/components/headerInfo/index.js +8 -20
- package/es/info/components/tableInfo/index.js +20 -50
- package/es/info/index.js +61 -86
- package/es/info/typing.d.ts +2 -0
- package/es/info/utils/index.js +0 -11
- package/es/next-xconsole.scss +34 -0
- package/es/nocode/configurators/ProTable.js +1 -22
- package/es/nocode/configurators/common.js +5 -6
- package/es/nocode/configurators/index.js +2 -3
- package/es/nocode/index.js +6 -6
- package/es/nocode/pages/editor.js +5 -9
- package/es/nocode/pages/index.js +5 -30
- package/es/nocode/pages/playground.js +18 -35
- package/es/nocode/pages/renderer.js +9 -42
- package/es/nocode/playground.js +10 -23
- package/es/page-header/index.d.ts +2 -2
- package/es/page-header/index.js +40 -76
- package/es/page-header/index.scss +2 -1
- package/es/page-header/xconsole.scss +5 -0
- package/es/sidebar/components/sidebar-container/index.js +54 -69
- package/es/sidebar/components/sidebar-container/index.scss +21 -14
- package/es/sidebar/components/tree/index.js +100 -138
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +11 -26
- package/es/sidebar/components/tree-node/components/IconAction/index.js +9 -35
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
- package/es/sidebar/components/tree-node/components/IconSwitch/index.js +12 -25
- package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/es/sidebar/components/tree-node/index.js +42 -84
- package/es/sidebar/components/tree-node/index.scss +6 -0
- package/es/sidebar/index.d.ts +2 -0
- package/es/sidebar/index.js +72 -95
- package/es/sidebar/typing.d.ts +4 -0
- package/es/sidebar/utils/action-ref.js +2 -7
- package/es/sidebar/utils/index.d.ts +5 -2
- package/es/sidebar/utils/index.js +41 -98
- package/es/table/components/CardView/index.d.ts +5 -0
- package/es/table/components/CardView/index.js +392 -0
- package/es/table/components/CardView/index.scss +46 -0
- package/es/table/components/Filter/index.d.ts +6 -3
- package/es/table/components/Filter/index.js +115 -128
- package/es/table/components/Layout/index.js +32 -47
- package/es/table/components/Layout/index.scss +2 -1
- package/es/table/components/LoadMore/index.d.ts +20 -0
- package/es/table/components/LoadMore/index.js +88 -0
- package/es/table/components/LoadMore/index.scss +19 -0
- package/es/table/components/Pagination/index.js +25 -58
- package/es/table/components/QuickAction/index.d.ts +1 -0
- package/es/table/components/QuickAction/index.js +3 -11
- package/es/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/es/table/components/ToolBar/CardSwitch.js +52 -0
- package/es/table/components/ToolBar/DensityIcon.js +19 -31
- package/es/table/components/ToolBar/FilterColumnIcon.js +87 -125
- package/es/table/components/ToolBar/FullScreenIcon.js +7 -62
- package/es/table/components/ToolBar/Fullscreen.js +25 -28
- package/es/table/components/ToolBar/RefreshIcon.js +162 -27
- package/es/table/components/ToolBar/index.d.ts +1 -1
- package/es/table/components/ToolBar/index.js +130 -38
- package/es/table/components/ToolBar/index.scss +49 -3
- package/es/table/index.js +455 -423
- package/es/table/index.scss +8 -0
- package/es/table/typing.d.ts +125 -6
- package/es/table/utils/columnRender.d.ts +3 -3
- package/es/table/utils/columnRender.js +39 -79
- package/es/table/utils/genProColumnToColumn.d.ts +2 -2
- package/es/table/utils/genProColumnToColumn.js +13 -16
- package/es/table/utils/index.js +14 -47
- package/es/table/utils/pureColumnRender.js +21 -53
- package/es/table/utils/pureGenProColumnToColumn.d.ts +1 -1
- package/es/table/utils/pureGenProColumnToColumn.js +2 -10
- package/es/table/utils/useTableSelection.js +6 -33
- package/es/table/utils/util.d.ts +5 -0
- package/es/table/utils/util.js +19 -0
- package/es/templates/List/index.js +2 -9
- package/es/timeline/ProTimeLineItem/index.js +25 -65
- package/es/timeline/index.js +8 -22
- package/es/timeline/typing.d.ts +1 -0
- package/es/utils/message.d.ts +2 -2
- package/es/utils/message.js +0 -5
- package/es/xconsole.scss +503 -0
- 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 +2 -15
- package/lib/actions/dialog-form.js +36 -89
- package/lib/actions/dialog-info.js +1 -10
- package/lib/actions/dialog-table.js +0 -5
- package/lib/actions/dialog.js +55 -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.d.ts +7 -0
- package/lib/actions/index.js +115 -184
- package/lib/actions/index.scss +6 -1
- package/lib/actions/link.js +1 -10
- package/lib/actions/notice.js +0 -5
- package/lib/actions/pop-confirm.js +0 -5
- package/lib/actions/quick.d.ts +2 -0
- package/lib/actions/quick.js +33 -0
- package/lib/actions/request.js +8 -32
- package/lib/actions/utils.js +1 -9
- package/lib/card/card-container.js +0 -9
- package/lib/card/divider.js +0 -7
- package/lib/card/index.js +61 -127
- package/lib/card/index.scss +15 -0
- package/lib/card/selectable.js +4 -20
- package/lib/card/tab.js +1 -14
- package/lib/card/utils.js +0 -6
- package/lib/card/xconsole.scss +3 -0
- package/lib/field/index.js +0 -6
- package/lib/form/Components/Editable/index.js +15 -65
- package/lib/form/Components/FormGroup/index.d.ts +1 -0
- package/lib/form/Components/FormGroup/index.js +7 -28
- package/lib/form/Components/LightFilter/index.js +15 -47
- package/lib/form/Components/ProField/index.js +2 -21
- package/lib/form/Components/ProField/mapDateFormat.js +2 -32
- package/lib/form/Components/Text/index.d.ts +1 -0
- package/lib/form/Components/Text/index.js +2 -16
- package/lib/form/Filter/AdvancedFilter.js +11 -34
- package/lib/form/Filter/Layout.js +11 -33
- package/lib/form/Filter/LightFilter.js +13 -32
- package/lib/form/Filter/SimpleFilter.js +5 -27
- package/lib/form/Filter/index.js +116 -191
- package/lib/form/Filter/index2.js +11 -38
- package/lib/form/Filter/layout.scss +1 -1
- package/lib/form/Filter/useBindUrl.js +18 -50
- package/lib/form/Filter/useSpecialProps.js +6 -13
- package/lib/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/lib/form/ProForm/addCascadeEffect.js +210 -0
- package/lib/form/ProForm/customComponent.js +0 -8
- package/lib/form/ProForm/index.js +30 -60
- package/lib/form/ProForm/useAutoLayout.js +21 -45
- package/lib/form/ProForm/useAutoSubmit.js +1 -10
- package/lib/form/ProForm/useFieldRequest.js +0 -8
- package/lib/form/ProForm/useFormDisplayValues.js +12 -34
- package/lib/form/ProForm/useInitialRequest.js +0 -6
- package/lib/form/SchemaForm/adapterComponent.js +0 -6
- package/lib/form/SchemaForm/adapterDecorator.d.ts +1 -1
- package/lib/form/SchemaForm/adapterDecorator.js +0 -12
- package/lib/form/SchemaForm/adapterType.js +0 -5
- package/lib/form/SchemaForm/index.js +78 -144
- 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 -32
- 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 -37
- 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 -37
- package/lib/form/docs/ActionResponse.d.ts +1 -0
- package/lib/form/docs/ActionResponse.js +0 -5
- package/lib/form/index.d.ts +9 -9
- package/lib/form/index.js +0 -25
- package/lib/form/typing.d.ts +26 -4
- package/lib/form/utils.d.ts +1 -1
- package/lib/form/utils.js +4 -61
- package/lib/form/warning.js +2 -8
- package/lib/global.scss +3 -1
- package/lib/hooks/index.js +0 -5
- package/lib/index-without-icon.js +2 -36
- package/lib/index.d.ts +1 -1
- package/lib/index.js +13 -40
- package/lib/info/components/InfoGroup/index.js +21 -42
- package/lib/info/components/InfoValueItem/index.js +66 -134
- package/lib/info/components/ProInfoItem/index.js +13 -29
- package/lib/info/components/baseInfo/index.js +17 -39
- package/lib/info/components/headerInfo/index.js +8 -31
- package/lib/info/components/tableInfo/index.js +20 -62
- package/lib/info/index.js +61 -101
- package/lib/info/typing.d.ts +2 -0
- package/lib/info/utils/index.js +0 -19
- package/lib/info/utils/utils.js +0 -1
- package/lib/next-xconsole.scss +34 -0
- package/lib/nocode/configurators/PageHeader.js +0 -2
- package/lib/nocode/configurators/ProTable.js +1 -24
- package/lib/nocode/configurators/common.js +5 -10
- package/lib/nocode/configurators/index.js +2 -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 +3 -35
- package/lib/nocode/pages/playground.js +18 -52
- package/lib/nocode/pages/renderer.js +9 -53
- package/lib/nocode/playground.js +10 -35
- package/lib/page-container/index.js +0 -6
- package/lib/page-header/index.d.ts +2 -2
- package/lib/page-header/index.js +39 -90
- package/lib/page-header/index.scss +2 -1
- package/lib/page-header/xconsole.scss +5 -0
- package/lib/sidebar/components/sidebar-container/index.js +54 -81
- package/lib/sidebar/components/sidebar-container/index.scss +21 -14
- package/lib/sidebar/components/tree/index.js +100 -152
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +11 -34
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +9 -46
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +12 -35
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/lib/sidebar/components/tree-node/index.js +42 -100
- package/lib/sidebar/components/tree-node/index.scss +6 -0
- package/lib/sidebar/index.d.ts +2 -0
- package/lib/sidebar/index.js +79 -111
- package/lib/sidebar/typing.d.ts +4 -0
- package/lib/sidebar/utils/action-ref.js +2 -8
- package/lib/sidebar/utils/index.d.ts +5 -2
- package/lib/sidebar/utils/index.js +41 -106
- package/lib/skeleton/index.js +0 -6
- package/lib/table/components/CardView/index.d.ts +5 -0
- package/lib/table/components/CardView/index.js +402 -0
- package/lib/table/components/CardView/index.scss +46 -0
- package/lib/table/components/EmptyContent/index.js +0 -6
- package/lib/table/components/Filter/index.d.ts +6 -3
- package/lib/table/components/Filter/index.js +114 -137
- package/lib/table/components/Layout/index.js +32 -60
- package/lib/table/components/Layout/index.scss +2 -1
- package/lib/table/components/LoadMore/index.d.ts +20 -0
- package/lib/table/components/LoadMore/index.js +99 -0
- package/lib/table/components/LoadMore/index.scss +19 -0
- package/lib/table/components/Pagination/index.js +25 -68
- package/lib/table/components/QuickAction/index.d.ts +1 -0
- package/lib/table/components/QuickAction/index.js +3 -15
- package/lib/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/lib/table/components/ToolBar/CardSwitch.js +60 -0
- package/lib/table/components/ToolBar/DensityIcon.js +19 -42
- package/lib/table/components/ToolBar/FilterColumnIcon.js +86 -136
- package/lib/table/components/ToolBar/FullScreenIcon.js +10 -74
- package/lib/table/components/ToolBar/Fullscreen.js +25 -35
- package/lib/table/components/ToolBar/RefreshIcon.js +164 -36
- package/lib/table/components/ToolBar/index.d.ts +1 -1
- package/lib/table/components/ToolBar/index.js +133 -47
- package/lib/table/components/ToolBar/index.scss +49 -3
- package/lib/table/index.js +454 -445
- package/lib/table/index.scss +8 -0
- package/lib/table/typing.d.ts +125 -6
- package/lib/table/utils/columnRender.d.ts +3 -3
- package/lib/table/utils/columnRender.js +39 -92
- package/lib/table/utils/genProColumnToColumn.d.ts +2 -2
- package/lib/table/utils/genProColumnToColumn.js +13 -21
- package/lib/table/utils/getTableProps.js +0 -2
- package/lib/table/utils/getTableSortIcons.js +0 -5
- package/lib/table/utils/index.js +12 -55
- package/lib/table/utils/pureColumnRender.js +21 -64
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +1 -1
- package/lib/table/utils/pureGenProColumnToColumn.js +2 -11
- package/lib/table/utils/useTableSelection.js +6 -35
- package/lib/table/utils/util.d.ts +5 -0
- package/lib/table/utils/util.js +25 -0
- package/lib/templates/Detail/index.js +0 -5
- package/lib/templates/Form/index.js +0 -5
- package/lib/templates/List/index.js +2 -19
- package/lib/templates/index.js +0 -6
- package/lib/timeline/ProTimeLineItem/index.js +25 -76
- package/lib/timeline/index.js +8 -33
- package/lib/timeline/typing.d.ts +1 -0
- package/lib/utils/index.js +0 -6
- package/lib/utils/message.d.ts +2 -2
- package/lib/utils/message.js +0 -10
- package/lib/xconsole.scss +503 -0
- package/package.json +1 -1
@@ -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,31 @@ 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);
|
41
|
-
|
42
|
-
|
28
|
+
var refreshResult = (0, _utils.isPlainObj)(refresh) ? refresh : {};
|
29
|
+
// 合并请求参数
|
30
|
+
var mergedParams = _objectSpread(_objectSpread(_objectSpread({}, params), beforeRequestResult), refreshResult);
|
31
|
+
// 执行通用数据请求
|
43
32
|
return (0, _utils.doCommonRequest)(_objectSpread(_objectSpread({}, requestConfig), {}, {
|
44
33
|
params: mergedParams,
|
45
34
|
beforeRequest: function beforeRequest() {
|
@@ -55,24 +44,19 @@ var $request = function $request(field, context, _ref, type) {
|
|
55
44
|
field: field,
|
56
45
|
params: mergedParams
|
57
46
|
}));
|
58
|
-
};
|
59
|
-
|
60
|
-
|
47
|
+
};
|
48
|
+
// 通用请求配置上下文
|
61
49
|
exports.$request = $request;
|
62
|
-
|
63
50
|
var $common = function $common(services, context, requestConfig) {
|
64
51
|
return function (field) {
|
65
52
|
return services(field, context, requestConfig, 'request').then(function (res) {
|
66
53
|
var _requestConfig$onComp;
|
67
|
-
|
68
54
|
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
55
|
});
|
70
56
|
};
|
71
|
-
};
|
72
|
-
|
73
|
-
|
57
|
+
};
|
58
|
+
// 配置校验
|
74
59
|
exports.$common = $common;
|
75
|
-
|
76
60
|
var $validator = function $validator(services, context, requestConfig) {
|
77
61
|
return function (value, rules, _ref2) {
|
78
62
|
var field = _ref2.field;
|
@@ -84,11 +68,9 @@ var $validator = function $validator(services, context, requestConfig) {
|
|
84
68
|
}
|
85
69
|
});
|
86
70
|
};
|
87
|
-
};
|
88
|
-
|
89
|
-
|
71
|
+
};
|
72
|
+
// 配置DataSource
|
90
73
|
exports.$validator = $validator;
|
91
|
-
|
92
74
|
var $dataSource = function $dataSource(services, context, requestConfig) {
|
93
75
|
return function (field) {
|
94
76
|
field.setState({
|
@@ -96,7 +78,6 @@ var $dataSource = function $dataSource(services, context, requestConfig) {
|
|
96
78
|
});
|
97
79
|
return services(field, context, requestConfig, 'dataSource').then(function (res) {
|
98
80
|
var _requestConfig$extraC, _requestConfig$onComp2;
|
99
|
-
|
100
81
|
var isValueInDataSource = (0, _utils.getValueByValue)(res, field.value);
|
101
82
|
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
83
|
value: undefined
|
@@ -113,5 +94,4 @@ var $dataSource = function $dataSource(services, context, requestConfig) {
|
|
113
94
|
});
|
114
95
|
};
|
115
96
|
};
|
116
|
-
|
117
97
|
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.d.ts
CHANGED
@@ -38,39 +38,39 @@ declare const formilyReact: {
|
|
38
38
|
<Decorator extends originalFormilyReact.JSXComponent, Component extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.ISchemaFieldProps<Decorator, Component, import("@formily/core").ObjectField<Decorator, Component>>): JSX.Element;
|
39
39
|
displayName: string;
|
40
40
|
Markup: {
|
41
|
-
<Decorator_1 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "
|
41
|
+
<Decorator_1 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>, Component_1 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>>(props: originalFormilyReact.ISchemaMarkupFieldProps<Components, Component_1, Decorator_1>): JSX.Element;
|
42
42
|
displayName: string;
|
43
43
|
};
|
44
44
|
String: {
|
45
|
-
<Decorator_2 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "
|
45
|
+
<Decorator_2 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>, Component_2 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>>(props: originalFormilyReact.ISchemaTypeFieldProps<Components, Component_2, Decorator_2>): JSX.Element;
|
46
46
|
displayName: string;
|
47
47
|
};
|
48
48
|
Object: {
|
49
|
-
<Decorator_3 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "
|
49
|
+
<Decorator_3 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>, Component_3 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>>(props: originalFormilyReact.ISchemaTypeFieldProps<Components, Component_3, Decorator_3>): JSX.Element;
|
50
50
|
displayName: string;
|
51
51
|
};
|
52
52
|
Array: {
|
53
|
-
<Decorator_4 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "
|
53
|
+
<Decorator_4 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>, Component_4 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>>(props: originalFormilyReact.ISchemaTypeFieldProps<Components, Component_4, Decorator_4>): JSX.Element;
|
54
54
|
displayName: string;
|
55
55
|
};
|
56
56
|
Boolean: {
|
57
|
-
<Decorator_5 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "
|
57
|
+
<Decorator_5 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>, Component_5 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>>(props: originalFormilyReact.ISchemaTypeFieldProps<Components, Component_5, Decorator_5>): JSX.Element;
|
58
58
|
displayName: string;
|
59
59
|
};
|
60
60
|
Date: {
|
61
|
-
<Decorator_6 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "
|
61
|
+
<Decorator_6 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>, Component_6 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>>(props: originalFormilyReact.ISchemaTypeFieldProps<Components, Component_6, Decorator_6>): JSX.Element;
|
62
62
|
displayName: string;
|
63
63
|
};
|
64
64
|
DateTime: {
|
65
|
-
<Decorator_7 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "
|
65
|
+
<Decorator_7 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>, Component_7 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>>(props: originalFormilyReact.ISchemaTypeFieldProps<Components, Component_7, Decorator_7>): JSX.Element;
|
66
66
|
displayName: string;
|
67
67
|
};
|
68
68
|
Void: {
|
69
|
-
<Decorator_8 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "
|
69
|
+
<Decorator_8 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>, Component_8 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>>(props: originalFormilyReact.ISchemaTypeFieldProps<Components, Component_8, Decorator_8>): JSX.Element;
|
70
70
|
displayName: string;
|
71
71
|
};
|
72
72
|
Number: {
|
73
|
-
<Decorator_9 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "
|
73
|
+
<Decorator_9 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>, Component_9 extends originalFormilyReact.ReactComponentPath<Components, Exclude<keyof Components, "displayName" | "propTypes" | "contextTypes" | "defaultProps">>>(props: originalFormilyReact.ISchemaTypeFieldProps<Components, Component_9, Decorator_9>): JSX.Element;
|
74
74
|
displayName: string;
|
75
75
|
};
|
76
76
|
};
|
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.d.ts
CHANGED
@@ -34,6 +34,24 @@ export interface ProFormRequestConfig extends Omit<ProFormCommonRequestConfig, '
|
|
34
34
|
extraConfig?: AnyObject;
|
35
35
|
onComplete?: (res?: any, field?: any, context?: any) => any;
|
36
36
|
}
|
37
|
+
export interface CascadeWhen {
|
38
|
+
left: string;
|
39
|
+
op: string;
|
40
|
+
right: any;
|
41
|
+
}
|
42
|
+
export interface Cascade {
|
43
|
+
when: CascadeWhen[];
|
44
|
+
logic?: '||' | '&&';
|
45
|
+
props?: any;
|
46
|
+
state?: any;
|
47
|
+
dataSourceFilter?: any[];
|
48
|
+
dataSourceHide?: any[];
|
49
|
+
}
|
50
|
+
export interface OnChange {
|
51
|
+
when: CascadeWhen[];
|
52
|
+
logic?: '||' | '&&';
|
53
|
+
values: any;
|
54
|
+
}
|
37
55
|
export interface ProFormSchemaItem {
|
38
56
|
type?: string;
|
39
57
|
name?: string;
|
@@ -61,6 +79,8 @@ export interface ProFormSchemaItem {
|
|
61
79
|
default?: any;
|
62
80
|
request?: ProFormRequestConfig | ProFormRequestConfig[];
|
63
81
|
data?: AnyObject;
|
82
|
+
cascade?: Cascade[];
|
83
|
+
onChange?: OnChange[];
|
64
84
|
}
|
65
85
|
export declare type ProFormSchema = ProFormSchemaItem[];
|
66
86
|
interface AutoLayout {
|
@@ -86,6 +106,7 @@ export interface ProFormProps extends Omit<IFormLayoutProps, 'breakpoints'> {
|
|
86
106
|
onInitialComplete?: (form: FormType) => void;
|
87
107
|
breakpoints?: number[] | boolean;
|
88
108
|
autoLayout?: AutoLayout | boolean;
|
109
|
+
component?: any;
|
89
110
|
}
|
90
111
|
export interface FilterProps extends ProFormProps {
|
91
112
|
form: FormType;
|
@@ -98,13 +119,14 @@ export interface FilterProps extends ProFormProps {
|
|
98
119
|
export interface QueryFilterLayoutProps {
|
99
120
|
prefixCls?: string;
|
100
121
|
className?: string;
|
101
|
-
addonBefore?: ReactNode;
|
102
|
-
addonAfter?: ReactNode;
|
122
|
+
addonBefore?: ReactNode | any;
|
123
|
+
addonAfter?: ReactNode | any;
|
103
124
|
inlineContent?: ReactNode;
|
104
125
|
panelContent?: ReactNode;
|
105
126
|
count?: number;
|
106
127
|
expand?: boolean;
|
107
128
|
onExpand?: (expand: boolean) => void;
|
129
|
+
children?: React.ReactNode;
|
108
130
|
}
|
109
131
|
export interface QueryFilterProps extends ProFormProps {
|
110
132
|
/**
|
@@ -121,9 +143,9 @@ export interface QueryFilterProps extends ProFormProps {
|
|
121
143
|
/** 是否强制清除 */
|
122
144
|
forceClear?: boolean;
|
123
145
|
/** 顶部筛选区前缀 */
|
124
|
-
addonBefore?: ReactNode;
|
146
|
+
addonBefore?: ReactNode | any;
|
125
147
|
/** 顶部筛选区后缀 */
|
126
|
-
addonAfter?: ReactNode;
|
148
|
+
addonAfter?: ReactNode | any;
|
127
149
|
/** 顶部筛选区默认筛选项 */
|
128
150
|
defaultFilterValue?: string;
|
129
151
|
/** 顶部筛选区筛选项配置 */
|
package/lib/form/utils.d.ts
CHANGED
@@ -43,7 +43,7 @@ declare const mergeArrayValue: (arr: any[], v?: any) => any[];
|
|
43
43
|
* @param suffix scope名称后缀
|
44
44
|
* @returns 表达式和scope上下文
|
45
45
|
*/
|
46
|
-
declare const initializeRequestExpression: (config?: any, mode?: string
|
46
|
+
declare const initializeRequestExpression: (config?: any, mode?: string, suffix?: string) => {
|
47
47
|
expression: string;
|
48
48
|
scope: {
|
49
49
|
[x: string]: object;
|