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/lib/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/lib/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
|
|
|
@@ -18,6 +18,35 @@ var dataMapping = require('../utils/dataMapping.js');
|
|
|
18
18
|
require('../utils/filter.js');
|
|
19
19
|
var SimpleMap = require('../utils/SimpleMap.js');
|
|
20
20
|
var node = require('./node.js');
|
|
21
|
+
require('../utils/api.js');
|
|
22
|
+
require('../utils/ColorScale.js');
|
|
23
|
+
require('react');
|
|
24
|
+
require('lodash/chunk');
|
|
25
|
+
require('../utils/DataSchema.js');
|
|
26
|
+
require('../utils/DataScope.js');
|
|
27
|
+
require('../utils/debug.js');
|
|
28
|
+
require('react-dom');
|
|
29
|
+
require('../utils/errors.js');
|
|
30
|
+
require('../utils/tpl.js');
|
|
31
|
+
require('lodash/isPlainObject');
|
|
32
|
+
require('classnames');
|
|
33
|
+
require('lodash/isObject');
|
|
34
|
+
require('lodash/isString');
|
|
35
|
+
require('lodash/isBoolean');
|
|
36
|
+
require('lodash');
|
|
37
|
+
require('../utils/image.js');
|
|
38
|
+
require('../actions/Action.js');
|
|
39
|
+
require('lodash/debounce');
|
|
40
|
+
require('lodash/cloneDeep');
|
|
41
|
+
require('../utils/resize-sensor.js');
|
|
42
|
+
require('react-overlays/useRootClose');
|
|
43
|
+
require('lodash/mapValues');
|
|
44
|
+
require('lodash/camelCase');
|
|
45
|
+
require('uncontrollable');
|
|
46
|
+
require('hoist-non-react-statics');
|
|
47
|
+
require('../utils/validations.js');
|
|
48
|
+
require('../utils/resolveCondition.js');
|
|
49
|
+
require('../utils/Animation.js');
|
|
21
50
|
|
|
22
51
|
var iRendererStore = node.StoreNode.named('iRendererStore')
|
|
23
52
|
.props({
|
|
@@ -45,7 +74,11 @@ var iRendererStore = node.StoreNode.named('iRendererStore')
|
|
|
45
74
|
var dialogCallbacks = new SimpleMap.SimpleMap();
|
|
46
75
|
var dialogScoped = null;
|
|
47
76
|
var drawerScoped = null;
|
|
77
|
+
var top = null;
|
|
48
78
|
return {
|
|
79
|
+
setTopStore: function (value) {
|
|
80
|
+
top = value;
|
|
81
|
+
},
|
|
49
82
|
initData: function (data, skipSetPristine) {
|
|
50
83
|
if (data === void 0) { data = {}; }
|
|
51
84
|
if (skipSetPristine === void 0) { skipSetPristine = false; }
|
|
@@ -85,7 +118,7 @@ var iRendererStore = node.StoreNode.named('iRendererStore')
|
|
|
85
118
|
}
|
|
86
119
|
var prev = self.data;
|
|
87
120
|
var data = object.cloneObject(self.data);
|
|
88
|
-
if (prev.__prev) {
|
|
121
|
+
if (prev.hasOwnProperty('__prev')) {
|
|
89
122
|
// 基于之前的 __prev 改
|
|
90
123
|
var prevData = object.cloneObject(prev.__prev);
|
|
91
124
|
object.setVariable(prevData, name, origin);
|
|
@@ -131,13 +164,17 @@ var iRendererStore = node.StoreNode.named('iRendererStore')
|
|
|
131
164
|
self.action = action;
|
|
132
165
|
},
|
|
133
166
|
openDialog: function (ctx, additonal, callback, scoped) {
|
|
134
|
-
var
|
|
167
|
+
var chain = object.extractObjectChain(ctx);
|
|
168
|
+
chain.length === 1 && chain.unshift(self.data);
|
|
135
169
|
if (additonal) {
|
|
136
|
-
|
|
170
|
+
chain.splice(chain.length - 1, 0, additonal);
|
|
137
171
|
}
|
|
138
|
-
var data = object.
|
|
172
|
+
var data = object.createObjectFromChain(chain);
|
|
139
173
|
if (self.action.dialog && self.action.dialog.data) {
|
|
140
|
-
self.dialogData =
|
|
174
|
+
self.dialogData = object.createObjectFromChain([
|
|
175
|
+
top === null || top === void 0 ? void 0 : top.context,
|
|
176
|
+
dataMapping.dataMapping(self.action.dialog.data, data)
|
|
177
|
+
]);
|
|
141
178
|
var clonedAction = tslib.__assign(tslib.__assign({}, self.action), { dialog: tslib.__assign({}, self.action.dialog) });
|
|
142
179
|
delete clonedAction.dialog.data;
|
|
143
180
|
self.action = clonedAction;
|
|
@@ -159,15 +196,19 @@ var iRendererStore = node.StoreNode.named('iRendererStore')
|
|
|
159
196
|
}
|
|
160
197
|
},
|
|
161
198
|
openDrawer: function (ctx, additonal, callback, scoped) {
|
|
162
|
-
var
|
|
199
|
+
var chain = object.extractObjectChain(ctx);
|
|
200
|
+
chain.length === 1 && chain.unshift(self.data);
|
|
163
201
|
if (additonal) {
|
|
164
|
-
|
|
202
|
+
chain.splice(chain.length - 1, 0, additonal);
|
|
165
203
|
}
|
|
166
|
-
var data = object.
|
|
204
|
+
var data = object.createObjectFromChain(chain);
|
|
167
205
|
if (self.action.drawer.data) {
|
|
168
|
-
self.drawerData =
|
|
169
|
-
|
|
170
|
-
|
|
206
|
+
self.drawerData = object.createObjectFromChain([
|
|
207
|
+
top === null || top === void 0 ? void 0 : top.context,
|
|
208
|
+
dataMapping.dataMapping(self.action.drawer.data, data)
|
|
209
|
+
]);
|
|
210
|
+
var clonedAction = tslib.__assign(tslib.__assign({}, self.action), { drawer: tslib.__assign({}, self.action.drawer) });
|
|
211
|
+
delete clonedAction.drawer.data;
|
|
171
212
|
self.action = clonedAction;
|
|
172
213
|
}
|
|
173
214
|
else {
|
package/lib/store/index.js
CHANGED
package/lib/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/lib/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
|
|
|
@@ -42,8 +42,12 @@ var Item = mobxStateTree.types
|
|
|
42
42
|
return self.index !== self.newIndex;
|
|
43
43
|
},
|
|
44
44
|
get locals() {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
var listStore = mobxStateTree.getParent(self, 2);
|
|
46
|
+
return object.createObject(object.extendObject(listStore.data, {
|
|
47
|
+
index: self.index,
|
|
48
|
+
// 只有table时,也可以获取选中行
|
|
49
|
+
selectedItems: listStore.selectedItems.map(function (item) { return item.data; }),
|
|
50
|
+
unSelectedItems: listStore.unSelectedItems.map(function (item) { return item.data; })
|
|
47
51
|
}), self.data);
|
|
48
52
|
},
|
|
49
53
|
get checkable() {
|
package/lib/store/manager.js
CHANGED
package/lib/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/lib/store/modal.js
CHANGED
package/lib/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/lib/store/pagination.js
CHANGED
package/lib/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/lib/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
|
|
|
@@ -11,46 +11,75 @@ var tslib = require('tslib');
|
|
|
11
11
|
var mobxStateTree = require('mobx-state-tree');
|
|
12
12
|
var helper = require('../utils/helper.js');
|
|
13
13
|
var service = require('./service.js');
|
|
14
|
+
require('../utils/api.js');
|
|
15
|
+
require('../utils/ColorScale.js');
|
|
16
|
+
require('react');
|
|
17
|
+
require('lodash/chunk');
|
|
18
|
+
require('amis-formula');
|
|
19
|
+
require('lodash/isPlainObject');
|
|
14
20
|
var object = require('../utils/object.js');
|
|
21
|
+
require('../utils/DataSchema.js');
|
|
22
|
+
require('../utils/DataScope.js');
|
|
23
|
+
require('moment');
|
|
24
|
+
require('../utils/debug.js');
|
|
25
|
+
require('react-dom');
|
|
26
|
+
require('../utils/errors.js');
|
|
27
|
+
require('../utils/tpl.js');
|
|
28
|
+
require('classnames');
|
|
29
|
+
require('../utils/filter.js');
|
|
30
|
+
require('lodash/isObject');
|
|
31
|
+
require('lodash/isString');
|
|
32
|
+
require('lodash/isBoolean');
|
|
33
|
+
require('lodash');
|
|
34
|
+
require('../utils/image.js');
|
|
35
|
+
require('../actions/Action.js');
|
|
36
|
+
require('lodash/debounce');
|
|
37
|
+
require('lodash/cloneDeep');
|
|
38
|
+
require('../utils/resize-sensor.js');
|
|
39
|
+
require('react-overlays/useRootClose');
|
|
40
|
+
require('../utils/SimpleMap.js');
|
|
41
|
+
require('lodash/mapValues');
|
|
42
|
+
require('lodash/camelCase');
|
|
43
|
+
require('uncontrollable');
|
|
44
|
+
require('hoist-non-react-statics');
|
|
45
|
+
require('../utils/validations.js');
|
|
46
|
+
require('../utils/resolveCondition.js');
|
|
47
|
+
require('../utils/Animation.js');
|
|
15
48
|
|
|
16
49
|
var RootStore = service.ServiceStore.named('RootStore')
|
|
17
50
|
.props({
|
|
18
51
|
runtimeError: mobxStateTree.types.frozen(),
|
|
19
52
|
runtimeErrorStack: mobxStateTree.types.frozen(),
|
|
20
|
-
query: mobxStateTree.types.frozen()
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
53
|
+
query: mobxStateTree.types.frozen()
|
|
54
|
+
})
|
|
55
|
+
.volatile(function (self) {
|
|
56
|
+
return {
|
|
57
|
+
context: {}
|
|
58
|
+
};
|
|
24
59
|
})
|
|
25
60
|
.views(function (self) { return ({
|
|
26
61
|
get downStream() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
62
|
+
var result = self.data;
|
|
63
|
+
if (self.context || self.query) {
|
|
64
|
+
var chain = object.extractObjectChain(result);
|
|
65
|
+
self.context && chain.unshift(self.context);
|
|
66
|
+
self.query &&
|
|
67
|
+
chain.splice(chain.length - 1, 0, tslib.__assign(tslib.__assign({}, self.query), { __query: self.query }));
|
|
68
|
+
result = object.createObjectFromChain(chain);
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
30
71
|
}
|
|
31
72
|
}); })
|
|
32
73
|
.actions(function (self) { return ({
|
|
74
|
+
setContext: function (context) {
|
|
75
|
+
self.context = context;
|
|
76
|
+
},
|
|
33
77
|
setRuntimeError: function (error, errorStack) {
|
|
34
78
|
self.runtimeError = error;
|
|
35
79
|
self.runtimeErrorStack = errorStack;
|
|
36
80
|
},
|
|
37
81
|
updateLocation: function (location, parseFn) {
|
|
38
82
|
self.query = parseFn ? parseFn(location) : helper.parseQuery(location);
|
|
39
|
-
},
|
|
40
|
-
setVisible: function (id, value) {
|
|
41
|
-
var _a;
|
|
42
|
-
var state = tslib.__assign(tslib.__assign({}, self.visibleState), (_a = {}, _a[id] = value, _a));
|
|
43
|
-
self.visibleState = state;
|
|
44
|
-
},
|
|
45
|
-
setDisable: function (id, value) {
|
|
46
|
-
var _a;
|
|
47
|
-
var state = tslib.__assign(tslib.__assign({}, self.disableState), (_a = {}, _a[id] = value, _a));
|
|
48
|
-
self.disableState = state;
|
|
49
|
-
},
|
|
50
|
-
setStatic: function (id, value) {
|
|
51
|
-
var _a;
|
|
52
|
-
var state = tslib.__assign(tslib.__assign({}, self.staticState), (_a = {}, _a[id] = value, _a));
|
|
53
|
-
self.staticState = state;
|
|
54
83
|
}
|
|
55
84
|
}); });
|
|
56
85
|
|
package/lib/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/lib/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,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-core v3.1.0
|
|
3
|
+
* Copyright 2018-2023 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
+
|
|
10
|
+
var tslib = require('tslib');
|
|
11
|
+
var mobxStateTree = require('mobx-state-tree');
|
|
12
|
+
|
|
13
|
+
var StatusStore = mobxStateTree.types
|
|
14
|
+
.model('StatusStore', {
|
|
15
|
+
visibleState: mobxStateTree.types.optional(mobxStateTree.types.frozen(), {}),
|
|
16
|
+
disableState: mobxStateTree.types.optional(mobxStateTree.types.frozen(), {}),
|
|
17
|
+
staticState: mobxStateTree.types.optional(mobxStateTree.types.frozen(), {})
|
|
18
|
+
})
|
|
19
|
+
.actions(function (self) { return ({
|
|
20
|
+
setVisible: function (key, value) {
|
|
21
|
+
var _a;
|
|
22
|
+
var state = tslib.__assign(tslib.__assign({}, self.visibleState), (_a = {}, _a[key] = value, _a));
|
|
23
|
+
self.visibleState = state;
|
|
24
|
+
},
|
|
25
|
+
setDisable: function (key, value) {
|
|
26
|
+
var _a;
|
|
27
|
+
var state = tslib.__assign(tslib.__assign({}, self.disableState), (_a = {}, _a[key] = value, _a));
|
|
28
|
+
self.disableState = state;
|
|
29
|
+
},
|
|
30
|
+
setStatic: function (key, value) {
|
|
31
|
+
var _a;
|
|
32
|
+
var state = tslib.__assign(tslib.__assign({}, self.staticState), (_a = {}, _a[key] = value, _a));
|
|
33
|
+
self.staticState = state;
|
|
34
|
+
},
|
|
35
|
+
resetAll: function () {
|
|
36
|
+
self.visibleState = {};
|
|
37
|
+
self.disableState = {};
|
|
38
|
+
self.staticState = {};
|
|
39
|
+
}
|
|
40
|
+
}); });
|
|
41
|
+
|
|
42
|
+
exports.StatusStore = StatusStore;
|
package/lib/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/lib/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
|
|
|
@@ -140,11 +140,15 @@ var Row = mobxStateTree.types
|
|
|
140
140
|
if (self.children.length) {
|
|
141
141
|
children = self.children.map(function (item) { return item.locals; });
|
|
142
142
|
}
|
|
143
|
+
var table = mobxStateTree.getParent(self, self.depth * 2);
|
|
143
144
|
var parent = mobxStateTree.getParent(self, 2);
|
|
144
145
|
return object.createObject(object.extendObject(mobxStateTree.getParent(self, self.depth * 2).data, {
|
|
145
146
|
index: self.index,
|
|
146
147
|
// todo 以后再支持多层,目前先一层
|
|
147
|
-
parent: parent.storeType === Row.name ? parent.data : undefined
|
|
148
|
+
parent: parent.storeType === Row.name ? parent.data : undefined,
|
|
149
|
+
// 只有table时,也可以获取选中行
|
|
150
|
+
selectedItems: table.selectedRows.map(function (item) { return item.data; }),
|
|
151
|
+
unSelectedItems: table.unSelectedRows.map(function (item) { return item.data; })
|
|
148
152
|
}), children
|
|
149
153
|
? tslib.__assign(tslib.__assign({}, self.data), { children: children }) : self.data);
|
|
150
154
|
},
|
|
@@ -264,6 +268,8 @@ var TableStore = iRenderer.iRendererStore
|
|
|
264
268
|
formsRef: mobxStateTree.types.optional(mobxStateTree.types.array(mobxStateTree.types.frozen()), []),
|
|
265
269
|
maxKeepItemSelectionLength: Infinity,
|
|
266
270
|
keepItemSelectionOnPageChange: false,
|
|
271
|
+
// 导出 Excel 按钮的 loading 状态
|
|
272
|
+
exportExcelLoading: false,
|
|
267
273
|
searchFormExpanded: false // 用来控制搜索框是否展开了,那个自动根据 searchable 生成的表单 autoGenerateFilter
|
|
268
274
|
})
|
|
269
275
|
.views(function (self) {
|
|
@@ -604,6 +610,8 @@ var TableStore = iRenderer.iRendererStore
|
|
|
604
610
|
config.keepItemSelectionOnPageChange !== void 0 &&
|
|
605
611
|
(self.keepItemSelectionOnPageChange =
|
|
606
612
|
config.keepItemSelectionOnPageChange);
|
|
613
|
+
config.exportExcelLoading !== undefined &&
|
|
614
|
+
(self.exportExcelLoading = config.exportExcelLoading);
|
|
607
615
|
if (config.columns && Array.isArray(config.columns)) {
|
|
608
616
|
var columns = config.columns
|
|
609
617
|
.filter(function (column) { return column; })
|
package/lib/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/lib/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
|
|
|
@@ -158,7 +158,7 @@ var TableStore2 = service.ServiceStore.named('TableStore2')
|
|
|
158
158
|
pageNo: 1,
|
|
159
159
|
pageSize: 10,
|
|
160
160
|
dragging: false,
|
|
161
|
-
rowSelectionKeyField: '
|
|
161
|
+
rowSelectionKeyField: 'id'
|
|
162
162
|
})
|
|
163
163
|
.views(function (self) {
|
|
164
164
|
function getToggable() {
|
|
@@ -386,11 +386,11 @@ var TableStore2 = service.ServiceStore.named('TableStore2')
|
|
|
386
386
|
function updateExpanded(expandedRowKeys, keyField) {
|
|
387
387
|
self.expandedRowKeys.clear();
|
|
388
388
|
helper.eachTree(self.rows, function (item) {
|
|
389
|
-
if (~expandedRowKeys.indexOf(item.pristine[keyField
|
|
390
|
-
self.expandedRowKeys.push(item.pristine[keyField
|
|
389
|
+
if (~expandedRowKeys.indexOf(item.pristine[keyField])) {
|
|
390
|
+
self.expandedRowKeys.push(item.pristine[keyField]);
|
|
391
391
|
}
|
|
392
|
-
else if (find__default["default"](expandedRowKeys, function (a) { return a && a == item.pristine[keyField
|
|
393
|
-
self.expandedRowKeys.push(item.pristine[keyField
|
|
392
|
+
else if (find__default["default"](expandedRowKeys, function (a) { return a && a == item.pristine[keyField]; })) {
|
|
393
|
+
self.expandedRowKeys.push(item.pristine[keyField]);
|
|
394
394
|
}
|
|
395
395
|
});
|
|
396
396
|
}
|
package/lib/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/lib/theme.js
CHANGED
package/lib/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/lib/utils/Animation.js
CHANGED
package/lib/utils/ColorScale.js
CHANGED
package/lib/utils/DataSchema.js
CHANGED
package/lib/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
|
}
|