@geelato/gl-runtime-core 0.0.1

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 (117) hide show
  1. package/dist/gl-runtime-core.css +1 -0
  2. package/dist/gl-runtime-core.css.gz +0 -0
  3. package/dist/gl-runtime-core.js +169768 -0
  4. package/dist/gl-runtime-core.js.gz +0 -0
  5. package/dist/gl-runtime-core.umd.cjs +35 -0
  6. package/dist/iconfont-BJ2VOOKJ.js +35 -0
  7. package/dist/iconfont-BJ2VOOKJ.js.gz +0 -0
  8. package/dist/types/actions/JsScriptExecutor.d.ts +291 -0
  9. package/dist/types/actions/fns/datetime.d.ts +22 -0
  10. package/dist/types/actions/fns/device.d.ts +23 -0
  11. package/dist/types/actions/fns/math.d.ts +27 -0
  12. package/dist/types/api/EntityApi.d.ts +143 -0
  13. package/dist/types/api/EntityDataSource.d.ts +272 -0
  14. package/dist/types/api/EntityDeleteService.d.ts +47 -0
  15. package/dist/types/api/EntityQueryCache.d.ts +62 -0
  16. package/dist/types/api/EntityQueryService.d.ts +71 -0
  17. package/dist/types/api/EntityResultMapping.d.ts +11 -0
  18. package/dist/types/api/EntitySaveService.d.ts +46 -0
  19. package/dist/types/api/EntityTypes.d.ts +135 -0
  20. package/dist/types/api/EntityUtilService.d.ts +42 -0
  21. package/dist/types/assets/globalConfig.d.ts +5 -0
  22. package/dist/types/components/AppProvideProxy.d.ts +21 -0
  23. package/dist/types/components/ComponentTreeParser.d.ts +17 -0
  24. package/dist/types/components/FormProvideProxy.d.ts +35 -0
  25. package/dist/types/components/Hooks.d.ts +7 -0
  26. package/dist/types/components/PageDataSourceManager.d.ts +28 -0
  27. package/dist/types/components/PageLoader.d.ts +6 -0
  28. package/dist/types/components/PageProvideProxy.d.ts +413 -0
  29. package/dist/types/components/UiEventNames.d.ts +15 -0
  30. package/dist/types/components/gl-chart/GlChart.vue.d.ts +135 -0
  31. package/dist/types/components/gl-component/GlComponent.vue.d.ts +191 -0
  32. package/dist/types/components/gl-component/GlComponentSupport.d.ts +49 -0
  33. package/dist/types/components/gl-component/GlInsts.vue.d.ts +19 -0
  34. package/dist/types/components/gl-div/GlDiv.vue.d.ts +107 -0
  35. package/dist/types/components/gl-dnd-placeholder/Index.vue.d.ts +112 -0
  36. package/dist/types/components/gl-html/Index.vue.d.ts +7 -0
  37. package/dist/types/components/gl-iconfont/IconsJson.d.ts +15 -0
  38. package/dist/types/components/gl-iconfont/Index.vue.d.ts +19 -0
  39. package/dist/types/components/gl-loader/GlLoader.vue.d.ts +3 -0
  40. package/dist/types/components/gl-login/FloatingActionButton.vue.d.ts +9 -0
  41. package/dist/types/components/gl-login/LoginDialog.vue.d.ts +9 -0
  42. package/dist/types/components/gl-loop/GlLoop.vue.d.ts +230 -0
  43. package/dist/types/components/gl-page-viewer/GlPageViewer.vue.d.ts +221 -0
  44. package/dist/types/components/gl-scanner/GlScanner.vue.d.ts +44 -0
  45. package/dist/types/components/gl-template/GlTemplate.vue.d.ts +154 -0
  46. package/dist/types/components/gl-template/Typs.d.ts +4 -0
  47. package/dist/types/components/gl-virtual/Index.vue.d.ts +3 -0
  48. package/dist/types/components/mixins.d.ts +86 -0
  49. package/dist/types/components/ui-mixins.d.ts +16 -0
  50. package/dist/types/composables/useApiUrl.d.ts +30 -0
  51. package/dist/types/composables/useGlobal.d.ts +21 -0
  52. package/dist/types/composables/useLoading.d.ts +6 -0
  53. package/dist/types/composables/useLogger.d.ts +32 -0
  54. package/dist/types/composables/useMessages.d.ts +15 -0
  55. package/dist/types/composables/useRole.d.ts +5 -0
  56. package/dist/types/locales/index.d.ts +21 -0
  57. package/dist/types/locales/lang/en-US.d.ts +4 -0
  58. package/dist/types/locales/lang/zh-CN.d.ts +4 -0
  59. package/dist/types/m/datasource/ApplicationApi.d.ts +163 -0
  60. package/dist/types/m/datasource/ArcoApi.d.ts +76 -0
  61. package/dist/types/m/datasource/Base.d.ts +99 -0
  62. package/dist/types/m/datasource/BranchApi.d.ts +2 -0
  63. package/dist/types/m/datasource/CompanyApi.d.ts +49 -0
  64. package/dist/types/m/datasource/DictApi.d.ts +127 -0
  65. package/dist/types/m/datasource/DictionaryApi.d.ts +16 -0
  66. package/dist/types/m/datasource/EncodingApi.d.ts +59 -0
  67. package/dist/types/m/datasource/Entry.d.ts +5 -0
  68. package/dist/types/m/datasource/FieldMeta.d.ts +6 -0
  69. package/dist/types/m/datasource/FileApi.d.ts +273 -0
  70. package/dist/types/m/datasource/FileTemplateApi.d.ts +114 -0
  71. package/dist/types/m/datasource/InterApi.d.ts +104 -0
  72. package/dist/types/m/datasource/MarketApi.d.ts +191 -0
  73. package/dist/types/m/datasource/MessageApi.d.ts +27 -0
  74. package/dist/types/m/datasource/ModelApi.d.ts +327 -0
  75. package/dist/types/m/datasource/NoticeApi.d.ts +37 -0
  76. package/dist/types/m/datasource/OcrPdfApi.d.ts +145 -0
  77. package/dist/types/m/datasource/PluginApi.d.ts +35 -0
  78. package/dist/types/m/datasource/ScheduleApi.d.ts +67 -0
  79. package/dist/types/m/datasource/SecurityApi.d.ts +253 -0
  80. package/dist/types/m/datasource/SiteApi.d.ts +38 -0
  81. package/dist/types/m/datasource/SqlApi.d.ts +45 -0
  82. package/dist/types/m/datasource/SysConfigApi.d.ts +52 -0
  83. package/dist/types/m/datasource/TenantApi.d.ts +107 -0
  84. package/dist/types/m/datasource/UserApi.d.ts +173 -0
  85. package/dist/types/m/datasource/VersionApi.d.ts +59 -0
  86. package/dist/types/m/datasource/WeChatApi.d.ts +34 -0
  87. package/dist/types/m/datasource/WorkflowApi.d.ts +317 -0
  88. package/dist/types/m/datasource/ZxingApi.d.ts +38 -0
  89. package/dist/types/main.d.ts +114 -0
  90. package/dist/types/store/index.d.ts +2 -0
  91. package/dist/types/store/modules/user/index.d.ts +16 -0
  92. package/dist/types/types/Operators.d.ts +19 -0
  93. package/dist/types/types/global.d.ts +198 -0
  94. package/dist/types/types/options.d.ts +35 -0
  95. package/dist/types/utils/Auth.d.ts +37 -0
  96. package/dist/types/utils/CacheManager.d.ts +110 -0
  97. package/dist/types/utils/CheckUtil.d.ts +5 -0
  98. package/dist/types/utils/ClipboardUtil.d.ts +24 -0
  99. package/dist/types/utils/ConvertUtil.d.ts +81 -0
  100. package/dist/types/utils/Event.d.ts +2 -0
  101. package/dist/types/utils/FileUtil.d.ts +7 -0
  102. package/dist/types/utils/GenerateUtil.d.ts +14 -0
  103. package/dist/types/utils/IsUtil.d.ts +126 -0
  104. package/dist/types/utils/MixUtil.d.ts +49 -0
  105. package/dist/types/utils/Monitor.d.ts +2 -0
  106. package/dist/types/utils/PageUtil.d.ts +14 -0
  107. package/dist/types/utils/PluginUtil.d.ts +9 -0
  108. package/dist/types/utils/RecordsUtil.d.ts +3 -0
  109. package/dist/types/utils/SseClient.d.ts +34 -0
  110. package/dist/types/utils/StoreUtil.d.ts +8 -0
  111. package/dist/types/utils/StringUtil.d.ts +29 -0
  112. package/dist/types/utils/Utils.d.ts +217 -0
  113. package/dist/types/utils/emitter.d.ts +3 -0
  114. package/dist/types/utils/renderTemplate.d.ts +6 -0
  115. package/dist/types/utils/toChineseCurrency.d.ts +5 -0
  116. package/package.json +76 -0
  117. package/src/main.ts +498 -0
