amis-core 3.0.0 → 3.1.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/esm/Root.d.ts +89 -4
- package/esm/Root.js +15 -4
- package/esm/RootRenderer.d.ts +3 -1
- package/esm/RootRenderer.js +9 -3
- package/esm/SchemaRenderer.d.ts +3 -2
- package/esm/SchemaRenderer.js +26 -20
- package/esm/Scoped.d.ts +8 -0
- package/esm/Scoped.js +20 -5
- package/esm/StatusScoped.d.ts +58 -0
- package/esm/StatusScoped.js +54 -0
- package/esm/WithRootStore.d.ts +2 -2
- package/esm/WithRootStore.js +1 -1
- package/esm/WithStore.js +6 -2
- package/esm/actions/Action.d.ts +1 -0
- package/esm/actions/Action.js +12 -4
- package/esm/actions/AjaxAction.js +1 -1
- package/esm/actions/BreakAction.js +1 -1
- package/esm/actions/BroadcastAction.js +1 -1
- package/esm/actions/CmptAction.js +8 -7
- package/esm/actions/ContinueAction.js +1 -1
- package/esm/actions/CopyAction.js +1 -1
- package/esm/actions/CustomAction.js +4 -4
- package/esm/actions/DialogAction.d.ts +16 -2
- package/esm/actions/DialogAction.js +19 -7
- package/esm/actions/DrawerAction.js +1 -1
- package/esm/actions/EmailAction.js +1 -1
- package/esm/actions/LinkAction.js +1 -1
- package/esm/actions/LoopAction.js +1 -1
- package/esm/actions/PageAction.js +1 -1
- package/esm/actions/ParallelAction.js +1 -1
- package/esm/actions/SwitchAction.js +1 -1
- package/esm/actions/ToastAction.js +1 -1
- package/esm/components/CustomStyle.d.ts +13 -0
- package/esm/components/CustomStyle.js +18 -0
- package/esm/components/LazyComponent.d.ts +1 -1
- package/esm/components/LazyComponent.js +1 -1
- package/esm/components/Overlay.d.ts +1 -1
- package/esm/components/Overlay.js +1 -1
- package/esm/components/PopOver.d.ts +2 -2
- package/esm/components/PopOver.js +1 -1
- package/esm/env.d.ts +10 -2
- package/esm/env.js +1 -1
- package/esm/envOverwrite.js +1 -5
- package/esm/factory.d.ts +3 -2
- package/esm/factory.js +1 -1
- package/esm/index.d.ts +4 -2
- package/esm/index.js +49 -28
- package/esm/locale.d.ts +2 -2
- package/esm/locale.js +10 -3
- package/esm/renderers/Form.d.ts +2 -1
- package/esm/renderers/Form.js +216 -180
- package/esm/renderers/Item.d.ts +55 -41
- package/esm/renderers/Item.js +24 -16
- package/esm/renderers/Options.js +9 -2
- package/esm/renderers/Placeholder.js +1 -1
- package/esm/renderers/builtin.js +1 -1
- package/esm/renderers/register.js +1 -1
- package/esm/renderers/wrapControl.d.ts +2 -2
- package/esm/renderers/wrapControl.js +13 -16
- package/esm/store/app.d.ts +1 -0
- package/esm/store/app.js +1 -1
- package/esm/store/combo.d.ts +3 -0
- package/esm/store/combo.js +1 -1
- package/esm/store/crud.d.ts +2 -0
- package/esm/store/crud.js +12 -4
- package/esm/store/form.d.ts +1 -0
- package/esm/store/form.js +10 -4
- package/esm/store/formItem.js +1 -1
- package/esm/store/iRenderer.d.ts +1 -0
- package/esm/store/iRenderer.js +54 -13
- package/esm/store/index.js +1 -1
- package/esm/store/list.d.ts +1 -0
- package/esm/store/list.js +7 -3
- package/esm/store/manager.js +1 -1
- package/esm/store/modal.d.ts +1 -0
- package/esm/store/modal.js +1 -1
- package/esm/store/node.js +1 -1
- package/esm/store/pagination.d.ts +1 -0
- package/esm/store/pagination.js +1 -1
- package/esm/store/root.d.ts +4 -6
- package/esm/store/root.js +53 -24
- package/esm/store/service.d.ts +1 -0
- package/esm/store/service.js +1 -1
- package/esm/store/status.d.ts +12 -0
- package/esm/store/status.js +38 -0
- package/esm/store/table.d.ts +4 -0
- package/esm/store/table.js +10 -2
- package/esm/store/table2.d.ts +2 -1
- package/esm/store/table2.js +6 -6
- package/esm/theme.d.ts +1 -1
- package/esm/theme.js +1 -1
- package/esm/types.d.ts +1 -1
- package/esm/utils/Animation.js +1 -1
- package/esm/utils/ColorScale.js +1 -1
- package/esm/utils/DataSchema.js +1 -1
- package/esm/utils/DataScope.d.ts +3 -5
- package/esm/utils/DataScope.js +88 -31
- package/esm/utils/RootClose.js +1 -1
- package/esm/utils/SimpleMap.js +1 -1
- package/esm/utils/api.js +6 -4
- package/esm/utils/attachmentAdpator.js +2 -2
- package/esm/utils/autobind.js +1 -1
- package/esm/utils/columnsSplit.js +1 -1
- package/esm/utils/dataMapping.js +1 -1
- package/esm/utils/date.d.ts +7 -0
- package/esm/utils/date.js +34 -2
- package/esm/utils/debug.js +1 -1
- package/esm/utils/decodeEntity.js +1 -1
- package/esm/utils/dom.d.ts +2 -1
- package/esm/utils/dom.js +1 -1
- package/esm/utils/errors.js +1 -1
- package/esm/utils/escapeHtml.js +1 -1
- package/esm/utils/filter-schema.js +1 -1
- package/esm/utils/filter.js +1 -1
- package/esm/utils/formatDuration.js +1 -1
- package/esm/utils/formula.js +1 -1
- package/esm/utils/getVariable.js +1 -1
- package/esm/utils/grammar.js +3 -3
- package/esm/utils/handleAction.js +1 -1
- package/esm/utils/helper.d.ts +2 -2
- package/esm/utils/helper.js +25 -18
- package/esm/utils/highlight.js +1 -1
- package/esm/utils/icon.d.ts +1 -1
- package/esm/utils/icon.js +1 -1
- package/esm/utils/image.js +1 -1
- package/esm/utils/isPureVariable.js +3 -3
- package/esm/utils/json-schema-2-amis-schema.js +1 -1
- package/esm/utils/keyToPath.js +1 -1
- package/esm/utils/makeSorter.js +1 -1
- package/esm/utils/memoryParse.d.ts +17 -0
- package/esm/utils/memoryParse.js +26 -0
- package/esm/utils/normalizeLink.js +1 -1
- package/esm/utils/normalizeOptions.js +4 -2
- package/esm/utils/object.d.ts +2 -0
- package/esm/utils/object.js +27 -2
- package/esm/utils/offset.js +1 -1
- package/esm/utils/offsetParent.js +1 -1
- package/esm/utils/optionValueCompare.js +1 -1
- package/esm/utils/position.js +1 -1
- package/esm/utils/prettyBytes.js +1 -1
- package/esm/utils/renderer-event.js +1 -1
- package/esm/utils/replaceText.js +1 -1
- package/esm/utils/resize-sensor.js +1 -1
- package/esm/utils/resolveCondition.js +1 -1
- package/esm/utils/resolveVariable.js +4 -3
- package/esm/utils/resolveVariableAndFilter.js +1 -1
- package/esm/utils/resolveVariableAndFilterForAsync.js +5 -4
- package/esm/utils/scrollPosition.js +1 -1
- package/esm/utils/string2regExp.js +1 -1
- package/esm/utils/stripNumber.js +1 -1
- package/esm/utils/style-helper.d.ts +5 -2
- package/esm/utils/style-helper.js +18 -6
- package/esm/utils/style.js +1 -1
- package/esm/utils/toNumber.js +1 -1
- package/esm/utils/tokenize.d.ts +0 -1
- package/esm/utils/tokenize.js +3 -34
- package/esm/utils/tpl-builtin.js +5 -3
- package/esm/utils/tpl-lodash.js +1 -1
- package/esm/utils/tpl.js +1 -1
- package/esm/utils/uncontrollable.js +1 -1
- package/esm/utils/validations.js +1 -1
- package/lib/Root.d.ts +89 -4
- package/lib/Root.js +15 -4
- package/lib/RootRenderer.d.ts +3 -1
- package/lib/RootRenderer.js +8 -2
- package/lib/SchemaRenderer.d.ts +3 -2
- package/lib/SchemaRenderer.js +26 -20
- package/lib/Scoped.d.ts +8 -0
- package/lib/Scoped.js +20 -4
- package/lib/StatusScoped.d.ts +58 -0
- package/lib/StatusScoped.js +63 -0
- package/lib/WithRootStore.d.ts +2 -2
- package/lib/WithRootStore.js +1 -1
- package/lib/WithStore.js +6 -2
- package/lib/actions/Action.d.ts +1 -0
- package/lib/actions/Action.js +12 -4
- package/lib/actions/AjaxAction.js +1 -1
- package/lib/actions/BreakAction.js +1 -1
- package/lib/actions/BroadcastAction.js +1 -1
- package/lib/actions/CmptAction.js +8 -7
- package/lib/actions/ContinueAction.js +1 -1
- package/lib/actions/CopyAction.js +1 -1
- package/lib/actions/CustomAction.js +4 -4
- package/lib/actions/DialogAction.d.ts +16 -2
- package/lib/actions/DialogAction.js +19 -7
- package/lib/actions/DrawerAction.js +1 -1
- package/lib/actions/EmailAction.js +1 -1
- package/lib/actions/LinkAction.js +1 -1
- package/lib/actions/LoopAction.js +1 -1
- package/lib/actions/PageAction.js +1 -1
- package/lib/actions/ParallelAction.js +1 -1
- package/lib/actions/SwitchAction.js +1 -1
- package/lib/actions/ToastAction.js +1 -1
- package/lib/components/CustomStyle.d.ts +13 -0
- package/lib/components/CustomStyle.js +22 -0
- package/lib/components/LazyComponent.d.ts +1 -1
- package/lib/components/LazyComponent.js +1 -1
- package/lib/components/Overlay.d.ts +1 -1
- package/lib/components/Overlay.js +1 -1
- package/lib/components/PopOver.d.ts +2 -2
- package/lib/components/PopOver.js +1 -1
- package/lib/env.d.ts +10 -2
- package/lib/env.js +1 -1
- package/lib/envOverwrite.js +1 -5
- package/lib/factory.d.ts +3 -2
- package/lib/factory.js +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.js +50 -24
- package/lib/locale.d.ts +2 -2
- package/lib/locale.js +10 -3
- package/lib/renderers/Form.d.ts +2 -1
- package/lib/renderers/Form.js +215 -179
- package/lib/renderers/Item.d.ts +55 -41
- package/lib/renderers/Item.js +24 -16
- package/lib/renderers/Options.js +9 -2
- package/lib/renderers/Placeholder.js +1 -1
- package/lib/renderers/builtin.js +1 -1
- package/lib/renderers/register.js +1 -1
- package/lib/renderers/wrapControl.d.ts +2 -2
- package/lib/renderers/wrapControl.js +12 -15
- package/lib/store/app.d.ts +1 -0
- package/lib/store/app.js +1 -1
- package/lib/store/combo.d.ts +3 -0
- package/lib/store/combo.js +1 -1
- package/lib/store/crud.d.ts +2 -0
- package/lib/store/crud.js +12 -4
- package/lib/store/form.d.ts +1 -0
- package/lib/store/form.js +10 -4
- package/lib/store/formItem.js +1 -1
- package/lib/store/iRenderer.d.ts +1 -0
- package/lib/store/iRenderer.js +53 -12
- package/lib/store/index.js +1 -1
- package/lib/store/list.d.ts +1 -0
- package/lib/store/list.js +7 -3
- package/lib/store/manager.js +1 -1
- package/lib/store/modal.d.ts +1 -0
- package/lib/store/modal.js +1 -1
- package/lib/store/node.js +1 -1
- package/lib/store/pagination.d.ts +1 -0
- package/lib/store/pagination.js +1 -1
- package/lib/store/root.d.ts +4 -6
- package/lib/store/root.js +52 -23
- package/lib/store/service.d.ts +1 -0
- package/lib/store/service.js +1 -1
- package/lib/store/status.d.ts +12 -0
- package/lib/store/status.js +42 -0
- package/lib/store/table.d.ts +4 -0
- package/lib/store/table.js +10 -2
- package/lib/store/table2.d.ts +2 -1
- package/lib/store/table2.js +6 -6
- package/lib/theme.d.ts +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/utils/Animation.js +1 -1
- package/lib/utils/ColorScale.js +1 -1
- package/lib/utils/DataSchema.js +1 -1
- package/lib/utils/DataScope.d.ts +3 -5
- package/lib/utils/DataScope.js +86 -29
- package/lib/utils/RootClose.js +1 -1
- package/lib/utils/SimpleMap.js +1 -1
- package/lib/utils/api.js +5 -3
- package/lib/utils/attachmentAdpator.js +2 -2
- package/lib/utils/autobind.js +1 -1
- package/lib/utils/columnsSplit.js +1 -1
- package/lib/utils/dataMapping.js +1 -1
- package/lib/utils/date.d.ts +7 -0
- package/lib/utils/date.js +34 -1
- package/lib/utils/debug.js +1 -1
- package/lib/utils/decodeEntity.js +1 -1
- package/lib/utils/dom.d.ts +2 -1
- package/lib/utils/dom.js +1 -1
- package/lib/utils/errors.js +1 -1
- package/lib/utils/escapeHtml.js +1 -1
- package/lib/utils/filter-schema.js +1 -1
- package/lib/utils/filter.js +1 -1
- package/lib/utils/formatDuration.js +1 -1
- package/lib/utils/formula.js +1 -1
- package/lib/utils/getVariable.js +1 -1
- package/lib/utils/grammar.js +3 -3
- package/lib/utils/handleAction.js +1 -1
- package/lib/utils/helper.d.ts +2 -2
- package/lib/utils/helper.js +25 -18
- package/lib/utils/highlight.js +1 -1
- package/lib/utils/icon.d.ts +1 -1
- package/lib/utils/icon.js +1 -1
- package/lib/utils/image.js +1 -1
- package/lib/utils/isPureVariable.js +3 -3
- package/lib/utils/json-schema-2-amis-schema.js +1 -1
- package/lib/utils/keyToPath.js +1 -1
- package/lib/utils/makeSorter.js +1 -1
- package/lib/utils/memoryParse.d.ts +17 -0
- package/lib/utils/memoryParse.js +30 -0
- package/lib/utils/normalizeLink.js +1 -1
- package/lib/utils/normalizeOptions.js +4 -2
- package/lib/utils/object.d.ts +2 -0
- package/lib/utils/object.js +28 -1
- package/lib/utils/offset.js +1 -1
- package/lib/utils/offsetParent.js +1 -1
- package/lib/utils/optionValueCompare.js +1 -1
- package/lib/utils/position.js +1 -1
- package/lib/utils/prettyBytes.js +1 -1
- package/lib/utils/renderer-event.js +1 -1
- package/lib/utils/replaceText.js +1 -1
- package/lib/utils/resize-sensor.js +1 -1
- package/lib/utils/resolveCondition.js +1 -1
- package/lib/utils/resolveVariable.js +3 -2
- package/lib/utils/resolveVariableAndFilter.js +1 -1
- package/lib/utils/resolveVariableAndFilterForAsync.js +4 -3
- package/lib/utils/scrollPosition.js +1 -1
- package/lib/utils/string2regExp.js +1 -1
- package/lib/utils/stripNumber.js +1 -1
- package/lib/utils/style-helper.d.ts +5 -2
- package/lib/utils/style-helper.js +18 -6
- package/lib/utils/style.js +1 -1
- package/lib/utils/toNumber.js +1 -1
- package/lib/utils/tokenize.d.ts +0 -1
- package/lib/utils/tokenize.js +1 -33
- package/lib/utils/tpl-builtin.js +4 -2
- package/lib/utils/tpl-lodash.js +1 -1
- package/lib/utils/tpl.js +1 -1
- package/lib/utils/uncontrollable.js +1 -1
- package/lib/utils/validations.js +1 -1
- package/package.json +3 -3
package/esm/store/formItem.js
CHANGED
package/esm/store/iRenderer.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export declare const iRendererStore: import("mobx-state-tree").IModelType<{
|
|
|
33
33
|
getValueByName(name: string, canAccessSuper?: boolean): any;
|
|
34
34
|
getPristineValueByName(name: string): any;
|
|
35
35
|
} & {
|
|
36
|
+
setTopStore(value: any): void;
|
|
36
37
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
37
38
|
reset(): void;
|
|
38
39
|
updateData(data?: object, tag?: object, replace?: boolean): void;
|
package/esm/store/iRenderer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v3.
|
|
2
|
+
* amis-core v3.1.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -8,12 +8,41 @@ import { types } from 'mobx-state-tree';
|
|
|
8
8
|
import '../utils/helper.js';
|
|
9
9
|
import 'amis-formula';
|
|
10
10
|
import 'moment';
|
|
11
|
-
import { createObject, extendObject, cloneObject, setVariable, deleteVariable } from '../utils/object.js';
|
|
11
|
+
import { createObject, extendObject, cloneObject, setVariable, deleteVariable, extractObjectChain, createObjectFromChain } from '../utils/object.js';
|
|
12
12
|
import { getVariable } from '../utils/getVariable.js';
|
|
13
13
|
import { dataMapping } from '../utils/dataMapping.js';
|
|
14
14
|
import '../utils/filter.js';
|
|
15
15
|
import { SimpleMap } from '../utils/SimpleMap.js';
|
|
16
16
|
import { StoreNode } from './node.js';
|
|
17
|
+
import '../utils/api.js';
|
|
18
|
+
import '../utils/ColorScale.js';
|
|
19
|
+
import 'react';
|
|
20
|
+
import 'lodash/chunk';
|
|
21
|
+
import '../utils/DataSchema.js';
|
|
22
|
+
import '../utils/DataScope.js';
|
|
23
|
+
import '../utils/debug.js';
|
|
24
|
+
import 'react-dom';
|
|
25
|
+
import '../utils/errors.js';
|
|
26
|
+
import '../utils/tpl.js';
|
|
27
|
+
import 'lodash/isPlainObject';
|
|
28
|
+
import 'classnames';
|
|
29
|
+
import 'lodash/isObject';
|
|
30
|
+
import 'lodash/isString';
|
|
31
|
+
import 'lodash/isBoolean';
|
|
32
|
+
import 'lodash';
|
|
33
|
+
import '../utils/image.js';
|
|
34
|
+
import '../actions/Action.js';
|
|
35
|
+
import 'lodash/debounce';
|
|
36
|
+
import 'lodash/cloneDeep';
|
|
37
|
+
import '../utils/resize-sensor.js';
|
|
38
|
+
import 'react-overlays/useRootClose';
|
|
39
|
+
import 'lodash/mapValues';
|
|
40
|
+
import 'lodash/camelCase';
|
|
41
|
+
import 'uncontrollable';
|
|
42
|
+
import 'hoist-non-react-statics';
|
|
43
|
+
import '../utils/validations.js';
|
|
44
|
+
import '../utils/resolveCondition.js';
|
|
45
|
+
import '../utils/Animation.js';
|
|
17
46
|
|
|
18
47
|
var iRendererStore = StoreNode.named('iRendererStore')
|
|
19
48
|
.props({
|
|
@@ -41,7 +70,11 @@ var iRendererStore = StoreNode.named('iRendererStore')
|
|
|
41
70
|
var dialogCallbacks = new SimpleMap();
|
|
42
71
|
var dialogScoped = null;
|
|
43
72
|
var drawerScoped = null;
|
|
73
|
+
var top = null;
|
|
44
74
|
return {
|
|
75
|
+
setTopStore: function (value) {
|
|
76
|
+
top = value;
|
|
77
|
+
},
|
|
45
78
|
initData: function (data, skipSetPristine) {
|
|
46
79
|
if (data === void 0) { data = {}; }
|
|
47
80
|
if (skipSetPristine === void 0) { skipSetPristine = false; }
|
|
@@ -81,7 +114,7 @@ var iRendererStore = StoreNode.named('iRendererStore')
|
|
|
81
114
|
}
|
|
82
115
|
var prev = self.data;
|
|
83
116
|
var data = cloneObject(self.data);
|
|
84
|
-
if (prev.__prev) {
|
|
117
|
+
if (prev.hasOwnProperty('__prev')) {
|
|
85
118
|
// 基于之前的 __prev 改
|
|
86
119
|
var prevData = cloneObject(prev.__prev);
|
|
87
120
|
setVariable(prevData, name, origin);
|
|
@@ -127,13 +160,17 @@ var iRendererStore = StoreNode.named('iRendererStore')
|
|
|
127
160
|
self.action = action;
|
|
128
161
|
},
|
|
129
162
|
openDialog: function (ctx, additonal, callback, scoped) {
|
|
130
|
-
var
|
|
163
|
+
var chain = extractObjectChain(ctx);
|
|
164
|
+
chain.length === 1 && chain.unshift(self.data);
|
|
131
165
|
if (additonal) {
|
|
132
|
-
|
|
166
|
+
chain.splice(chain.length - 1, 0, additonal);
|
|
133
167
|
}
|
|
134
|
-
var data =
|
|
168
|
+
var data = createObjectFromChain(chain);
|
|
135
169
|
if (self.action.dialog && self.action.dialog.data) {
|
|
136
|
-
self.dialogData =
|
|
170
|
+
self.dialogData = createObjectFromChain([
|
|
171
|
+
top === null || top === void 0 ? void 0 : top.context,
|
|
172
|
+
dataMapping(self.action.dialog.data, data)
|
|
173
|
+
]);
|
|
137
174
|
var clonedAction = __assign(__assign({}, self.action), { dialog: __assign({}, self.action.dialog) });
|
|
138
175
|
delete clonedAction.dialog.data;
|
|
139
176
|
self.action = clonedAction;
|
|
@@ -155,15 +192,19 @@ var iRendererStore = StoreNode.named('iRendererStore')
|
|
|
155
192
|
}
|
|
156
193
|
},
|
|
157
194
|
openDrawer: function (ctx, additonal, callback, scoped) {
|
|
158
|
-
var
|
|
195
|
+
var chain = extractObjectChain(ctx);
|
|
196
|
+
chain.length === 1 && chain.unshift(self.data);
|
|
159
197
|
if (additonal) {
|
|
160
|
-
|
|
198
|
+
chain.splice(chain.length - 1, 0, additonal);
|
|
161
199
|
}
|
|
162
|
-
var data =
|
|
200
|
+
var data = createObjectFromChain(chain);
|
|
163
201
|
if (self.action.drawer.data) {
|
|
164
|
-
self.drawerData =
|
|
165
|
-
|
|
166
|
-
|
|
202
|
+
self.drawerData = createObjectFromChain([
|
|
203
|
+
top === null || top === void 0 ? void 0 : top.context,
|
|
204
|
+
dataMapping(self.action.drawer.data, data)
|
|
205
|
+
]);
|
|
206
|
+
var clonedAction = __assign(__assign({}, self.action), { drawer: __assign({}, self.action.drawer) });
|
|
207
|
+
delete clonedAction.drawer.data;
|
|
167
208
|
self.action = clonedAction;
|
|
168
209
|
}
|
|
169
210
|
else {
|
package/esm/store/index.js
CHANGED
package/esm/store/list.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
99
99
|
getValueByName(name: string, canAccessSuper?: boolean): any;
|
|
100
100
|
getPristineValueByName(name: string): any;
|
|
101
101
|
} & {
|
|
102
|
+
setTopStore(value: any): void;
|
|
102
103
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
103
104
|
reset(): void;
|
|
104
105
|
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
package/esm/store/list.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v3.
|
|
2
|
+
* amis-core v3.1.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -33,8 +33,12 @@ var Item = types
|
|
|
33
33
|
return self.index !== self.newIndex;
|
|
34
34
|
},
|
|
35
35
|
get locals() {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
var listStore = getParent(self, 2);
|
|
37
|
+
return createObject(extendObject(listStore.data, {
|
|
38
|
+
index: self.index,
|
|
39
|
+
// 只有table时,也可以获取选中行
|
|
40
|
+
selectedItems: listStore.selectedItems.map(function (item) { return item.data; }),
|
|
41
|
+
unSelectedItems: listStore.unSelectedItems.map(function (item) { return item.data; })
|
|
38
42
|
}), self.data);
|
|
39
43
|
},
|
|
40
44
|
get checkable() {
|
package/esm/store/manager.js
CHANGED
package/esm/store/modal.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export declare const ModalStore: import("mobx-state-tree").IModelType<{
|
|
|
47
47
|
getValueByName(name: string, canAccessSuper?: boolean): any;
|
|
48
48
|
getPristineValueByName(name: string): any;
|
|
49
49
|
} & {
|
|
50
|
+
setTopStore(value: any): void;
|
|
50
51
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
51
52
|
reset(): void;
|
|
52
53
|
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
package/esm/store/modal.js
CHANGED
package/esm/store/node.js
CHANGED
|
@@ -38,6 +38,7 @@ export declare const PaginationStore: import("mobx-state-tree").IModelType<{
|
|
|
38
38
|
getValueByName(name: string, canAccessSuper?: boolean): any;
|
|
39
39
|
getPristineValueByName(name: string): any;
|
|
40
40
|
} & {
|
|
41
|
+
setTopStore(value: any): void;
|
|
41
42
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
42
43
|
reset(): void;
|
|
43
44
|
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
package/esm/store/pagination.js
CHANGED
package/esm/store/root.d.ts
CHANGED
|
@@ -31,9 +31,6 @@ export declare const RootStore: import("mobx-state-tree").IModelType<{
|
|
|
31
31
|
runtimeError: import("mobx-state-tree").IType<any, any, any>;
|
|
32
32
|
runtimeErrorStack: import("mobx-state-tree").IType<any, any, any>;
|
|
33
33
|
query: import("mobx-state-tree").IType<any, any, any>;
|
|
34
|
-
visibleState: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
|
|
35
|
-
disableState: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
|
|
36
|
-
staticState: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
|
|
37
34
|
}, {
|
|
38
35
|
readonly parentStore: any;
|
|
39
36
|
readonly __: any;
|
|
@@ -49,6 +46,7 @@ export declare const RootStore: import("mobx-state-tree").IModelType<{
|
|
|
49
46
|
getValueByName(name: string, canAccessSuper?: boolean): any;
|
|
50
47
|
getPristineValueByName(name: string): any;
|
|
51
48
|
} & {
|
|
49
|
+
setTopStore(value: any): void;
|
|
52
50
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
53
51
|
reset(): void;
|
|
54
52
|
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
|
@@ -75,13 +73,13 @@ export declare const RootStore: import("mobx-state-tree").IModelType<{
|
|
|
75
73
|
saveRemote: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
|
|
76
74
|
fetchSchema: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
|
|
77
75
|
checkRemote: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
|
|
76
|
+
} & {
|
|
77
|
+
context: {};
|
|
78
78
|
} & {
|
|
79
79
|
readonly downStream: any;
|
|
80
80
|
} & {
|
|
81
|
+
setContext(context: any): void;
|
|
81
82
|
setRuntimeError(error: any, errorStack: any): void;
|
|
82
83
|
updateLocation(location?: any, parseFn?: Function): void;
|
|
83
|
-
setVisible(id: string, value: boolean): void;
|
|
84
|
-
setDisable(id: string, value: boolean): void;
|
|
85
|
-
setStatic(id: string, value: boolean): void;
|
|
86
84
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
87
85
|
export type IRootStore = Instance<typeof RootStore>;
|
package/esm/store/root.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v3.
|
|
2
|
+
* amis-core v3.1.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -7,46 +7,75 @@ import { __assign } from 'tslib';
|
|
|
7
7
|
import { types } from 'mobx-state-tree';
|
|
8
8
|
import { parseQuery } from '../utils/helper.js';
|
|
9
9
|
import { ServiceStore } from './service.js';
|
|
10
|
-
import
|
|
10
|
+
import '../utils/api.js';
|
|
11
|
+
import '../utils/ColorScale.js';
|
|
12
|
+
import 'react';
|
|
13
|
+
import 'lodash/chunk';
|
|
14
|
+
import 'amis-formula';
|
|
15
|
+
import 'lodash/isPlainObject';
|
|
16
|
+
import { extractObjectChain, createObjectFromChain } from '../utils/object.js';
|
|
17
|
+
import '../utils/DataSchema.js';
|
|
18
|
+
import '../utils/DataScope.js';
|
|
19
|
+
import 'moment';
|
|
20
|
+
import '../utils/debug.js';
|
|
21
|
+
import 'react-dom';
|
|
22
|
+
import '../utils/errors.js';
|
|
23
|
+
import '../utils/tpl.js';
|
|
24
|
+
import 'classnames';
|
|
25
|
+
import '../utils/filter.js';
|
|
26
|
+
import 'lodash/isObject';
|
|
27
|
+
import 'lodash/isString';
|
|
28
|
+
import 'lodash/isBoolean';
|
|
29
|
+
import 'lodash';
|
|
30
|
+
import '../utils/image.js';
|
|
31
|
+
import '../actions/Action.js';
|
|
32
|
+
import 'lodash/debounce';
|
|
33
|
+
import 'lodash/cloneDeep';
|
|
34
|
+
import '../utils/resize-sensor.js';
|
|
35
|
+
import 'react-overlays/useRootClose';
|
|
36
|
+
import '../utils/SimpleMap.js';
|
|
37
|
+
import 'lodash/mapValues';
|
|
38
|
+
import 'lodash/camelCase';
|
|
39
|
+
import 'uncontrollable';
|
|
40
|
+
import 'hoist-non-react-statics';
|
|
41
|
+
import '../utils/validations.js';
|
|
42
|
+
import '../utils/resolveCondition.js';
|
|
43
|
+
import '../utils/Animation.js';
|
|
11
44
|
|
|
12
45
|
var RootStore = ServiceStore.named('RootStore')
|
|
13
46
|
.props({
|
|
14
47
|
runtimeError: types.frozen(),
|
|
15
48
|
runtimeErrorStack: types.frozen(),
|
|
16
|
-
query: types.frozen()
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
49
|
+
query: types.frozen()
|
|
50
|
+
})
|
|
51
|
+
.volatile(function (self) {
|
|
52
|
+
return {
|
|
53
|
+
context: {}
|
|
54
|
+
};
|
|
20
55
|
})
|
|
21
56
|
.views(function (self) { return ({
|
|
22
57
|
get downStream() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
58
|
+
var result = self.data;
|
|
59
|
+
if (self.context || self.query) {
|
|
60
|
+
var chain = extractObjectChain(result);
|
|
61
|
+
self.context && chain.unshift(self.context);
|
|
62
|
+
self.query &&
|
|
63
|
+
chain.splice(chain.length - 1, 0, __assign(__assign({}, self.query), { __query: self.query }));
|
|
64
|
+
result = createObjectFromChain(chain);
|
|
65
|
+
}
|
|
66
|
+
return result;
|
|
26
67
|
}
|
|
27
68
|
}); })
|
|
28
69
|
.actions(function (self) { return ({
|
|
70
|
+
setContext: function (context) {
|
|
71
|
+
self.context = context;
|
|
72
|
+
},
|
|
29
73
|
setRuntimeError: function (error, errorStack) {
|
|
30
74
|
self.runtimeError = error;
|
|
31
75
|
self.runtimeErrorStack = errorStack;
|
|
32
76
|
},
|
|
33
77
|
updateLocation: function (location, parseFn) {
|
|
34
78
|
self.query = parseFn ? parseFn(location) : parseQuery(location);
|
|
35
|
-
},
|
|
36
|
-
setVisible: function (id, value) {
|
|
37
|
-
var _a;
|
|
38
|
-
var state = __assign(__assign({}, self.visibleState), (_a = {}, _a[id] = value, _a));
|
|
39
|
-
self.visibleState = state;
|
|
40
|
-
},
|
|
41
|
-
setDisable: function (id, value) {
|
|
42
|
-
var _a;
|
|
43
|
-
var state = __assign(__assign({}, self.disableState), (_a = {}, _a[id] = value, _a));
|
|
44
|
-
self.disableState = state;
|
|
45
|
-
},
|
|
46
|
-
setStatic: function (id, value) {
|
|
47
|
-
var _a;
|
|
48
|
-
var state = __assign(__assign({}, self.staticState), (_a = {}, _a[id] = value, _a));
|
|
49
|
-
self.staticState = state;
|
|
50
79
|
}
|
|
51
80
|
}); });
|
|
52
81
|
|
package/esm/store/service.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export declare const ServiceStore: import("mobx-state-tree").IModelType<{
|
|
|
43
43
|
getValueByName(name: string, canAccessSuper?: boolean): any;
|
|
44
44
|
getPristineValueByName(name: string): any;
|
|
45
45
|
} & {
|
|
46
|
+
setTopStore(value: any): void;
|
|
46
47
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
47
48
|
reset(): void;
|
|
48
49
|
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
package/esm/store/service.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Instance } from 'mobx-state-tree';
|
|
2
|
+
export declare const StatusStore: import("mobx-state-tree").IModelType<{
|
|
3
|
+
visibleState: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
|
|
4
|
+
disableState: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
|
|
5
|
+
staticState: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
|
|
6
|
+
}, {
|
|
7
|
+
setVisible(key: string, value?: boolean): void;
|
|
8
|
+
setDisable(key: string, value?: boolean): void;
|
|
9
|
+
setStatic(key: string, value?: boolean): void;
|
|
10
|
+
resetAll(): void;
|
|
11
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
12
|
+
export type IStatusStore = Instance<typeof StatusStore>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-core v3.1.0
|
|
3
|
+
* Copyright 2018-2023 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __assign } from 'tslib';
|
|
7
|
+
import { types } from 'mobx-state-tree';
|
|
8
|
+
|
|
9
|
+
var StatusStore = types
|
|
10
|
+
.model('StatusStore', {
|
|
11
|
+
visibleState: types.optional(types.frozen(), {}),
|
|
12
|
+
disableState: types.optional(types.frozen(), {}),
|
|
13
|
+
staticState: types.optional(types.frozen(), {})
|
|
14
|
+
})
|
|
15
|
+
.actions(function (self) { return ({
|
|
16
|
+
setVisible: function (key, value) {
|
|
17
|
+
var _a;
|
|
18
|
+
var state = __assign(__assign({}, self.visibleState), (_a = {}, _a[key] = value, _a));
|
|
19
|
+
self.visibleState = state;
|
|
20
|
+
},
|
|
21
|
+
setDisable: function (key, value) {
|
|
22
|
+
var _a;
|
|
23
|
+
var state = __assign(__assign({}, self.disableState), (_a = {}, _a[key] = value, _a));
|
|
24
|
+
self.disableState = state;
|
|
25
|
+
},
|
|
26
|
+
setStatic: function (key, value) {
|
|
27
|
+
var _a;
|
|
28
|
+
var state = __assign(__assign({}, self.staticState), (_a = {}, _a[key] = value, _a));
|
|
29
|
+
self.staticState = state;
|
|
30
|
+
},
|
|
31
|
+
resetAll: function () {
|
|
32
|
+
self.visibleState = {};
|
|
33
|
+
self.disableState = {};
|
|
34
|
+
self.staticState = {};
|
|
35
|
+
}
|
|
36
|
+
}); });
|
|
37
|
+
|
|
38
|
+
export { StatusStore };
|
package/esm/store/table.d.ts
CHANGED
|
@@ -218,6 +218,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
|
|
|
218
218
|
formsRef: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<any, any, any>>, [undefined]>;
|
|
219
219
|
maxKeepItemSelectionLength: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
220
220
|
keepItemSelectionOnPageChange: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
221
|
+
exportExcelLoading: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
221
222
|
searchFormExpanded: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
222
223
|
}, {
|
|
223
224
|
readonly parentStore: any;
|
|
@@ -234,6 +235,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
|
|
|
234
235
|
getValueByName(name: string, canAccessSuper?: boolean): any;
|
|
235
236
|
getPristineValueByName(name: string): any;
|
|
236
237
|
} & {
|
|
238
|
+
setTopStore(value: any): void;
|
|
237
239
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
238
240
|
reset(): void;
|
|
239
241
|
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
|
@@ -349,6 +351,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
|
|
|
349
351
|
getValueByName(name: string, canAccessSuper?: boolean): any;
|
|
350
352
|
getPristineValueByName(name: string): any;
|
|
351
353
|
} & {
|
|
354
|
+
setTopStore(value: any): void;
|
|
352
355
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
353
356
|
reset(): void;
|
|
354
357
|
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
|
@@ -5608,6 +5611,7 @@ export declare const TableStore: import("mobx-state-tree").IModelType<{
|
|
|
5608
5611
|
getValueByName(name: string, canAccessSuper?: boolean): any;
|
|
5609
5612
|
getPristineValueByName(name: string): any;
|
|
5610
5613
|
} & {
|
|
5614
|
+
setTopStore(value: any): void;
|
|
5611
5615
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
5612
5616
|
reset(): void;
|
|
5613
5617
|
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
package/esm/store/table.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v3.
|
|
2
|
+
* amis-core v3.1.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -130,11 +130,15 @@ var Row = types
|
|
|
130
130
|
if (self.children.length) {
|
|
131
131
|
children = self.children.map(function (item) { return item.locals; });
|
|
132
132
|
}
|
|
133
|
+
var table = getParent(self, self.depth * 2);
|
|
133
134
|
var parent = getParent(self, 2);
|
|
134
135
|
return createObject(extendObject(getParent(self, self.depth * 2).data, {
|
|
135
136
|
index: self.index,
|
|
136
137
|
// todo 以后再支持多层,目前先一层
|
|
137
|
-
parent: parent.storeType === Row.name ? parent.data : undefined
|
|
138
|
+
parent: parent.storeType === Row.name ? parent.data : undefined,
|
|
139
|
+
// 只有table时,也可以获取选中行
|
|
140
|
+
selectedItems: table.selectedRows.map(function (item) { return item.data; }),
|
|
141
|
+
unSelectedItems: table.unSelectedRows.map(function (item) { return item.data; })
|
|
138
142
|
}), children
|
|
139
143
|
? __assign(__assign({}, self.data), { children: children }) : self.data);
|
|
140
144
|
},
|
|
@@ -254,6 +258,8 @@ var TableStore = iRendererStore
|
|
|
254
258
|
formsRef: types.optional(types.array(types.frozen()), []),
|
|
255
259
|
maxKeepItemSelectionLength: Infinity,
|
|
256
260
|
keepItemSelectionOnPageChange: false,
|
|
261
|
+
// 导出 Excel 按钮的 loading 状态
|
|
262
|
+
exportExcelLoading: false,
|
|
257
263
|
searchFormExpanded: false // 用来控制搜索框是否展开了,那个自动根据 searchable 生成的表单 autoGenerateFilter
|
|
258
264
|
})
|
|
259
265
|
.views(function (self) {
|
|
@@ -594,6 +600,8 @@ var TableStore = iRendererStore
|
|
|
594
600
|
config.keepItemSelectionOnPageChange !== void 0 &&
|
|
595
601
|
(self.keepItemSelectionOnPageChange =
|
|
596
602
|
config.keepItemSelectionOnPageChange);
|
|
603
|
+
config.exportExcelLoading !== undefined &&
|
|
604
|
+
(self.exportExcelLoading = config.exportExcelLoading);
|
|
597
605
|
if (config.columns && Array.isArray(config.columns)) {
|
|
598
606
|
var columns = config.columns
|
|
599
607
|
.filter(function (column) { return column; })
|
package/esm/store/table2.d.ts
CHANGED
|
@@ -155,6 +155,7 @@ export declare const TableStore2: import("mobx-state-tree").IModelType<{
|
|
|
155
155
|
getValueByName(name: string, canAccessSuper?: boolean): any;
|
|
156
156
|
getPristineValueByName(name: string): any;
|
|
157
157
|
} & {
|
|
158
|
+
setTopStore(value: any): void;
|
|
158
159
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
159
160
|
reset(): void;
|
|
160
161
|
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
|
@@ -465,7 +466,7 @@ export declare const TableStore2: import("mobx-state-tree").IModelType<{
|
|
|
465
466
|
initRows: (rows: Array<any>, getEntryId?: ((entry: any, index: number) => string) | undefined, reUseRow?: boolean, keyField?: string) => void;
|
|
466
467
|
updateSelected: (selectedKeys: Array<any>) => void;
|
|
467
468
|
updateSelectedAll: () => void;
|
|
468
|
-
updateExpanded: (expandedRowKeys: Array<any>, keyField
|
|
469
|
+
updateExpanded: (expandedRowKeys: Array<any>, keyField: string) => void;
|
|
469
470
|
exchange: (fromIndex: number, toIndex: number, item?: IRow2) => void;
|
|
470
471
|
reset: () => void;
|
|
471
472
|
toggleAllColumns: () => void;
|
package/esm/store/table2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v3.
|
|
2
|
+
* amis-core v3.1.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -149,7 +149,7 @@ var TableStore2 = ServiceStore.named('TableStore2')
|
|
|
149
149
|
pageNo: 1,
|
|
150
150
|
pageSize: 10,
|
|
151
151
|
dragging: false,
|
|
152
|
-
rowSelectionKeyField: '
|
|
152
|
+
rowSelectionKeyField: 'id'
|
|
153
153
|
})
|
|
154
154
|
.views(function (self) {
|
|
155
155
|
function getToggable() {
|
|
@@ -377,11 +377,11 @@ var TableStore2 = ServiceStore.named('TableStore2')
|
|
|
377
377
|
function updateExpanded(expandedRowKeys, keyField) {
|
|
378
378
|
self.expandedRowKeys.clear();
|
|
379
379
|
eachTree(self.rows, function (item) {
|
|
380
|
-
if (~expandedRowKeys.indexOf(item.pristine[keyField
|
|
381
|
-
self.expandedRowKeys.push(item.pristine[keyField
|
|
380
|
+
if (~expandedRowKeys.indexOf(item.pristine[keyField])) {
|
|
381
|
+
self.expandedRowKeys.push(item.pristine[keyField]);
|
|
382
382
|
}
|
|
383
|
-
else if (find(expandedRowKeys, function (a) { return a && a == item.pristine[keyField
|
|
384
|
-
self.expandedRowKeys.push(item.pristine[keyField
|
|
383
|
+
else if (find(expandedRowKeys, function (a) { return a && a == item.pristine[keyField]; })) {
|
|
384
|
+
self.expandedRowKeys.push(item.pristine[keyField]);
|
|
385
385
|
}
|
|
386
386
|
});
|
|
387
387
|
}
|
package/esm/theme.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export declare function themeable<T extends React.ComponentType<React.ComponentP
|
|
|
56
56
|
ref: any;
|
|
57
57
|
childRef(ref: any): void;
|
|
58
58
|
getWrappedInstance(): any;
|
|
59
|
-
render(): JSX.Element;
|
|
59
|
+
render(): React.JSX.Element;
|
|
60
60
|
context: unknown;
|
|
61
61
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
62
62
|
forceUpdate(callback?: (() => void) | undefined): void;
|
package/esm/theme.js
CHANGED
package/esm/types.d.ts
CHANGED
|
@@ -257,7 +257,7 @@ export interface Definitions {
|
|
|
257
257
|
[propName: string]: SchemaNode;
|
|
258
258
|
}
|
|
259
259
|
export interface ActionObject extends ButtonObject {
|
|
260
|
-
actionType?: 'submit' | 'copy' | 'reload' | 'ajax' | 'saveAs' | 'dialog' | 'drawer' | 'jump' | 'link' | 'url' | 'email' | 'close' | 'confirm' | 'add' | 'remove' | 'delete' | 'edit' | 'cancel' | 'next' | 'prev' | 'reset' | 'validate' | 'reset-and-submit' | 'clear' | 'clear-and-submit' | 'toast' | 'goto-step' | 'goto-image' | 'expand' | 'collapse' | 'step-submit' | 'selectAll' | 'changeTabKey';
|
|
260
|
+
actionType?: 'submit' | 'copy' | 'reload' | 'ajax' | 'saveAs' | 'dialog' | 'drawer' | 'confirmDialog' | 'jump' | 'link' | 'url' | 'email' | 'close' | 'confirm' | 'add' | 'remove' | 'delete' | 'edit' | 'cancel' | 'next' | 'prev' | 'reset' | 'validate' | 'reset-and-submit' | 'clear' | 'clear-and-submit' | 'toast' | 'goto-step' | 'goto-image' | 'expand' | 'collapse' | 'step-submit' | 'selectAll' | 'changeTabKey';
|
|
261
261
|
api?: BaseApiObject | string;
|
|
262
262
|
asyncApi?: BaseApiObject | string;
|
|
263
263
|
payload?: any;
|
package/esm/utils/Animation.js
CHANGED
package/esm/utils/ColorScale.js
CHANGED
package/esm/utils/DataSchema.js
CHANGED
package/esm/utils/DataScope.d.ts
CHANGED
|
@@ -15,12 +15,10 @@ export declare class DataScope {
|
|
|
15
15
|
addSchema(schema: JSONSchema): this;
|
|
16
16
|
removeSchema(id: string): this;
|
|
17
17
|
contains(scope: DataScope): boolean;
|
|
18
|
+
assignSchema(target: any, schema: any): any;
|
|
18
19
|
getMergedSchema(): any;
|
|
19
|
-
protected buildOptions(options: Array<any>, schema: JSONSchema, path?: string, key?: string
|
|
20
|
-
/** 是否数组元素,数组元素的内容将获取每个成员的对应值 */
|
|
21
|
-
isArrayItem?: boolean,
|
|
22
|
-
/** 不是所有的都可以选择,但不影响子元素 */
|
|
23
|
-
disabled?: boolean): void;
|
|
20
|
+
protected buildOptions(options: Array<any>, schema: JSONSchema, path?: string, key?: string): void;
|
|
24
21
|
getDataPropsAsOptions(): any;
|
|
25
22
|
getSchemaByPath(path: string): import("json-schema").JSONSchema7 | null;
|
|
23
|
+
getSchemaById(id: string): import("json-schema").JSONSchema7 | undefined;
|
|
26
24
|
}
|