@localazy/strapi-plugin 0.1.10 → 0.1.11-rc.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 (59) hide show
  1. package/.eslintrc +6 -2
  2. package/admin/src/modules/@common/models/supported-content-type-fields.js +8 -0
  3. package/admin/src/modules/plugin-settings/components/ContentTransferSetup/index.js +5 -0
  4. package/admin/src/modules/plugin-settings/components/Tree/index.js +22 -5
  5. package/admin/src/modules/plugin-settings/functions/build-content-transfer-setup-schema.js +1 -1
  6. package/admin/src/modules/plugin-settings/functions/has-model-changed.js +1 -1
  7. package/admin/src/modules/plugin-settings/locale/en.js +1 -1
  8. package/admin/src/modules/plugin-settings/utils/get-filtered-models-schemas.js +1 -7
  9. package/admin/src/modules/plugin-settings/utils/get-models-tree.js +21 -3
  10. package/package.json +4 -4
  11. package/server/bootstrap.js +15 -1
  12. package/server/controllers/localazy-transfer-controller.js +67 -52
  13. package/server/functions/should-set-downloaded-property.js +61 -0
  14. package/server/models/supported-content-type-fields.js +8 -0
  15. package/server/services/index.js +2 -0
  16. package/server/services/strapi-i18n-service.js +5 -4
  17. package/server/services/strapi-localazy-i18n-service.js +104 -0
  18. package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-cookbook.js +5761 -0
  19. package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-lesson-dz.js +392 -0
  20. package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-restaurant-simple-menu.js +536 -0
  21. package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-sample-json-dz.js +4675 -0
  22. package/server/tests/fixtures/parsed-localazy-entry-to-update-entry.js +35157 -0
  23. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-cookbook-empty-recipes.js +202 -0
  24. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-cookbook.js +2700 -0
  25. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-lesson-dz.js +309 -0
  26. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-flat-simple.js +47 -0
  27. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-flat-with-media.js +169 -0
  28. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-menu-empty.js +3003 -0
  29. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-menu-with-media.js +2057 -0
  30. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-sample-json-dz.js +884 -0
  31. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-sample-json.js +46 -0
  32. package/server/tests/fixtures/strapi-plugin-all-models.js +2048 -0
  33. package/server/utils/__tests__/get-models-tree.test.js +1 -1
  34. package/server/utils/__tests__/parsed-localazy-entry-to-create-entry.test.js +237 -91
  35. package/server/utils/__tests__/parsed-localazy-entry-to-update-entry.test.js +417 -101
  36. package/server/utils/__tests__/pick-entries.test.js +936 -56
  37. package/server/utils/__tests__/populate-create-update-entry-with-base-entry.test.js +1139 -0
  38. package/server/utils/build-populate.js +5 -0
  39. package/server/utils/get-full-populate-object.js +56 -0
  40. package/server/utils/get-models-tree.js +3 -1
  41. package/server/utils/model-utils.js +43 -0
  42. package/server/utils/omit-deep.js +7 -0
  43. package/server/utils/parsed-localazy-entry-to-create-entry.js +58 -21
  44. package/server/utils/parsed-localazy-entry-to-update-entry.js +44 -4
  45. package/server/utils/pick-deep.js +22 -0
  46. package/server/utils/pick-entries.js +90 -5
  47. package/server/utils/populate-create-update-entry-with-base-entry.js +270 -0
  48. package/server/utils/transfer-setup-utils.js +14 -0
  49. package/server/tests/fixtures/all-models-with-multimedia.js +0 -1064
  50. package/server/tests/fixtures/collection-flattened.js +0 -76
  51. package/server/tests/fixtures/restaurant-flattened.js +0 -46
  52. package/server/tests/fixtures/restaurant-model.js +0 -230
  53. package/server/tests/fixtures/restaurants-entries.js +0 -152
  54. package/server/tests/fixtures/restaurants-pick-paths.js +0 -15
  55. package/server/tests/fixtures/strapi-book-with-multimedia-components-cs.js +0 -31
  56. package/server/tests/fixtures/stringified-book-cs.js +0 -3
  57. package/server/tests/fixtures/stringified-book-with-multimedia-components-cs.js +0 -3
  58. package/server/tests/fixtures/stringified-restaurant-cs.js +0 -3
  59. package/server/tests/fixtures/stringified-restaurant-de.js +0 -5
