@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.
Files changed (145) hide show
  1. package/dist/oinone-kunlun-meta.esm.js +496 -0
  2. package/dist/types/index.d.ts +1 -0
  3. package/dist/types/src/element/ActionElement.d.ts +15 -0
  4. package/dist/types/src/element/ApiElement.d.ts +21 -0
  5. package/dist/types/src/element/ClearElement.d.ts +9 -0
  6. package/dist/types/src/element/ConfigElement.d.ts +6 -0
  7. package/dist/types/src/element/ContextElement.d.ts +9 -0
  8. package/dist/types/src/element/CustomElement.d.ts +7 -0
  9. package/dist/types/src/element/FieldElement.d.ts +25 -0
  10. package/dist/types/src/element/IBaseElement.d.ts +5 -0
  11. package/dist/types/src/element/PropElement.d.ts +6 -0
  12. package/dist/types/src/element/RequestElement.d.ts +9 -0
  13. package/dist/types/src/element/ResponseElement.d.ts +9 -0
  14. package/dist/types/src/element/SubscribeElement.d.ts +9 -0
  15. package/dist/types/src/element/ValidationElement.d.ts +12 -0
  16. package/dist/types/src/element/ViewElement.d.ts +15 -0
  17. package/dist/types/src/element/WidgetElement.d.ts +23 -0
  18. package/dist/types/src/element/index.d.ts +14 -0
  19. package/dist/types/src/global-config/index.d.ts +2 -0
  20. package/dist/types/src/global-config/runtime-config.d.ts +14 -0
  21. package/dist/types/src/global-config/type.d.ts +26 -0
  22. package/dist/types/src/index.d.ts +5 -0
  23. package/dist/types/src/metadata/constant/config.d.ts +1 -0
  24. package/dist/types/src/metadata/constant/index.d.ts +2 -0
  25. package/dist/types/src/metadata/constant/module-name.d.ts +20 -0
  26. package/dist/types/src/metadata/fragment/action.d.ts +6 -0
  27. package/dist/types/src/metadata/fragment/field.d.ts +2 -0
  28. package/dist/types/src/metadata/fragment/func.d.ts +2 -0
  29. package/dist/types/src/metadata/fragment/index.d.ts +13 -0
  30. package/dist/types/src/metadata/fragment/menu.d.ts +2 -0
  31. package/dist/types/src/metadata/fragment/model.d.ts +2 -0
  32. package/dist/types/src/metadata/fragment/page.d.ts +2 -0
  33. package/dist/types/src/metadata/index.d.ts +4 -0
  34. package/dist/types/src/metadata/runtime-fragment/action.d.ts +8 -0
  35. package/dist/types/src/metadata/runtime-fragment/function.d.ts +3 -0
  36. package/dist/types/src/metadata/runtime-fragment/index.d.ts +20 -0
  37. package/dist/types/src/metadata/runtime-fragment/model.d.ts +2 -0
  38. package/dist/types/src/metadata/runtime-fragment/module.d.ts +2 -0
  39. package/dist/types/src/metadata/runtime-fragment/view.d.ts +6 -0
  40. package/dist/types/src/metadata/types/dsl-node.d.ts +12 -0
  41. package/dist/types/src/metadata/types/enumeration.d.ts +18 -0
  42. package/dist/types/src/metadata/types/index.d.ts +8 -0
  43. package/dist/types/src/metadata/types/layout.d.ts +4 -0
  44. package/dist/types/src/metadata/types/model.d.ts +573 -0
  45. package/dist/types/src/metadata/types/tag.d.ts +23 -0
  46. package/dist/types/src/metadata/types/user.d.ts +22 -0
  47. package/dist/types/src/metadata/types/value.d.ts +3 -0
  48. package/dist/types/src/metadata/types/view.d.ts +170 -0
  49. package/dist/types/src/plugin-loader/factory/PluginLoaderFactory.d.ts +4 -0
  50. package/dist/types/src/plugin-loader/factory/index.d.ts +1 -0
  51. package/dist/types/src/plugin-loader/index.d.ts +5 -0
  52. package/dist/types/src/plugin-loader/loader/CJSPluginLoader.d.ts +7 -0
  53. package/dist/types/src/plugin-loader/loader/CSSPluginLoader.d.ts +7 -0
  54. package/dist/types/src/plugin-loader/loader/ESMPluginLoader.d.ts +7 -0
  55. package/dist/types/src/plugin-loader/loader/IIFEPluginLoader.d.ts +7 -0
  56. package/dist/types/src/plugin-loader/loader/LoadedEvent.d.ts +4 -0
  57. package/dist/types/src/plugin-loader/loader/PluginLoader.d.ts +5 -0
  58. package/dist/types/src/plugin-loader/loader/RemotePluginLoader.d.ts +5 -0
  59. package/dist/types/src/plugin-loader/loader/UMDPluginLoader.d.ts +6 -0
  60. package/dist/types/src/plugin-loader/loader/index.d.ts +1 -0
  61. package/dist/types/src/plugin-loader/typing/index.d.ts +2 -0
  62. package/dist/types/src/plugin-loader/typing/load-option.d.ts +48 -0
  63. package/dist/types/src/plugin-loader/typing/loader-config.d.ts +38 -0
  64. package/dist/types/src/plugin-loader/util/PluginLoadHelper.d.ts +7 -0
  65. package/dist/types/src/plugin-loader/util/index.d.ts +1 -0
  66. package/dist/types/src/util/element.d.ts +16 -0
  67. package/dist/types/src/util/field.d.ts +7 -0
  68. package/dist/types/src/util/helper.d.ts +2 -0
  69. package/dist/types/src/util/index.d.ts +6 -0
  70. package/dist/types/src/util/ke-common.d.ts +6 -0
  71. package/dist/types/src/util/lang.d.ts +4 -0
  72. package/dist/types/src/util/validation-utils.d.ts +3 -0
  73. package/index.ts +1 -0
  74. package/package.json +17 -0
  75. package/rollup.config.js +4 -0
  76. package/src/element/ActionElement.ts +20 -0
  77. package/src/element/ApiElement.ts +22 -0
  78. package/src/element/ClearElement.ts +10 -0
  79. package/src/element/ConfigElement.ts +7 -0
  80. package/src/element/ContextElement.ts +10 -0
  81. package/src/element/CustomElement.ts +22 -0
  82. package/src/element/FieldElement.ts +41 -0
  83. package/src/element/IBaseElement.ts +5 -0
  84. package/src/element/PropElement.ts +7 -0
  85. package/src/element/RequestElement.ts +10 -0
  86. package/src/element/ResponseElement.ts +10 -0
  87. package/src/element/SubscribeElement.ts +10 -0
  88. package/src/element/ValidationElement.ts +17 -0
  89. package/src/element/ViewElement.ts +23 -0
  90. package/src/element/WidgetElement.ts +33 -0
  91. package/src/element/index.ts +14 -0
  92. package/src/global-config/index.ts +2 -0
  93. package/src/global-config/runtime-config.ts +83 -0
  94. package/src/global-config/type.ts +48 -0
  95. package/src/index.ts +5 -0
  96. package/src/metadata/constant/config.ts +1 -0
  97. package/src/metadata/constant/index.ts +2 -0
  98. package/src/metadata/constant/module-name.ts +21 -0
  99. package/src/metadata/fragment/action.ts +119 -0
  100. package/src/metadata/fragment/field.ts +42 -0
  101. package/src/metadata/fragment/func.ts +21 -0
  102. package/src/metadata/fragment/index.ts +20 -0
  103. package/src/metadata/fragment/menu.ts +35 -0
  104. package/src/metadata/fragment/model.ts +76 -0
  105. package/src/metadata/fragment/page.ts +17 -0
  106. package/src/metadata/index.ts +4 -0
  107. package/src/metadata/runtime-fragment/action.ts +159 -0
  108. package/src/metadata/runtime-fragment/function.ts +25 -0
  109. package/src/metadata/runtime-fragment/index.ts +36 -0
  110. package/src/metadata/runtime-fragment/model.ts +18 -0
  111. package/src/metadata/runtime-fragment/module.ts +11 -0
  112. package/src/metadata/runtime-fragment/view.ts +44 -0
  113. package/src/metadata/types/dsl-node.ts +14 -0
  114. package/src/metadata/types/enumeration.ts +19 -0
  115. package/src/metadata/types/index.ts +8 -0
  116. package/src/metadata/types/layout.ts +4 -0
  117. package/src/metadata/types/model.ts +823 -0
  118. package/src/metadata/types/tag.ts +24 -0
  119. package/src/metadata/types/user.ts +27 -0
  120. package/src/metadata/types/value.ts +3 -0
  121. package/src/metadata/types/view.ts +194 -0
  122. package/src/plugin-loader/factory/PluginLoaderFactory.ts +23 -0
  123. package/src/plugin-loader/factory/index.ts +1 -0
  124. package/src/plugin-loader/index.ts +33 -0
  125. package/src/plugin-loader/loader/CJSPluginLoader.ts +18 -0
  126. package/src/plugin-loader/loader/CSSPluginLoader.ts +29 -0
  127. package/src/plugin-loader/loader/ESMPluginLoader.ts +53 -0
  128. package/src/plugin-loader/loader/IIFEPluginLoader.ts +18 -0
  129. package/src/plugin-loader/loader/LoadedEvent.ts +24 -0
  130. package/src/plugin-loader/loader/PluginLoader.ts +12 -0
  131. package/src/plugin-loader/loader/RemotePluginLoader.ts +54 -0
  132. package/src/plugin-loader/loader/UMDPluginLoader.ts +50 -0
  133. package/src/plugin-loader/loader/index.ts +1 -0
  134. package/src/plugin-loader/typing/index.ts +2 -0
  135. package/src/plugin-loader/typing/load-option.ts +51 -0
  136. package/src/plugin-loader/typing/loader-config.ts +38 -0
  137. package/src/plugin-loader/util/PluginLoadHelper.ts +70 -0
  138. package/src/plugin-loader/util/index.ts +1 -0
  139. package/src/util/element.ts +154 -0
  140. package/src/util/field.ts +63 -0
  141. package/src/util/helper.ts +6 -0
  142. package/src/util/index.ts +6 -0
  143. package/src/util/ke-common.ts +25 -0
  144. package/src/util/lang.ts +8 -0
  145. 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,11 @@
1
+ import gql from 'graphql-tag';
2
+
3
+ export const ModuleFragmentName = '...ModuleV3';
4
+
5
+ export const Module = gql`
6
+ fragment ModuleV3 on ModuleDefinition {
7
+ module
8
+ name
9
+ displayName
10
+ }
11
+ `;
@@ -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
+ }
@@ -0,0 +1,8 @@
1
+ export * from './dsl-node';
2
+ export * from './enumeration';
3
+ export * from './layout';
4
+ export * from './model';
5
+ export * from './tag';
6
+ export * from './user';
7
+ export * from './value';
8
+ export * from './view';
@@ -0,0 +1,4 @@
1
+ export interface LayoutDefinition {
2
+ name: string;
3
+ template: string;
4
+ }