@almadar/std 16.234.0 → 16.236.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 (245) hide show
  1. package/behaviors/behaviors-registry.json +4402 -1898
  2. package/behaviors/lolo/infra/atoms/std-approval-gate.lolo +25 -41
  3. package/behaviors/lolo/infra/atoms/std-audit-capture.lolo +0 -5
  4. package/behaviors/lolo/infra/atoms/std-cache-aside.lolo +0 -24
  5. package/behaviors/lolo/infra/atoms/std-circuit-breaker.lolo +1 -17
  6. package/behaviors/lolo/infra/atoms/std-data-erasure.lolo +17 -24
  7. package/behaviors/lolo/infra/atoms/std-data-import.lolo +8 -11
  8. package/behaviors/lolo/infra/atoms/std-game-clock.lolo +2 -0
  9. package/behaviors/lolo/infra/atoms/std-knowledge-loop.lolo +0 -5
  10. package/behaviors/lolo/infra/atoms/std-lifecycle.lolo +3 -1
  11. package/behaviors/lolo/infra/atoms/std-mod-queue.lolo +40 -18
  12. package/behaviors/lolo/infra/atoms/std-notification-preferences.lolo +20 -11
  13. package/behaviors/lolo/infra/atoms/std-notify-on-event.lolo +0 -5
  14. package/behaviors/lolo/infra/atoms/std-permission-matrix.lolo +23 -11
  15. package/behaviors/lolo/infra/atoms/std-rate-limiter.lolo +84 -22
  16. package/behaviors/lolo/infra/atoms/std-status-lifecycle.lolo +1 -6
  17. package/behaviors/lolo/ml/atoms/std-graph-builder.lolo +3 -1
  18. package/behaviors/lolo/ml/atoms/std-ml-classify.lolo +0 -4
  19. package/behaviors/lolo/ml/atoms/std-ml-similarity.lolo +0 -4
  20. package/behaviors/lolo/ui/avl/atoms/ui-avl-state-machine.lolo +12 -0
  21. package/behaviors/lolo/ui/core/atoms/std-app-layout.lolo +55 -9
  22. package/behaviors/lolo/ui/core/atoms/std-app-search.lolo +6 -2
  23. package/behaviors/lolo/ui/core/atoms/std-billable-hour.lolo +19 -14
  24. package/behaviors/lolo/ui/core/atoms/std-board.lolo +77 -27
  25. package/behaviors/lolo/ui/core/atoms/std-browse.lolo +44 -28
  26. package/behaviors/lolo/ui/core/atoms/std-calendar.lolo +7 -3
  27. package/behaviors/lolo/ui/core/atoms/std-esign-flow.lolo +25 -13
  28. package/behaviors/lolo/ui/core/atoms/std-esign-request.lolo +5 -0
  29. package/behaviors/lolo/ui/core/atoms/std-event-log.lolo +0 -5
  30. package/behaviors/lolo/ui/core/atoms/std-export.lolo +0 -10
  31. package/behaviors/lolo/ui/core/atoms/std-file-store.lolo +7 -3
  32. package/behaviors/lolo/ui/core/atoms/std-form-advanced.lolo +1 -6
  33. package/behaviors/lolo/ui/core/atoms/std-geosearch.lolo +1 -0
  34. package/behaviors/lolo/ui/core/atoms/std-graphs.lolo +20 -4
  35. package/behaviors/lolo/ui/core/atoms/std-import.lolo +0 -5
  36. package/behaviors/lolo/ui/core/atoms/std-list.lolo +46 -32
  37. package/behaviors/lolo/ui/core/atoms/std-modal-editor.lolo +2 -2
  38. package/behaviors/lolo/ui/core/atoms/std-rating-review.lolo +12 -13
  39. package/behaviors/lolo/ui/core/atoms/std-record-detail.lolo +16 -12
  40. package/behaviors/lolo/ui/core/atoms/std-recurrence.lolo +10 -1
  41. package/behaviors/lolo/ui/core/atoms/std-role-gate.lolo +39 -0
  42. package/behaviors/lolo/ui/core/atoms/std-saved-search.lolo +78 -16
  43. package/behaviors/lolo/ui/core/atoms/std-selection.lolo +15 -10
  44. package/behaviors/lolo/ui/core/atoms/std-stats.lolo +5 -5
  45. package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +3 -0
  46. package/behaviors/lolo/ui/core/atoms/std-thread.lolo +41 -73
  47. package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +20 -11
  48. package/behaviors/lolo/ui/core/atoms/std-vote.lolo +0 -4
  49. package/behaviors/lolo/ui/core/atoms/std-wizard.lolo +3 -3
  50. package/behaviors/lolo/ui/core/atoms/ui-presence.lolo +21 -0
  51. package/behaviors/lolo/ui/core/molecules/ui-breadcrumb.lolo +6 -1
  52. package/behaviors/lolo/ui/core/molecules/ui-chart.lolo +11 -1
  53. package/behaviors/lolo/ui/core/molecules/ui-code-block.lolo +13 -8
  54. package/behaviors/lolo/ui/core/molecules/ui-command-palette.lolo +7 -2
  55. package/behaviors/lolo/ui/core/molecules/ui-commit-row.lolo +2 -2
  56. package/behaviors/lolo/ui/core/molecules/ui-confirm-dialog.lolo +8 -0
  57. package/behaviors/lolo/ui/core/molecules/ui-data-grid.lolo +41 -3
  58. package/behaviors/lolo/ui/core/molecules/ui-data-list.lolo +41 -3
  59. package/behaviors/lolo/ui/core/molecules/ui-document-details.lolo +30 -9
  60. package/behaviors/lolo/ui/core/molecules/ui-document-panel.lolo +8 -3
  61. package/behaviors/lolo/ui/core/molecules/ui-document-viewer.lolo +6 -1
  62. package/behaviors/lolo/ui/core/molecules/ui-drawer.lolo +13 -0
  63. package/behaviors/lolo/ui/core/molecules/ui-floating-action-button.lolo +6 -1
  64. package/behaviors/lolo/ui/core/molecules/ui-floating-toolbar.lolo +6 -1
  65. package/behaviors/lolo/ui/core/molecules/ui-form-actions.lolo +6 -1
  66. package/behaviors/lolo/ui/core/molecules/ui-graph-canvas.lolo +6 -1
  67. package/behaviors/lolo/ui/core/molecules/ui-menu.lolo +6 -1
  68. package/behaviors/lolo/ui/core/molecules/ui-meter.lolo +6 -1
  69. package/behaviors/lolo/ui/core/molecules/ui-modal.lolo +5 -0
  70. package/behaviors/lolo/ui/core/molecules/ui-page-header.lolo +11 -1
  71. package/behaviors/lolo/ui/core/molecules/ui-page-transition.lolo +1 -1
  72. package/behaviors/lolo/ui/core/molecules/ui-swipeable-row.lolo +44 -15
  73. package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +41 -3
  74. package/behaviors/lolo/ui/core/molecules/ui-tabs.lolo +8 -2
  75. package/behaviors/lolo/ui/core/organisms/ui-detail-panel.lolo +66 -12
  76. package/behaviors/lolo/ui/core/organisms/ui-entity-cards.lolo +9 -3
  77. package/behaviors/lolo/ui/core/organisms/ui-entity-list.lolo +9 -3
  78. package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +18 -9
  79. package/behaviors/lolo/ui/core/organisms/ui-form-section.lolo +55 -10
  80. package/behaviors/lolo/ui/core/organisms/ui-form.lolo +55 -10
  81. package/behaviors/lolo/ui/core/organisms/ui-media-gallery.lolo +8 -3
  82. package/behaviors/lolo/ui/core/organisms/ui-state-machine-view.lolo +12 -0
  83. package/behaviors/lolo/ui/core/organisms/ui-timeline.lolo +8 -3
  84. package/behaviors/lolo/ui/core/templates/ui-counter-template.lolo +2 -44
  85. package/behaviors/lolo/ui/core/templates/ui-dashboard-layout.lolo +6 -1
  86. package/behaviors/lolo/ui/core/templates/ui-generic-app-template.lolo +2 -37
  87. package/behaviors/lolo/ui/game/atoms/ui-game-menu.lolo +8 -2
  88. package/behaviors/lolo/ui/game/organisms/std-arcade-board-3d.lolo +2 -2
  89. package/behaviors/lolo/ui/game/organisms/std-crew-board-2d.lolo +0 -4
  90. package/behaviors/lolo/ui/game/organisms/std-platformer-puzzle.lolo +2 -66
  91. package/behaviors/lolo/ui/game/organisms/std-tactics-board-2d.lolo +0 -4
  92. package/behaviors/lolo/ui/game/organisms/std-worldmap-board-2d.lolo +0 -4
  93. package/behaviors/lolo/ui/learning/atoms/std-learn-stepper.lolo +6 -6
  94. package/behaviors/lolo-behavior-contracts.json +1 -1
  95. package/behaviors/registry/factory-signatures.json +1 -1
  96. package/behaviors/registry/infra/atoms/std-approval-gate.orb +124 -67
  97. package/behaviors/registry/infra/atoms/std-audit-capture.orb +0 -8
  98. package/behaviors/registry/infra/atoms/std-cache-aside.orb +0 -84
  99. package/behaviors/registry/infra/atoms/std-circuit-breaker.orb +1 -44
  100. package/behaviors/registry/infra/atoms/std-data-erasure.orb +124 -55
  101. package/behaviors/registry/infra/atoms/std-data-import.orb +12 -11
  102. package/behaviors/registry/infra/atoms/std-game-clock.orb +31 -0
  103. package/behaviors/registry/infra/atoms/std-knowledge-loop.orb +0 -57
  104. package/behaviors/registry/infra/atoms/std-lifecycle.orb +43 -0
  105. package/behaviors/registry/infra/atoms/std-mod-queue.orb +379 -103
  106. package/behaviors/registry/infra/atoms/std-notification-preferences.orb +126 -12
  107. package/behaviors/registry/infra/atoms/std-notify-on-event.orb +0 -11
  108. package/behaviors/registry/infra/atoms/std-permission-matrix.orb +128 -12
  109. package/behaviors/registry/infra/atoms/std-rate-limiter.orb +287 -72
  110. package/behaviors/registry/infra/atoms/std-status-lifecycle.orb +5 -8
  111. package/behaviors/registry/ml/atoms/std-graph-builder.orb +11 -0
  112. package/behaviors/registry/ml/atoms/std-ml-classify.orb +0 -7
  113. package/behaviors/registry/ml/atoms/std-ml-similarity.orb +0 -7
  114. package/behaviors/registry/ui/avl/atoms/ui-avl-state-machine.orb +82 -0
  115. package/behaviors/registry/ui/core/atoms/std-app-layout.orb +417 -9
  116. package/behaviors/registry/ui/core/atoms/std-app-search.orb +53 -1
  117. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +209 -19
  118. package/behaviors/registry/ui/core/atoms/std-board.orb +242 -61
  119. package/behaviors/registry/ui/core/atoms/std-browse.orb +295 -41
  120. package/behaviors/registry/ui/core/atoms/std-calendar.orb +96 -2
  121. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +122 -15
  122. package/behaviors/registry/ui/core/atoms/std-esign-request.orb +11 -0
  123. package/behaviors/registry/ui/core/atoms/std-event-log.orb +0 -8
  124. package/behaviors/registry/ui/core/atoms/std-export.orb +0 -16
  125. package/behaviors/registry/ui/core/atoms/std-file-store.orb +109 -2
  126. package/behaviors/registry/ui/core/atoms/std-form-advanced.orb +1 -43
  127. package/behaviors/registry/ui/core/atoms/std-geosearch.orb +5 -0
  128. package/behaviors/registry/ui/core/atoms/std-graphs.orb +173 -66
  129. package/behaviors/registry/ui/core/atoms/std-import.orb +0 -8
  130. package/behaviors/registry/ui/core/atoms/std-list.orb +226 -34
  131. package/behaviors/registry/ui/core/atoms/std-modal-editor.orb +10 -1
  132. package/behaviors/registry/ui/core/atoms/std-rating-review.orb +37 -19
  133. package/behaviors/registry/ui/core/atoms/std-record-detail.orb +204 -11
  134. package/behaviors/registry/ui/core/atoms/std-recurrence.orb +89 -4
  135. package/behaviors/registry/ui/core/atoms/std-role-gate.orb +217 -0
  136. package/behaviors/registry/ui/core/atoms/std-saved-search.orb +419 -19
  137. package/behaviors/registry/ui/core/atoms/std-selection.orb +140 -10
  138. package/behaviors/registry/ui/core/atoms/std-stats.orb +73 -1
  139. package/behaviors/registry/ui/core/atoms/std-tag-taxonomy.orb +3 -0
  140. package/behaviors/registry/ui/core/atoms/std-thread.orb +190 -115
  141. package/behaviors/registry/ui/core/atoms/std-version-history.orb +127 -13
  142. package/behaviors/registry/ui/core/atoms/std-vote.orb +0 -9
  143. package/behaviors/registry/ui/core/atoms/std-wizard.orb +33 -3
  144. package/behaviors/registry/ui/core/atoms/ui-presence.orb +59 -0
  145. package/behaviors/registry/ui/core/molecules/ui-breadcrumb.orb +53 -1
  146. package/behaviors/registry/ui/core/molecules/ui-chart.orb +68 -1
  147. package/behaviors/registry/ui/core/molecules/ui-code-block.orb +291 -8
  148. package/behaviors/registry/ui/core/molecules/ui-command-palette.orb +87 -2
  149. package/behaviors/registry/ui/core/molecules/ui-commit-row.orb +3 -2
  150. package/behaviors/registry/ui/core/molecules/ui-confirm-dialog.orb +32 -0
  151. package/behaviors/registry/ui/core/molecules/ui-data-grid.orb +189 -3
  152. package/behaviors/registry/ui/core/molecules/ui-data-list.orb +189 -3
  153. package/behaviors/registry/ui/core/molecules/ui-document-details.orb +81 -24
  154. package/behaviors/registry/ui/core/molecules/ui-document-panel.orb +121 -3
  155. package/behaviors/registry/ui/core/molecules/ui-document-viewer.orb +53 -1
  156. package/behaviors/registry/ui/core/molecules/ui-drawer.orb +40 -0
  157. package/behaviors/registry/ui/core/molecules/ui-floating-action-button.orb +53 -1
  158. package/behaviors/registry/ui/core/molecules/ui-floating-toolbar.orb +53 -1
  159. package/behaviors/registry/ui/core/molecules/ui-form-actions.orb +53 -1
  160. package/behaviors/registry/ui/core/molecules/ui-graph-canvas.orb +53 -1
  161. package/behaviors/registry/ui/core/molecules/ui-menu.orb +57 -1
  162. package/behaviors/registry/ui/core/molecules/ui-meter.orb +53 -1
  163. package/behaviors/registry/ui/core/molecules/ui-modal.orb +8 -0
  164. package/behaviors/registry/ui/core/molecules/ui-page-header.orb +60 -1
  165. package/behaviors/registry/ui/core/molecules/ui-page-transition.orb +1 -1
  166. package/behaviors/registry/ui/core/molecules/ui-swipeable-row.orb +393 -23
  167. package/behaviors/registry/ui/core/molecules/ui-table-view.orb +189 -3
  168. package/behaviors/registry/ui/core/molecules/ui-tabs.orb +99 -2
  169. package/behaviors/registry/ui/core/organisms/ui-detail-panel.orb +282 -20
  170. package/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +130 -3
  171. package/behaviors/registry/ui/core/organisms/ui-entity-list.orb +130 -3
  172. package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +367 -9
  173. package/behaviors/registry/ui/core/organisms/ui-form-section.orb +104 -13
  174. package/behaviors/registry/ui/core/organisms/ui-form.orb +104 -13
  175. package/behaviors/registry/ui/core/organisms/ui-media-gallery.orb +121 -3
  176. package/behaviors/registry/ui/core/organisms/ui-state-machine-view.orb +82 -0
  177. package/behaviors/registry/ui/core/organisms/ui-timeline.orb +121 -3
  178. package/behaviors/registry/ui/core/templates/ui-counter-template.orb +1 -172
  179. package/behaviors/registry/ui/core/templates/ui-dashboard-layout.orb +53 -1
  180. package/behaviors/registry/ui/core/templates/ui-generic-app-template.orb +1 -116
  181. package/behaviors/registry/ui/game/atoms/ui-game-menu.orb +99 -2
  182. package/behaviors/registry/ui/game/organisms/std-arcade-board-3d.orb +10 -0
  183. package/behaviors/registry/ui/game/organisms/std-crew-board-2d.orb +0 -7
  184. package/behaviors/registry/ui/game/organisms/std-platformer-puzzle.orb +1 -807
  185. package/behaviors/registry/ui/game/organisms/std-tactics-board-2d.orb +0 -7
  186. package/behaviors/registry/ui/game/organisms/std-worldmap-board-2d.orb +0 -7
  187. package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +6 -0
  188. package/canonical-operators.json +18 -1
  189. package/dist/behaviors/exports-reader.js +7662 -3762
  190. package/dist/behaviors/functions/index.d.ts +309 -104
  191. package/dist/behaviors/functions/index.js +7651 -3762
  192. package/dist/behaviors/index.d.ts +1 -1
  193. package/dist/behaviors/index.js +7663 -3763
  194. package/dist/behaviors/query.js +7662 -3762
  195. package/dist/behaviors-embeddings.hash.json +3 -3
  196. package/dist/behaviors-embeddings.json +35 -27
  197. package/dist/behaviors-registry.json +4402 -1898
  198. package/dist/index.d.ts +3 -3
  199. package/dist/index.js +7697 -3763
  200. package/dist/knob-embeddings.hash.json +3 -3
  201. package/dist/knob-embeddings.json +612 -352
  202. package/dist/modules/anim.d.ts +1 -1
  203. package/dist/modules/array.d.ts +1 -1
  204. package/dist/modules/array.js +15 -0
  205. package/dist/modules/async.d.ts +1 -1
  206. package/dist/modules/async.js +9 -0
  207. package/dist/modules/behavior.d.ts +1 -1
  208. package/dist/modules/browser.d.ts +1 -1
  209. package/dist/modules/composition.d.ts +1 -1
  210. package/dist/modules/contract.d.ts +1 -1
  211. package/dist/modules/core.d.ts +1 -1
  212. package/dist/modules/core.js +10 -0
  213. package/dist/modules/data.d.ts +1 -1
  214. package/dist/modules/ease.d.ts +1 -1
  215. package/dist/modules/format.d.ts +1 -1
  216. package/dist/modules/geo.d.ts +1 -1
  217. package/dist/modules/graph.d.ts +1 -1
  218. package/dist/modules/grid.d.ts +1 -1
  219. package/dist/modules/index.d.ts +1 -1
  220. package/dist/modules/index.js +34 -0
  221. package/dist/modules/integration.d.ts +1 -1
  222. package/dist/modules/json.d.ts +1 -1
  223. package/dist/modules/llm.d.ts +1 -1
  224. package/dist/modules/math.d.ts +1 -1
  225. package/dist/modules/memory.d.ts +1 -1
  226. package/dist/modules/nn.d.ts +1 -1
  227. package/dist/modules/noise.d.ts +1 -1
  228. package/dist/modules/object.d.ts +1 -1
  229. package/dist/modules/os.d.ts +1 -1
  230. package/dist/modules/path.d.ts +1 -1
  231. package/dist/modules/prob.d.ts +1 -1
  232. package/dist/modules/session.d.ts +1 -1
  233. package/dist/modules/str.d.ts +1 -1
  234. package/dist/modules/tensor.d.ts +1 -1
  235. package/dist/modules/time.d.ts +1 -1
  236. package/dist/modules/trace.d.ts +1 -1
  237. package/dist/modules/train.d.ts +1 -1
  238. package/dist/modules/validate.d.ts +1 -1
  239. package/dist/modules/vector.d.ts +1 -1
  240. package/dist/modules/workspace.d.ts +1 -1
  241. package/dist/registry/factory-signatures.json +1 -1
  242. package/dist/registry.d.ts +5 -2
  243. package/dist/registry.js +55 -1
  244. package/dist/{types-DwAW4Nni.d.ts → types-DLx38UFZ.d.ts} +31 -4
  245. package/package.json +2 -2
