amis-core 3.6.3 → 6.0.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 +1 -1
- package/esm/Scoped.js +2 -1
- package/esm/StatusScoped.js +1 -1
- package/esm/WithRootStore.js +1 -1
- package/esm/WithStore.js +1 -1
- package/esm/actions/Action.js +31 -27
- 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 +65 -26
- package/esm/actions/ContinueAction.js +1 -1
- package/esm/actions/CopyAction.js +1 -1
- package/esm/actions/CustomAction.js +3 -2
- package/esm/actions/DialogAction.js +1 -1
- package/esm/actions/DrawerAction.js +1 -1
- package/esm/actions/EmailAction.js +1 -1
- package/esm/actions/LinkAction.js +1 -1
- package/esm/actions/LoopAction.js +1 -1
- package/esm/actions/PageAction.js +1 -1
- package/esm/actions/ParallelAction.js +1 -1
- package/esm/actions/StatusAction.js +1 -1
- package/esm/actions/SwitchAction.js +1 -1
- package/esm/actions/ToastAction.js +1 -1
- package/esm/components/CustomStyle.js +1 -1
- package/esm/components/ErrorBoundary.js +1 -1
- package/esm/components/LazyComponent.js +1 -1
- package/esm/components/Overlay.js +3 -2
- package/esm/components/PopOver.js +3 -2
- package/esm/env.js +1 -1
- package/esm/envOverwrite.js +1 -1
- package/esm/factory.js +1 -1
- package/esm/index.js +4 -2
- package/esm/locale.js +1 -1
- package/esm/polyfills.js +1 -1
- package/esm/renderers/Form.js +125 -111
- package/esm/renderers/Item.js +4 -3
- package/esm/renderers/Options.js +163 -49
- 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 +4 -3
- package/esm/store/app.d.ts +2 -2
- package/esm/store/app.js +3 -2
- package/esm/store/combo.d.ts +7 -7
- package/esm/store/combo.js +1 -1
- package/esm/store/crud.d.ts +3 -2
- package/esm/store/crud.js +18 -4
- package/esm/store/form.d.ts +3 -3
- package/esm/store/form.js +5 -5
- package/esm/store/formItem.js +1 -1
- package/esm/store/iRenderer.d.ts +1 -1
- package/esm/store/iRenderer.js +7 -2
- package/esm/store/index.js +1 -1
- package/esm/store/list.d.ts +1 -1
- package/esm/store/list.js +18 -13
- package/esm/store/manager.js +1 -1
- package/esm/store/modal.d.ts +2 -2
- package/esm/store/modal.js +1 -1
- package/esm/store/node.js +1 -1
- package/esm/store/pagination.d.ts +2 -1
- package/esm/store/pagination.js +3 -2
- package/esm/store/root.d.ts +2 -2
- package/esm/store/root.js +3 -2
- package/esm/store/service.d.ts +2 -2
- package/esm/store/service.js +11 -7
- package/esm/store/status.js +1 -1
- package/esm/store/table.d.ts +7 -7
- package/esm/store/table.js +26 -11
- package/esm/store/table2.d.ts +14 -3
- package/esm/store/table2.js +22 -9
- package/esm/theme.js +1 -1
- package/esm/types.d.ts +7 -0
- 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.d.ts +1 -0
- package/esm/utils/browser.js +11 -0
- package/esm/utils/columnsSplit.js +1 -1
- package/esm/utils/concatData.d.ts +8 -0
- package/esm/utils/concatData.js +39 -0
- 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 +6 -1
- package/esm/utils/helper.js +23 -6
- package/esm/utils/highlight.js +1 -1
- package/esm/utils/icon.js +1 -1
- package/esm/utils/image.js +1 -1
- package/esm/utils/index.d.ts +2 -0
- 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/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/renderer-event.js +19 -3
- 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 +4 -6
- 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/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 +1 -1
- package/lib/Scoped.js +2 -1
- package/lib/StatusScoped.js +1 -1
- package/lib/WithRootStore.js +1 -1
- package/lib/WithStore.js +1 -1
- package/lib/actions/Action.js +31 -27
- 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 +65 -26
- package/lib/actions/ContinueAction.js +1 -1
- package/lib/actions/CopyAction.js +1 -1
- package/lib/actions/CustomAction.js +3 -2
- package/lib/actions/DialogAction.js +1 -1
- package/lib/actions/DrawerAction.js +1 -1
- package/lib/actions/EmailAction.js +1 -1
- package/lib/actions/LinkAction.js +1 -1
- package/lib/actions/LoopAction.js +1 -1
- package/lib/actions/PageAction.js +1 -1
- package/lib/actions/ParallelAction.js +1 -1
- package/lib/actions/StatusAction.js +1 -1
- package/lib/actions/SwitchAction.js +1 -1
- package/lib/actions/ToastAction.js +1 -1
- package/lib/components/CustomStyle.js +1 -1
- package/lib/components/ErrorBoundary.js +1 -1
- package/lib/components/LazyComponent.js +1 -1
- package/lib/components/Overlay.js +3 -2
- package/lib/components/PopOver.js +3 -2
- package/lib/env.js +1 -1
- package/lib/envOverwrite.js +1 -1
- package/lib/factory.js +1 -1
- package/lib/index.js +6 -2
- package/lib/locale.js +1 -1
- package/lib/polyfills.js +1 -1
- package/lib/renderers/Form.js +125 -111
- package/lib/renderers/Item.js +4 -3
- package/lib/renderers/Options.js +163 -49
- 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 +4 -3
- package/lib/store/app.d.ts +2 -2
- package/lib/store/app.js +3 -2
- package/lib/store/combo.d.ts +31 -31
- package/lib/store/combo.js +1 -1
- package/lib/store/crud.d.ts +3 -2
- package/lib/store/crud.js +18 -4
- package/lib/store/form.d.ts +13 -13
- package/lib/store/form.js +5 -5
- package/lib/store/formItem.js +1 -1
- package/lib/store/iRenderer.d.ts +1 -1
- package/lib/store/iRenderer.js +7 -2
- package/lib/store/index.js +1 -1
- package/lib/store/list.d.ts +1 -1
- package/lib/store/list.js +18 -14
- package/lib/store/manager.js +1 -1
- package/lib/store/modal.d.ts +2 -2
- package/lib/store/modal.js +1 -1
- package/lib/store/node.js +1 -1
- package/lib/store/pagination.d.ts +2 -1
- package/lib/store/pagination.js +3 -2
- package/lib/store/root.d.ts +2 -2
- package/lib/store/root.js +3 -2
- package/lib/store/service.d.ts +2 -2
- package/lib/store/service.js +11 -7
- package/lib/store/status.js +1 -1
- package/lib/store/table.d.ts +27 -27
- package/lib/store/table.js +26 -12
- package/lib/store/table2.d.ts +14 -3
- package/lib/store/table2.js +22 -9
- package/lib/theme.js +1 -1
- package/lib/types.d.ts +7 -0
- 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.d.ts +1 -0
- package/lib/utils/browser.js +15 -0
- package/lib/utils/columnsSplit.js +1 -1
- package/lib/utils/concatData.d.ts +8 -0
- package/lib/utils/concatData.js +43 -0
- 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 +6 -1
- package/lib/utils/helper.js +23 -6
- package/lib/utils/highlight.js +1 -1
- package/lib/utils/icon.js +1 -1
- package/lib/utils/image.js +1 -1
- package/lib/utils/index.d.ts +2 -0
- 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/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/renderer-event.js +19 -3
- 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 +4 -6
- 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/validations.js +1 -1
- package/package.json +4 -3
package/lib/store/combo.d.ts
CHANGED
|
@@ -165,7 +165,7 @@ export declare const UniqueGroup: import("mobx-state-tree").IModelType<{
|
|
|
165
165
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
166
166
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
167
167
|
closeDialog: (result?: any) => void;
|
|
168
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
168
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
169
169
|
changeEmitedValue: (value: any) => void;
|
|
170
170
|
addSubFormItem: (item: {
|
|
171
171
|
id: string;
|
|
@@ -674,7 +674,7 @@ export declare const UniqueGroup: import("mobx-state-tree").IModelType<{
|
|
|
674
674
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
675
675
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
676
676
|
closeDialog: (result?: any) => void;
|
|
677
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
677
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
678
678
|
changeEmitedValue: (value: any) => void;
|
|
679
679
|
addSubFormItem: (item: {
|
|
680
680
|
id: string;
|
|
@@ -1215,7 +1215,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
1215
1215
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
1216
1216
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
1217
1217
|
closeDialog: (result?: any) => void;
|
|
1218
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
1218
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
1219
1219
|
changeEmitedValue: (value: any) => void;
|
|
1220
1220
|
addSubFormItem: (item: {
|
|
1221
1221
|
id: string;
|
|
@@ -1724,7 +1724,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
1724
1724
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
1725
1725
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
1726
1726
|
closeDialog: (result?: any) => void;
|
|
1727
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
1727
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
1728
1728
|
changeEmitedValue: (value: any) => void;
|
|
1729
1729
|
addSubFormItem: (item: {
|
|
1730
1730
|
id: string;
|
|
@@ -2106,7 +2106,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
2106
2106
|
setTopStore(value: any): void;
|
|
2107
2107
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
2108
2108
|
reset(): void;
|
|
2109
|
-
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
|
2109
|
+
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined, concatFields?: string | string[] | undefined): void;
|
|
2110
2110
|
changeValue(name: string, value: any, changePristine?: boolean | undefined, force?: boolean | undefined, otherModifier?: ((data: Object) => void) | undefined): void;
|
|
2111
2111
|
setCurrentAction(action: object): void;
|
|
2112
2112
|
openDialog(ctx: any, additonal?: object | undefined, callback?: ((ret: any) => void) | undefined, scoped?: import("..").IScopedContext | undefined): void;
|
|
@@ -2168,7 +2168,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
2168
2168
|
setTopStore(value: any): void;
|
|
2169
2169
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
2170
2170
|
reset(): void;
|
|
2171
|
-
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
|
2171
|
+
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined, concatFields?: string | string[] | undefined): void;
|
|
2172
2172
|
changeValue(name: string, value: any, changePristine?: boolean | undefined, force?: boolean | undefined, otherModifier?: ((data: Object) => void) | undefined): void;
|
|
2173
2173
|
setCurrentAction(action: object): void;
|
|
2174
2174
|
openDialog(ctx: any, additonal?: object | undefined, callback?: ((ret: any) => void) | undefined, scoped?: import("..").IScopedContext | undefined): void;
|
|
@@ -2185,7 +2185,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
2185
2185
|
markBusying: (busying?: boolean) => void;
|
|
2186
2186
|
fetchInitData: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
|
|
2187
2187
|
fetchData: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
|
|
2188
|
-
reInitData: (data: object | undefined, replace?: boolean) => void;
|
|
2188
|
+
reInitData: (data: object | undefined, replace?: boolean, concatFields?: string | string[] | undefined) => void;
|
|
2189
2189
|
updateMessage: (msg?: string | undefined, error?: boolean) => void;
|
|
2190
2190
|
clearMessage: () => void;
|
|
2191
2191
|
setHasRemoteData: () => void;
|
|
@@ -2354,7 +2354,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
2354
2354
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
2355
2355
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
2356
2356
|
closeDialog: (result?: any) => void;
|
|
2357
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
2357
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
2358
2358
|
changeEmitedValue: (value: any) => void;
|
|
2359
2359
|
addSubFormItem: (item: {
|
|
2360
2360
|
id: string;
|
|
@@ -2863,7 +2863,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
2863
2863
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
2864
2864
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
2865
2865
|
closeDialog: (result?: any) => void;
|
|
2866
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
2866
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
2867
2867
|
changeEmitedValue: (value: any) => void;
|
|
2868
2868
|
addSubFormItem: (item: {
|
|
2869
2869
|
id: string;
|
|
@@ -3376,7 +3376,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
3376
3376
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
3377
3377
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
3378
3378
|
closeDialog: (result?: any) => void;
|
|
3379
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
3379
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
3380
3380
|
changeEmitedValue: (value: any) => void;
|
|
3381
3381
|
addSubFormItem: (item: {
|
|
3382
3382
|
id: string;
|
|
@@ -3885,7 +3885,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
3885
3885
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
3886
3886
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
3887
3887
|
closeDialog: (result?: any) => void;
|
|
3888
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
3888
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
3889
3889
|
changeEmitedValue: (value: any) => void;
|
|
3890
3890
|
addSubFormItem: (item: {
|
|
3891
3891
|
id: string;
|
|
@@ -4403,7 +4403,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
4403
4403
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
4404
4404
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
4405
4405
|
closeDialog: (result?: any) => void;
|
|
4406
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
4406
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
4407
4407
|
changeEmitedValue: (value: any) => void;
|
|
4408
4408
|
addSubFormItem: (item: {
|
|
4409
4409
|
id: string;
|
|
@@ -4912,7 +4912,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
4912
4912
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
4913
4913
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
4914
4914
|
closeDialog: (result?: any) => void;
|
|
4915
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
4915
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
4916
4916
|
changeEmitedValue: (value: any) => void;
|
|
4917
4917
|
addSubFormItem: (item: {
|
|
4918
4918
|
id: string;
|
|
@@ -5425,7 +5425,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
5425
5425
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
5426
5426
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
5427
5427
|
closeDialog: (result?: any) => void;
|
|
5428
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
5428
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
5429
5429
|
changeEmitedValue: (value: any) => void;
|
|
5430
5430
|
addSubFormItem: (item: {
|
|
5431
5431
|
id: string;
|
|
@@ -5934,7 +5934,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
5934
5934
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
5935
5935
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
5936
5936
|
closeDialog: (result?: any) => void;
|
|
5937
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
5937
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
5938
5938
|
changeEmitedValue: (value: any) => void;
|
|
5939
5939
|
addSubFormItem: (item: {
|
|
5940
5940
|
id: string;
|
|
@@ -6447,7 +6447,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
6447
6447
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
6448
6448
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
6449
6449
|
closeDialog: (result?: any) => void;
|
|
6450
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
6450
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
6451
6451
|
changeEmitedValue: (value: any) => void;
|
|
6452
6452
|
addSubFormItem: (item: {
|
|
6453
6453
|
id: string;
|
|
@@ -6956,7 +6956,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
6956
6956
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
6957
6957
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
6958
6958
|
closeDialog: (result?: any) => void;
|
|
6959
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
6959
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
6960
6960
|
changeEmitedValue: (value: any) => void;
|
|
6961
6961
|
addSubFormItem: (item: {
|
|
6962
6962
|
id: string;
|
|
@@ -7316,7 +7316,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
7316
7316
|
readonly persistKey: string;
|
|
7317
7317
|
} & {
|
|
7318
7318
|
setInited: (value: boolean) => void;
|
|
7319
|
-
setValues: (values: object, tag?: object | undefined, replace?: boolean | undefined) => void;
|
|
7319
|
+
setValues: (values: object, tag?: object | undefined, replace?: boolean | undefined, concatFields?: string | string[] | undefined) => void;
|
|
7320
7320
|
setValueByName: (name: string, value: any, isPristine?: boolean, force?: boolean) => void;
|
|
7321
7321
|
trimValues: () => void;
|
|
7322
7322
|
submit: (fn?: ((values: object) => Promise<any>) | undefined, hooks?: (() => Promise<any>)[] | undefined, failedMessage?: string | undefined, validateErrCb?: (() => void) | undefined, throwErrors?: boolean | undefined) => Promise<any>;
|
|
@@ -7402,7 +7402,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
7402
7402
|
setTopStore(value: any): void;
|
|
7403
7403
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
7404
7404
|
reset(): void;
|
|
7405
|
-
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
|
7405
|
+
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined, concatFields?: string | string[] | undefined): void;
|
|
7406
7406
|
changeValue(name: string, value: any, changePristine?: boolean | undefined, force?: boolean | undefined, otherModifier?: ((data: Object) => void) | undefined): void;
|
|
7407
7407
|
setCurrentAction(action: object): void;
|
|
7408
7408
|
openDialog(ctx: any, additonal?: object | undefined, callback?: ((ret: any) => void) | undefined, scoped?: import("..").IScopedContext | undefined): void;
|
|
@@ -7419,7 +7419,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
7419
7419
|
markBusying: (busying?: boolean) => void;
|
|
7420
7420
|
fetchInitData: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
|
|
7421
7421
|
fetchData: (api: import("..").Api, data?: object | undefined, options?: import("..").fetchOptions | undefined) => Promise<any>;
|
|
7422
|
-
reInitData: (data: object | undefined, replace?: boolean) => void;
|
|
7422
|
+
reInitData: (data: object | undefined, replace?: boolean, concatFields?: string | string[] | undefined) => void;
|
|
7423
7423
|
updateMessage: (msg?: string | undefined, error?: boolean) => void;
|
|
7424
7424
|
clearMessage: () => void;
|
|
7425
7425
|
setHasRemoteData: () => void;
|
|
@@ -7588,7 +7588,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
7588
7588
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
7589
7589
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
7590
7590
|
closeDialog: (result?: any) => void;
|
|
7591
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
7591
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
7592
7592
|
changeEmitedValue: (value: any) => void;
|
|
7593
7593
|
addSubFormItem: (item: {
|
|
7594
7594
|
id: string;
|
|
@@ -8097,7 +8097,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
8097
8097
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
8098
8098
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
8099
8099
|
closeDialog: (result?: any) => void;
|
|
8100
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
8100
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
8101
8101
|
changeEmitedValue: (value: any) => void;
|
|
8102
8102
|
addSubFormItem: (item: {
|
|
8103
8103
|
id: string;
|
|
@@ -8610,7 +8610,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
8610
8610
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
8611
8611
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
8612
8612
|
closeDialog: (result?: any) => void;
|
|
8613
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
8613
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
8614
8614
|
changeEmitedValue: (value: any) => void;
|
|
8615
8615
|
addSubFormItem: (item: {
|
|
8616
8616
|
id: string;
|
|
@@ -9119,7 +9119,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
9119
9119
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
9120
9120
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
9121
9121
|
closeDialog: (result?: any) => void;
|
|
9122
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
9122
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
9123
9123
|
changeEmitedValue: (value: any) => void;
|
|
9124
9124
|
addSubFormItem: (item: {
|
|
9125
9125
|
id: string;
|
|
@@ -9637,7 +9637,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
9637
9637
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
9638
9638
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
9639
9639
|
closeDialog: (result?: any) => void;
|
|
9640
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
9640
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
9641
9641
|
changeEmitedValue: (value: any) => void;
|
|
9642
9642
|
addSubFormItem: (item: {
|
|
9643
9643
|
id: string;
|
|
@@ -10146,7 +10146,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
10146
10146
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
10147
10147
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
10148
10148
|
closeDialog: (result?: any) => void;
|
|
10149
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
10149
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
10150
10150
|
changeEmitedValue: (value: any) => void;
|
|
10151
10151
|
addSubFormItem: (item: {
|
|
10152
10152
|
id: string;
|
|
@@ -10659,7 +10659,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
10659
10659
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
10660
10660
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
10661
10661
|
closeDialog: (result?: any) => void;
|
|
10662
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
10662
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
10663
10663
|
changeEmitedValue: (value: any) => void;
|
|
10664
10664
|
addSubFormItem: (item: {
|
|
10665
10665
|
id: string;
|
|
@@ -11168,7 +11168,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
11168
11168
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
11169
11169
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
11170
11170
|
closeDialog: (result?: any) => void;
|
|
11171
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
11171
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
11172
11172
|
changeEmitedValue: (value: any) => void;
|
|
11173
11173
|
addSubFormItem: (item: {
|
|
11174
11174
|
id: string;
|
|
@@ -11681,7 +11681,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
11681
11681
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
11682
11682
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
11683
11683
|
closeDialog: (result?: any) => void;
|
|
11684
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
11684
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
11685
11685
|
changeEmitedValue: (value: any) => void;
|
|
11686
11686
|
addSubFormItem: (item: {
|
|
11687
11687
|
id: string;
|
|
@@ -12190,7 +12190,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
12190
12190
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
12191
12191
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
12192
12192
|
closeDialog: (result?: any) => void;
|
|
12193
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
12193
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
12194
12194
|
changeEmitedValue: (value: any) => void;
|
|
12195
12195
|
addSubFormItem: (item: {
|
|
12196
12196
|
id: string;
|
|
@@ -12550,7 +12550,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
12550
12550
|
readonly persistKey: string;
|
|
12551
12551
|
} & {
|
|
12552
12552
|
setInited: (value: boolean) => void;
|
|
12553
|
-
setValues: (values: object, tag?: object | undefined, replace?: boolean | undefined) => void;
|
|
12553
|
+
setValues: (values: object, tag?: object | undefined, replace?: boolean | undefined, concatFields?: string | string[] | undefined) => void;
|
|
12554
12554
|
setValueByName: (name: string, value: any, isPristine?: boolean, force?: boolean) => void;
|
|
12555
12555
|
trimValues: () => void;
|
|
12556
12556
|
submit: (fn?: ((values: object) => Promise<any>) | undefined, hooks?: (() => Promise<any>)[] | undefined, failedMessage?: string | undefined, validateErrCb?: (() => void) | undefined, throwErrors?: boolean | undefined) => Promise<any>;
|
package/lib/store/combo.js
CHANGED
package/lib/store/crud.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ export declare const CRUDStore: import("mobx-state-tree").IModelType<{
|
|
|
77
77
|
setTopStore(value: any): void;
|
|
78
78
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
79
79
|
reset(): void;
|
|
80
|
-
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
|
80
|
+
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined, concatFields?: string | string[] | undefined): void;
|
|
81
81
|
changeValue(name: string, value: any, changePristine?: boolean | undefined, force?: boolean | undefined, otherModifier?: ((data: Object) => void) | undefined): void;
|
|
82
82
|
setCurrentAction(action: object): void;
|
|
83
83
|
openDialog(ctx: any, additonal?: object | undefined, callback?: ((ret: any) => void) | undefined, scoped?: import("..").IScopedContext | undefined): void;
|
|
@@ -94,7 +94,7 @@ export declare const CRUDStore: import("mobx-state-tree").IModelType<{
|
|
|
94
94
|
markBusying: (busying?: boolean) => void;
|
|
95
95
|
fetchInitData: (api: Api, data?: object | undefined, options?: fetchOptions | undefined) => Promise<any>;
|
|
96
96
|
fetchData: (api: Api, data?: object | undefined, options?: fetchOptions | undefined) => Promise<any>;
|
|
97
|
-
reInitData: (data: object | undefined, replace?: boolean) => void;
|
|
97
|
+
reInitData: (data: object | undefined, replace?: boolean, concatFields?: string | string[] | undefined) => void;
|
|
98
98
|
updateMessage: (msg?: string | undefined, error?: boolean) => void;
|
|
99
99
|
clearMessage: () => void;
|
|
100
100
|
setHasRemoteData: () => void;
|
|
@@ -149,6 +149,7 @@ export declare const CRUDStore: import("mobx-state-tree").IModelType<{
|
|
|
149
149
|
}) => Promise<void>;
|
|
150
150
|
updateColumns: (columns: Array<any>) => void;
|
|
151
151
|
updateTotal: (total: number) => void;
|
|
152
|
+
resetSelection: () => void;
|
|
152
153
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
153
154
|
export type ICRUDStore = Instance<typeof CRUDStore>;
|
|
154
155
|
export {};
|
package/lib/store/crud.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v6.0.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -23,6 +23,7 @@ require('../utils/filter.js');
|
|
|
23
23
|
var api = require('../utils/api.js');
|
|
24
24
|
var matchSorter = require('match-sorter');
|
|
25
25
|
var tpl = require('../utils/tpl.js');
|
|
26
|
+
var table = require('./table.js');
|
|
26
27
|
|
|
27
28
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
28
29
|
|
|
@@ -326,7 +327,7 @@ var CRUDStore = service.ServiceStore.named('CRUDStore')
|
|
|
326
327
|
self.columns = options.columns;
|
|
327
328
|
}
|
|
328
329
|
self.items.replace(rowsData);
|
|
329
|
-
self.reInitData(data_2, !!api$1.replaceData);
|
|
330
|
+
self.reInitData(data_2, !!api$1.replaceData, api$1.concatDataFields);
|
|
330
331
|
options.syncResponse2Query !== false &&
|
|
331
332
|
updateQuery(pick__default["default"](rest, Object.keys(self.query)), undefined, options.pageField || 'page', options.perPageField || 'perPage');
|
|
332
333
|
self.total = parseInt((_k = data_2.total) !== null && _k !== void 0 ? _k : data_2.count, 10) || 0;
|
|
@@ -391,7 +392,7 @@ var CRUDStore = service.ServiceStore.named('CRUDStore')
|
|
|
391
392
|
if (!helper.isEmpty(json.data) || json.ok) {
|
|
392
393
|
self.updateData(api.normalizeApiResponseData(json.data), {
|
|
393
394
|
__saved: Date.now()
|
|
394
|
-
}, !!api$1 && api$1.replaceData);
|
|
395
|
+
}, !!api$1 && api$1.replaceData, api$1 === null || api$1 === void 0 ? void 0 : api$1.concatDataFields);
|
|
395
396
|
self.updatedAt = Date.now();
|
|
396
397
|
}
|
|
397
398
|
if (!json.ok) {
|
|
@@ -610,6 +611,18 @@ var CRUDStore = service.ServiceStore.named('CRUDStore')
|
|
|
610
611
|
var updateTotal = function (total) {
|
|
611
612
|
self.total = total || 0;
|
|
612
613
|
};
|
|
614
|
+
/** 非Picker模式下,重置当前CRUD的所有的已选择项目 */
|
|
615
|
+
var resetSelection = function () {
|
|
616
|
+
var _a, _b, _c, _d;
|
|
617
|
+
// 初始化CRUD记录的已选择项目和未选择项目
|
|
618
|
+
setSelectedItems([]);
|
|
619
|
+
setUnSelectedItems([]);
|
|
620
|
+
var tableStore = (_b = (_a = self === null || self === void 0 ? void 0 : self.children) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, function (s) { return s.storeType === table.TableStore.name; });
|
|
621
|
+
if (tableStore) {
|
|
622
|
+
// 清空Table记录的已选择项目
|
|
623
|
+
(_d = (_c = tableStore).clear) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
624
|
+
}
|
|
625
|
+
};
|
|
613
626
|
return {
|
|
614
627
|
getData: getData,
|
|
615
628
|
updateSelectData: updateSelectData,
|
|
@@ -628,7 +641,8 @@ var CRUDStore = service.ServiceStore.named('CRUDStore')
|
|
|
628
641
|
initFromScope: initFromScope,
|
|
629
642
|
exportAsCSV: exportAsCSV,
|
|
630
643
|
updateColumns: updateColumns,
|
|
631
|
-
updateTotal: updateTotal
|
|
644
|
+
updateTotal: updateTotal,
|
|
645
|
+
resetSelection: resetSelection
|
|
632
646
|
};
|
|
633
647
|
});
|
|
634
648
|
|
package/lib/store/form.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
57
57
|
setTopStore(value: any): void;
|
|
58
58
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
59
59
|
reset(): void;
|
|
60
|
-
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
|
60
|
+
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined, concatFields?: string | string[] | undefined): void;
|
|
61
61
|
changeValue(name: string, value: any, changePristine?: boolean | undefined, force?: boolean | undefined, otherModifier?: ((data: Object) => void) | undefined): void;
|
|
62
62
|
setCurrentAction(action: object): void;
|
|
63
63
|
openDialog(ctx: any, additonal?: object | undefined, callback?: ((ret: any) => void) | undefined, scoped?: import("..").IScopedContext | undefined): void;
|
|
@@ -74,7 +74,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
74
74
|
markBusying: (busying?: boolean) => void;
|
|
75
75
|
fetchInitData: (api: Api, data?: object | undefined, options?: fetchOptions | undefined) => Promise<any>;
|
|
76
76
|
fetchData: (api: Api, data?: object | undefined, options?: fetchOptions | undefined) => Promise<any>;
|
|
77
|
-
reInitData: (data: object | undefined, replace?: boolean) => void;
|
|
77
|
+
reInitData: (data: object | undefined, replace?: boolean, concatFields?: string | string[] | undefined) => void;
|
|
78
78
|
updateMessage: (msg?: string | undefined, error?: boolean) => void;
|
|
79
79
|
clearMessage: () => void;
|
|
80
80
|
setHasRemoteData: () => void;
|
|
@@ -243,7 +243,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
243
243
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
244
244
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
245
245
|
closeDialog: (result?: any) => void;
|
|
246
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
246
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
247
247
|
changeEmitedValue: (value: any) => void;
|
|
248
248
|
addSubFormItem: (item: {
|
|
249
249
|
id: string;
|
|
@@ -752,7 +752,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
752
752
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
753
753
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
754
754
|
closeDialog: (result?: any) => void;
|
|
755
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
755
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
756
756
|
changeEmitedValue: (value: any) => void;
|
|
757
757
|
addSubFormItem: (item: {
|
|
758
758
|
id: string;
|
|
@@ -1266,7 +1266,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
1266
1266
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
1267
1267
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
1268
1268
|
closeDialog: (result?: any) => void;
|
|
1269
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
1269
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
1270
1270
|
changeEmitedValue: (value: any) => void;
|
|
1271
1271
|
addSubFormItem: (item: {
|
|
1272
1272
|
id: string;
|
|
@@ -1775,7 +1775,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
1775
1775
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
1776
1776
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
1777
1777
|
closeDialog: (result?: any) => void;
|
|
1778
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
1778
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
1779
1779
|
changeEmitedValue: (value: any) => void;
|
|
1780
1780
|
addSubFormItem: (item: {
|
|
1781
1781
|
id: string;
|
|
@@ -2293,7 +2293,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
2293
2293
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
2294
2294
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
2295
2295
|
closeDialog: (result?: any) => void;
|
|
2296
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
2296
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
2297
2297
|
changeEmitedValue: (value: any) => void;
|
|
2298
2298
|
addSubFormItem: (item: {
|
|
2299
2299
|
id: string;
|
|
@@ -2802,7 +2802,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
2802
2802
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
2803
2803
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
2804
2804
|
closeDialog: (result?: any) => void;
|
|
2805
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
2805
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
2806
2806
|
changeEmitedValue: (value: any) => void;
|
|
2807
2807
|
addSubFormItem: (item: {
|
|
2808
2808
|
id: string;
|
|
@@ -3315,7 +3315,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
3315
3315
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
3316
3316
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
3317
3317
|
closeDialog: (result?: any) => void;
|
|
3318
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
3318
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
3319
3319
|
changeEmitedValue: (value: any) => void;
|
|
3320
3320
|
addSubFormItem: (item: {
|
|
3321
3321
|
id: string;
|
|
@@ -3824,7 +3824,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
3824
3824
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
3825
3825
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
3826
3826
|
closeDialog: (result?: any) => void;
|
|
3827
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
3827
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
3828
3828
|
changeEmitedValue: (value: any) => void;
|
|
3829
3829
|
addSubFormItem: (item: {
|
|
3830
3830
|
id: string;
|
|
@@ -4337,7 +4337,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
4337
4337
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
4338
4338
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
4339
4339
|
closeDialog: (result?: any) => void;
|
|
4340
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
4340
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
4341
4341
|
changeEmitedValue: (value: any) => void;
|
|
4342
4342
|
addSubFormItem: (item: {
|
|
4343
4343
|
id: string;
|
|
@@ -4846,7 +4846,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
4846
4846
|
resetValidationStatus: (tag?: string | undefined) => void;
|
|
4847
4847
|
openDialog: (schema: any, ctx: any, callback?: ((ret?: any) => void) | undefined) => void;
|
|
4848
4848
|
closeDialog: (result?: any) => void;
|
|
4849
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
4849
|
+
changeTmpValue: (value: any, changeReason?: "input" | "initialValue" | "formInited" | "dataChanged" | "formulaChanged" | "controlled" | "defaultValue" | undefined) => void;
|
|
4850
4850
|
changeEmitedValue: (value: any) => void;
|
|
4851
4851
|
addSubFormItem: (item: {
|
|
4852
4852
|
id: string;
|
|
@@ -5206,7 +5206,7 @@ export declare const FormStore: import("mobx-state-tree").IModelType<{
|
|
|
5206
5206
|
readonly persistKey: string;
|
|
5207
5207
|
} & {
|
|
5208
5208
|
setInited: (value: boolean) => void;
|
|
5209
|
-
setValues: (values: object, tag?: object, replace?: boolean) => void;
|
|
5209
|
+
setValues: (values: object, tag?: object, replace?: boolean, concatFields?: string | string[]) => void;
|
|
5210
5210
|
setValueByName: (name: string, value: any, isPristine?: boolean, force?: boolean) => void;
|
|
5211
5211
|
trimValues: () => void;
|
|
5212
5212
|
submit: (fn?: ((values: object) => Promise<any>) | undefined, hooks?: Array<() => Promise<any>>, failedMessage?: string, validateErrCb?: () => void, throwErrors?: boolean) => Promise<any>;
|
package/lib/store/form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v6.0.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -145,8 +145,8 @@ var FormStore = service.ServiceStore.named('FormStore')
|
|
|
145
145
|
};
|
|
146
146
|
})
|
|
147
147
|
.actions(function (self) {
|
|
148
|
-
function setValues(values, tag, replace) {
|
|
149
|
-
self.updateData(values, tag, replace);
|
|
148
|
+
function setValues(values, tag, replace, concatFields) {
|
|
149
|
+
self.updateData(values, tag, replace, concatFields);
|
|
150
150
|
// 如果数据域中有数据变化,就都reset一下,去掉之前残留的验证消息
|
|
151
151
|
self.items.forEach(function (item) {
|
|
152
152
|
if (item.extraName) {
|
|
@@ -315,7 +315,7 @@ var FormStore = service.ServiceStore.named('FormStore')
|
|
|
315
315
|
? {
|
|
316
316
|
__saved: Date.now()
|
|
317
317
|
}
|
|
318
|
-
: undefined, !!api$1.replaceData);
|
|
318
|
+
: undefined, !!api$1.replaceData, api$1.concatDataFields);
|
|
319
319
|
}
|
|
320
320
|
if (!!json.ok) return [3 /*break*/, 6];
|
|
321
321
|
if (json.status === 422 && json.errors) {
|
|
@@ -450,7 +450,7 @@ var FormStore = service.ServiceStore.named('FormStore')
|
|
|
450
450
|
_a.label = 1;
|
|
451
451
|
case 1:
|
|
452
452
|
_a.trys.push([1, , 5, 6]);
|
|
453
|
-
return [4 /*yield*/, validate(hooks,
|
|
453
|
+
return [4 /*yield*/, validate(hooks, true, true, failedMessage, validateErrCb)];
|
|
454
454
|
case 2:
|
|
455
455
|
_a.sent();
|
|
456
456
|
if (!fn) return [3 /*break*/, 4];
|
package/lib/store/formItem.js
CHANGED
package/lib/store/iRenderer.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const iRendererStore: import("mobx-state-tree").IModelType<{
|
|
|
36
36
|
setTopStore(value: any): void;
|
|
37
37
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
38
38
|
reset(): void;
|
|
39
|
-
updateData(data?: object, tag?: object, replace?: boolean): void;
|
|
39
|
+
updateData(data?: object, tag?: object, replace?: boolean, concatFields?: string | string[]): void;
|
|
40
40
|
changeValue(name: string, value: any, changePristine?: boolean, force?: boolean, otherModifier?: ((data: Object) => void) | undefined): void;
|
|
41
41
|
setCurrentAction(action: object): void;
|
|
42
42
|
openDialog(ctx: any, additonal?: object, callback?: ((ret: any) => void) | undefined, scoped?: IScopedContext): void;
|
package/lib/store/iRenderer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v6.0.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -19,8 +19,10 @@ require('../utils/filter.js');
|
|
|
19
19
|
var SimpleMap = require('../utils/SimpleMap.js');
|
|
20
20
|
var node = require('./node.js');
|
|
21
21
|
require('../utils/api.js');
|
|
22
|
+
require('../utils/browser.js');
|
|
22
23
|
require('../utils/ColorScale.js');
|
|
23
24
|
require('../utils/columnsSplit.js');
|
|
25
|
+
var concatData = require('../utils/concatData.js');
|
|
24
26
|
require('../utils/DataSchema.js');
|
|
25
27
|
require('../utils/DataScope.js');
|
|
26
28
|
require('../utils/debug.js');
|
|
@@ -95,8 +97,11 @@ var iRendererStore = node.StoreNode.named('iRendererStore')
|
|
|
95
97
|
reset: function () {
|
|
96
98
|
self.data = self.pristine;
|
|
97
99
|
},
|
|
98
|
-
updateData: function (data, tag, replace) {
|
|
100
|
+
updateData: function (data, tag, replace, concatFields) {
|
|
99
101
|
if (data === void 0) { data = {}; }
|
|
102
|
+
if (concatFields) {
|
|
103
|
+
data = concatData.concatData(data, self.data, concatFields);
|
|
104
|
+
}
|
|
100
105
|
var prev = self.data;
|
|
101
106
|
var newData;
|
|
102
107
|
if (tag) {
|
package/lib/store/index.js
CHANGED
package/lib/store/list.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export declare const ListStore: import("mobx-state-tree").IModelType<{
|
|
|
103
103
|
setTopStore(value: any): void;
|
|
104
104
|
initData(data?: object, skipSetPristine?: boolean): void;
|
|
105
105
|
reset(): void;
|
|
106
|
-
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined): void;
|
|
106
|
+
updateData(data?: object, tag?: object | undefined, replace?: boolean | undefined, concatFields?: string | string[] | undefined): void;
|
|
107
107
|
changeValue(name: string, value: any, changePristine?: boolean | undefined, force?: boolean | undefined, otherModifier?: ((data: Object) => void) | undefined): void;
|
|
108
108
|
setCurrentAction(action: object): void;
|
|
109
109
|
openDialog(ctx: any, additonal?: object | undefined, callback?: ((ret: any) => void) | undefined, scoped?: import("..").IScopedContext | undefined): void;
|