@squiz/resource-browser 1.66.3 → 1.67.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 (51) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/lib/Hooks/usePreselectedResourcePath.d.ts +20 -0
  3. package/lib/Hooks/usePreselectedResourcePath.js +26 -0
  4. package/lib/Hooks/useResourcePath.d.ts +1 -1
  5. package/lib/Hooks/useResourcePath.js +2 -2
  6. package/lib/Hooks/useSources.d.ts +14 -0
  7. package/lib/Hooks/useSources.js +9 -0
  8. package/lib/Icons/CircledLoopIcon.d.ts +4 -0
  9. package/lib/Icons/CircledLoopIcon.js +12 -0
  10. package/lib/ResourceBrowserContext/ResourceBrowserContext.d.ts +12 -5
  11. package/lib/ResourceBrowserContext/ResourceBrowserContext.js +52 -2
  12. package/lib/ResourcePicker/ResourcePicker.js +1 -1
  13. package/lib/ResourcePicker/States/Selected.d.ts +2 -1
  14. package/lib/ResourcePicker/States/Selected.js +6 -2
  15. package/lib/ResourcePickerContainer/ResourcePickerContainer.d.ts +7 -4
  16. package/lib/ResourcePickerContainer/ResourcePickerContainer.js +35 -11
  17. package/lib/SourceDropdown/SourceDropdown.js +1 -1
  18. package/lib/index.css +19 -2
  19. package/lib/index.d.ts +2 -2
  20. package/lib/index.js +3 -2
  21. package/lib/types.d.ts +7 -0
  22. package/lib/utils/findBestMatchLineage.d.ts +2 -0
  23. package/lib/utils/findBestMatchLineage.js +28 -0
  24. package/package.json +6 -4
  25. package/src/Hooks/usePreselectedResourcePath.ts +50 -0
  26. package/src/Hooks/useResourcePath.ts +2 -2
  27. package/src/Hooks/useSources.ts +1 -1
  28. package/src/Icons/CircledLoopIcon.tsx +14 -0
  29. package/src/ResourceBrowserContext/ResourceBrowserContext.spec.tsx +93 -3
  30. package/src/ResourceBrowserContext/ResourceBrowserContext.tsx +56 -0
  31. package/src/ResourceList/sample-resources.json +684 -439
  32. package/src/ResourcePicker/ResourcePicker.tsx +8 -1
  33. package/src/ResourcePicker/States/Selected.tsx +23 -3
  34. package/src/ResourcePicker/resource-picker.scss +1 -1
  35. package/src/ResourcePickerContainer/ResourcePickerContainer.spec.tsx +146 -32
  36. package/src/ResourcePickerContainer/ResourcePickerContainer.tsx +64 -18
  37. package/src/SourceDropdown/SourceDropdown.tsx +1 -1
  38. package/src/SourceList/sample-sources.json +4 -4
  39. package/src/__mocks__/MockModels.ts +1 -0
  40. package/src/__mocks__/StorybookHelpers.ts +33 -4
  41. package/src/__mocks__/renderWithContext.tsx +23 -0
  42. package/src/index.spec.tsx +81 -21
  43. package/src/index.stories.tsx +4 -4
  44. package/src/index.tsx +10 -2
  45. package/src/types.ts +9 -0
  46. package/src/utils/findBestMatchLineage.spec.ts +81 -0
  47. package/src/utils/findBestMatchLineage.ts +30 -0
  48. package/src/ResourceBrowserContext/ResourceBrowserContext.ts +0 -20
  49. /package/lib/{uuid.d.ts → utils/uuid.d.ts} +0 -0
  50. /package/lib/{uuid.js → utils/uuid.js} +0 -0
  51. /package/src/{uuid.ts → utils/uuid.ts} +0 -0