@@ -262,6 +262,14 @@
262
262
  "required": false,
263
263
  "type": "string"
264
264
  },
265
+ "roles": {
266
+ "items": {
267
+ "type": "string"
268
+ },
269
+ "name": "roles",
270
+ "required": false,
271
+ "type": "array"
272
+ },
265
273
  "variant": {
266
274
  "name": "variant",
267
275
  "required": false,
@@ -273,6 +281,11 @@
273
281
  "danger",
274
282
  "default"
275
283
  ]
284
+ },
285
+ "when": {
286
+ "name": "when",
287
+ "required": false,
288
+ "type": "object"
276
289
  }
277
290
  },
278
291
  "type": "object"
@@ -363,6 +376,13 @@
363
376
  "default",
364
377
  "card"
365
378
  ]
379
+ },
380
+ "viewerRole": {
381
+ "default": "",
382
+ "description": "The viewer's role that each action's `roles` is checked against; bind it at the call site (e.g. `viewerRole: @user.role`). Empty = only actions with no `roles` show.",
383
+ "label": "Viewer's role",
384
+ "tier": "policy",
385
+ "type": "string"
366
386
  }
367
387
  },
368
388
  "effectRow": [
@@ -526,7 +546,40 @@
526
546
  "fieldNames": "@config.fieldNames",
527
547
  "fields": "@config.fields",
528
548
  "isLoading": "@config.isLoading",
529
- "itemActions": "@config.itemActions",
549
+ "itemActions": [
550
+ "array/filter",
551
+ "@config.itemActions",
552
+ [
553
+ "fn",
554
+ "action",
555
+ [
556
+ "or",
557
+ [
558
+ "=",
559
+ [
560
+ "array/len",
561
+ [
562
+ "object/get",
563
+ "@action",
564
+ "roles",
565
+ []
566
+ ]
567
+ ],
568
+ 0.0
569
+ ],
570
+ [
571
+ "array/includes",
572
+ [
573
+ "object/get",
574
+ "@action",
575
+ "roles",
576
+ []
577
+ ],
578
+ "@config.viewerRole"
579
+ ]
580
+ ]
581
+ ]
582
+ ],
530
583
  "page": "@config.pageProp",
531
584
  "pageSize": "@config.pageSize",
532
585
  "searchValue": "@config.searchValue",
@@ -563,7 +616,40 @@
563
616
  "fieldNames": "@config.fieldNames",
564
617
  "fields": "@config.fields",
565
618
  "isLoading": "@config.isLoading",
566
- "itemActions": "@config.itemActions",
619
+ "itemActions": [
620
+ "array/filter",
621
+ "@config.itemActions",
622
+ [
623
+ "fn",
624
+ "action",
625
+ [
626
+ "or",
627
+ [
628
+ "=",
629
+ [
630
+ "array/len",
631
+ [
632
+ "object/get",
633
+ "@action",
634
+ "roles",
635
+ []
636
+ ]
637
+ ],
638
+ 0.0
639
+ ],
640
+ [
641
+ "array/includes",
642
+ [
643
+ "object/get",
644
+ "@action",
645
+ "roles",
646
+ []
647
+ ],
648
+ "@config.viewerRole"
649
+ ]
650
+ ]
651
+ ]
652
+ ],
567
653
  "page": "@config.pageProp",
568
654
  "pageSize": "@config.pageSize",
569
655
  "searchValue": "@config.searchValue",
@@ -603,7 +689,40 @@
603
689
  "fieldNames": "@config.fieldNames",
604
690
  "fields": "@config.fields",
605
691
  "isLoading": "@config.isLoading",
606
- "itemActions": "@config.itemActions",
692
+ "itemActions": [
693
+ "array/filter",
694
+ "@config.itemActions",
695
+ [
696
+ "fn",
697
+ "action",
698
+ [
699
+ "or",
700
+ [
701
+ "=",
702
+ [
703
+ "array/len",
704
+ [
705
+ "object/get",
706
+ "@action",
707
+ "roles",
708
+ []
709
+ ]
710
+ ],
711
+ 0.0
712
+ ],
713
+ [
714
+ "array/includes",
715
+ [
716
+ "object/get",
717
+ "@action",
718
+ "roles",
719
+ []
720
+ ],
721
+ "@config.viewerRole"
722
+ ]
723
+ ]
724
+ ]
725
+ ],
607
726
  "page": "@config.pageProp",
608
727
  "pageSize": "@config.pageSize",
609
728
  "searchValue": "@config.searchValue",
@@ -686,6 +805,14 @@
686
805
  {
687
806
  "name": "variant",
688
807
  "type": "string"
808
+ },
809
+ {
810
+ "name": "when",
811
+ "type": "SExpr"
812
+ },
813
+ {
814
+ "name": "roles",
815
+ "type": "[string]"
689
816
  }
690
817
  ]
