amis-core 6.11.0-beta.0 → 6.11.0-beta.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/esm/Root.d.ts +3 -0
- package/esm/Root.js +1 -1
- package/esm/RootRenderer.js +14 -8
- package/esm/SchemaRenderer.d.ts +2 -13
- package/esm/SchemaRenderer.js +36 -72
- package/esm/Scoped.js +1 -1
- package/esm/StatusScoped.js +1 -1
- package/esm/StyleManager.js +1 -1
- package/esm/WithRootStore.d.ts +1 -1
- package/esm/WithRootStore.js +1 -1
- package/esm/WithStore.js +1 -1
- package/esm/actions/Action.js +1 -1
- 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 +6 -2
- package/esm/actions/ContinueAction.js +1 -1
- package/esm/actions/CopyAction.js +1 -1
- package/esm/actions/CustomAction.js +1 -1
- package/esm/actions/DialogAction.js +1 -1
- package/esm/actions/DrawerAction.js +1 -1
- package/esm/actions/EmailAction.js +1 -1
- package/esm/actions/EventAction.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/PrintAction.js +1 -1
- package/esm/actions/StatusAction.js +1 -1
- package/esm/actions/SwitchAction.js +1 -1
- package/esm/actions/ToastAction.js +1 -1
- package/esm/actions/WaitAction.js +1 -1
- package/esm/components/Animations.d.ts +8 -0
- package/esm/components/Animations.js +158 -0
- package/esm/components/CustomStyle.js +1 -1
- package/esm/components/ErrorBoundary.js +1 -1
- package/esm/components/LazyComponent.d.ts +1 -1
- package/esm/components/LazyComponent.js +1 -1
- package/esm/components/Overlay.js +1 -1
- package/esm/components/PopOver.d.ts +1 -1
- package/esm/components/PopOver.js +1 -1
- package/esm/env.d.ts +1 -1
- package/esm/env.js +1 -1
- package/esm/envOverwrite.js +1 -1
- package/esm/factory.d.ts +1 -0
- package/esm/factory.js +1 -1
- package/esm/globalVar.d.ts +173 -0
- package/esm/globalVar.js +122 -0
- package/esm/globalVarClientHandler.d.ts +1 -0
- package/esm/globalVarClientHandler.js +65 -0
- package/esm/globalVarDefaultValueHandler.d.ts +1 -0
- package/esm/globalVarDefaultValueHandler.js +28 -0
- package/esm/index.d.ts +3 -0
- package/esm/index.js +8 -5
- package/esm/locale.d.ts +1 -1
- package/esm/locale.js +1 -1
- package/esm/polyfills.js +1 -1
- package/esm/renderers/Form.d.ts +3 -1
- package/esm/renderers/Form.js +39 -24
- package/esm/renderers/Item.d.ts +11 -17
- package/esm/renderers/Item.js +17 -2
- package/esm/renderers/Options.js +1 -1
- 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 +1 -1
- package/esm/renderers/wrapControl.js +1 -1
- package/esm/store/app.js +1 -1
- package/esm/store/combo.js +1 -1
- package/esm/store/crud.d.ts +8 -0
- package/esm/store/crud.js +24 -17
- package/esm/store/form.js +14 -5
- package/esm/store/formItem.js +1 -1
- package/esm/store/iRenderer.js +1 -1
- package/esm/store/index.js +1 -1
- package/esm/store/list.d.ts +14 -1
- package/esm/store/list.js +45 -17
- package/esm/store/manager.js +1 -1
- package/esm/store/modal.js +1 -1
- package/esm/store/node.js +1 -1
- package/esm/store/pagination.js +1 -1
- package/esm/store/root.d.ts +14 -0
- package/esm/store/root.js +483 -12
- package/esm/store/service.js +1 -1
- package/esm/store/status.js +1 -1
- package/esm/store/table.d.ts +16 -2
- package/esm/store/table.js +83 -26
- package/esm/store/table2.js +1 -1
- package/esm/theme.d.ts +1 -1
- package/esm/theme.js +1 -1
- package/esm/types.d.ts +3 -2
- 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.js +1 -1
- package/esm/utils/RootClose.js +1 -1
- package/esm/utils/SimpleMap.js +1 -1
- package/esm/utils/animations.d.ts +4 -0
- package/esm/utils/animations.js +1 -1
- package/esm/utils/api.d.ts +1 -0
- package/esm/utils/api.js +18 -6
- package/esm/utils/arraySlice.js +1 -1
- package/esm/utils/attachmentAdpator.js +1 -1
- package/esm/utils/autobind.js +1 -1
- package/esm/utils/browser.js +1 -1
- package/esm/utils/columnsSplit.js +1 -1
- package/esm/utils/concatData.js +1 -1
- package/esm/utils/dataMapping.js +1 -1
- package/esm/utils/date.js +1 -1
- package/esm/utils/debug.js +1 -1
- package/esm/utils/decodeEntity.js +1 -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 +1 -1
- package/esm/utils/handleAction.js +1 -1
- package/esm/utils/helper.d.ts +5 -0
- package/esm/utils/helper.js +6 -2
- package/esm/utils/highlight.js +1 -1
- package/esm/utils/icon.js +1 -1
- package/esm/utils/image.js +1 -1
- package/esm/utils/isPureVariable.js +1 -1
- package/esm/utils/json-schema-2-amis-schema.js +1 -1
- package/esm/utils/keyToPath.js +1 -1
- package/esm/utils/labelToString.js +1 -1
- package/esm/utils/loopTooMuch.js +1 -1
- package/esm/utils/makeSorter.js +1 -1
- package/esm/utils/math.js +1 -1
- package/esm/utils/memoryParse.js +1 -1
- package/esm/utils/normalizeLink.js +1 -1
- package/esm/utils/normalizeOptions.js +1 -1
- package/esm/utils/object.js +1 -1
- 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/printElement.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 +1 -1
- package/esm/utils/resolveVariableAndFilter.js +1 -1
- package/esm/utils/resolveVariableAndFilterForAsync.js +1 -1
- 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.js +1 -1
- package/esm/utils/style.js +1 -1
- package/esm/utils/toNumber.js +1 -1
- package/esm/utils/tokenize.js +1 -1
- package/esm/utils/tpl-builtin.js +1 -1
- 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/validateId.js +1 -1
- package/esm/utils/validations.js +1 -1
- package/esm/utils/visitedCache.js +1 -1
- package/lib/Root.d.ts +3 -0
- package/lib/Root.js +1 -1
- package/lib/RootRenderer.d.ts +1 -1
- package/lib/RootRenderer.js +13 -7
- package/lib/SchemaRenderer.d.ts +2 -13
- package/lib/SchemaRenderer.js +35 -71
- package/lib/Scoped.js +1 -1
- package/lib/StatusScoped.js +1 -1
- package/lib/StyleManager.js +1 -1
- package/lib/WithRootStore.d.ts +1 -1
- package/lib/WithRootStore.js +1 -1
- package/lib/WithStore.js +1 -1
- package/lib/actions/Action.js +1 -1
- 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 +6 -2
- package/lib/actions/ContinueAction.js +1 -1
- package/lib/actions/CopyAction.js +1 -1
- package/lib/actions/CustomAction.js +1 -1
- package/lib/actions/DialogAction.js +1 -1
- package/lib/actions/DrawerAction.js +1 -1
- package/lib/actions/EmailAction.js +1 -1
- package/lib/actions/EventAction.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/PrintAction.js +1 -1
- package/lib/actions/StatusAction.js +1 -1
- package/lib/actions/SwitchAction.js +1 -1
- package/lib/actions/ToastAction.js +1 -1
- package/lib/actions/WaitAction.js +1 -1
- package/lib/components/Animations.d.ts +8 -0
- package/lib/components/Animations.js +172 -0
- package/lib/components/CustomStyle.js +1 -1
- package/lib/components/ErrorBoundary.js +1 -1
- package/lib/components/LazyComponent.d.ts +1 -1
- package/lib/components/LazyComponent.js +1 -1
- package/lib/components/Overlay.js +1 -1
- package/lib/components/PopOver.d.ts +1 -1
- package/lib/components/PopOver.js +1 -1
- package/lib/env.d.ts +1 -1
- package/lib/env.js +1 -1
- package/lib/envOverwrite.js +1 -1
- package/lib/factory.d.ts +1 -0
- package/lib/factory.js +1 -1
- package/lib/globalVar.d.ts +173 -0
- package/lib/globalVar.js +130 -0
- package/lib/globalVarClientHandler.d.ts +1 -0
- package/lib/globalVarClientHandler.js +67 -0
- package/lib/globalVarDefaultValueHandler.d.ts +1 -0
- package/lib/globalVarDefaultValueHandler.js +30 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +13 -4
- package/lib/locale.d.ts +1 -1
- package/lib/locale.js +1 -1
- package/lib/polyfills.js +1 -1
- package/lib/renderers/Form.d.ts +3 -1
- package/lib/renderers/Form.js +37 -21
- package/lib/renderers/Item.d.ts +11 -17
- package/lib/renderers/Item.js +17 -2
- package/lib/renderers/Options.js +1 -1
- 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 +1 -1
- package/lib/renderers/wrapControl.js +1 -1
- package/lib/store/app.js +1 -1
- package/lib/store/combo.d.ts +24 -25
- package/lib/store/combo.js +1 -1
- package/lib/store/crud.d.ts +8 -0
- package/lib/store/crud.js +23 -16
- package/lib/store/form.d.ts +10 -11
- package/lib/store/form.js +14 -5
- package/lib/store/formItem.js +1 -1
- package/lib/store/iRenderer.js +1 -1
- package/lib/store/index.js +1 -1
- package/lib/store/list.d.ts +14 -1
- package/lib/store/list.js +44 -16
- package/lib/store/manager.js +1 -1
- package/lib/store/modal.js +1 -1
- package/lib/store/node.js +1 -1
- package/lib/store/pagination.js +1 -1
- package/lib/store/root.d.ts +13 -0
- package/lib/store/root.js +487 -11
- package/lib/store/service.js +1 -1
- package/lib/store/status.js +1 -1
- package/lib/store/table.d.ts +36 -23
- package/lib/store/table.js +82 -25
- package/lib/store/table2.js +1 -1
- package/lib/theme.d.ts +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.d.ts +3 -2
- 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.js +1 -1
- package/lib/utils/RootClose.js +1 -1
- package/lib/utils/SimpleMap.js +1 -1
- package/lib/utils/animations.d.ts +4 -0
- package/lib/utils/animations.js +1 -1
- package/lib/utils/api.d.ts +1 -0
- package/lib/utils/api.js +18 -5
- package/lib/utils/arraySlice.js +1 -1
- package/lib/utils/attachmentAdpator.js +1 -1
- package/lib/utils/autobind.js +1 -1
- package/lib/utils/browser.js +1 -1
- package/lib/utils/columnsSplit.js +1 -1
- package/lib/utils/concatData.js +1 -1
- package/lib/utils/dataMapping.js +1 -1
- package/lib/utils/date.js +1 -1
- package/lib/utils/debug.js +1 -1
- package/lib/utils/decodeEntity.js +1 -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 +1 -1
- package/lib/utils/handleAction.js +1 -1
- package/lib/utils/helper.d.ts +5 -0
- package/lib/utils/helper.js +6 -2
- package/lib/utils/highlight.js +1 -1
- package/lib/utils/icon.js +1 -1
- package/lib/utils/image.js +1 -1
- package/lib/utils/isPureVariable.js +1 -1
- package/lib/utils/json-schema-2-amis-schema.js +1 -1
- package/lib/utils/keyToPath.js +1 -1
- package/lib/utils/labelToString.js +1 -1
- package/lib/utils/loopTooMuch.js +1 -1
- package/lib/utils/makeSorter.js +1 -1
- package/lib/utils/math.js +1 -1
- package/lib/utils/memoryParse.js +1 -1
- package/lib/utils/normalizeLink.js +1 -1
- package/lib/utils/normalizeOptions.js +1 -1
- package/lib/utils/object.js +1 -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/printElement.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 +1 -1
- package/lib/utils/resolveVariableAndFilter.js +1 -1
- package/lib/utils/resolveVariableAndFilterForAsync.js +1 -1
- 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.js +1 -1
- package/lib/utils/style.js +1 -1
- package/lib/utils/toNumber.js +1 -1
- package/lib/utils/tokenize.js +1 -1
- package/lib/utils/tpl-builtin.js +1 -1
- 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/validateId.js +1 -1
- package/lib/utils/validations.js +1 -1
- package/lib/utils/visitedCache.js +1 -1
- package/package.json +2 -2
package/esm/store/list.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.11.0-beta.
|
|
2
|
+
* amis-core v6.11.0-beta.2
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { __assign, __rest } from 'tslib';
|
|
7
7
|
import { types, getParent } from 'mobx-state-tree';
|
|
8
8
|
import { iRendererStore } from './iRenderer.js';
|
|
9
9
|
import isEqual from 'lodash/isEqual';
|
|
@@ -35,12 +35,7 @@ var Item = types
|
|
|
35
35
|
},
|
|
36
36
|
get locals() {
|
|
37
37
|
var listStore = getParent(self, 2);
|
|
38
|
-
return createObject(extendObject(listStore.data, {
|
|
39
|
-
index: self.index,
|
|
40
|
-
// 只有table时,也可以获取选中行
|
|
41
|
-
selectedItems: listStore.selectedItems.map(function (item) { return item.data; }),
|
|
42
|
-
unSelectedItems: listStore.unSelectedItems.map(function (item) { return item.data; })
|
|
43
|
-
}), self.data);
|
|
38
|
+
return createObject(extendObject(listStore.data, __assign({ index: self.index }, listStore.eventContext)), self.data);
|
|
44
39
|
},
|
|
45
40
|
get checkable() {
|
|
46
41
|
var table = getParent(self, 2);
|
|
@@ -78,6 +73,11 @@ var ListStore = iRendererStore
|
|
|
78
73
|
.named('ListStore')
|
|
79
74
|
.props({
|
|
80
75
|
items: types.array(Item),
|
|
76
|
+
// 记录原始列表和原始选中的列表
|
|
77
|
+
// 因为如果是前端分页,上层 crud 或者 input-table 下发到这层的
|
|
78
|
+
// 是某个页区间的数据,这个时候 items 和 selectedItems 会少很多条
|
|
79
|
+
fullItems: types.optional(types.array(types.frozen()), []),
|
|
80
|
+
fullSelectedItems: types.optional(types.array(types.frozen()), []),
|
|
81
81
|
selectedItems: types.array(types.reference(Item)),
|
|
82
82
|
primaryField: 'id',
|
|
83
83
|
orderBy: '',
|
|
@@ -131,6 +131,36 @@ var ListStore = iRendererStore
|
|
|
131
131
|
},
|
|
132
132
|
get movedItems() {
|
|
133
133
|
return getMovedItems();
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* 构建事件的上下文数据
|
|
137
|
+
* @param buildChain
|
|
138
|
+
* @returns
|
|
139
|
+
*/
|
|
140
|
+
get eventContext() {
|
|
141
|
+
var context = {
|
|
142
|
+
selectedItems: self.selectedItems.map(function (item) { return item.data; }),
|
|
143
|
+
selectedIndexes: self.selectedItems.map(function (item) { return item.index; }),
|
|
144
|
+
items: self.items.map(function (item) { return item.data; }),
|
|
145
|
+
unSelectedItems: this.unSelectedItems.map(function (item) { return item.data; })
|
|
146
|
+
};
|
|
147
|
+
// 如果是前端分页情况,需要根据全量数据计算
|
|
148
|
+
// 如果不是前端分页,数据都没有返回,那种就没办法支持全量数据信息了
|
|
149
|
+
if (self.fullItems.length > self.items.length) {
|
|
150
|
+
// todo 这里的选择顺序会一直变,这个有影响吗?
|
|
151
|
+
var selectedItems_1 = self.fullSelectedItems
|
|
152
|
+
.filter(function (item) {
|
|
153
|
+
return !self.items.find(function (row) { return row.pristine === (item.__pristine || item); });
|
|
154
|
+
})
|
|
155
|
+
.concat(context.selectedItems);
|
|
156
|
+
context.selectedItems = selectedItems_1;
|
|
157
|
+
context.items = self.fullItems.concat();
|
|
158
|
+
context.unSelectedItems = self.fullItems.filter(function (item) { return !selectedItems_1.includes(item); });
|
|
159
|
+
context.selectedIndexes = selectedItems_1.map(function (item) {
|
|
160
|
+
return self.fullItems.indexOf(item.__pristine || item);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
return context;
|
|
134
164
|
}
|
|
135
165
|
};
|
|
136
166
|
})
|
|
@@ -150,7 +180,7 @@ var ListStore = iRendererStore
|
|
|
150
180
|
config.itemDraggableOn === void 0 ||
|
|
151
181
|
(self.itemDraggableOn = config.itemDraggableOn);
|
|
152
182
|
}
|
|
153
|
-
function initItems(items) {
|
|
183
|
+
function initItems(items, fullItems, fullSelectedItems) {
|
|
154
184
|
var arr = items.map(function (item, key) {
|
|
155
185
|
item = isObject(item)
|
|
156
186
|
? item
|
|
@@ -162,14 +192,16 @@ var ListStore = iRendererStore
|
|
|
162
192
|
id: guid(),
|
|
163
193
|
index: key,
|
|
164
194
|
newIndex: key,
|
|
165
|
-
pristine: item,
|
|
166
|
-
data: item
|
|
167
|
-
modified: false
|
|
195
|
+
pristine: item.__pristine || item,
|
|
196
|
+
data: item
|
|
168
197
|
};
|
|
169
198
|
});
|
|
170
199
|
self.selectedItems.clear();
|
|
171
200
|
self.items.replace(arr);
|
|
172
201
|
self.dragging = false;
|
|
202
|
+
Array.isArray(fullItems) && self.fullItems.replace(fullItems);
|
|
203
|
+
Array.isArray(fullSelectedItems) &&
|
|
204
|
+
self.fullSelectedItems.replace(fullSelectedItems);
|
|
173
205
|
}
|
|
174
206
|
function updateSelected(selected, valueField) {
|
|
175
207
|
self.selectedItems.clear();
|
|
@@ -253,11 +285,7 @@ var ListStore = iRendererStore
|
|
|
253
285
|
self.items.replace(newItems);
|
|
254
286
|
}
|
|
255
287
|
function getData(superData) {
|
|
256
|
-
return createObject(superData, {
|
|
257
|
-
items: self.items.map(function (item) { return item.data; }),
|
|
258
|
-
selectedItems: self.selectedItems.map(function (item) { return item.data; }),
|
|
259
|
-
unSelectedItems: self.unSelectedItems.map(function (item) { return item.data; })
|
|
260
|
-
});
|
|
288
|
+
return createObject(superData, __assign({}, self.eventContext));
|
|
261
289
|
}
|
|
262
290
|
return {
|
|
263
291
|
getData: getData,
|
package/esm/store/manager.js
CHANGED
package/esm/store/modal.js
CHANGED
package/esm/store/node.js
CHANGED
package/esm/store/pagination.js
CHANGED
package/esm/store/root.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import { Instance } from 'mobx-state-tree';
|
|
3
|
+
import { GlobalVariableItem, GlobalVariableState, GlobalVariableItemFull } from '../globalVar';
|
|
2
4
|
export declare const RootStore: import("mobx-state-tree").IModelType<{
|
|
3
5
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
4
6
|
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
@@ -34,6 +36,7 @@ export declare const RootStore: import("mobx-state-tree").IModelType<{
|
|
|
34
36
|
runtimeErrorStack: import("mobx-state-tree").IType<any, any, any>;
|
|
35
37
|
query: import("mobx-state-tree").IType<any, any, any>;
|
|
36
38
|
ready: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
39
|
+
globalVarStates: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IMapType<import("mobx-state-tree").IType<GlobalVariableState, GlobalVariableState, GlobalVariableState>>, [undefined]>;
|
|
37
40
|
}, {
|
|
38
41
|
readonly parentStore: any;
|
|
39
42
|
readonly __: any;
|
|
@@ -79,12 +82,23 @@ export declare const RootStore: import("mobx-state-tree").IModelType<{
|
|
|
79
82
|
checkRemote: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
|
|
80
83
|
} & {
|
|
81
84
|
context: {};
|
|
85
|
+
globalVars: GlobalVariableItemFull[];
|
|
86
|
+
globalData: any;
|
|
82
87
|
} & {
|
|
83
88
|
readonly downStream: any;
|
|
84
89
|
} & {
|
|
85
90
|
updateContext(context: any): void;
|
|
91
|
+
updateGlobalVarState(key: string, state: Partial<GlobalVariableState>): void;
|
|
92
|
+
setGlobalVars: (vars?: Array<GlobalVariableItem>) => Promise<any>;
|
|
93
|
+
updateGlobalVarValue: (key: string, value: any) => void;
|
|
94
|
+
modifyGlobalVarValue: (key: string, options: {
|
|
95
|
+
op: 'set' | 'merge' | 'push' | 'unshift' | 'remove' | 'toggle' | 'empty' | 'sort' | 'reverse' | 'refresh';
|
|
96
|
+
value: any;
|
|
97
|
+
}) => void;
|
|
98
|
+
saveGlobalVarValues: import("lodash").DebouncedFunc<(key?: string) => Promise<void>>;
|
|
86
99
|
setRuntimeError(error: any, errorStack: any): void;
|
|
87
100
|
updateLocation(location?: any, parseFn?: Function): void;
|
|
88
101
|
init: (schema: any) => Promise<any>;
|
|
102
|
+
afterDestroy(): void;
|
|
89
103
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
90
104
|
export type IRootStore = Instance<typeof RootStore>;
|