@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,23 @@
|
|
|
1
|
+
import { IBaseElement } from './IBaseElement';
|
|
2
|
+
import { LoadType } from '../metadata';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 视图
|
|
6
|
+
*/
|
|
7
|
+
interface ViewElement extends IBaseElement {
|
|
8
|
+
// 组件名
|
|
9
|
+
widget: string;
|
|
10
|
+
// 模型编码
|
|
11
|
+
model: string;
|
|
12
|
+
// list类型组件调用load函数或options-load函数加载数据时作为追加查询条件
|
|
13
|
+
domain: string;
|
|
14
|
+
// list类型组件调用load函数加载数据时作为追加数量限制
|
|
15
|
+
limit: number;
|
|
16
|
+
// 绑定内容数据加载函数。
|
|
17
|
+
load: string;
|
|
18
|
+
// 加载的函数类型
|
|
19
|
+
loadType: LoadType;
|
|
20
|
+
// load函数api定义,可裁剪请求报文
|
|
21
|
+
loadApi: string;
|
|
22
|
+
}
|
|
23
|
+
export { ViewElement };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IBaseElement } from './IBaseElement';
|
|
2
|
+
import { ModelFieldType } from '../metadata';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 组件
|
|
6
|
+
*/
|
|
7
|
+
interface WidgetElement extends IBaseElement {
|
|
8
|
+
widget: string;
|
|
9
|
+
model: string;
|
|
10
|
+
ttype: ModelFieldType;
|
|
11
|
+
relatedTtype: ModelFieldType;
|
|
12
|
+
// 复杂字段的模型编码
|
|
13
|
+
references?: string;
|
|
14
|
+
// list类型组件调用load函数或options-load函数加载数据时作为追加查询条件
|
|
15
|
+
domain: string;
|
|
16
|
+
// list类型组件调用load函数加载数据时作为追加数量限制
|
|
17
|
+
limit: number;
|
|
18
|
+
// 对应数据模型IModelField.name,WidgetElement.name对应IModelField.viewIndex
|
|
19
|
+
data: string;
|
|
20
|
+
displayName: string;
|
|
21
|
+
// 显隐表达式
|
|
22
|
+
invisible: string;
|
|
23
|
+
// 只读表达式
|
|
24
|
+
required: string;
|
|
25
|
+
// 必填表达式
|
|
26
|
+
readonly: string;
|
|
27
|
+
// 计算
|
|
28
|
+
compute: string;
|
|
29
|
+
// 信息提示
|
|
30
|
+
hint: string;
|
|
31
|
+
sortable: boolean;
|
|
32
|
+
}
|
|
33
|
+
export { WidgetElement };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './ActionElement';
|
|
2
|
+
export * from './ApiElement';
|
|
3
|
+
export * from './ClearElement';
|
|
4
|
+
export * from './ConfigElement';
|
|
5
|
+
export * from './ContextElement';
|
|
6
|
+
export * from './FieldElement';
|
|
7
|
+
export * from './IBaseElement';
|
|
8
|
+
export * from './PropElement';
|
|
9
|
+
export * from './RequestElement';
|
|
10
|
+
export * from './ResponseElement';
|
|
11
|
+
export * from './SubscribeElement';
|
|
12
|
+
export * from './ValidationElement';
|
|
13
|
+
export * from './ViewElement';
|
|
14
|
+
export * from './WidgetElement';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { PluginLoadDependencies } from '../plugin-loader';
|
|
2
|
+
|
|
3
|
+
const RUNTIME_CONFIG_RESOLVE = 'runtimeConfigResolve';
|
|
4
|
+
|
|
5
|
+
const runtimeConfigCache: {
|
|
6
|
+
init: boolean;
|
|
7
|
+
updateTime: Date;
|
|
8
|
+
value: Record<string, unknown>;
|
|
9
|
+
} = {
|
|
10
|
+
init: false,
|
|
11
|
+
updateTime: new Date(),
|
|
12
|
+
value: {}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export interface RuntimeConfigOptions {
|
|
16
|
+
[key: string]: string | string[] | boolean | number | number[] | undefined | RuntimeConfigOptions;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* .env文件配置项
|
|
21
|
+
* RUNTIME_CONFIG_BASE_URL 运行时配置文件URL 默认: 当前路径
|
|
22
|
+
* RUNTIME_CONFIG_FILENAME 运行时配置文件名称 默认: manifest
|
|
23
|
+
*/
|
|
24
|
+
export class RuntimeConfig {
|
|
25
|
+
public static async init(dependencies?: PluginLoadDependencies): Promise<void> {
|
|
26
|
+
if (!runtimeConfigCache.init) {
|
|
27
|
+
return init();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public static get(): Record<string, unknown> {
|
|
32
|
+
if (!runtimeConfigCache.init) {
|
|
33
|
+
if (process.env.NODE_ENV === 'development') {
|
|
34
|
+
console.warn('runtime config is not init.');
|
|
35
|
+
}
|
|
36
|
+
return {};
|
|
37
|
+
}
|
|
38
|
+
return runtimeConfigCache.value || {};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public static getConfig<T extends RuntimeConfigOptions = RuntimeConfigOptions>(key: string): T | undefined {
|
|
42
|
+
return RuntimeConfig.get()[key] as T;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function errorProcess(resolve) {
|
|
47
|
+
return () => {
|
|
48
|
+
resolve({});
|
|
49
|
+
Reflect.deleteProperty(window, RUNTIME_CONFIG_RESOLVE);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function loadRuntimeConfig() {
|
|
54
|
+
return new Promise<Record<string, unknown>>((resolve) => {
|
|
55
|
+
Reflect.set(window, RUNTIME_CONFIG_RESOLVE, (value: Record<string, string>) => {
|
|
56
|
+
resolve(value);
|
|
57
|
+
Reflect.deleteProperty(window, RUNTIME_CONFIG_RESOLVE);
|
|
58
|
+
});
|
|
59
|
+
const script = document.createElement('script');
|
|
60
|
+
script.src = `${process.env.RUNTIME_CONFIG_BASE_URL || ''}/${process.env.RUNTIME_CONFIG_FILENAME || 'manifest'}.js`;
|
|
61
|
+
const ep = errorProcess(resolve);
|
|
62
|
+
script.onload = ep;
|
|
63
|
+
script.onerror = ep;
|
|
64
|
+
document.body.appendChild(script);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function init() {
|
|
69
|
+
if (runtimeConfigCache.init) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (Reflect.get(window, RUNTIME_CONFIG_RESOLVE)) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
return loadRuntimeConfig()
|
|
76
|
+
.then(async (value) => {
|
|
77
|
+
runtimeConfigCache.updateTime = new Date();
|
|
78
|
+
runtimeConfigCache.value = value;
|
|
79
|
+
})
|
|
80
|
+
.finally(() => {
|
|
81
|
+
runtimeConfigCache.init = true;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ApiProtocol, QueryType } from '../metadata';
|
|
2
|
+
|
|
3
|
+
export interface IGlobalConfig {
|
|
4
|
+
homepage?: {
|
|
5
|
+
model: string;
|
|
6
|
+
viewActionName: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
login?: string;
|
|
10
|
+
|
|
11
|
+
loginLogo?: string;
|
|
12
|
+
|
|
13
|
+
loginPartnerName?: string;
|
|
14
|
+
|
|
15
|
+
loginIcpDesc?: string;
|
|
16
|
+
|
|
17
|
+
errorPage?: string;
|
|
18
|
+
|
|
19
|
+
theme?: string;
|
|
20
|
+
|
|
21
|
+
mask?: string;
|
|
22
|
+
|
|
23
|
+
apiProtocol?: ApiProtocol;
|
|
24
|
+
|
|
25
|
+
queryType?: QueryType.DOMAIN | QueryType.OBJECT;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class GlobalConfig {
|
|
29
|
+
public static defaultLoginPath = '/login';
|
|
30
|
+
|
|
31
|
+
private static _config: IGlobalConfig = {};
|
|
32
|
+
|
|
33
|
+
public static resister(config: IGlobalConfig) {
|
|
34
|
+
this._config = config;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public static getConfig() {
|
|
38
|
+
return this._config;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public static getConfigByName(name: keyof IGlobalConfig) {
|
|
42
|
+
if (name === 'login') {
|
|
43
|
+
return this._config.login || this.defaultLoginPath;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return this._config[name];
|
|
47
|
+
}
|
|
48
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const BASE_RSQL_QUERY_CONDITION = 'id =notnull= true';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const SYSTEM_MODULE = {
|
|
2
|
+
BASE: 'base',
|
|
3
|
+
COMMON: 'common',
|
|
4
|
+
USER: 'user',
|
|
5
|
+
AUTH: 'auth',
|
|
6
|
+
MESSAGE: 'message',
|
|
7
|
+
RESOURCE: 'resource',
|
|
8
|
+
FILE: 'file',
|
|
9
|
+
DESIGNER_COMMON: 'designer_common'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const SYSTEM_MODULE_NAME = {
|
|
13
|
+
BASE: 'base',
|
|
14
|
+
COMMON: 'common',
|
|
15
|
+
USER: 'user',
|
|
16
|
+
AUTH: 'auth',
|
|
17
|
+
MESSAGE: 'message',
|
|
18
|
+
RESOURCE: 'resource',
|
|
19
|
+
FILE: 'file',
|
|
20
|
+
DESIGNER_COMMON: 'designerCommon'
|
|
21
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import gql from 'graphql-tag';
|
|
2
|
+
|
|
3
|
+
import { View } from './page';
|
|
4
|
+
import { Func } from './func';
|
|
5
|
+
|
|
6
|
+
const Action = gql`
|
|
7
|
+
fragment Action on Action {
|
|
8
|
+
id
|
|
9
|
+
name
|
|
10
|
+
displayName
|
|
11
|
+
label
|
|
12
|
+
description
|
|
13
|
+
actionType
|
|
14
|
+
contextType
|
|
15
|
+
bindingType
|
|
16
|
+
sessionPath
|
|
17
|
+
model
|
|
18
|
+
modelName
|
|
19
|
+
invisible
|
|
20
|
+
priority
|
|
21
|
+
attributes
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
const ViewAction = gql`
|
|
26
|
+
fragment ViewAction on ViewAction {
|
|
27
|
+
id
|
|
28
|
+
name
|
|
29
|
+
title
|
|
30
|
+
displayName
|
|
31
|
+
actionType
|
|
32
|
+
target
|
|
33
|
+
domain
|
|
34
|
+
viewType
|
|
35
|
+
dataType
|
|
36
|
+
contextType
|
|
37
|
+
bindingType
|
|
38
|
+
bindingViewName
|
|
39
|
+
sessionPath
|
|
40
|
+
model
|
|
41
|
+
resModel
|
|
42
|
+
invisible
|
|
43
|
+
moduleName
|
|
44
|
+
resModule
|
|
45
|
+
resModuleName
|
|
46
|
+
context
|
|
47
|
+
priority
|
|
48
|
+
attributes
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
const UrlAction = gql`
|
|
53
|
+
fragment UrlAction on UrlAction {
|
|
54
|
+
id
|
|
55
|
+
name
|
|
56
|
+
displayName
|
|
57
|
+
url
|
|
58
|
+
target
|
|
59
|
+
description
|
|
60
|
+
actionType
|
|
61
|
+
contextType
|
|
62
|
+
bindingType
|
|
63
|
+
sessionPath
|
|
64
|
+
model
|
|
65
|
+
modelName
|
|
66
|
+
invisible
|
|
67
|
+
compute
|
|
68
|
+
context
|
|
69
|
+
priority
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
const ServerAction = gql`
|
|
74
|
+
fragment ServerAction on ServerAction {
|
|
75
|
+
id
|
|
76
|
+
name
|
|
77
|
+
displayName
|
|
78
|
+
label
|
|
79
|
+
description
|
|
80
|
+
actionType
|
|
81
|
+
contextType
|
|
82
|
+
bindingType
|
|
83
|
+
sessionPath
|
|
84
|
+
model
|
|
85
|
+
modelName
|
|
86
|
+
invisible
|
|
87
|
+
priority
|
|
88
|
+
fun
|
|
89
|
+
functionDefinition {
|
|
90
|
+
method
|
|
91
|
+
name
|
|
92
|
+
type
|
|
93
|
+
argumentList {
|
|
94
|
+
name
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
`;
|
|
99
|
+
|
|
100
|
+
const ClientAction = gql`
|
|
101
|
+
fragment ClientAction on ClientAction {
|
|
102
|
+
id
|
|
103
|
+
name
|
|
104
|
+
displayName
|
|
105
|
+
label
|
|
106
|
+
description
|
|
107
|
+
actionType
|
|
108
|
+
contextType
|
|
109
|
+
bindingType
|
|
110
|
+
sessionPath
|
|
111
|
+
model
|
|
112
|
+
modelName
|
|
113
|
+
invisible
|
|
114
|
+
priority
|
|
115
|
+
fun
|
|
116
|
+
}
|
|
117
|
+
`;
|
|
118
|
+
|
|
119
|
+
export { ViewAction, UrlAction, ServerAction, ClientAction, Action };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import gql from 'graphql-tag';
|
|
2
|
+
|
|
3
|
+
const Field = gql`
|
|
4
|
+
fragment Field on Field {
|
|
5
|
+
id
|
|
6
|
+
name
|
|
7
|
+
displayName
|
|
8
|
+
ttype
|
|
9
|
+
model
|
|
10
|
+
multi
|
|
11
|
+
references
|
|
12
|
+
size
|
|
13
|
+
limit
|
|
14
|
+
related
|
|
15
|
+
relatedTtype
|
|
16
|
+
store
|
|
17
|
+
storeSerialize
|
|
18
|
+
relationStore
|
|
19
|
+
required
|
|
20
|
+
relationFields
|
|
21
|
+
referenceFields
|
|
22
|
+
throughRelationFields
|
|
23
|
+
throughReferenceFields
|
|
24
|
+
through
|
|
25
|
+
invisible
|
|
26
|
+
field
|
|
27
|
+
domainSize
|
|
28
|
+
index
|
|
29
|
+
unique
|
|
30
|
+
decimal
|
|
31
|
+
systemSource
|
|
32
|
+
format
|
|
33
|
+
options {
|
|
34
|
+
name
|
|
35
|
+
displayName
|
|
36
|
+
value
|
|
37
|
+
}
|
|
38
|
+
attributes
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
export { Field };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action, ClientAction, ServerAction, UrlAction, ViewAction } from './action';
|
|
2
|
+
import { Field } from './field';
|
|
3
|
+
import { Func } from './func';
|
|
4
|
+
import { Menu } from './menu';
|
|
5
|
+
import { Model, ModelWithFields } from './model';
|
|
6
|
+
import { View } from './page';
|
|
7
|
+
|
|
8
|
+
export const MetadataFragment = {
|
|
9
|
+
Model,
|
|
10
|
+
ModelWithFields,
|
|
11
|
+
Field,
|
|
12
|
+
UrlAction,
|
|
13
|
+
ServerAction,
|
|
14
|
+
ViewAction,
|
|
15
|
+
ClientAction,
|
|
16
|
+
Action,
|
|
17
|
+
Menu,
|
|
18
|
+
View,
|
|
19
|
+
Func
|
|
20
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import gql from 'graphql-tag';
|
|
2
|
+
import { ServerAction, ViewAction, UrlAction } from './action';
|
|
3
|
+
|
|
4
|
+
const Menu = gql`
|
|
5
|
+
fragment Menu on Menu {
|
|
6
|
+
serverAction {
|
|
7
|
+
...ServerAction
|
|
8
|
+
}
|
|
9
|
+
viewAction {
|
|
10
|
+
...ViewAction
|
|
11
|
+
}
|
|
12
|
+
urlAction {
|
|
13
|
+
...UrlAction
|
|
14
|
+
}
|
|
15
|
+
id
|
|
16
|
+
icon
|
|
17
|
+
name
|
|
18
|
+
displayName
|
|
19
|
+
priority
|
|
20
|
+
actionType
|
|
21
|
+
mapping
|
|
22
|
+
context
|
|
23
|
+
parentName
|
|
24
|
+
moduleDefinition {
|
|
25
|
+
name
|
|
26
|
+
displayName
|
|
27
|
+
id
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
${ServerAction}
|
|
31
|
+
${ViewAction}
|
|
32
|
+
${UrlAction}
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
export { Menu };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import gql from 'graphql-tag';
|
|
2
|
+
import { ClientAction, ServerAction, UrlAction, ViewAction } from './action';
|
|
3
|
+
|
|
4
|
+
import { Field } from './field';
|
|
5
|
+
import { Func } from './func';
|
|
6
|
+
import { View } from './page';
|
|
7
|
+
|
|
8
|
+
export const Model = gql`
|
|
9
|
+
fragment Model on Model {
|
|
10
|
+
id
|
|
11
|
+
pk
|
|
12
|
+
model
|
|
13
|
+
name
|
|
14
|
+
displayName
|
|
15
|
+
labelFields
|
|
16
|
+
label
|
|
17
|
+
moduleName
|
|
18
|
+
module
|
|
19
|
+
type
|
|
20
|
+
attributes
|
|
21
|
+
ordering
|
|
22
|
+
indexes
|
|
23
|
+
uniques
|
|
24
|
+
modelFields {
|
|
25
|
+
...Field
|
|
26
|
+
}
|
|
27
|
+
viewActionList {
|
|
28
|
+
...ViewAction
|
|
29
|
+
}
|
|
30
|
+
serverActionList {
|
|
31
|
+
...ServerAction
|
|
32
|
+
}
|
|
33
|
+
urlActionList {
|
|
34
|
+
...UrlAction
|
|
35
|
+
}
|
|
36
|
+
viewList {
|
|
37
|
+
...View
|
|
38
|
+
}
|
|
39
|
+
clientActionList {
|
|
40
|
+
...ClientAction
|
|
41
|
+
}
|
|
42
|
+
functions {
|
|
43
|
+
...Func
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
${Field}
|
|
47
|
+
${ViewAction}
|
|
48
|
+
${ServerAction}
|
|
49
|
+
${UrlAction}
|
|
50
|
+
${ClientAction}
|
|
51
|
+
${View}
|
|
52
|
+
${Func}
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
export const ModelWithFields = gql`
|
|
56
|
+
fragment ModelWithFields on Model {
|
|
57
|
+
id
|
|
58
|
+
pk
|
|
59
|
+
model
|
|
60
|
+
name
|
|
61
|
+
displayName
|
|
62
|
+
labelFields
|
|
63
|
+
label
|
|
64
|
+
moduleName
|
|
65
|
+
module
|
|
66
|
+
type
|
|
67
|
+
attributes
|
|
68
|
+
ordering
|
|
69
|
+
indexes
|
|
70
|
+
uniques
|
|
71
|
+
modelFields {
|
|
72
|
+
...Field
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
${Field}
|
|
76
|
+
`;
|