691
818
  }
@@ -128,6 +128,14 @@
128
128
  "required": true,
129
129
  "type": "string"
130
130
  },
131
+ "roles": {
132
+ "items": {
133
+ "type": "string"
134
+ },
135
+ "name": "roles",
136
+ "required": false,
137
+ "type": "array"
138
+ },
131
139
  "variant": {
132
140
  "name": "variant",
133
141
  "required": false,
@@ -364,10 +372,23 @@
364
372
  "required": false,
365
373
  "type": "string"
366
374
  },
375
+ "roles": {
376
+ "items": {
377
+ "type": "string"
378
+ },
379
+ "name": "roles",
380
+ "required": false,
381
+ "type": "array"
382
+ },
367
383
  "variant": {
368
384
  "name": "variant",
369
385
  "required": false,
370
386
  "type": "string"
387
+ },
388
+ "when": {
389
+ "name": "when",
390
+ "required": false,
391
+ "type": "object"
371
392
  }
372
393
  },
373
394
  "type": "object"
@@ -458,6 +479,14 @@
458
479
  "required": true,
459
480
  "type": "string"
460
481
  },
482
+ "roles": {
483
+ "items": {
484
+ "type": "string"
485
+ },
486
+ "name": "roles",
487
+ "required": false,
488
+ "type": "array"
489
+ },
461
490
  "variant": {
462
491
  "name": "variant",
463
492
  "required": false,
@@ -466,6 +495,11 @@
466
495
  "default",
467
496
  "danger"
468
497
  ]
