amis-core 6.3.0 → 6.4.1
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.js +1 -1
- package/esm/RootRenderer.js +1 -1
- package/esm/SchemaRenderer.js +3 -2
- package/esm/Scoped.d.ts +1 -0
- package/esm/Scoped.js +28 -14
- package/esm/StatusScoped.js +1 -1
- package/esm/WithRootStore.js +1 -1
- package/esm/WithStore.js +1 -1
- package/esm/actions/Action.js +4 -2
- package/esm/actions/AjaxAction.js +29 -19
- package/esm/actions/BreakAction.js +1 -1
- package/esm/actions/BroadcastAction.js +1 -1
- package/esm/actions/CmptAction.js +2 -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 +30 -14
- package/esm/actions/DrawerAction.js +15 -7
- 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.d.ts +2 -2
- package/esm/actions/PrintAction.js +6 -6
- 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/CustomStyle.js +1 -4
- package/esm/components/ErrorBoundary.js +1 -1
- package/esm/components/LazyComponent.js +1 -1
- package/esm/components/Overlay.js +1 -1
- package/esm/components/PopOver.js +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/index.js +2 -2
- package/esm/locale.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +12 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/createClass.js +26 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/defineProperty.js +23 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +19 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +14 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/typeof.js +16 -0
- package/esm/node_modules/@rc-component/mini-decimal/es/BigIntDecimal.js +184 -0
- package/esm/node_modules/@rc-component/mini-decimal/es/MiniDecimal.js +56 -0
- package/esm/node_modules/@rc-component/mini-decimal/es/NumberDecimal.js +119 -0
- package/esm/node_modules/@rc-component/mini-decimal/es/numberUtil.js +105 -0
- package/esm/node_modules/@rc-component/mini-decimal/es/supportUtil.js +10 -0
- package/esm/polyfills.js +1 -1
- package/esm/renderers/Form.d.ts +3 -2
- package/esm/renderers/Form.js +55 -44
- package/esm/renderers/Item.js +1 -1
- 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.js +31 -27
- package/esm/store/app.js +1 -1
- package/esm/store/combo.js +1 -1
- package/esm/store/crud.js +12 -6
- package/esm/store/form.js +1 -1
- package/esm/store/formItem.js +1 -1
- package/esm/store/iRenderer.js +6 -3
- package/esm/store/index.js +1 -1
- package/esm/store/list.d.ts +13 -0
- package/esm/store/list.js +14 -1
- 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.js +1 -1
- package/esm/store/service.js +1 -1
- package/esm/store/status.js +1 -1
- package/esm/store/table.d.ts +1 -0
- package/esm/store/table.js +5 -1
- package/esm/store/table2.js +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.js +1 -1
- package/esm/utils/RootClose.js +1 -1
- package/esm/utils/SimpleMap.js +1 -1
- package/esm/utils/api.js +1 -1
- 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 +3 -3
- 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.js +3 -3
- 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/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.d.ts +2 -0
- package/esm/utils/renderer-event.js +13 -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 +5 -2
- 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 +4 -4
- package/esm/utils/uncontrollable.js +1 -1
- package/esm/utils/validateId.js +1 -1
- package/esm/utils/validations.js +1 -1
- package/lib/Root.js +1 -1
- package/lib/RootRenderer.js +1 -1
- package/lib/SchemaRenderer.js +3 -2
- package/lib/Scoped.d.ts +1 -0
- package/lib/Scoped.js +28 -14
- package/lib/StatusScoped.js +1 -1
- package/lib/WithRootStore.js +1 -1
- package/lib/WithStore.js +1 -1
- package/lib/actions/Action.js +4 -2
- package/lib/actions/AjaxAction.js +29 -19
- package/lib/actions/BreakAction.js +1 -1
- package/lib/actions/BroadcastAction.js +1 -1
- package/lib/actions/CmptAction.js +2 -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 +30 -14
- package/lib/actions/DrawerAction.js +15 -7
- 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.d.ts +2 -2
- package/lib/actions/PrintAction.js +6 -6
- 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/CustomStyle.js +1 -4
- package/lib/components/ErrorBoundary.js +1 -1
- package/lib/components/LazyComponent.js +1 -1
- package/lib/components/Overlay.js +1 -1
- package/lib/components/PopOver.js +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/index.js +2 -2
- package/lib/locale.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +16 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/createClass.js +30 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/defineProperty.js +27 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +23 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +18 -0
- package/lib/node_modules/@babel/runtime/helpers/esm/typeof.js +20 -0
- package/lib/node_modules/@rc-component/mini-decimal/es/BigIntDecimal.js +188 -0
- package/lib/node_modules/@rc-component/mini-decimal/es/MiniDecimal.js +61 -0
- package/lib/node_modules/@rc-component/mini-decimal/es/NumberDecimal.js +123 -0
- package/lib/node_modules/@rc-component/mini-decimal/es/numberUtil.js +114 -0
- package/lib/node_modules/@rc-component/mini-decimal/es/supportUtil.js +14 -0
- package/lib/polyfills.js +1 -1
- package/lib/renderers/Form.d.ts +3 -2
- package/lib/renderers/Form.js +55 -44
- package/lib/renderers/Item.js +1 -1
- 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.js +31 -27
- package/lib/store/app.js +1 -1
- package/lib/store/combo.js +1 -1
- package/lib/store/crud.js +12 -6
- package/lib/store/form.js +1 -1
- package/lib/store/formItem.js +1 -1
- package/lib/store/iRenderer.js +5 -2
- package/lib/store/index.js +1 -1
- package/lib/store/list.d.ts +13 -0
- package/lib/store/list.js +14 -1
- 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.js +1 -1
- package/lib/store/service.js +1 -1
- package/lib/store/status.js +1 -1
- package/lib/store/table.d.ts +1 -0
- package/lib/store/table.js +5 -1
- package/lib/store/table2.js +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.js +1 -1
- package/lib/utils/RootClose.js +1 -1
- package/lib/utils/SimpleMap.js +1 -1
- package/lib/utils/api.js +1 -1
- 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 +3 -3
- 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.js +3 -4
- 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/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.d.ts +2 -0
- package/lib/utils/renderer-event.js +13 -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 +5 -2
- 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 +4 -4
- package/lib/utils/uncontrollable.js +1 -1
- package/lib/utils/validateId.js +1 -1
- package/lib/utils/validations.js +1 -1
- package/package.json +2 -2
package/esm/renderers/Form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.
|
|
2
|
+
* amis-core v6.4.1
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -68,6 +68,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
68
68
|
// 如果开启了 lazyChange,需要一个 flush 方法把队列中值应用上。
|
|
69
69
|
_this.flushing = false;
|
|
70
70
|
_this.emittedData = null;
|
|
71
|
+
_this.emitting = false;
|
|
71
72
|
_this.onInit = _this.onInit.bind(_this);
|
|
72
73
|
_this.handleAction = _this.handleAction.bind(_this);
|
|
73
74
|
_this.handleQuery = _this.handleQuery.bind(_this);
|
|
@@ -184,7 +185,6 @@ var Form = /** @class */ (function (_super) {
|
|
|
184
185
|
return until(function () { return store.checkRemote(initAsyncApi, store.data); }, function (ret) { return ret && ret[initFinishedField || 'finished']; }, function (cancel) { return (_this.asyncCancel = cancel); }, initCheckInterval);
|
|
185
186
|
}
|
|
186
187
|
})
|
|
187
|
-
.then(this.dispatchInited)
|
|
188
188
|
.then(this.initInterval)
|
|
189
189
|
.then(this.onInit);
|
|
190
190
|
}
|
|
@@ -205,8 +205,8 @@ var Form = /** @class */ (function (_super) {
|
|
|
205
205
|
successMessage: fetchSuccess,
|
|
206
206
|
errorMessage: fetchFailed
|
|
207
207
|
})
|
|
208
|
-
.then(this.
|
|
209
|
-
.then(this.
|
|
208
|
+
.then(this.initInterval)
|
|
209
|
+
.then(this.dispatchInited);
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
212
|
Form.prototype.componentWillUnmount = function () {
|
|
@@ -236,20 +236,18 @@ var Form = /** @class */ (function (_super) {
|
|
|
236
236
|
Form.prototype.dispatchInited = function (value) {
|
|
237
237
|
var _a;
|
|
238
238
|
return __awaiter(this, void 0, void 0, function () {
|
|
239
|
-
var _b, data, store, dispatchEvent;
|
|
239
|
+
var _b, data, store, dispatchEvent, result;
|
|
240
240
|
return __generator(this, function (_c) {
|
|
241
241
|
switch (_c.label) {
|
|
242
242
|
case 0:
|
|
243
243
|
_b = this.props, data = _b.data, store = _b.store, dispatchEvent = _b.dispatchEvent;
|
|
244
|
-
if (store.fetching) {
|
|
244
|
+
if (!isAlive(store) || store.fetching) {
|
|
245
245
|
return [2 /*return*/, value];
|
|
246
246
|
}
|
|
247
|
-
// 派发init事件,参数为初始化数据
|
|
248
247
|
return [4 /*yield*/, dispatchEvent('inited', createObject(data, __assign(__assign({}, value === null || value === void 0 ? void 0 : value.data), { responseData: (_a = value === null || value === void 0 ? void 0 : value.data) !== null && _a !== void 0 ? _a : {}, responseStatus: store.error ? 1 : 0, responseMsg: store.msg })))];
|
|
249
248
|
case 1:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
return [2 /*return*/, value];
|
|
249
|
+
result = _c.sent();
|
|
250
|
+
return [2 /*return*/, result];
|
|
253
251
|
}
|
|
254
252
|
});
|
|
255
253
|
});
|
|
@@ -270,7 +268,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
270
268
|
};
|
|
271
269
|
Form.prototype.onInit = function () {
|
|
272
270
|
return __awaiter(this, void 0, void 0, function () {
|
|
273
|
-
var _a, onInit, store, persistData, submitOnInit, data, initedAt, hooks, groupedHooks;
|
|
271
|
+
var _a, onInit, store, persistData, submitOnInit, data, initedAt, hooks, groupedHooks, dispatch;
|
|
274
272
|
return __generator(this, function (_b) {
|
|
275
273
|
switch (_b.label) {
|
|
276
274
|
case 0:
|
|
@@ -315,6 +313,13 @@ var Form = /** @class */ (function (_super) {
|
|
|
315
313
|
data = cloneObject(store.data);
|
|
316
314
|
}
|
|
317
315
|
onInit && onInit(data, this.props);
|
|
316
|
+
return [4 /*yield*/, this.dispatchInited({ data: data })];
|
|
317
|
+
case 4:
|
|
318
|
+
dispatch = _b.sent();
|
|
319
|
+
if (dispatch === null || dispatch === void 0 ? void 0 : dispatch.prevented) {
|
|
320
|
+
return [2 /*return*/];
|
|
321
|
+
}
|
|
322
|
+
// submitOnInit
|
|
318
323
|
submitOnInit &&
|
|
319
324
|
this.handleAction(undefined, {
|
|
320
325
|
type: 'submit'
|
|
@@ -340,7 +345,8 @@ var Form = /** @class */ (function (_super) {
|
|
|
340
345
|
store.updateData((_c = {},
|
|
341
346
|
_c[initFinishedField || 'finished'] = false,
|
|
342
347
|
_c));
|
|
343
|
-
|
|
348
|
+
result = undefined;
|
|
349
|
+
if (!isEffectiveApi(initApi, store.data)) return [3 /*break*/, 2];
|
|
344
350
|
return [4 /*yield*/, store.fetchInitData(initApi, store.data, {
|
|
345
351
|
successMessage: fetchSuccess,
|
|
346
352
|
errorMessage: fetchFailed,
|
|
@@ -356,20 +362,18 @@ var Form = /** @class */ (function (_super) {
|
|
|
356
362
|
})];
|
|
357
363
|
case 1:
|
|
358
364
|
result = _d.sent();
|
|
359
|
-
// 派发初始化接口请求完成事件
|
|
360
|
-
return [4 /*yield*/, this.dispatchInited(result)];
|
|
361
|
-
case 2:
|
|
362
|
-
// 派发初始化接口请求完成事件
|
|
363
|
-
_d.sent();
|
|
364
365
|
if (result === null || result === void 0 ? void 0 : result.ok) {
|
|
365
366
|
this.initInterval(result);
|
|
366
367
|
store.reset(undefined, false);
|
|
367
368
|
}
|
|
368
|
-
return [3 /*break*/,
|
|
369
|
-
case
|
|
369
|
+
return [3 /*break*/, 3];
|
|
370
|
+
case 2:
|
|
370
371
|
store.reset(undefined, false);
|
|
371
|
-
_d.label =
|
|
372
|
-
case
|
|
372
|
+
_d.label = 3;
|
|
373
|
+
case 3:
|
|
374
|
+
// 派发初始化接口请求完成事件
|
|
375
|
+
this.dispatchInited(result);
|
|
376
|
+
return [2 /*return*/];
|
|
373
377
|
}
|
|
374
378
|
});
|
|
375
379
|
});
|
|
@@ -471,7 +475,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
471
475
|
return __generator(this, function (_a) {
|
|
472
476
|
switch (_a.label) {
|
|
473
477
|
case 0:
|
|
474
|
-
_a.trys.push([0, ,
|
|
478
|
+
_a.trys.push([0, , 4, 5]);
|
|
475
479
|
if (this.flushing) {
|
|
476
480
|
return [2 /*return*/];
|
|
477
481
|
}
|
|
@@ -480,14 +484,16 @@ var Form = /** @class */ (function (_super) {
|
|
|
480
484
|
return [4 /*yield*/, Promise.all(hooks.map(function (fn) { return fn(); }))];
|
|
481
485
|
case 1:
|
|
482
486
|
_a.sent();
|
|
487
|
+
if (!!this.emitting) return [3 /*break*/, 3];
|
|
483
488
|
return [4 /*yield*/, this.lazyEmitChange.flush()];
|
|
484
489
|
case 2:
|
|
485
490
|
_a.sent();
|
|
486
|
-
|
|
487
|
-
case 3:
|
|
491
|
+
_a.label = 3;
|
|
492
|
+
case 3: return [3 /*break*/, 5];
|
|
493
|
+
case 4:
|
|
488
494
|
this.flushing = false;
|
|
489
495
|
return [7 /*endfinally*/];
|
|
490
|
-
case
|
|
496
|
+
case 5: return [2 /*return*/];
|
|
491
497
|
}
|
|
492
498
|
});
|
|
493
499
|
});
|
|
@@ -541,32 +547,34 @@ var Form = /** @class */ (function (_super) {
|
|
|
541
547
|
var dispatchEvent = this.props.dispatchEvent;
|
|
542
548
|
return dispatchEvent(type, data);
|
|
543
549
|
};
|
|
544
|
-
Form.prototype.emitChange = function (submit,
|
|
545
|
-
if (
|
|
550
|
+
Form.prototype.emitChange = function (submit, emitedFromWatch) {
|
|
551
|
+
if (emitedFromWatch === void 0) { emitedFromWatch = false; }
|
|
546
552
|
return __awaiter(this, void 0, void 0, function () {
|
|
547
|
-
var _a, onChange, store, submitOnChange,
|
|
553
|
+
var _a, onChange, store, submitOnChange, dispatchEvent_1, data, diff, changeProps, dispatcher;
|
|
548
554
|
return __generator(this, function (_b) {
|
|
549
555
|
switch (_b.label) {
|
|
550
556
|
case 0:
|
|
551
|
-
|
|
557
|
+
_b.trys.push([0, , 4, 5]);
|
|
558
|
+
this.emitting = true;
|
|
559
|
+
_a = this.props, onChange = _a.onChange, store = _a.store, submitOnChange = _a.submitOnChange, dispatchEvent_1 = _a.dispatchEvent, data = _a.data;
|
|
552
560
|
if (!isAlive(store)) {
|
|
553
561
|
return [2 /*return*/];
|
|
554
562
|
}
|
|
555
563
|
diff = difference(store.data, store.pristine);
|
|
556
|
-
if (
|
|
564
|
+
if (emitedFromWatch &&
|
|
557
565
|
(!Object.keys(diff).length || isEqual(store.data, this.emittedData))) {
|
|
558
566
|
return [2 /*return*/];
|
|
559
567
|
}
|
|
560
568
|
this.emittedData = store.data;
|
|
561
569
|
changeProps = [store.data, diff, this.props];
|
|
562
|
-
return [4 /*yield*/,
|
|
570
|
+
return [4 /*yield*/, dispatchEvent_1('change', createObject(data, store.data))];
|
|
563
571
|
case 1:
|
|
564
572
|
dispatcher = _b.sent();
|
|
565
573
|
if (!(dispatcher === null || dispatcher === void 0 ? void 0 : dispatcher.prevented)) {
|
|
566
574
|
onChange && onChange.apply(null, changeProps);
|
|
567
575
|
}
|
|
568
576
|
store.clearRestError();
|
|
569
|
-
if (!(submit || (submitOnChange && store.inited))) return [3 /*break*/, 3];
|
|
577
|
+
if (!(!emitedFromWatch && (submit || (submitOnChange && store.inited)))) return [3 /*break*/, 3];
|
|
570
578
|
return [4 /*yield*/, this.handleAction(undefined, {
|
|
571
579
|
type: 'submit',
|
|
572
580
|
// 如果这里不跳过,会相互依赖死循环,flush 会 让 emiteChange 立即执行
|
|
@@ -576,7 +584,11 @@ var Form = /** @class */ (function (_super) {
|
|
|
576
584
|
case 2:
|
|
577
585
|
_b.sent();
|
|
578
586
|
_b.label = 3;
|
|
579
|
-
case 3: return [
|
|
587
|
+
case 3: return [3 /*break*/, 5];
|
|
588
|
+
case 4:
|
|
589
|
+
this.emitting = false;
|
|
590
|
+
return [7 /*endfinally*/];
|
|
591
|
+
case 5: return [2 /*return*/];
|
|
580
592
|
}
|
|
581
593
|
});
|
|
582
594
|
});
|
|
@@ -621,7 +633,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
621
633
|
var _a, _b;
|
|
622
634
|
if (throwErrors === void 0) { throwErrors = false; }
|
|
623
635
|
return __awaiter(this, void 0, void 0, function () {
|
|
624
|
-
var _c, store, onSubmit, api, asyncApi, finishedField, checkInterval, _d, saveSuccess, saveFailed, resetAfterSubmit, clearAfterSubmit, onAction, onSaved, onReset, onFinished, onFailed, redirect, reload, target, env, onChange, clearPersistDataAfterSubmit, trimValues, dispatchEvent, __, fields, validationRes, dispatcher, _e,
|
|
636
|
+
var _c, store, onSubmit, api, asyncApi, finishedField, checkInterval, _d, saveSuccess, saveFailed, resetAfterSubmit, clearAfterSubmit, onAction, onSaved, onReset, onFinished, onFailed, redirect, reload, target, env, onChange, clearPersistDataAfterSubmit, trimValues, dispatchEvent, __, fields, validationRes, dispatcher, _e, dispatchEvent_2, onEvent, submitEvent, dispatcher, successMsg, failMsg;
|
|
625
637
|
var _this = this;
|
|
626
638
|
return __generator(this, function (_f) {
|
|
627
639
|
switch (_f.label) {
|
|
@@ -669,9 +681,9 @@ var Form = /** @class */ (function (_super) {
|
|
|
669
681
|
action.actionType === 'confirm' ||
|
|
670
682
|
action.actionType === 'reset-and-submit' ||
|
|
671
683
|
action.actionType === 'clear-and-submit')) return [3 /*break*/, 8];
|
|
672
|
-
_e = this.props,
|
|
684
|
+
_e = this.props, dispatchEvent_2 = _e.dispatchEvent, onEvent = _e.onEvent;
|
|
673
685
|
submitEvent = (_b = (_a = onEvent === null || onEvent === void 0 ? void 0 : onEvent.submit) === null || _a === void 0 ? void 0 : _a.actions) === null || _b === void 0 ? void 0 : _b.length;
|
|
674
|
-
return [4 /*yield*/,
|
|
686
|
+
return [4 /*yield*/, dispatchEvent_2('submit', this.props.data)];
|
|
675
687
|
case 7:
|
|
676
688
|
dispatcher = _f.sent();
|
|
677
689
|
if ((dispatcher === null || dispatcher === void 0 ? void 0 : dispatcher.prevented) || submitEvent) {
|
|
@@ -701,12 +713,12 @@ var Form = /** @class */ (function (_super) {
|
|
|
701
713
|
_b.label = 2;
|
|
702
714
|
case 2:
|
|
703
715
|
// 走到这里代表校验成功了
|
|
704
|
-
|
|
716
|
+
dispatchEvent_2('validateSucc', this.props.data);
|
|
705
717
|
if (target) {
|
|
706
718
|
this.submitToTarget(filterTarget(target, values), values);
|
|
707
719
|
/** 可能配置页面跳转事件,页面路由变化导致persistKey不一致,无法清除持久化数据,所以提交成功事件之前先清理一下 */
|
|
708
720
|
clearPersistDataAfterSubmit && store.clearLocalPersistData();
|
|
709
|
-
|
|
721
|
+
dispatchEvent_2('submitSucc', createObject(this.props.data, values));
|
|
710
722
|
}
|
|
711
723
|
else if (action.actionType === 'reload') {
|
|
712
724
|
action.target &&
|
|
@@ -757,7 +769,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
757
769
|
switch (_a.label) {
|
|
758
770
|
case 0:
|
|
759
771
|
clearPersistDataAfterSubmit && store.clearLocalPersistData();
|
|
760
|
-
return [4 /*yield*/,
|
|
772
|
+
return [4 /*yield*/, dispatchEvent_2('submitSucc', createObject(this.props.data, { result: result }))];
|
|
761
773
|
case 1:
|
|
762
774
|
dispatcher = _a.sent();
|
|
763
775
|
if (!isEffectiveApi(finnalAsyncApi_1, store.data) ||
|
|
@@ -769,7 +781,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
769
781
|
}
|
|
770
782
|
cbResult = until(function () { return store.checkRemote(finnalAsyncApi_1, store.data); }, function (ret) { return ret && ret[finishedField || 'finished']; }, function (cancel) { return (_this.asyncCancel = cancel); }, checkInterval).then(function (value) {
|
|
771
783
|
// 派发asyncApiFinished事件
|
|
772
|
-
|
|
784
|
+
dispatchEvent_2('asyncApiFinished', store.data);
|
|
773
785
|
});
|
|
774
786
|
return [2 /*return*/, {
|
|
775
787
|
cbResult: cbResult,
|
|
@@ -782,7 +794,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
782
794
|
var dispatcher;
|
|
783
795
|
return __generator(this, function (_a) {
|
|
784
796
|
switch (_a.label) {
|
|
785
|
-
case 0: return [4 /*yield*/,
|
|
797
|
+
case 0: return [4 /*yield*/, dispatchEvent_2('submitFail', createObject(this.props.data, { error: result }))];
|
|
786
798
|
case 1:
|
|
787
799
|
dispatcher = _a.sent();
|
|
788
800
|
return [2 /*return*/, {
|
|
@@ -822,7 +834,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
822
834
|
else {
|
|
823
835
|
clearPersistDataAfterSubmit && store.clearLocalPersistData();
|
|
824
836
|
// type为submit,但是没有配api以及target时,只派发事件
|
|
825
|
-
|
|
837
|
+
dispatchEvent_2('submitSucc', createObject(this.props.data, values));
|
|
826
838
|
}
|
|
827
839
|
return [2 /*return*/, Promise.resolve(null)];
|
|
828
840
|
}
|
|
@@ -1454,8 +1466,7 @@ var FormRenderer = /** @class */ (function (_super) {
|
|
|
1454
1466
|
onChange(store.data, difference(store.data, store.pristine), this.props);
|
|
1455
1467
|
};
|
|
1456
1468
|
FormRenderer.prototype.getData = function () {
|
|
1457
|
-
|
|
1458
|
-
return store.data;
|
|
1469
|
+
return this.getValues();
|
|
1459
1470
|
};
|
|
1460
1471
|
FormRenderer.contextType = ScopedContext;
|
|
1461
1472
|
FormRenderer = __decorate([
|
package/esm/renderers/Item.js
CHANGED
package/esm/renderers/Options.js
CHANGED
package/esm/renderers/builtin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.
|
|
2
|
+
* amis-core v6.4.1
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -283,25 +283,27 @@ function wrapControl(ComposedComponent) {
|
|
|
283
283
|
var model = this.model;
|
|
284
284
|
var _a = this.props, form = _a.formStore, data = _a.data, canAccessSuperData = _a.canAccessSuperData;
|
|
285
285
|
var isExp = isExpression(value);
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
286
|
+
var initialValue = model.extraName
|
|
287
|
+
? [
|
|
288
|
+
getVariable(data, model.name, canAccessSuperData !== null && canAccessSuperData !== void 0 ? canAccessSuperData : form === null || form === void 0 ? void 0 : form.canAccessSuperData),
|
|
289
|
+
getVariable(data, model.extraName, canAccessSuperData !== null && canAccessSuperData !== void 0 ? canAccessSuperData : form === null || form === void 0 ? void 0 : form.canAccessSuperData)
|
|
290
|
+
]
|
|
291
|
+
: getVariable(data, model.name, canAccessSuperData !== null && canAccessSuperData !== void 0 ? canAccessSuperData : form === null || form === void 0 ? void 0 : form.canAccessSuperData);
|
|
292
|
+
if (model.extraName &&
|
|
293
|
+
initialValue.every(function (item) { return item === undefined; })) {
|
|
294
|
+
initialValue = undefined;
|
|
295
|
+
}
|
|
296
|
+
if (typeof initialValue === 'undefined') {
|
|
297
|
+
value = isExp
|
|
298
|
+
? FormulaExec['formula'](value, data)
|
|
299
|
+
: replaceExpression(value);
|
|
300
|
+
}
|
|
301
|
+
model.changeTmpValue(initialValue !== null && initialValue !== void 0 ? initialValue : value, // 对组件默认值进行运算
|
|
302
|
+
typeof initialValue !== 'undefined'
|
|
303
|
+
? 'initialValue'
|
|
304
|
+
: isExp
|
|
305
|
+
? 'formulaChanged'
|
|
303
306
|
: 'defaultValue');
|
|
304
|
-
}
|
|
305
307
|
};
|
|
306
308
|
class_1.prototype.disposeModel = function () {
|
|
307
309
|
var _a;
|
|
@@ -378,14 +380,15 @@ function wrapControl(ComposedComponent) {
|
|
|
378
380
|
}
|
|
379
381
|
};
|
|
380
382
|
class_1.prototype.validate = function () {
|
|
383
|
+
var _a, _b;
|
|
381
384
|
return __awaiter(this, void 0, void 0, function () {
|
|
382
|
-
var
|
|
383
|
-
return __generator(this, function (
|
|
384
|
-
switch (
|
|
385
|
+
var _c, form, data, formItemDispatchEvent, result, combo, group, validPromises, valid;
|
|
386
|
+
return __generator(this, function (_d) {
|
|
387
|
+
switch (_d.label) {
|
|
385
388
|
case 0:
|
|
386
389
|
if (!this.model)
|
|
387
390
|
return [2 /*return*/];
|
|
388
|
-
|
|
391
|
+
_c = this.props, form = _c.formStore, data = _c.data, formItemDispatchEvent = _c.formItemDispatchEvent;
|
|
389
392
|
if (!(this.model.unique &&
|
|
390
393
|
(form === null || form === void 0 ? void 0 : form.parentStore) &&
|
|
391
394
|
form.parentStore.storeType === ComboStore.name)) return [3 /*break*/, 2];
|
|
@@ -396,15 +399,16 @@ function wrapControl(ComposedComponent) {
|
|
|
396
399
|
});
|
|
397
400
|
return [4 /*yield*/, Promise.all(validPromises)];
|
|
398
401
|
case 1:
|
|
399
|
-
result =
|
|
402
|
+
result = _d.sent();
|
|
400
403
|
return [3 /*break*/, 4];
|
|
401
404
|
case 2: return [4 /*yield*/, this.model.validate(data)];
|
|
402
405
|
case 3:
|
|
403
|
-
result = [
|
|
404
|
-
|
|
406
|
+
result = [_d.sent()];
|
|
407
|
+
_d.label = 4;
|
|
405
408
|
case 4:
|
|
406
409
|
valid = !result.some(function (item) { return item === false; });
|
|
407
|
-
formItemDispatchEvent === null ||
|
|
410
|
+
(_a = (formItemDispatchEvent !== null && formItemDispatchEvent !== void 0 ? formItemDispatchEvent : this.props.dispatchEvent)) === null || _a === void 0 ? void 0 : _a(valid ? 'formItemValidateSucc' : 'formItemValidateError', (_b = form === null || form === void 0 ? void 0 : form.data) !== null && _b !== void 0 ? _b : this.props.data // form里的一定是最新的数据
|
|
411
|
+
);
|
|
408
412
|
return [2 /*return*/, valid];
|
|
409
413
|
}
|
|
410
414
|
});
|
package/esm/store/app.js
CHANGED
package/esm/store/combo.js
CHANGED
package/esm/store/crud.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.
|
|
2
|
+
* amis-core v6.4.1
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -23,9 +23,10 @@ import { TableStore } from './table.js';
|
|
|
23
23
|
|
|
24
24
|
var ServerError = /** @class */ (function (_super) {
|
|
25
25
|
__extends(ServerError, _super);
|
|
26
|
-
function ServerError() {
|
|
27
|
-
var _this = _super
|
|
26
|
+
function ServerError(msg, response) {
|
|
27
|
+
var _this = _super.call(this, msg) || this;
|
|
28
28
|
_this.type = 'ServerError';
|
|
29
|
+
_this.response = response;
|
|
29
30
|
return _this;
|
|
30
31
|
}
|
|
31
32
|
return ServerError;
|
|
@@ -396,7 +397,7 @@ var CRUDStore = ServiceStore.named('CRUDStore')
|
|
|
396
397
|
timeout: json.msgTimeout
|
|
397
398
|
}
|
|
398
399
|
: undefined);
|
|
399
|
-
throw new ServerError(self.msg);
|
|
400
|
+
throw new ServerError(self.msg, json);
|
|
400
401
|
}
|
|
401
402
|
else {
|
|
402
403
|
self.updateMessage((_h = (_g = (_f = (_e = api === null || api === void 0 ? void 0 : api.messages) === null || _e === void 0 ? void 0 : _e.success) !== null && _f !== void 0 ? _f : json.msg) !== null && _g !== void 0 ? _g : options.successMessage) !== null && _h !== void 0 ? _h : json.defaultMsg);
|
|
@@ -408,13 +409,18 @@ var CRUDStore = ServiceStore.named('CRUDStore')
|
|
|
408
409
|
}
|
|
409
410
|
: undefined);
|
|
410
411
|
}
|
|
411
|
-
|
|
412
|
+
// 补一个空对象是为了区别于被取消的请求
|
|
413
|
+
// 请求被取消时会返回 undefined
|
|
414
|
+
return [2 /*return*/, json.data || {}];
|
|
412
415
|
case 2:
|
|
413
416
|
e_3 = _j.sent();
|
|
414
|
-
self.markSaving(false);
|
|
415
417
|
if (!isAlive(self) || self.disposed) {
|
|
416
418
|
return [2 /*return*/];
|
|
417
419
|
}
|
|
420
|
+
self.markSaving(false);
|
|
421
|
+
if (getEnv(self).isCancel(e_3)) {
|
|
422
|
+
return [2 /*return*/];
|
|
423
|
+
}
|
|
418
424
|
!(api === null || api === void 0 ? void 0 : api.silent) &&
|
|
419
425
|
e_3.type !== 'ServerError' &&
|
|
420
426
|
getEnv(self).notify('error', e_3.message);
|
package/esm/store/form.js
CHANGED
package/esm/store/formItem.js
CHANGED
package/esm/store/iRenderer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.
|
|
2
|
+
* amis-core v6.4.1
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ 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, extractObjectChain, createObjectFromChain } from '../utils/object.js';
|
|
11
|
+
import { injectObjectChain, 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';
|
|
@@ -84,6 +84,9 @@ var iRendererStore = StoreNode.named('iRendererStore')
|
|
|
84
84
|
if (data === void 0) { data = {}; }
|
|
85
85
|
if (skipSetPristine === void 0) { skipSetPristine = false; }
|
|
86
86
|
self.initedAt = Date.now();
|
|
87
|
+
if (self.data.__tag) {
|
|
88
|
+
data = injectObjectChain(data, self.data.__tag);
|
|
89
|
+
}
|
|
87
90
|
!skipSetPristine && (self.pristine = data);
|
|
88
91
|
self.data = data;
|
|
89
92
|
},
|
|
@@ -98,7 +101,7 @@ var iRendererStore = StoreNode.named('iRendererStore')
|
|
|
98
101
|
var prev = self.data;
|
|
99
102
|
var newData;
|
|
100
103
|
if (tag) {
|
|
101
|
-
var proto = createObject(self.data.__super || null, tag);
|
|
104
|
+
var proto = createObject(self.data.__super || null, __assign(__assign({}, tag), { __tag: tag }));
|
|
102
105
|
newData = createObject(proto, __assign(__assign({}, (replace ? {} : self.data)), data));
|
|
103
106
|
}
|
|
104
107
|
else {
|
package/esm/store/index.js
CHANGED
package/esm/store/list.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SnapshotIn, Instance } from 'mobx-state-tree';
|
|
2
2
|
export declare const Item: import("mobx-state-tree").IModelType<{
|
|
3
|
+
storeType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
3
4
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
4
5
|
pristine: import("mobx-state-tree").IType<any, any, any>;
|
|
5
6
|
data: import("mobx-state-tree").IType<any, any, any>;
|
|
@@ -40,6 +41,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
40
41
|
drawerData: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
|
|
41
42
|
} & {
|
|
42
43
|
items: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
44
|
+
storeType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
43
45
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
44
46
|
pristine: import("mobx-state-tree").IType<any, any, any>;
|
|
45
47
|
data: import("mobx-state-tree").IType<any, any, any>;
|
|
@@ -59,6 +61,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
59
61
|
updateData({ children, ...rest }: any): void;
|
|
60
62
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
61
63
|
selectedItems: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IModelType<{
|
|
64
|
+
storeType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
62
65
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
63
66
|
pristine: import("mobx-state-tree").IType<any, any, any>;
|
|
64
67
|
data: import("mobx-state-tree").IType<any, any, any>;
|
|
@@ -118,6 +121,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
118
121
|
} & {
|
|
119
122
|
readonly allChecked: boolean;
|
|
120
123
|
readonly checkableItems: ({
|
|
124
|
+
storeType: string;
|
|
121
125
|
id: string;
|
|
122
126
|
pristine: any;
|
|
123
127
|
data: any;
|
|
@@ -136,6 +140,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
136
140
|
reset(): void;
|
|
137
141
|
updateData({ children, ...rest }: any): void;
|
|
138
142
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
143
|
+
storeType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
139
144
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
140
145
|
pristine: import("mobx-state-tree").IType<any, any, any>;
|
|
141
146
|
data: import("mobx-state-tree").IType<any, any, any>;
|
|
@@ -155,6 +160,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
155
160
|
updateData({ children, ...rest }: any): void;
|
|
156
161
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
|
|
157
162
|
readonly unSelectedItems: ({
|
|
163
|
+
storeType: string;
|
|
158
164
|
id: string;
|
|
159
165
|
pristine: any;
|
|
160
166
|
data: any;
|
|
@@ -173,6 +179,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
173
179
|
reset(): void;
|
|
174
180
|
updateData({ children, ...rest }: any): void;
|
|
175
181
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
182
|
+
storeType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
176
183
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
177
184
|
pristine: import("mobx-state-tree").IType<any, any, any>;
|
|
178
185
|
data: import("mobx-state-tree").IType<any, any, any>;
|
|
@@ -194,6 +201,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
194
201
|
isSelected: (item: IItem) => boolean;
|
|
195
202
|
readonly modified: number;
|
|
196
203
|
readonly modifiedItems: ({
|
|
204
|
+
storeType: string;
|
|
197
205
|
id: string;
|
|
198
206
|
pristine: any;
|
|
199
207
|
data: any;
|
|
@@ -212,6 +220,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
212
220
|
reset(): void;
|
|
213
221
|
updateData({ children, ...rest }: any): void;
|
|
214
222
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
223
|
+
storeType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
215
224
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
216
225
|
pristine: import("mobx-state-tree").IType<any, any, any>;
|
|
217
226
|
data: import("mobx-state-tree").IType<any, any, any>;
|
|
@@ -232,6 +241,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
232
241
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
|
|
233
242
|
readonly moved: number;
|
|
234
243
|
readonly movedItems: ({
|
|
244
|
+
storeType: string;
|
|
235
245
|
id: string;
|
|
236
246
|
pristine: any;
|
|
237
247
|
data: any;
|
|
@@ -250,6 +260,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
250
260
|
reset(): void;
|
|
251
261
|
updateData({ children, ...rest }: any): void;
|
|
252
262
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
263
|
+
storeType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
253
264
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
254
265
|
pristine: import("mobx-state-tree").IType<any, any, any>;
|
|
255
266
|
data: import("mobx-state-tree").IType<any, any, any>;
|
|
@@ -269,6 +280,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
269
280
|
updateData({ children, ...rest }: any): void;
|
|
270
281
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
|
|
271
282
|
} & {
|
|
283
|
+
getData: (superData: any) => any;
|
|
272
284
|
update: (config: Partial<SListStore>) => void;
|
|
273
285
|
initItems: (items: Array<object>) => void;
|
|
274
286
|
updateSelected: (selected: Array<any>, valueField?: string) => void;
|
|
@@ -280,6 +292,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
280
292
|
setOrderByInfo: (key: string, direction: 'asc' | 'desc') => void;
|
|
281
293
|
reset: () => void;
|
|
282
294
|
toggleDragging: () => void;
|
|
295
|
+
startDragging: () => void;
|
|
283
296
|
stopDragging: () => void;
|
|
284
297
|
exchange: (fromIndex: number, toIndex: number) => void;
|
|
285
298
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|