@oinone/kunlun-meta 6.4.2 → 7.1.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 (92) hide show
  1. package/dist/oinone-kunlun-meta.esm.js +56 -70
  2. package/dist/types/index.d.ts +1 -1
  3. package/dist/types/src/element/ActionElement.d.ts +15 -15
  4. package/dist/types/src/element/ApiElement.d.ts +21 -21
  5. package/dist/types/src/element/ClearElement.d.ts +9 -9
  6. package/dist/types/src/element/ConfigElement.d.ts +6 -6
  7. package/dist/types/src/element/ContextElement.d.ts +9 -9
  8. package/dist/types/src/element/CustomElement.d.ts +7 -7
  9. package/dist/types/src/element/FieldElement.d.ts +25 -25
  10. package/dist/types/src/element/IBaseElement.d.ts +5 -5
  11. package/dist/types/src/element/PropElement.d.ts +6 -6
  12. package/dist/types/src/element/RequestElement.d.ts +9 -9
  13. package/dist/types/src/element/ResponseElement.d.ts +9 -9
  14. package/dist/types/src/element/SubscribeElement.d.ts +9 -9
  15. package/dist/types/src/element/ValidationElement.d.ts +12 -12
  16. package/dist/types/src/element/ViewElement.d.ts +15 -15
  17. package/dist/types/src/element/WidgetElement.d.ts +23 -23
  18. package/dist/types/src/element/index.d.ts +14 -14
  19. package/dist/types/src/global-config/index.d.ts +2 -2
  20. package/dist/types/src/global-config/runtime-config.d.ts +14 -14
  21. package/dist/types/src/global-config/type.d.ts +26 -26
  22. package/dist/types/src/index.d.ts +5 -5
  23. package/dist/types/src/metadata/constant/config.d.ts +1 -1
  24. package/dist/types/src/metadata/constant/index.d.ts +2 -2
  25. package/dist/types/src/metadata/constant/module-name.d.ts +24 -24
  26. package/dist/types/src/metadata/fragment/action.d.ts +6 -6
  27. package/dist/types/src/metadata/fragment/field.d.ts +2 -2
  28. package/dist/types/src/metadata/fragment/func.d.ts +2 -2
  29. package/dist/types/src/metadata/fragment/index.d.ts +13 -13
  30. package/dist/types/src/metadata/fragment/menu.d.ts +2 -2
  31. package/dist/types/src/metadata/fragment/model.d.ts +2 -2
  32. package/dist/types/src/metadata/fragment/page.d.ts +2 -2
  33. package/dist/types/src/metadata/index.d.ts +4 -4
  34. package/dist/types/src/metadata/runtime-fragment/action.d.ts +8 -8
  35. package/dist/types/src/metadata/runtime-fragment/function.d.ts +3 -3
  36. package/dist/types/src/metadata/runtime-fragment/index.d.ts +20 -20
  37. package/dist/types/src/metadata/runtime-fragment/model.d.ts +2 -2
  38. package/dist/types/src/metadata/runtime-fragment/module.d.ts +2 -2
  39. package/dist/types/src/metadata/runtime-fragment/view.d.ts +6 -6
  40. package/dist/types/src/metadata/types/dsl-node.d.ts +12 -12
  41. package/dist/types/src/metadata/types/enumeration.d.ts +18 -18
  42. package/dist/types/src/metadata/types/index.d.ts +8 -8
  43. package/dist/types/src/metadata/types/layout.d.ts +4 -4
  44. package/dist/types/src/metadata/types/model.d.ts +584 -584
  45. package/dist/types/src/metadata/types/tag.d.ts +23 -23
  46. package/dist/types/src/metadata/types/user.d.ts +22 -22
  47. package/dist/types/src/metadata/types/value.d.ts +3 -3
  48. package/dist/types/src/metadata/types/view.d.ts +170 -170
  49. package/dist/types/src/plugin-loader/factory/PluginLoaderFactory.d.ts +4 -4
  50. package/dist/types/src/plugin-loader/factory/index.d.ts +1 -1
  51. package/dist/types/src/plugin-loader/index.d.ts +5 -5
  52. package/dist/types/src/plugin-loader/loader/CJSPluginLoader.d.ts +7 -7
  53. package/dist/types/src/plugin-loader/loader/CSSPluginLoader.d.ts +7 -7
  54. package/dist/types/src/plugin-loader/loader/ESMPluginLoader.d.ts +7 -7
  55. package/dist/types/src/plugin-loader/loader/IIFEPluginLoader.d.ts +7 -7
  56. package/dist/types/src/plugin-loader/loader/LoadedEvent.d.ts +4 -4
  57. package/dist/types/src/plugin-loader/loader/PluginLoader.d.ts +5 -5
  58. package/dist/types/src/plugin-loader/loader/RemotePluginLoader.d.ts +5 -5
  59. package/dist/types/src/plugin-loader/loader/UMDPluginLoader.d.ts +6 -6
  60. package/dist/types/src/plugin-loader/loader/index.d.ts +1 -1
  61. package/dist/types/src/plugin-loader/typing/index.d.ts +2 -2
  62. package/dist/types/src/plugin-loader/typing/load-option.d.ts +48 -48
  63. package/dist/types/src/plugin-loader/typing/loader-config.d.ts +38 -38
  64. package/dist/types/src/plugin-loader/util/PluginLoadHelper.d.ts +7 -7
  65. package/dist/types/src/plugin-loader/util/index.d.ts +1 -1
  66. package/dist/types/src/util/element.d.ts +16 -16
  67. package/dist/types/src/util/field.d.ts +9 -9
  68. package/dist/types/src/util/helper.d.ts +2 -2
  69. package/dist/types/src/util/index.d.ts +6 -6
  70. package/dist/types/src/util/ke-common.d.ts +6 -6
  71. package/dist/types/src/util/lang.d.ts +4 -4
  72. package/dist/types/src/util/validation-utils.d.ts +3 -3
  73. package/package.json +19 -8
  74. package/src/element/SubscribeElement.ts +1 -1
  75. package/src/global-config/runtime-config.ts +1 -1
  76. package/src/metadata/runtime-fragment/index.ts +1 -10
  77. package/src/metadata/types/model.ts +2 -2
  78. package/src/metadata/types/view.ts +1 -1
  79. package/src/plugin-loader/factory/PluginLoaderFactory.ts +1 -1
  80. package/src/plugin-loader/index.ts +1 -1
  81. package/src/plugin-loader/loader/CJSPluginLoader.ts +1 -1
  82. package/src/plugin-loader/loader/CSSPluginLoader.ts +1 -1
  83. package/src/plugin-loader/loader/ESMPluginLoader.ts +1 -1
  84. package/src/plugin-loader/loader/IIFEPluginLoader.ts +1 -1
  85. package/src/plugin-loader/loader/PluginLoader.ts +1 -1
  86. package/src/plugin-loader/loader/RemotePluginLoader.ts +1 -1
  87. package/src/plugin-loader/loader/UMDPluginLoader.ts +1 -1
  88. package/src/plugin-loader/typing/loader-config.ts +1 -1
  89. package/src/plugin-loader/util/PluginLoadHelper.ts +1 -1
  90. package/src/util/element.ts +2 -12
  91. package/src/util/field.ts +1 -1
  92. package/rollup.config.js +0 -4