498
+ },
499
+ "when": {
500
+ "name": "when",
501
+ "required": false,
502
+ "type": "object"
469
503
  }
470
504
  },
471
505
  "type": "object"
@@ -546,6 +580,13 @@
546
580
  "label": "Total Count",
547
581
  "tier": "presentation",
548
582
  "type": "number"
583
+ },
584
+ "viewerRole": {
585
+ "default": "",
586
+ "description": "The viewer's role that each action's `roles` is checked against; bind it at the call site (e.g. `viewerRole: @user.role`). Empty = only actions with no `roles` show.",
587
+ "label": "Viewer's role",
588
+ "tier": "policy",
589
+ "type": "string"
549
590
  }
550
591
  },
551
592
  "effectRow": [
@@ -686,7 +727,40 @@
686
727
  "main",
687
728
  {
688
729
  "activeFilters": "@config.activeFilters",
689
- "bulkActions": "@config.bulkActions",
730
+ "bulkActions": [
731
+ "array/filter",
732
+ "@config.bulkActions",
733
+ [
734
+ "fn",
735
+ "action",
736
+ [
737
+ "or",
738
+ [
739
+ "=",
740
+ [
741
+ "array/len",
742
+ [
743
+ "object/get",
744
+ "@action",
745
+ "roles",
746
+ []
747
+ ]
748
+ ],
749
+ 0.0
750
+ ],
751
+ [
752
+ "array/includes",
753
+ [
754
+ "object/get",
755
+ "@action",
756
+ "roles",
757
+ []
758
+ ],
759
+ "@config.viewerRole"
760
+ ]
761
+ ]
762
+ ]
763
+ ],
690
764
  "className": "@config.className",
691
765
  "columns": "@config.columns",
692
766
  "emptyAction": "@config.emptyAction",
@@ -698,12 +772,78 @@
698
772
  "fields": "@config.fields",
699
773
  "headerActions": "@config.headerActions",
700
774
  "isLoading": "@config.isLoading",
701
- "itemActions": "@config.itemActions",
775
+ "itemActions": [
776
+ "array/filter",
777
+ "@config.itemActions",
778
+ [
779
+ "fn",
780
+ "action",
781
+ [
782
+ "or",
783
+ [
784
+ "=",
785
+ [
786
+ "array/len",
787
+ [
788
+ "object/get",
789
+ "@action",
790
+ "roles",
791
+ []
792
+ ]
793
+ ],
794
+ 0.0
795
+ ],
796
+ [
797
+ "array/includes",
798
+ [
799
+ "object/get",
800
+ "@action",
801
+ "roles",
802
+ []
803
+ ],
804
+ "@config.viewerRole"
805
+ ]
806
+ ]
807
+ ]
808
+ ],
702
809
  "look": "@config.look",
703
810
  "page": "@config.pageProp",
704
811
  "pageSize": "@config.pageSize",
705
812
  "relationsData": "@config.relationsData",
706
- "rowActions": "@config.rowActions",
813
+ "rowActions": [
814
+ "array/filter",
815
+ "@config.rowActions",
816
+ [
817
+ "fn",
818
+ "action",
819
+ [
820
+ "or",
821
+ [
822
+ "=",
823
+ [
824
+ "array/len",
825
+ [
826
+ "object/get",
827
+ "@action",
828
+ "roles",
829
+ []
830
+ ]
831
+ ],
832
+ 0.0
833
+ ],
834
+ [
835
+ "array/includes",
836
+ [
837
+ "object/get",
838
+ "@action",
839
+ "roles",
840
+ []
841
+ ],
842
+ "@config.viewerRole"
843
+ ]
844
+ ]
845
+ ]
846
+ ],
707
847
  "searchPlaceholder": "@config.searchPlaceholder",
708
848
  "searchValue": "@config.searchValue",
709
849
  "searchable": "@config.searchable",
@@ -730,7 +870,40 @@
730
870
  "main",
731
871
  {
732
872
  "activeFilters": "@config.activeFilters",
733
- "bulkActions": "@config.bulkActions",
873
+ "bulkActions": [
874
+ "array/filter",
875
+ "@config.bulkActions",
876
+ [
877
+ "fn",
878
+ "action",
879
+ [
880
+ "or",
881
+ [
882
+ "=",
883
+ [
884
+ "array/len",
885
+ [
886
+ "object/get",
887
+ "@action",
888
+ "roles",
889
+ []
890
+ ]
891
+ ],
892
+ 0.0
893
+ ],
894
+ [
895
+ "array/includes",
896
+ [
897
+ "object/get",
898
+ "@action",
899
+ "roles",
900
+ []
901
+ ],
902
+ "@config.viewerRole"
903
+ ]
904
+ ]
905
+ ]
906
+ ],
734
907
  "className": "@config.className",
735
908
  "columns": "@config.columns",
736
909
  "emptyAction": "@config.emptyAction",
@@ -742,12 +915,78 @@
742
915
  "fields": "@config.fields",
743
916
  "headerActions": "@config.headerActions",
744
917
  "isLoading": "@config.isLoading",
745
- "itemActions": "@config.itemActions",
918
+ "itemActions": [
919
+ "array/filter",
920
+ "@config.itemActions",
921
+ [
922
+ "fn",
923
+ "action",
924
+ [
925
+ "or",
926
+ [
927
+ "=",
928
+ [
929
+ "array/len",
930
+ [
931
+ "object/get",
932
+ "@action",
933
+ "roles",
934
+ []
935
+ ]
936
+ ],
937
+ 0.0
938
+ ],
939
+ [
940
+ "array/includes",
941
+ [
942
+ "object/get",
943
+ "@action",
944
+ "roles",
945
+ []
946
+ ],
947
+ "@config.viewerRole"
948
+ ]
949
+ ]
950
+ ]
951
+ ],
746
952
  "look": "@config.look",
747
953
  "page": "@config.pageProp",
748
954
  "pageSize": "@config.pageSize",
749
955
  "relationsData": "@config.relationsData",
750
- "rowActions": "@config.rowActions",
956
+ "rowActions": [
957
+ "array/filter",
958
+ "@config.rowActions",
959
+ [
960
+ "fn",
961
+ "action",
962
+ [
963
+ "or",
964
+ [
965
+ "=",
966
+ [
967
+ "array/len",
968
+ [
969
+ "object/get",
970
+ "@action",
971
+ "roles",
972
+ []
973
+ ]
974
+ ],
975
+ 0.0
976
+ ],
977
+ [
978
+ "array/includes",
979
+ [
980
+ "object/get",
981
+ "@action",
982
+ "roles",
983
+ []
984
+ ],
985
+ "@config.viewerRole"
986
+ ]
987
+ ]
988
+ ]
989
+ ],
751
990
  "searchPlaceholder": "@config.searchPlaceholder",
752
991
  "searchValue": "@config.searchValue",
753
992
  "searchable": "@config.searchable",
@@ -777,7 +1016,40 @@
777
1016
  "main",
778
1017
  {
779
1018
  "activeFilters": "@config.activeFilters",
780
- "bulkActions": "@config.bulkActions",
1019
+ "bulkActions": [
1020
+ "array/filter",
1021
+ "@config.bulkActions",
1022
+ [
1023
+ "fn",
1024
+ "action",
1025
+ [
1026
+ "or",
1027
+ [
1028
+ "=",
1029
+ [
1030
+ "array/len",
1031
+ [
1032
+ "object/get",
1033
+ "@action",
1034
+ "roles",
1035
+ []
1036
+ ]
1037
+ ],
1038
+ 0.0
1039
+ ],
1040
+ [
1041
+ "array/includes",
1042
+ [
1043
+ "object/get",
1044
+ "@action",
1045
+ "roles",
1046
+ []
1047
+ ],
1048
+ "@config.viewerRole"
1049
+ ]
1050
+ ]
1051
+ ]
1052
+ ],
781
1053
  "className": "@config.className",
782
1054
  "columns": "@config.columns",
783
1055
  "emptyAction": "@config.emptyAction",
@@ -789,12 +1061,78 @@
789
1061
  "fields": "@config.fields",
790
1062
  "headerActions": "@config.headerActions",
791
1063
  "isLoading": "@config.isLoading",
792
- "itemActions": "@config.itemActions",
1064
+ "itemActions": [
1065
+ "array/filter",
1066
+ "@config.itemActions",
1067
+ [
1068
+ "fn",
1069
+ "action",
1070
+ [
1071
+ "or",
1072
+ [
1073
+ "=",
1074
+ [
1075
+ "array/len",
1076
+ [
1077
+ "object/get",
1078
+ "@action",
1079
+ "roles",
1080
+ []
1081
+ ]
1082
+ ],
1083
+ 0.0
1084
+ ],
1085
+ [
1086
+ "array/includes",
1087
+ [
1088
+ "object/get",
1089
+ "@action",
1090
+ "roles",
1091
+ []
1092
+ ],
1093
+ "@config.viewerRole"
1094
+ ]
1095
+ ]
1096
+ ]
1097
+ ],
793
1098
  "look": "@config.look",
794
1099
  "page": "@config.pageProp",
795
1100
  "pageSize": "@config.pageSize",
796
1101
  "relationsData": "@config.relationsData",
797
- "rowActions": "@config.rowActions",
1102
+ "rowActions": [
1103
+ "array/filter",
1104
+ "@config.rowActions",
1105
+ [
1106
+ "fn",
1107
+ "action",
1108
+ [
1109
+ "or",
1110
+ [
1111
+ "=",
1112
+ [
1113
+ "array/len",
1114
+ [
1115
+ "object/get",
1116
+ "@action",
1117
+ "roles",
1118
+ []
1119
+ ]
1120
+ ],
1121
+ 0.0
1122
+ ],
1123
+ [
1124
+ "array/includes",
1125
+ [
1126
+ "object/get",
1127
+ "@action",
1128
+ "roles",
1129
+ []
1130
+ ],
1131
+ "@config.viewerRole"
1132
+ ]
1133
+ ]
1134
+ ]
1135
+ ],
798
1136
  "searchPlaceholder": "@config.searchPlaceholder",
799
1137
  "searchValue": "@config.searchValue",
800
1138
  "searchable": "@config.searchable",
@@ -835,6 +1173,10 @@
835
1173
  {
836
1174
  "name": "event",
837
1175
  "type": "event"
1176
+ },
1177
+ {
1178
+ "name": "roles",
1179
+ "type": "[string]"
838
1180
  }
839
1181
  ],
840
1182
  "EntityTableColumnsItem": [
@@ -944,6 +1286,14 @@
944
1286
  {
945
1287
  "name": "variant",
946
1288
  "type": "string"
1289
+ },
1290
+ {
1291
+ "name": "when",
1292
+ "type": "SExpr"
1293
+ },
1294
+ {
1295
+ "name": "roles",
1296
+ "type": "[string]"
947
1297
  }
948
1298
  ],
949
1299
  "EntityTableRelationsDataValueItem": [
@@ -983,6 +1333,14 @@
983
1333
  {
984
1334
  "name": "event",
985
1335
  "type": "event"
1336
+ },
1337
+ {
1338
+ "name": "when",
1339
+ "type": "SExpr"
1340
+ },
1341
+ {
1342
+ "name": "roles",
1343
+ "type": "[string]"
986
1344
  }
987
1345
  ]
988
1346
  }