@localazy/strapi-plugin 0.1.11-rc.0 → 0.1.11-rc.2

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 (31) hide show
  1. package/admin/src/modules/plugin-settings/components/ContentTransferSetup/index.js +5 -0
  2. package/admin/src/modules/plugin-settings/components/Tree/index.js +21 -6
  3. package/admin/src/modules/plugin-settings/functions/build-content-transfer-setup-schema.js +1 -1
  4. package/admin/src/modules/plugin-settings/functions/has-model-changed.js +1 -1
  5. package/admin/src/modules/plugin-settings/locale/en.js +1 -1
  6. package/admin/src/modules/plugin-settings/utils/get-filtered-models-schemas.js +1 -7
  7. package/admin/src/modules/plugin-settings/utils/get-models-tree.js +19 -3
  8. package/package.json +4 -4
  9. package/server/controllers/localazy-transfer-controller.js +29 -8
  10. package/server/functions/should-set-downloaded-property.js +48 -3
  11. package/server/services/strapi-i18n-service.js +1 -1
  12. package/server/services/strapi-localazy-i18n-service.js +1 -1
  13. package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-lesson-dz.js +392 -0
  14. package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-sample-json-dz.js +4675 -0
  15. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-lesson-dz.js +309 -0
  16. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-sample-json-dz.js +884 -0
  17. package/server/tests/fixtures/strapi-plugin-all-models.js +844 -37
  18. package/server/utils/__tests__/parsed-localazy-entry-to-create-entry.test.js +211 -62
  19. package/server/utils/__tests__/pick-entries.test.js +936 -56
  20. package/server/utils/__tests__/populate-create-update-entry-with-base-entry.test.js +287 -0
  21. package/server/utils/build-populate.js +5 -0
  22. package/server/utils/model-utils.js +5 -0
  23. package/server/utils/omit-deep.js +7 -0
  24. package/server/utils/parsed-localazy-entry-to-create-entry.js +58 -4
  25. package/server/utils/parsed-localazy-entry-to-update-entry.js +6 -1
  26. package/server/utils/pick-deep.js +22 -0
  27. package/server/utils/pick-entries.js +90 -5
  28. package/server/utils/populate-create-update-entry-with-base-entry.js +51 -3
  29. package/server/tests/fixtures/collection-flattened.js +0 -76
  30. package/server/tests/fixtures/restaurant-flattened.js +0 -46
  31. package/server/tests/fixtures/restaurants-pick-paths.js +0 -15
