@almadar/std 14.26.0 → 14.27.0

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 (151) hide show
  1. package/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  2. package/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  3. package/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  4. package/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  5. package/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  6. package/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  7. package/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  8. package/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  9. package/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  10. package/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  11. package/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  12. package/behaviors/registry/app/atoms/std-donor.orb +445 -135
  13. package/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  14. package/behaviors/registry/app/atoms/std-driver.orb +465 -480
  15. package/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  16. package/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  17. package/behaviors/registry/app/atoms/std-event.orb +465 -667
  18. package/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  19. package/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  20. package/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  21. package/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  22. package/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  23. package/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  24. package/behaviors/registry/app/atoms/std-lease.orb +506 -190
  25. package/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  26. package/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  27. package/behaviors/registry/app/atoms/std-matter.orb +486 -318
  28. package/behaviors/registry/app/atoms/std-membership.orb +512 -102
  29. package/behaviors/registry/app/atoms/std-menu.orb +775 -183
  30. package/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  31. package/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  32. package/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  33. package/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  34. package/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  35. package/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  36. package/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  37. package/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  38. package/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  39. package/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  40. package/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  41. package/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  42. package/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  43. package/behaviors/registry/app/atoms/std-segment.orb +360 -98
  44. package/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  45. package/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  46. package/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  47. package/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  48. package/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  49. package/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  50. package/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  51. package/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  52. package/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  53. package/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  54. package/behaviors/registry/app/atoms/std-trial.orb +410 -317
  55. package/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  56. package/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  57. package/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  58. package/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  59. package/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  60. package/behaviors/registry/app/molecules/std-application.orb +178 -263
  61. package/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  62. package/behaviors/registry/app/molecules/std-cart.orb +78 -72
  63. package/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  64. package/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  65. package/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  66. package/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  67. package/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  68. package/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  69. package/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  70. package/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  71. package/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  72. package/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  73. package/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  74. package/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  75. package/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  76. package/dist/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  77. package/dist/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  78. package/dist/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  79. package/dist/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  80. package/dist/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  81. package/dist/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  82. package/dist/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  83. package/dist/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  84. package/dist/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  85. package/dist/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  86. package/dist/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  87. package/dist/behaviors/registry/app/atoms/std-donor.orb +445 -135
  88. package/dist/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  89. package/dist/behaviors/registry/app/atoms/std-driver.orb +465 -480
  90. package/dist/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  91. package/dist/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  92. package/dist/behaviors/registry/app/atoms/std-event.orb +465 -667
  93. package/dist/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  94. package/dist/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  95. package/dist/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  96. package/dist/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  97. package/dist/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  98. package/dist/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  99. package/dist/behaviors/registry/app/atoms/std-lease.orb +506 -190
  100. package/dist/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  101. package/dist/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  102. package/dist/behaviors/registry/app/atoms/std-matter.orb +486 -318
  103. package/dist/behaviors/registry/app/atoms/std-membership.orb +512 -102
  104. package/dist/behaviors/registry/app/atoms/std-menu.orb +775 -183
  105. package/dist/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  106. package/dist/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  107. package/dist/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  108. package/dist/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  109. package/dist/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  110. package/dist/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  111. package/dist/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  112. package/dist/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  113. package/dist/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  114. package/dist/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  115. package/dist/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  116. package/dist/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  117. package/dist/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  118. package/dist/behaviors/registry/app/atoms/std-segment.orb +360 -98
  119. package/dist/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  120. package/dist/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  121. package/dist/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  122. package/dist/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  123. package/dist/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  124. package/dist/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  125. package/dist/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  126. package/dist/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  127. package/dist/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  128. package/dist/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  129. package/dist/behaviors/registry/app/atoms/std-trial.orb +410 -317
  130. package/dist/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  131. package/dist/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  132. package/dist/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  133. package/dist/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  134. package/dist/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  135. package/dist/behaviors/registry/app/molecules/std-application.orb +178 -263
  136. package/dist/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  137. package/dist/behaviors/registry/app/molecules/std-cart.orb +78 -72
  138. package/dist/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  139. package/dist/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  140. package/dist/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  141. package/dist/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  142. package/dist/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  143. package/dist/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  144. package/dist/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  145. package/dist/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  146. package/dist/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  147. package/dist/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  148. package/dist/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  149. package/dist/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  150. package/dist/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  151. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-file-store",
