@oinone/kunlun-meta 6.2.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/dist/oinone-kunlun-meta.esm.js +496 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/src/element/ActionElement.d.ts +15 -0
- package/dist/types/src/element/ApiElement.d.ts +21 -0
- package/dist/types/src/element/ClearElement.d.ts +9 -0
- package/dist/types/src/element/ConfigElement.d.ts +6 -0
- package/dist/types/src/element/ContextElement.d.ts +9 -0
- package/dist/types/src/element/CustomElement.d.ts +7 -0
- package/dist/types/src/element/FieldElement.d.ts +25 -0
- package/dist/types/src/element/IBaseElement.d.ts +5 -0
- package/dist/types/src/element/PropElement.d.ts +6 -0
- package/dist/types/src/element/RequestElement.d.ts +9 -0
- package/dist/types/src/element/ResponseElement.d.ts +9 -0
- package/dist/types/src/element/SubscribeElement.d.ts +9 -0
- package/dist/types/src/element/ValidationElement.d.ts +12 -0
- package/dist/types/src/element/ViewElement.d.ts +15 -0
- package/dist/types/src/element/WidgetElement.d.ts +23 -0
- package/dist/types/src/element/index.d.ts +14 -0
- package/dist/types/src/global-config/index.d.ts +2 -0
- package/dist/types/src/global-config/runtime-config.d.ts +14 -0
- package/dist/types/src/global-config/type.d.ts +26 -0
- package/dist/types/src/index.d.ts +5 -0
- package/dist/types/src/metadata/constant/config.d.ts +1 -0
- package/dist/types/src/metadata/constant/index.d.ts +2 -0
- package/dist/types/src/metadata/constant/module-name.d.ts +20 -0
- package/dist/types/src/metadata/fragment/action.d.ts +6 -0
- package/dist/types/src/metadata/fragment/field.d.ts +2 -0
- package/dist/types/src/metadata/fragment/func.d.ts +2 -0
- package/dist/types/src/metadata/fragment/index.d.ts +13 -0
- package/dist/types/src/metadata/fragment/menu.d.ts +2 -0
- package/dist/types/src/metadata/fragment/model.d.ts +2 -0
- package/dist/types/src/metadata/fragment/page.d.ts +2 -0
- package/dist/types/src/metadata/index.d.ts +4 -0
- package/dist/types/src/metadata/runtime-fragment/action.d.ts +8 -0
- package/dist/types/src/metadata/runtime-fragment/function.d.ts +3 -0
- package/dist/types/src/metadata/runtime-fragment/index.d.ts +20 -0
- package/dist/types/src/metadata/runtime-fragment/model.d.ts +2 -0
- package/dist/types/src/metadata/runtime-fragment/module.d.ts +2 -0
- package/dist/types/src/metadata/runtime-fragment/view.d.ts +6 -0
- package/dist/types/src/metadata/types/dsl-node.d.ts +12 -0
- package/dist/types/src/metadata/types/enumeration.d.ts +18 -0
- package/dist/types/src/metadata/types/index.d.ts +8 -0
- package/dist/types/src/metadata/types/layout.d.ts +4 -0
- package/dist/types/src/metadata/types/model.d.ts +573 -0
- package/dist/types/src/metadata/types/tag.d.ts +23 -0
- package/dist/types/src/metadata/types/user.d.ts +22 -0
- package/dist/types/src/metadata/types/value.d.ts +3 -0
- package/dist/types/src/metadata/types/view.d.ts +170 -0
- package/dist/types/src/plugin-loader/factory/PluginLoaderFactory.d.ts +4 -0
- package/dist/types/src/plugin-loader/factory/index.d.ts +1 -0
- package/dist/types/src/plugin-loader/index.d.ts +5 -0
- package/dist/types/src/plugin-loader/loader/CJSPluginLoader.d.ts +7 -0
- package/dist/types/src/plugin-loader/loader/CSSPluginLoader.d.ts +7 -0
- package/dist/types/src/plugin-loader/loader/ESMPluginLoader.d.ts +7 -0
- package/dist/types/src/plugin-loader/loader/IIFEPluginLoader.d.ts +7 -0
- package/dist/types/src/plugin-loader/loader/LoadedEvent.d.ts +4 -0
- package/dist/types/src/plugin-loader/loader/PluginLoader.d.ts +5 -0
- package/dist/types/src/plugin-loader/loader/RemotePluginLoader.d.ts +5 -0
- package/dist/types/src/plugin-loader/loader/UMDPluginLoader.d.ts +6 -0
- package/dist/types/src/plugin-loader/loader/index.d.ts +1 -0
- package/dist/types/src/plugin-loader/typing/index.d.ts +2 -0
- package/dist/types/src/plugin-loader/typing/load-option.d.ts +48 -0
- package/dist/types/src/plugin-loader/typing/loader-config.d.ts +38 -0
- package/dist/types/src/plugin-loader/util/PluginLoadHelper.d.ts +7 -0
- package/dist/types/src/plugin-loader/util/index.d.ts +1 -0
- package/dist/types/src/util/element.d.ts +16 -0
- package/dist/types/src/util/field.d.ts +7 -0
- package/dist/types/src/util/helper.d.ts +2 -0
- package/dist/types/src/util/index.d.ts +6 -0
- package/dist/types/src/util/ke-common.d.ts +6 -0
- package/dist/types/src/util/lang.d.ts +4 -0
- package/dist/types/src/util/validation-utils.d.ts +3 -0
- package/index.ts +1 -0
- package/package.json +17 -0
- package/rollup.config.js +4 -0
- package/src/element/ActionElement.ts +20 -0
- package/src/element/ApiElement.ts +22 -0
- package/src/element/ClearElement.ts +10 -0
- package/src/element/ConfigElement.ts +7 -0
- package/src/element/ContextElement.ts +10 -0
- package/src/element/CustomElement.ts +22 -0
- package/src/element/FieldElement.ts +41 -0
- package/src/element/IBaseElement.ts +5 -0
- package/src/element/PropElement.ts +7 -0
- package/src/element/RequestElement.ts +10 -0
- package/src/element/ResponseElement.ts +10 -0
- package/src/element/SubscribeElement.ts +10 -0
- package/src/element/ValidationElement.ts +17 -0
- package/src/element/ViewElement.ts +23 -0
- package/src/element/WidgetElement.ts +33 -0
- package/src/element/index.ts +14 -0
- package/src/global-config/index.ts +2 -0
- package/src/global-config/runtime-config.ts +83 -0
- package/src/global-config/type.ts +48 -0
- package/src/index.ts +5 -0
- package/src/metadata/constant/config.ts +1 -0
- package/src/metadata/constant/index.ts +2 -0
- package/src/metadata/constant/module-name.ts +21 -0
- package/src/metadata/fragment/action.ts +119 -0
- package/src/metadata/fragment/field.ts +42 -0
- package/src/metadata/fragment/func.ts +21 -0
- package/src/metadata/fragment/index.ts +20 -0
- package/src/metadata/fragment/menu.ts +35 -0
- package/src/metadata/fragment/model.ts +76 -0
- package/src/metadata/fragment/page.ts +17 -0
- package/src/metadata/index.ts +4 -0
- package/src/metadata/runtime-fragment/action.ts +159 -0
- package/src/metadata/runtime-fragment/function.ts +25 -0
- package/src/metadata/runtime-fragment/index.ts +36 -0
- package/src/metadata/runtime-fragment/model.ts +18 -0
- package/src/metadata/runtime-fragment/module.ts +11 -0
- package/src/metadata/runtime-fragment/view.ts +44 -0
- package/src/metadata/types/dsl-node.ts +14 -0
- package/src/metadata/types/enumeration.ts +19 -0
- package/src/metadata/types/index.ts +8 -0
- package/src/metadata/types/layout.ts +4 -0
- package/src/metadata/types/model.ts +823 -0
- package/src/metadata/types/tag.ts +24 -0
- package/src/metadata/types/user.ts +27 -0
- package/src/metadata/types/value.ts +3 -0
- package/src/metadata/types/view.ts +194 -0
- package/src/plugin-loader/factory/PluginLoaderFactory.ts +23 -0
- package/src/plugin-loader/factory/index.ts +1 -0
- package/src/plugin-loader/index.ts +33 -0
- package/src/plugin-loader/loader/CJSPluginLoader.ts +18 -0
- package/src/plugin-loader/loader/CSSPluginLoader.ts +29 -0
- package/src/plugin-loader/loader/ESMPluginLoader.ts +53 -0
- package/src/plugin-loader/loader/IIFEPluginLoader.ts +18 -0
- package/src/plugin-loader/loader/LoadedEvent.ts +24 -0
- package/src/plugin-loader/loader/PluginLoader.ts +12 -0
- package/src/plugin-loader/loader/RemotePluginLoader.ts +54 -0
- package/src/plugin-loader/loader/UMDPluginLoader.ts +50 -0
- package/src/plugin-loader/loader/index.ts +1 -0
- package/src/plugin-loader/typing/index.ts +2 -0
- package/src/plugin-loader/typing/load-option.ts +51 -0
- package/src/plugin-loader/typing/loader-config.ts +38 -0
- package/src/plugin-loader/util/PluginLoadHelper.ts +70 -0
- package/src/plugin-loader/util/index.ts +1 -0
- package/src/util/element.ts +154 -0
- package/src/util/field.ts +63 -0
- package/src/util/helper.ts +6 -0
- package/src/util/index.ts +6 -0
- package/src/util/ke-common.ts +25 -0
- package/src/util/lang.ts +8 -0
- package/src/util/validation-utils.ts +17 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import gql from 'graphql-tag';
|
|
2
|
+
import { Function, FunctionFragmentName } from './function';
|
|
3
|
+
import { Model, ModelFragmentName } from './model';
|
|
4
|
+
import { Module, ModuleFragmentName } from './module';
|
|
5
|
+
import { Mask, MaskFragmentName, View, ViewFragmentName } from './view';
|
|
6
|
+
|
|
7
|
+
export const ViewActionFragmentName = '...ViewActionV3';
|
|
8
|
+
export const SharedViewActionFragmentName = '...SharedPageViewActionV3';
|
|
9
|
+
export const ServerActionFragmentName = '...ServerActionV3';
|
|
10
|
+
export const UrlActionFragmentName = '...UrlActionV3';
|
|
11
|
+
|
|
12
|
+
export const ViewAction = gql`
|
|
13
|
+
fragment ViewActionV3 on ViewAction {
|
|
14
|
+
id
|
|
15
|
+
name
|
|
16
|
+
title
|
|
17
|
+
displayName
|
|
18
|
+
contextType
|
|
19
|
+
viewType
|
|
20
|
+
target
|
|
21
|
+
theme
|
|
22
|
+
domain
|
|
23
|
+
filter
|
|
24
|
+
load
|
|
25
|
+
mapping
|
|
26
|
+
context
|
|
27
|
+
sessionPath
|
|
28
|
+
model
|
|
29
|
+
modelName
|
|
30
|
+
modelDefinition {
|
|
31
|
+
${ModelFragmentName}
|
|
32
|
+
}
|
|
33
|
+
module
|
|
34
|
+
moduleName
|
|
35
|
+
moduleDefinition {
|
|
36
|
+
${ModuleFragmentName}
|
|
37
|
+
}
|
|
38
|
+
resModel
|
|
39
|
+
resModelDefinition {
|
|
40
|
+
${ModelFragmentName}
|
|
41
|
+
}
|
|
42
|
+
resModule
|
|
43
|
+
resModuleName
|
|
44
|
+
resModuleDefinition {
|
|
45
|
+
${ModuleFragmentName}
|
|
46
|
+
}
|
|
47
|
+
mask
|
|
48
|
+
maskDefinition {
|
|
49
|
+
${MaskFragmentName}
|
|
50
|
+
}
|
|
51
|
+
resViewName
|
|
52
|
+
resView {
|
|
53
|
+
${ViewFragmentName}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
${Model}
|
|
57
|
+
${Module}
|
|
58
|
+
${Mask}
|
|
59
|
+
${View}
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
export const SharedViewAction = gql`
|
|
63
|
+
fragment SharedPageViewActionV3 on SharedPageViewAction {
|
|
64
|
+
id
|
|
65
|
+
name
|
|
66
|
+
title
|
|
67
|
+
displayName
|
|
68
|
+
contextType
|
|
69
|
+
viewType
|
|
70
|
+
target
|
|
71
|
+
theme
|
|
72
|
+
domain
|
|
73
|
+
filter
|
|
74
|
+
load
|
|
75
|
+
sessionPath
|
|
76
|
+
sharedCode
|
|
77
|
+
authorizationCode
|
|
78
|
+
sharedParameters
|
|
79
|
+
browserTitle
|
|
80
|
+
language
|
|
81
|
+
languageIsoCode
|
|
82
|
+
model
|
|
83
|
+
modelName
|
|
84
|
+
modelDefinition {
|
|
85
|
+
${ModelFragmentName}
|
|
86
|
+
}
|
|
87
|
+
module
|
|
88
|
+
moduleName
|
|
89
|
+
moduleDefinition {
|
|
90
|
+
${ModuleFragmentName}
|
|
91
|
+
}
|
|
92
|
+
resModel
|
|
93
|
+
resModelDefinition {
|
|
94
|
+
${ModelFragmentName}
|
|
95
|
+
}
|
|
96
|
+
resModule
|
|
97
|
+
resModuleName
|
|
98
|
+
resModuleDefinition {
|
|
99
|
+
${ModuleFragmentName}
|
|
100
|
+
}
|
|
101
|
+
mask
|
|
102
|
+
maskDefinition {
|
|
103
|
+
${MaskFragmentName}
|
|
104
|
+
}
|
|
105
|
+
resViewName
|
|
106
|
+
resView {
|
|
107
|
+
${ViewFragmentName}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
${Model}
|
|
111
|
+
${Module}
|
|
112
|
+
${Mask}
|
|
113
|
+
${View}
|
|
114
|
+
`;
|
|
115
|
+
|
|
116
|
+
export const ServerAction = gql`
|
|
117
|
+
fragment ServerActionV3 on ServerAction {
|
|
118
|
+
id
|
|
119
|
+
name
|
|
120
|
+
displayName
|
|
121
|
+
label
|
|
122
|
+
description
|
|
123
|
+
actionType
|
|
124
|
+
contextType
|
|
125
|
+
bindingType
|
|
126
|
+
sessionPath
|
|
127
|
+
model
|
|
128
|
+
modelName
|
|
129
|
+
invisible
|
|
130
|
+
priority
|
|
131
|
+
fun
|
|
132
|
+
functionDefinition {
|
|
133
|
+
${FunctionFragmentName}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
${Function}
|
|
138
|
+
`;
|
|
139
|
+
|
|
140
|
+
export const UrlAction = gql`
|
|
141
|
+
fragment UrlActionV3 on UrlAction {
|
|
142
|
+
id
|
|
143
|
+
name
|
|
144
|
+
displayName
|
|
145
|
+
url
|
|
146
|
+
target
|
|
147
|
+
description
|
|
148
|
+
actionType
|
|
149
|
+
contextType
|
|
150
|
+
bindingType
|
|
151
|
+
sessionPath
|
|
152
|
+
model
|
|
153
|
+
modelName
|
|
154
|
+
invisible
|
|
155
|
+
compute
|
|
156
|
+
context
|
|
157
|
+
priority
|
|
158
|
+
}
|
|
159
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import gql from 'graphql-tag';
|
|
2
|
+
|
|
3
|
+
export const FunctionFragmentName = '...FuncV3';
|
|
4
|
+
|
|
5
|
+
const Function = gql`
|
|
6
|
+
fragment FuncV3 on Function {
|
|
7
|
+
type
|
|
8
|
+
namespace
|
|
9
|
+
fun
|
|
10
|
+
name
|
|
11
|
+
argumentList {
|
|
12
|
+
name
|
|
13
|
+
ttype
|
|
14
|
+
multi
|
|
15
|
+
model
|
|
16
|
+
}
|
|
17
|
+
returnType {
|
|
18
|
+
ttype
|
|
19
|
+
multi
|
|
20
|
+
model
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export { Function };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ServerAction,
|
|
3
|
+
ServerActionFragmentName,
|
|
4
|
+
SharedViewAction,
|
|
5
|
+
SharedViewActionFragmentName,
|
|
6
|
+
UrlAction,
|
|
7
|
+
UrlActionFragmentName,
|
|
8
|
+
ViewAction,
|
|
9
|
+
ViewActionFragmentName
|
|
10
|
+
} from './action';
|
|
11
|
+
import { Function, FunctionFragmentName } from './function';
|
|
12
|
+
import { Model, ModelFragmentName } from './model';
|
|
13
|
+
import { Module, ModuleFragmentName } from './module';
|
|
14
|
+
import { View, ViewFragmentName } from './view';
|
|
15
|
+
|
|
16
|
+
export const MetadataRuntimeFragment = {
|
|
17
|
+
Module,
|
|
18
|
+
Model,
|
|
19
|
+
ViewAction,
|
|
20
|
+
SharedViewAction,
|
|
21
|
+
ServerAction,
|
|
22
|
+
UrlAction,
|
|
23
|
+
View,
|
|
24
|
+
Function
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const MetadataRuntimeFragmentName = {
|
|
28
|
+
Module: ModuleFragmentName,
|
|
29
|
+
Model: ModelFragmentName,
|
|
30
|
+
ViewAction: ViewActionFragmentName,
|
|
31
|
+
SharedViewAction: SharedViewActionFragmentName,
|
|
32
|
+
ServerAction: ServerActionFragmentName,
|
|
33
|
+
UrlAction: UrlActionFragmentName,
|
|
34
|
+
View: ViewFragmentName,
|
|
35
|
+
Function: FunctionFragmentName
|
|
36
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import gql from 'graphql-tag';
|
|
2
|
+
|
|
3
|
+
export const ModelFragmentName = '...ModelV3';
|
|
4
|
+
|
|
5
|
+
export const Model = gql`
|
|
6
|
+
fragment ModelV3 on ModelDefinition {
|
|
7
|
+
id
|
|
8
|
+
model
|
|
9
|
+
name
|
|
10
|
+
type
|
|
11
|
+
module
|
|
12
|
+
moduleName
|
|
13
|
+
pk
|
|
14
|
+
uniques
|
|
15
|
+
indexes
|
|
16
|
+
ordering
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import gql from 'graphql-tag';
|
|
2
|
+
|
|
3
|
+
export const MaskFragmentName = '...MaskV3';
|
|
4
|
+
|
|
5
|
+
export const Mask = gql`
|
|
6
|
+
fragment MaskV3 on MaskDefinition {
|
|
7
|
+
name
|
|
8
|
+
template
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
export const LayoutFragmentName = '...LayoutV3';
|
|
13
|
+
|
|
14
|
+
export const Layout = gql`
|
|
15
|
+
fragment LayoutV3 on LayoutDefinition {
|
|
16
|
+
name
|
|
17
|
+
template
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
export const ViewFragmentName = '...ViewV3';
|
|
22
|
+
|
|
23
|
+
export const View = gql`
|
|
24
|
+
fragment ViewV3 on View {
|
|
25
|
+
id
|
|
26
|
+
model
|
|
27
|
+
modelDefinition {
|
|
28
|
+
model
|
|
29
|
+
name
|
|
30
|
+
module
|
|
31
|
+
moduleName
|
|
32
|
+
}
|
|
33
|
+
name
|
|
34
|
+
title
|
|
35
|
+
type
|
|
36
|
+
template
|
|
37
|
+
extension
|
|
38
|
+
baseLayoutName
|
|
39
|
+
baseLayoutDefinition {
|
|
40
|
+
${LayoutFragmentName}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
${Layout}
|
|
44
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface IDslNode extends Record<string, unknown> {
|
|
2
|
+
name?: string;
|
|
3
|
+
children: IDslNode[];
|
|
4
|
+
tagName: string;
|
|
5
|
+
widget?: string;
|
|
6
|
+
confirm?: string;
|
|
7
|
+
// 最末级标签内的文本内容,如:<span>hello</span>就是获取hello
|
|
8
|
+
textContent?: string;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface IDslTree {
|
|
13
|
+
root: IDslNode;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 关联后端枚举<br>
|
|
3
|
+
* <b>pro.shushi.pamirs.meta.enmu.ActiveEnum</b>
|
|
4
|
+
*/
|
|
5
|
+
export enum ActiveEnum {
|
|
6
|
+
ACTIVE = 'ACTIVE',
|
|
7
|
+
INACTIVE = 'INACTIVE'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 关联后端枚举<br>
|
|
12
|
+
* <b>pro.shushi.pamirs.core.common.enmu.DataStatusEnum</b>
|
|
13
|
+
*/
|
|
14
|
+
export enum DataStatusEnum {
|
|
15
|
+
DRAFT = 'DRAFT',
|
|
16
|
+
NOT_ENABLED = 'NOT_ENABLED',
|
|
17
|
+
ENABLED = 'ENABLED',
|
|
18
|
+
DISABLED = 'DISABLED'
|
|
19
|
+
}
|