@nocobase/plugin-client 1.6.0-alpha.2 → 1.6.0-alpha.21

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 (33) hide show
  1. package/dist/client/DesktopRoutesManager.d.ts +10 -0
  2. package/dist/client/MobileRoutesManager.d.ts +10 -0
  3. package/dist/client/index.js +1 -1
  4. package/dist/client/locale/index.d.ts +12 -0
  5. package/dist/client/routesTableSchema.d.ts +1242 -0
  6. package/dist/client/useTableBlockProps.d.ts +23 -0
  7. package/dist/client/utils.d.ts +10 -0
  8. package/dist/collections/desktopRoutes.d.ts +10 -0
  9. package/dist/collections/desktopRoutes.js +420 -0
  10. package/dist/collections/mobileRoutes.d.ts +10 -0
  11. package/dist/collections/mobileRoutes.js +368 -0
  12. package/dist/externalVersion.js +10 -4
  13. package/dist/locale/en-US.js +35 -2
  14. package/dist/locale/es-ES.js +30 -1
  15. package/dist/locale/fr-FR.js +30 -1
  16. package/dist/locale/ja-JP.js +30 -1
  17. package/dist/locale/ko-KR.js +30 -1
  18. package/dist/locale/pt-BR.js +30 -1
  19. package/dist/locale/ru-RU.js +22 -1
  20. package/dist/locale/tr-TR.js +22 -1
  21. package/dist/locale/uk-UA.js +30 -1
  22. package/dist/locale/zh-CN.js +52 -6
  23. package/dist/locale/zh-TW.js +31 -1
  24. package/dist/node_modules/cronstrue/package.json +1 -1
  25. package/dist/server/collections/desktopRoutes.d.ts +10 -0
  26. package/dist/server/collections/desktopRoutes.js +44 -0
  27. package/dist/server/collections/extendRoleField.d.ts +14 -0
  28. package/dist/server/collections/extendRoleField.js +44 -0
  29. package/dist/server/migrations/2024122912211-transform-menu-schema-to-routes.d.ts +14 -0
  30. package/dist/server/migrations/2024122912211-transform-menu-schema-to-routes.js +184 -0
  31. package/dist/server/server.d.ts +6 -0
  32. package/dist/server/server.js +92 -5
  33. package/package.json +2 -2
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const useTableBlockProps: () => {
10
+ optimizeTextCellRender: boolean;
11
+ value: any;
12
+ loading: any;
13
+ showIndex: boolean;
14
+ dragSort: boolean;
15
+ rowKey: string;
16
+ pagination: boolean | {
17
+ pageSize: any;
18
+ total: any;
19
+ current: any;
20
+ };
21
+ onRowSelectionChange: (selectedRowKeys: any, selectedRows: any, setSelectedRowKeys: any) => void;
22
+ onChange: ({ current, pageSize }: any, filters: any, sorter: any) => void;
23
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare function getSchemaUidByRouteId(routeId: number, treeArray: any[], isMobile: boolean): any;
10
+ export declare function getRouteNodeByRouteId(routeId: number, treeArray: any[]): any;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: any;
10
+ export default _default;
@@ -0,0 +1,420 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var desktopRoutes_exports = {};
28
+ __export(desktopRoutes_exports, {
29
+ default: () => desktopRoutes_default
30
+ });
31
+ module.exports = __toCommonJS(desktopRoutes_exports);
32
+ var desktopRoutes_default = {
33
+ name: "desktopRoutes",
34
+ dumpRules: "required",
35
+ migrationRules: ["overwrite", "schema-only"],
36
+ inherit: false,
37
+ hidden: false,
38
+ description: null,
39
+ fields: [
40
+ {
41
+ key: "ymgf0jxu1kg",
42
+ name: "parentId",
43
+ type: "bigInt",
44
+ interface: "integer",
45
+ description: null,
46
+ collectionName: "desktopRoutes",
47
+ parentKey: null,
48
+ reverseKey: null,
49
+ isForeignKey: true,
50
+ uiSchema: {
51
+ type: "number",
52
+ title: '{{t("Parent ID")}}',
53
+ "x-component": "InputNumber",
54
+ "x-read-pretty": true
55
+ }
56
+ },
57
+ {
58
+ key: "b07aqgs2shv",
59
+ name: "parent",
60
+ type: "belongsTo",
61
+ interface: "m2o",
62
+ description: null,
63
+ collectionName: "desktopRoutes",
64
+ parentKey: null,
65
+ reverseKey: null,
66
+ foreignKey: "parentId",
67
+ treeParent: true,
68
+ onDelete: "CASCADE",
69
+ uiSchema: {
70
+ title: '{{t("Parent")}}',
71
+ "x-component": "AssociationField",
72
+ "x-component-props": {
73
+ multiple: false,
74
+ fieldNames: {
75
+ label: "id",
76
+ value: "id"
77
+ }
78
+ }
79
+ },
80
+ target: "desktopRoutes",
81
+ targetKey: "id"
82
+ },
83
+ {
84
+ key: "p8sxllsgin1",
85
+ name: "children",
86
+ type: "hasMany",
87
+ interface: "o2m",
88
+ description: null,
89
+ collectionName: "desktopRoutes",
90
+ parentKey: null,
91
+ reverseKey: null,
92
+ foreignKey: "parentId",
93
+ treeChildren: true,
94
+ onDelete: "CASCADE",
95
+ uiSchema: {
96
+ title: '{{t("Children")}}',
97
+ "x-component": "AssociationField",
98
+ "x-component-props": {
99
+ multiple: true,
100
+ fieldNames: {
101
+ label: "id",
102
+ value: "id"
103
+ }
104
+ }
105
+ },
106
+ target: "desktopRoutes",
107
+ targetKey: "id",
108
+ sourceKey: "id"
109
+ },
110
+ {
111
+ key: "7y601o9bmih",
112
+ name: "id",
113
+ type: "bigInt",
114
+ interface: "integer",
115
+ description: null,
116
+ collectionName: "desktopRoutes",
117
+ parentKey: null,
118
+ reverseKey: null,
119
+ autoIncrement: true,
120
+ primaryKey: true,
121
+ allowNull: false,
122
+ uiSchema: {
123
+ type: "number",
124
+ title: '{{t("ID")}}',
125
+ "x-component": "InputNumber",
126
+ "x-read-pretty": true
127
+ }
128
+ },
129
+ {
130
+ key: "m8s9b94amz3",
131
+ name: "createdAt",
132
+ type: "date",
133
+ interface: "createdAt",
134
+ description: null,
135
+ collectionName: "desktopRoutes",
136
+ parentKey: null,
137
+ reverseKey: null,
138
+ field: "createdAt",
139
+ uiSchema: {
140
+ type: "datetime",
141
+ title: '{{t("Created at")}}',
142
+ "x-component": "DatePicker",
143
+ "x-component-props": {},
144
+ "x-read-pretty": true
145
+ }
146
+ },
147
+ {
148
+ key: "p3p69woziuu",
149
+ name: "createdBy",
150
+ type: "belongsTo",
151
+ interface: "createdBy",
152
+ description: null,
153
+ collectionName: "desktopRoutes",
154
+ parentKey: null,
155
+ reverseKey: null,
156
+ target: "users",
157
+ foreignKey: "createdById",
158
+ uiSchema: {
159
+ type: "object",
160
+ title: '{{t("Created by")}}',
161
+ "x-component": "AssociationField",
162
+ "x-component-props": {
163
+ fieldNames: {
164
+ value: "id",
165
+ label: "nickname"
166
+ }
167
+ },
168
+ "x-read-pretty": true
169
+ },
170
+ targetKey: "id"
171
+ },
172
+ {
173
+ key: "s0gw1blo4hm",
174
+ name: "updatedAt",
175
+ type: "date",
176
+ interface: "updatedAt",
177
+ description: null,
178
+ collectionName: "desktopRoutes",
179
+ parentKey: null,
180
+ reverseKey: null,
181
+ field: "updatedAt",
182
+ uiSchema: {
183
+ type: "string",
184
+ title: '{{t("Last updated at")}}',
185
+ "x-component": "DatePicker",
186
+ "x-component-props": {},
187
+ "x-read-pretty": true
188
+ }
189
+ },
190
+ {
191
+ key: "d1l988n09gd",
192
+ name: "updatedBy",
193
+ type: "belongsTo",
194
+ interface: "updatedBy",
195
+ description: null,
196
+ collectionName: "desktopRoutes",
197
+ parentKey: null,
198
+ reverseKey: null,
199
+ target: "users",
200
+ foreignKey: "updatedById",
201
+ uiSchema: {
202
+ type: "object",
203
+ title: '{{t("Last updated by")}}',
204
+ "x-component": "AssociationField",
205
+ "x-component-props": {
206
+ fieldNames: {
207
+ value: "id",
208
+ label: "nickname"
209
+ }
210
+ },
211
+ "x-read-pretty": true
212
+ },
213
+ targetKey: "id"
214
+ },
215
+ {
216
+ key: "bo7btzkbyan",
217
+ name: "title",
218
+ type: "string",
219
+ interface: "input",
220
+ description: null,
221
+ collectionName: "desktopRoutes",
222
+ parentKey: null,
223
+ reverseKey: null,
224
+ translation: true,
225
+ uiSchema: {
226
+ type: "string",
227
+ "x-component": "Input",
228
+ title: '{{t("Title")}}'
229
+ }
230
+ },
231
+ {
232
+ key: "ozl5d8t2d5e",
233
+ name: "icon",
234
+ type: "string",
235
+ interface: "input",
236
+ description: null,
237
+ collectionName: "desktopRoutes",
238
+ parentKey: null,
239
+ reverseKey: null,
240
+ uiSchema: {
241
+ type: "string",
242
+ "x-component": "Input",
243
+ title: '{{t("Icon")}}'
244
+ }
245
+ },
246
+ // 页面的 schema uid
247
+ {
248
+ key: "6bbyhv00bp4",
249
+ name: "schemaUid",
250
+ type: "string",
251
+ interface: "input",
252
+ description: null,
253
+ collectionName: "desktopRoutes",
254
+ parentKey: null,
255
+ reverseKey: null,
256
+ uiSchema: {
257
+ type: "string",
258
+ "x-component": "Input",
259
+ title: '{{t("Schema UID")}}'
260
+ }
261
+ },
262
+ // 菜单的 schema uid
263
+ {
264
+ key: "6bbyhv00bp5",
265
+ name: "menuSchemaUid",
266
+ type: "string",
267
+ interface: "input",
268
+ description: null,
269
+ collectionName: "desktopRoutes",
270
+ parentKey: null,
271
+ reverseKey: null,
272
+ uiSchema: {
273
+ type: "string",
274
+ "x-component": "Input",
275
+ title: '{{t("Menu Schema UID")}}'
276
+ }
277
+ },
278
+ {
279
+ key: "6bbyhv00bp6",
280
+ name: "tabSchemaName",
281
+ type: "string",
282
+ interface: "input",
283
+ description: null,
284
+ collectionName: "desktopRoutes",
285
+ parentKey: null,
286
+ reverseKey: null,
287
+ uiSchema: {
288
+ type: "string",
289
+ "x-component": "Input",
290
+ title: '{{t("Tab Schema Name")}}'
291
+ }
292
+ },
293
+ {
294
+ key: "m0k5qbaktab",
295
+ name: "type",
296
+ type: "string",
297
+ interface: "input",
298
+ description: null,
299
+ collectionName: "desktopRoutes",
300
+ parentKey: null,
301
+ reverseKey: null,
302
+ uiSchema: {
303
+ type: "string",
304
+ "x-component": "Input",
305
+ title: '{{t("Type")}}'
306
+ }
307
+ },
308
+ {
309
+ key: "ssuml1j2v1b",
310
+ name: "options",
311
+ type: "json",
312
+ interface: "json",
313
+ description: null,
314
+ collectionName: "desktopRoutes",
315
+ parentKey: null,
316
+ reverseKey: null,
317
+ defaultValue: null,
318
+ uiSchema: {
319
+ type: "object",
320
+ "x-component": "Input.JSON",
321
+ "x-component-props": {
322
+ autoSize: {
323
+ minRows: 5
324
+ }
325
+ },
326
+ default: null,
327
+ title: '{{t("Options")}}'
328
+ }
329
+ },
330
+ {
331
+ key: "jjmosjqhz8l",
332
+ name: "sort",
333
+ type: "sort",
334
+ interface: "sort",
335
+ description: null,
336
+ collectionName: "desktopRoutes",
337
+ parentKey: null,
338
+ reverseKey: null,
339
+ scopeKey: "parentId",
340
+ uiSchema: {
341
+ type: "number",
342
+ "x-component": "InputNumber",
343
+ "x-component-props": {
344
+ stringMode: true,
345
+ step: "1"
346
+ },
347
+ "x-validator": "integer",
348
+ title: '{{t("Sort")}}'
349
+ }
350
+ },
351
+ {
352
+ type: "belongsToMany",
353
+ name: "roles",
354
+ through: "rolesDesktopRoutes",
355
+ target: "roles",
356
+ onDelete: "CASCADE"
357
+ },
358
+ {
359
+ type: "boolean",
360
+ name: "hideInMenu",
361
+ interface: "checkbox",
362
+ uiSchema: {
363
+ type: "boolean",
364
+ "x-component": "Checkbox",
365
+ title: '{{t("Hide in menu")}}'
366
+ }
367
+ },
368
+ {
369
+ type: "boolean",
370
+ name: "enableTabs",
371
+ interface: "checkbox",
372
+ uiSchema: {
373
+ type: "boolean",
374
+ "x-component": "Checkbox",
375
+ title: '{{t("Enable tabs")}}'
376
+ }
377
+ },
378
+ {
379
+ type: "boolean",
380
+ name: "enableHeader",
381
+ interface: "checkbox",
382
+ uiSchema: {
383
+ type: "boolean",
384
+ "x-component": "Checkbox",
385
+ title: '{{t("Enable header")}}'
386
+ }
387
+ },
388
+ {
389
+ type: "boolean",
390
+ name: "displayTitle",
391
+ interface: "checkbox",
392
+ uiSchema: {
393
+ type: "boolean",
394
+ "x-component": "Checkbox",
395
+ title: '{{t("Display title")}}'
396
+ }
397
+ },
398
+ {
399
+ type: "boolean",
400
+ name: "hidden",
401
+ interface: "checkbox",
402
+ uiSchema: {
403
+ type: "boolean",
404
+ "x-component": "Checkbox",
405
+ title: '{{t("Hidden")}}'
406
+ }
407
+ }
408
+ ],
409
+ category: [],
410
+ logging: true,
411
+ autoGenId: true,
412
+ createdAt: true,
413
+ createdBy: true,
414
+ updatedAt: true,
415
+ updatedBy: true,
416
+ template: "tree",
417
+ view: false,
418
+ tree: "adjacencyList",
419
+ filterTargetKey: "id"
420
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: any;
10
+ export default _default;