@@ -1,1064 +0,0 @@
1
- "use strict";
2
-
3
- module.exports = [
4
- {
5
- kind: "singleType",
6
- collectionName: "tokens",
7
- info: {
8
- singularName: "token",
9
- pluralName: "tokens",
10
- displayName: "Token",
11
- },
12
- options: {
13
- draftAndPublish: false,
14
- },
15
- pluginOptions: {},
16
- attributes: {
17
- access_token: {
18
- type: "string",
19
- },
20
- createdAt: {
21
- type: "datetime",
22
- },
23
- updatedAt: {
24
- type: "datetime",
25
- },
26
- createdBy: {
27
- type: "relation",
28
- relation: "oneToOne",
29
- target: "admin::user",
30
- configurable: false,
31
- writable: false,
32
- visible: false,
33
- useJoinTable: false,
34
- private: true,
35
- },
36
- updatedBy: {
37
- type: "relation",
38
- relation: "oneToOne",
39
- target: "admin::user",
40
- configurable: false,
41
- writable: false,
42
- visible: false,
43
- useJoinTable: false,
44
- private: true,
45
- },
46
- },
47
- __schema__: {
48
- collectionName: "tokens",
49
- info: {
50
- singularName: "token",
51
- pluralName: "tokens",
52
- displayName: "Token",
53
- },
54
- options: {
55
- draftAndPublish: false,
56
- },
57
- pluginOptions: {},
58
- attributes: {
59
- access_token: {
60
- type: "string",
61
- },
62
- },
63
- kind: "singleType",
64
- },
65
- modelType: "contentType",
66
- modelName: "token",
67
- connection: "default",
68
- uid: "plugin::localazy.token",
69
- plugin: "localazy",
70
- globalId: "LocalazyToken",
71
- actions: undefined,
72
- lifecycles: undefined,
73
- singularName: "token",
74
- tableName: "tokens",
75
- },
76
- {
77
- kind: "singleType",
78
- collectionName: "testtokens",
79
- info: {
80
- singularName: "testtoken",
81
- pluralName: "testtokens",
82
- displayName: "testtoken",
83
- },
84
- options: {
85
- draftAndPublish: true,
86
- comment: "",
87
- },
88
- attributes: {
89
- at: {
90
- type: "string",
91
- },
92
- createdAt: {
93
- type: "datetime",
94
- },
95
- updatedAt: {
96
- type: "datetime",
97
- },
98
- publishedAt: {
99
- type: "datetime",
100
- configurable: false,
101
- writable: true,
102
- visible: false,
103
- },
104
- createdBy: {
105
- type: "relation",
106
- relation: "oneToOne",
107
- target: "admin::user",
108
- configurable: false,
109
- writable: false,
110
- visible: false,
111
- useJoinTable: false,
112
- private: true,
113
- },
114
- updatedBy: {
115
- type: "relation",
116
- relation: "oneToOne",
117
- target: "admin::user",
118
- configurable: false,
119
- writable: false,
120
- visible: false,
121
- useJoinTable: false,
122
- private: true,
123
- },
124
- },
125
- __schema__: {
126
- collectionName: "testtokens",
127
- info: {
128
- singularName: "testtoken",
129
- pluralName: "testtokens",
130
- displayName: "testtoken",
131
- },
132
- options: {
133
- draftAndPublish: true,
134
- comment: "",
135
- },
136
- attributes: {
137
- at: {
138
- type: "string",
139
- },
140
- },
141
- kind: "singleType",
142
- },
143
- modelType: "contentType",
144
- modelName: "testtoken",
145
- connection: "default",
146
- uid: "plugin::localazy.testtoken",
147
- plugin: "localazy",
148
- globalId: "LocalazyTesttoken",
149
- actions: undefined,
150
- lifecycles: undefined,
151
- singularName: "testtoken",
152
- tableName: "testtokens",
153
- },
154
- {
155
- collectionName: "up_users",
156
- info: {
157
- name: "user",
158
- description: "",
159
- singularName: "user",
160
- pluralName: "users",
161
- displayName: "User",
162
- },
163
- options: {
164
- draftAndPublish: false,
165
- timestamps: true,
166
- },
167
- attributes: {
168
- username: {
169
- type: "string",
170
- minLength: 3,
171
- unique: true,
172
- configurable: false,
173
- required: true,
174
- },
175
- email: {
176
- type: "email",
177
- minLength: 6,
178
- configurable: false,
179
- required: true,
180
- },
181
- provider: {
182
- type: "string",
183
- configurable: false,
184
- },
185
- password: {
186
- type: "password",
187
- minLength: 6,
188
- configurable: false,
189
- private: true,
190
- },
191
- resetPasswordToken: {
192
- type: "string",
193
- configurable: false,
194
- private: true,
195
- },
196
- confirmationToken: {
197
- type: "string",
198
- configurable: false,
199
- private: true,
200
- },
201
- confirmed: {
202
- type: "boolean",
203
- default: false,
204
- configurable: false,
205
- },
206
- blocked: {
207
- type: "boolean",
208
- default: false,
209
- configurable: false,
210
- },
211
- role: {
212
- type: "relation",
213
- relation: "manyToOne",
214
- target: "plugin::users-permissions.role",
215
- inversedBy: "users",
216
- configurable: false,
217
- },
218
- createdAt: {
219
- type: "datetime",
220
- },
221
- updatedAt: {
222
- type: "datetime",
223
- },
224
- createdBy: {
225
- type: "relation",
226
- relation: "oneToOne",
227
- target: "admin::user",
228
- configurable: false,
229
- writable: false,
230
- visible: false,
231
- useJoinTable: false,
232
- private: true,
233
- },
234
- updatedBy: {
235
- type: "relation",
236
- relation: "oneToOne",
237
- target: "admin::user",
238
- configurable: false,
239
- writable: false,
240
- visible: false,
241
- useJoinTable: false,
242
- private: true,
243
- },
244
- },
245
- config: {
246
- attributes: {
247
- resetPasswordToken: {
248
- hidden: true,
249
- },
250
- confirmationToken: {
251
- hidden: true,
252
- },
253
- provider: {
254
- hidden: true,
255
- },
256
- },
257
- },
258
- kind: "collectionType",
259
- __schema__: {
260
- collectionName: "up_users",
261
- info: {
262
- name: "user",
263
- description: "",
264
- singularName: "user",
265
- pluralName: "users",
266
- displayName: "User",
267
- },
268
- options: {
269
- draftAndPublish: false,
270
- timestamps: true,
271
- },
272
- attributes: {
273
- username: {
274
- type: "string",
275
- minLength: 3,
276
- unique: true,
277
- configurable: false,
278
- required: true,
279
- },
280
- email: {
281
- type: "email",
282
- minLength: 6,
283
- configurable: false,
284
- required: true,
285
- },
286
- provider: {
287
- type: "string",
288
- configurable: false,
289
- },
290
- password: {
291
- type: "password",
292
- minLength: 6,
293
- configurable: false,
294
- private: true,
295
- },
296
- resetPasswordToken: {
297
- type: "string",
298
- configurable: false,
299
- private: true,
300
- },
301
- confirmationToken: {
302
- type: "string",
303
- configurable: false,
304
- private: true,
305
- },
306
- confirmed: {
307
- type: "boolean",
308
- default: false,
309
- configurable: false,
310
- },
311
- blocked: {
312
- type: "boolean",
313
- default: false,
314
- configurable: false,
315
- },
316
- role: {
317
- type: "relation",
318
- relation: "manyToOne",
319
- target: "plugin::users-permissions.role",
320
- inversedBy: "users",
321
- configurable: false,
322
- },
323
- },
324
- kind: "collectionType",
325
- },
326
- modelType: "contentType",
327
- modelName: "user",
328
- connection: "default",
329
- uid: "plugin::users-permissions.user",
330
- plugin: "users-permissions",
331
- globalId: "UsersPermissionsUser",
332
- actions: undefined,
333
- lifecycles: undefined,
334
- singularName: "user",
335
- tableName: "up_users",
336
- },
337
- {
338
- kind: "collectionType",
339
- collectionName: "books",
340
- info: {
341
- singularName: "book",
342
- pluralName: "books",
343
- displayName: "Book",
344
- description: "",
345
- },
346
- options: {
347
- draftAndPublish: true,
348
- },
349
- pluginOptions: {
350
- i18n: {
351
- localized: true,
352
- },
353
- },
354
- attributes: {
355
- Title: {
356
- type: "string",
357
- pluginOptions: {
358
- i18n: {
359
- localized: true,
360
- },
361
- },
362
- },
363
- Author: {
364
- type: "string",
365
- pluginOptions: {
366
- i18n: {
367
- localized: true,
368
- },
369
- },
370
- },
371
- Pages: {
372
- type: "integer",
373
- pluginOptions: {
374
- i18n: {
375
- localized: true,
376
- },
377
- },
378
- },
379
- additional_info: {
380
- type: "component",
381
- repeatable: false,
382
- component: "food.pub-component-1",
383
- pluginOptions: {
384
- i18n: {
385
- localized: true,
386
- },
387
- },
388
- },
389
- cover: {
390
- type: "relation",
391
- relation: "morphOne",
392
- target: "plugin::upload.file",
393
- morphBy: "related",
394
- },
395
- presentations: {
396
- type: "relation",
397
- relation: "morphMany",
398
- target: "plugin::upload.file",
399
- morphBy: "related",
400
- },
401
- seo_setup: {
402
- type: "component",
403
- repeatable: true,
404
- pluginOptions: {
405
- i18n: {
406
- localized: true,
407
- },
408
- },
409
- component: "seo.gallery",
410
- },
411
- non_localizable_name: {
412
- pluginOptions: {
413
- i18n: {
414
- localized: false,
415
- },
416
- },
417
- type: "string",
418
- },
419
- createdAt: {
420
- type: "datetime",
421
- },
422
- updatedAt: {
423
- type: "datetime",
424
- },
425
- publishedAt: {
426
- type: "datetime",
427
- configurable: false,
428
- writable: true,
429
- visible: false,
430
- },
431
- createdBy: {
432
- type: "relation",
433
- relation: "oneToOne",
434
- target: "admin::user",
435
- configurable: false,
436
- writable: false,
437
- visible: false,
438
- useJoinTable: false,
439
- private: true,
440
- },
441
- updatedBy: {
442
- type: "relation",
443
- relation: "oneToOne",
444
- target: "admin::user",
445
- configurable: false,
446
- writable: false,
447
- visible: false,
448
- useJoinTable: false,
449
- private: true,
450
- },
451
- localizations: {
452
- writable: true,
453
- private: false,
454
- configurable: false,
455
- visible: false,
456
- type: "relation",
457
- relation: "oneToMany",
458
- target: "api::book.book",
459
- },
460
- locale: {
461
- writable: true,
462
- private: false,
463
- configurable: false,
464
- visible: false,
465
- type: "string",
466
- },
467
- },
468
- __schema__: {
469
- collectionName: "books",
470
- info: {
471
- singularName: "book",
472
- pluralName: "books",
473
- displayName: "Book",
474
- description: "",
475
- },
476
- options: {
477
- draftAndPublish: true,
478
- },
479
- pluginOptions: {
480
- i18n: {
481
- localized: true,
482
- },
483
- },
484
- attributes: {
485
- Title: {
486
- type: "string",
487
- pluginOptions: {
488
- i18n: {
489
- localized: true,
490
- },
491
- },
492
- },
493
- Author: {
494
- type: "string",
495
- pluginOptions: {
496
- i18n: {
497
- localized: true,
498
- },
499
- },
500
- },
501
- Pages: {
502
- type: "integer",
503
- pluginOptions: {
504
- i18n: {
505
- localized: true,
506
- },
507
- },
508
- },
509
- additional_info: {
510
- type: "component",
511
- repeatable: false,
512
- component: "food.pub-component-1",
513
- pluginOptions: {
514
- i18n: {
515
- localized: true,
516
- },
517
- },
518
- },
519
- cover: {
520
- type: "media",
521
- multiple: false,
522
- required: false,
523
- allowedTypes: ["images", "files", "videos", "audios"],
524
- pluginOptions: {
525
- i18n: {
526
- localized: true,
527
- },
528
- },
529
- },
530
- presentations: {
531
- type: "media",
532
- multiple: true,
533
- required: false,
534
- allowedTypes: ["images", "files", "videos", "audios"],
535
- pluginOptions: {
536
- i18n: {
537
- localized: true,
538
- },
539
- },
540
- },
541
- seo_setup: {
542
- type: "component",
543
- repeatable: true,
544
- pluginOptions: {
545
- i18n: {
546
- localized: true,
547
- },
548
- },
549
- component: "seo.gallery",
550
- },
551
- non_localizable_name: {
552
- pluginOptions: {
553
- i18n: {
554
- localized: false,
555
- },
556
- },
557
- type: "string",
558
- },
559
- },
560
- kind: "collectionType",
561
- },
562
- modelType: "contentType",
563
- modelName: "book",
564
- connection: "default",
565
- uid: "api::book.book",
566
- apiName: "book",
567
- globalId: "Book",
568
- actions: {},
569
- lifecycles: {},
570
- singularName: "book",
571
- tableName: "books",
572
- },
573
- {
574
- kind: "collectionType",
575
- collectionName: "restaurants",
576
- info: {
577
- singularName: "restaurant",
578
- pluralName: "restaurants",
579
- displayName: "Restaurant",
580
- description: "",
581
- },
582
- options: {
583
- draftAndPublish: true,
584
- },
585
- pluginOptions: {
586
- i18n: {
587
- localized: true,
588
- },
589
- },
590
- attributes: {
591
- title: {
592
- pluginOptions: {
593
- i18n: {
594
- localized: true,
595
- },
596
- },
597
- type: "string",
598
- required: true,
599
- },
600
- description: {
601
- pluginOptions: {
602
- i18n: {
603
- localized: true,
604
- },
605
- },
606
- type: "text",
607
- },
608
- books: {
609
- type: "relation",
610
- relation: "oneToMany",
611
- target: "api::book.book",
612
- },
613
- recipes: {
614
- type: "component",
615
- repeatable: true,
616
- pluginOptions: {
617
- i18n: {
618
- localized: true,
619
- },
620
- },
621
- component: "food.recipe",
622
- },
623
- descs: {
624
- type: "component",
625
- repeatable: false,
626
- pluginOptions: {
627
- i18n: {
628
- localized: true,
629
- },
630
- },
631
- component: "food.pub-component-1",
632
- },
633
- street: {
634
- pluginOptions: {
635
- i18n: {
636
- localized: true,
637
- },
638
- },
639
- type: "string",
640
- },
641
- city: {
642
- pluginOptions: {
643
- i18n: {
644
- localized: true,
645
- },
646
- },
647
- type: "string",
648
- },
649
- country: {
650
- pluginOptions: {
651
- i18n: {
652
- localized: true,
653
- },
654
- },
655
- type: "string",
656
- },
657
- createdAt: {
658
- type: "datetime",
659
- },
660
- updatedAt: {
661
- type: "datetime",
662
- },
663
- publishedAt: {
664
- type: "datetime",
665
- configurable: false,
666
- writable: true,
667
- visible: false,
668
- },
669
- createdBy: {
670
- type: "relation",
671
- relation: "oneToOne",
672
- target: "admin::user",
673
- configurable: false,
674
- writable: false,
675
- visible: false,
676
- useJoinTable: false,
677
- private: true,
678
- },
679
- updatedBy: {
680
- type: "relation",
681
- relation: "oneToOne",
682
- target: "admin::user",
683
- configurable: false,
684
- writable: false,
685
- visible: false,
686
- useJoinTable: false,
687
- private: true,
688
- },
689
- localizations: {
690
- writable: true,
691
- private: false,
692
- configurable: false,
693
- visible: false,
694
- type: "relation",
695
- relation: "oneToMany",
696
- target: "api::restaurant.restaurant",
697
- },
698
- locale: {
699
- writable: true,
700
- private: false,
701
- configurable: false,
702
- visible: false,
703
- type: "string",
704
- },
705
- },
706
- __schema__: {
707
- collectionName: "restaurants",
708
- info: {
709
- singularName: "restaurant",
710
- pluralName: "restaurants",
711
- displayName: "Restaurant",
712
- description: "",
713
- },
714
- options: {
715
- draftAndPublish: true,
716
- },
717
- pluginOptions: {
718
- i18n: {
719
- localized: true,
720
- },
721
- },
722
- attributes: {
723
- title: {
724
- pluginOptions: {
725
- i18n: {
726
- localized: true,
727
- },
728
- },
729
- type: "string",
730
- required: true,
731
- },
732
- description: {
733
- pluginOptions: {
734
- i18n: {
735
- localized: true,
736
- },
737
- },
738
- type: "text",
739
- },
740
- books: {
741
- type: "relation",
742
- relation: "oneToMany",
743
- target: "api::book.book",
744
- },
745
- recipes: {
746
- type: "component",
747
- repeatable: true,
748
- pluginOptions: {
749
- i18n: {
750
- localized: true,
751
- },
752
- },
753
- component: "food.recipe",
754
- },
755
- descs: {
756
- type: "component",
757
- repeatable: false,
758
- pluginOptions: {
759
- i18n: {
760
- localized: true,
761
- },
762
- },
763
- component: "food.pub-component-1",
764
- },
765
- street: {
766
- pluginOptions: {
767
- i18n: {
768
- localized: true,
769
- },
770
- },
771
- type: "string",
772
- },
773
- city: {
774
- pluginOptions: {
775
- i18n: {
776
- localized: true,
777
- },
778
- },
779
- type: "string",
780
- },
781
- country: {
782
- pluginOptions: {
783
- i18n: {
784
- localized: true,
785
- },
786
- },
787
- type: "string",
788
- },
789
- },
790
- kind: "collectionType",
791
- },
792
- modelType: "contentType",
793
- modelName: "restaurant",
794
- connection: "default",
795
- uid: "api::restaurant.restaurant",
796
- apiName: "restaurant",
797
- globalId: "Restaurant",
798
- actions: {},
799
- lifecycles: {},
800
- singularName: "restaurant",
801
- tableName: "restaurants",
802
- },
803
- {
804
- collectionName: "components_food_ingredient_variants",
805
- info: {
806
- displayName: "ingredient_variants",
807
- icon: "atlas",
808
- },
809
- options: {},
810
- attributes: {
811
- name: {
812
- type: "string",
813
- },
814
- },
815
- __filename__: "ingredient-variants.json",
816
- __schema__: {
817
- collectionName: "components_food_ingredient_variants",
818
- info: {
819
- displayName: "ingredient_variants",
820
- icon: "atlas",
821
- },
822
- options: {},
823
- attributes: {
824
- name: {
825
- type: "string",
826
- },
827
- },
828
- __filename__: "ingredient-variants.json",
829
- },
830
- uid: "food.ingredient-variants",
831
- category: "food",
832
- modelType: "component",
833
- modelName: "ingredient-variants",
834
- globalId: "ComponentFoodIngredientVariants",
835
- singularName: "ingredient-variants",
836
- tableName: "components_food_ingredient_variants",
837
- },
838
- {
839
- collectionName: "components_food_ingredients",
840
- info: {
841
- displayName: "ingredients",
842
- icon: "atom",
843
- description: "",
844
- },
845
- options: {},
846
- attributes: {
847
- name: {
848
- type: "string",
849
- },
850
- pcs: {
851
- type: "integer",
852
- },
853
- required: {
854
- type: "boolean",
855
- },
856
- },
857
- __filename__: "ingredients.json",
858
- __schema__: {
859
- collectionName: "components_food_ingredients",
860
- info: {
861
- displayName: "ingredients",
862
- icon: "atom",
863
- description: "",
864
- },
865
- options: {},
866
- attributes: {
867
- name: {
868
- type: "string",
869
- },
870
- pcs: {
871
- type: "integer",
872
- },
873
- required: {
874
- type: "boolean",
875
- },
876
- },
877
- __filename__: "ingredients.json",
878
- },
879
- uid: "food.ingredients",
880
- category: "food",
881
- modelType: "component",
882
- modelName: "ingredients",
883
- globalId: "ComponentFoodIngredients",
884
- singularName: "ingredients",
885
- tableName: "components_food_ingredients",
886
- },
887
- {
888
- collectionName: "components_food_pub_component_1s",
889
- info: {
890
- displayName: "Pub Component 1",
891
- icon: "american-sign-language-interpreting",
892
- description: "",
893
- },
894
- options: {},
895
- attributes: {
896
- rich_description: {
897
- type: "richtext",
898
- },
899
- history: {
900
- type: "text",
901
- },
902
- excerpt: {
903
- type: "string",
904
- },
905
- test_variants: {
906
- type: "component",
907
- repeatable: false,
908
- component: "food.ingredient-variants",
909
- },
910
- },
911
- __filename__: "pub-component-1.json",
912
- __schema__: {
913
- collectionName: "components_food_pub_component_1s",
914
- info: {
915
- displayName: "Pub Component 1",
916
- icon: "american-sign-language-interpreting",
917
- description: "",
918
- },
919
- options: {},
920
- attributes: {
921
- rich_description: {
922
- type: "richtext",
923
- },
924
- history: {
925
- type: "text",
926
- },
927
- excerpt: {
928
- type: "string",
929
- },
930
- test_variants: {
931
- type: "component",
932
- repeatable: false,
933
- component: "food.ingredient-variants",
934
- },
935
- },
936
- __filename__: "pub-component-1.json",
937
- },
938
- uid: "food.pub-component-1",
939
- category: "food",
940
- modelType: "component",
941
- modelName: "pub-component-1",
942
- globalId: "ComponentFoodPubComponent1",
943
- singularName: "pub-component-1",
944
- tableName: "components_food_pub_component_1s",
945
- },
946
- {
947
- collectionName: "components_food_recipes",
948
- info: {
949
- displayName: "recipe",
950
- icon: "ad",
951
- description: "",
952
- },
953
- options: {},
954
- attributes: {
955
- name: {
956
- type: "string",
957
- },
958
- ingredients: {
959
- type: "component",
960
- repeatable: true,
961
- component: "food.ingredients",
962
- },
963
- variants: {
964
- type: "component",
965
- repeatable: false,
966
- component: "food.ingredient-variants",
967
- },
968
- },
969
- __filename__: "recipe.json",
970
- __schema__: {
971
- collectionName: "components_food_recipes",
972
- info: {
973
- displayName: "recipe",
974
- icon: "ad",
975
- description: "",
976
- },
977
- options: {},
978
- attributes: {
979
- name: {
980
- type: "string",
981
- },
982
- ingredients: {
983
- type: "component",
984
- repeatable: true,
985
- component: "food.ingredients",
986
- },
987
- variants: {
988
- type: "component",
989
- repeatable: false,
990
- component: "food.ingredient-variants",
991
- },
992
- },
993
- __filename__: "recipe.json",
994
- },
995
- uid: "food.recipe",
996
- category: "food",
997
- modelType: "component",
998
- modelName: "recipe",
999
- globalId: "ComponentFoodRecipe",
1000
- singularName: "recipe",
1001
- tableName: "components_food_recipes",
1002
- },
1003
- {
1004
- collectionName: "components_seo_galleries",
1005
- info: {
1006
- displayName: "Gallery",
1007
- icon: "address-card",
1008
- description: "",
1009
- },
1010
- options: {},
1011
- attributes: {
1012
- main_image: {
1013
- type: "relation",
1014
- relation: "morphOne",
1015
- target: "plugin::upload.file",
1016
- morphBy: "related",
1017
- },
1018
- rest: {
1019
- type: "relation",
1020
- relation: "morphMany",
1021
- target: "plugin::upload.file",
1022
- morphBy: "related",
1023
- },
1024
- seo_desc: {
1025
- type: "string",
1026
- },
1027
- },
1028
- __filename__: "gallery.json",
1029
- __schema__: {
1030
- collectionName: "components_seo_galleries",
1031
- info: {
1032
- displayName: "Gallery",
1033
- icon: "address-card",
1034
- description: "",
1035
- },
1036
- options: {},
1037
- attributes: {
1038
- main_image: {
1039
- type: "media",
1040
- multiple: false,
1041
- required: false,
1042
- allowedTypes: ["images", "files", "videos", "audios"],
1043
- },
1044
- rest: {
1045
- type: "media",
1046
- multiple: true,
1047
- required: false,
1048
- allowedTypes: ["images", "videos", "audios", "files"],
1049
- },
1050
- seo_desc: {
1051
- type: "string",
1052
- },
1053
- },
1054
- __filename__: "gallery.json",
1055
- },
1056
- uid: "seo.gallery",
1057
- category: "seo",
1058
- modelType: "component",
1059
- modelName: "gallery",
1060
- globalId: "ComponentSeoGallery",
1061
- singularName: "gallery",
1062
- tableName: "components_seo_galleries",
1063
- },
1064
- ];