3
3
  "version": "1.0.0",
4
- "description": "std-file-store — generic file + folder + metadata primitive consumed by document-mgmt, legal-case, and any organism that needs a file store. Fetches StoredFile rows on INIT and renders them in a data-grid with per-row Download/Archive actions.",
4
+ "description": "std-file-store — generic file + folder + metadata primitive. Browses files via file-tree + data-grid; opens file detail in `viewing_single` with Download / Archive actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "StoredFileOrbital",
@@ -68,6 +68,61 @@
68
68
  "category": "interaction",
69
69
  "linkedEntity": "StoredFile",
70
70
  "emits": [
71
+ {
72
+ "event": "OPEN_FILE",
73
+ "payloadSchema": [
74
+ {
75
+ "name": "id",
76
+ "type": "string",
77
+ "required": true
78
+ },
79
+ {
80
+ "name": "row.id",
81
+ "type": "string",
82
+ "required": true
83
+ },
84
+ {
85
+ "name": "row.name",
86
+ "type": "string",
87
+ "required": true
88
+ },
89
+ {
90
+ "name": "row.path",
91
+ "type": "string"
92
+ },
93
+ {
94
+ "name": "row.mimeType",
95
+ "type": "string"
96
+ },
97
+ {
98
+ "name": "row.sizeBytes",
99
+ "type": "number"
100
+ },
101
+ {
102
+ "name": "row.uploaderId",
103
+ "type": "string"
104
+ },
105
+ {
106
+ "name": "row.uploaderName",
107
+ "type": "string"
108
+ },
109
+ {
110
+ "name": "row.folder",
111
+ "type": "string"
112
+ },
113
+ {
114
+ "name": "row.uploadedAt",
115
+ "type": "string"
116
+ },
117
+ {
118
+ "name": "row.isArchived",
119
+ "type": "boolean"
120
+ }
121
+ ]
122
+ },
123
+ {
124
+ "event": "CLOSE_VIEW"
125
+ },
71
126
  {
72
127
  "event": "DOWNLOAD_FILE",
73
128
  "payloadSchema": [
@@ -120,6 +175,9 @@
120
175
  {
121
176
  "name": "browsing"
122
177
  },
178
+ {
179
+ "name": "viewing_single"
180
+ },
123
181
  {
124
182
  "name": "error"
125
183
  }
@@ -154,13 +212,17 @@
154
212
  ]
155
213
  },
156
214
  {
157
- "key": "DOWNLOAD_FILE",
158
- "name": "Download File",
215
+ "key": "OPEN_FILE",
216
+ "name": "Open File",
159
217
  "payloadSchema": [
160
218
  {
161
219
  "name": "id",
162
220
  "type": "string",
163
221
  "required": true
222
+ },
223
+ {
224
+ "name": "row",
225
+ "type": "StoredFile"
164
226
  }
165
227
  ]
166
228
  },
@@ -174,6 +236,21 @@
174
236
  "required": true
175
237
  }
176
238
  ]
239
+ },
240
+ {
241
+ "key": "CLOSE_VIEW",
242
+ "name": "Close View"
243
+ },
244
+ {
245
+ "key": "DOWNLOAD_FILE",
246
+ "name": "Download File",
247
+ "payloadSchema": [
248
+ {
249
+ "name": "id",
250
+ "type": "string",
251
+ "required": true
252
+ }
253
+ ]
177
254
  }
178
255
  ],
179
256
  "transitions": [
@@ -187,8 +264,8 @@
187
264
  "StoredFile",
188
265
  {
189
266
  "emit": {
190
- "failure": "StoredFileLoadFailed",
191
- "success": "StoredFileLoaded"
267
+ "success": "StoredFileLoaded",
268
+ "failure": "StoredFileLoadFailed"
192
269
  }
193
270
  }
194
271
  ],
