@oinone/kunlun-vue-admin-base 6.2.10 → 6.2.11
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/dist/oinone-kunlun-vue-admin-base.css +1 -1
- package/dist/oinone-kunlun-vue-admin-base.esm.js +9641 -9263
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/action/component/action/ActionWidget.d.ts +10 -1
- package/dist/types/src/action/server-actions/ServerActionWidget.d.ts +1 -5
- package/dist/types/src/action/url-actions/UrlActionWidget.d.ts +1 -3
- package/dist/types/src/basic/field/complex/select/FormSelectComplexFieldWidget.d.ts +8 -2
- package/dist/types/src/basic/table-column/BaseTableColumnWidget.d.ts +3 -0
- package/dist/types/src/components/upload/File.vue.d.ts +0 -9
- package/dist/types/src/field/detail/enum/multi/DetailEnumMultiFieldWidget.d.ts +2 -1
- package/dist/types/src/field/detail/enum/single/DetailEnumFieldWidget.d.ts +2 -1
- package/dist/types/src/field/detail/index.d.ts +0 -1
- package/dist/types/src/field/detail/m2m/select/DetailM2MSelectFieldWidget.d.ts +1 -1
- package/dist/types/src/field/detail/o2m/index.d.ts +1 -0
- package/dist/types/src/field/detail/o2m/{DetailO2MSelectFieldWidget.d.ts → select/DetailO2MSelectFieldWidget.d.ts} +1 -1
- package/dist/types/src/field/form/abstract/FormInputAbstractFieldWidget.d.ts +22 -18
- package/dist/types/src/field/form/abstract/checkbox/FormCheckboxWidget.d.ts +1 -1
- package/dist/types/src/field/form/{enum/radio → boolean}/FormBooleanRadioFieldWidget.d.ts +4 -2
- package/dist/types/src/field/form/{enum/select/bool → boolean}/FormBooleanSelectFieldWidget.d.ts +2 -2
- package/dist/types/src/field/form/boolean/index.d.ts +2 -0
- package/dist/types/src/field/form/enum/FormEnumFieldAbstractWidget.d.ts +17 -5
- package/dist/types/src/field/form/enum/checkbox/FormEnumMultiCheckboxFieldWidget.d.ts +1 -0
- package/dist/types/src/field/form/enum/index.d.ts +1 -0
- package/dist/types/src/field/form/enum/radio/FormEnumRadioWidget.d.ts +4 -1
- package/dist/types/src/field/form/enum/radio/index.d.ts +0 -1
- package/dist/types/src/field/form/enum/select/index.d.ts +0 -1
- package/dist/types/src/field/form/enum/select/multi/FormEnumMultiSelectFieldWidget.d.ts +2 -1
- package/dist/types/src/field/form/enum/select/single/FormEnumFieldWidget.d.ts +2 -1
- package/dist/types/src/field/form/float/Plat.vue.d.ts +2 -2
- package/dist/types/src/field/form/index.d.ts +1 -2
- package/dist/types/src/field/form/integer/FormIntegerFieldWidget.d.ts +0 -1
- package/dist/types/src/field/form/m2o/upload/FormM2OUploadFieldWidget.d.ts +0 -1
- package/dist/types/src/field/form/o2o/index.d.ts +1 -0
- package/dist/types/src/field/form/o2o/upload/AbstractFormO2OUploadFieldWidget.d.ts +5 -0
- package/dist/types/src/field/form/o2o/upload/FormO2OUploadDraggableFieldWidget.d.ts +8 -0
- package/dist/types/src/field/form/o2o/upload/FormO2OUploadFieldWidget.d.ts +7 -0
- package/dist/types/src/field/form/o2o/upload/FormO2OUploadImgFieldWidget.d.ts +8 -0
- package/dist/types/src/field/form/o2o/upload/index.d.ts +4 -0
- package/dist/types/src/field/form/string/FormStringFieldWidget.d.ts +12 -3
- package/dist/types/src/field/form/string/iframe/FormStringIframeFieldWidget.d.ts +1 -0
- package/dist/types/src/field/form/string/media/FormStringMediaPlayerFieldWidget.d.ts +1 -0
- package/dist/types/src/field/form/string/tag/Tag.vue.d.ts +6 -6
- package/dist/types/src/field/form/string/upload/FormStringUploadFieldWidget.d.ts +11 -2
- package/dist/types/src/field/form/text/DefaultTextarea.vue.d.ts +4 -6
- package/dist/types/src/field/form/text/FormTextFieldWidget.d.ts +3 -1
- package/dist/types/src/field/form/text/index.d.ts +1 -0
- package/dist/types/src/field/form/text/typing.d.ts +4 -0
- package/dist/types/src/field/table/boolean/TableBooleanRadioFieldWidget.d.ts +3 -0
- package/dist/types/src/field/table/boolean/index.d.ts +1 -0
- package/dist/types/src/field/table/string/upload/TableStringMultiUploadWidget.d.ts +1 -1
- package/dist/types/src/provider/RootWidget.d.ts +2 -2
- package/dist/types/src/typing/widget-names.d.ts +1 -0
- package/package.json +8 -8
- package/src/action/component/action/ActionWidget.ts +203 -28
- package/src/action/server-actions/ServerActionWidget.ts +6 -104
- package/src/action/url-actions/UrlActionWidget.ts +2 -37
- package/src/basic/field/complex/select/FormSelectComplexFieldWidget.ts +24 -32
- package/src/basic/form-item/BaseFormItemWidget.ts +4 -0
- package/src/basic/gallery-item/DefaultGalleryItem.vue +6 -1
- package/src/basic/table-column/BaseTableColumnWidget.ts +5 -2
- package/src/components/upload/File.vue +0 -45
- package/src/field/detail/boolean/Boolean.vue +2 -3
- package/src/field/detail/boolean/DetailBooleanFieldWidget.ts +1 -1
- package/src/field/detail/boolean/DetailBooleanSelectFieldWidget.ts +1 -1
- package/src/field/detail/enum/multi/DetailEnumMultiFieldWidget.ts +9 -5
- package/src/field/detail/enum/single/DetailEnumFieldWidget.ts +8 -2
- package/src/field/detail/html/DetailHtmlFieldWidget.ts +1 -1
- package/src/field/detail/index.ts +0 -1
- package/src/field/detail/m2m/select/DetailM2MSelectFieldWidget.ts +3 -5
- package/src/field/detail/m2m/table/DetailM2MTableFieldWidget.ts +3 -1
- package/src/field/detail/m2o/DetailM2OSelectFieldWidget.ts +1 -1
- package/src/field/detail/m2o/upload/DetailM2OUploadWidget.ts +2 -3
- package/src/field/detail/number/DetailNumberWidget.ts +1 -1
- package/src/field/detail/o2m/index.ts +1 -0
- package/src/field/detail/o2m/{DetailO2MSelectFieldWidget.ts → select/DetailO2MSelectFieldWidget.ts} +4 -5
- package/src/field/detail/o2m/{Select.vue → select/Select.vue} +1 -1
- package/src/field/detail/o2m/table/DetailO2MTableFieldWidget.ts +3 -1
- package/src/field/detail/o2o/DetailO2OSelectFieldWidget.ts +1 -1
- package/src/field/detail/string/hyperlinks/DetailStringHyperlinksFieldWidget.ts +1 -1
- package/src/field/detail/string/iframe/DetailStringIframeFieldWidget.ts +2 -2
- package/src/field/detail/string/media/DetailStringMediaPlayerFieldWidget.ts +1 -1
- package/src/field/detail/string/string-with-copy/DetailStringWithCopyFieldWidget.ts +1 -1
- package/src/field/detail/string/tag/DetailStringTagFieldWidget.ts +1 -1
- package/src/field/detail/string/upload/DetailStringUploadFieldWidget.ts +1 -1
- package/src/field/detail/string/upload/DetailStringUploadImgFieldWidget.ts +1 -1
- package/src/field/form/abstract/FormInputAbstractFieldWidget.ts +54 -50
- package/src/field/form/abstract/checkbox/FormCheckboxWidget.ts +1 -3
- package/src/field/form/{enum/radio → boolean}/FormBooleanRadioFieldWidget.ts +22 -4
- package/src/field/form/{enum/select/bool → boolean}/FormBooleanSelectFieldWidget.ts +4 -5
- package/src/field/form/boolean/index.ts +2 -0
- package/src/field/form/enum/FormEnumFieldAbstractWidget.ts +42 -33
- package/src/field/form/enum/checkbox/FormEnumMultiCheckboxFieldWidget.ts +9 -1
- package/src/field/form/enum/index.ts +2 -1
- package/src/field/form/enum/radio/FormEnumRadioWidget.ts +21 -8
- package/src/field/form/enum/radio/index.ts +0 -1
- package/src/field/form/enum/select/index.ts +0 -1
- package/src/field/form/enum/select/multi/FormEnumMultiSelectFieldWidget.ts +2 -1
- package/src/field/form/enum/select/single/FormEnumFieldWidget.ts +2 -1
- package/src/field/form/index.ts +1 -3
- package/src/field/form/integer/FormIntegerFieldWidget.ts +0 -5
- package/src/field/form/integer/FormIntegerSliderFieldWidget.ts +1 -1
- package/src/field/form/integer/FormIntegerTagFieldWidget.ts +1 -0
- package/src/field/form/m2m/select/FormM2MFieldSelectWidget.ts +2 -2
- package/src/field/form/m2m/table/FormM2MTableFieldWidget.ts +2 -0
- package/src/field/form/m2m/upload/FormM2MUploadFieldWidget.ts +3 -3
- package/src/field/form/m2m/upload/FormM2MUploadImgFieldWidget.ts +1 -1
- package/src/field/form/m2o/form/FormM2OFormFieldWidget.ts +1 -1
- package/src/field/form/m2o/upload/FormM2OUploadFieldWidget.ts +2 -9
- package/src/field/form/m2o/upload/FormM2OUploadImgFieldWidget.ts +1 -1
- package/src/field/form/o2m/table/FormO2MTableFieldWidget.ts +2 -0
- package/src/field/form/o2m/upload/FormO2MUploadImgFieldWidget.ts +1 -1
- package/src/field/form/o2o/index.ts +1 -0
- package/src/field/form/o2o/upload/AbstractFormO2OUploadFieldWidget.ts +18 -0
- package/src/field/form/o2o/upload/FormO2OUploadDraggableFieldWidget.ts +47 -0
- package/src/field/form/o2o/upload/FormO2OUploadFieldWidget.ts +42 -0
- package/src/field/form/o2o/upload/FormO2OUploadImgFieldWidget.ts +62 -0
- package/src/field/form/o2o/upload/index.ts +4 -0
- package/src/field/form/string/DefaultString.vue +2 -2
- package/src/field/form/string/FormStringFieldWidget.ts +36 -27
- package/src/field/form/string/download/DefaultDownload.vue +1 -0
- package/src/field/form/string/iframe/FormStringIframeFieldWidget.ts +8 -1
- package/src/field/form/string/input/FormStringInputFieldWidget.ts +0 -4
- package/src/field/form/string/media/FormStringMediaPlayerFieldWidget.ts +7 -2
- package/src/field/form/string/media/FormStringMultiMediaPlayerFieldWidget.ts +1 -1
- package/src/field/form/string/tag/Tag.vue +0 -3
- package/src/field/form/string/upload/FormStringUploadFieldWidget.ts +24 -17
- package/src/field/form/string/upload/FormStringUploadImgFieldWidget.ts +1 -1
- package/src/field/form/text/DefaultTextarea.vue +11 -5
- package/src/field/form/text/FormTextFieldWidget.ts +32 -5
- package/src/field/form/text/index.ts +1 -0
- package/src/field/form/text/typing.ts +1 -0
- package/src/field/gallery/boolean/GalleryBooleanFieldWidget.ts +7 -3
- package/src/field/gallery/boolean/GalleryBooleanSelectFieldWidget.ts +1 -1
- package/src/field/gallery/common/GalleryCommonField.vue +7 -1
- package/src/field/gallery/common/GalleryCommonFieldWidget.ts +2 -8
- package/src/field/gallery/enum/single/GalleryEnumTagFieldWidget.ts +1 -1
- package/src/field/gallery/html/GalleryHtmlFieldWidget.ts +2 -2
- package/src/field/gallery/m2m/GalleryM2MSelectFieldWidget.ts +1 -1
- package/src/field/gallery/m2o/GalleryM2OSelectFieldWidget.ts +1 -1
- package/src/field/gallery/o2m/GalleryO2MSelectFieldWidget.ts +1 -1
- package/src/field/gallery/o2o/GalleryO2OSelectFieldWidget.ts +1 -1
- package/src/field/gallery/string/default/GalleryStringFieldWidget.ts +1 -2
- package/src/field/gallery/string/hyperlinks/GalleryStringHyperlinksFieldWidget.ts +1 -1
- package/src/field/gallery/string/iframe/GalleryStringIframeFieldWidget.ts +2 -2
- package/src/field/gallery/string/media-player/GalleryStringMediaPlayerWidget.ts +1 -1
- package/src/field/gallery/string/string-tag/GalleryStringTagStringFieldWidget.ts +1 -1
- package/src/field/gallery/string/tag/GalleryStringTagFieldWidget.ts +1 -1
- package/src/field/gallery/text-content/number/GalleryNumberTextContentWidget.ts +1 -1
- package/src/field/gallery/text-content/string/GalleryStringTextContentWidget.ts +1 -1
- package/src/field/table/boolean/TableBooleanFieldWidget.ts +7 -2
- package/src/field/table/boolean/TableBooleanRadioFieldWidget.ts +13 -0
- package/src/field/table/boolean/TableBooleanSelectFieldWidget.ts +1 -1
- package/src/field/table/boolean/index.ts +1 -0
- package/src/field/table/string/upload/TableStringMultiUploadWidget.ts +3 -3
- package/src/typing/widget-names.ts +2 -0
- package/src/util/utils.ts +2 -1
- package/src/view/application-screen/gallery/AppsGalleryWidget.ts +2 -2
- package/src/view/card/CardWidget.ts +4 -4
- package/src/view/gallery/GalleryWidget.ts +9 -3
- package/src/view/popup/drawer/style/index.scss +3 -1
- package/dist/types/src/field/form/enum/select/bool/index.d.ts +0 -1
- package/src/field/form/enum/select/bool/index.ts +0 -1
- /package/dist/types/src/field/detail/o2m/{Select.vue.d.ts → select/Select.vue.d.ts} +0 -0
|
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
9
|
type: StringConstructor;
|
|
10
10
|
};
|
|
11
11
|
rows: {
|
|
12
|
-
type: NumberConstructor;
|
|
12
|
+
type: (BooleanConstructor | ObjectConstructor | NumberConstructor)[];
|
|
13
13
|
default: number;
|
|
14
14
|
};
|
|
15
15
|
allowClear: {
|
|
@@ -47,9 +47,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
47
|
readonly: import("vue").ComputedRef<boolean | undefined>;
|
|
48
48
|
disabled: import("vue").ComputedRef<boolean | undefined>;
|
|
49
49
|
realValue: import("vue").Ref<string | undefined>;
|
|
50
|
-
autoSize: import("vue").ComputedRef<
|
|
51
|
-
minRows: number;
|
|
52
|
-
}>;
|
|
50
|
+
autoSize: import("vue").ComputedRef<boolean | Record<string, any> | undefined>;
|
|
53
51
|
clearContent: () => void;
|
|
54
52
|
clearStatus: import("vue").ComputedRef<boolean | "" | undefined>;
|
|
55
53
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -63,7 +61,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
63
61
|
type: StringConstructor;
|
|
64
62
|
};
|
|
65
63
|
rows: {
|
|
66
|
-
type: NumberConstructor;
|
|
64
|
+
type: (BooleanConstructor | ObjectConstructor | NumberConstructor)[];
|
|
67
65
|
default: number;
|
|
68
66
|
};
|
|
69
67
|
allowClear: {
|
|
@@ -96,7 +94,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
96
94
|
default: boolean;
|
|
97
95
|
};
|
|
98
96
|
}>>, {
|
|
99
|
-
rows: number
|
|
97
|
+
rows: number | boolean | Record<string, any>;
|
|
100
98
|
allowClear: boolean;
|
|
101
99
|
showCount: boolean;
|
|
102
100
|
readonly: string | boolean;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ValidatorInfo } from '../../../typing';
|
|
2
2
|
import { FormStringFieldWidget } from '../string/FormStringFieldWidget';
|
|
3
|
+
import { InputTextareaSize } from './typing';
|
|
3
4
|
export declare class FormTextFieldWidget extends FormStringFieldWidget {
|
|
4
5
|
initialize(props: any): this;
|
|
5
|
-
protected get
|
|
6
|
+
protected get defaultRows(): InputTextareaSize;
|
|
7
|
+
protected get rows(): InputTextareaSize;
|
|
6
8
|
protected get maxLength(): any;
|
|
7
9
|
validator(): Promise<ValidatorInfo>;
|
|
8
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TableStringTagFieldWidget } from '../tag/TableStringTagFieldWidget';
|
|
2
1
|
import { VNode } from 'vue';
|
|
2
|
+
import { TableStringTagFieldWidget } from '../tag';
|
|
3
3
|
export declare class TableStringMultiUploadWidget extends TableStringTagFieldWidget {
|
|
4
4
|
protected get cdnKey(): any;
|
|
5
5
|
protected get privateLink(): boolean | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { VueWidget } from '@oinone/kunlun-vue-widget';
|
|
2
2
|
import { DefaultMetadataMainViewWidget } from '../main-view';
|
|
3
|
-
import { FirstResetPasswordWidget, ForgetPasswordWidget
|
|
3
|
+
import { FirstResetPasswordWidget, ForgetPasswordWidget } from '../view';
|
|
4
4
|
export declare class RootWidget extends VueWidget {
|
|
5
5
|
root: string;
|
|
6
6
|
widgets: {
|
|
7
|
-
login: typeof
|
|
7
|
+
login: typeof import("../view").LoginWidget;
|
|
8
8
|
page: typeof DefaultMetadataMainViewWidget;
|
|
9
9
|
forget: typeof ForgetPasswordWidget;
|
|
10
10
|
first: typeof FirstResetPasswordWidget;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oinone/kunlun-vue-admin-base",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.11",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prebuild": "rimraf dist",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"doc": "typedoc --out docs src/index.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@oinone/kunlun-vue-admin-layout": "6.2.
|
|
18
|
-
"@oinone/kunlun-vue-router": "6.2.
|
|
19
|
-
"@oinone/kunlun-vue-ui": "6.2.
|
|
20
|
-
"@oinone/kunlun-vue-ui-antd": "6.2.
|
|
21
|
-
"@oinone/kunlun-vue-ui-common": "6.2.
|
|
22
|
-
"@oinone/kunlun-vue-ui-el": "6.2.
|
|
23
|
-
"@oinone/kunlun-vue-widget": "6.2.
|
|
17
|
+
"@oinone/kunlun-vue-admin-layout": "6.2.11",
|
|
18
|
+
"@oinone/kunlun-vue-router": "6.2.11",
|
|
19
|
+
"@oinone/kunlun-vue-ui": "6.2.11",
|
|
20
|
+
"@oinone/kunlun-vue-ui-antd": "6.2.11",
|
|
21
|
+
"@oinone/kunlun-vue-ui-common": "6.2.11",
|
|
22
|
+
"@oinone/kunlun-vue-ui-el": "6.2.11",
|
|
23
|
+
"@oinone/kunlun-vue-widget": "6.2.11",
|
|
24
24
|
"@wangeditor/editor": "5.1.23",
|
|
25
25
|
"@wangeditor/editor-for-vue": "5.1.11",
|
|
26
26
|
"@wangeditor/plugin-upload-attachment": "1.1.0",
|
|
@@ -2,26 +2,42 @@ import {
|
|
|
2
2
|
ActiveRecord,
|
|
3
3
|
ActiveRecords,
|
|
4
4
|
buildQueryCondition,
|
|
5
|
+
ConfirmModal,
|
|
6
|
+
FunctionCache,
|
|
7
|
+
FunctionService,
|
|
8
|
+
GetRequestModelFieldsOptions,
|
|
9
|
+
ModelCache,
|
|
5
10
|
parseConfigs,
|
|
11
|
+
RequestModelField,
|
|
6
12
|
resolveDynamicDomain,
|
|
7
13
|
resolveDynamicExpression,
|
|
8
14
|
RuntimeAction,
|
|
9
15
|
RuntimeContext,
|
|
10
16
|
RuntimeContextManager,
|
|
17
|
+
RuntimeFunctionDefinition,
|
|
18
|
+
RuntimeServerAction,
|
|
19
|
+
SubmitRelationValue,
|
|
20
|
+
SubmitValue,
|
|
11
21
|
translate,
|
|
12
22
|
translateValueByKey,
|
|
13
23
|
ValidatorCallChainingParameters
|
|
14
24
|
} from '@oinone/kunlun-engine';
|
|
15
25
|
import { EventBus, EventConsumer, KeyboardEventMessage } from '@oinone/kunlun-event';
|
|
16
26
|
import { Expression, ExpressionRunParam } from '@oinone/kunlun-expression';
|
|
17
|
-
import { ActionContextType, ActionElement, IAction, ViewType } from '@oinone/kunlun-meta';
|
|
27
|
+
import { ActionContextType, ActionElement, IAction, ModelFieldType, ViewType } from '@oinone/kunlun-meta';
|
|
18
28
|
import { Condition } from '@oinone/kunlun-request';
|
|
19
29
|
import { DEFAULT_TRUE_CONDITION } from '@oinone/kunlun-service';
|
|
20
30
|
import { BooleanHelper, debugConsole, GraphqlHelper, ReturnPromise } from '@oinone/kunlun-shared';
|
|
21
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
ButtonBizStyle,
|
|
33
|
+
ButtonType,
|
|
34
|
+
ConfirmType,
|
|
35
|
+
PopconfirmPlacement,
|
|
36
|
+
StyleHelper
|
|
37
|
+
} from '@oinone/kunlun-vue-ui-common';
|
|
22
38
|
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
23
39
|
import { isBoolean, isNil, isString, set as setData } from 'lodash-es';
|
|
24
|
-
import { Component, toRaw } from 'vue';
|
|
40
|
+
import { Component, createVNode, toRaw } from 'vue';
|
|
25
41
|
import { BaseActionWidget, BaseActionWidgetProps, BaseView, QueryExpression } from '../../../basic';
|
|
26
42
|
import { ActionKeyboardConfig, ClickResult, fetchPopconfirmPlacement } from '../../../typing';
|
|
27
43
|
import { executeConfirm } from '../../../util';
|
|
@@ -310,9 +326,8 @@ export class ActionWidget<
|
|
|
310
326
|
|
|
311
327
|
if (length) {
|
|
312
328
|
return GraphqlHelper.serializableObject(queryData);
|
|
313
|
-
} else {
|
|
314
|
-
return '{}';
|
|
315
329
|
}
|
|
330
|
+
return '{}';
|
|
316
331
|
};
|
|
317
332
|
|
|
318
333
|
return { rsql, queryData, condition, queryDataToString };
|
|
@@ -471,26 +486,28 @@ export class ActionWidget<
|
|
|
471
486
|
@Widget.Reactive()
|
|
472
487
|
protected get enableConfirm(): boolean {
|
|
473
488
|
const enableConfirm = this.getDsl().enableConfirm;
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
489
|
+
if (enableConfirm != null) {
|
|
490
|
+
const rst = BooleanHelper.toBoolean(enableConfirm);
|
|
491
|
+
if (isNil(rst)) {
|
|
492
|
+
const scene = this.scene;
|
|
493
|
+
|
|
494
|
+
return Expression.run(
|
|
495
|
+
{
|
|
496
|
+
activeRecords: this.activeRecords,
|
|
497
|
+
rootRecord: this.rootData?.[0] || {},
|
|
498
|
+
openerRecord: this.openerActiveRecords?.[0] || {},
|
|
499
|
+
scene,
|
|
500
|
+
activeRecord: this.activeRecords?.[0] || {},
|
|
501
|
+
parentRecord: this.parentViewActiveRecords?.[0] || {}
|
|
502
|
+
} as ExpressionRunParam,
|
|
503
|
+
enableConfirm,
|
|
504
|
+
enableConfirm
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
return rst;
|
|
492
508
|
}
|
|
493
|
-
|
|
509
|
+
const { confirmText, confirmFun } = this;
|
|
510
|
+
return !!confirmText || !!confirmFun;
|
|
494
511
|
}
|
|
495
512
|
|
|
496
513
|
/**
|
|
@@ -510,7 +527,7 @@ export class ActionWidget<
|
|
|
510
527
|
protected get confirmType(): ConfirmType | undefined {
|
|
511
528
|
const { confirmType } = this.getDsl();
|
|
512
529
|
if (confirmType) {
|
|
513
|
-
const realConfirmType = ConfirmType[confirmType];
|
|
530
|
+
const realConfirmType = ConfirmType[confirmType.toUpperCase()];
|
|
514
531
|
if (realConfirmType) {
|
|
515
532
|
return realConfirmType;
|
|
516
533
|
}
|
|
@@ -536,6 +553,16 @@ export class ActionWidget<
|
|
|
536
553
|
return undefined;
|
|
537
554
|
}
|
|
538
555
|
|
|
556
|
+
@Widget.Reactive()
|
|
557
|
+
protected get confirmHtml(): boolean | undefined {
|
|
558
|
+
return BooleanHelper.toBoolean(this.getDsl().confirmHtml);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
@Widget.Reactive()
|
|
562
|
+
protected get confirmFun(): string | undefined {
|
|
563
|
+
return this.getDsl().confirmFun;
|
|
564
|
+
}
|
|
565
|
+
|
|
539
566
|
@Widget.Reactive()
|
|
540
567
|
protected get confirmPosition(): PopconfirmPlacement {
|
|
541
568
|
return fetchPopconfirmPlacement(this.getDsl().confirmPosition) || PopconfirmPlacement.BM;
|
|
@@ -550,6 +577,11 @@ export class ActionWidget<
|
|
|
550
577
|
return translate('kunlun.common.prompt');
|
|
551
578
|
}
|
|
552
579
|
|
|
580
|
+
@Widget.Reactive()
|
|
581
|
+
protected get confirmWidth(): string | undefined {
|
|
582
|
+
return StyleHelper.px(this.getDsl().confirmWidth);
|
|
583
|
+
}
|
|
584
|
+
|
|
553
585
|
@Widget.Reactive()
|
|
554
586
|
protected get enterText(): string | undefined {
|
|
555
587
|
const { enterText } = this.getDsl();
|
|
@@ -760,12 +792,70 @@ export class ActionWidget<
|
|
|
760
792
|
* 二次弹窗校验
|
|
761
793
|
*/
|
|
762
794
|
@Widget.Method()
|
|
763
|
-
public validateConfirm(): Promise<boolean> {
|
|
795
|
+
public async validateConfirm(): Promise<boolean> {
|
|
764
796
|
if (this.enableConfirm && this.confirmType === ConfirmType.MODAL) {
|
|
765
|
-
const { confirmText } = this;
|
|
797
|
+
const { confirmText, confirmFun } = this;
|
|
766
798
|
if (confirmText) {
|
|
799
|
+
return this.validateConfirmByText();
|
|
800
|
+
}
|
|
801
|
+
if (confirmFun) {
|
|
802
|
+
return this.validateConfirmByFun();
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
return Promise.resolve(true);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
protected async validateConfirmByText(): Promise<boolean> {
|
|
809
|
+
const { confirmTitle, confirmWidth, confirmHtml, confirmText } = this;
|
|
810
|
+
let confirm: string | Function = confirmText!;
|
|
811
|
+
if (confirmHtml) {
|
|
812
|
+
confirm = () => createVNode('span', { innerHTML: confirmText });
|
|
813
|
+
}
|
|
814
|
+
return executeConfirm({
|
|
815
|
+
title: confirmTitle,
|
|
816
|
+
width: confirmWidth,
|
|
817
|
+
confirm: confirm as unknown as string,
|
|
818
|
+
enterText: this.enterText,
|
|
819
|
+
cancelText: this.cancelText
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
protected async validateConfirmByFun(): Promise<boolean> {
|
|
824
|
+
const { confirmTitle, confirmWidth, confirmHtml, confirmFun } = this;
|
|
825
|
+
const functionDefinition = await FunctionCache.get(this.model.model, confirmFun!);
|
|
826
|
+
if (functionDefinition) {
|
|
827
|
+
const requestFields = await this.getRequestModelFields();
|
|
828
|
+
const submitValue = await this.submit(this.action);
|
|
829
|
+
const message = await this.executeFunction<string | ConfirmModal>(
|
|
830
|
+
functionDefinition,
|
|
831
|
+
requestFields,
|
|
832
|
+
submitValue.records
|
|
833
|
+
);
|
|
834
|
+
if (message) {
|
|
835
|
+
let title: string = confirmTitle!;
|
|
836
|
+
let confirm: string | Function;
|
|
837
|
+
if (typeof message === 'string') {
|
|
838
|
+
confirm = message;
|
|
839
|
+
} else {
|
|
840
|
+
const expressionParam: ExpressionRunParam = {
|
|
841
|
+
activeRecords: [message.context || {}],
|
|
842
|
+
rootRecord: this.rootData?.[0] || {},
|
|
843
|
+
activeRecord: message.context || {},
|
|
844
|
+
scene: this.scene,
|
|
845
|
+
openerRecord: this.openerActiveRecords?.[0] || {},
|
|
846
|
+
parentRecord: this.parentViewActiveRecords?.[0] || {}
|
|
847
|
+
};
|
|
848
|
+
title = Expression.replaceRun(expressionParam, message.title || title || '');
|
|
849
|
+
confirm = Expression.replaceRun(expressionParam, translateValueByKey(message.content || ''));
|
|
850
|
+
}
|
|
851
|
+
if (confirmHtml) {
|
|
852
|
+
const finalMessage = confirm;
|
|
853
|
+
confirm = () => createVNode('span', { innerHTML: finalMessage });
|
|
854
|
+
}
|
|
767
855
|
return executeConfirm({
|
|
768
|
-
|
|
856
|
+
title,
|
|
857
|
+
width: confirmWidth,
|
|
858
|
+
confirm: confirm as unknown as string,
|
|
769
859
|
enterText: this.enterText,
|
|
770
860
|
cancelText: this.cancelText
|
|
771
861
|
});
|
|
@@ -947,6 +1037,91 @@ export class ActionWidget<
|
|
|
947
1037
|
return result;
|
|
948
1038
|
}
|
|
949
1039
|
|
|
1040
|
+
protected async getRequestModelFields(options?: GetRequestModelFieldsOptions): Promise<RequestModelField[]> {
|
|
1041
|
+
const { viewType } = this;
|
|
1042
|
+
if (viewType === ViewType.Tree) {
|
|
1043
|
+
const runtimeModel = await ModelCache.get(this.model.model);
|
|
1044
|
+
if (runtimeModel) {
|
|
1045
|
+
return runtimeModel.modelFields.map((field) => ({ field }));
|
|
1046
|
+
}
|
|
1047
|
+
return [];
|
|
1048
|
+
}
|
|
1049
|
+
if (this.popupScene) {
|
|
1050
|
+
return this.seekPopupMainRuntimeContext().getRequestModelFields(options);
|
|
1051
|
+
}
|
|
1052
|
+
return this.rootRuntimeContext.getRequestModelFields(options);
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
protected seekPopupMainRuntimeContext(): RuntimeContext {
|
|
1056
|
+
if (this.metadataHandle === this.rootHandle) {
|
|
1057
|
+
const modelModel = this.model.model;
|
|
1058
|
+
if (modelModel) {
|
|
1059
|
+
const popupMainRuntimeContext = RuntimeContextManager.getOthers(this.rootHandle)?.find(
|
|
1060
|
+
(v) => v.model.model === modelModel
|
|
1061
|
+
);
|
|
1062
|
+
if (popupMainRuntimeContext) {
|
|
1063
|
+
return popupMainRuntimeContext;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
return this.rootRuntimeContext;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
protected async submit(action: RuntimeServerAction): Promise<SubmitValue> {
|
|
1071
|
+
let records: ActiveRecords | undefined;
|
|
1072
|
+
let relationRecords: SubmitRelationValue[] | undefined;
|
|
1073
|
+
if (!this.inline && this.submitCallChaining) {
|
|
1074
|
+
const callResult = await this.submitCallChaining?.syncCall();
|
|
1075
|
+
if (callResult != null) {
|
|
1076
|
+
records = callResult.records;
|
|
1077
|
+
relationRecords = callResult.relationRecords;
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
if (records == null) {
|
|
1081
|
+
records = this.activeRecords || [];
|
|
1082
|
+
}
|
|
1083
|
+
if (action.contextType === ActionContextType.Batch || action.contextType === ActionContextType.SingleAndBatch) {
|
|
1084
|
+
// do nothing.
|
|
1085
|
+
} else if (action.contextType === ActionContextType.Single) {
|
|
1086
|
+
if (Array.isArray(records)) {
|
|
1087
|
+
[records] = records;
|
|
1088
|
+
}
|
|
1089
|
+
} else {
|
|
1090
|
+
const ttype = action.functionDefinition?.argumentList?.[0]?.ttype;
|
|
1091
|
+
if (ttype && [ModelFieldType.ManyToOne, ModelFieldType.OneToOne].includes(ttype as ModelFieldType)) {
|
|
1092
|
+
if (Array.isArray(records)) {
|
|
1093
|
+
[records] = records;
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
if (!records) {
|
|
1098
|
+
if (action.contextType !== ActionContextType.ContextFree) {
|
|
1099
|
+
const name = this.action?.displayName || this.action?.label;
|
|
1100
|
+
throw new Error(`${name} action not params`);
|
|
1101
|
+
}
|
|
1102
|
+
records = {};
|
|
1103
|
+
}
|
|
1104
|
+
return new SubmitValue(records, relationRecords);
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
protected executeFunction<T>(
|
|
1108
|
+
functionDefinition: RuntimeFunctionDefinition,
|
|
1109
|
+
requestFields: RequestModelField[],
|
|
1110
|
+
activeRecords: ActiveRecords | undefined
|
|
1111
|
+
): Promise<T> {
|
|
1112
|
+
activeRecords = this.mergeContext(activeRecords);
|
|
1113
|
+
return FunctionService.INSTANCE.simpleExecute(
|
|
1114
|
+
this.model,
|
|
1115
|
+
functionDefinition,
|
|
1116
|
+
{
|
|
1117
|
+
requestModels: FunctionService.usingStaticModels(),
|
|
1118
|
+
requestFields,
|
|
1119
|
+
variables: this.rootRuntimeContext.generatorVariables({ path: this.action.sessionPath })
|
|
1120
|
+
},
|
|
1121
|
+
activeRecords
|
|
1122
|
+
);
|
|
1123
|
+
}
|
|
1124
|
+
|
|
950
1125
|
private validatorByExpression(expression: string) {
|
|
951
1126
|
Expression.getInstance().initExpressionContext(
|
|
952
1127
|
this.activeRecords,
|
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ActiveRecords,
|
|
3
2
|
Dialog,
|
|
4
3
|
Drawer,
|
|
5
4
|
executeViewAction,
|
|
6
5
|
FunctionCache,
|
|
7
6
|
FunctionService,
|
|
8
|
-
GetRequestModelFieldsOptions,
|
|
9
|
-
ModelCache,
|
|
10
7
|
MultiTabsManager,
|
|
11
8
|
RelationUpdateType,
|
|
12
9
|
RequestModelField,
|
|
13
10
|
ROOT_HANDLE,
|
|
14
11
|
RuntimeContext,
|
|
15
|
-
RuntimeContextManager,
|
|
16
|
-
RuntimeFunctionDefinition,
|
|
17
12
|
RuntimeServerAction,
|
|
18
13
|
RuntimeViewAction,
|
|
19
|
-
StaticMetadata,
|
|
20
|
-
SubmitRelationValue,
|
|
21
14
|
SubmitValue,
|
|
22
15
|
translateValueByKey,
|
|
23
16
|
UpdateOneWithRelationsService
|
|
24
17
|
} from '@oinone/kunlun-engine';
|
|
25
|
-
import {
|
|
18
|
+
import { ActionType, ViewType } from '@oinone/kunlun-meta';
|
|
26
19
|
import { HttpClientError, MessageHub, RequestErrorInterceptor, SystemErrorCode } from '@oinone/kunlun-request';
|
|
27
20
|
import { SPI } from '@oinone/kunlun-spi';
|
|
28
21
|
import { BooleanHelper, CallChaining, debugConsole, OioNotification } from '@oinone/kunlun-vue-ui-antd';
|
|
@@ -157,48 +150,6 @@ export class ServerActionWidget extends ActionWidget<RuntimeServerAction> {
|
|
|
157
150
|
}
|
|
158
151
|
}
|
|
159
152
|
|
|
160
|
-
protected async submit(action: RuntimeServerAction): Promise<SubmitValue> {
|
|
161
|
-
let records: ActiveRecords | undefined;
|
|
162
|
-
let relationRecords: SubmitRelationValue[] | undefined;
|
|
163
|
-
if (!this.inline && this.submitCallChaining) {
|
|
164
|
-
debugConsole.run(() => {
|
|
165
|
-
if ([ViewType.Detail, ViewType.Form].includes(this.viewType!)) {
|
|
166
|
-
debugConsole.log('formData in view:', this.activeRecords?.[0]);
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
const callResult = await this.submitCallChaining?.syncCall();
|
|
170
|
-
if (callResult != null) {
|
|
171
|
-
records = callResult.records;
|
|
172
|
-
relationRecords = callResult.relationRecords;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
if (records == null) {
|
|
176
|
-
records = this.activeRecords || [];
|
|
177
|
-
}
|
|
178
|
-
if (action.contextType === ActionContextType.Batch || action.contextType === ActionContextType.SingleAndBatch) {
|
|
179
|
-
// do nothing.
|
|
180
|
-
} else if (action.contextType === ActionContextType.Single) {
|
|
181
|
-
if (Array.isArray(records)) {
|
|
182
|
-
[records] = records;
|
|
183
|
-
}
|
|
184
|
-
} else {
|
|
185
|
-
const ttype = action.functionDefinition?.argumentList?.[0]?.ttype;
|
|
186
|
-
if (ttype && [ModelFieldType.ManyToOne, ModelFieldType.OneToOne].includes(ttype as ModelFieldType)) {
|
|
187
|
-
if (Array.isArray(records)) {
|
|
188
|
-
[records] = records;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
if (!records) {
|
|
193
|
-
if (action.contextType !== ActionContextType.ContextFree) {
|
|
194
|
-
const name = this.action?.displayName || this.action?.label;
|
|
195
|
-
throw new Error(`${name} action not params`);
|
|
196
|
-
}
|
|
197
|
-
records = {};
|
|
198
|
-
}
|
|
199
|
-
return new SubmitValue(records, relationRecords);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
153
|
protected async clickActionAfter(result: ClickResult): Promise<ClickResult> {
|
|
203
154
|
let refreshParent = false;
|
|
204
155
|
if (this.isDialog) {
|
|
@@ -207,8 +158,8 @@ export class ServerActionWidget extends ActionWidget<RuntimeServerAction> {
|
|
|
207
158
|
await this.clickActionAfterRefreshData(result, refreshParent);
|
|
208
159
|
this.closeAllDialog ? Dialog.disposeAll() : Dialog.dispose(this.action);
|
|
209
160
|
return result;
|
|
210
|
-
}
|
|
211
|
-
|
|
161
|
+
}
|
|
162
|
+
if (this.goBack) {
|
|
212
163
|
this.historyBack();
|
|
213
164
|
return result;
|
|
214
165
|
}
|
|
@@ -218,13 +169,12 @@ export class ServerActionWidget extends ActionWidget<RuntimeServerAction> {
|
|
|
218
169
|
await this.clickActionAfterRefreshData(result, refreshParent);
|
|
219
170
|
this.closeAllDrawer ? Drawer.disposeAll() : Drawer.dispose(this.action);
|
|
220
171
|
return result;
|
|
221
|
-
}
|
|
222
|
-
|
|
172
|
+
}
|
|
173
|
+
if (this.goBack) {
|
|
223
174
|
this.historyBack();
|
|
224
175
|
return result;
|
|
225
176
|
}
|
|
226
177
|
} else if (this.goBack) {
|
|
227
|
-
// eslint-disable-next-line no-restricted-globals
|
|
228
178
|
this.historyBack();
|
|
229
179
|
return result;
|
|
230
180
|
}
|
|
@@ -355,36 +305,6 @@ export class ServerActionWidget extends ActionWidget<RuntimeServerAction> {
|
|
|
355
305
|
return !!parameters.relationRecords.length;
|
|
356
306
|
}
|
|
357
307
|
|
|
358
|
-
protected seekPopupMainRuntimeContext(): RuntimeContext {
|
|
359
|
-
if (this.metadataHandle === this.rootHandle) {
|
|
360
|
-
const modelModel = this.model.model;
|
|
361
|
-
if (modelModel) {
|
|
362
|
-
const popupMainRuntimeContext = RuntimeContextManager.getOthers(this.rootHandle)?.find(
|
|
363
|
-
(v) => v.model.model === modelModel
|
|
364
|
-
);
|
|
365
|
-
if (popupMainRuntimeContext) {
|
|
366
|
-
return popupMainRuntimeContext;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
return this.rootRuntimeContext;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
protected async getRequestModelFields(options?: GetRequestModelFieldsOptions): Promise<RequestModelField[]> {
|
|
374
|
-
const { viewType } = this;
|
|
375
|
-
if (viewType === ViewType.Tree) {
|
|
376
|
-
const runtimeModel = await ModelCache.get(this.model.model);
|
|
377
|
-
if (runtimeModel) {
|
|
378
|
-
return runtimeModel.modelFields.map((field) => ({ field }));
|
|
379
|
-
}
|
|
380
|
-
return [];
|
|
381
|
-
}
|
|
382
|
-
if (this.popupScene) {
|
|
383
|
-
return this.seekPopupMainRuntimeContext().getRequestModelFields(options);
|
|
384
|
-
}
|
|
385
|
-
return this.rootRuntimeContext.getRequestModelFields(options);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
308
|
protected async executeAction(action: RuntimeServerAction, submitValue: SubmitValue): Promise<ClickResult> {
|
|
389
309
|
if (
|
|
390
310
|
(this.updateOneWithRelationName === action.fun || this.updateActionName === action.name) &&
|
|
@@ -407,27 +327,9 @@ export class ServerActionWidget extends ActionWidget<RuntimeServerAction> {
|
|
|
407
327
|
return this.executeFunction(functionDefinition, requestFields, submitValue.records);
|
|
408
328
|
}
|
|
409
329
|
|
|
410
|
-
protected executeFunction<T>(
|
|
411
|
-
functionDefinition: RuntimeFunctionDefinition,
|
|
412
|
-
requestFields: RequestModelField[],
|
|
413
|
-
activeRecords: ActiveRecords | undefined
|
|
414
|
-
): Promise<T> {
|
|
415
|
-
activeRecords = this.mergeContext(activeRecords);
|
|
416
|
-
return FunctionService.INSTANCE.simpleExecute(
|
|
417
|
-
this.model,
|
|
418
|
-
functionDefinition,
|
|
419
|
-
{
|
|
420
|
-
requestModels: [StaticMetadata.ResourceAddress],
|
|
421
|
-
requestFields,
|
|
422
|
-
variables: this.rootRuntimeContext.generatorVariables({ path: this.action.sessionPath })
|
|
423
|
-
},
|
|
424
|
-
activeRecords
|
|
425
|
-
);
|
|
426
|
-
}
|
|
427
|
-
|
|
428
330
|
protected executeRelationUpdate<T>(requestFields: RequestModelField[], submitValue: SubmitValue): Promise<T> {
|
|
429
331
|
return UpdateOneWithRelationsService.execute(this.model, submitValue, {
|
|
430
|
-
requestModels:
|
|
332
|
+
requestModels: FunctionService.usingStaticModels(),
|
|
431
333
|
requestFields,
|
|
432
334
|
variables: this.rootRuntimeContext.generatorVariables({ path: this.action.sessionPath })
|
|
433
335
|
});
|
|
@@ -2,19 +2,14 @@ import {
|
|
|
2
2
|
ActiveRecord,
|
|
3
3
|
FunctionCache,
|
|
4
4
|
FunctionService,
|
|
5
|
-
GetRequestModelFieldsOptions,
|
|
6
|
-
ModelCache,
|
|
7
5
|
RedirectTargetEnum,
|
|
8
6
|
RequestModelField,
|
|
9
|
-
RuntimeContext,
|
|
10
|
-
RuntimeContextManager,
|
|
11
7
|
RuntimeFunctionDefinition,
|
|
12
8
|
RuntimeUrlAction,
|
|
13
|
-
StaticMetadata,
|
|
14
9
|
translateValueByKey
|
|
15
10
|
} from '@oinone/kunlun-engine';
|
|
16
11
|
import { Expression } from '@oinone/kunlun-expression';
|
|
17
|
-
import { ActionType, ViewActionTarget
|
|
12
|
+
import { ActionType, ViewActionTarget } from '@oinone/kunlun-meta';
|
|
18
13
|
import { ReturnPromise } from '@oinone/kunlun-shared';
|
|
19
14
|
import { SPI } from '@oinone/kunlun-spi';
|
|
20
15
|
import { OioMessage, OioNotification } from '@oinone/kunlun-vue-ui-antd';
|
|
@@ -67,36 +62,6 @@ export class UrlActionWidget extends ActionWidget<RuntimeUrlAction> {
|
|
|
67
62
|
return res;
|
|
68
63
|
}
|
|
69
64
|
|
|
70
|
-
protected seekPopupMainRuntimeContext(): RuntimeContext {
|
|
71
|
-
if (this.metadataHandle === this.rootHandle) {
|
|
72
|
-
const modelModel = this.model.model;
|
|
73
|
-
if (modelModel) {
|
|
74
|
-
const popupMainRuntimeContext = RuntimeContextManager.getOthers(this.rootHandle)?.find(
|
|
75
|
-
(v) => v.model.model === modelModel
|
|
76
|
-
);
|
|
77
|
-
if (popupMainRuntimeContext) {
|
|
78
|
-
return popupMainRuntimeContext;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return this.rootRuntimeContext;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
protected async getRequestModelFields(options?: GetRequestModelFieldsOptions): Promise<RequestModelField[]> {
|
|
86
|
-
const { viewType } = this;
|
|
87
|
-
if (viewType === ViewType.Tree) {
|
|
88
|
-
const runtimeModel = await ModelCache.get(this.model.model);
|
|
89
|
-
if (runtimeModel) {
|
|
90
|
-
return runtimeModel.modelFields.map((field) => ({ field }));
|
|
91
|
-
}
|
|
92
|
-
return [];
|
|
93
|
-
}
|
|
94
|
-
if (this.popupScene) {
|
|
95
|
-
return this.seekPopupMainRuntimeContext().getRequestModelFields(options);
|
|
96
|
-
}
|
|
97
|
-
return this.rootRuntimeContext.getRequestModelFields(options);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
65
|
protected executeFunction<T>(
|
|
101
66
|
functionDefinition: RuntimeFunctionDefinition,
|
|
102
67
|
requestFields: RequestModelField[],
|
|
@@ -109,7 +74,7 @@ export class UrlActionWidget extends ActionWidget<RuntimeUrlAction> {
|
|
|
109
74
|
this.model,
|
|
110
75
|
functionDefinition,
|
|
111
76
|
{
|
|
112
|
-
requestModels:
|
|
77
|
+
requestModels: FunctionService.usingStaticModels(),
|
|
113
78
|
requestFields,
|
|
114
79
|
variables: { path: this.action.sessionPath }
|
|
115
80
|
},
|