amis-core 6.3.0 → 6.4.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.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/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 +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 +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.d.ts +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/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.d.ts +24 -25
- package/lib/store/combo.js +1 -1
- package/lib/store/crud.js +12 -6
- package/lib/store/form.d.ts +10 -11
- 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 +21 -21
- 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 +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 +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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.
|
|
2
|
+
* amis-core v6.4.0
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -301,25 +301,27 @@ function wrapControl(ComposedComponent) {
|
|
|
301
301
|
var model = this.model;
|
|
302
302
|
var _a = this.props, form = _a.formStore, data = _a.data, canAccessSuperData = _a.canAccessSuperData;
|
|
303
303
|
var isExp = formula.isExpression(value);
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
304
|
+
var initialValue = model.extraName
|
|
305
|
+
? [
|
|
306
|
+
getVariable.getVariable(data, model.name, canAccessSuperData !== null && canAccessSuperData !== void 0 ? canAccessSuperData : form === null || form === void 0 ? void 0 : form.canAccessSuperData),
|
|
307
|
+
getVariable.getVariable(data, model.extraName, canAccessSuperData !== null && canAccessSuperData !== void 0 ? canAccessSuperData : form === null || form === void 0 ? void 0 : form.canAccessSuperData)
|
|
308
|
+
]
|
|
309
|
+
: getVariable.getVariable(data, model.name, canAccessSuperData !== null && canAccessSuperData !== void 0 ? canAccessSuperData : form === null || form === void 0 ? void 0 : form.canAccessSuperData);
|
|
310
|
+
if (model.extraName &&
|
|
311
|
+
initialValue.every(function (item) { return item === undefined; })) {
|
|
312
|
+
initialValue = undefined;
|
|
313
|
+
}
|
|
314
|
+
if (typeof initialValue === 'undefined') {
|
|
315
|
+
value = isExp
|
|
316
|
+
? formula.FormulaExec['formula'](value, data)
|
|
317
|
+
: formula.replaceExpression(value);
|
|
318
|
+
}
|
|
319
|
+
model.changeTmpValue(initialValue !== null && initialValue !== void 0 ? initialValue : value, // 对组件默认值进行运算
|
|
320
|
+
typeof initialValue !== 'undefined'
|
|
321
|
+
? 'initialValue'
|
|
322
|
+
: isExp
|
|
323
|
+
? 'formulaChanged'
|
|
321
324
|
: 'defaultValue');
|
|
322
|
-
}
|
|
323
325
|
};
|
|
324
326
|
class_1.prototype.disposeModel = function () {
|
|
325
327
|
var _a;
|
|
@@ -396,14 +398,15 @@ function wrapControl(ComposedComponent) {
|
|
|
396
398
|
}
|
|
397
399
|
};
|
|
398
400
|
class_1.prototype.validate = function () {
|
|
401
|
+
var _a, _b;
|
|
399
402
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
400
|
-
var
|
|
401
|
-
return tslib.__generator(this, function (
|
|
402
|
-
switch (
|
|
403
|
+
var _c, form, data, formItemDispatchEvent, result, combo$1, group, validPromises, valid;
|
|
404
|
+
return tslib.__generator(this, function (_d) {
|
|
405
|
+
switch (_d.label) {
|
|
403
406
|
case 0:
|
|
404
407
|
if (!this.model)
|
|
405
408
|
return [2 /*return*/];
|
|
406
|
-
|
|
409
|
+
_c = this.props, form = _c.formStore, data = _c.data, formItemDispatchEvent = _c.formItemDispatchEvent;
|
|
407
410
|
if (!(this.model.unique &&
|
|
408
411
|
(form === null || form === void 0 ? void 0 : form.parentStore) &&
|
|
409
412
|
form.parentStore.storeType === combo.ComboStore.name)) return [3 /*break*/, 2];
|
|
@@ -414,15 +417,16 @@ function wrapControl(ComposedComponent) {
|
|
|
414
417
|
});
|
|
415
418
|
return [4 /*yield*/, Promise.all(validPromises)];
|
|
416
419
|
case 1:
|
|
417
|
-
result =
|
|
420
|
+
result = _d.sent();
|
|
418
421
|
return [3 /*break*/, 4];
|
|
419
422
|
case 2: return [4 /*yield*/, this.model.validate(data)];
|
|
420
423
|
case 3:
|
|
421
|
-
result = [
|
|
422
|
-
|
|
424
|
+
result = [_d.sent()];
|
|
425
|
+
_d.label = 4;
|
|
423
426
|
case 4:
|
|
424
427
|
valid = !result.some(function (item) { return item === false; });
|
|
425
|
-
formItemDispatchEvent === null ||
|
|
428
|
+
(_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里的一定是最新的数据
|
|
429
|
+
);
|
|
426
430
|
return [2 /*return*/, valid];
|
|
427
431
|
}
|
|
428
432
|
});
|
package/lib/store/app.js
CHANGED
package/lib/store/combo.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import { SnapshotIn, Instance } from 'mobx-state-tree';
|
|
3
2
|
import type { IFormStore, IFormItemStore } from './form';
|
|
4
3
|
export declare const UniqueGroup: import("mobx-state-tree").IModelType<{
|
|
@@ -167,7 +166,7 @@ export declare const UniqueGroup: import("mobx-state-tree").IModelType<{
|
|
|
167
166
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
168
167
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
169
168
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
170
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
169
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
171
170
|
changeEmitedValue: (value: any) => void;
|
|
172
171
|
addSubFormItem: (item: {
|
|
173
172
|
id: string;
|
|
@@ -685,7 +684,7 @@ export declare const UniqueGroup: import("mobx-state-tree").IModelType<{
|
|
|
685
684
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
686
685
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
687
686
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
688
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
687
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
689
688
|
changeEmitedValue: (value: any) => void;
|
|
690
689
|
addSubFormItem: (item: {
|
|
691
690
|
id: string;
|
|
@@ -1235,7 +1234,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
1235
1234
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
1236
1235
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
1237
1236
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
1238
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
1237
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
1239
1238
|
changeEmitedValue: (value: any) => void;
|
|
1240
1239
|
addSubFormItem: (item: {
|
|
1241
1240
|
id: string;
|
|
@@ -1753,7 +1752,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
1753
1752
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
1754
1753
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
1755
1754
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
1756
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
1755
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
1757
1756
|
changeEmitedValue: (value: any) => void;
|
|
1758
1757
|
addSubFormItem: (item: {
|
|
1759
1758
|
id: string;
|
|
@@ -2392,7 +2391,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
2392
2391
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
2393
2392
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
2394
2393
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
2395
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
2394
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
2396
2395
|
changeEmitedValue: (value: any) => void;
|
|
2397
2396
|
addSubFormItem: (item: {
|
|
2398
2397
|
id: string;
|
|
@@ -2910,7 +2909,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
2910
2909
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
2911
2910
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
2912
2911
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
2913
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
2912
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
2914
2913
|
changeEmitedValue: (value: any) => void;
|
|
2915
2914
|
addSubFormItem: (item: {
|
|
2916
2915
|
id: string;
|
|
@@ -3432,7 +3431,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
3432
3431
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
3433
3432
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
3434
3433
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
3435
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
3434
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
3436
3435
|
changeEmitedValue: (value: any) => void;
|
|
3437
3436
|
addSubFormItem: (item: {
|
|
3438
3437
|
id: string;
|
|
@@ -3950,7 +3949,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
3950
3949
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
3951
3950
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
3952
3951
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
3953
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
3952
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
3954
3953
|
changeEmitedValue: (value: any) => void;
|
|
3955
3954
|
addSubFormItem: (item: {
|
|
3956
3955
|
id: string;
|
|
@@ -4477,7 +4476,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
4477
4476
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
4478
4477
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
4479
4478
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
4480
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
4479
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
4481
4480
|
changeEmitedValue: (value: any) => void;
|
|
4482
4481
|
addSubFormItem: (item: {
|
|
4483
4482
|
id: string;
|
|
@@ -4995,7 +4994,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
4995
4994
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
4996
4995
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
4997
4996
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
4998
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
4997
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
4999
4998
|
changeEmitedValue: (value: any) => void;
|
|
5000
4999
|
addSubFormItem: (item: {
|
|
5001
5000
|
id: string;
|
|
@@ -5517,7 +5516,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
5517
5516
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
5518
5517
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
5519
5518
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
5520
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
5519
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
5521
5520
|
changeEmitedValue: (value: any) => void;
|
|
5522
5521
|
addSubFormItem: (item: {
|
|
5523
5522
|
id: string;
|
|
@@ -6035,7 +6034,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
6035
6034
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
6036
6035
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
6037
6036
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
6038
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
6037
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
6039
6038
|
changeEmitedValue: (value: any) => void;
|
|
6040
6039
|
addSubFormItem: (item: {
|
|
6041
6040
|
id: string;
|
|
@@ -6557,7 +6556,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
6557
6556
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
6558
6557
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
6559
6558
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
6560
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
6559
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
6561
6560
|
changeEmitedValue: (value: any) => void;
|
|
6562
6561
|
addSubFormItem: (item: {
|
|
6563
6562
|
id: string;
|
|
@@ -7075,7 +7074,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
7075
7074
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
7076
7075
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
7077
7076
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
7078
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
7077
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
7079
7078
|
changeEmitedValue: (value: any) => void;
|
|
7080
7079
|
addSubFormItem: (item: {
|
|
7081
7080
|
id: string;
|
|
@@ -7716,7 +7715,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
7716
7715
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
7717
7716
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
7718
7717
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
7719
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
7718
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
7720
7719
|
changeEmitedValue: (value: any) => void;
|
|
7721
7720
|
addSubFormItem: (item: {
|
|
7722
7721
|
id: string;
|
|
@@ -8234,7 +8233,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
8234
8233
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
8235
8234
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
8236
8235
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
8237
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
8236
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
8238
8237
|
changeEmitedValue: (value: any) => void;
|
|
8239
8238
|
addSubFormItem: (item: {
|
|
8240
8239
|
id: string;
|
|
@@ -8756,7 +8755,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
8756
8755
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
8757
8756
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
8758
8757
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
8759
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
8758
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
8760
8759
|
changeEmitedValue: (value: any) => void;
|
|
8761
8760
|
addSubFormItem: (item: {
|
|
8762
8761
|
id: string;
|
|
@@ -9274,7 +9273,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
9274
9273
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
9275
9274
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
9276
9275
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
9277
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
9276
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
9278
9277
|
changeEmitedValue: (value: any) => void;
|
|
9279
9278
|
addSubFormItem: (item: {
|
|
9280
9279
|
id: string;
|
|
@@ -9801,7 +9800,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
9801
9800
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
9802
9801
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
9803
9802
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
9804
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
9803
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
9805
9804
|
changeEmitedValue: (value: any) => void;
|
|
9806
9805
|
addSubFormItem: (item: {
|
|
9807
9806
|
id: string;
|
|
@@ -10319,7 +10318,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
10319
10318
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
10320
10319
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
10321
10320
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
10322
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
10321
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
10323
10322
|
changeEmitedValue: (value: any) => void;
|
|
10324
10323
|
addSubFormItem: (item: {
|
|
10325
10324
|
id: string;
|
|
@@ -10841,7 +10840,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
10841
10840
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
10842
10841
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
10843
10842
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
10844
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
10843
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
10845
10844
|
changeEmitedValue: (value: any) => void;
|
|
10846
10845
|
addSubFormItem: (item: {
|
|
10847
10846
|
id: string;
|
|
@@ -11359,7 +11358,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
11359
11358
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
11360
11359
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
11361
11360
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
11362
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
11361
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
11363
11362
|
changeEmitedValue: (value: any) => void;
|
|
11364
11363
|
addSubFormItem: (item: {
|
|
11365
11364
|
id: string;
|
|
@@ -11881,7 +11880,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
11881
11880
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
11882
11881
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
11883
11882
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
11884
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
11883
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
11885
11884
|
changeEmitedValue: (value: any) => void;
|
|
11886
11885
|
addSubFormItem: (item: {
|
|
11887
11886
|
id: string;
|
|
@@ -12399,7 +12398,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
12399
12398
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
12400
12399
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
12401
12400
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
12402
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
12401
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
12403
12402
|
changeEmitedValue: (value: any) => void;
|
|
12404
12403
|
addSubFormItem: (item: {
|
|
12405
12404
|
id: string;
|
package/lib/store/combo.js
CHANGED
package/lib/store/crud.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.
|
|
2
|
+
* amis-core v6.4.0
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -31,9 +31,10 @@ var pick__default = /*#__PURE__*/_interopDefaultLegacy(pick);
|
|
|
31
31
|
|
|
32
32
|
var ServerError = /** @class */ (function (_super) {
|
|
33
33
|
tslib.__extends(ServerError, _super);
|
|
34
|
-
function ServerError() {
|
|
35
|
-
var _this = _super
|
|
34
|
+
function ServerError(msg, response) {
|
|
35
|
+
var _this = _super.call(this, msg) || this;
|
|
36
36
|
_this.type = 'ServerError';
|
|
37
|
+
_this.response = response;
|
|
37
38
|
return _this;
|
|
38
39
|
}
|
|
39
40
|
return ServerError;
|
|
@@ -404,7 +405,7 @@ var CRUDStore = service.ServiceStore.named('CRUDStore')
|
|
|
404
405
|
timeout: json.msgTimeout
|
|
405
406
|
}
|
|
406
407
|
: undefined);
|
|
407
|
-
throw new ServerError(self.msg);
|
|
408
|
+
throw new ServerError(self.msg, json);
|
|
408
409
|
}
|
|
409
410
|
else {
|
|
410
411
|
self.updateMessage((_h = (_g = (_f = (_e = api$1 === null || api$1 === void 0 ? void 0 : api$1.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);
|
|
@@ -416,13 +417,18 @@ var CRUDStore = service.ServiceStore.named('CRUDStore')
|
|
|
416
417
|
}
|
|
417
418
|
: undefined);
|
|
418
419
|
}
|
|
419
|
-
|
|
420
|
+
// 补一个空对象是为了区别于被取消的请求
|
|
421
|
+
// 请求被取消时会返回 undefined
|
|
422
|
+
return [2 /*return*/, json.data || {}];
|
|
420
423
|
case 2:
|
|
421
424
|
e_3 = _j.sent();
|
|
422
|
-
self.markSaving(false);
|
|
423
425
|
if (!mobxStateTree.isAlive(self) || self.disposed) {
|
|
424
426
|
return [2 /*return*/];
|
|
425
427
|
}
|
|
428
|
+
self.markSaving(false);
|
|
429
|
+
if (mobxStateTree.getEnv(self).isCancel(e_3)) {
|
|
430
|
+
return [2 /*return*/];
|
|
431
|
+
}
|
|
426
432
|
!(api$1 === null || api$1 === void 0 ? void 0 : api$1.silent) &&
|
|
427
433
|
e_3.type !== 'ServerError' &&
|
|
428
434
|
mobxStateTree.getEnv(self).notify('error', e_3.message);
|
package/lib/store/form.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import { Instance } from 'mobx-state-tree';
|
|
3
2
|
import type { IFormItemStore } from './formItem';
|
|
4
3
|
import { Api, fetchOptions, Payload } from '../types';
|
|
@@ -245,7 +244,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
245
244
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
246
245
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
247
246
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
248
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
247
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
249
248
|
changeEmitedValue: (value: any) => void;
|
|
250
249
|
addSubFormItem: (item: {
|
|
251
250
|
id: string;
|
|
@@ -763,7 +762,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
763
762
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
764
763
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
765
764
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
766
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
765
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
767
766
|
changeEmitedValue: (value: any) => void;
|
|
768
767
|
addSubFormItem: (item: {
|
|
769
768
|
id: string;
|
|
@@ -1286,7 +1285,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
1286
1285
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
1287
1286
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
1288
1287
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
1289
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
1288
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
1290
1289
|
changeEmitedValue: (value: any) => void;
|
|
1291
1290
|
addSubFormItem: (item: {
|
|
1292
1291
|
id: string;
|
|
@@ -1804,7 +1803,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
1804
1803
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
1805
1804
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
1806
1805
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
1807
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
1806
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
1808
1807
|
changeEmitedValue: (value: any) => void;
|
|
1809
1808
|
addSubFormItem: (item: {
|
|
1810
1809
|
id: string;
|
|
@@ -2331,7 +2330,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
2331
2330
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
2332
2331
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
2333
2332
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
2334
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
2333
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
2335
2334
|
changeEmitedValue: (value: any) => void;
|
|
2336
2335
|
addSubFormItem: (item: {
|
|
2337
2336
|
id: string;
|
|
@@ -2849,7 +2848,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
2849
2848
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
2850
2849
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
2851
2850
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
2852
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
2851
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
2853
2852
|
changeEmitedValue: (value: any) => void;
|
|
2854
2853
|
addSubFormItem: (item: {
|
|
2855
2854
|
id: string;
|
|
@@ -3371,7 +3370,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
3371
3370
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
3372
3371
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
3373
3372
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
3374
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
3373
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
3375
3374
|
changeEmitedValue: (value: any) => void;
|
|
3376
3375
|
addSubFormItem: (item: {
|
|
3377
3376
|
id: string;
|
|
@@ -3889,7 +3888,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
3889
3888
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
3890
3889
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
3891
3890
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
3892
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
3891
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
3893
3892
|
changeEmitedValue: (value: any) => void;
|
|
3894
3893
|
addSubFormItem: (item: {
|
|
3895
3894
|
id: string;
|
|
@@ -4411,7 +4410,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
4411
4410
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
4412
4411
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
4413
4412
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
4414
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
4413
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
4415
4414
|
changeEmitedValue: (value: any) => void;
|
|
4416
4415
|
addSubFormItem: (item: {
|
|
4417
4416
|
id: string;
|
|
@@ -4929,7 +4928,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
4929
4928
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
4930
4929
|
openDialog: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
4931
4930
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
4932
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
4931
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
4933
4932
|
changeEmitedValue: (value: any) => void;
|
|
4934
4933
|
addSubFormItem: (item: {
|
|
4935
4934
|
id: string;
|
package/lib/store/form.js
CHANGED
package/lib/store/formItem.js
CHANGED
package/lib/store/iRenderer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.
|
|
2
|
+
* amis-core v6.4.0
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -91,6 +91,9 @@ var iRendererStore = node.StoreNode.named('iRendererStore')
|
|
|
91
91
|
if (data === void 0) { data = {}; }
|
|
92
92
|
if (skipSetPristine === void 0) { skipSetPristine = false; }
|
|
93
93
|
self.initedAt = Date.now();
|
|
94
|
+
if (self.data.__tag) {
|
|
95
|
+
data = object.injectObjectChain(data, self.data.__tag);
|
|
96
|
+
}
|
|
94
97
|
!skipSetPristine && (self.pristine = data);
|
|
95
98
|
self.data = data;
|
|
96
99
|
},
|
|
@@ -105,7 +108,7 @@ var iRendererStore = node.StoreNode.named('iRendererStore')
|
|
|
105
108
|
var prev = self.data;
|
|
106
109
|
var newData;
|
|
107
110
|
if (tag) {
|
|
108
|
-
var proto = object.createObject(self.data.__super || null, tag);
|
|
111
|
+
var proto = object.createObject(self.data.__super || null, tslib.__assign(tslib.__assign({}, tag), { __tag: tag }));
|
|
109
112
|
newData = object.createObject(proto, tslib.__assign(tslib.__assign({}, (replace ? {} : self.data)), data));
|
|
110
113
|
}
|
|
111
114
|
else {
|
package/lib/store/index.js
CHANGED