@@ -196,22 +273,22 @@
196
273
  "render-ui",
197
274
  "main",
198
275
  {
199
- "gap": "md",
200
- "align": "center",
201
- "className": "py-12",
202
276
  "type": "stack",
203
- "direction": "vertical",
204
277
  "children": [
205
278
  {
206
279
  "type": "spinner"
207
280
  },
208
281
  {
282
+ "content": "Loading files…",
209
283
  "type": "typography",
210
- "variant": "caption",
211
284
  "color": "muted",
212
- "content": "Loading files…"
285
+ "variant": "caption"
213
286
  }
214
- ]
287
+ ],
288
+ "align": "center",
289
+ "className": "py-12",
290
+ "gap": "md",
291
+ "direction": "vertical"
215
292
  }
216
293
  ]
217
294
  ]
@@ -225,182 +302,153 @@
225
302
  "render-ui",
226
303
  "main",
227
304
  {
305
+ "gap": "md",
228
306
  "direction": "vertical",
229
- "type": "stack",
230
307
  "children": [
231
308
  {
232
- "content": "@config.title",
233
- "type": "typography",
234
- "variant": "h3"
309
+ "gap": "sm",
310
+ "direction": "horizontal",
311
+ "children": [
312
+ {
313
+ "name": "folder",
314
+ "type": "icon"
315
+ },
316
+ {
317
+ "variant": "h3",
318
+ "content": "@config.title",
319
+ "type": "typography"
320
+ }
321
+ ],
322
+ "type": "stack",
323
+ "align": "center"
235
324
  },
236
325
  {
237
- "items": [
326
+ "children": [
327
+ {
328
+ "type": "stat-display",
329
+ "label": "Total files",
330
+ "icon": "file",
331
+ "value": "@payload.data.length"
332
+ },
238
333
  {
239
- "href": "/",
240
- "label": "Workspace"
334
+ "label": "Folders",
335
+ "type": "stat-display",
336
+ "icon": "folder",
337
+ "value": "12"
241
338
  },
242
339
  {
243
- "href": "/files",
244
- "label": "Files"
340
+ "value": "18",
341
+ "type": "stat-display",
342
+ "label": "Uploaded this week",
343
+ "icon": "upload"
245
344
  },
246
345
  {
247
- "label": "All Documents"
346
+ "value": "4",
347
+ "type": "stat-display",
348
+ "icon": "archive",
349
+ "label": "Archived"
248
350
  }
249
351
  ],
250
- "type": "doc-breadcrumb"
352
+ "cols": 4.0,
353
+ "type": "simple-grid"
251
354
  },
252
355
  {
253
- "direction": "horizontal",
254
- "gap": "md",
255
- "type": "stack",
256
- "children": [
356
+ "type": "divider"
357
+ },
358
+ {
359
+ "type": "file-tree",
360
+ "tree": [
257
361
  {
258
- "type": "file-tree",
259
- "tree": [
260
- {
261
- "path": "Contracts",
262
- "name": "Contracts",
263
- "type": "dir",
264
- "children": [
265
- {
266
- "name": "Active.pdf",
267
- "path": "Active.pdf",
268
- "type": "file"
269
- },
270
- {
271
- "path": "Archived.pdf",
272
- "name": "Archived.pdf",
273
- "type": "file"
274
- }
275
- ]
276
- },
362
+ "type": "dir",
363
+ "path": "Contracts",
364
+ "name": "Contracts",
365
+ "children": [
277
366
  {
278
- "type": "dir",
279
- "name": "Policies",
280
- "children": [
281
- {
282
- "type": "file",
283
- "name": "HR.docx",
284
- "path": "Policies/HR.docx"
285
- },
286
- {
287
- "name": "Security.md",
288
- "type": "file",
289
- "path": "Policies/Security.md"
290
- }
291
- ],
292
- "path": "Policies"
367
+ "name": "Active.pdf",
368
+ "path": "Active.pdf",
369
+ "type": "file"
293
370
  },
294
371
  {
295
- "type": "dir",
296
- "path": "Templates",
297
- "name": "Templates",
298
- "children": [
299
- {
300
- "name": "Invoice.docx",
301
- "type": "file",
302
- "path": "Templates/Invoice.docx"
303
- },
304
- {
305
- "path": "Templates/NDA.pdf",
306
- "name": "NDA.pdf",
307
- "type": "file"
308
- }
309
- ]
372
+ "type": "file",
373
+ "name": "Archived.pdf",
374
+ "path": "Archived.pdf"
310
375
  }
311
376
  ]
312
377
  },
313
378
  {
314
379
  "children": [
315
380
  {
316
- "description": "or click to browse",
317
- "label": "Drop files here",
318
- "icon": "upload",
319
- "type": "upload-drop-zone",
320
- "maxSize": 10485760.0,
321
- "maxFiles": 5.0,
322
- "accept": "*/*"
381
+ "name": "HR.docx",
382
+ "path": "Policies/HR.docx",
383
+ "type": "file"
323
384
  },
324
385
  {
325
- "type": "accordion",
326
- "items": [
327
- {
328
- "id": "recent",
329
- "content": "Files uploaded in the last 7 days.",
330
- "title": "Recent Uploads"
331
- },
332
- {
333
- "content": "Files shared by collaborators.",
334
- "id": "shared",
335
- "title": "Shared With Me"
336
- },
337
- {
338
- "title": "Starred",
339
- "content": "Files you have flagged for quick access.",
340
- "id": "starred"
341
- }
342
- ]
386
+ "type": "file",
387
+ "name": "Security.md",
388
+ "path": "Policies/Security.md"
343
389
  }
344
390
  ],
345
- "type": "stack",
346
- "direction": "vertical",
347
- "gap": "sm"
391
+ "type": "dir",
392
+ "name": "Policies",
393
+ "path": "Policies"
394
+ },
395
+ {
396
+ "name": "Templates",
397
+ "path": "Templates",
398
+ "type": "dir",
399
+ "children": [
400
+ {
401
+ "path": "Templates/Invoice.docx",
402
+ "name": "Invoice.docx",
403
+ "type": "file"
404
+ },
405
+ {
406
+ "name": "NDA.pdf",
407
+ "path": "Templates/NDA.pdf",
408
+ "type": "file"
409
+ }
410
+ ]
348
411
  }
349
412
  ]
350
413
  },
351
414
  {
352
- "type": "tag-cloud",
353
- "tags": [
354
- {
355
- "label": "Contracts"
356
- },
357
- {
358
- "label": "Policies"
359
- },
360
- {
361
- "label": "Templates"
362
- },
363
- {
364
- "label": "Archive"
365
- },
366
- {
367
- "label": "Drafts"
368
- },
369
- {
370
- "label": "Public"
371
- }
372
- ],
373
- "variant": "primary"
415
+ "type": "divider"
374
416
  },
375
417
  {
376
418
  "fields": [
377
419
  {
420
+ "variant": "caption",
378
421
  "name": "name",
379
422
  "label": "Name"
380
423
  },
381
424
  {
425
+ "label": "Folder",
382
426
  "name": "folder",
383
- "label": "Folder"
427
+ "variant": "caption"
384
428
  },
385
429
  {
386
- "name": "mimeType",
387
- "label": "Type"
430
+ "variant": "badge",
431
+ "label": "Type",
432
+ "name": "mimeType"
388
433
  },
389
434
  {
390
435
  "name": "sizeBytes",
391
- "label": "Size"
436
+ "label": "Size",
437
+ "variant": "caption"
392
438
  },
393
439
  {
394
- "name": "uploadedAt",
395
- "label": "Uploaded"
440
+ "label": "Uploaded",
441
+ "variant": "caption",
442
+ "name": "uploadedAt"
396
443
  }
397
444
  ],
398
- "type": "data-grid",
445
+ "gap": "sm",
399
446
  "itemActions": [
400
447
  {
401
- "event": "DOWNLOAD_FILE",
402
- "label": "Download",
403
- "variant": "primary"
448
+ "variant": "primary",
449
+ "event": "OPEN_FILE",
450
+ "icon": "arrow-right",
451
+ "label": "Open"
404
452
  },
405
453
  {
406
454
  "label": "Archive",
@@ -408,18 +456,12 @@
408
456
  "variant": "danger"
409
457
  }
410
458
  ],
459
+ "cols": 1.0,
460
+ "type": "data-grid",
411
461
  "entity": "@payload.data"
412
- },
413
- {
414
- "showPageSize": false,
415
- "currentPage": 1.0,
416
- "showTotal": true,
417
- "totalPages": 8.0,
418
- "totalItems": 80.0,
419
- "type": "pagination"
420
462
  }
421
463
  ],
422
- "gap": "md"
464
+ "type": "stack"
423
465
  }
424
466
  ]
425
467
  ]
@@ -433,8 +475,8 @@
433
475
  "render-ui",
434
476
  "main",
435
477
  {
436
- "variant": "error",
437
478
  "message": "@payload.error",
479
+ "variant": "error",
438
480
  "type": "alert"
439
481
  }
440
482
  ]