@@ -0,0 +1,21 @@
1
+ import { default as PageProvideProxy } from './PageProvideProxy';
2
+ export declare const AppProvideKey = "AppProvideKey";
3
+ export default class AppProvideProxy {
4
+ appId: string;
5
+ pageProvideProxyMap: {
6
+ [key: string]: PageProvideProxy | null;
7
+ };
8
+ constructor();
9
+ /**
10
+ * 页面内子组件引用
11
+ * @param pageComponentId
12
+ * @param vueInst vue实组件实例
13
+ */
14
+ addPageProvideProxy(pageComponentId: string, pageProvideProxy: PageProvideProxy | null): void;
15
+ removePageProvideProxy(pageComponentId: string): void;
16
+ /**
17
+ * 基于组件获取页面内的vue组件实例
18
+ * @param pageComponentId
19
+ */
20
+ getPageProvideProxy(pageComponentId: string): PageProvideProxy | null;
21
+ }
@@ -0,0 +1,17 @@
1
+ import { IComponentInstance } from '@geelato/gl-types';
2
+ /**
3
+ * 不计入需统计已加载完成的组件
4
+ */
5
+ export declare const ignoreComponents: string[];
6
+ /**
7
+ * 提取树形结构中所有组件的ids,形成列表
8
+ * 深度优先遍历,先遍历子节点,后遍历父节点,同级节点倒序遍历
9
+ * 生成的示例数据:['1.2', '1.1.2', '1.1.1.2', '1.1.1.1', '1.1.1', '1.1', '1']
10
+ * @param tree
11
+ */
12
+ export declare const extractTreeIds: (tree: IComponentInstance) => {
13
+ allIds: string[];
14
+ normalIds: string[];
15
+ unRenderedIds: string[];
16
+ innerIds: string[];
17
+ };
@@ -0,0 +1,35 @@
1
+ import { Ref } from 'vue';
2
+ export type FormParamType = {
3
+ pName: string;
4
+ pValue: any;
5
+ pType: string;
6
+ };
7
+ export declare const FormProvideKey = "FormProvideKey";
8
+ export declare const FormProvideKeyNotBlockForm = "FormProvideKeyNotBlockForm";
9
+ export default class FormProvideProxy {
10
+ id: string;
11
+ entityName: string;
12
+ state: Ref<{
13
+ [key: string]: any;
14
+ }, {
15
+ [key: string]: any;
16
+ }>;
17
+ recordId: Ref<string, string>;
18
+ setRecordId(id: string): void;
19
+ getRecordIdRef(): Ref<string, string>;
20
+ getRecordId(): string;
21
+ /**
22
+ * 设置整个表单的值
23
+ * @param formValues
24
+ */
25
+ setValues(formValues: any): void;
26
+ setFieldValue(fieldName: string, value: any): void;
27
+ getFieldValue(fieldName: string): any;
28
+ destroy(): void;
29
+ }
30
+ export declare class SubmitFormResult {
31
+ id: string;
32
+ entity: string;
33
+ record: Record<string, any>;
34
+ success: boolean;
35
+ }
@@ -0,0 +1,7 @@
1
+ import { IComponentInstance } from '@geelato/gl-types';
2
+ /**
3
+ * 检查作为表单项的组件是否显示标题
4
+ * 如组件放在layout等容器组件时,需要进行是否展示formItem的检查
5
+ * @return true:表示显示,false:表示不显示
6
+ */
7
+ export declare const useCheckShowFormItemLabel: (inst: IComponentInstance) => boolean;
@@ -0,0 +1,28 @@
1
+ import { Ref } from 'vue';
2
+ import { EntityReader } from '../api/EntityDataSource';
3
+ export type DataSourceStatus = 'idle' | 'loading' | 'loaded' | 'error';
4
+ export interface PageDataSource<T = any> {
5
+ key: string;
6
+ data: T[];
7
+ status: DataSourceStatus;
8
+ meta?: Record<string, any>;
9
+ error?: any;
10
+ }
11
+ export interface EntityReaderDataSourceOptions<T = any> {
12
+ reader?: EntityReader;
13
+ meta?: Record<string, any>;
14
+ disabledClientQueryCache?: boolean;
15
+ bizCode?: string;
16
+ }
17
+ export declare class PageDataSourceManager {
18
+ private refs;
19
+ ensureRef(key: string): Ref<PageDataSource<any>, PageDataSource<any>>;
20
+ getRef<T = any>(key: string): Ref<PageDataSource<T>> | undefined;
21
+ setLoading(key: string, meta?: Record<string, any>): void;
22
+ setLoaded<T = any>(key: string, data?: T[], meta?: Record<string, any>): void;
23
+ setError(key: string, error: any): void;
24
+ setEntityReaderDataSource<T = any>(key: string, options: EntityReaderDataSourceOptions<T>): Promise<Ref<PageDataSource<T>>>;
25
+ setStaticDataSource<T = any>(key: string, staticData?: T[], meta?: Record<string, any>): Promise<Ref<PageDataSource<T>>>;
26
+ destroy(): void;
27
+ }
28
+ export default PageDataSourceManager;
@@ -0,0 +1,6 @@
1
+ import { PageConfig } from '../types/global';
2
+ /**
3
+ * 加载页面,可作为drawer或modal的content
4
+ * @param pageConfig
5
+ */
6
+ export declare const loadPageContent: (pageConfig: PageConfig) => any;
@@ -0,0 +1,413 @@
1
+ import { Ref, ComponentInternalInstance, ComponentPublicInstance, ComponentOptionsBase, ComponentProvideOptions } from 'vue';
2
+ import { InstPermission, Param, ParamMeta } from '../types/global';
3
+ import { PageStatus } from '../types/options';
4
+ import { IComponentInstance, IInnerComponentPosition } from '@geelato/gl-types';
5
+ import { PageDataSource, EntityReaderDataSourceOptions } from './PageDataSourceManager';
6
+ import { default as FormProvideProxy } from './FormProvideProxy';
7
+ export type PageParamConfigType = {
8
+ pName: string;
9
+ pValue: any;
10
+ pType: string;
11
+ };
12
+ export interface PageCustomType {
13
+ id: string;
14
+ pageId: string;
15
+ cfg: Record<string, any>;
16
+ }
17
+ /**
18
+ * 页面模板数据对象
19
+ */
20
+ export interface IPageTemplate {
21
+ type: string;
22
+ addEventListener: Function;
23
+ removeEventListener: Function;
24
+ dispatchEvent: Function;
25
+ [key: string]: any;
26
+ }
27
+ /**
28
+ * 页面模板的默认实现
29
+ */
30
+ export declare class PageTemplate implements IPageTemplate {
31
+ private _eventListeners;
32
+ type: string;
33
+ constructor(type?: string);
34
+ /**
35
+ * 添加事件监听器,由模板组件内的嵌套组件调用,如表单组件
36
+ * @param eventType
37
+ * @param callback
38
+ */
39
+ addEventListener(eventType: string, callback: Function): void;
40
+ /**
41
+ * 删除事件监听器
42
+ * @param eventType
43
+ * @param callback
44
+ */
45
+ removeEventListener(eventType: string, callback: Function): void;
46
+ /**
47
+ * 触发事件,由模板组件或模板嵌套的组件调用
48
+ * 实现模板与嵌套组件之间的通讯
49
+ * @param eventType
50
+ * @param args
51
+ */
52
+ dispatchEvent(eventType: string, ...args: any[]): void;
53
+ }
54
+ /**
55
+ * 基于状态机的工作流状态转换对象
56
+ */
57
+ export declare class StateWorkflowTransfer {
58
+ id: string;
59
+ name: string;
60
+ procDefId: string;
61
+ appId: string;
62
+ srcStateId: string;
63
+ targetStateId: string;
64
+ isReject: boolean | null;
65
+ tranCondition: null;
66
+ remark: null;
67
+ }
68
+ /**
69
+ * 如作为工作流模板时,用于注入到表单等组件中,如可在提交表单时,表单获取到该template对象,清楚下一步是审批通过还是审批不通过
70
+ */
71
+ export declare class WorkflowPageTemplate extends PageTemplate {
72
+ constructor(type?: string);
73
+ onBeforeSubmit?: Function;
74
+ isReject?: boolean;
75
+ selectedTran?: StateWorkflowTransfer;
76
+ remark?: string;
77
+ attachIds?: string;
78
+ }
79
+ export declare const isImplementsWorkflowPageTemplate: (obj: any) => boolean;
80
+ /**
81
+ * 页面权限管理
82
+ */
83
+ export declare class PagePermission {
84
+ perms: InstPermission[];
85
+ setPermissions(perms: InstPermission[]): void;
86
+ /**
87
+ * 是否有查看权限
88
+ * @param instId 组件实例id
89
+ */
90
+ hasReadPermission(instId: string): boolean;
91
+ /**
92
+ * 是否有编辑权限
93
+ * @param instId 组件实例id
94
+ */
95
+ hasWritePermission(instId: string): boolean;
96
+ }
97
+ /**
98
+ * 记录哪些组件使用了内置
99
+ */
100
+ export declare const innerComponents: Record<string, IInnerComponentPosition[]>;
101
+ export declare function addInnerComponentPosition(componentName: string, positions: IInnerComponentPosition[]): void;
102
+ export declare const PageProvideKey = "PageProvideKey";
103
+ export declare const PageParamsKey = "PageParamsKey";
104
+ export declare const PageProvideKeyNotBlockPage = "PageProvideKeyNotBlockPage";
105
+ /**
106
+ * 参数据对象序列化,形成代码块
107
+ * @param params
108
+ */
109
+ export declare const paramStringify: (params: Array<PageParamConfigType>) => string;
110
+ declare enum PageRenderStatus {
111
+ none = 0,
112
+ mounted = 2
113
+ }
114
+ /**
115
+ * 页面组件中注入的对象
116
+ * TODO 每个组件有哪些内置组件id,在卸载组件时,需同步卸载其内置组件
117
+ */
118
+ export default class PageProvideProxy {
119
+ id: string;
120
+ pageId: string;
121
+ pageStatus: PageStatus;
122
+ pageHeight: string;
123
+ pageHeightRef: Ref<string>;
124
+ pageCustom?: PageCustomType;
125
+ pagePermission?: PagePermission;
126
+ pageTemplateName?: string;
127
+ pageTemplate: IPageTemplate;
128
+ pageInst: IComponentInstance;
129
+ pageVueInst: ComponentInternalInstance | null;
130
+ pageParams: Array<Param>;
131
+ pageParamsMeta: Array<ParamMeta>;
132
+ pageCtx: object;
133
+ vueRefMap: {
134
+ [key: string]: ComponentInternalInstance | null;
135
+ };
136
+ componentInstMap: {
137
+ [key: string]: IComponentInstance;
138
+ };
139
+ formProxyMap: {
140
+ [key: string]: FormProvideProxy;
141
+ };
142
+ pageRenderStatus: PageRenderStatus;
143
+ pageMountedEvents: Function[];
144
+ componentMountedEventMap: {
145
+ [key: string]: Function[];
146
+ };
147
+ normalIdList: string[];
148
+ normalIdMap: {
149
+ [key: string]: boolean;
150
+ };
151
+ allIds: string[];
152
+ unRenderedIdMap: {
153
+ [key: string]: boolean;
154
+ };
155
+ innerIds: string[];
156
+ innerIdMap: {
157
+ [key: string]: boolean;
158
+ };
159
+ mountedNormalIdMap: {
160
+ [key: string]: boolean;
161
+ };
162
+ mountedInnerIdMap: {
163
+ [key: string]: boolean;
164
+ };
165
+ mountedAndExecutedFnIdMap: {
166
+ [key: string]: boolean;
167
+ };
168
+ private _eventListeners;
169
+ /**
170
+ * 页面级数据源管理器
171
+ */
172
+ private _dataSourceManager;
173
+ constructor(pageInst: IComponentInstance, pageVueInst: ComponentInternalInstance);
174
+ /**
175
+ * 添加事件监听器,由模板组件内的嵌套组件调用,如表单组件
176
+ * @param eventType
177
+ * @param callback
178
+ */
179
+ addEventListener(eventType: string, callback: Function): void;
180
+ /**
181
+ * 删除事件监听器
182
+ * @param eventType
183
+ * @param callback
184
+ */
185
+ removeEventListener(eventType: string, callback: Function): void;
186
+ /**
187
+ * 触发事件,由模板组件或模板嵌套的组件调用
188
+ * 实现模板与嵌套组件之间的通讯
189
+ * @param eventType
190
+ * @param args
191
+ */
192
+ dispatchEvent(eventType: string, ...args: any[]): void;
193
+ addPageMountedEvent(fn: Function): void;
194
+ removePageMountedEvent(): void;
195
+ /**
196
+ * 添加组件mounted时,执行的事件
197
+ * 每个组件只添加一次,重复添加将把最新的覆盖旧的
198
+ * @param componentId
199
+ * @param fns 要执行的函数列表
200
+ */
201
+ setComponentMountedEvent(componentId: string, fns: Function[]): void;
202
+ /**
203
+ * 移除组件mounted时,执行的事件
204
+ * @param componentId 按组件id移除
205
+ */
206
+ removeComponentMountedEvent(componentId: string): void;
207
+ /**
208
+ * 页面内子组件引用(在组件mounted之后执行)
209
+ * 同时计算有多少组件还未mounted,记录在unMountedIds
210
+ *
211
+ * 注意!!!
212
+ * 本方法可在gl-component的setup先执行一次,再在onMounted再执行一次
213
+ * 第一次执行是为了确保基础组件的VueRef都已创建,便于后续的组件在事件中引用前端创建的组件
214
+ * 第二次在onMounted中再执行一次,是为了确保像table这类复合的组件在create时,vueRef的refs为{},无实际的组件实例,需要onMounted时才产生
215
+ * @param componentId
216
+ * @param vueRef vue实组件实例,这里的vueRef为GlComponent动态组件实例,需再进一步通过refs[componentId]获取最终的实例
217
+ */
218
+ setVueRef(componentId: string, vueRef: ComponentInternalInstance | null): void;
219
+ /**
220
+ * 尝试触发组件的onMounted事件
221
+ * 只有在检测到该页面的所有组件都已onMounted时,才触发页面onMounted事件
222
+ * 加载检查是否完成时,不包括组件内部的组件加载事项
223
+ * 加载检查
224
+ * @param componentId
225
+ * @param vueRef
226
+ */
227
+ tryTriggerMounted(componentInst: IComponentInstance, vueRef: ComponentInternalInstance | null): void;
228
+ /**
229
+ * 移除页面内的vue组件实例时,清除相应的数据
230
+ * GlComponent的onBeforeUnmount事件中执行
231
+ * @param componentId
232
+ */
233
+ removeVueInst(componentId: string): void;
234
+ /**
235
+ * 基于组件获取页面内的vue组件实例
236
+ * @param componentId
237
+ */
238
+ getRef(componentId: string): ComponentInternalInstance | null;
239
+ /**
240
+ * 基于组件获取页面内的vue组件实例
241
+ */
242
+ getRefs(): {
243
+ [key: string]: ComponentInternalInstance | null;
244
+ };
245
+ /**
246
+ * 获取当前页面在下所有的组件配置实例
247
+ */
248
+ getInsts(): {
249
+ [key: string]: IComponentInstance;
250
+ };
251
+ getDebugStats(): {
252
+ id: string;
253
+ pageId: string;
254
+ pageStatus: PageStatus;
255
+ pageRenderStatus: PageRenderStatus;
256
+ vueRefCount: number;
257
+ componentInstCount: number;
258
+ formProxyCount: number;
259
+ pageMountedEventCount: number;
260
+ componentMountedEventCount: number;
261
+ mountedNormalCount: number;
262
+ mountedInnerCount: number;
263
+ unRenderedCount: number;
264
+ allIdCount: number;
265
+ normalIdCount: number;
266
+ innerIdCount: number;
267
+ eventListenerTypeCount: number;
268
+ eventListenerCount: number;
269
+ };
270
+ /**
271
+ * 检查参数格式,看是否需要进行转换
272
+ * @param params
273
+ */
274
+ isParamNeedConvert(params: Array<PageParamConfigType | Param>): boolean;
275
+ paramStringify: (params: Array<PageParamConfigType>) => string;
276
+ /**
277
+ * 设置页面参数定义
278
+ * @param paramsMeta
279
+ */
280
+ setParamsMeta(paramsMeta: Array<ParamMeta>): void;
281
+ setPateTemplateName(pageTemplateName?: string): void;
282
+ setPateTemplate(pageTemplate: IPageTemplate): void;
283
+ getPageTemplate(): IPageTemplate;
284
+ /**
285
+ * 获取页面参数定义
286
+ */
287
+ getParamsMeta(): Array<ParamMeta>;
288
+ /**
289
+ * 设置页面参数,这里设置的是已完成解析的,键值对,不是参数配置信息
290
+ * @param params
291
+ */
292
+ setParams(params: Array<Param>): void;
293
+ /**
294
+ * 在动作面板中配置的页面参数,如recordId
295
+ */
296
+ getParams(): Array<Param>;
297
+ /**
298
+ * 获取页面参数中,带有开头信息的参数,形成参数数组
299
+ * 如:prefix为form时,取的是form.xxx的参数,并形成一个对象返回
300
+ */
301
+ getParamsByPrefixAsArray(prefix: string): {
302
+ [key: string]: any;
303
+ }[];
304
+ /**
305
+ * 获取页面参数中,带有开头信息的参数,形成参数对象
306
+ * 如:prefix为form时,取的是form.xxx的参数,并形成一个对象返回
307
+ */
308
+ getParamsByPrefixAsObject(prefix: string): {
309
+ [key: string]: any;
310
+ };
311
+ /**
312
+ * 获取在动作面板中配置的页面参数值
313
+ */
314
+ getParamValue(paramName: string): any;
315
+ /**
316
+ * 是否存在参数
317
+ * @param paramName
318
+ */
319
+ hasPageParam(paramName: string): boolean;
320
+ /**
321
+ * 设置组件值glComponentInst.value
322
+ * @param componentId
323
+ * @param value
324
+ */
325
+ setComponentValue(componentId: string, value: any): ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null | undefined;
326
+ /**
327
+ * 获取组件实例信息glComponentInst
328
+ * @param componentId
329
+ */
330
+ getComponentInst(componentId: string): any;
331
+ /**
332
+ * 获取组件值glComponentInst.value
333
+ * @param componentId
334
+ */
335
+ getComponentValue(componentId: string): any;
336
+ /**
337
+ * 设置组件GlComponent的属性,即glComponentInst.props
338
+ * @param componentId
339
+ * @param props 按一个个的属性值进行设置
340
+ */
341
+ setComponentProps(componentId: string, props: {
342
+ [key: string]: any;
343
+ }): any;
344
+ /**
345
+ * 获取组件属性
346
+ * @param componentId
347
+ */
348
+ getComponentProps(componentId: string): any;
349
+ /**
350
+ * 获取vue组件实例对外开放的方法
351
+ * @param componentId
352
+ * @param methodName
353
+ */
354
+ getMethod(componentId: string, methodName: string): Function | null;
355
+ setPageStatus(pageStatus: PageStatus): void;
356
+ setPageCustom(pageCustom?: PageCustomType): void;
357
+ getPageCustom(): PageCustomType | undefined;
358
+ setPageHeight(pageHeight: string): void;
359
+ getPageHeight(): string;
360
+ getPageHeightRef(): Ref<string, string>;
361
+ setPagePermission(pagePermission?: PagePermission): void;
362
+ getPagePermission(): PagePermission | undefined;
363
+ /**
364
+ * 获取数据源的响应式引用
365
+ */
366
+ getDataSourceRef<T = any>(key: string): Ref<PageDataSource<T>> | undefined;
367
+ /**
368
+ * 获取数据源的当前值
369
+ */
370
+ getDataSource<T = any>(key: string): PageDataSource<T> | undefined;
371
+ /**
372
+ * 通过 EntityReader 加载数据源
373
+ */
374
+ setEntityReaderDataSource<T = any>(key: string, options: EntityReaderDataSourceOptions<T>): Promise<Ref<PageDataSource<T>, PageDataSource<T>>>;
375
+ /**
376
+ * 设置静态数据源
377
+ */
378
+ setStaticDataSource<T = any>(key: string, staticData?: T[], meta?: Record<string, any>): Promise<Ref<PageDataSource<T>, PageDataSource<T>>>;
379
+ isPageStatusRead(): boolean;
380
+ isPageStatusCreate(): boolean;
381
+ isPageStatusCopyCreate(): boolean;
382
+ isPageStatusCreateOrCopyCreate(): boolean;
383
+ isPageStatusUpdate(): boolean;
384
+ isPageStatusCreateOrUpdate(): boolean;
385
+ /**
386
+ *
387
+ * @param formComponentId
388
+ * @param formProvideProxy
389
+ */
390
+ setFormProxy(formComponentId: string, formProvideProxy: FormProvideProxy): void;
391
+ /**
392
+ * 获取表单代理
393
+ * @param formComponentId
394
+ */
395
+ getFormProxy(formComponentId: string): FormProvideProxy | undefined;
396
+ /**
397
+ * 获取表单字段值
398
+ * @param formComponentId 表单组件Id
399
+ * @param fieldName
400
+ */
401
+ getFieldValue(formComponentId: string, fieldName: string): any | undefined;
402
+ /**
403
+ * 通过实体名称获取表单字段值,注意如果有多
404
+ * @param entityName 实体名称
405
+ * @param fieldName 字段名称
406
+ */
407
+ getFieldValueByEntityName(entityName: string, fieldName: string): any | undefined;
408
+ /**
409
+ * 在销毁之前调用
410
+ */
411
+ destroy(): void;
412
+ }
413
+ export {};
@@ -0,0 +1,15 @@
1
+ declare const UiEventNames: {
2
+ Base: {
3
+ SelectComponent: string;
4
+ };
5
+ EntityForm: {
6
+ createdEntitySavers: string;
7
+ onSubmitted: string;
8
+ changedFormData: string;
9
+ };
10
+ StateWorkFlow: {
11
+ selectSwfTransfer: string;
12
+ getSwfTitle: string;
13
+ };
14
+ };
15
+ export default UiEventNames;
@@ -0,0 +1,135 @@
1
+ import { PropType, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { EntityReader } from '../../api/EntityDataSource.ts';
3
+ import { IComponentInstance } from '@geelato/gl-types';
4
+ import { ComponentInstance } from '@geelato/gl-ui-schema';
5
+ import { PageCustomType, PagePermission } from '../PageProvideProxy.ts';
6
+ declare const _default: DefineComponent<ExtractPropTypes<{
7
+ parentId: {
8
+ type: (StringConstructor | NumberConstructor)[];
9
+ };
10
+ glComponentInst: {
11
+ type: PropType< IComponentInstance>;
12
+ default(): ComponentInstance;
13
+ };
14
+ glChildren: {
15
+ type: PropType<Array< IComponentInstance>>;
16
+ default(): never[];
17
+ };
18
+ glCtx: {
19
+ type: ObjectConstructor;
20
+ default(): {};
21
+ };
22
+ glIsRuntime: {
23
+ type: BooleanConstructor;
24
+ default(): boolean;
25
+ };
26
+ glRuntimeFlag: {
27
+ type: StringConstructor;
28
+ default(): string;
29
+ };
30
+ glIndex: {
31
+ type: NumberConstructor;
32
+ };
33
+ glLoopItem: ObjectConstructor;
34
+ glLoopIndex: NumberConstructor;
35
+ glIgnoreInjectPageProxy: {
36
+ type: BooleanConstructor;
37
+ default(): boolean;
38
+ };
39
+ componentStoreId: {
40
+ type: StringConstructor;
41
+ default(): string;
42
+ };
43
+ pageCustom: PropType< PageCustomType>;
44
+ pagePermission: PropType< PagePermission>;
45
+ glDoAction: {
46
+ type: FunctionConstructor;
47
+ required: boolean;
48
+ };
49
+ type: {
50
+ type: StringConstructor;
51
+ default(): string;
52
+ };
53
+ label: StringConstructor;
54
+ hideLabel: BooleanConstructor;
55
+ subText: StringConstructor;
56
+ titleProps: ObjectConstructor;
57
+ legend: ObjectConstructor;
58
+ entityReader: {
59
+ type: PropType<EntityReader>;
60
+ required: true;
61
+ };
62
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
63
+ "update:modelValue": (...args: any[]) => void;
64
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
65
+ parentId: {
66
+ type: (StringConstructor | NumberConstructor)[];
67
+ };
68
+ glComponentInst: {
69
+ type: PropType< IComponentInstance>;
70
+ default(): ComponentInstance;
71
+ };
72
+ glChildren: {
73
+ type: PropType<Array< IComponentInstance>>;
74
+ default(): never[];
75
+ };
76
+ glCtx: {
77
+ type: ObjectConstructor;
78
+ default(): {};
79
+ };
80
+ glIsRuntime: {
81
+ type: BooleanConstructor;
82
+ default(): boolean;
83
+ };
84
+ glRuntimeFlag: {
85
+ type: StringConstructor;
86
+ default(): string;
87
+ };
88
+ glIndex: {
89
+ type: NumberConstructor;
90
+ };
91
+ glLoopItem: ObjectConstructor;
92
+ glLoopIndex: NumberConstructor;
93
+ glIgnoreInjectPageProxy: {
94
+ type: BooleanConstructor;
95
+ default(): boolean;
96
+ };
97
+ componentStoreId: {
98
+ type: StringConstructor;
99
+ default(): string;
100
+ };
101
+ pageCustom: PropType< PageCustomType>;
102
+ pagePermission: PropType< PagePermission>;
103
+ glDoAction: {
104
+ type: FunctionConstructor;
105
+ required: boolean;
106
+ };
107
+ type: {
108
+ type: StringConstructor;
109
+ default(): string;
110
+ };
111
+ label: StringConstructor;
112
+ hideLabel: BooleanConstructor;
113
+ subText: StringConstructor;
114
+ titleProps: ObjectConstructor;
115
+ legend: ObjectConstructor;
116
+ entityReader: {
117
+ type: PropType<EntityReader>;
118
+ required: true;
119
+ };
120
+ }>> & Readonly<{
121
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
122
+ }>, {
123
+ type: string;
124
+ glComponentInst: IComponentInstance;
125
+ glChildren: IComponentInstance[];
126
+ glCtx: Record<string, any>;
127
+ glIsRuntime: boolean;
128
+ glRuntimeFlag: string;
129
+ glIgnoreInjectPageProxy: boolean;
130
+ componentStoreId: string;
131
+ hideLabel: boolean;
132
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
133
+ glChart: HTMLDivElement;
134
+ }, HTMLDivElement>;
135
+ export default _default;