@oinone/kunlun-vue-admin-base 6.2.10 → 6.2.12
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 +9602 -9235
- 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/spi/LayoutManager.d.ts +20 -17
- package/dist/types/src/spi/MaskManager.d.ts +33 -5
- package/dist/types/src/tags/context/runtime-context-helper.d.ts +1 -0
- 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/element/BaseElementViewWidget.ts +11 -2
- 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/main-view/DefaultMetadataMainViewWidget.ts +7 -24
- package/src/spi/LayoutManager.ts +20 -17
- package/src/spi/MaskManager.ts +36 -6
- package/src/tags/context/runtime-context-helper.ts +11 -9
- 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
|
@@ -3,12 +3,11 @@ import { SPI } from '@oinone/kunlun-spi';
|
|
|
3
3
|
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
4
4
|
import { FormFieldWidget } from '../../../../basic';
|
|
5
5
|
import { DetailStringFieldWidget } from '../../../detail';
|
|
6
|
-
|
|
7
6
|
import GalleryString from './GalleryString.vue';
|
|
8
7
|
|
|
9
8
|
@SPI.ClassFactory(
|
|
10
9
|
FormFieldWidget.Token({
|
|
11
|
-
viewType:
|
|
10
|
+
viewType: ViewType.Gallery,
|
|
12
11
|
ttype: [ModelFieldType.String, ModelFieldType.Phone, ModelFieldType.Email]
|
|
13
12
|
})
|
|
14
13
|
)
|
|
@@ -7,9 +7,9 @@ import Iframe from './Iframe.vue';
|
|
|
7
7
|
|
|
8
8
|
@SPI.ClassFactory(
|
|
9
9
|
FormFieldWidget.Token({
|
|
10
|
-
viewType:
|
|
10
|
+
viewType: ViewType.Gallery,
|
|
11
11
|
ttype: ModelFieldType.String,
|
|
12
|
-
widget:
|
|
12
|
+
widget: 'Iframe'
|
|
13
13
|
})
|
|
14
14
|
)
|
|
15
15
|
export class GalleryStringIframeFieldWidget extends DetailStringIframeFieldWidget {
|
|
@@ -8,7 +8,7 @@ import GalleryTagString from './GalleryTagString.vue';
|
|
|
8
8
|
|
|
9
9
|
@SPI.ClassFactory(
|
|
10
10
|
FormFieldWidget.Token({
|
|
11
|
-
viewType:
|
|
11
|
+
viewType: ViewType.Gallery,
|
|
12
12
|
ttype: [ModelFieldType.String, ModelFieldType.Phone, ModelFieldType.Email],
|
|
13
13
|
widget: 'TagString'
|
|
14
14
|
})
|
|
@@ -7,7 +7,7 @@ import { GalleryNumberWidget } from '../../number';
|
|
|
7
7
|
|
|
8
8
|
@SPI.ClassFactory(
|
|
9
9
|
FormFieldWidget.Token({
|
|
10
|
-
viewType:
|
|
10
|
+
viewType: ViewType.Gallery,
|
|
11
11
|
ttype: [ModelFieldType.Integer, ModelFieldType.ID, ModelFieldType.Float],
|
|
12
12
|
widget: 'TextContent'
|
|
13
13
|
})
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { ModelFieldType, ViewType } from '@oinone/kunlun-meta';
|
|
2
|
+
import { BooleanHelper } from '@oinone/kunlun-shared';
|
|
2
3
|
import { SPI } from '@oinone/kunlun-spi';
|
|
3
4
|
import { RowContext } from '@oinone/kunlun-vue-ui';
|
|
4
|
-
import { BooleanHelper } from '@oinone/kunlun-shared';
|
|
5
5
|
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
6
6
|
import { VNode } from 'vue';
|
|
7
7
|
import { BaseFieldWidget, BaseTableFieldWidget } from '../../../basic';
|
|
8
8
|
import { enumFetchLabelByValue } from '../../util';
|
|
9
9
|
|
|
10
|
-
@SPI.ClassFactory(
|
|
10
|
+
@SPI.ClassFactory(
|
|
11
|
+
BaseFieldWidget.Token({
|
|
12
|
+
viewType: ViewType.Table,
|
|
13
|
+
ttype: ModelFieldType.Boolean
|
|
14
|
+
})
|
|
15
|
+
)
|
|
11
16
|
export class TableBooleanFieldWidget extends BaseTableFieldWidget<boolean | string> {
|
|
12
17
|
@Widget.Method()
|
|
13
18
|
public renderDefaultSlot(context: RowContext): VNode[] | string {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ModelFieldType, ViewType } from '@oinone/kunlun-meta';
|
|
2
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
3
|
+
import { BaseFieldWidget } from '../../../basic';
|
|
4
|
+
import { TableBooleanSelectFieldWidget } from './TableBooleanSelectFieldWidget';
|
|
5
|
+
|
|
6
|
+
@SPI.ClassFactory(
|
|
7
|
+
BaseFieldWidget.Token({
|
|
8
|
+
viewType: ViewType.Table,
|
|
9
|
+
ttype: ModelFieldType.Boolean,
|
|
10
|
+
widget: 'Radio'
|
|
11
|
+
})
|
|
12
|
+
)
|
|
13
|
+
export class TableBooleanRadioFieldWidget extends TableBooleanSelectFieldWidget {}
|
|
@@ -14,7 +14,7 @@ import TableEnum from '../enum/TableEnum.vue';
|
|
|
14
14
|
BaseFieldWidget.Token({
|
|
15
15
|
viewType: ViewType.Table,
|
|
16
16
|
ttype: ModelFieldType.Boolean,
|
|
17
|
-
widget:
|
|
17
|
+
widget: 'Select'
|
|
18
18
|
})
|
|
19
19
|
)
|
|
20
20
|
export class TableBooleanSelectFieldWidget extends BaseTableFieldWidget<string | string[], RuntimeEnumerationField> {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ModelFieldType, ViewType } from '@oinone/kunlun-meta';
|
|
2
|
+
import { BooleanHelper } from '@oinone/kunlun-shared';
|
|
2
3
|
import { SPI } from '@oinone/kunlun-spi';
|
|
3
|
-
import { BaseFieldWidget } from '../../../../basic';
|
|
4
|
-
import { TableStringTagFieldWidget } from '../tag/TableStringTagFieldWidget';
|
|
5
4
|
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
6
5
|
import { createVNode, VNode } from 'vue';
|
|
7
|
-
import {
|
|
6
|
+
import { BaseFieldWidget } from '../../../../basic';
|
|
7
|
+
import { TableStringTagFieldWidget } from '../tag';
|
|
8
8
|
import DefaultTableUpload from './DefaultTableUpload.vue';
|
|
9
9
|
|
|
10
10
|
@SPI.ClassFactory(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DslDefinition
|
|
1
|
+
import { DslDefinition } from '@oinone/kunlun-dsl';
|
|
2
2
|
import {
|
|
3
3
|
$systemMajorConfig,
|
|
4
4
|
CurrentLanguage,
|
|
@@ -22,21 +22,20 @@ import {
|
|
|
22
22
|
import { ViewActionTarget } from '@oinone/kunlun-meta';
|
|
23
23
|
import { isNotPermission, setSessionPath, useSessionPath } from '@oinone/kunlun-request';
|
|
24
24
|
import { useMatched } from '@oinone/kunlun-router';
|
|
25
|
-
import { CallChaining
|
|
25
|
+
import { CallChaining } from '@oinone/kunlun-shared';
|
|
26
26
|
import { distinctUntilChanged, Subscription } from '@oinone/kunlun-state';
|
|
27
27
|
import { DEFAULT_PREFIX } from '@oinone/kunlun-theme';
|
|
28
28
|
|
|
29
29
|
import {
|
|
30
30
|
emptyHomepageModelName,
|
|
31
|
-
getDefaultMaskTemplate,
|
|
32
31
|
getUnauthorizedAction,
|
|
33
|
-
maskTemplateEdit,
|
|
34
32
|
MenuService,
|
|
35
33
|
ModuleService,
|
|
36
34
|
replaceStanderMainView,
|
|
37
35
|
RuntimeMenu,
|
|
38
36
|
TopBarService,
|
|
39
|
-
unauthorizedActionName,
|
|
37
|
+
unauthorizedActionName,
|
|
38
|
+
urlHomepageModelName
|
|
40
39
|
} from '@oinone/kunlun-vue-admin-layout';
|
|
41
40
|
import { OioNotification } from '@oinone/kunlun-vue-ui-antd';
|
|
42
41
|
import { ZH_CN_CODE } from '@oinone/kunlun-vue-ui-common';
|
|
@@ -44,7 +43,7 @@ import { Widget } from '@oinone/kunlun-vue-widget';
|
|
|
44
43
|
import { nextTick, VNode } from 'vue';
|
|
45
44
|
import { MetadataViewWidget } from '../basic';
|
|
46
45
|
import { TeleportWidget } from '../components/teleport';
|
|
47
|
-
import {
|
|
46
|
+
import { seekViewMask } from '../tags';
|
|
48
47
|
import { TranslateBox } from '../view/translate';
|
|
49
48
|
import DefaultMetadataMainView from './DefaultMetadataMainView.vue';
|
|
50
49
|
import { MetadataMainViewLifecycle } from './lifecycle';
|
|
@@ -355,24 +354,8 @@ export class DefaultMetadataMainViewWidget extends MetadataViewWidget {
|
|
|
355
354
|
newPage: ViewActionQueryParameter
|
|
356
355
|
): Promise<void> {
|
|
357
356
|
const { module: moduleName, model, action } = newPage;
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
moduleName: viewAction.moduleDefinition?.name || viewAction.resModuleDefinition?.name || moduleName,
|
|
361
|
-
model,
|
|
362
|
-
actionName: action
|
|
363
|
-
})!;
|
|
364
|
-
if (!maskTemplate) {
|
|
365
|
-
maskTemplate = viewAction.resMaskDefinition?.template as string;
|
|
366
|
-
if (maskTemplate) {
|
|
367
|
-
debugConsole.log('使用后端mask', maskTemplate);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
let finalMaskTemplate: DslDefinition;
|
|
371
|
-
if (maskTemplate) {
|
|
372
|
-
finalMaskTemplate = maskTemplateEdit({ isDefault: false }, XMLParse.INSTANCE.parse(maskTemplate));
|
|
373
|
-
} else {
|
|
374
|
-
finalMaskTemplate = getDefaultMaskTemplate();
|
|
375
|
-
}
|
|
357
|
+
|
|
358
|
+
let finalMaskTemplate: DslDefinition = seekViewMask(viewAction, moduleName);
|
|
376
359
|
|
|
377
360
|
/**
|
|
378
361
|
* 当前用户没有该视图没有权限
|
package/src/spi/LayoutManager.ts
CHANGED
|
@@ -11,31 +11,31 @@ export interface LayoutRegisterOptions extends SPIOptions {
|
|
|
11
11
|
/**
|
|
12
12
|
* 视图类型
|
|
13
13
|
*/
|
|
14
|
-
viewType: ViewType;
|
|
14
|
+
viewType: ViewType | ViewType[];
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* 视图模型所在模块编码,一般是下划线风格的英文 designer_common
|
|
17
17
|
*/
|
|
18
|
-
module?: string;
|
|
18
|
+
module?: string | string[];
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* 视图模型所在模块名称,一般是驼峰风格的英文 designerCommon
|
|
21
21
|
*/
|
|
22
|
-
moduleName?: string;
|
|
22
|
+
moduleName?: string | string[];
|
|
23
23
|
/**
|
|
24
|
-
* 布局名称,对应viewActionQuery.load.resView.baseLayoutName
|
|
24
|
+
* 布局名称,对应 viewActionQuery.load.resView.baseLayoutName
|
|
25
25
|
*/
|
|
26
|
-
layoutName?: string;
|
|
26
|
+
layoutName?: string | string[];
|
|
27
27
|
/**
|
|
28
28
|
* 视图的模型编码
|
|
29
29
|
*/
|
|
30
|
-
model?: string;
|
|
30
|
+
model?: string | string[];
|
|
31
31
|
/**
|
|
32
32
|
* 视图的模型名称
|
|
33
33
|
*/
|
|
34
|
-
modelName?: string;
|
|
34
|
+
modelName?: string | string[];
|
|
35
35
|
/**
|
|
36
36
|
* 视图的名称
|
|
37
37
|
*/
|
|
38
|
-
viewName?: string;
|
|
38
|
+
viewName?: string | string[];
|
|
39
39
|
/**
|
|
40
40
|
* 是否为内嵌视图(子视图特有),表单页内有个o2m的子表格,该表格的inline为true
|
|
41
41
|
*/
|
|
@@ -48,15 +48,15 @@ export interface LayoutRegisterOptions extends SPIOptions {
|
|
|
48
48
|
/**
|
|
49
49
|
* 模型字段类型(子视图特有)
|
|
50
50
|
*/
|
|
51
|
-
ttype?: ModelFieldType;
|
|
51
|
+
ttype?: ModelFieldType | ModelFieldType[];
|
|
52
52
|
/**
|
|
53
53
|
* 关联模型字段类型(子视图特有)
|
|
54
54
|
*/
|
|
55
|
-
relatedTtype?: ModelFieldType;
|
|
55
|
+
relatedTtype?: ModelFieldType | ModelFieldType[];
|
|
56
56
|
/**
|
|
57
57
|
* 字段(子视图特有)
|
|
58
58
|
*/
|
|
59
|
-
field?: string;
|
|
59
|
+
field?: string | string[];
|
|
60
60
|
|
|
61
61
|
// endregion
|
|
62
62
|
|
|
@@ -65,11 +65,11 @@ export interface LayoutRegisterOptions extends SPIOptions {
|
|
|
65
65
|
/**
|
|
66
66
|
* 动作名称
|
|
67
67
|
*/
|
|
68
|
-
actionName?: string;
|
|
68
|
+
actionName?: string | string[];
|
|
69
69
|
/**
|
|
70
70
|
* 动作使用的组件名称
|
|
71
71
|
*/
|
|
72
|
-
actionWidget?: string;
|
|
72
|
+
actionWidget?: string | string[];
|
|
73
73
|
|
|
74
74
|
// endregion
|
|
75
75
|
}
|
|
@@ -115,9 +115,12 @@ export class LayoutManager {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
/**
|
|
119
|
+
* @deprecated please use {@link LayoutRegisterOptions}
|
|
120
|
+
*/
|
|
118
121
|
export type ILayoutOption = LayoutRegisterOptions;
|
|
119
122
|
|
|
120
|
-
export function registerLayout(layoutTpl: string, layoutOption:
|
|
123
|
+
export function registerLayout(layoutTpl: string, layoutOption: LayoutRegisterOptions): boolean {
|
|
121
124
|
if (!layoutOption.viewType) {
|
|
122
125
|
console.warn('viewType is blank');
|
|
123
126
|
return false;
|
|
@@ -129,6 +132,6 @@ export function registerLayout(layoutTpl: string, layoutOption: ILayoutOption):
|
|
|
129
132
|
return LayoutManager.register(layoutOption, layoutTpl);
|
|
130
133
|
}
|
|
131
134
|
|
|
132
|
-
export function generatorLayout(layoutOption:
|
|
135
|
+
export function generatorLayout(layoutOption: LayoutRegisterOptions): DslDefinition | undefined {
|
|
133
136
|
return LayoutManager.selector(layoutOption);
|
|
134
137
|
}
|
package/src/spi/MaskManager.ts
CHANGED
|
@@ -1,13 +1,40 @@
|
|
|
1
|
+
import { ViewType } from '@oinone/kunlun-meta';
|
|
1
2
|
import { SPIFactory, SPIOperator, SPIOptions, SPISingleSelector, SPITokenFactory } from '@oinone/kunlun-spi';
|
|
2
3
|
|
|
3
4
|
export interface MaskRegisterOptions extends SPIOptions {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 视图类型
|
|
7
|
+
*/
|
|
8
|
+
viewType?: ViewType | ViewType[];
|
|
9
|
+
/**
|
|
10
|
+
* 模块编码
|
|
11
|
+
*/
|
|
12
|
+
module?: string | string[];
|
|
13
|
+
/**
|
|
14
|
+
* 模块名称
|
|
15
|
+
*/
|
|
16
|
+
moduleName?: string | string[];
|
|
17
|
+
/**
|
|
18
|
+
* 模型编码
|
|
19
|
+
*/
|
|
20
|
+
model?: string | string[];
|
|
21
|
+
/**
|
|
22
|
+
* 模型名称
|
|
23
|
+
*/
|
|
24
|
+
modelName?: string | string[];
|
|
25
|
+
/**
|
|
26
|
+
* 视图名称
|
|
27
|
+
*/
|
|
28
|
+
viewName?: string | string[];
|
|
29
|
+
/**
|
|
30
|
+
* 动作名称
|
|
31
|
+
*/
|
|
7
32
|
actionName?: string | string[];
|
|
8
33
|
}
|
|
9
34
|
|
|
10
|
-
@SPIFactory.Storage(['module', 'moduleName', 'model', '
|
|
35
|
+
@SPIFactory.Storage(['viewType', 'module', 'moduleName', 'model', 'modelName', 'viewName', 'actionName'], {
|
|
36
|
+
key: Symbol('MaskTpl')
|
|
37
|
+
})
|
|
11
38
|
export class MaskManager {
|
|
12
39
|
private static Token: SPITokenFactory<MaskRegisterOptions>;
|
|
13
40
|
|
|
@@ -26,9 +53,12 @@ export class MaskManager {
|
|
|
26
53
|
}
|
|
27
54
|
}
|
|
28
55
|
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated please use {@link MaskRegisterOptions}
|
|
58
|
+
*/
|
|
29
59
|
export type IMaskOption = MaskRegisterOptions;
|
|
30
60
|
|
|
31
|
-
export function registerMask(maskTpl: string, maskOption?:
|
|
61
|
+
export function registerMask(maskTpl: string, maskOption?: MaskRegisterOptions) {
|
|
32
62
|
if (!maskTpl) {
|
|
33
63
|
console.warn('maskTpl is blank');
|
|
34
64
|
return false;
|
|
@@ -36,6 +66,6 @@ export function registerMask(maskTpl: string, maskOption?: IMaskOption) {
|
|
|
36
66
|
return MaskManager.register(maskOption || {}, maskTpl);
|
|
37
67
|
}
|
|
38
68
|
|
|
39
|
-
export function generatorMask(maskOption?:
|
|
69
|
+
export function generatorMask(maskOption?: MaskRegisterOptions): string | undefined {
|
|
40
70
|
return MaskManager.selector(maskOption || {});
|
|
41
71
|
}
|
|
@@ -19,17 +19,19 @@ import { SPI } from '@oinone/kunlun-spi';
|
|
|
19
19
|
import { getDefaultMaskTemplate, maskTemplateEdit } from '@oinone/kunlun-vue-admin-layout';
|
|
20
20
|
import { isNil, isPlainObject, isString } from 'lodash-es';
|
|
21
21
|
import { LayoutManager, LayoutRegisterOptions, MaskManager } from '../../spi';
|
|
22
|
-
import { useInjectMetaContext } from './context';
|
|
23
22
|
import { ActiveLayoutEffectOpt } from './active';
|
|
23
|
+
import { useInjectMetaContext } from './context';
|
|
24
24
|
|
|
25
|
-
function seekViewMask(viewAction: RuntimeViewAction, moduleName?: string): DslDefinition {
|
|
26
|
-
let maskTemplate: string =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
export function seekViewMask(viewAction: RuntimeViewAction, moduleName?: string): DslDefinition {
|
|
26
|
+
let maskTemplate: string | undefined = MaskManager.selector({
|
|
27
|
+
viewType: viewAction.resViewType || viewAction.viewType,
|
|
28
|
+
module: viewAction.moduleDefinition?.module || viewAction.resModuleDefinition?.module,
|
|
29
|
+
moduleName: viewAction.moduleDefinition?.name || viewAction.resModuleDefinition?.name || moduleName,
|
|
30
|
+
model: viewAction.modelDefinition?.model || viewAction.model,
|
|
31
|
+
modelName: viewAction.modelDefinition?.name || viewAction.modelName,
|
|
32
|
+
viewName: viewAction.resViewName || viewAction.viewName,
|
|
33
|
+
actionName: viewAction.name
|
|
34
|
+
});
|
|
33
35
|
if (!maskTemplate) {
|
|
34
36
|
maskTemplate = viewAction.resMaskDefinition?.template as string;
|
|
35
37
|
if (maskTemplate) {
|
package/src/util/utils.ts
CHANGED
|
@@ -33,9 +33,10 @@ const executeConfirm = (confirm: string | ConfirmOptions): Promise<boolean> => {
|
|
|
33
33
|
// 这个要helper里面拿各种工具类
|
|
34
34
|
Modal.confirm({
|
|
35
35
|
class: `oio-modal`,
|
|
36
|
-
title: translateValueByKey(translate('kunlun.common.prompt')),
|
|
36
|
+
title: translateValueByKey(options.title || translate('kunlun.common.prompt')),
|
|
37
37
|
icon: createVNode(ExclamationCircleOutlined),
|
|
38
38
|
zIndex: options.zIndex,
|
|
39
|
+
width: options.width,
|
|
39
40
|
content: options.confirm,
|
|
40
41
|
okText: options.enterText || translateValueByKey(translate('kunlun.common.confirm')),
|
|
41
42
|
cancelText: options.cancelText || translateValueByKey(translate('kunlun.common.cancel')),
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { isNil } from 'lodash';
|
|
2
|
-
import { Expression, ExpressionRunParam } from '@oinone/kunlun-expression';
|
|
3
1
|
import {
|
|
4
2
|
ActiveRecord,
|
|
5
3
|
Dialog,
|
|
@@ -18,6 +16,7 @@ import {
|
|
|
18
16
|
translateValueByKey,
|
|
19
17
|
ViewCache
|
|
20
18
|
} from '@oinone/kunlun-engine';
|
|
19
|
+
import { Expression, ExpressionRunParam } from '@oinone/kunlun-expression';
|
|
21
20
|
import { IModelField, ViewType } from '@oinone/kunlun-meta';
|
|
22
21
|
import { Condition } from '@oinone/kunlun-request';
|
|
23
22
|
import {
|
|
@@ -36,6 +35,7 @@ import { SPI } from '@oinone/kunlun-spi';
|
|
|
36
35
|
import { appFinderSymbol } from '@oinone/kunlun-vue-admin-layout';
|
|
37
36
|
import { OioNotification } from '@oinone/kunlun-vue-ui-antd';
|
|
38
37
|
import { Widget, WidgetSubjection } from '@oinone/kunlun-vue-widget';
|
|
38
|
+
import { isNil } from 'lodash-es';
|
|
39
39
|
import { BaseElementListViewWidget, BaseElementWidget } from '../../../basic';
|
|
40
40
|
import { createRuntimeContextForWidget } from '../../../tags';
|
|
41
41
|
import { onJumpCodeFuse, onJumpModelDesigner, onJumpUiDesignerHomePage } from '../../../util';
|
|
@@ -7,9 +7,9 @@ import { RowContext } from '@oinone/kunlun-vue-ui';
|
|
|
7
7
|
import { DEFAULT_COLS, ListSelectMode } from '@oinone/kunlun-vue-ui-common';
|
|
8
8
|
import { DslDefinitionWidget, Widget } from '@oinone/kunlun-vue-widget';
|
|
9
9
|
import { isNil } from 'lodash-es';
|
|
10
|
-
import { ActionWidget } from '../../action
|
|
10
|
+
import type { ActionWidget } from '../../action';
|
|
11
11
|
import { BaseActionWidget, BaseElementWidget, BasePackWidget } from '../../basic';
|
|
12
|
-
import { ActiveCountEnum } from '../../typing';
|
|
12
|
+
import { ActiveCountEnum, CARD_WIDGET } from '../../typing';
|
|
13
13
|
import DefaultCard from './DefaultCard.vue';
|
|
14
14
|
|
|
15
15
|
const CLICK_SLOT_NAME = 'click';
|
|
@@ -17,13 +17,13 @@ const CLICK_SLOT_NAME = 'click';
|
|
|
17
17
|
@SPI.ClassFactory(
|
|
18
18
|
BasePackWidget.Token({
|
|
19
19
|
viewType: ViewType.Gallery,
|
|
20
|
-
widget: 'card'
|
|
20
|
+
widget: ['card', CARD_WIDGET]
|
|
21
21
|
})
|
|
22
22
|
)
|
|
23
23
|
@SPI.ClassFactory(
|
|
24
24
|
BaseElementWidget.Token({
|
|
25
25
|
viewType: ViewType.Gallery,
|
|
26
|
-
widget: 'card'
|
|
26
|
+
widget: ['card', CARD_WIDGET]
|
|
27
27
|
})
|
|
28
28
|
)
|
|
29
29
|
export class CardWidget extends BaseElementWidget {
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import { DslDefinitionType } from '@oinone/kunlun-dsl';
|
|
2
|
+
import { getCurrentThemeSize } from '@oinone/kunlun-engine';
|
|
2
3
|
import { ViewType } from '@oinone/kunlun-meta';
|
|
3
4
|
import { NumberHelper } from '@oinone/kunlun-shared';
|
|
4
5
|
import { SPI } from '@oinone/kunlun-spi';
|
|
5
|
-
import {
|
|
6
|
-
|
|
6
|
+
import {
|
|
7
|
+
DEFAULT_CARD_GUTTERS,
|
|
8
|
+
DEFAULT_GUTTERS,
|
|
9
|
+
DEFAULT_VERTICAL_GUTTERS,
|
|
10
|
+
LayoutHelper
|
|
11
|
+
} from '@oinone/kunlun-vue-ui-common';
|
|
7
12
|
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
8
13
|
import { isEmpty, isNil, isString } from 'lodash-es';
|
|
9
14
|
import { BaseElementListViewWidget, BaseElementWidget } from '../../basic';
|
|
15
|
+
import { GALLERY_WIDGET } from '../../typing';
|
|
10
16
|
import DefaultGallery from './DefaultGallery.vue';
|
|
11
17
|
|
|
12
18
|
@SPI.ClassFactory(
|
|
13
19
|
BaseElementWidget.Token({
|
|
14
20
|
viewType: ViewType.Gallery,
|
|
15
|
-
widget: 'gallery'
|
|
21
|
+
widget: ['gallery', GALLERY_WIDGET]
|
|
16
22
|
})
|
|
17
23
|
)
|
|
18
24
|
export class GalleryWidget extends BaseElementListViewWidget {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@import '../../../../style/global-parameters.scss';
|
|
2
2
|
|
|
3
|
-
.default-drawer
|
|
3
|
+
.default-drawer,
|
|
4
|
+
.default-drawer.oio.drawer {
|
|
4
5
|
.ant-drawer-content .ant-drawer-wrapper-body {
|
|
5
6
|
.ant-drawer-footer {
|
|
6
7
|
padding: 0;
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
height: 100%;
|
|
31
32
|
}
|
|
32
33
|
}
|
|
34
|
+
|
|
33
35
|
&-table .ant-drawer-content .ant-drawer-wrapper-body .ant-drawer-body > .ant-spin-nested-loading > .ant-spin-container {
|
|
34
36
|
position: absolute;
|
|
35
37
|
height: 100%;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FormBooleanSelectFieldWidget';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FormBooleanSelectFieldWidget';
|
|
File without changes
|