@@ -442,28 +484,220 @@
442
484
  },
443
485
  {
444
486
  "from": "browsing",
445
- "to": "browsing",
446
- "event": "DOWNLOAD_FILE",
487
+ "to": "viewing_single",
488
+ "event": "OPEN_FILE",
447
489
  "effects": [
448
490
  [
449
491
  "set",
450
492
  "@entity.id",
451
- "@payload.id"
493
+ "@payload.row.id"
494
+ ],
495
+ [
496
+ "set",
497
+ "@entity.name",
498
+ "@payload.row.name"
499
+ ],
500
+ [
501
+ "set",
502
+ "@entity.path",
503
+ "@payload.row.path"
504
+ ],
505
+ [
506
+ "set",
507
+ "@entity.mimeType",
508
+ "@payload.row.mimeType"
509
+ ],
510
+ [
511
+ "set",
512
+ "@entity.sizeBytes",
513
+ "@payload.row.sizeBytes"
514
+ ],
515
+ [
516
+ "set",
517
+ "@entity.uploaderId",
518
+ "@payload.row.uploaderId"
519
+ ],
520
+ [
521
+ "set",
522
+ "@entity.uploaderName",
523
+ "@payload.row.uploaderName"
524
+ ],
525
+ [
526
+ "set",
527
+ "@entity.folder",
528
+ "@payload.row.folder"
529
+ ],
530
+ [
531
+ "set",
532
+ "@entity.uploadedAt",
533
+ "@payload.row.uploadedAt"
534
+ ],
535
+ [
536
+ "set",
537
+ "@entity.isArchived",
538
+ "@payload.row.isArchived"
452
539
  ],
453
540
  [
454
541
  "render-ui",
455
542
  "main",
456
543
  {
457
- "variant": "info",
458
- "type": "alert",
459
- "message": "Download requested"
544
+ "type": "stack",
545
+ "gap": "md",
546
+ "children": [
547
+ {
548
+ "gap": "sm",
549
+ "type": "stack",
550
+ "align": "center",
551
+ "direction": "horizontal",
552
+ "children": [
553
+ {
554
+ "type": "button",
555
+ "label": "Back",
556
+ "variant": "ghost",
557
+ "action": "CLOSE_VIEW"
558
+ },
559
+ {
560
+ "type": "icon",
561
+ "name": "file"
562
+ },
563
+ {
564
+ "type": "typography",
565
+ "content": "@entity.name",
566
+ "variant": "h3"
567
+ },
568
+ {
569
+ "variant": "default",
570
+ "type": "badge",
571
+ "label": "@entity.mimeType"
572
+ }
573
+ ]
574
+ },
575
+ {
576
+ "type": "divider"
577
+ },
578
+ {
579
+ "children": [
580
+ {
581
+ "children": [
582
+ {
583
+ "color": "muted",
584
+ "content": "Folder",
585
+ "type": "typography",
586
+ "variant": "caption"
587
+ },
588
+ {
589
+ "content": "@entity.folder",
590
+ "type": "typography",
591
+ "variant": "body"
592
+ }
593
+ ],
594
+ "gap": "md",
595
+ "direction": "horizontal",
596
+ "type": "stack"
597
+ },
598
+ {
599
+ "children": [
600
+ {
601
+ "color": "muted",
602
+ "type": "typography",
603
+ "content": "Path",
604
+ "variant": "caption"
605
+ },
606
+ {
607
+ "content": "@entity.path",
608
+ "type": "typography",
609
+ "variant": "body"
610
+ }
611
+ ],
612
+ "gap": "md",
613
+ "direction": "horizontal",
614
+ "type": "stack"
615
+ },
616
+ {
617
+ "direction": "horizontal",
618
+ "type": "stack",
619
+ "gap": "md",
620
+ "children": [
621
+ {
622
+ "content": "Uploader",
623
+ "type": "typography",
624
+ "variant": "caption",
625
+ "color": "muted"
626
+ },
627
+ {
628
+ "type": "typography",
629
+ "variant": "body",
630
+ "content": "@entity.uploaderName"
631
+ }
632
+ ]
633
+ }
634
+ ],
635
+ "type": "stack",
636
+ "direction": "vertical",
637
+ "gap": "sm"
638
+ },
639
+ {
640
+ "type": "divider"
641
+ },
642
+ {
643
+ "children": [
644
+ {
645
+ "icon": "hard-drive",
646
+ "label": "Size",
647
+ "type": "stat-display",
648
+ "value": "@entity.sizeBytes"
649
+ },
650
+ {
651
+ "label": "Type",
652
+ "icon": "file",
653
+ "type": "stat-display",
654
+ "value": "@entity.mimeType"
655
+ },
656
+ {
657
+ "icon": "calendar",
658
+ "value": "@entity.uploadedAt",
659
+ "type": "stat-display",
660
+ "label": "Uploaded"
661
+ }
662
+ ],
663
+ "type": "simple-grid",
664
+ "cols": 3.0
665
+ },
666
+ {
667
+ "children": [
668
+ {
669
+ "actionPayload": {
670
+ "id": "@entity.id"
671
+ },
672
+ "label": "Download",
673
+ "variant": "primary",
674
+ "type": "button",
675
+ "action": "DOWNLOAD_FILE"
676
+ },
677
+ {
678
+ "actionPayload": {
679
+ "id": "@entity.id"
680
+ },
681
+ "type": "button",
682
+ "variant": "danger",
683
+ "action": "ARCHIVE_FILE",
684
+ "label": "Archive"
685
+ }
686
+ ],
687
+ "align": "center",
688
+ "direction": "horizontal",
689
+ "gap": "sm",
690
+ "type": "stack"
691
+ }
692
+ ],
693
+ "direction": "vertical"
460
694
  }
461
695
  ]
462
696
  ]
463
697
  },