@@ -1,584 +1,584 @@
1
- import { BIGINT, EntityId } from './value';
2
- import { IView, SystemSource, ViewActionTarget, ViewType } from './view';
3
- export declare type ModelId = EntityId;
4
- export interface IModel {
5
- id: ModelId;
6
- pk: string[];
7
- model: string;
8
- name: string;
9
- type: ModelType;
10
- module?: string;
11
- moduleName: string;
12
- modelFields: IModelField[];
13
- displayName?: string;
14
- labelFields?: string[];
15
- label?: string;
16
- progressField?: string;
17
- masterFieldStr?: string;
18
- progressFieldStr?: string;
19
- viewActionList?: IViewAction[];
20
- serverActionList?: IServerAction[];
21
- urlActionList?: IURLAction[];
22
- clientActionList?: IClientAction[];
23
- functions?: IModelFunc[];
24
- modelActions?: (IClientAction | IURLAction | IServerAction | IViewAction)[];
25
- viewList?: IView[];
26
- uniqueList?: {
27
- fieldList: IModelField[];
28
- fields: string;
29
- }[];
30
- uniques?: string[];
31
- indexes?: string[];
32
- indexList?: {
33
- fieldList: IModelField[];
34
- fields: string[];
35
- }[];
36
- ordering?: string;
37
- attributes?: {
38
- requiredCondition?: string;
39
- invisibleCondition?: string;
40
- readonlyCondition?: string;
41
- layoutGrid: number;
42
- layoutGroup: string;
43
- };
44
- }
45
- export declare enum ModelType {
46
- STORE = "STORE",
47
- TRANSIENT = "TRANSIENT",
48
- ABSTRACT = "ABSTRACT",
49
- PROXY = "PROXY",
50
- CLIENT = "CLIENT"
51
- }
52
- export declare enum ModelFieldType {
53
- String = "STRING",
54
- Text = "TEXT",
55
- /**
56
- * @deprecated please using {@link ModelFieldType#Html}
57
- */
58
- HTML = "HTML",
59
- Html = "HTML",
60
- Phone = "PHONE",
61
- Email = "EMAIL",
62
- Integer = "INTEGER",
63
- Long = "LONG",
64
- Float = "FLOAT",
65
- Currency = "MONEY",
66
- DateTime = "DATETIME",
67
- Date = "DATE",
68
- Time = "TIME",
69
- Year = "YEAR",
70
- Boolean = "BOOLEAN",
71
- Enum = "ENUM",
72
- Map = "MAP",
73
- Related = "RELATED",
74
- OneToOne = "O2O",
75
- OneToMany = "O2M",
76
- ManyToOne = "M2O",
77
- ManyToMany = "M2M",
78
- OBJ = "OBJ",
79
- /**
80
- * @deprecated 已废弃
81
- */
82
- ID = "ID",
83
- /**
84
- * @deprecated 已废弃
85
- */
86
- Null = "NULL",
87
- /**
88
- * @deprecated 已废弃
89
- */
90
- UID = "UID",
91
- /**
92
- * @deprecated 已废弃
93
- */
94
- MultiEnum = "MULTI_ENUM"
95
- }
96
- export declare const ModelFieldTypeDisplayName: {
97
- ID: string;
98
- NULL: string;
99
- INTEGER: string;
100
- LONG: string;
101
- FLOAT: string;
102
- BOOLEAN: string;
103
- STRING: string;
104
- TEXT: string;
105
- DATETIME: string;
106
- DATE: string;
107
- TIME: string;
108
- YEAR: string;
109
- HTML: string;
110
- MONEY: string;
111
- ENUM: string;
112
- MULTI_ENUM: string;
113
- O2O: string;
114
- O2M: string;
115
- M2O: string;
116
- M2M: string;
117
- RELATED: string;
118
- MAP: string;
119
- UID: string;
120
- PHONE: string;
121
- EMAIL: string;
122
- };
123
- export declare const ModelFieldTypeOptions: {
124
- label: string;
125
- value: string;
126
- }[];
127
- export declare enum ModelFieldSerializeType {
128
- NON = "NON",
129
- JSON = "JSON",
130
- COMMA = "COMMA",
131
- BIT = "BIT",
132
- DOT = "DOT"
133
- }
134
- export interface IModelField {
135
- id: string;
136
- data?: string;
137
- name: string;
138
- viewIndex: string;
139
- limit: number;
140
- load: string;
141
- loadType: LoadType;
142
- loadApi: string;
143
- ttype: ModelFieldType;
144
- model: string;
145
- modelId: ModelId;
146
- displayName?: string;
147
- max?: string;
148
- min?: string;
149
- sys?: boolean;
150
- systemSource?: SystemSource;
151
- size?: number;
152
- decimal?: number;
153
- options?: IModelFieldOption[];
154
- index?: boolean;
155
- unique?: boolean;
156
- translate?: boolean;
157
- label?: string;
158
- /**
159
- * 关联的对方模型,原来的 relation
160
- */
161
- references?: string;
162
- /**
163
- * m2m 关联关系的模型
164
- */
165
- through?: string;
166
- /**
167
- * 关系字段,自身模型的关联字段
168
- */
169
- relationFields?: string[];
170
- /**
171
- * 关联字段,关联模型的关联字段
172
- */
173
- referenceFields?: string[];
174
- /**
175
- * 中间模型里当前模型的关联字段
176
- */
177
- throughRelationFields?: string[];
178
- /**
179
- * 中间模型里关联模型的关联字段
180
- */
181
- throughReferenceFields?: string[];
182
- invisible?: boolean | string;
183
- priority?: BIGINT;
184
- compute?: string;
185
- relatedTtype?: ModelFieldType;
186
- widget?: string;
187
- field?: string;
188
- sortable?: boolean;
189
- hint?: string;
190
- patternType?: string;
191
- pattern?: string;
192
- validation?: string;
193
- tips?: string;
194
- independentlyEditable?: boolean;
195
- related: string[];
196
- store?: boolean;
197
- relationStore?: boolean;
198
- storeSerialize?: ModelFieldSerializeType;
199
- domain?: string;
200
- isUnique?: boolean;
201
- required?: boolean | string;
202
- requiredTips?: string;
203
- domainSize?: string;
204
- readonly?: boolean;
205
- multi: boolean;
206
- format: string;
207
- defaultValue: string;
208
- attributes?: {
209
- requiredCondition?: string;
210
- invisibleCondition?: string;
211
- readonlyCondition?: string;
212
- layoutGrid: number;
213
- layoutGroup: string;
214
- layoutTab: string;
215
- layoutTabs: string;
216
- };
217
- modelFields: IModelField[];
218
- }
219
- export declare enum EnumOptionState {
220
- ACTIVE = "ACTIVE",
221
- INACTIVE = "INACTIVE"
222
- }
223
- export interface IModelFieldOption {
224
- name: string;
225
- value: string;
226
- state: EnumOptionState;
227
- displayName?: string;
228
- color?: string;
229
- backgroundColor?: string;
230
- icon?: string;
231
- label?: string;
232
- invisible?: boolean;
233
- isDefault?: boolean;
234
- hint?: string;
235
- thumbnail?: string;
236
- }
237
- export declare function isRelationTtype(ttype: ModelFieldType): boolean;
238
- export declare function isToOneTtype(ttype: ModelFieldType): boolean;
239
- export declare function isToManyTtype(ttype: ModelFieldType): boolean;
240
- export declare function isRelatedTtype(ttype: ModelFieldType): boolean;
241
- export interface IModule {
242
- id: string;
243
- name: string;
244
- module: string;
245
- displayName?: string;
246
- logo: string;
247
- homePage: IViewAction;
248
- allMenus: IMenu[];
249
- priority: number;
250
- application: boolean;
251
- like: boolean;
252
- urlHomePage?: IURLAction;
253
- }
254
- export interface IMenu {
255
- id: string;
256
- name: string;
257
- displayName: string;
258
- parentName: string;
259
- icon?: string;
260
- parent?: IMenu;
261
- priority: number;
262
- moduleDefinition: {
263
- id: string;
264
- name: string;
265
- displayName: string;
266
- };
267
- actionType?: ActionType;
268
- viewAction?: IViewAction;
269
- serverAction?: IServerAction;
270
- urlAction?: IURLAction;
271
- children?: Array<IMenu>;
272
- mapping?: Record<string, unknown>;
273
- context?: Record<string, unknown>;
274
- }
275
- /**
276
- * 请求类型
277
- */
278
- export declare enum ApiProtocol {
279
- GRAPHQL = "graphql",
280
- RESTFUL = "restful"
281
- }
282
- /**
283
- * 内容数据的类型
284
- */
285
- export declare enum DataType {
286
- PRIMITIVE = "primitive",
287
- OBJECT = "object",
288
- LIST = "list"
289
- }
290
- /**
291
- * 加载的函数类型
292
- */
293
- export declare enum LoadType {
294
- CLIENT = "client",
295
- SERVER = "server"
296
- }
297
- /**
298
- * 校验类型
299
- */
300
- export declare enum ValidationScope {
301
- CLIENT = "client",
302
- SERVER = "server",
303
- BOTH = "both"
304
- }
305
- /**
306
- * 查询类型
307
- * 不使用queryPage接口,直传当前选中行数据(对象object或者列表list,默认是domain)
308
- * 默认值:DOMAIN
309
- */
310
- export declare enum QueryType {
311
- DOMAIN = "domain",
312
- OBJECT = "object",
313
- LIST = "list"
314
- }
315
- interface IModelFuncArg {
316
- name: string;
317
- ttype: ModelFieldType;
318
- }
319
- export interface IModelFunc {
320
- method: string;
321
- name: string;
322
- fun: string;
323
- argumentList: IModelFuncArg[];
324
- type: 'CREATE' | 'DELETE' | 'UPDATE' | 'QUERY'[];
325
- }
326
- export declare enum ActionType {
327
- Server = "SERVER",
328
- View = "VIEW",
329
- URL = "URL",
330
- Client = "CLIENT",
331
- Model = "model",
332
- Composition = "COMPOSITION",
333
- Custom = "custom"
334
- }
335
- export declare enum ActionContextType {
336
- Single = "SINGLE",
337
- Batch = "BATCH",
338
- SingleAndBatch = "SINGLE_AND_BATCH",
339
- ContextFree = "CONTEXT_FREE"
340
- }
341
- /**
342
- * @deprecated please using string
343
- */
344
- export declare type ActionId = EntityId;
345
- export interface IBaseAbstractAction {
346
- title?: string;
347
- displayName?: string;
348
- label?: string;
349
- model?: string;
350
- /**
351
- * @deprecated
352
- */
353
- rule?: string;
354
- invisible?: string;
355
- }
356
- export interface IBaseAction extends IBaseAbstractAction {
357
- id: string;
358
- name: string;
359
- model: string;
360
- modelDefinition?: IModel;
361
- bindingType: string[];
362
- bindingViewName?: string;
363
- actionType: ActionType;
364
- contextType: ActionContextType;
365
- usageDesc?: string;
366
- groups?: any[];
367
- builtIn?: boolean;
368
- skipCheck?: boolean;
369
- config?: Record<string, unknown>;
370
- confirm?: string;
371
- priority?: number;
372
- sessionPath?: string;
373
- }
374
- export interface ViewActionPage {
375
- layoutTemplate: string;
376
- name: string;
377
- model: string;
378
- id: EntityId;
379
- active: boolean;
380
- viewList: IView[];
381
- }
382
- export interface IViewAction extends IBaseAction {
383
- actionType: ActionType.View;
384
- target: ViewActionTarget;
385
- resModel: string;
386
- resModelDefinition?: IModel;
387
- resViewName: string;
388
- bindingViewName?: string;
389
- queryType?: QueryType;
390
- apiProtocol?: ApiProtocol;
391
- viewMode?: string;
392
- viewType: ViewType;
393
- dataType?: DataType;
394
- domain?: string;
395
- filter?: string;
396
- load?: string;
397
- loadFunction?: IModelFunc;
398
- context?: Record<string, unknown>;
399
- moduleName: string;
400
- page?: ViewActionPage;
401
- resView?: IView;
402
- module: string;
403
- resModule?: string;
404
- resModuleName?: string;
405
- resModuleDefinition?: IModule;
406
- moduleDefinition?: IModule;
407
- maskDefinition?: {
408
- name: string;
409
- template: string;
410
- };
411
- theme?: string;
412
- }
413
- export interface ISharedViewAction extends IViewAction {
414
- sharedCode: string;
415
- authorizationCode: string;
416
- sharedParameters: string;
417
- browserTitle?: string;
418
- language?: string;
419
- languageIsoCode?: string;
420
- }
421
- export interface IServerAction extends IBaseAction {
422
- actionType: ActionType.Server;
423
- functionDefinition: IModelFunc;
424
- function: IModelFunc;
425
- module: string;
426
- }
427
- export declare enum ActionFunctionType {
428
- JAVA = "JAVA",
429
- JS = "JS",
430
- GROOVY = "GROOVY"
431
- }
432
- export interface IURLAction extends IBaseAction {
433
- url: string;
434
- compute?: string;
435
- target: ViewActionTarget;
436
- confirm?: string;
437
- module: string;
438
- context: Record<string, unknown>;
439
- }
440
- export interface IModelAction extends IBaseAction {
441
- actionType: ActionType.Model;
442
- type: ModelActionType;
443
- domain?: string;
444
- }
445
- export declare enum ModelActionType {
446
- FindOne = "FindOne",
447
- FindList = "FindList",
448
- FindAll = "FindAll",
449
- InsertOne = "InsertOne",
450
- UpdateOne = "UpdateOne",
451
- DeleteOne = "DeleteOne",
452
- DeleteOneInline = "DeleteOneInline",
453
- UpdateList = "UpdateList",
454
- DeleteList = "DeleteList"
455
- }
456
- export interface IClientAction extends IBaseAbstractAction {
457
- actionType: ActionType.Client;
458
- name: ClientActionName | string;
459
- bindingType?: string[];
460
- id?: string;
461
- contextType: ActionContextType;
462
- confirm?: string;
463
- priority?: number;
464
- tag?: string;
465
- fun?: string;
466
- }
467
- export declare enum IActionTag {
468
- ContextAction = "contextFreeAction",
469
- SingleAction = "singleAction",
470
- FooterAction = "footer"
471
- }
472
- export declare enum ClientActionName {
473
- ValidateForm = "validateForm",
474
- UpdateContext = "updateContext",
475
- ShowDialog = "showDialog",
476
- SubmitDialog = "submitDialog",
477
- CloseDialog = "closeDialog",
478
- InsertEmptyItemToList = "insertEmptyItemToList",
479
- InsertEmptyItemToBefore = "insertEmptyItemToBefore",
480
- InsertEmptyItemToAfter = "insertEmptyItemToAfter",
481
- DeleteListItem = "deleteListItem",
482
- ReloadData = "reloadData",
483
- CopyText = "copyText",
484
- Confirm = "confirm",
485
- StartCreate = "startCreate",
486
- StartInlineEdit = "startInlineEdit",
487
- SubmitInlineEdit = "submitInlineEdit",
488
- CancelInlineEdit = "cancelInlineEdit",
489
- HistoryBack = "historyBack",
490
- O2MCreateForm = "O2MCreateForm",
491
- O2MEditForm = "O2MEditForm",
492
- O2MDelete = "O2MDelete",
493
- O2MCreateFormConfirm = "O2MCreateFormConfirm",
494
- O2MEditFormConfirm = "O2MEditFormConfirm",
495
- M2MCreateTable = "M2MCreateTable",
496
- M2MDelete = "M2MDelete",
497
- M2MCreateTableConfirm = "M2MCreateTableConfirm",
498
- O2MCloseForm = "O2MCloseForm"
499
- }
500
- export declare enum ModelDefaultActionName {
501
- create = "create",
502
- update = "update",
503
- delete = "delete",
504
- redirectDetailPage = "redirectDetailPage",
505
- redirectCreatePage = "redirectCreatePage",
506
- redirectUpdatePage = "redirectUpdatePage",
507
- $$internal_AddOne = "$$internal_AddOne",
508
- $$internal_EditOne = "$$internal_EditOne",
509
- $$internal_CopyOne = "$$internal_CopyOne",
510
- $$internal_DeleteOne = "$$internal_DeleteOne",
511
- $$internal_ListInsertOneAndBackToList = "$$internal_ListInsertOneAndBackToList",
512
- $$internal_ListUpdateOneAndBackToList = "$$internal_ListUpdateOneAndBackToList",
513
- $$internal_GotoListImportDialog = "$$internal_GotoListImportDialog",
514
- $$internal_GotoListExportDialog = "$$internal_GotoListExportDialog",
515
- $$internal_GotoListTableRouter = "$$internal_GotoListTableRouter",
516
- $$internal_DialogCancel = "$$internal_DialogCancel",
517
- $$internal_GotoO2MCreateDialog = "$$internal_GotoO2MCreateDialog",
518
- $$internal_GotoO2MEditDialog = "$$internal_GotoO2MEditDialog",
519
- $$internal_O2MUpdateOneAndSubmitDialog = "$$internal_O2MUpdateOneAndSubmitDialog",
520
- $$internal_O2MDeleteOne = "$$internal_O2MDeleteOne",
521
- $$internal_DialogSubmit = "$$internal_DialogSubmit",
522
- $$internal_O2MInsertOneAndSubmitDialog = "$$internal_O2MInsertOneAndSubmitDialog",
523
- $$internal_ListUpdateAndCloseDialogReloadOpenerAction = "$$internal_ListUpdateAndCloseDialogReloadOpenerAction",
524
- $$internal_ListInsertOneAndCloseDialog = "$$internal_ListInsertOneAndCloseDialog",
525
- $$internal_GotoM2MListDialog = "$$internal_GotoM2MListDialog",
526
- $$internal_ReloadData = "$$internal_ReloadData",
527
- $$internal_ValidateForm = "$$internal_ValidateForm",
528
- /**
529
- * 保存草稿动作
530
- */
531
- $$internal_SaveDraft = "$$internal_SaveDraft",
532
- $$internal_Download = "$$internal_Download",
533
- /**
534
- * 批量更新
535
- */
536
- $$internal_BatchUpdate = "$$internal_BatchUpdate",
537
- /**
538
- * 下载导入模板
539
- */
540
- $$internal_DownloadImportWorkbook = "$$internal_DownloadImportWorkbook",
541
- /**
542
- * 导入
543
- */
544
- $$internal_ImportWorkbook = "$$internal_ImportWorkbook",
545
- /**
546
- * 导出
547
- */
548
- $$internal_ExportWorkbook = "$$internal_ExportWorkbook",
549
- /**
550
- * 打印
551
- */
552
- $$internal_PrintPdfDocument = "$$internal_PrintPdfDocument"
553
- }
554
- export declare const ModelDefaultActionNames: string[];
555
- export declare enum ActionCompositionType {
556
- Sequential = "sequential",
557
- Parallel = "parallel",
558
- ForkJoin = "fork-join",
559
- Race = "race"
560
- }
561
- export interface ICompositionAction extends IBaseAbstractAction {
562
- actionType: ActionType.Composition;
563
- name: ClientActionName | string;
564
- type?: ActionCompositionType;
565
- bindingType?: ViewType[];
566
- contextType?: ActionContextType;
567
- confirm?: string;
568
- id?: string;
569
- priority?: number;
570
- tag?: string;
571
- }
572
- export declare type ActionRuleId = EntityId;
573
- export interface ICustomAction extends IBaseAction {
574
- actionType: ActionType.Custom;
575
- code: string;
576
- }
577
- export declare type CustomActionExecutor = (action: ICustomAction, vm: any, context: any) => any | Promise<any>;
578
- export declare type IAction = IViewAction | IServerAction | IURLAction | IClientAction | ICompositionAction;
579
- export declare enum ActionValidationScope {
580
- Client = "client",
581
- Server = "server",
582
- Both = "both"
583
- }
584
- export {};
1
+ import type { BIGINT, EntityId } from './value';
2
+ import { type IView, SystemSource, ViewActionTarget, ViewType } from './view';
3
+ export type ModelId = EntityId;
4
+ export interface IModel {
5
+ id: ModelId;
6
+ pk: string[];
7
+ model: string;
8
+ name: string;
9
+ type: ModelType;
10
+ module?: string;
11
+ moduleName: string;
12
+ modelFields: IModelField[];
13
+ displayName?: string;
14
+ labelFields?: string[];
15
+ label?: string;
16
+ progressField?: string;
17
+ masterFieldStr?: string;
18
+ progressFieldStr?: string;
19
+ viewActionList?: IViewAction[];
20
+ serverActionList?: IServerAction[];
21
+ urlActionList?: IURLAction[];
22
+ clientActionList?: IClientAction[];
23
+ functions?: IModelFunc[];
24
+ modelActions?: (IClientAction | IURLAction | IServerAction | IViewAction)[];
25
+ viewList?: IView[];
26
+ uniqueList?: {
27
+ fieldList: IModelField[];
28
+ fields: string;
29
+ }[];
30
+ uniques?: string[];
31
+ indexes?: string[];
32
+ indexList?: {
33
+ fieldList: IModelField[];
34
+ fields: string[];
35
+ }[];
36
+ ordering?: string;
37
+ attributes?: {
38
+ requiredCondition?: string;
39
+ invisibleCondition?: string;
40
+ readonlyCondition?: string;
41
+ layoutGrid: number;
42
+ layoutGroup: string;
43
+ };
44
+ }
45
+ export declare enum ModelType {
46
+ STORE = "STORE",
47
+ TRANSIENT = "TRANSIENT",
48
+ ABSTRACT = "ABSTRACT",
49
+ PROXY = "PROXY",
50
+ CLIENT = "CLIENT"
51
+ }
52
+ export declare enum ModelFieldType {
53
+ String = "STRING",
54
+ Text = "TEXT",
55
+ /**
56
+ * @deprecated please using {@link ModelFieldType#Html}
57
+ */
58
+ HTML = "HTML",
59
+ Html = "HTML",
60
+ Phone = "PHONE",
61
+ Email = "EMAIL",
62
+ Integer = "INTEGER",
63
+ Long = "LONG",
64
+ Float = "FLOAT",
65
+ Currency = "MONEY",
66
+ DateTime = "DATETIME",
67
+ Date = "DATE",
68
+ Time = "TIME",
69
+ Year = "YEAR",
70
+ Boolean = "BOOLEAN",
71
+ Enum = "ENUM",
72
+ Map = "MAP",
73
+ Related = "RELATED",
74
+ OneToOne = "O2O",
75
+ OneToMany = "O2M",
76
+ ManyToOne = "M2O",
77
+ ManyToMany = "M2M",
78
+ OBJ = "OBJ",
79
+ /**
80
+ * @deprecated 已废弃
81
+ */
82
+ ID = "ID",
83
+ /**
84
+ * @deprecated 已废弃
85
+ */
86
+ Null = "NULL",
87
+ /**
88
+ * @deprecated 已废弃
89
+ */
90
+ UID = "UID",
91
+ /**
92
+ * @deprecated 已废弃
93
+ */
94
+ MultiEnum = "MULTI_ENUM"
95
+ }
96
+ export declare const ModelFieldTypeDisplayName: {
97
+ ID: string;
98
+ NULL: string;
99
+ INTEGER: string;
100
+ LONG: string;
101
+ FLOAT: string;
102
+ BOOLEAN: string;
103
+ STRING: string;
104
+ TEXT: string;
105
+ DATETIME: string;
106
+ DATE: string;
107
+ TIME: string;
108
+ YEAR: string;
109
+ HTML: string;
110
+ MONEY: string;
111
+ ENUM: string;
112
+ MULTI_ENUM: string;
113
+ O2O: string;
114
+ O2M: string;
115
+ M2O: string;
116
+ M2M: string;
117
+ RELATED: string;
118
+ MAP: string;
119
+ UID: string;
120
+ PHONE: string;
121
+ EMAIL: string;
122
+ };
123
+ export declare const ModelFieldTypeOptions: {
124
+ label: string;
125
+ value: string;
126
+ }[];
127
+ export declare enum ModelFieldSerializeType {
128
+ NON = "NON",
129
+ JSON = "JSON",
130
+ COMMA = "COMMA",
131
+ BIT = "BIT",
132
+ DOT = "DOT"
133
+ }
134
+ export interface IModelField {
135
+ id: string;
136
+ data?: string;
137
+ name: string;
138
+ viewIndex: string;
139
+ limit: number;
140
+ load: string;
141
+ loadType: LoadType;
142
+ loadApi: string;
143
+ ttype: ModelFieldType;
144
+ model: string;
145
+ modelId: ModelId;
146
+ displayName?: string;
147
+ max?: string;
148
+ min?: string;
149
+ sys?: boolean;
150
+ systemSource?: SystemSource;
151
+ size?: number;
152
+ decimal?: number;
153
+ options?: IModelFieldOption[];
154
+ index?: boolean;
155
+ unique?: boolean;
156
+ translate?: boolean;
157
+ label?: string;
158
+ /**
159
+ * 关联的对方模型,原来的 relation
160
+ */
161
+ references?: string;
162
+ /**
163
+ * m2m 关联关系的模型
164
+ */
165
+ through?: string;
166
+ /**
167
+ * 关系字段,自身模型的关联字段
168
+ */
169
+ relationFields?: string[];
170
+ /**
171
+ * 关联字段,关联模型的关联字段
172
+ */
173
+ referenceFields?: string[];
174
+ /**
175
+ * 中间模型里当前模型的关联字段
176
+ */
177
+ throughRelationFields?: string[];
178
+ /**
179
+ * 中间模型里关联模型的关联字段
180
+ */
181
+ throughReferenceFields?: string[];
182
+ invisible?: boolean | string;
183
+ priority?: BIGINT;
184
+ compute?: string;
185
+ relatedTtype?: ModelFieldType;
186
+ widget?: string;
187
+ field?: string;
188
+ sortable?: boolean;
189
+ hint?: string;
190
+ patternType?: string;
191
+ pattern?: string;
192
+ validation?: string;
193
+ tips?: string;
194
+ independentlyEditable?: boolean;
195
+ related: string[];
196
+ store?: boolean;
197
+ relationStore?: boolean;
198
+ storeSerialize?: ModelFieldSerializeType;
199
+ domain?: string;
200
+ isUnique?: boolean;
201
+ required?: boolean | string;
202
+ requiredTips?: string;
203
+ domainSize?: string;
204
+ readonly?: boolean;
205
+ multi: boolean;
206
+ format: string;
207
+ defaultValue: string;
208
+ attributes?: {
209
+ requiredCondition?: string;
210
+ invisibleCondition?: string;
211
+ readonlyCondition?: string;
212
+ layoutGrid: number;
213
+ layoutGroup: string;
214
+ layoutTab: string;
215
+ layoutTabs: string;
216
+ };
217
+ modelFields: IModelField[];
218
+ }
219
+ export declare enum EnumOptionState {
220
+ ACTIVE = "ACTIVE",
221
+ INACTIVE = "INACTIVE"
222
+ }
223
+ export interface IModelFieldOption {
224
+ name: string;
225
+ value: string;
226
+ state: EnumOptionState;
227
+ displayName?: string;
228
+ color?: string;
229
+ backgroundColor?: string;
230
+ icon?: string;
231
+ label?: string;
232
+ invisible?: boolean;
233
+ isDefault?: boolean;
234
+ hint?: string;
235
+ thumbnail?: string;
236
+ }
237
+ export declare function isRelationTtype(ttype: ModelFieldType): boolean;
238
+ export declare function isToOneTtype(ttype: ModelFieldType): boolean;
239
+ export declare function isToManyTtype(ttype: ModelFieldType): boolean;
240
+ export declare function isRelatedTtype(ttype: ModelFieldType): boolean;
241
+ export interface IModule {
242
+ id: string;
243
+ name: string;
244
+ module: string;
245
+ displayName?: string;
246
+ logo: string;
247
+ homePage: IViewAction;
248
+ allMenus: IMenu[];
249
+ priority: number;
250
+ application: boolean;
251
+ like: boolean;
252
+ urlHomePage?: IURLAction;
253
+ }
254
+ export interface IMenu {
255
+ id: string;
256
+ name: string;
257
+ displayName: string;
258
+ parentName: string;
259
+ icon?: string;
260
+ parent?: IMenu;
261
+ priority: number;
262
+ moduleDefinition: {
263
+ id: string;
264
+ name: string;
265
+ displayName: string;
266
+ };
267
+ actionType?: ActionType;
268
+ viewAction?: IViewAction;
269
+ serverAction?: IServerAction;
270
+ urlAction?: IURLAction;
271
+ children?: Array<IMenu>;
272
+ mapping?: Record<string, unknown>;
273
+ context?: Record<string, unknown>;
274
+ }
275
+ /**
276
+ * 请求类型
277
+ */
278
+ export declare enum ApiProtocol {
279
+ GRAPHQL = "graphql",
280
+ RESTFUL = "restful"
281
+ }
282
+ /**
283
+ * 内容数据的类型
284
+ */
285
+ export declare enum DataType {
286
+ PRIMITIVE = "primitive",
287
+ OBJECT = "object",
288
+ LIST = "list"
289
+ }
290
+ /**
291
+ * 加载的函数类型
292
+ */
293
+ export declare enum LoadType {
294
+ CLIENT = "client",
295
+ SERVER = "server"
296
+ }
297
+ /**
298
+ * 校验类型
299
+ */
300
+ export declare enum ValidationScope {
301
+ CLIENT = "client",
302
+ SERVER = "server",
303
+ BOTH = "both"
304
+ }
305
+ /**
306
+ * 查询类型
307
+ * 不使用queryPage接口,直传当前选中行数据(对象object或者列表list,默认是domain)
308
+ * 默认值:DOMAIN
309
+ */
310
+ export declare enum QueryType {
311
+ DOMAIN = "domain",
312
+ OBJECT = "object",
313
+ LIST = "list"
314
+ }
315
+ interface IModelFuncArg {
316
+ name: string;
317
+ ttype: ModelFieldType;
318
+ }
319
+ export interface IModelFunc {
320
+ method: string;
321
+ name: string;
322
+ fun: string;
323
+ argumentList: IModelFuncArg[];
324
+ type: 'CREATE' | 'DELETE' | 'UPDATE' | 'QUERY'[];
325
+ }
326
+ export declare enum ActionType {
327
+ Server = "SERVER",
328
+ View = "VIEW",
329
+ URL = "URL",
330
+ Client = "CLIENT",
331
+ Model = "model",
332
+ Composition = "COMPOSITION",
333
+ Custom = "custom"
334
+ }
335
+ export declare enum ActionContextType {
336
+ Single = "SINGLE",
337
+ Batch = "BATCH",
338
+ SingleAndBatch = "SINGLE_AND_BATCH",
339
+ ContextFree = "CONTEXT_FREE"
340
+ }
341
+ /**
342
+ * @deprecated please using string
343
+ */
344
+ export type ActionId = EntityId;
345
+ export interface IBaseAbstractAction {
346
+ title?: string;
347
+ displayName?: string;
348
+ label?: string;
349
+ model?: string;
350
+ /**
351
+ * @deprecated
352
+ */
353
+ rule?: string;
354
+ invisible?: string;
355
+ }
356
+ export interface IBaseAction extends IBaseAbstractAction {
357
+ id: string;
358
+ name: string;
359
+ model: string;
360
+ modelDefinition?: IModel;
361
+ bindingType: string[];
362
+ bindingViewName?: string;
363
+ actionType: ActionType;
364
+ contextType: ActionContextType;
365
+ usageDesc?: string;
366
+ groups?: any[];
367
+ builtIn?: boolean;
368
+ skipCheck?: boolean;
369
+ config?: Record<string, unknown>;
370
+ confirm?: string;
371
+ priority?: number;
372
+ sessionPath?: string;
373
+ }
374
+ export interface ViewActionPage {
375
+ layoutTemplate: string;
376
+ name: string;
377
+ model: string;
378
+ id: EntityId;
379
+ active: boolean;
380
+ viewList: IView[];
381
+ }
382
+ export interface IViewAction extends IBaseAction {
383
+ actionType: ActionType.View;
384
+ target: ViewActionTarget;
385
+ resModel: string;
386
+ resModelDefinition?: IModel;
387
+ resViewName: string;
388
+ bindingViewName?: string;
389
+ queryType?: QueryType;
390
+ apiProtocol?: ApiProtocol;
391
+ viewMode?: string;
392
+ viewType: ViewType;
393
+ dataType?: DataType;
394
+ domain?: string;
395
+ filter?: string;
396
+ load?: string;
397
+ loadFunction?: IModelFunc;
398
+ context?: Record<string, unknown>;
399
+ moduleName: string;
400
+ page?: ViewActionPage;
401
+ resView?: IView;
402
+ module: string;
403
+ resModule?: string;
404
+ resModuleName?: string;
405
+ resModuleDefinition?: IModule;
406
+ moduleDefinition?: IModule;
407
+ maskDefinition?: {
408
+ name: string;
409
+ template: string;
410
+ };
411
+ theme?: string;
412
+ }
413
+ export interface ISharedViewAction extends IViewAction {
414
+ sharedCode: string;
415
+ authorizationCode: string;
416
+ sharedParameters: string;
417
+ browserTitle?: string;
418
+ language?: string;
419
+ languageIsoCode?: string;
420
+ }
421
+ export interface IServerAction extends IBaseAction {
422
+ actionType: ActionType.Server;
423
+ functionDefinition: IModelFunc;
424
+ function: IModelFunc;
425
+ module: string;
426
+ }
427
+ export declare enum ActionFunctionType {
428
+ JAVA = "JAVA",
429
+ JS = "JS",
430
+ GROOVY = "GROOVY"
431
+ }
432
+ export interface IURLAction extends IBaseAction {
433
+ url: string;
434
+ compute?: string;
435
+ target: ViewActionTarget;
436
+ confirm?: string;
437
+ module: string;
438
+ context: Record<string, unknown>;
439
+ }
440
+ export interface IModelAction extends IBaseAction {
441
+ actionType: ActionType.Model;
442
+ type: ModelActionType;
443
+ domain?: string;
444
+ }
445
+ export declare enum ModelActionType {
446
+ FindOne = "FindOne",
447
+ FindList = "FindList",
448
+ FindAll = "FindAll",
449
+ InsertOne = "InsertOne",
450
+ UpdateOne = "UpdateOne",
451
+ DeleteOne = "DeleteOne",
452
+ DeleteOneInline = "DeleteOneInline",
453
+ UpdateList = "UpdateList",
454
+ DeleteList = "DeleteList"
455
+ }
456
+ export interface IClientAction extends IBaseAbstractAction {
457
+ actionType: ActionType.Client;
458
+ name: ClientActionName | string;
459
+ bindingType?: string[];
460
+ id?: string;
461
+ contextType: ActionContextType;
462
+ confirm?: string;
463
+ priority?: number;
464
+ tag?: string;
465
+ fun?: string;
466
+ }
467
+ export declare enum IActionTag {
468
+ ContextAction = "contextFreeAction",
469
+ SingleAction = "singleAction",
470
+ FooterAction = "footer"
471
+ }
472
+ export declare enum ClientActionName {
473
+ ValidateForm = "validateForm",
474
+ UpdateContext = "updateContext",
475
+ ShowDialog = "showDialog",
476
+ SubmitDialog = "submitDialog",
477
+ CloseDialog = "closeDialog",
478
+ InsertEmptyItemToList = "insertEmptyItemToList",
479
+ InsertEmptyItemToBefore = "insertEmptyItemToBefore",
480
+ InsertEmptyItemToAfter = "insertEmptyItemToAfter",
481
+ DeleteListItem = "deleteListItem",
482
+ ReloadData = "reloadData",
483
+ CopyText = "copyText",
484
+ Confirm = "confirm",
485
+ StartCreate = "startCreate",
486
+ StartInlineEdit = "startInlineEdit",
487
+ SubmitInlineEdit = "submitInlineEdit",
488
+ CancelInlineEdit = "cancelInlineEdit",
489
+ HistoryBack = "historyBack",
490
+ O2MCreateForm = "O2MCreateForm",
491
+ O2MEditForm = "O2MEditForm",
492
+ O2MDelete = "O2MDelete",
493
+ O2MCreateFormConfirm = "O2MCreateFormConfirm",
494
+ O2MEditFormConfirm = "O2MEditFormConfirm",
495
+ M2MCreateTable = "M2MCreateTable",
496
+ M2MDelete = "M2MDelete",
497
+ M2MCreateTableConfirm = "M2MCreateTableConfirm",
498
+ O2MCloseForm = "O2MCloseForm"
499
+ }
500
+ export declare enum ModelDefaultActionName {
501
+ create = "create",
502
+ update = "update",
503
+ delete = "delete",
504
+ redirectDetailPage = "redirectDetailPage",
505
+ redirectCreatePage = "redirectCreatePage",
506
+ redirectUpdatePage = "redirectUpdatePage",
507
+ $$internal_AddOne = "$$internal_AddOne",
508
+ $$internal_EditOne = "$$internal_EditOne",
509
+ $$internal_CopyOne = "$$internal_CopyOne",
510
+ $$internal_DeleteOne = "$$internal_DeleteOne",
511
+ $$internal_ListInsertOneAndBackToList = "$$internal_ListInsertOneAndBackToList",
512
+ $$internal_ListUpdateOneAndBackToList = "$$internal_ListUpdateOneAndBackToList",
513
+ $$internal_GotoListImportDialog = "$$internal_GotoListImportDialog",
514
+ $$internal_GotoListExportDialog = "$$internal_GotoListExportDialog",
515
+ $$internal_GotoListTableRouter = "$$internal_GotoListTableRouter",
516
+ $$internal_DialogCancel = "$$internal_DialogCancel",
517
+ $$internal_GotoO2MCreateDialog = "$$internal_GotoO2MCreateDialog",
518
+ $$internal_GotoO2MEditDialog = "$$internal_GotoO2MEditDialog",
519
+ $$internal_O2MUpdateOneAndSubmitDialog = "$$internal_O2MUpdateOneAndSubmitDialog",
520
+ $$internal_O2MDeleteOne = "$$internal_O2MDeleteOne",
521
+ $$internal_DialogSubmit = "$$internal_DialogSubmit",
522
+ $$internal_O2MInsertOneAndSubmitDialog = "$$internal_O2MInsertOneAndSubmitDialog",
523
+ $$internal_ListUpdateAndCloseDialogReloadOpenerAction = "$$internal_ListUpdateAndCloseDialogReloadOpenerAction",
524
+ $$internal_ListInsertOneAndCloseDialog = "$$internal_ListInsertOneAndCloseDialog",
525
+ $$internal_GotoM2MListDialog = "$$internal_GotoM2MListDialog",
526
+ $$internal_ReloadData = "$$internal_ReloadData",
527
+ $$internal_ValidateForm = "$$internal_ValidateForm",
528
+ /**
529
+ * 保存草稿动作
530
+ */
531
+ $$internal_SaveDraft = "$$internal_SaveDraft",
532
+ $$internal_Download = "$$internal_Download",
533
+ /**
534
+ * 批量更新
535
+ */
536
+ $$internal_BatchUpdate = "$$internal_BatchUpdate",
537
+ /**
538
+ * 下载导入模板
539
+ */
540
+ $$internal_DownloadImportWorkbook = "$$internal_DownloadImportWorkbook",
541
+ /**
542
+ * 导入
543
+ */
544
+ $$internal_ImportWorkbook = "$$internal_ImportWorkbook",
545
+ /**
546
+ * 导出
547
+ */
548
+ $$internal_ExportWorkbook = "$$internal_ExportWorkbook",
549
+ /**
550
+ * 打印
551
+ */
552
+ $$internal_PrintPdfDocument = "$$internal_PrintPdfDocument"
553
+ }
554
+ export declare const ModelDefaultActionNames: string[];
555
+ export declare enum ActionCompositionType {
556
+ Sequential = "sequential",// 串行
557
+ Parallel = "parallel",// 并行
558
+ ForkJoin = "fork-join",// 并行等待
559
+ Race = "race"
560
+ }
561
+ export interface ICompositionAction extends IBaseAbstractAction {
562
+ actionType: ActionType.Composition;
563
+ name: ClientActionName | string;
564
+ type?: ActionCompositionType;
565
+ bindingType?: ViewType[];
566
+ contextType?: ActionContextType;
567
+ confirm?: string;
568
+ id?: string;
569
+ priority?: number;
570
+ tag?: string;
571
+ }
572
+ export type ActionRuleId = EntityId;
573
+ export interface ICustomAction extends IBaseAction {
574
+ actionType: ActionType.Custom;
575
+ code: string;
576
+ }
577
+ export type CustomActionExecutor = (action: ICustomAction, vm: any, context: any) => any | Promise<any>;
578
+ export type IAction = IViewAction | IServerAction | IURLAction | IClientAction | ICompositionAction;
579
+ export declare enum ActionValidationScope {
580
+ Client = "client",
581
+ Server = "server",
582
+ Both = "both"
583
+ }
584
+ export {};