@nocobase/plugin-graph-collection-manager 0.11.1-alpha.5 → 0.12.0-alpha.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 (100) hide show
  1. package/client.d.ts +2 -3
  2. package/client.js +1 -1
  3. package/dist/client/index.js +65917 -0
  4. package/{lib → dist}/client/utils.d.ts +4 -3
  5. package/{lib → dist}/index.d.ts +1 -0
  6. package/dist/index.js +18 -0
  7. package/dist/locale/en-US.js +19 -0
  8. package/dist/locale/es-ES.js +19 -0
  9. package/dist/locale/fr-FR.js +19 -0
  10. package/dist/locale/ja-JP.js +17 -0
  11. package/dist/locale/pt-BR.js +19 -0
  12. package/dist/locale/zh-CN.js +20 -0
  13. package/dist/server/collections/graphPositions.js +26 -0
  14. package/dist/server/index.js +23 -0
  15. package/package.json +17 -28
  16. package/server.d.ts +2 -3
  17. package/server.js +1 -1
  18. package/lib/client/GraphCollectionProvider.js +0 -51
  19. package/lib/client/GraphCollectionShortcut.js +0 -169
  20. package/lib/client/GraphDrawPage.js +0 -1546
  21. package/lib/client/action-hooks.js +0 -318
  22. package/lib/client/components/AddCollectionAction.js +0 -58
  23. package/lib/client/components/AddFieldAction.js +0 -69
  24. package/lib/client/components/CollectionNodeProvder.js +0 -34
  25. package/lib/client/components/EditCollectionAction.js +0 -47
  26. package/lib/client/components/EditFieldAction.js +0 -63
  27. package/lib/client/components/Entity.js +0 -529
  28. package/lib/client/components/FieldSummary.js +0 -69
  29. package/lib/client/components/OverrideFieldAction.js +0 -64
  30. package/lib/client/components/ViewFieldAction.js +0 -45
  31. package/lib/client/components/ViewNode.js +0 -33
  32. package/lib/client/index.js +0 -27
  33. package/lib/client/locale/index.js +0 -4
  34. package/lib/client/style.js +0 -233
  35. package/lib/client/utils.js +0 -540
  36. package/lib/index.js +0 -13
  37. package/lib/locale/en-US.js +0 -22
  38. package/lib/locale/es-ES.js +0 -22
  39. package/lib/locale/fr-FR.js +0 -22
  40. package/lib/locale/ja-JP.js +0 -20
  41. package/lib/locale/pt-BR.js +0 -22
  42. package/lib/locale/zh-CN.js +0 -23
  43. package/lib/server/collections/graphPositions.js +0 -30
  44. package/lib/server/index.js +0 -37
  45. package/src/client/GraphCollectionProvider.tsx +0 -33
  46. package/src/client/GraphCollectionShortcut.tsx +0 -141
  47. package/src/client/GraphDrawPage.tsx +0 -1382
  48. package/src/client/action-hooks.tsx +0 -237
  49. package/src/client/components/AddCollectionAction.tsx +0 -28
  50. package/src/client/components/AddFieldAction.tsx +0 -37
  51. package/src/client/components/CollectionNodeProvder.tsx +0 -28
  52. package/src/client/components/EditCollectionAction.tsx +0 -21
  53. package/src/client/components/EditFieldAction.tsx +0 -30
  54. package/src/client/components/Entity.tsx +0 -495
  55. package/src/client/components/FieldSummary.tsx +0 -42
  56. package/src/client/components/OverrideFieldAction.tsx +0 -30
  57. package/src/client/components/ViewFieldAction.tsx +0 -12
  58. package/src/client/components/ViewNode.tsx +0 -22
  59. package/src/client/index.tsx +0 -10
  60. package/src/client/locale/index.ts +0 -3
  61. package/src/client/style.tsx +0 -227
  62. package/src/client/utils.tsx +0 -548
  63. package/src/index.ts +0 -1
  64. package/src/locale/en-US.ts +0 -15
  65. package/src/locale/es-ES.ts +0 -15
  66. package/src/locale/fr-FR.ts +0 -15
  67. package/src/locale/ja-JP.ts +0 -13
  68. package/src/locale/pt-BR.ts +0 -15
  69. package/src/locale/zh-CN.ts +0 -16
  70. package/src/server/actions/.gitkeep +0 -0
  71. package/src/server/collections/.gitkeep +0 -0
  72. package/src/server/collections/graphPositions.ts +0 -22
  73. package/src/server/index.ts +0 -13
  74. package/src/server/models/.gitkeep +0 -0
  75. package/src/server/repositories/.gitkeep +0 -0
  76. /package/{lib → dist}/client/GraphCollectionProvider.d.ts +0 -0
  77. /package/{lib → dist}/client/GraphCollectionShortcut.d.ts +0 -0
  78. /package/{lib → dist}/client/GraphDrawPage.d.ts +0 -0
  79. /package/{lib → dist}/client/action-hooks.d.ts +0 -0
  80. /package/{lib → dist}/client/components/AddCollectionAction.d.ts +0 -0
  81. /package/{lib → dist}/client/components/AddFieldAction.d.ts +0 -0
  82. /package/{lib → dist}/client/components/CollectionNodeProvder.d.ts +0 -0
  83. /package/{lib → dist}/client/components/EditCollectionAction.d.ts +0 -0
  84. /package/{lib → dist}/client/components/EditFieldAction.d.ts +0 -0
  85. /package/{lib → dist}/client/components/Entity.d.ts +0 -0
  86. /package/{lib → dist}/client/components/FieldSummary.d.ts +0 -0
  87. /package/{lib → dist}/client/components/OverrideFieldAction.d.ts +0 -0
  88. /package/{lib → dist}/client/components/ViewFieldAction.d.ts +0 -0
  89. /package/{lib → dist}/client/components/ViewNode.d.ts +0 -0
  90. /package/{lib → dist}/client/index.d.ts +0 -0
  91. /package/{lib → dist}/client/locale/index.d.ts +0 -0
  92. /package/{lib → dist}/client/style.d.ts +0 -0
  93. /package/{lib → dist}/locale/en-US.d.ts +0 -0
  94. /package/{lib → dist}/locale/es-ES.d.ts +0 -0
  95. /package/{lib → dist}/locale/fr-FR.d.ts +0 -0
  96. /package/{lib → dist}/locale/ja-JP.d.ts +0 -0
  97. /package/{lib → dist}/locale/pt-BR.d.ts +0 -0
  98. /package/{lib → dist}/locale/zh-CN.d.ts +0 -0
  99. /package/{lib → dist}/server/collections/graphPositions.d.ts +0 -0
  100. /package/{lib → dist}/server/index.d.ts +0 -0
