@byteluck-fe/model-driven-shared 3.0.0-beta.6 → 4.51.0-lx0

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.
@@ -2,7 +2,7 @@ import { FieldTypes } from './enum';
2
2
  export interface CustomEventItem {
3
3
  key: string;
4
4
  name: string;
5
- namespace: string;
5
+ namespace?: string;
6
6
  args?: {
7
7
  key: string;
8
8
  type: FieldTypes;
@@ -18,296 +18,296 @@ export interface EventItem {
18
18
  }
19
19
  declare const eventMap: readonly [{
20
20
  readonly key: "on_click";
21
- readonly name: string;
21
+ readonly name: "点击时";
22
22
  readonly code: "click";
23
23
  }, {
24
24
  readonly key: "on_click_finish";
25
- readonly name: string;
25
+ readonly name: "执行完成时";
26
26
  readonly code: "click-finish";
27
27
  }, {
28
28
  readonly key: "on_change";
29
- readonly name: string;
29
+ readonly name: "值发生变化时";
30
30
  readonly code: "change";
31
31
  }, {
32
32
  readonly key: "on_search";
33
- readonly name: string;
33
+ readonly name: "搜索时";
34
34
  readonly code: "search";
35
35
  }, {
36
36
  readonly key: "on_list_change";
37
- readonly name: string;
37
+ readonly name: "列表数据变化时";
38
38
  readonly code: "list-change";
39
39
  }, {
40
40
  readonly key: "on_list_search";
41
- readonly name: string;
41
+ readonly name: "列表数据查询构建时";
42
42
  readonly code: "list-search";
43
43
  }, {
44
44
  readonly key: "on_list_mounted";
45
- readonly name: string;
45
+ readonly name: "列表数据返回时";
46
46
  readonly code: "list-mounted";
47
47
  }, {
48
48
  readonly key: "on_list_delete";
49
- readonly name: string;
49
+ readonly name: "列表数据删除时";
50
50
  readonly code: "list-delete";
51
51
  }, {
52
52
  readonly key: "on_list_before_insert";
53
- readonly name: string;
53
+ readonly name: "列表数据插入前";
54
54
  readonly code: "list-before-insert";
55
55
  }, {
56
56
  readonly key: "on_input";
57
- readonly name: string;
57
+ readonly name: "用户输入时";
58
58
  readonly code: "input";
59
59
  }, {
60
60
  readonly key: "on_blur";
61
- readonly name: string;
61
+ readonly name: "失去焦点时";
62
62
  readonly code: "blur";
63
63
  }, {
64
64
  readonly key: "on_focus";
65
- readonly name: string;
65
+ readonly name: "获取焦点时";
66
66
  readonly code: "focus";
67
67
  }, {
68
68
  readonly key: "on_wps_open";
69
- readonly name: string;
69
+ readonly name: "打开文件时";
70
70
  readonly code: "wps-open";
71
71
  }, {
72
72
  readonly key: "on_wps_save";
73
- readonly name: string;
73
+ readonly name: "保存文件时";
74
74
  readonly code: "wps-save";
75
75
  }, {
76
76
  readonly key: "on_wps_rename";
77
- readonly name: string;
77
+ readonly name: "重命名时";
78
78
  readonly code: "wps-rename";
79
79
  }, {
80
80
  readonly key: "on_list_actions";
81
- readonly name: string;
81
+ readonly name: "点击操作按钮时";
82
82
  readonly code: "list-actions";
83
83
  }, {
84
84
  readonly key: "on_list_render_operation";
85
- readonly name: string;
85
+ readonly name: "操作列渲染时";
86
86
  readonly code: "list-render-operation";
87
87
  }, {
88
88
  readonly key: "on_list_rowclick";
89
- readonly name: string;
89
+ readonly name: "行点击时";
90
90
  readonly code: "list-rowclick";
91
91
  }, {
92
92
  readonly key: "on_list_before_rowdelete";
93
- readonly name: string;
93
+ readonly name: "行删除前";
94
94
  readonly code: "list-before-rowdelete";
95
95
  }, {
96
96
  readonly key: "on_list_before_import";
97
- readonly name: string;
97
+ readonly name: "列表数据导入前";
98
98
  readonly code: "list-before-import";
99
99
  }, {
100
100
  readonly key: "on_list_rows_checked";
101
- readonly name: string;
101
+ readonly name: "行选中时";
102
102
  readonly code: "list-rows-checked";
103
103
  }, {
104
104
  readonly key: "on_change_tab";
105
- readonly name: string;
105
+ readonly name: "标签页切换时";
106
106
  readonly code: "change-tab";
107
107
  }, {
108
108
  readonly key: "on_modal_ok";
109
- readonly name: string;
109
+ readonly name: "弹窗确认时";
110
110
  readonly code: "modal-ok";
111
111
  }, {
112
- readonly key: "on_option_selected";
113
- readonly name: string;
114
- readonly code: "option_selected";
112
+ readonly key: "on_list_after_import";
113
+ readonly name: "列表数据导入后";
114
+ readonly code: "list-after-import";
115
115
  }];
116
116
  export type InnerEventCode = (typeof eventMap)[number]['code'];
117
117
  export declare class EventLogic {
118
118
  static readonly events: readonly [{
119
119
  readonly key: "on_click";
120
- readonly name: string;
120
+ readonly name: "点击时";
121
121
  readonly code: "click";
122
122
  }, {
123
123
  readonly key: "on_click_finish";
124
- readonly name: string;
124
+ readonly name: "执行完成时";
125
125
  readonly code: "click-finish";
126
126
  }, {
127
127
  readonly key: "on_change";
128
- readonly name: string;
128
+ readonly name: "值发生变化时";
129
129
  readonly code: "change";
130
130
  }, {
131
131
  readonly key: "on_search";
132
- readonly name: string;
132
+ readonly name: "搜索时";
133
133
  readonly code: "search";
134
134
  }, {
135
135
  readonly key: "on_list_change";
136
- readonly name: string;
136
+ readonly name: "列表数据变化时";
137
137
  readonly code: "list-change";
138
138
  }, {
139
139
  readonly key: "on_list_search";
140
- readonly name: string;
140
+ readonly name: "列表数据查询构建时";
141
141
  readonly code: "list-search";
142
142
  }, {
143
143
  readonly key: "on_list_mounted";
144
- readonly name: string;
144
+ readonly name: "列表数据返回时";
145
145
  readonly code: "list-mounted";
146
146
  }, {
147
147
  readonly key: "on_list_delete";
148
- readonly name: string;
148
+ readonly name: "列表数据删除时";
149
149
  readonly code: "list-delete";
150
150
  }, {
151
151
  readonly key: "on_list_before_insert";
152
- readonly name: string;
152
+ readonly name: "列表数据插入前";
153
153
  readonly code: "list-before-insert";
154
154
  }, {
155
155
  readonly key: "on_input";
156
- readonly name: string;
156
+ readonly name: "用户输入时";
157
157
  readonly code: "input";
158
158
  }, {
159
159
  readonly key: "on_blur";
160
- readonly name: string;
160
+ readonly name: "失去焦点时";
161
161
  readonly code: "blur";
162
162
  }, {
163
163
  readonly key: "on_focus";
164
- readonly name: string;
164
+ readonly name: "获取焦点时";
165
165
  readonly code: "focus";
166
166
  }, {
167
167
  readonly key: "on_wps_open";
168
- readonly name: string;
168
+ readonly name: "打开文件时";
169
169
  readonly code: "wps-open";
170
170
  }, {
171
171
  readonly key: "on_wps_save";
172
- readonly name: string;
172
+ readonly name: "保存文件时";
173
173
  readonly code: "wps-save";
174
174
  }, {
175
175
  readonly key: "on_wps_rename";
176
- readonly name: string;
176
+ readonly name: "重命名时";
177
177
  readonly code: "wps-rename";
178
178
  }, {
179
179
  readonly key: "on_list_actions";
180
- readonly name: string;
180
+ readonly name: "点击操作按钮时";
181
181
  readonly code: "list-actions";
182
182
  }, {
183
183
  readonly key: "on_list_render_operation";
184
- readonly name: string;
184
+ readonly name: "操作列渲染时";
185
185
  readonly code: "list-render-operation";
186
186
  }, {
187
187
  readonly key: "on_list_rowclick";
188
- readonly name: string;
188
+ readonly name: "行点击时";
189
189
  readonly code: "list-rowclick";
190
190
  }, {
191
191
  readonly key: "on_list_before_rowdelete";
192
- readonly name: string;
192
+ readonly name: "行删除前";
193
193
  readonly code: "list-before-rowdelete";
194
194
  }, {
195
195
  readonly key: "on_list_before_import";
196
- readonly name: string;
196
+ readonly name: "列表数据导入前";
197
197
  readonly code: "list-before-import";
198
198
  }, {
199
199
  readonly key: "on_list_rows_checked";
200
- readonly name: string;
200
+ readonly name: "行选中时";
201
201
  readonly code: "list-rows-checked";
202
202
  }, {
203
203
  readonly key: "on_change_tab";
204
- readonly name: string;
204
+ readonly name: "标签页切换时";
205
205
  readonly code: "change-tab";
206
206
  }, {
207
207
  readonly key: "on_modal_ok";
208
- readonly name: string;
208
+ readonly name: "弹窗确认时";
209
209
  readonly code: "modal-ok";
210
210
  }, {
211
- readonly key: "on_option_selected";
212
- readonly name: string;
213
- readonly code: "option_selected";
211
+ readonly key: "on_list_after_import";
212
+ readonly name: "列表数据导入后";
213
+ readonly code: "list-after-import";
214
214
  }];
215
215
  static getEventsFromKeys(keys: string | string[]): ({
216
216
  readonly key: "on_click";
217
- readonly name: string;
217
+ readonly name: "点击时";
218
218
  readonly code: "click";
219
219
  } | {
220
220
  readonly key: "on_click_finish";
221
- readonly name: string;
221
+ readonly name: "执行完成时";
222
222
  readonly code: "click-finish";
223
223
  } | {
224
224
  readonly key: "on_change";
225
- readonly name: string;
225
+ readonly name: "值发生变化时";
226
226
  readonly code: "change";
227
227
  } | {
228
228
  readonly key: "on_search";
229
- readonly name: string;
229
+ readonly name: "搜索时";
230
230
  readonly code: "search";
231
231
  } | {
232
232
  readonly key: "on_list_change";
233
- readonly name: string;
233
+ readonly name: "列表数据变化时";
234
234
  readonly code: "list-change";
235
235
  } | {
236
236
  readonly key: "on_list_search";
237
- readonly name: string;
237
+ readonly name: "列表数据查询构建时";
238
238
  readonly code: "list-search";
239
239
  } | {
240
240
  readonly key: "on_list_mounted";
241
- readonly name: string;
241
+ readonly name: "列表数据返回时";
242
242
  readonly code: "list-mounted";
243
243
  } | {
244
244
  readonly key: "on_list_delete";
245
- readonly name: string;
245
+ readonly name: "列表数据删除时";
246
246
  readonly code: "list-delete";
247
247
  } | {
248
248
  readonly key: "on_list_before_insert";
249
- readonly name: string;
249
+ readonly name: "列表数据插入前";
250
250
  readonly code: "list-before-insert";
251
251
  } | {
252
252
  readonly key: "on_input";
253
- readonly name: string;
253
+ readonly name: "用户输入时";
254
254
  readonly code: "input";
255
255
  } | {
256
256
  readonly key: "on_blur";
257
- readonly name: string;
257
+ readonly name: "失去焦点时";
258
258
  readonly code: "blur";
259
259
  } | {
260
260
  readonly key: "on_focus";
261
- readonly name: string;
261
+ readonly name: "获取焦点时";
262
262
  readonly code: "focus";
263
263
  } | {
264
264
  readonly key: "on_wps_open";
265
- readonly name: string;
265
+ readonly name: "打开文件时";
266
266
  readonly code: "wps-open";
267
267
  } | {
268
268
  readonly key: "on_wps_save";
269
- readonly name: string;
269
+ readonly name: "保存文件时";
270
270
  readonly code: "wps-save";
271
271
  } | {
272
272
  readonly key: "on_wps_rename";
273
- readonly name: string;
273
+ readonly name: "重命名时";
274
274
  readonly code: "wps-rename";
275
275
  } | {
276
276
  readonly key: "on_list_actions";
277
- readonly name: string;
277
+ readonly name: "点击操作按钮时";
278
278
  readonly code: "list-actions";
279
279
  } | {
280
280
  readonly key: "on_list_render_operation";
281
- readonly name: string;
281
+ readonly name: "操作列渲染时";
282
282
  readonly code: "list-render-operation";
283
283
  } | {
284
284
  readonly key: "on_list_rowclick";
285
- readonly name: string;
285
+ readonly name: "行点击时";
286
286
  readonly code: "list-rowclick";
287
287
  } | {
288
288
  readonly key: "on_list_before_rowdelete";
289
- readonly name: string;
289
+ readonly name: "行删除前";
290
290
  readonly code: "list-before-rowdelete";
291
291
  } | {
292
292
  readonly key: "on_list_before_import";
293
- readonly name: string;
293
+ readonly name: "列表数据导入前";
294
294
  readonly code: "list-before-import";
295
295
  } | {
296
296
  readonly key: "on_list_rows_checked";
297
- readonly name: string;
297
+ readonly name: "行选中时";
298
298
  readonly code: "list-rows-checked";
299
299
  } | {
300
300
  readonly key: "on_change_tab";
301
- readonly name: string;
301
+ readonly name: "标签页切换时";
302
302
  readonly code: "change-tab";
303
303
  } | {
304
304
  readonly key: "on_modal_ok";
305
- readonly name: string;
305
+ readonly name: "弹窗确认时";
306
306
  readonly code: "modal-ok";
307
307
  } | {
308
- readonly key: "on_option_selected";
309
- readonly name: string;
310
- readonly code: "option_selected";
308
+ readonly key: "on_list_after_import";
309
+ readonly name: "列表数据导入后";
310
+ readonly code: "list-after-import";
311
311
  })[];
312
312
  static getEventsFromControl(control: {
313
313
  eventKeys: string[];
@@ -1,3 +1,4 @@
1
+ import OkI18n from 'ok-i18n';
1
2
  import messages from './locales';
2
3
  type Message = Partial<(typeof messages)['zhCN']>;
3
4
  type Keys = 'caption' | 'placeholder' | 'max' | 'min';
@@ -5,9 +6,9 @@ type Variable = {
5
6
  [key in Keys]?: string | number;
6
7
  };
7
8
  export declare class RulesMessage {
8
- static $i18n: void;
9
+ static $i18n: OkI18n;
9
10
  static getMessage(messageKey: keyof Message, variable?: Variable): string;
10
- static resetI18n(locale?: string): void;
11
- static setLocale(locale: string, messagesI18n: any): void;
11
+ static resetI18n(locale?: string): OkI18n;
12
+ static setLocale(locale: string): void;
12
13
  }
13
14
  export {};
@@ -1,2 +1,2 @@
1
- export declare const DEFAULT_LOCALE: string;
1
+ export declare const DEFAULT_LOCALE = "zh-CN";
2
2
  export declare const noop: () => void;
@@ -131,8 +131,7 @@ export declare enum CONTROL_TYPE {
131
131
  EMPLOYEE2 = "employee2",
132
132
  DEPARTMENT2 = "department2",
133
133
  GRID_LAYOUT_WRAP = "grid-layout-wrap",
134
- VUE_PAGE = "vue-page",
135
- REFERENCE_LIST = "reference-list"
134
+ SENSITIVEN_INFORMATION = "sensitiven-information"
136
135
  }
137
136
  export declare enum OPT_TYPES {
138
137
  /**
@@ -174,7 +173,7 @@ export declare enum FieldTypes {
174
173
  * */
175
174
  TEXT = "text",
176
175
  /**
177
- * 数组, Array<string>
176
+ * 数组, Array<string>
178
177
  * */
179
178
  ARRAY = "array",
180
179
  /**
@@ -225,19 +224,58 @@ export declare enum FieldTypes {
225
224
  * 计算公式, CalcValue { result: number, unit: string }
226
225
  * */
227
226
  CALC = "calc",
227
+ /**
228
+ * 关联键, string
229
+ * */
230
+ RELATION = "relation",
228
231
  /**
229
232
  * 列表 Array<any>
230
233
  * */
231
234
  LIST = "list",
235
+ /**
236
+ * 关联字段
237
+ * */
238
+ RELATION_FIELD = "relation-field",
239
+ /**
240
+ * 引用字段
241
+ * */
242
+ REFERENCE_FIELD = "reference-field",
243
+ /**
244
+ * 计算公式字段
245
+ * */
246
+ CALC_FIELD = "calc",
232
247
  /**
233
248
  * JSON字段
234
249
  * */
235
250
  JSON = "json",
251
+ /**
252
+ * 整数类型
253
+ * */
254
+ BIGINT = "bigint",
236
255
  /**
237
256
  * 任意类型
238
257
  * */
239
- ANY = "ANY"
258
+ ANY = "ANY",
259
+ /**
260
+ * 加密字段
261
+ * */
262
+ ENCRYPTED_FIELD = "encrypted_field"
240
263
  }
264
+ export declare const FieldTypeToColumnType: {
265
+ array: CONTROL_TYPE;
266
+ auto_number: CONTROL_TYPE;
267
+ decimal: CONTROL_TYPE;
268
+ department: CONTROL_TYPE;
269
+ file: CONTROL_TYPE;
270
+ image: CONTROL_TYPE;
271
+ location: CONTROL_TYPE;
272
+ people: CONTROL_TYPE;
273
+ text: CONTROL_TYPE;
274
+ timescope: CONTROL_TYPE;
275
+ timestamp: CONTROL_TYPE;
276
+ varchar: CONTROL_TYPE;
277
+ relation: CONTROL_TYPE;
278
+ };
241
279
  export declare enum DateType {
242
280
  /**
243
281
  * 年
@@ -264,6 +302,3 @@ export declare enum DateType {
264
302
  * */
265
303
  DATETIME = "datetime"
266
304
  }
267
- export declare const DESIGNER_SLOT: {
268
- DEFAULT: string;
269
- };