@@ -1,4 +1,130 @@
1
1
  module.exports = [
2
+ {
3
+ kind: "collectionType",
4
+ collectionName: "chapters",
5
+ info: {
6
+ singularName: "chapter",
7
+ pluralName: "chapters",
8
+ displayName: "chapter",
9
+ description: "",
10
+ },
11
+ options: {
12
+ draftAndPublish: true,
13
+ },
14
+ pluginOptions: {
15
+ i18n: {
16
+ localized: true,
17
+ },
18
+ },
19
+ attributes: {
20
+ title: {
21
+ pluginOptions: {
22
+ i18n: {
23
+ localized: true,
24
+ },
25
+ },
26
+ type: "string",
27
+ },
28
+ lessons: {
29
+ type: "relation",
30
+ relation: "oneToMany",
31
+ target: "api::lesson.lesson",
32
+ },
33
+ createdAt: {
34
+ type: "datetime",
35
+ },
36
+ updatedAt: {
37
+ type: "datetime",
38
+ },
39
+ publishedAt: {
40
+ type: "datetime",
41
+ configurable: false,
42
+ writable: true,
43
+ visible: false,
44
+ },
45
+ createdBy: {
46
+ type: "relation",
47
+ relation: "oneToOne",
48
+ target: "admin::user",
49
+ configurable: false,
50
+ writable: false,
51
+ visible: false,
52
+ useJoinTable: false,
53
+ private: true,
54
+ },
55
+ updatedBy: {
56
+ type: "relation",
57
+ relation: "oneToOne",
58
+ target: "admin::user",
59
+ configurable: false,
60
+ writable: false,
61
+ visible: false,
62
+ useJoinTable: false,
63
+ private: true,
64
+ },
65
+ localizations: {
66
+ writable: true,
67
+ private: false,
68
+ configurable: false,
69
+ visible: false,
70
+ type: "relation",
71
+ relation: "oneToMany",
72
+ target: "api::chapter.chapter",
73
+ },
74
+ locale: {
75
+ writable: true,
76
+ private: false,
77
+ configurable: false,
78
+ visible: false,
79
+ type: "string",
80
+ },
81
+ },
82
+ __schema__: {
83
+ collectionName: "chapters",
84
+ info: {
85
+ singularName: "chapter",
86
+ pluralName: "chapters",
87
+ displayName: "chapter",
88
+ description: "",
89
+ },
90
+ options: {
91
+ draftAndPublish: true,
92
+ },
93
+ pluginOptions: {
94
+ i18n: {
95
+ localized: true,
96
+ },
97
+ },
98
+ attributes: {
99
+ title: {
100
+ pluginOptions: {
101
+ i18n: {
102
+ localized: true,
103
+ },
104
+ },
105
+ type: "string",
106
+ },
107
+ lessons: {
108
+ type: "relation",
109
+ relation: "oneToMany",
110
+ target: "api::lesson.lesson",
111
+ },
112
+ },
113
+ kind: "collectionType",
114
+ },
115
+ modelType: "contentType",
116
+ modelName: "chapter",
117
+ connection: "default",
118
+ uid: "api::chapter.chapter",
119
+ apiName: "chapter",
120
+ globalId: "Chapter",
121
+ actions: {
122
+ },
123
+ lifecycles: {
124
+ },
125
+ singularName: "chapter",
126
+ tableName: "chapters",
127
+ },
2
128
  {
3
129
  kind: "collectionType",
4
130
  collectionName: "cookbooks",
@@ -59,13 +185,370 @@ module.exports = [
59
185
  localized: true,
60
186
  },
61
187
  },
62
- component: "food.gallery",
63
- },
64
- used_in_restaurants: {
65
- type: "relation",
66
- relation: "oneToMany",
67
- target: "api::restaurant-simple-menu.restaurant-simple-menu",
68
- mappedBy: "used_cookbooks",
188
+ component: "food.gallery",
189
+ },
190
+ used_in_restaurants: {
191
+ type: "relation",
192
+ relation: "oneToMany",
193
+ target: "api::restaurant-simple-menu.restaurant-simple-menu",
194
+ mappedBy: "used_cookbooks",
195
+ },
196
+ createdAt: {
197
+ type: "datetime",
198
+ },
199
+ updatedAt: {
200
+ type: "datetime",
201
+ },
202
+ publishedAt: {
203
+ type: "datetime",
204
+ configurable: false,
205
+ writable: true,
206
+ visible: false,
207
+ },
208
+ createdBy: {
209
+ type: "relation",
210
+ relation: "oneToOne",
211
+ target: "admin::user",
212
+ configurable: false,
213
+ writable: false,
214
+ visible: false,
215
+ useJoinTable: false,
216
+ private: true,
217
+ },
218
+ updatedBy: {
219
+ type: "relation",
220
+ relation: "oneToOne",
221
+ target: "admin::user",
222
+ configurable: false,
223
+ writable: false,
224
+ visible: false,
225
+ useJoinTable: false,
226
+ private: true,
227
+ },
228
+ localizations: {
229
+ writable: true,
230
+ private: false,
231
+ configurable: false,
232
+ visible: false,
233
+ type: "relation",
234
+ relation: "oneToMany",
235
+ target: "api::cookbook.cookbook",
236
+ },
237
+ locale: {
238
+ writable: true,
239
+ private: false,
240
+ configurable: false,
241
+ visible: false,
242
+ type: "string",
243
+ },
244
+ },
245
+ __schema__: {
246
+ collectionName: "cookbooks",
247
+ info: {
248
+ singularName: "cookbook",
249
+ pluralName: "cookbooks",
250
+ displayName: "cookbook",
251
+ description: "",
252
+ },
253
+ options: {
254
+ draftAndPublish: true,
255
+ },
256
+ pluginOptions: {
257
+ i18n: {
258
+ localized: true,
259
+ },
260
+ },
261
+ attributes: {
262
+ title: {
263
+ pluginOptions: {
264
+ i18n: {
265
+ localized: true,
266
+ },
267
+ },
268
+ type: "string",
269
+ },
270
+ author_name: {
271
+ pluginOptions: {
272
+ i18n: {
273
+ localized: false,
274
+ },
275
+ },
276
+ type: "string",
277
+ },
278
+ pages: {
279
+ pluginOptions: {
280
+ i18n: {
281
+ localized: true,
282
+ },
283
+ },
284
+ type: "integer",
285
+ },
286
+ recipes: {
287
+ type: "component",
288
+ repeatable: true,
289
+ pluginOptions: {
290
+ i18n: {
291
+ localized: true,
292
+ },
293
+ },
294
+ component: "food.cookbook-item",
295
+ },
296
+ gallery: {
297
+ type: "component",
298
+ repeatable: false,
299
+ pluginOptions: {
300
+ i18n: {
301
+ localized: true,
302
+ },
303
+ },
304
+ component: "food.gallery",
305
+ },
306
+ used_in_restaurants: {
307
+ type: "relation",
308
+ relation: "oneToMany",
309
+ target: "api::restaurant-simple-menu.restaurant-simple-menu",
310
+ mappedBy: "used_cookbooks",
311
+ },
312
+ },
313
+ kind: "collectionType",
314
+ },
315
+ modelType: "contentType",
316
+ modelName: "cookbook",
317
+ connection: "default",
318
+ uid: "api::cookbook.cookbook",
319
+ apiName: "cookbook",
320
+ globalId: "Cookbook",
321
+ actions: {
322
+ },
323
+ lifecycles: {
324
+ },
325
+ singularName: "cookbook",
326
+ tableName: "cookbooks",
327
+ },
328
+ {
329
+ kind: "collectionType",
330
+ collectionName: "courses",
331
+ info: {
332
+ singularName: "course",
333
+ pluralName: "courses",
334
+ displayName: "course",
335
+ description: "",
336
+ },
337
+ options: {
338
+ draftAndPublish: true,
339
+ },
340
+ pluginOptions: {
341
+ i18n: {
342
+ localized: true,
343
+ },
344
+ },
345
+ attributes: {
346
+ title: {
347
+ pluginOptions: {
348
+ i18n: {
349
+ localized: true,
350
+ },
351
+ },
352
+ type: "string",
353
+ },
354
+ description: {
355
+ pluginOptions: {
356
+ i18n: {
357
+ localized: true,
358
+ },
359
+ },
360
+ type: "richtext",
361
+ },
362
+ chapters: {
363
+ type: "relation",
364
+ relation: "oneToMany",
365
+ target: "api::chapter.chapter",
366
+ },
367
+ gallery: {
368
+ type: "component",
369
+ repeatable: false,
370
+ pluginOptions: {
371
+ i18n: {
372
+ localized: true,
373
+ },
374
+ },
375
+ component: "food.gallery",
376
+ },
377
+ createdAt: {
378
+ type: "datetime",
379
+ },
380
+ updatedAt: {
381
+ type: "datetime",
382
+ },
383
+ publishedAt: {
384
+ type: "datetime",
385
+ configurable: false,
386
+ writable: true,
387
+ visible: false,
388
+ },
389
+ createdBy: {
390
+ type: "relation",
391
+ relation: "oneToOne",
392
+ target: "admin::user",
393
+ configurable: false,
394
+ writable: false,
395
+ visible: false,
396
+ useJoinTable: false,
397
+ private: true,
398
+ },
399
+ updatedBy: {
400
+ type: "relation",
401
+ relation: "oneToOne",
402
+ target: "admin::user",
403
+ configurable: false,
404
+ writable: false,
405
+ visible: false,
406
+ useJoinTable: false,
407
+ private: true,
408
+ },
409
+ localizations: {
410
+ writable: true,
411
+ private: false,
412
+ configurable: false,
413
+ visible: false,
414
+ type: "relation",
415
+ relation: "oneToMany",
416
+ target: "api::course.course",
417
+ },
418
+ locale: {
419
+ writable: true,
420
+ private: false,
421
+ configurable: false,
422
+ visible: false,
423
+ type: "string",
424
+ },
425
+ },
426
+ __schema__: {
427
+ collectionName: "courses",
428
+ info: {
429
+ singularName: "course",
430
+ pluralName: "courses",
431
+ displayName: "course",
432
+ description: "",
433
+ },
434
+ options: {
435
+ draftAndPublish: true,
436
+ },
437
+ pluginOptions: {
438
+ i18n: {
439
+ localized: true,
440
+ },
441
+ },
442
+ attributes: {
443
+ title: {
444
+ pluginOptions: {
445
+ i18n: {
446
+ localized: true,
447
+ },
448
+ },
449
+ type: "string",
450
+ },
451
+ description: {
452
+ pluginOptions: {
453
+ i18n: {
454
+ localized: true,
455
+ },
456
+ },
457
+ type: "richtext",
458
+ },
459
+ chapters: {
460
+ type: "relation",
461
+ relation: "oneToMany",
462
+ target: "api::chapter.chapter",
463
+ },
464
+ gallery: {
465
+ type: "component",
466
+ repeatable: false,
467
+ pluginOptions: {
468
+ i18n: {
469
+ localized: true,
470
+ },
471
+ },
472
+ component: "food.gallery",
473
+ },
474
+ },
475
+ kind: "collectionType",
476
+ },
477
+ modelType: "contentType",
478
+ modelName: "course",
479
+ connection: "default",
480
+ uid: "api::course.course",
481
+ apiName: "course",
482
+ globalId: "Course",
483
+ actions: {
484
+ },
485
+ lifecycles: {
486
+ },
487
+ singularName: "course",
488
+ tableName: "courses",
489
+ },
490
+ {
491
+ kind: "collectionType",
492
+ collectionName: "lessons",
493
+ info: {
494
+ singularName: "lesson",
495
+ pluralName: "lessons",
496
+ displayName: "lesson",
497
+ description: "",
498
+ },
499
+ options: {
500
+ draftAndPublish: true,
501
+ },
502
+ pluginOptions: {
503
+ i18n: {
504
+ localized: true,
505
+ },
506
+ },
507
+ attributes: {
508
+ title: {
509
+ pluginOptions: {
510
+ i18n: {
511
+ localized: true,
512
+ },
513
+ },
514
+ type: "string",
515
+ },
516
+ start_time: {
517
+ pluginOptions: {
518
+ i18n: {
519
+ localized: true,
520
+ },
521
+ },
522
+ type: "datetime",
523
+ },
524
+ duration: {
525
+ pluginOptions: {
526
+ i18n: {
527
+ localized: true,
528
+ },
529
+ },
530
+ type: "time",
531
+ },
532
+ description: {
533
+ pluginOptions: {
534
+ i18n: {
535
+ localized: true,
536
+ },
537
+ },
538
+ type: "richtext",
539
+ },
540
+ lesson_type: {
541
+ pluginOptions: {
542
+ i18n: {
543
+ localized: true,
544
+ },
545
+ },
546
+ type: "dynamiczone",
547
+ components: [
548
+ "lesson.lecture",
549
+ "lesson.survey",
550
+ "lesson.quiz",
551
+ ],
69
552
  },
70
553
  createdAt: {
71
554
  type: "datetime",
@@ -106,7 +589,7 @@ module.exports = [
106
589
  visible: false,
107
590
  type: "relation",
108
591
  relation: "oneToMany",
109
- target: "api::cookbook.cookbook",
592
+ target: "api::lesson.lesson",
110
593
  },
111
594
  locale: {
112
595
  writable: true,
@@ -117,11 +600,11 @@ module.exports = [
117
600
  },
118
601
  },
119
602
  __schema__: {
120
- collectionName: "cookbooks",
603
+ collectionName: "lessons",
121
604
  info: {
122
- singularName: "cookbook",
123
- pluralName: "cookbooks",
124
- displayName: "cookbook",
605
+ singularName: "lesson",
606
+ pluralName: "lessons",
607
+ displayName: "lesson",
125
608
  description: "",
126
609
  },
127
610
  options: {
@@ -141,63 +624,58 @@ module.exports = [
141
624
  },
142
625
  type: "string",
143
626
  },
144
- author_name: {
627
+ start_time: {
145
628
  pluginOptions: {
146
629
  i18n: {
147
- localized: false,
630
+ localized: true,
148
631
  },
149
632
  },
150
- type: "string",
633
+ type: "datetime",
151
634
  },
152
- pages: {
635
+ duration: {
153
636
  pluginOptions: {
154
637
  i18n: {
155
638
  localized: true,
156
639
  },
157
640
  },
158
- type: "integer",
641
+ type: "time",
159
642
  },
160
- recipes: {
161
- type: "component",
162
- repeatable: true,
643
+ description: {
163
644
  pluginOptions: {
164
645
  i18n: {
165
646
  localized: true,
166
647
  },
167
648
  },
168
- component: "food.cookbook-item",
649
+ type: "richtext",
169
650
  },
170
- gallery: {
171
- type: "component",
172
- repeatable: false,
651
+ lesson_type: {
173
652
  pluginOptions: {
174
653
  i18n: {
175
654
  localized: true,
176
655
  },
177
656
  },
178
- component: "food.gallery",
179
- },
180
- used_in_restaurants: {
181
- type: "relation",
182
- relation: "oneToMany",
183
- target: "api::restaurant-simple-menu.restaurant-simple-menu",
184
- mappedBy: "used_cookbooks",
657
+ type: "dynamiczone",
658
+ components: [
659
+ "lesson.lecture",
660
+ "lesson.survey",
661
+ "lesson.quiz",
662
+ ],
185
663
  },
186
664
  },
187
665
  kind: "collectionType",
188
666
  },
189
667
  modelType: "contentType",
190
- modelName: "cookbook",
668
+ modelName: "lesson",
191
669
  connection: "default",
192
- uid: "api::cookbook.cookbook",
193
- apiName: "cookbook",
194
- globalId: "Cookbook",
670
+ uid: "api::lesson.lesson",
671
+ apiName: "lesson",
672
+ globalId: "Lesson",
195
673
  actions: {
196
674
  },
197
675
  lifecycles: {
198
676
  },
199
- singularName: "cookbook",
200
- tableName: "cookbooks",
677
+ singularName: "lesson",
678
+ tableName: "lessons",
201
679
  },
202
680
  {
203
681
  kind: "collectionType",
@@ -755,6 +1233,7 @@ module.exports = [
755
1233
  singularName: "sample-json",
756
1234
  pluralName: "sample-jsons",
757
1235
  displayName: "sample-json",
1236
+ description: "",
758
1237
  },
759
1238
  options: {
760
1239
  draftAndPublish: true,
@@ -781,6 +1260,31 @@ module.exports = [
781
1260
  },
782
1261
  type: "json",
783
1262
  },
1263
+ dynamic_property: {
1264
+ pluginOptions: {
1265
+ i18n: {
1266
+ localized: true,
1267
+ },
1268
+ },
1269
+ type: "dynamiczone",
1270
+ components: [
1271
+ "food.gallery",
1272
+ "food.recipe-ingredient",
1273
+ "food.cookbook-item",
1274
+ "restaurant.menu-item",
1275
+ "food.gallery-item",
1276
+ ],
1277
+ },
1278
+ repeatable_component_property: {
1279
+ type: "component",
1280
+ repeatable: true,
1281
+ pluginOptions: {
1282
+ i18n: {
1283
+ localized: true,
1284
+ },
1285
+ },
1286
+ component: "restaurant.menu-item",
1287
+ },
784
1288
  createdAt: {
785
1289
  type: "datetime",
786
1290
  },
@@ -836,6 +1340,7 @@ module.exports = [
836
1340
  singularName: "sample-json",
837
1341
  pluralName: "sample-jsons",
838
1342
  displayName: "sample-json",
1343
+ description: "",
839
1344
  },
840
1345
  options: {
841
1346
  draftAndPublish: true,
@@ -862,6 +1367,31 @@ module.exports = [
862
1367
  },
863
1368
  type: "json",
864
1369
  },
1370
+ dynamic_property: {
1371
+ pluginOptions: {
1372
+ i18n: {
1373
+ localized: true,
1374
+ },
1375
+ },
1376
+ type: "dynamiczone",
1377
+ components: [
1378
+ "food.gallery",
1379
+ "food.recipe-ingredient",
1380
+ "food.cookbook-item",
1381
+ "restaurant.menu-item",
1382
+ "food.gallery-item",
1383
+ ],
1384
+ },
1385
+ repeatable_component_property: {
1386
+ type: "component",
1387
+ repeatable: true,
1388
+ pluginOptions: {
1389
+ i18n: {
1390
+ localized: true,
1391
+ },
1392
+ },
1393
+ component: "restaurant.menu-item",
1394
+ },
865
1395
  },
866
1396
  kind: "collectionType",
867
1397
  },
@@ -1162,6 +1692,283 @@ module.exports = [
1162
1692
  singularName: "recipe-ingredient",
1163
1693
  tableName: "components_food_recipe_ingredients",
1164
1694
  },
1695
+ {
1696
+ collectionName: "components_lesson_answers",
1697
+ info: {
1698
+ displayName: "Answer",
1699
+ icon: "info",
1700
+ description: "",
1701
+ },
1702
+ options: {
1703
+ },
1704
+ attributes: {
1705
+ question_number: {
1706
+ type: "integer",
1707
+ },
1708
+ correct_answer: {
1709
+ type: "text",
1710
+ },
1711
+ answer_asset: {
1712
+ type: "relation",
1713
+ relation: "morphOne",
1714
+ target: "plugin::upload.file",
1715
+ morphBy: "related",
1716
+ },
1717
+ },
1718
+ __filename__: "answers.json",
1719
+ __schema__: {
1720
+ collectionName: "components_lesson_answers",
1721
+ info: {
1722
+ displayName: "Answer",
1723
+ icon: "info",
1724
+ description: "",
1725
+ },
1726
+ options: {
1727
+ },
1728
+ attributes: {
1729
+ question_number: {
1730
+ type: "integer",
1731
+ },
1732
+ correct_answer: {
1733
+ type: "text",
1734
+ },
1735
+ answer_asset: {
1736
+ type: "media",
1737
+ multiple: false,
1738
+ required: false,
1739
+ allowedTypes: [
1740
+ "images",
1741
+ "files",
1742
+ "videos",
1743
+ "audios",
1744
+ ],
1745
+ },
1746
+ },
1747
+ __filename__: "answers.json",
1748
+ },
1749
+ uid: "lesson.answers",
1750
+ category: "lesson",
1751
+ modelType: "component",
1752
+ modelName: "answers",
1753
+ globalId: "ComponentLessonAnswers",
1754
+ singularName: "answers",
1755
+ tableName: "components_lesson_answers",
1756
+ },
1757
+ {
1758
+ collectionName: "components_lesson_lectures",
1759
+ info: {
1760
+ displayName: "Lecture",
1761
+ icon: "align-left",
1762
+ },
1763
+ options: {
1764
+ },
1765
+ attributes: {
1766
+ content: {
1767
+ type: "richtext",
1768
+ },
1769
+ },
1770
+ __filename__: "lecture.json",
1771
+ __schema__: {
1772
+ collectionName: "components_lesson_lectures",
1773
+ info: {
1774
+ displayName: "Lecture",
1775
+ icon: "align-left",
1776
+ },
1777
+ options: {
1778
+ },
1779
+ attributes: {
1780
+ content: {
1781
+ type: "richtext",
1782
+ },
1783
+ },
1784
+ __filename__: "lecture.json",
1785
+ },
1786
+ uid: "lesson.lecture",
1787
+ category: "lesson",
1788
+ modelType: "component",
1789
+ modelName: "lecture",
1790
+ globalId: "ComponentLessonLecture",
1791
+ singularName: "lecture",
1792
+ tableName: "components_lesson_lectures",
1793
+ },
1794
+ {
1795
+ collectionName: "components_lesson_quizzes",
1796
+ info: {
1797
+ displayName: "Quiz",
1798
+ icon: "question-circle",
1799
+ description: "",
1800
+ },
1801
+ options: {
1802
+ },
1803
+ attributes: {
1804
+ title: {
1805
+ type: "string",
1806
+ },
1807
+ questions: {
1808
+ type: "component",
1809
+ repeatable: true,
1810
+ component: "lesson.survey-question",
1811
+ },
1812
+ answers: {
1813
+ displayName: "answers",
1814
+ type: "component",
1815
+ repeatable: true,
1816
+ component: "lesson.answers",
1817
+ },
1818
+ },
1819
+ __filename__: "quiz.json",
1820
+ __schema__: {
1821
+ collectionName: "components_lesson_quizzes",
1822
+ info: {
1823
+ displayName: "Quiz",
1824
+ icon: "question-circle",
1825
+ description: "",
1826
+ },
1827
+ options: {
1828
+ },
1829
+ attributes: {
1830
+ title: {
1831
+ type: "string",
1832
+ },
1833
+ questions: {
1834
+ type: "component",
1835
+ repeatable: true,
1836
+ component: "lesson.survey-question",
1837
+ },
1838
+ answers: {
1839
+ displayName: "answers",
1840
+ type: "component",
1841
+ repeatable: true,
1842
+ component: "lesson.answers",
1843
+ },
1844
+ },
1845
+ __filename__: "quiz.json",
1846
+ },
1847
+ uid: "lesson.quiz",
1848
+ category: "lesson",
1849
+ modelType: "component",
1850
+ modelName: "quiz",
1851
+ globalId: "ComponentLessonQuiz",
1852
+ singularName: "quiz",
1853
+ tableName: "components_lesson_quizzes",
1854
+ },
1855
+ {
1856
+ collectionName: "components_lesson_survey_questions",
1857
+ info: {
1858
+ displayName: "Question",
1859
+ icon: "question",
1860
+ description: "",
1861
+ },
1862
+ options: {
1863
+ },
1864
+ attributes: {
1865
+ question: {
1866
+ type: "richtext",
1867
+ },
1868
+ is_active: {
1869
+ type: "boolean",
1870
+ },
1871
+ assets: {
1872
+ type: "relation",
1873
+ relation: "morphMany",
1874
+ target: "plugin::upload.file",
1875
+ morphBy: "related",
1876
+ },
1877
+ question_number: {
1878
+ type: "integer",
1879
+ },
1880
+ },
1881
+ __filename__: "survey-question.json",
1882
+ __schema__: {
1883
+ collectionName: "components_lesson_survey_questions",
1884
+ info: {
1885
+ displayName: "Question",
1886
+ icon: "question",
1887
+ description: "",
1888
+ },
1889
+ options: {
1890
+ },
1891
+ attributes: {
1892
+ question: {
1893
+ type: "richtext",
1894
+ },
1895
+ is_active: {
1896
+ type: "boolean",
1897
+ },
1898
+ assets: {
1899
+ type: "media",
1900
+ multiple: true,
1901
+ required: false,
1902
+ allowedTypes: [
1903
+ "images",
1904
+ "files",
1905
+ "videos",
1906
+ "audios",
1907
+ ],
1908
+ },
1909
+ question_number: {
1910
+ type: "integer",
1911
+ },
1912
+ },
1913
+ __filename__: "survey-question.json",
1914
+ },
1915
+ uid: "lesson.survey-question",
1916
+ category: "lesson",
1917
+ modelType: "component",
1918
+ modelName: "survey-question",
1919
+ globalId: "ComponentLessonSurveyQuestion",
1920
+ singularName: "survey-question",
1921
+ tableName: "components_lesson_survey_questions",
1922
+ },
1923
+ {
1924
+ collectionName: "components_lesson_surveys",
1925
+ info: {
1926
+ displayName: "Survey",
1927
+ icon: "sort-numeric-down",
1928
+ description: "",
1929
+ },
1930
+ options: {
1931
+ },
1932
+ attributes: {
1933
+ description: {
1934
+ type: "richtext",
1935
+ },
1936
+ questions: {
1937
+ type: "component",
1938
+ repeatable: true,
1939
+ component: "lesson.survey-question",
1940
+ },
1941
+ },
1942
+ __filename__: "survey.json",
1943
+ __schema__: {
1944
+ collectionName: "components_lesson_surveys",
1945
+ info: {
1946
+ displayName: "Survey",
1947
+ icon: "sort-numeric-down",
1948
+ description: "",
1949
+ },
1950
+ options: {
1951
+ },
1952
+ attributes: {
1953
+ description: {
1954
+ type: "richtext",
1955
+ },
1956
+ questions: {
1957
+ type: "component",
1958
+ repeatable: true,
1959
+ component: "lesson.survey-question",
1960
+ },
1961
+ },
1962
+ __filename__: "survey.json",
1963
+ },
1964
+ uid: "lesson.survey",
1965
+ category: "lesson",
1966
+ modelType: "component",
1967
+ modelName: "survey",
1968
+ globalId: "ComponentLessonSurvey",
1969
+ singularName: "survey",
1970
+ tableName: "components_lesson_surveys",
1971
+ },
1165
1972
  {
1166
1973
  collectionName: "components_restaurant_menu_items",
1167
1974
  info: {