@@ -1,58 +1,24 @@
1
1
  [
2
2
  {
3
- "id": "10",
3
+ "id": "1",
4
4
  "type": {
5
- "code": "folder",
6
- "name": "Folder"
5
+ "code": "root_folder",
6
+ "name": "Root Folder"
7
7
  },
8
+ "name": "Root Folder",
8
9
  "status": {
9
10
  "code": "live",
10
11
  "name": "Live"
11
12
  },
12
- "name": "Asset types",
13
+ "lineages": [
14
+ {
15
+ "resourceIds": ["1"]
16
+ }
17
+ ],
13
18
  "childCount": 100,
14
19
  "_children": [
15
20
  {
16
- "id": "100",
17
- "type": {
18
- "code": "unknown",
19
- "name": "Unknown type"
20
- },
21
- "status": {
22
- "code": "live",
23
- "name": "Live"
24
- },
25
- "name": "Unknown",
26
- "childCount": 0
27
- },
28
- {
29
- "id": "101",
30
- "type": {
31
- "code": "audio_file",
32
- "name": "Audio File"
33
- },
34
- "status": {
35
- "code": "live",
36
- "name": "Live"
37
- },
38
- "name": "Audio file",
39
- "childCount": 0
40
- },
41
- {
42
- "id": "102",
43
- "type": {
44
- "code": "excel_doc",
45
- "name": "MS Excel Document"
46
- },
47
- "status": {
48
- "code": "live",
49
- "name": "Live"
50
- },
51
- "name": "Excel document",
52
- "childCount": 0
53
- },
54
- {
55
- "id": "103",
21
+ "id": "10",
56
22
  "type": {
57
23
  "code": "folder",
58
24
  "name": "Folder"
@@ -61,197 +27,737 @@
61
27
  "code": "live",
62
28
  "name": "Live"
63
29
  },
64
- "name": "Folder",
65
- "childCount": 0
66
- },
67
- {
68
- "id": "104",
69
- "type": {
70
- "code": "image",
71
- "name": "Image"
72
- },
73
- "status": {
74
- "code": "live",
75
- "name": "Live"
76
- },
77
- "name": "Image",
78
- "childCount": 0,
79
- "url": "https://picsum.photos/200/150",
80
- "urls": ["https://picsum.photos/200/150", "http://picsum.photos/200/150"]
30
+ "name": "Asset types",
31
+ "lineages": [
32
+ {
33
+ "resourceIds": ["1", "10"]
34
+ }
35
+ ],
36
+ "childCount": 100,
37
+ "_children": [
38
+ {
39
+ "id": "100",
40
+ "type": {
41
+ "code": "unknown",
42
+ "name": "Unknown type"
43
+ },
44
+ "status": {
45
+ "code": "live",
46
+ "name": "Live"
47
+ },
48
+ "name": "Unknown",
49
+ "lineages": [
50
+ {
51
+ "resourceIds": ["1", "10", "100"]
52
+ }
53
+ ],
54
+ "childCount": 0
55
+ },
56
+ {
57
+ "id": "101",
58
+ "type": {
59
+ "code": "audio_file",
60
+ "name": "Audio File"
61
+ },
62
+ "status": {
63
+ "code": "live",
64
+ "name": "Live"
65
+ },
66
+ "name": "Audio file",
67
+ "lineages": [
68
+ {
69
+ "resourceIds": ["1", "10", "101"]
70
+ }
71
+ ],
72
+ "childCount": 0
73
+ },
74
+ {
75
+ "id": "102",
76
+ "type": {
77
+ "code": "excel_doc",
78
+ "name": "MS Excel Document"
79
+ },
80
+ "status": {
81
+ "code": "live",
82
+ "name": "Live"
83
+ },
84
+ "name": "Excel document",
85
+ "lineages": [
86
+ {
87
+ "resourceIds": ["1", "10", "102"]
88
+ }
89
+ ],
90
+ "childCount": 0
91
+ },
92
+ {
93
+ "id": "103",
94
+ "type": {
95
+ "code": "folder",
96
+ "name": "Folder"
97
+ },
98
+ "status": {
99
+ "code": "live",
100
+ "name": "Live"
101
+ },
102
+ "name": "Folder",
103
+ "lineages": [
104
+ {
105
+ "resourceIds": ["1", "10", "103"]
106
+ }
107
+ ],
108
+ "childCount": 0
109
+ },
110
+ {
111
+ "id": "104",
112
+ "type": {
113
+ "code": "image",
114
+ "name": "Image"
115
+ },
116
+ "status": {
117
+ "code": "live",
118
+ "name": "Live"
119
+ },
120
+ "name": "Image",
121
+ "lineages": [
122
+ {
123
+ "resourceIds": ["1", "10", "104"]
124
+ }
125
+ ],
126
+ "childCount": 0,
127
+ "url": "https://picsum.photos/200/150",
128
+ "urls": ["https://picsum.photos/200/150", "http://picsum.photos/200/150"]
129
+ },
130
+ {
131
+ "id": "105",
132
+ "type": {
133
+ "code": "page_standard",
134
+ "name": "Standard Page"
135
+ },
136
+ "status": {
137
+ "code": "live",
138
+ "name": "Live"
139
+ },
140
+ "name": "Page",
141
+ "lineages": [
142
+ {
143
+ "resourceIds": ["1", "10", "105"]
144
+ }
145
+ ],
146
+ "childCount": 0
147
+ },
148
+ {
149
+ "id": "106",
150
+ "type": {
151
+ "code": "pdf_file",
152
+ "name": "PDF File"
153
+ },
154
+ "status": {
155
+ "code": "live",
156
+ "name": "Live"
157
+ },
158
+ "name": "PDF file",
159
+ "lineages": [
160
+ {
161
+ "resourceIds": ["1", "10", "106"]
162
+ }
163
+ ],
164
+ "childCount": 0
165
+ },
166
+ {
167
+ "id": "107",
168
+ "type": {
169
+ "code": "powerpoint_doc",
170
+ "name": "MS PowerPoint Document"
171
+ },
172
+ "status": {
173
+ "code": "live",
174
+ "name": "Live"
175
+ },
176
+ "name": "Powerpoint presentation",
177
+ "lineages": [
178
+ {
179
+ "resourceIds": ["1", "10", "107"]
180
+ }
181
+ ],
182
+ "childCount": 0
183
+ },
184
+ {
185
+ "id": "108",
186
+ "type": {
187
+ "code": "site",
188
+ "name": "Site"
189
+ },
190
+ "status": {
191
+ "code": "live",
192
+ "name": "Live"
193
+ },
194
+ "name": "Site",
195
+ "lineages": [
196
+ {
197
+ "resourceIds": ["1", "10", "108"]
198
+ }
199
+ ],
200
+ "childCount": 0
201
+ },
202
+ {
203
+ "id": "109",
204
+ "type": {
205
+ "code": "video_file",
206
+ "name": "Video File"
207
+ },
208
+ "status": {
209
+ "code": "live",
210
+ "name": "Live"
211
+ },
212
+ "name": "Video file",
213
+ "lineages": [
214
+ {
215
+ "resourceIds": ["1", "10", "109"]
216
+ }
217
+ ],
218
+ "childCount": 0
219
+ },
220
+ {
221
+ "id": "110",
222
+ "type": {
223
+ "code": "word_doc",
224
+ "name": "MS Word Document"
225
+ },
226
+ "status": {
227
+ "code": "live",
228
+ "name": "Live"
229
+ },
230
+ "name": "Word document",
231
+ "lineages": [
232
+ {
233
+ "resourceIds": ["1", "10", "110"]
234
+ }
235
+ ],
236
+ "childCount": 0
237
+ },
238
+ {
239
+ "id": "111",
240
+ "type": {
241
+ "code": "page_content",
242
+ "name": "Content Page"
243
+ },
244
+ "status": {
245
+ "code": "live",
246
+ "name": "Live"
247
+ },
248
+ "name": "Content page",
249
+ "lineages": [
250
+ {
251
+ "resourceIds": ["1", "10", "111"]
252
+ }
253
+ ],
254
+ "childCount": 0
255
+ }
256
+ ]
81
257
  },
82
258
  {
83
- "id": "105",
259
+ "id": "20",
84
260
  "type": {
85
- "code": "page_standard",
86
- "name": "Standard Page"
261
+ "code": "folder",
262
+ "name": "Folder"
87
263
  },
88
264
  "status": {
89
265
  "code": "live",
90
266
  "name": "Live"
91
267
  },
92
- "name": "Page",
93
- "childCount": 0
268
+ "name": "Asset status",
269
+ "lineages": [
270
+ {
271
+ "resourceIds": ["1", "20"]
272
+ }
273
+ ],
274
+ "childCount": 100,
275
+ "_children": [
276
+ {
277
+ "id": "200",
278
+ "type": {
279
+ "code": "physical_file",
280
+ "name": "Physical File"
281
+ },
282
+ "status": {
283
+ "code": "unknown",
284
+ "name": "Unknown"
285
+ },
286
+ "name": "Unknown",
287
+ "lineages": [
288
+ {
289
+ "resourceIds": ["1", "20", "200"]
290
+ }
291
+ ],
292
+ "childCount": 0
293
+ },
294
+ {
295
+ "id": "201",
296
+ "type": {
297
+ "code": "physical_file",
298
+ "name": "Physical File"
299
+ },
300
+ "status": {
301
+ "code": "archived",
302
+ "name": "Archived"
303
+ },
304
+ "name": "Archived",
305
+ "lineages": [
306
+ {
307
+ "resourceIds": ["1", "20", "201"]
308
+ }
309
+ ],
310
+ "childCount": 0
311
+ },
312
+ {
313
+ "id": "202",
314
+ "type": {
315
+ "code": "physical_file",
316
+ "name": "Physical File"
317
+ },
318
+ "status": {
319
+ "code": "under_construction",
320
+ "name": "Under Construction"
321
+ },
322
+ "name": "Under construction",
323
+ "lineages": [
324
+ {
325
+ "resourceIds": ["1", "20", "202"]
326
+ }
327
+ ],
328
+ "childCount": 0
329
+ },
330
+ {
331
+ "id": "203",
332
+ "type": {
333
+ "code": "physical_file",
334
+ "name": "Physical File"
335
+ },
336
+ "status": {
337
+ "code": "pending_approval",
338
+ "name": "Pending Approval"
339
+ },
340
+ "name": "Pending approval",
341
+ "lineages": [
342
+ {
343
+ "resourceIds": ["1", "20", "203"]
344
+ }
345
+ ],
346
+ "childCount": 0
347
+ },
348
+ {
349
+ "id": "204",
350
+ "type": {
351
+ "code": "physical_file",
352
+ "name": "Physical File"
353
+ },
354
+ "status": {
355
+ "code": "approved_to_go_live",
356
+ "name": "Approved To Go Live"
357
+ },
358
+ "name": "Approved to go live",
359
+ "lineages": [
360
+ {
361
+ "resourceIds": ["1", "20", "204"]
362
+ }
363
+ ],
364
+ "childCount": 0
365
+ },
366
+ {
367
+ "id": "205",
368
+ "type": {
369
+ "code": "physical_file",
370
+ "name": "Physical File"
371
+ },
372
+ "status": {
373
+ "code": "live",
374
+ "name": "Live"
375
+ },
376
+ "name": "Live",
377
+ "lineages": [
378
+ {
379
+ "resourceIds": ["1", "20", "205"]
380
+ }
381
+ ],
382
+ "childCount": 0
383
+ },
384
+ {
385
+ "id": "206",
386
+ "type": {
387
+ "code": "physical_file",
388
+ "name": "Physical File"
389
+ },
390
+ "status": {
391
+ "code": "up_for_review",
392
+ "name": "Up For Review"
393
+ },
394
+ "name": "Up for review",
395
+ "lineages": [
396
+ {
397
+ "resourceIds": ["1", "20", "206"]
398
+ }
399
+ ],
400
+ "childCount": 0
401
+ },
402
+ {
403
+ "id": "207",
404
+ "type": {
405
+ "code": "physical_file",
406
+ "name": "Physical File"
407
+ },
408
+ "status": {
409
+ "code": "safe_editing",
410
+ "name": "Safe Editing"
411
+ },
412
+ "name": "Safe editing",
413
+ "lineages": [
414
+ {
415
+ "resourceIds": ["1", "20", "207"]
416
+ }
417
+ ],
418
+ "childCount": 0
419
+ },
420
+ {
421
+ "id": "208",
422
+ "type": {
423
+ "code": "physical_file",
424
+ "name": "Physical File"
425
+ },
426
+ "status": {
427
+ "code": "safe_editing_pending_approval",
428
+ "name": "Safe Editing Pending Approval"
429
+ },
430
+ "name": "Safe editing pending approval",
431
+ "lineages": [
432
+ {
433
+ "resourceIds": ["1", "20", "208"]
434
+ }
435
+ ],
436
+ "childCount": 0
437
+ },
438
+ {
439
+ "id": "209",
440
+ "type": {
441
+ "code": "physical_file",
442
+ "name": "Physical File"
443
+ },
444
+ "status": {
445
+ "code": "safe_edit_approved_to_go_live",
446
+ "name": "Safe Edit Approved To Go Live"
447
+ },
448
+ "name": "Safe edit approved to go live",
449
+ "lineages": [
450
+ {
451
+ "resourceIds": ["1", "20", "209"]
452
+ }
453
+ ],
454
+ "childCount": 0
455
+ }
456
+ ]
94
457
  },
95
458
  {
96
- "id": "106",
459
+ "id": "30",
97
460
  "type": {
98
- "code": "pdf_file",
99
- "name": "PDF File"
461
+ "code": "folder",
462
+ "name": "Folder"
100
463
  },
101
464
  "status": {
102
465
  "code": "live",
103
466
  "name": "Live"
104
467
  },
105
- "name": "PDF file",
106
- "childCount": 0
468
+ "name": "Deeply nested asset",
469
+ "lineages": [
470
+ {
471
+ "resourceIds": ["1", "30"]
472
+ }
473
+ ],
474
+ "childCount": "1",
475
+ "_children": [
476
+ {
477
+ "id": "31",
478
+ "type": {
479
+ "code": "folder",
480
+ "name": "Folder"
481
+ },
482
+ "status": {
483
+ "code": "live",
484
+ "name": "Live"
485
+ },
486
+ "name": "Level 2",
487
+ "lineages": [
488
+ {
489
+ "resourceIds": ["1", "30", "31"]
490
+ }
491
+ ],
492
+ "childCount": 1,
493
+ "_children": [
494
+ {
495
+ "id": "32",
496
+ "type": {
497
+ "code": "folder",
498
+ "name": "Folder"
499
+ },
500
+ "status": {
501
+ "code": "live",
502
+ "name": "Live"
503
+ },
504
+ "name": "Level 3",
505
+ "lineages": [
506
+ {
507
+ "resourceIds": ["1", "30", "31", "32"]
508
+ }
509
+ ],
510
+ "childCount": 1,
511
+ "_children": [
512
+ {
513
+ "id": "33",
514
+ "type": {
515
+ "code": "folder",
516
+ "name": "Folder"
517
+ },
518
+ "status": {
519
+ "code": "live",
520
+ "name": "Live"
521
+ },
522
+ "name": "Level 4",
523
+ "lineages": [
524
+ {
525
+ "resourceIds": ["1", "30", "31", "32", "33"]
526
+ }
527
+ ],
528
+ "childCount": 1,
529
+ "_children": [
530
+ {
531
+ "id": "34",
532
+ "type": {
533
+ "code": "folder",
534
+ "name": "Folder"
535
+ },
536
+ "status": {
537
+ "code": "live",
538
+ "name": "Live"
539
+ },
540
+ "name": "Level 5",
541
+ "lineages": [
542
+ {
543
+ "resourceIds": ["1", "30", "31", "32", "33", "34"]
544
+ }
545
+ ],
546
+ "childCount": 1,
547
+ "_children": [
548
+ {
549
+ "id": "35",
550
+ "type": {
551
+ "code": "folder",
552
+ "name": "Folder"
553
+ },
554
+ "status": {
555
+ "code": "live",
556
+ "name": "Live"
557
+ },
558
+ "name": "Level 6",
559
+ "lineages": [
560
+ {
561
+ "resourceIds": ["1", "30", "31", "32", "33", "34", "35"]
562
+ }
563
+ ],
564
+ "childCount": 1,
565
+ "_children": [
566
+ {
567
+ "id": "36",
568
+ "type": {
569
+ "code": "page_standard",
570
+ "name": "Standard Page"
571
+ },
572
+ "status": {
573
+ "code": "live",
574
+ "name": "Live"
575
+ },
576
+ "name": "You made it!",
577
+ "lineages": [
578
+ {
579
+ "resourceIds": ["1", "30", "31", "32", "33", "34", "35", "36"]
580
+ }
581
+ ],
582
+ "childCount": 0
583
+ }
584
+ ]
585
+ }
586
+ ]
587
+ }
588
+ ]
589
+ }
590
+ ]
591
+ }
592
+ ]
593
+ }
594
+ ]
107
595
  },
108
596
  {
109
- "id": "107",
597
+ "id": "900",
110
598
  "type": {
111
- "code": "powerpoint_doc",
112
- "name": "MS PowerPoint Document"
599
+ "code": "page",
600
+ "name": "Standard Page"
113
601
  },
114
602
  "status": {
115
603
  "code": "live",
116
604
  "name": "Live"
117
605
  },
118
- "name": "Powerpoint presentation",
606
+ "name": "About us",
607
+ "lineages": [
608
+ {
609
+ "resourceIds": ["1", "900"]
610
+ }
611
+ ],
119
612
  "childCount": 0
120
613
  },
121
614
  {
122
- "id": "108",
615
+ "id": "901",
123
616
  "type": {
124
- "code": "site",
125
- "name": "Site"
617
+ "code": "folder",
618
+ "name": "Folder"
126
619
  },
127
620
  "status": {
128
621
  "code": "live",
129
622
  "name": "Live"
130
623
  },
131
- "name": "Site",
132
- "childCount": 0
624
+ "name": "So many images",
625
+ "lineages": [
626
+ {
627
+ "resourceIds": ["1", "901"]
628
+ }
629
+ ],
630
+ "childCount": 123456
133
631
  },
134
632
  {
135
- "id": "109",
633
+ "id": "902",
136
634
  "type": {
137
- "code": "video_file",
138
- "name": "Video File"
635
+ "code": "page_standard",
636
+ "name": "Standard Page"
139
637
  },
140
638
  "status": {
141
639
  "code": "live",
142
640
  "name": "Live"
143
641
  },
144
- "name": "Video file",
642
+ "name": "Asset with a slightly long long title to make it wrap over multiple lines, it take a bit of text to that",
643
+ "lineages": [
644
+ {
645
+ "resourceIds": ["1", "902"]
646
+ }
647
+ ],
145
648
  "childCount": 0
146
649
  },
147
650
  {
148
- "id": "110",
651
+ "id": "903",
149
652
  "type": {
150
- "code": "word_doc",
151
- "name": "MS Word Document"
653
+ "code": "site",
654
+ "name": "Site"
152
655
  },
153
656
  "status": {
154
657
  "code": "live",
155
658
  "name": "Live"
156
659
  },
157
- "name": "Word document",
158
- "childCount": 0
660
+ "name": "Asset with an even longer title to make it is so long that it causes the container to grow in size. It is truly really just so long and I don't know what else I could possibly say about it to express just how long it is.",
661
+ "lineages": [
662
+ {
663
+ "resourceIds": ["1", "903"]
664
+ }
665
+ ],
666
+ "childCount": 456
159
667
  },
160
668
  {
161
- "id": "111",
669
+ "id": "9033",
162
670
  "type": {
163
- "code": "page_content",
164
- "name": "Content Page"
671
+ "code": "image",
672
+ "name": "Image"
165
673
  },
166
674
  "status": {
167
675
  "code": "live",
168
676
  "name": "Live"
169
677
  },
170
- "name": "Content page",
171
- "childCount": 0
172
- }
173
- ]
174
- },
175
- {
176
- "id": "20",
177
- "type": {
178
- "code": "folder",
179
- "name": "Folder"
180
- },
181
- "status": {
182
- "code": "live",
183
- "name": "Live"
184
- },
185
- "name": "Asset status",
186
- "childCount": 100,
187
- "_children": [
188
- {
189
- "id": "200",
190
- "type": {
191
- "code": "physical_file",
192
- "name": "Physical File"
193
- },
194
- "status": {
195
- "code": "unknown",
196
- "name": "Unknown"
197
- },
198
- "name": "Unknown",
199
- "childCount": 0
678
+ "name": "image_asset_with_a_silly_long_image_file_name_to_check_that_it_does_not_break_out_of_the_layout.jpg.",
679
+ "lineages": [
680
+ {
681
+ "resourceIds": ["1", "9033"]
682
+ }
683
+ ],
684
+ "childCount": 456,
685
+ "url": "https://www.rspcasa.org.au/wp-content/uploads/2020/10/Baby-goat-in-tree.jpg"
200
686
  },
201
687
  {
202
- "id": "201",
688
+ "id": "904",
203
689
  "type": {
204
690
  "code": "physical_file",
205
691
  "name": "Physical File"
206
692
  },
207
693
  "status": {
208
- "code": "archived",
209
- "name": "Archived"
694
+ "code": "live",
695
+ "name": "Live"
210
696
  },
211
- "name": "Archived",
697
+ "name": "Placeholder file",
698
+ "lineages": [
699
+ {
700
+ "resourceIds": ["1", "904"]
701
+ }
702
+ ],
212
703
  "childCount": 0
213
704
  },
214
705
  {
215
- "id": "202",
706
+ "id": "905",
216
707
  "type": {
217
708
  "code": "physical_file",
218
709
  "name": "Physical File"
219
710
  },
220
711
  "status": {
221
- "code": "under_construction",
222
- "name": "Under Construction"
712
+ "code": "live",
713
+ "name": "Live"
223
714
  },
224
- "name": "Under construction",
715
+ "name": "Placeholder file 2",
716
+ "lineages": [
717
+ {
718
+ "resourceIds": ["1", "905"]
719
+ }
720
+ ],
225
721
  "childCount": 0
226
722
  },
227
723
  {
228
- "id": "203",
724
+ "id": "906",
229
725
  "type": {
230
726
  "code": "physical_file",
231
727
  "name": "Physical File"
232
728
  },
233
729
  "status": {
234
- "code": "pending_approval",
235
- "name": "Pending Approval"
730
+ "code": "live",
731
+ "name": "Live"
236
732
  },
237
- "name": "Pending approval",
733
+ "name": "Placeholder file 3",
734
+ "lineages": [
735
+ {
736
+ "resourceIds": ["1", "906"]
737
+ }
738
+ ],
238
739
  "childCount": 0
239
740
  },
240
741
  {
241
- "id": "204",
742
+ "id": "907",
242
743
  "type": {
243
744
  "code": "physical_file",
244
745
  "name": "Physical File"
245
746
  },
246
747
  "status": {
247
- "code": "approved_to_go_live",
248
- "name": "Approved To Go Live"
748
+ "code": "live",
749
+ "name": "Live"
249
750
  },
250
- "name": "Approved to go live",
751
+ "name": "Placeholder file 4",
752
+ "lineages": [
753
+ {
754
+ "resourceIds": ["1", "907"]
755
+ }
756
+ ],
251
757
  "childCount": 0
252
758
  },
253
759
  {
254
- "id": "205",
760
+ "id": "908",
255
761
  "type": {
256
762
  "code": "physical_file",
257
763
  "name": "Physical File"
@@ -260,347 +766,86 @@
260
766
  "code": "live",
261
767
  "name": "Live"
262
768
  },
263
- "name": "Live",
769
+ "name": "Placeholder file 5",
770
+ "lineages": [
771
+ {
772
+ "resourceIds": ["1", "908"]
773
+ }
774
+ ],
264
775
  "childCount": 0
265
776
  },
266
777
  {
267
- "id": "206",
778
+ "id": "909",
268
779
  "type": {
269
780
  "code": "physical_file",
270
781
  "name": "Physical File"
271
782
  },
272
783
  "status": {
273
- "code": "up_for_review",
274
- "name": "Up For Review"
784
+ "code": "live",
785
+ "name": "Live"
275
786
  },
276
- "name": "Up for review",
787
+ "name": "Placeholder file 6",
788
+ "lineages": [
789
+ {
790
+ "resourceIds": ["1", "909"]
791
+ }
792
+ ],
277
793
  "childCount": 0
278
794
  },
279
795
  {
280
- "id": "207",
796
+ "id": "910",
281
797
  "type": {
282
798
  "code": "physical_file",
283
799
  "name": "Physical File"
284
800
  },
285
801
  "status": {
286
- "code": "safe_editing",
287
- "name": "Safe Editing"
802
+ "code": "live",
803
+ "name": "Live"
288
804
  },
289
- "name": "Safe editing",
805
+ "name": "Placeholder file 7",
806
+ "lineages": [
807
+ {
808
+ "resourceIds": ["1", "910"]
809
+ }
810
+ ],
290
811
  "childCount": 0
291
812
  },
292
813
  {
293
- "id": "208",
814
+ "id": "911",
294
815
  "type": {
295
816
  "code": "physical_file",
296
817
  "name": "Physical File"
297
818
  },
298
819
  "status": {
299
- "code": "safe_editing_pending_approval",
300
- "name": "Safe Editing Pending Approval"
820
+ "code": "live",
821
+ "name": "Live"
301
822
  },
302
- "name": "Safe editing pending approval",
823
+ "name": "Placeholder file 8",
824
+ "lineages": [
825
+ {
826
+ "resourceIds": ["1", "911"]
827
+ }
828
+ ],
303
829
  "childCount": 0
304
830
  },
305
831
  {
306
- "id": "209",
832
+ "id": "912",
307
833
  "type": {
308
834
  "code": "physical_file",
309
835
  "name": "Physical File"
310
836
  },
311
- "status": {
312
- "code": "safe_edit_approved_to_go_live",
313
- "name": "Safe Edit Approved To Go Live"
314
- },
315
- "name": "Safe edit approved to go live",
316
- "childCount": 0
317
- }
318
- ]
319
- },
320
- {
321
- "id": "30",
322
- "type": {
323
- "code": "folder",
324
- "name": "Folder"
325
- },
326
- "status": {
327
- "code": "live",
328
- "name": "Live"
329
- },
330
- "name": "Deeply nested asset",
331
- "childCount": "1",
332
- "_children": [
333
- {
334
- "id": "31",
335
- "type": {
336
- "code": "folder",
337
- "name": "Folder"
338
- },
339
837
  "status": {
340
838
  "code": "live",
341
839
  "name": "Live"
342
840
  },
343
- "name": "Level 2",
344
- "childCount": "1",
345
- "_children": [
841
+ "name": "Placeholder file 9",
842
+ "lineages": [
346
843
  {
347
- "id": "32",
348
- "type": {
349
- "code": "folder",
350
- "name": "Folder"
351
- },
352
- "status": {
353
- "code": "live",
354
- "name": "Live"
355
- },
356
- "name": "Level 3",
357
- "childCount": "1",
358
- "_children": [
359
- {
360
- "id": "33",
361
- "type": {
362
- "code": "folder",
363
- "name": "Folder"
364
- },
365
- "status": {
366
- "code": "live",
367
- "name": "Live"
368
- },
369
- "name": "Level 4",
370
- "childCount": "1",
371
- "_children": [
372
- {
373
- "id": "34",
374
- "type": {
375
- "code": "folder",
376
- "name": "Folder"
377
- },
378
- "status": {
379
- "code": "live",
380
- "name": "Live"
381
- },
382
- "name": "Level 5",
383
- "childCount": "1",
384
- "_children": [
385
- {
386
- "id": "35",
387
- "type": {
388
- "code": "folder",
389
- "name": "Folder"
390
- },
391
- "status": {
392
- "code": "live",
393
- "name": "Live"
394
- },
395
- "name": "Level 6",
396
- "childCount": "1",
397
- "_children": [
398
- {
399
- "id": "32",
400
- "type": {
401
- "code": "page_standard",
402
- "name": "Standard Page"
403
- },
404
- "status": {
405
- "code": "live",
406
- "name": "Live"
407
- },
408
- "name": "You made it!",
409
- "childCount": "0"
410
- }
411
- ]
412
- }
413
- ]
414
- }
415
- ]
416
- }
417
- ]
844
+ "resourceIds": ["1", "912"]
418
845
  }
419
- ]
846
+ ],
847
+ "childCount": 0
420
848
  }
421
849
  ]
422
- },
423
- {
424
- "id": "900",
425
- "type": {
426
- "code": "page",
427
- "name": "Standard Page"
428
- },
429
- "status": {
430
- "code": "live",
431
- "name": "Live"
432
- },
433
- "name": "About us",
434
- "childCount": 0
435
- },
436
- {
437
- "id": "901",
438
- "type": {
439
- "code": "folder",
440
- "name": "Folder"
441
- },
442
- "status": {
443
- "code": "live",
444
- "name": "Live"
445
- },
446
- "name": "So many images",
447
- "childCount": 123456
448
- },
449
- {
450
- "id": "902",
451
- "type": {
452
- "code": "page_standard",
453
- "name": "Standard Page"
454
- },
455
- "status": {
456
- "code": "live",
457
- "name": "Live"
458
- },
459
- "name": "Asset with a slightly long long title to make it wrap over multiple lines, it take a bit of text to that",
460
- "childCount": 0
461
- },
462
- {
463
- "id": "903",
464
- "type": {
465
- "code": "site",
466
- "name": "Site"
467
- },
468
- "status": {
469
- "code": "live",
470
- "name": "Live"
471
- },
472
- "name": "Asset with an even longer title to make it is so long that it causes the container to grow in size. It is truly really just so long and I don't know what else I could possibly say about it to express just how long it is.",
473
- "childCount": 456
474
- },
475
- {
476
- "id": "903",
477
- "type": {
478
- "code": "image",
479
- "name": "Image"
480
- },
481
- "status": {
482
- "code": "live",
483
- "name": "Live"
484
- },
485
- "name": "image_asset_with_a_silly_long_image_file_name_to_check_that_it_does_not_break_out_of_the_layout.jpg.",
486
- "childCount": 456,
487
- "url": "https://www.rspcasa.org.au/wp-content/uploads/2020/10/Baby-goat-in-tree.jpg"
488
- },
489
- {
490
- "id": "904",
491
- "type": {
492
- "code": "physical_file",
493
- "name": "Physical File"
494
- },
495
- "status": {
496
- "code": "live",
497
- "name": "Live"
498
- },
499
- "name": "Placeholder file",
500
- "childCount": 0
501
- },
502
- {
503
- "id": "905",
504
- "type": {
505
- "code": "physical_file",
506
- "name": "Physical File"
507
- },
508
- "status": {
509
- "code": "live",
510
- "name": "Live"
511
- },
512
- "name": "Placeholder file 2",
513
- "childCount": 0
514
- },
515
- {
516
- "id": "906",
517
- "type": {
518
- "code": "physical_file",
519
- "name": "Physical File"
520
- },
521
- "status": {
522
- "code": "live",
523
- "name": "Live"
524
- },
525
- "name": "Placeholder file 3",
526
- "childCount": 0
527
- },
528
- {
529
- "id": "907",
530
- "type": {
531
- "code": "physical_file",
532
- "name": "Physical File"
533
- },
534
- "status": {
535
- "code": "live",
536
- "name": "Live"
537
- },
538
- "name": "Placeholder file 4",
539
- "childCount": 0
540
- },
541
- {
542
- "id": "908",
543
- "type": {
544
- "code": "physical_file",
545
- "name": "Physical File"
546
- },
547
- "status": {
548
- "code": "live",
549
- "name": "Live"
550
- },
551
- "name": "Placeholder file 5",
552
- "childCount": 0
553
- },
554
- {
555
- "id": "909",
556
- "type": {
557
- "code": "physical_file",
558
- "name": "Physical File"
559
- },
560
- "status": {
561
- "code": "live",
562
- "name": "Live"
563
- },
564
- "name": "Placeholder file 6",
565
- "childCount": 0
566
- },
567
- {
568
- "id": "910",
569
- "type": {
570
- "code": "physical_file",
571
- "name": "Physical File"
572
- },
573
- "status": {
574
- "code": "live",
575
- "name": "Live"
576
- },
577
- "name": "Placeholder file 7",
578
- "childCount": 0
579
- },
580
- {
581
- "id": "911",
582
- "type": {
583
- "code": "physical_file",
584
- "name": "Physical File"
585
- },
586
- "status": {
587
- "code": "live",
588
- "name": "Live"
589
- },
590
- "name": "Placeholder file 8",
591
- "childCount": 0
592
- },
593
- {
594
- "id": "912",
595
- "type": {
596
- "code": "physical_file",
597
- "name": "Physical File"
598
- },
599
- "status": {
600
- "code": "live",
601
- "name": "Live"
602
- },
603
- "name": "Placeholder file 9",
604
- "childCount": 0
605
850
  }
606
851
  ]