464
698
  {
465
699
  "from": "browsing",
466
- "to": "browsing",
700
+ "to": "loading",
467
701
  "event": "ARCHIVE_FILE",
468
702
  "effects": [
469
703
  [
@@ -471,29 +705,52 @@
471
705
  "@entity.id",
472
706
  "@payload.id"
473
707
  ],
708
+ [
709
+ "fetch",
710
+ "StoredFile",
711
+ {
712
+ "emit": {
713
+ "success": "StoredFileLoaded",
714
+ "failure": "StoredFileLoadFailed"
715
+ }
716
+ }
717
+ ],
474
718
  [
475
719
  "render-ui",
476
720
  "main",
477
721
  {
478
- "variant": "info",
479
- "type": "alert",
480
- "message": "Archive requested"
722
+ "className": "py-12",
723
+ "children": [
724
+ {
725
+ "type": "spinner"
726
+ },
727
+ {
728
+ "type": "typography",
729
+ "variant": "caption",
730
+ "content": "Archiving file…",
731
+ "color": "muted"
732
+ }
733
+ ],
734
+ "type": "stack",
735
+ "direction": "vertical",
736
+ "gap": "md",
737
+ "align": "center"
481
738
  }
482
739
  ]
483
740
  ]
484
741
  },
485
742
  {
486
- "from": "error",
743
+ "from": "viewing_single",
487
744
  "to": "loading",
488
- "event": "INIT",
745
+ "event": "CLOSE_VIEW",
489
746
  "effects": [
490
747
  [
491
748
  "fetch",
492
749
  "StoredFile",
493
750
  {
494
751
  "emit": {
495
- "failure": "StoredFileLoadFailed",
496
- "success": "StoredFileLoaded"
752
+ "success": "StoredFileLoaded",
753
+ "failure": "StoredFileLoadFailed"
497
754
  }
498
755
  }
499
756
  ],
@@ -501,22 +758,135 @@
501
758
  "render-ui",
502
759
  "main",
503
760
  {
761
+ "gap": "md",
504
762
  "align": "center",
763
+ "type": "stack",
764
+ "className": "py-12",
505
765
  "children": [
506
766
  {
507
767
  "type": "spinner"
508
768
  },
509
769
  {
770
+ "type": "typography",
771
+ "color": "muted",
510
772
  "content": "Loading files…",
773
+ "variant": "caption"
774
+ }
775
+ ],
776
+ "direction": "vertical"
777
+ }
778
+ ]
779
+ ]
780
+ },
781
+ {
782
+ "from": "viewing_single",
783
+ "to": "loading",
784
+ "event": "DOWNLOAD_FILE",
785
+ "effects": [
786
+ [
787
+ "set",
788
+ "@entity.id",
789
+ "@payload.id"
790
+ ],
791
+ [
792
+ "fetch",
793
+ "StoredFile",
794
+ {
795
+ "emit": {
796
+ "success": "StoredFileLoaded",
797
+ "failure": "StoredFileLoadFailed"
798
+ }
799
+ }
800
+ ],
801
+ [
802
+ "render-ui",
803
+ "main",
804
+ {
805
+ "direction": "vertical",
806
+ "gap": "md",
807
+ "type": "stack",
808
+ "align": "center",
809
+ "className": "py-12",
810
+ "children": [
811
+ {
812
+ "type": "spinner"
813
+ },
814
+ {
511
815
  "type": "typography",
816
+ "color": "muted",
512
817
  "variant": "caption",
513
- "color": "muted"
818
+ "content": "Preparing download…"
819
+ }
820
+ ]
821
+ }
822
+ ]
823
+ ]
824
+ },
825
+ {
826
+ "from": "viewing_single",
827
+ "to": "loading",
828
+ "event": "ARCHIVE_FILE",
829
+ "effects": [
830
+ [
831
+ "set",
832
+ "@entity.id",
833
+ "@payload.id"
834
+ ],
835
+ [
836
+ "fetch",
837
+ "StoredFile",
838
+ {
839
+ "emit": {
840
+ "success": "StoredFileLoaded",
841
+ "failure": "StoredFileLoadFailed"
842
+ }
843
+ }
844
+ ],
845
+ [
846
+ "render-ui",
847
+ "main",
848
+ {
849
+ "align": "center",
850
+ "gap": "md",
851
+ "children": [
852
+ {
853
+ "type": "spinner"
854
+ },
855
+ {
856
+ "type": "typography",
857
+ "content": "Archiving file…",
858
+ "color": "muted",
859
+ "variant": "caption"
514
860
  }
515
861
  ],
862
+ "type": "stack",
516
863
  "className": "py-12",
517
- "direction": "vertical",
518
- "gap": "md",
519
- "type": "stack"
864
+ "direction": "vertical"
865
+ }
866
+ ]
867
+ ]
868
+ },
869
+ {
870
+ "from": "error",
871
+ "to": "loading",
872
+ "event": "INIT",
873
+ "effects": [
874
+ [
875
+ "fetch",
876
+ "StoredFile",
877
+ {
878
+ "emit": {
879
+ "success": "StoredFileLoaded",
880
+ "failure": "StoredFileLoadFailed"
881
+ }
882
+ }
883
+ ],
884
+ [
885
+ "render-ui",
886
+ "main",
887
+ {
888
+ "type": "spinner",
889
+ "size": "sm"
520
890
  }
521
891
  ]
522
892
  ]