@@ -1,548 +0,0 @@
1
- import { lodash } from '@nocobase/utils/client';
2
- import { useTranslation } from 'react-i18next';
3
-
4
- const { groupBy, reduce, uniq, uniqBy } = lodash;
5
-
6
- const shape = {
7
- ER: 'er-rect',
8
- EDGE: 'edge',
9
- };
10
-
11
- export const useGCMTranslation = () => {
12
- return useTranslation('graph-collection-manager');
13
- };
14
-
15
- export const getInheritCollections = (collections, name) => {
16
- const parents = [];
17
- const getParents = (name) => {
18
- const collection = collections?.find((collection) => collection.name === name);
19
- if (collection) {
20
- const { inherits } = collection;
21
- if (inherits) {
22
- for (let index = 0; index < inherits.length; index++) {
23
- const collectionKey = inherits[index];
24
- parents.push(collectionKey);
25
- getParents(collectionKey);
26
- }
27
- }
28
- }
29
- return uniq(parents);
30
- };
31
-
32
- return getParents(name);
33
- };
34
-
35
- export const getChildrenCollections = (collections, name) => {
36
- const childrens = [];
37
- const getChildrens = (name) => {
38
- const inheritCollections = collections.filter((v) => {
39
- return v.inherits?.includes(name);
40
- });
41
- inheritCollections.forEach((v) => {
42
- const collectionKey = v.name;
43
- childrens.push(v);
44
- return getChildrens(collectionKey);
45
- });
46
- return childrens;
47
- };
48
- return getChildrens(name);
49
- };
50
- export const formatData = (data) => {
51
- const edgeData = [];
52
- const targetTablekeys = [];
53
- const tableData = data.map((item, index) => {
54
- const ports = [];
55
- const totalFields = [...item.fields];
56
- const inheritCollections = getInheritCollections(data, item.name);
57
- const inheritedFields = reduce(
58
- inheritCollections,
59
- (result, value) => {
60
- const arr = result;
61
- const parentFields = data
62
- .find((k) => k.name === value)
63
- ?.fields.map((v) => {
64
- return { ...v, sourceCollectionName: item.name };
65
- });
66
- return arr.concat(parentFields);
67
- },
68
- [],
69
- );
70
- uniqBy(totalFields.concat(inheritedFields), 'name').forEach((field) => {
71
- field.uiSchema &&
72
- ports.push({
73
- id: field.key,
74
- group: 'list',
75
- ...field,
76
- });
77
- ['obo', 'oho', 'o2o', 'o2m', 'm2o', 'm2m', 'linkTo'].includes(field.interface) && edgeData.push(field);
78
- });
79
-
80
- targetTablekeys.push(item.name);
81
- const portsData = formatPortData(ports);
82
- return {
83
- id: item.name,
84
- shape: shape.ER,
85
- name: item.name,
86
- title: item.title,
87
- width: 250,
88
- // height: 40 * portsData.initPorts?.length||40,
89
- ports: [...(portsData.initPorts || []), ...(portsData.morePorts || [])],
90
- item: item,
91
- };
92
- });
93
- const edges = formatEdgeData(edgeData, targetTablekeys, tableData);
94
- const inheritEdges = formatInheritEdgeData(data);
95
- return { nodesData: tableData, edgesData: edges, inheritEdges };
96
- };
97
-
98
- export const formatPortData = (ports) => {
99
- const portsData = groupBy(ports, (v) => {
100
- if (
101
- v.isForeignKey ||
102
- v.primaryKey ||
103
- ['obo', 'oho', 'o2o', 'o2m', 'm2o', 'm2m', 'linkTo', 'id'].includes(v.interface)
104
- ) {
105
- return 'initPorts';
106
- } else {
107
- return 'morePorts';
108
- }
109
- });
110
- return portsData;
111
- };
112
-
113
- export const formatInheritEdgeData = (collections) => {
114
- const commonAttrs = {
115
- attrs: {
116
- line: {
117
- strokeWidth: 1,
118
- textAnchor: 'middle',
119
- textVerticalAnchor: 'middle',
120
- stroke: '#ddd',
121
- sourceMarker: null,
122
- // targetMarker: null,
123
- },
124
- },
125
- router: {
126
- name: 'smooth',
127
- args: {
128
- direction: 'H',
129
- },
130
- },
131
- labels: [
132
- {
133
- markup: [
134
- {
135
- tagName: 'ellipse',
136
- selector: 'labelBody',
137
- style: {
138
- cursor: 'pointer',
139
- },
140
- },
141
- {
142
- tagName: 'text',
143
- selector: 'labelText',
144
- style: {
145
- cursor: 'pointer',
146
- },
147
- },
148
- ],
149
- attrs: {
150
- labelText: {
151
- text: 'inherits',
152
- fill: 'rgba(0, 0, 0, 0.3)',
153
- textAnchor: 'middle',
154
- textVerticalAnchor: 'middle',
155
- },
156
- labelBody: {
157
- ref: 'labelText',
158
- refWidth: '100%',
159
- refHeight: '100%',
160
- fill: 'var(--nb-box-bg)',
161
- },
162
- },
163
- position: {
164
- distance: 0.5,
165
- args: {
166
- keepGradient: true,
167
- ensureLegibility: true,
168
- },
169
- },
170
- },
171
- ],
172
- };
173
- const inheritEdges = [];
174
- collections.forEach((v) => {
175
- const parentCollectonKeys = v.inherits || [];
176
- if (parentCollectonKeys.length) {
177
- parentCollectonKeys.forEach((k) => {
178
- inheritEdges.push({
179
- id: v.name + k,
180
- source: {
181
- cell: v.name,
182
- connectionPoint: 'rect',
183
- },
184
- target: {
185
- cell: k,
186
- connectionPoint: 'rect',
187
- },
188
- connector: 'rounded',
189
- connectionType: 'inherited',
190
- ...commonAttrs,
191
- });
192
- });
193
- }
194
- });
195
- return inheritEdges;
196
- };
197
-
198
- const formatEdgeData = (data, targetTables, tableData) => {
199
- const edges = [];
200
- for (let i = 0; i < data.length; i++) {
201
- if (targetTables.includes(data[i].target)) {
202
- const targetTable = tableData.find((v) => v.name === data[i].target);
203
- const sourceTable = tableData.find((v) => v.name === (data[i].sourceCollectionName || data[i].collectionName));
204
- const commonAttrs = {
205
- attrs: {
206
- line: {
207
- strokeWidth: 1,
208
- textAnchor: 'middle',
209
- textVerticalAnchor: 'middle',
210
- stroke: '#ddd',
211
- sourceMarker: null,
212
- targetMarker: null,
213
- },
214
- },
215
- router:
216
- sourceTable.id === targetTable.id
217
- ? {
218
- name: 'oneSide',
219
- args: {
220
- side: 'left',
221
- },
222
- }
223
- : {
224
- name: 'er',
225
- args: {
226
- direction: 'H',
227
- },
228
- },
229
- labels: [
230
- {
231
- markup: [
232
- {
233
- tagName: 'ellipse',
234
- selector: 'labelBody',
235
- style: {
236
- cursor: 'pointer',
237
- },
238
- },
239
- {
240
- tagName: 'text',
241
- selector: 'labelText',
242
- style: {
243
- cursor: 'pointer',
244
- },
245
- },
246
- ],
247
- attrs: {
248
- labelText: {
249
- text: getRelationship(data[i].interface)[0],
250
- fill: 'rgba(0, 0, 0, 0.3)',
251
- textAnchor: 'middle',
252
- textVerticalAnchor: 'middle',
253
- },
254
- labelBody: {
255
- ref: 'labelText',
256
- refWidth: '100%',
257
- refHeight: '100%',
258
- stroke: '#ddd',
259
- fill: 'var(--nb-box-bg)',
260
- strokeWidth: 1,
261
- rx: 10,
262
- ry: 10,
263
- },
264
- },
265
- position: {
266
- distance: 0.3,
267
- args: {
268
- keepGradient: true,
269
- ensureLegibility: true,
270
- },
271
- },
272
- },
273
- {
274
- markup: [
275
- {
276
- tagName: 'ellipse',
277
- selector: 'labelBody',
278
- style: {
279
- cursor: 'pointer',
280
- },
281
- },
282
- {
283
- tagName: 'text',
284
- selector: 'labelText',
285
- style: {
286
- cursor: 'pointer',
287
- },
288
- },
289
- ],
290
- attrs: {
291
- labelText: {
292
- text: getRelationship(data[i].interface)[1],
293
- fill: 'rgba(0, 0, 0, 0.3)',
294
- textAnchor: 'middle',
295
- textVerticalAnchor: 'middle',
296
- },
297
- labelBody: {
298
- ref: 'labelText',
299
- refWidth: '100%',
300
- refHeight: '100%',
301
- stroke: '#ddd',
302
- fill: 'var(--nb-box-bg)',
303
- rx: 10,
304
- ry: 10,
305
- strokeWidth: 1,
306
- },
307
- },
308
- position: {
309
- distance: 0.7,
310
- args: {
311
- keepGradient: true,
312
- ensureLegibility: true,
313
- },
314
- },
315
- },
316
- ],
317
- };
318
- const isuniq = (id) => {
319
- const targetEdge = edges.find((v) => v.id === id);
320
- if (targetEdge) {
321
- targetEdge.associated.push(data[i].name);
322
- return false;
323
- }
324
- return true;
325
- };
326
- if (['m2m', 'linkTo'].includes(data[i].interface)) {
327
- const throughTable = tableData.find((v) => v.name === data[i].through);
328
- if (throughTable) {
329
- const sCellId1 = sourceTable.id;
330
- const tCellId1 = throughTable.id;
331
- const sPortId1 = sourceTable.ports.find((v) => v.name === data[i].sourceKey)?.id;
332
- const tPortId1 = throughTable.ports.find((v) => v.name === data[i].foreignKey)?.id;
333
- const sCellId2 = targetTable.id;
334
- const tCellId2 = throughTable.id;
335
- const sPortId2 = targetTable.ports.find((v) => v.name === data[i].targetKey)?.id;
336
- const tPortId2 = throughTable.ports.find((v) => v.name === data[i].otherKey)?.id;
337
- const id1 = sCellId1 + sPortId1 + tCellId1 + tPortId1;
338
- const id2 = sCellId2 + sPortId2 + tCellId2 + tPortId2;
339
- edges.push({
340
- id: id1,
341
- source: {
342
- cell: sCellId1,
343
- port: sPortId1,
344
- anchor: {
345
- name: 'right',
346
- },
347
- },
348
- target: {
349
- cell: tCellId1,
350
- port: tPortId1,
351
- anchor: {
352
- name: 'left',
353
- },
354
- },
355
- associated: [data[i].name],
356
- m2m: [id1, id2],
357
- ...commonAttrs,
358
- });
359
- edges.push({
360
- id: id2,
361
- source: {
362
- cell: sCellId2,
363
- port: sPortId2,
364
- anchor: {
365
- name: 'right',
366
- },
367
- },
368
- target: {
369
- cell: tCellId2,
370
- port: tPortId2,
371
- anchor: {
372
- name: 'left',
373
- },
374
- },
375
- associated: [data[i].name],
376
- m2m: [id1, id2],
377
- ...commonAttrs,
378
- });
379
- }
380
- } else {
381
- const isLegalEdge = tableData
382
- .find((v) => v.name == (data[i].sourceCollectionName || data[i].collectionName))
383
- .ports.find((v) => v.name === data[i].foreignKey);
384
- const sCellId1 = sourceTable.id;
385
- const tCellId1 = targetTable.id;
386
- const sPortId1 = isLegalEdge?.id;
387
- const tPortId1 = targetTable.ports.find((v) => v.name === data[i].targetKey)?.id;
388
- const sCellId2 = sourceTable.id;
389
- const tCellId2 = targetTable.id;
390
- const sPortId2 = sourceTable.ports.find((v) => v.name === data[i].sourceKey)?.id;
391
- const tPortId2 = targetTable.ports.find((v) => v.name === data[i].foreignKey)?.id;
392
- const id1 = sCellId1 + sPortId1 + tCellId1 + tPortId1;
393
- const id2 = sCellId2 + sPortId2 + tCellId2 + tPortId2;
394
- isuniq(tCellId1 + tPortId1 + sCellId1 + sPortId1) &&
395
- isLegalEdge &&
396
- tPortId1 &&
397
- edges.push({
398
- id: id1,
399
- source: {
400
- cell: sCellId1,
401
- port: sPortId1,
402
- anchor: {
403
- name: 'right',
404
- },
405
- },
406
- target: {
407
- cell: tCellId1,
408
- port: tPortId1,
409
- anchor: {
410
- name: 'left',
411
- },
412
- },
413
- associated: [data[i].name],
414
- ...commonAttrs,
415
- });
416
- isuniq(tCellId2 + tPortId2 + sCellId2 + sPortId2) &&
417
- sPortId2 &&
418
- tPortId2 &&
419
- edges.push({
420
- id: id2,
421
- source: {
422
- cell: sCellId2,
423
- port: sPortId2,
424
- anchor: {
425
- name: 'right',
426
- },
427
- },
428
- target: {
429
- cell: tCellId2,
430
- port: tPortId2,
431
- anchor: {
432
- name: 'left',
433
- },
434
- },
435
- associated: [data[i].name],
436
- ...commonAttrs,
437
- });
438
- }
439
- }
440
- }
441
- return uniqBy(edges, 'id');
442
- };
443
-
444
- const getRelationship = (relatioship) => {
445
- switch (relatioship) {
446
- case 'm2m':
447
- case 'linkTo':
448
- return ['1', 'N'];
449
- case 'o2m':
450
- return ['1', 'N'];
451
- case 'm2o':
452
- return ['N', '1'];
453
- case 'obo':
454
- case 'oho':
455
- return ['1', '1'];
456
- default:
457
- return [];
458
- }
459
- };
460
-
461
- export const getDiffNode = (newNodes, oldNodes) => {
462
- const arr = [];
463
- const length1 = newNodes.length;
464
- const length2 = oldNodes.length;
465
- for (let i = 0; i < length1; i++) {
466
- if (!oldNodes.find((v) => v.id === newNodes[i].id)) {
467
- arr.push({
468
- status: 'add',
469
- node: newNodes[i],
470
- });
471
- } else {
472
- const oldNode = oldNodes.find((v) => v.id === newNodes[i].id);
473
- const oldPorts = oldNode?.ports.items;
474
- const newPorts = newNodes[i].ports;
475
- if (oldNode) {
476
- for (let h = 0; h < newPorts.length; h++) {
477
- if (!oldPorts.find((v) => v.id === newPorts[h].id)) {
478
- arr.push({
479
- status: 'insertPort',
480
- node: newNodes[i],
481
- port: { index: h, port: newPorts[h] },
482
- });
483
- }
484
- }
485
- for (let k = 0; k < oldPorts.length; k++) {
486
- if (!newPorts.find((v) => v.id === oldPorts[k].id)) {
487
- arr.push({
488
- status: 'deletePort',
489
- node: newNodes[i],
490
- port: oldPorts[k],
491
- });
492
- }
493
- }
494
-
495
- if (oldNode.title !== newNodes[i].title) {
496
- arr.push({
497
- status: 'updateNode',
498
- node: newNodes[i],
499
- });
500
- }
501
- }
502
- }
503
- }
504
- for (let i = 0; i < length2; i++) {
505
- if (!newNodes.find((v) => v.id === oldNodes[i].id)) {
506
- arr.push({
507
- status: 'delete',
508
- node: oldNodes[i],
509
- });
510
- }
511
- }
512
- return arr;
513
- };
514
-
515
- export const getDiffEdge = (newEdges, oldEdges) => {
516
- const length1 = newEdges.length;
517
- const length2 = oldEdges?.length;
518
- const edges = [];
519
- for (let i = 0; i < length1; i++) {
520
- if (!oldEdges.find((v) => v.id === newEdges[i].id)) {
521
- edges.push({
522
- status: 'add',
523
- edge: newEdges[i],
524
- });
525
- }
526
- }
527
- for (let i = 0; i < length2; i++) {
528
- if (!newEdges.find((v) => v.id === oldEdges[i].id)) {
529
- edges.push({
530
- status: 'delete',
531
- edge: oldEdges[i],
532
- });
533
- }
534
- }
535
- return edges;
536
- };
537
-
538
- let graphContainer;
539
- /**
540
- * 所有的 getPopupContainer 都需要保证返回的是唯一的 div。React 18 concurrent 下会反复调用该方法
541
- * 参考:https://ant.design/docs/react/migration-v5-cn#%E5%8D%87%E7%BA%A7%E5%87%86%E5%A4%87
542
- */
543
- export const getPopupContainer = () => {
544
- if (graphContainer) {
545
- return graphContainer;
546
- }
547
- return (graphContainer = document.getElementById('graph_container'));
548
- };
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export { default } from './server';
@@ -1,15 +0,0 @@
1
- export default {
2
- 'Graph Collection': 'Graph Collection',
3
- 'Collection List': 'Collection List',
4
- 'Full Screen': 'Full Screen',
5
- 'Collection Search': 'Collection Search',
6
- 'Create Collection': 'Create Collection',
7
- 'All Fields': 'All Fields',
8
- 'Association Fields': 'Association Fields',
9
- 'Choices fields': 'Choices fields',
10
- 'All relationships': 'All relationships',
11
- 'Entity relationship only': 'Entity relationship only',
12
- 'Inheritance relationship only': 'Inheritance relationship only',
13
- 'Graphical interface': 'Graphical interface',
14
- Selection: 'Selection',
15
- };
@@ -1,15 +0,0 @@
1
- export default {
2
- "Graph Collection": "Colección de gráficos",
3
- "Collection List": "Lista de colecciones",
4
- "Full Screen": "Vista completa",
5
- "Collection Search": "Búsqueda de colecciones",
6
- "Create Collection": "Crear colección",
7
- "All Fields": "Todos los campos",
8
- "Association Fields": "Campos de asociación",
9
- "Optional fields": "Campos opcionales",
10
- "All relationships": "Todas las relaciones",
11
- "Entity relationship only": "Sólo relaciones de entidad",
12
- "Inheritance relationship only": "Sólo relaciones de herencia",
13
- "Graphical interface": "Interfaz gráfica",
14
- "Selection": "Selección"
15
- };
@@ -1,15 +0,0 @@
1
- export default {
2
- 'Graph Collection': 'Collection de graphiques',
3
- 'Collection List': 'Liste des collections',
4
- 'Full Screen': 'Plein écran',
5
- 'Collection Search': 'Recherche de collection',
6
- 'Create Collection': 'Créer une collection',
7
- 'All Fields': 'Tous les champs',
8
- 'Association Fields': "Champs d'association",
9
- 'Choices fields': 'Champs de choix',
10
- 'All relationships': 'Toutes les relations',
11
- 'Entity relationship only': "Uniquement les relations d'entité",
12
- 'Inheritance relationship only': "Uniquement les relations d'héritage",
13
- 'Graphical interface': 'Interface graphique',
14
- Selection: 'Sélection',
15
- };
@@ -1,13 +0,0 @@
1
- export default {
2
- 'Graph Collection': 'グラフ化データテーブル',
3
- 'Collection List': 'データテーブルリスト',
4
- 'Full Screen': 'フルスクリーン',
5
- 'Collection Search': '表フィルタ',
6
- 'Create Collection': 'データテーブルの作成',
7
- 'All Fields': 'すべて',
8
- 'Associations Fields': '関係フィールド',
9
- 'All relationships': 'すべての関係',
10
- 'Entity relationship only': 'エンティティ関係',
11
- 'Inheritance relationship only': '継承関係',
12
- Selection: 'せんたく',
13
- };
@@ -1,15 +0,0 @@
1
- export default {
2
- 'Graph Collection': 'Coleção de Gráficos',
3
- 'Collection List': 'Lista de Coleções',
4
- 'Full Screen': 'Tela Cheia',
5
- 'Collection Search': 'Busca de Coleção',
6
- 'Create Collection': 'Criar Coleção',
7
- 'All Fields': 'Todos os Campos',
8
- 'Association Fields': 'Campos de Associação',
9
- 'Choices fields': 'Campos de opções',
10
- 'All relationships': 'Todos os relacionamentos',
11
- 'Entity relationship only': 'Somente relação de Entidade',
12
- 'Inheritance relationship only': 'Somente relação de Herança',
13
- 'Graphical interface': 'Interface Gráfica',
14
- Selection: 'Seleção',
15
- };
@@ -1,16 +0,0 @@
1
- export default {
2
- 'Graph Collection': '图形化数据表',
3
- 'Collection List': '数据表列表',
4
- 'Full Screen': '全屏',
5
- 'Collection Search': '表筛选',
6
- 'Create Collection': '创建数据表',
7
- 'All Fields': '全部',
8
- 'Association Fields': '关系字段',
9
- 'Choices fields': '选项字段',
10
- 'All relationships': '所有关系',
11
- 'Entity relationship only': '实体关系',
12
- 'Inheritance relationship only': '继承关系',
13
- 'Graphical interface': '图形化界面',
14
- 'Auto layout': '自动布局',
15
- Selection: '选择模式',
16
- };
File without changes
File without changes
@@ -1,22 +0,0 @@
1
- import { defineCollection } from '@nocobase/database';
2
-
3
- export default defineCollection({
4
- namespace: 'graph-collection-manager.graphCollectionPositions',
5
- duplicator: 'required',
6
- name: 'graphPositions',
7
- fields: [
8
- {
9
- type: 'string',
10
- name: 'collectionName',
11
- unique: true,
12
- },
13
- {
14
- type: 'double',
15
- name: 'x',
16
- },
17
- {
18
- type: 'double',
19
- name: 'y',
20
- },
21
- ],
22
- });
@@ -1,13 +0,0 @@
1
- import { Plugin } from '@nocobase/server';
2
- import path from 'path';
3
-
4
- export class GraphCollectionManagerPlugin extends Plugin {
5
- async load() {
6
- await this.db.import({
7
- directory: path.resolve(__dirname, 'collections'),
8
- });
9
- this.app.acl.allow('graphPositions', '*');
10
- }
11
- }
12
-
13
- export default GraphCollectionManagerPlugin;
File without changes
File without changes
File without changes