@conduction/nextcloud-vue 2.177.0 → 2.179.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 (204) hide show
  1. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
  2. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +90 -7
  3. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
  4. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +82 -79
  5. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
  6. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue.js +1 -1
  7. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js +12 -1
  8. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js.map +1 -1
  9. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue3.js.map +1 -1
  10. package/dist/esm/components/CnCardNotices/CnCardNotices.vue.js +1 -1
  11. package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js +45 -7
  12. package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js.map +1 -1
  13. package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js +1 -1
  14. package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js.map +1 -1
  15. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue.js +1 -1
  16. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +10 -8
  17. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
  18. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js +95 -88
  19. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
  20. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
  21. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +40 -1
  22. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
  23. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +149 -109
  24. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
  25. package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
  26. package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js.map +1 -1
  27. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue.js +1 -1
  28. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js +86 -8
  29. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js.map +1 -1
  30. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js +137 -121
  31. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js.map +1 -1
  32. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue.js +1 -1
  33. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js +56 -4
  34. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js.map +1 -1
  35. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js +166 -70
  36. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js.map +1 -1
  37. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js +9 -0
  38. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js.map +1 -0
  39. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js +123 -0
  40. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js.map +1 -0
  41. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js +268 -0
  42. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js.map +1 -0
  43. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js +9 -0
  44. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js.map +1 -0
  45. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js +49 -0
  46. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js.map +1 -0
  47. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js +41 -0
  48. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js.map +1 -0
  49. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue.js +1 -1
  50. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js +116 -8
  51. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js.map +1 -1
  52. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js +110 -58
  53. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js.map +1 -1
  54. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js +78 -1
  55. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js.map +1 -1
  56. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js +44 -3
  57. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js.map +1 -1
  58. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue.js +1 -1
  59. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js +112 -1
  60. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js.map +1 -1
  61. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js +53 -18
  62. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js.map +1 -1
  63. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js +3 -3
  64. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js.map +1 -1
  65. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js +108 -74
  66. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js.map +1 -1
  67. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +219 -83
  68. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  69. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +92 -58
  70. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  71. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
  72. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +56 -0
  73. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
  74. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +185 -123
  75. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
  76. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue.js +1 -1
  77. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +2 -0
  78. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
  79. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +2 -1
  80. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
  81. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  82. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +197 -63
  83. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  84. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +244 -161
  85. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  86. package/dist/esm/components/CnSearchPage/CnSearchPage.vue.js +1 -1
  87. package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js +39 -1
  88. package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js.map +1 -1
  89. package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js +12 -2
  90. package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js.map +1 -1
  91. package/dist/esm/components/CnStepper/CnStepper.vue.js +1 -1
  92. package/dist/esm/components/CnStepper/CnStepper.vue2.js.map +1 -1
  93. package/dist/esm/components/CnStepper/CnStepper.vue3.js.map +1 -1
  94. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue.js +1 -1
  95. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js +51 -2
  96. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js.map +1 -1
  97. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js +49 -11
  98. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js.map +1 -1
  99. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js +9 -0
  100. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js.map +1 -0
  101. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js +328 -0
  102. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js.map +1 -0
  103. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js +85 -0
  104. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js.map +1 -0
  105. package/dist/esm/components/CnTaskFormWidget/index.js +24 -0
  106. package/dist/esm/components/CnTaskFormWidget/index.js.map +1 -0
  107. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue.js +1 -1
  108. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js +8 -2
  109. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js.map +1 -1
  110. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js +16 -3
  111. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js.map +1 -1
  112. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  113. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
  114. package/dist/esm/composables/indexSources.js +24 -4
  115. package/dist/esm/composables/indexSources.js.map +1 -1
  116. package/dist/esm/composables/useFlowStore.js +75 -4
  117. package/dist/esm/composables/useFlowStore.js.map +1 -1
  118. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue.js +1 -1
  119. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js +17 -0
  120. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js.map +1 -1
  121. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js +9 -1
  122. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js.map +1 -1
  123. package/dist/esm/dialogs/CnFlowEditModal.vue.js +1 -1
  124. package/dist/esm/dialogs/CnFlowEditModal.vue2.js +15 -0
  125. package/dist/esm/dialogs/CnFlowEditModal.vue2.js.map +1 -1
  126. package/dist/esm/dialogs/CnFlowEditModal.vue3.js +13 -3
  127. package/dist/esm/dialogs/CnFlowEditModal.vue3.js.map +1 -1
  128. package/dist/esm/dialogs/CnFlowStepPickerModal.vue.js +1 -1
  129. package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js +13 -1
  130. package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js.map +1 -1
  131. package/dist/esm/dialogs/CnFlowStepPickerModal.vue3.js.map +1 -1
  132. package/dist/esm/index.js +3 -0
  133. package/dist/esm/index.js.map +1 -1
  134. package/dist/esm/l10n/en.json.js +52 -1
  135. package/dist/esm/l10n/en.json.js.map +1 -1
  136. package/dist/esm/l10n/nl.json.js +51 -1
  137. package/dist/esm/l10n/nl.json.js.map +1 -1
  138. package/dist/esm/library-style.js +1 -1
  139. package/dist/esm/nextcloud-vue.css +1203 -812
  140. package/dist/esm/utils/dialogWidths.js +6 -4
  141. package/dist/esm/utils/dialogWidths.js.map +1 -1
  142. package/dist/esm/utils/fieldPill.js +77 -0
  143. package/dist/esm/utils/fieldPill.js.map +1 -0
  144. package/dist/esm/utils/flowCondition.js +177 -0
  145. package/dist/esm/utils/flowCondition.js.map +1 -0
  146. package/dist/esm/utils/flowRunStatus.js +64 -1
  147. package/dist/esm/utils/flowRunStatus.js.map +1 -1
  148. package/dist/esm/utils/flowStepList.js +385 -0
  149. package/dist/esm/utils/flowStepList.js.map +1 -0
  150. package/dist/esm/utils/libraryWidgetKeys.js +1 -0
  151. package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
  152. package/dist/esm/utils/searchRefusal.js +35 -1
  153. package/dist/esm/utils/searchRefusal.js.map +1 -1
  154. package/dist/esm/utils/widgetDispatch.js +1 -1
  155. package/dist/esm/utils/widgetDispatch.js.map +1 -1
  156. package/dist/nextcloud-vue.cjs.js +14837 -11411
  157. package/dist/nextcloud-vue.cjs.js.map +2 -2
  158. package/dist/nextcloud-vue.css +1203 -812
  159. package/l10n/en.json +52 -1
  160. package/l10n/nl.json +51 -1
  161. package/package.json +1 -1
  162. package/src/components/CnActionDialog/CnActionDialog.vue +116 -9
  163. package/src/components/CnBuildiqEditButton/CnBuildiqEditButton.vue +12 -1
  164. package/src/components/CnCardNotices/CnCardNotices.vue +46 -8
  165. package/src/components/CnCellRenderer/CnCellRenderer.vue +8 -0
  166. package/src/components/CnFilesBrowser/CnFilesBrowser.vue +61 -2
  167. package/src/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
  168. package/src/components/CnFlowDetail/CnFlowDetail.vue +110 -12
  169. package/src/components/CnFlowDetail/CnFlowDryRunResult.vue +163 -5
  170. package/src/components/CnFlowDetail/CnFlowStepList.vue +408 -0
  171. package/src/components/CnFlowDetail/CnFlowViewSwitch.vue +117 -0
  172. package/src/components/CnFlowDetail/index.js +2 -0
  173. package/src/components/CnFlowsPage/CnFlowBoard.vue +182 -25
  174. package/src/components/CnFlowsPage/CnFlowEditorPage.vue +101 -3
  175. package/src/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue +141 -1
  176. package/src/components/CnIndexPage/CnIndexHeaderMenu.vue +22 -4
  177. package/src/components/CnIndexPage/CnIndexPage.vue +172 -13
  178. package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +148 -4
  179. package/src/components/CnObjectSidebar/CnFilesTab.vue +3 -0
  180. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +310 -66
  181. package/src/components/CnSearchPage/CnSearchPage.vue +50 -1
  182. package/src/components/CnStepper/CnStepper.vue +14 -5
  183. package/src/components/CnTaskFormFields/CnTaskFormFields.md +1 -0
  184. package/src/components/CnTaskFormFields/CnTaskFormFields.vue +89 -3
  185. package/src/components/CnTaskFormWidget/CnTaskFormWidget.vue +400 -0
  186. package/src/components/CnTaskFormWidget/index.js +23 -0
  187. package/src/components/CnTasksWidget/CnTasksWidget.vue +17 -3
  188. package/src/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  189. package/src/components/index.js +2 -1
  190. package/src/composables/indexSources.js +24 -4
  191. package/src/composables/useFlowStore.js +75 -4
  192. package/src/css/index-page.css +10 -0
  193. package/src/dialogs/CnFlowEdgeEditModal.vue +28 -0
  194. package/src/dialogs/CnFlowEditModal.vue +26 -6
  195. package/src/dialogs/CnFlowStepPickerModal.vue +13 -1
  196. package/src/index.js +3 -0
  197. package/src/utils/dialogWidths.js +6 -4
  198. package/src/utils/fieldPill.js +73 -0
  199. package/src/utils/flowCondition.js +173 -0
  200. package/src/utils/flowRunStatus.js +63 -0
  201. package/src/utils/flowStepList.js +381 -0
  202. package/src/utils/libraryWidgetKeys.js +1 -0
  203. package/src/utils/searchRefusal.js +33 -0
  204. package/src/utils/widgetDispatch.js +1 -1
package/l10n/en.json CHANGED
@@ -2699,9 +2699,60 @@
2699
2699
  "{column}, {row}": "{column}, {row}",
2700
2700
  "{cell}: empty": "{cell}: empty",
2701
2701
  "{cell}: {value}": "{cell}: {value}",
2702
+ "Search term not understood at position {position}:": "Search term not understood at position {position}:",
2703
+ "The list is not filtered; adjust the term.": "The list is not filtered; adjust the term.",
2704
+ "+ Label": "+ Label",
2705
+ "Remove {label}": "Remove {label}",
2706
+ "Select files first": "Select files first",
2707
+ "Save as provisional": "Save as provisional",
2708
+ "Completing was refused: fill in {field}.": "Completing was refused: fill in {field}.",
2709
+ "Saved as provisional.": "Saved as provisional.",
2710
+ "Unsaved input restored: {count} of {total} fields from your previous visit, {date}. Check them and save.": "Unsaved input restored: {count} of {total} fields from your previous visit, {date}. Check them and save.",
2711
+ "Task completed.": "Task completed.",
2712
+ "This task asks nothing to fill in.": "This task asks nothing to fill in.",
2713
+ "Task form": "Task form",
2702
2714
  "No rows match the filters.": "No rows match the filters.",
2703
2715
  "An item cannot be ticked in more than one column.": "An item cannot be ticked in more than one column.",
2704
- "The options could not be read.": "The options could not be read."
2716
+ "The options could not be read.": "The options could not be read.",
2717
+ "{field} is more than {value}": "{field} is more than {value}",
2718
+ "{field} is one of {value}": "{field} is one of {value}",
2719
+ "{field} is empty": "{field} is empty",
2720
+ "A custom condition": "A custom condition",
2721
+ "Otherwise": "Otherwise",
2722
+ "Only if {condition}": "Only if {condition}",
2723
+ "Then, in this order": "Then, in this order",
2724
+ "A new step goes at the bottom; use the arrows to put it in place.": "A new step goes at the bottom; use the arrows to put it in place.",
2725
+ "Change trigger": "Change trigger",
2726
+ "This flow has no trigger yet.": "This flow has no trigger yet.",
2727
+ "Not connected": "Not connected",
2728
+ "Routes:": "Routes:",
2729
+ "Actions for step {n}": "Actions for step {n}",
2730
+ "Up": "Up",
2731
+ "Down": "Down",
2732
+ "Steps on a branch are moved on the canvas.": "Steps on a branch are moved on the canvas.",
2733
+ "Step {n}": "Step {n}",
2734
+ "View of the flow": "View of the flow",
2735
+ "Canvas": "Canvas",
2736
+ "The same flow and the same steps as on the canvas; what you change here changes there too.": "The same flow and the same steps as on the canvas; what you change here changes there too.",
2737
+ "The same flow as a list: the trigger and the steps in order, for anyone who prefers no canvas.": "The same flow as a list: the trigger and the steps in order, for anyone who prefers no canvas.",
2738
+ "Flow steps": "Flow steps",
2739
+ "Edit a step to see its settings.": "Edit a step to see its settings.",
2740
+ "Admins only": "Admins only",
2741
+ "Only admins may use this action. You can read this step, but not change or save it; ask an admin.": "Only admins may use this action. You can read this step, but not change or save it; ask an admin.",
2742
+ "Test: a trial run without carrying anything out": "Test: a trial run without carrying anything out",
2743
+ "Nothing was sent or changed; the saved flow was worked through, not the canvas.": "Nothing was sent or changed; the saved flow was worked through, not the canvas.",
2744
+ "Step": "Step",
2745
+ "Would do": "Would do",
2746
+ "Test again": "Test again",
2747
+ "Example payload": "Example payload",
2748
+ "Would fail": "Would fail",
2749
+ "Skipped": "Skipped",
2750
+ "Would succeed": "Would succeed",
2751
+ "This is not a JSON object.": "This is not a JSON object.",
2752
+ "The saved flow is tried with the example you enter. Nothing is changed or sent.": "The saved flow is tried with the example you enter. Nothing is changed or sent.",
2753
+ "Test": "Test",
2754
+ "Health": "Health",
2755
+ "Subjects": "Subjects"
2705
2756
  },
2706
2757
  "plurals": {
2707
2758
  "{count} member": [
package/l10n/nl.json CHANGED
@@ -2964,9 +2964,59 @@
2964
2964
  "{column}, {row}": "{column}, {row}",
2965
2965
  "{cell}: empty": "{cell}: leeg",
2966
2966
  "{cell}: {value}": "{cell}: {value}",
2967
+ "Search term not understood at position {position}:": "Zoekterm niet begrepen op positie {position}:",
2968
+ "The list is not filtered; adjust the term.": "De lijst is niet gefilterd; pas de term aan.",
2969
+ "+ Label": "+ Label",
2970
+ "Remove {label}": "{label} verwijderen",
2971
+ "Select files first": "Selecteer eerst bestanden",
2972
+ "Save as provisional": "Opslaan als voorlopig",
2973
+ "Completing was refused: fill in {field}.": "Afronden is geweigerd: vul {field} in.",
2974
+ "Saved as provisional.": "Opgeslagen als voorlopig.",
2975
+ "Unsaved input restored: {count} of {total} fields from your previous visit, {date}. Check them and save.": "Niet-opgeslagen invoer teruggezet: {count} van de {total} velden uit uw vorige bezoek, {date}. Controleer ze en sla op.",
2976
+ "Task completed.": "Taak afgerond.",
2977
+ "This task asks nothing to fill in.": "Deze taak vraagt niets in te vullen.",
2978
+ "Task form": "Taakformulier",
2967
2979
  "No rows match the filters.": "Geen rijen voldoen aan de filters.",
2968
2980
  "An item cannot be ticked in more than one column.": "Een item kan niet in meer dan één kolom aangevinkt zijn.",
2969
- "The options could not be read.": "De keuzes konden niet worden gelezen."
2981
+ "The options could not be read.": "De keuzes konden niet worden gelezen.",
2982
+ "{field} is more than {value}": "{field} is meer dan {value}",
2983
+ "{field} is one of {value}": "{field} is een van {value}",
2984
+ "{field} is empty": "{field} is leeg",
2985
+ "A custom condition": "Een eigen voorwaarde",
2986
+ "Otherwise": "Anders",
2987
+ "Only if {condition}": "Alleen als {condition}",
2988
+ "Then, in this order": "Dan, in deze volgorde",
2989
+ "A new step goes at the bottom; use the arrows to put it in place.": "Een nieuwe stap komt onderaan; zet hem met de pijlen op zijn plek.",
2990
+ "Change trigger": "Trigger wijzigen",
2991
+ "This flow has no trigger yet.": "Deze flow heeft nog geen trigger.",
2992
+ "Not connected": "Niet verbonden",
2993
+ "Routes:": "Routes:",
2994
+ "Actions for step {n}": "Acties voor stap {n}",
2995
+ "Up": "Omhoog",
2996
+ "Down": "Omlaag",
2997
+ "Steps on a branch are moved on the canvas.": "Stappen in een vertakking verplaatst u op het canvas.",
2998
+ "Step {n}": "Stap {n}",
2999
+ "View of the flow": "Weergave van de flow",
3000
+ "Canvas": "Canvas",
3001
+ "The same flow and the same steps as on the canvas; what you change here changes there too.": "Dezelfde flow en dezelfde stappen als op het canvas; wat u hier wijzigt, staat daar ook.",
3002
+ "The same flow as a list: the trigger and the steps in order, for anyone who prefers no canvas.": "Dezelfde flow als lijst: de trigger en de stappen op volgorde, voor wie geen canvas wil.",
3003
+ "Flow steps": "Stappen van de flow",
3004
+ "Edit a step to see its settings.": "Bewerk een stap om de instellingen te zien.",
3005
+ "Admins only": "Alleen beheerders",
3006
+ "Only admins may use this action. You can read this step, but not change or save it; ask an admin.": "Alleen beheerders mogen deze actie gebruiken. U kunt deze stap lezen, maar niet wijzigen of opslaan; vraag een beheerder.",
3007
+ "Test: a trial run without carrying anything out": "Testen: proefrun zonder iets uit te voeren",
3008
+ "Nothing was sent or changed; the saved flow was worked through, not the canvas.": "Er is niets verstuurd of gewijzigd; de opgeslagen flow is doorgerekend, niet het canvas.",
3009
+ "Would do": "Zou doen",
3010
+ "Test again": "Opnieuw testen",
3011
+ "Example payload": "Voorbeeldgegevens",
3012
+ "Would fail": "Zou mislukken",
3013
+ "Skipped": "Overgeslagen",
3014
+ "Would succeed": "Zou slagen",
3015
+ "This is not a JSON object.": "Dit is geen JSON-object.",
3016
+ "The saved flow is tried with the example you enter. Nothing is changed or sent.": "De opgeslagen flow wordt geprobeerd met het voorbeeld dat u invult. Er wordt niets gewijzigd of verstuurd.",
3017
+ "Test": "Testen",
3018
+ "Health": "Gezondheid",
3019
+ "Subjects": "Onderwerpen"
2970
3020
  },
2971
3021
  "plurals": {
2972
3022
  "{count} member": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/nextcloud-vue",
3
- "version": "2.177.0",
3
+ "version": "2.179.0",
4
4
  "description": "Shared Vue component library for Conduction Nextcloud apps — complements @nextcloud/vue with higher-level components, OpenRegister integration, and NL Design System support",
5
5
  "homepage": "https://github.com/ConductionNL/nextcloud-vue#readme",
6
6
  "bugs": {
@@ -11,7 +11,7 @@
11
11
  :noClose="busy"
12
12
  data-testid="cn-action-dialog"
13
13
  @closing="close">
14
- <div v-if="!done" class="cn-action-dialog">
14
+ <div v-if="!done" class="cn-action-dialog" :style="partsGap">
15
15
  <!-- The record the action is about: its title, a meta line, a badge. -->
16
16
  <div v-if="summary" class="cn-action-dialog__summary" data-testid="cn-action-dialog-summary">
17
17
  <span class="cn-action-dialog__summary-icon">
@@ -83,6 +83,7 @@
83
83
  weten..."). -->
84
84
  <NcCheckboxRadioSwitch v-if="field.type === 'checkbox'"
85
85
  class="cn-action-dialog__checkbox"
86
+ :class="{ 'cn-action-dialog__checkbox--plain': field.look === 'plain' }"
86
87
  :modelValue="checkboxValue(field)"
87
88
  type="checkbox"
88
89
  @update:modelValue="(on) => setChecked(field.field, on)">
@@ -159,6 +160,9 @@
159
160
  :modelValue="cardsValue(field)"
160
161
  :options="cardOptions(field)"
161
162
  :label="fill(field.label) || field.field"
163
+ :layout="field.layout === 'rows' ? 'rows' : 'cards'"
164
+ :columns="typeof field.columns === 'number' ? field.columns : 0"
165
+ :hideLabel="field.hideLabel === true"
162
166
  @update:modelValue="(value) => setValue(field.field, value)" />
163
167
  <!-- An optional select or text field: its label above the control,
164
168
  "(optional)" in grey after it (DqUwWachtrij "Sjabloon (niet
@@ -237,7 +241,7 @@
237
241
  </div>
238
242
 
239
243
  <p v-else role="status" data-testid="cn-action-dialog-done">
240
- {{ answerText || text(doneTextOf) || t('nextcloud-vue', 'Done') }}
244
+ {{ doneMessage }}
241
245
  </p>
242
246
 
243
247
  <template #actions>
@@ -260,6 +264,7 @@
260
264
 
261
265
  <script>
262
266
  import axios from '@nextcloud/axios'
267
+ import { showSuccess } from '@nextcloud/dialogs'
263
268
  import { emit } from '@nextcloud/event-bus'
264
269
  import { translate as t } from '@nextcloud/l10n'
265
270
  import { generateUrl } from '@nextcloud/router'
@@ -368,6 +373,16 @@ let reasonSeq = 0
368
373
  * token (`"{fields.permission}"`) sends the value as it is; `{fields.<key>}`
369
374
  * reads a sent value by the key it is sent under. `fieldsInBody: false`
370
375
  * sends only the body.
376
+ * - `{chosen.<field>.<path>}` reads the entry a select field's
377
+ * `optionsSource` gave for the chosen option, and `{objectId}` the record's
378
+ * id, in a body and in `doneText`; `doneText` also reads `{fields.<key>}`.
379
+ * - `closeOnDone: true` says the done text as a toast and closes the dialog
380
+ * rather than showing it in the dialog. `errorText` on the request or on
381
+ * `confirm` words a failure the server gives no message for.
382
+ * - `gap`: the room between the dialog's parts in px (default 18). A cards
383
+ * field takes `layout` (`rows`), `columns` and `hideLabel` as
384
+ * `CnChoiceCards` does; a checkbox field with `look: 'plain'` is a plain
385
+ * checkbox and label, without the tinted box.
371
386
  *
372
387
  * Tokens (`@objectId`, `@object.<field>`) resolve in every url.
373
388
  */
@@ -490,6 +505,38 @@ export default {
490
505
  return this.request?.doneText || this.config.doneText
491
506
  },
492
507
 
508
+ /**
509
+ * What the dialog says once the act ran: the answer, else the done text
510
+ * filled from the sent values, the chosen entries and the record.
511
+ *
512
+ * @spec openspec/changes/action-dialog-share-look-and-outcome/specs/action-dialog/spec.md#requirement-the-done-text-names-what-was-chosen
513
+ * @return {string}
514
+ */
515
+ doneMessage() {
516
+ return this.answerText || this.fill(this.doneTextOf, this.templateContext('')) || this.text(this.doneTextOf) || t('nextcloud-vue', 'Done')
517
+ },
518
+
519
+ /** @return {object|null} The room between the parts, when `gap` sets it. */
520
+ partsGap() {
521
+ return Number.isFinite(this.config.gap) ? { gap: `${this.config.gap}px` } : null
522
+ },
523
+
524
+ /**
525
+ * The entry each select field's `optionsSource` gave for its chosen
526
+ * option, by field name (null when nothing is chosen).
527
+ *
528
+ * @spec openspec/changes/action-dialog-share-look-and-outcome/specs/action-dialog/spec.md#requirement-the-done-text-names-what-was-chosen
529
+ * @return {object}
530
+ */
531
+ chosenRows() {
532
+ const out = {}
533
+ for (const field of this.fields.filter((f) => f.type === 'select' && f.optionsSource)) {
534
+ const value = String(this.plainValue(field))
535
+ out[field.field] = (this.remoteOptions[field.field] || []).find((row) => String(readPath(row, field.optionValue || 'id')) === value) || null
536
+ }
537
+ return out
538
+ },
539
+
493
540
  /** @return {{values: object, record: (object|null)}} What a `visibleWhen` reads. */
494
541
  shownState() {
495
542
  return { values: this.fieldValues, record: this.record }
@@ -1212,18 +1259,58 @@ export default {
1212
1259
  this.refusal = ''
1213
1260
  try {
1214
1261
  await this.runAct(this.reason.trim())
1215
- this.done = true
1216
- emit(PAGE_REFRESH, {})
1217
- /** @event done The action ran. Payload: the sent field values and `reason`. */
1218
- this.$emit('done', { ...this.sentValues, reason: this.reason.trim() })
1262
+ this.finish()
1219
1263
  } catch (failure) {
1220
- const data = failure && failure.response && failure.response.data
1221
- this.refusal = String((data && (data.message || data.error)) || t('nextcloud-vue', 'The action could not be completed.'))
1264
+ this.refusal = this.refusalOf(failure)
1222
1265
  } finally {
1223
1266
  this.busy = false
1224
1267
  }
1225
1268
  },
1226
1269
 
1270
+ /**
1271
+ * After the act: refresh the page, report `done`, and show the done
1272
+ * text, or with `closeOnDone` say it as a toast and close.
1273
+ *
1274
+ * @spec openspec/changes/action-dialog-share-look-and-outcome/specs/action-dialog/spec.md#requirement-the-dialog-can-close-once-the-act-ran
1275
+ * @return {void}
1276
+ */
1277
+ finish() {
1278
+ const closing = this.config.closeOnDone === true
1279
+ this.done = !closing
1280
+ emit(PAGE_REFRESH, {})
1281
+ /** @event done The action ran. Payload: the sent field values and `reason`. */
1282
+ this.$emit('done', { ...this.sentValues, reason: this.reason.trim() })
1283
+ if (closing) {
1284
+ showSuccess(this.doneMessage)
1285
+ this.$emit('close')
1286
+ }
1287
+ },
1288
+
1289
+ /**
1290
+ * A failed act in words: the server's message, else the configured
1291
+ * `errorText`, else the library's sentence.
1292
+ *
1293
+ * @param {unknown} failure The error axios threw.
1294
+ * @return {string}
1295
+ */
1296
+ refusalOf(failure) {
1297
+ const data = failure && failure.response && failure.response.data
1298
+ const said = data && (data.message || data.error)
1299
+ return String(said || this.text(this.request?.errorText || this.confirmConfig.errorText) || t('nextcloud-vue', 'The action could not be completed.'))
1300
+ },
1301
+
1302
+ /**
1303
+ * What a body or done text template reads: the sent values under
1304
+ * `fields`, the record, the reason, the chosen entries under `chosen`
1305
+ * and the record's id as `objectId`.
1306
+ *
1307
+ * @param {string} reason The reason given.
1308
+ * @return {object}
1309
+ */
1310
+ templateContext(reason) {
1311
+ return { fields: this.sentValues, ...(this.record || {}), reason, chosen: this.chosenRows, objectId: this.recordId }
1312
+ },
1313
+
1227
1314
  /**
1228
1315
  * Post the chosen act's request, or dispatch `confirm.action`.
1229
1316
  *
@@ -1269,7 +1356,7 @@ export default {
1269
1356
  * @return {object}
1270
1357
  */
1271
1358
  requestBody(request, reason) {
1272
- const filler = { context: { fields: this.sentValues, ...(this.record || {}), reason }, fill: (value, context) => fillTemplate(value, context) }
1359
+ const filler = { context: this.templateContext(reason), fill: (value, context) => fillTemplate(value, context) }
1273
1360
  const body = {}
1274
1361
  for (const [key, value] of Object.entries(request.body || {})) {
1275
1362
  body[key] = bodyValue(value, filler)
@@ -1535,6 +1622,26 @@ export default {
1535
1622
  font-size: 13px;
1536
1623
  }
1537
1624
 
1625
+ /* A plain checkbox: the box and its label on one line, no tinted card
1626
+ (DqZaakSamenwerken "Alleen een deel van de zaakvelden delen"). */
1627
+ .cn-action-dialog__checkbox--plain.checkbox-radio-switch {
1628
+ padding: 0;
1629
+ }
1630
+
1631
+ .cn-action-dialog__checkbox--plain {
1632
+ border: 0;
1633
+ background: transparent;
1634
+ }
1635
+
1636
+ .cn-action-dialog__checkbox--plain :deep(.checkbox-content) {
1637
+ gap: 10px;
1638
+ align-items: center;
1639
+ }
1640
+
1641
+ .cn-action-dialog__checkbox--plain .cn-action-dialog__checkbox-label {
1642
+ font-size: 14px;
1643
+ }
1644
+
1538
1645
  .cn-action-dialog__checks {
1539
1646
  border: 0;
1540
1647
  display: flex;
@@ -391,6 +391,13 @@ export default {
391
391
  return this.activeEditor ? this.unref(this.activeEditor.working) : null
392
392
  },
393
393
 
394
+ /** @return {string} Where flows open in list mode, '' for an app without such a page. */
395
+ flowListRoute() {
396
+ const page = (this.effectiveManifest?.pages || []).find((candidate) => ['flow', 'flow-detail'].includes(candidate?.type) && candidate?.config?.listMode === true)
397
+
398
+ return page ? String(page.route || '').replace(':id', 'new') : ''
399
+ },
400
+
394
401
  /** The manifest to read page metadata from: working copy, else the live one. */
395
402
  effectiveManifest() {
396
403
  return this.workingManifest || this.unref(this.cnManifest) || null
@@ -766,7 +773,11 @@ export default {
766
773
  * store, and there is one editor for it.
767
774
  */
768
775
  onEditFlows() {
769
- this.showFlowsCanvasModal = true
776
+ if (this.flowListRoute !== '' && this.$router) {
777
+ this.$router.push({ path: this.flowListRoute, query: { view: 'list' } })
778
+ } else {
779
+ this.showFlowsCanvasModal = true
780
+ }
770
781
  this.menuOpen = false
771
782
  /**
772
783
  * @event edit-flows Emitted when the flows editor opens.
@@ -7,7 +7,7 @@
7
7
  <CnNoticeWidget
8
8
  v-for="entry in shown"
9
9
  :key="entry.key"
10
- :content="entry.notice"
10
+ :content="contentOf(entry)"
11
11
  :objectData="objectData"
12
12
  :objectId="objectId"
13
13
  :inline="true"
@@ -17,9 +17,20 @@
17
17
  </template>
18
18
 
19
19
  <script>
20
- import { evaluateVisibleWhen } from '../../utils/visibleWhen.js'
20
+ import { evaluateVisibleWhen, readVisibleWhenValue } from '../../utils/visibleWhen.js'
21
21
  import { CnNoticeWidget } from '../CnNoticeWidget/index.js'
22
22
 
23
+ /**
24
+ * Whether a notice reads its text from an endpoint (`textFrom: { endpoint, field }`).
25
+ *
26
+ * @param {object} notice The notice.
27
+ * @return {boolean}
28
+ */
29
+ function hasTextFrom(notice) {
30
+ const from = notice && notice.textFrom
31
+ return Boolean(from && typeof from === 'object' && typeof from.endpoint === 'string' && from.endpoint !== '' && typeof from.field === 'string' && from.field !== '')
32
+ }
33
+
23
34
  /**
24
35
  * CnCardNotices: the state banners at the top of a card or dialog (R1): an
25
36
  * engine refusal, a partial result, a source that is down, a success. Each
@@ -27,6 +38,8 @@ import { CnNoticeWidget } from '../CnNoticeWidget/index.js'
27
38
  * actions?, dismissible?, visibleWhen? }`) and shows while its `visibleWhen`
28
39
  * holds, read against the card's record (async: a `source` or `endpoint`
29
40
  * condition works too). A dismissed notice stays away until the list changes.
41
+ * A notice with `textFrom: { endpoint, field }` takes its text from that
42
+ * endpoint's answer and shows only while it is a non-empty string.
30
43
  *
31
44
  * Used by CnWidgetWrapper, CnDetailCard, CnDataTable and CnDialog through
32
45
  * their `notices` prop.
@@ -74,6 +87,8 @@ export default {
74
87
  return {
75
88
  // Notice key to whether its condition held.
76
89
  allowed: {},
90
+ // Notice key to the text its `textFrom` endpoint answered.
91
+ texts: {},
77
92
  dismissedKeys: [],
78
93
  }
79
94
  },
@@ -86,7 +101,7 @@ export default {
86
101
  */
87
102
  entries() {
88
103
  return (Array.isArray(this.notices) ? this.notices : [])
89
- .filter((notice) => notice && typeof notice === 'object' && (notice.title || notice.text))
104
+ .filter((notice) => notice && typeof notice === 'object' && (notice.title || notice.text || hasTextFrom(notice)))
90
105
  .map((notice, index) => ({ key: notice.id || `${index}:${notice.title || ''}:${notice.text || ''}`, notice }))
91
106
  },
92
107
 
@@ -97,7 +112,8 @@ export default {
97
112
  */
98
113
  shown() {
99
114
  return this.entries.filter((entry) => !this.dismissedKeys.includes(entry.key)
100
- && (!entry.notice.visibleWhen || this.allowed[entry.key] === true))
115
+ && (!entry.notice.visibleWhen || this.allowed[entry.key] === true)
116
+ && (!hasTextFrom(entry.notice) || typeof this.texts[entry.key] === 'string'))
101
117
  },
102
118
  },
103
119
 
@@ -131,11 +147,33 @@ export default {
131
147
  */
132
148
  async evaluate() {
133
149
  const context = { objectId: this.objectId, object: this.objectData || {} }
134
- const verdicts = await Promise.all(this.entries.map(async (entry) => [
135
- entry.key,
136
- entry.notice.visibleWhen ? await evaluateVisibleWhen(entry.notice.visibleWhen, context) : true,
137
- ]))
150
+ const [verdicts, texts] = await Promise.all([
151
+ Promise.all(this.entries.map(async (entry) => [
152
+ entry.key,
153
+ entry.notice.visibleWhen ? await evaluateVisibleWhen(entry.notice.visibleWhen, context) : true,
154
+ ])),
155
+ Promise.all(this.entries.filter((entry) => hasTextFrom(entry.notice)).map(async (entry) => [
156
+ entry.key,
157
+ await readVisibleWhenValue(entry.notice.textFrom, context).catch(() => null),
158
+ ])),
159
+ ])
138
160
  this.allowed = Object.fromEntries(verdicts)
161
+ this.texts = Object.fromEntries(texts.filter(([, text]) => typeof text === 'string' && text.trim() !== ''))
162
+ },
163
+
164
+ /**
165
+ * The notice as drawn: its `textFrom` answer as its text.
166
+ *
167
+ * @param {{key: string, notice: object}} entry The notice.
168
+ * @return {object} The notice content.
169
+ * @spec openspec/changes/notice-text-from-endpoint/specs/card-state-notices/spec.md#requirement-a-notices-text-can-come-from-an-endpoint
170
+ */
171
+ contentOf(entry) {
172
+ if (!hasTextFrom(entry.notice)) {
173
+ return entry.notice
174
+ }
175
+ const { textFrom, ...notice } = entry.notice
176
+ return { ...notice, text: this.texts[entry.key] }
139
177
  },
140
178
 
141
179
  /**
@@ -360,6 +360,12 @@
360
360
  </span>
361
361
  </template>
362
362
 
363
+ <!-- Built-in "flowHealth" widget: a flow's health dot, read off the row
364
+ of a `flows` source (`enabled`, `lastRunStatus`). -->
365
+ <template v-else-if="widget === 'flowHealth'">
366
+ <CnFlowHealthDot :enabled="row.enabled !== false" :lastRunStatus="row.lastRunStatus || null" />
367
+ </template>
368
+
363
369
  <!-- Explicit column formatter — overrides the type-aware paths below -->
364
370
  <template v-else-if="hasFormatter">
365
371
  <span :title="rawTitle">{{ formattedValue }}</span>
@@ -449,6 +455,7 @@ import { NcAvatar, NcButton, NcCheckboxRadioSwitch, NcDateTime } from '@nextclou
449
455
  import CheckBold from 'vue-material-design-icons/CheckBold.vue'
450
456
  import Lock from 'vue-material-design-icons/Lock.vue'
451
457
  import CnFkResolveCell from '../CnFkResolveCell/CnFkResolveCell.vue'
458
+ import CnFlowHealthDot from '../CnFlowDetail/CnFlowHealthDot.vue'
452
459
  import CnIcon from '../CnIcon/CnIcon.vue'
453
460
  import CnGroupNameCell from './CnGroupNameCell.vue'
454
461
  import { normalizeLook } from '../../composables/useLook.js'
@@ -494,6 +501,7 @@ export default {
494
501
  name: 'CnCellRenderer',
495
502
 
496
503
  components: {
504
+ CnFlowHealthDot,
497
505
  CnIcon,
498
506
  CnStatusBadge,
499
507
  NcCheckboxRadioSwitch,
@@ -74,6 +74,26 @@
74
74
  {{ columnLabel(column) }}
75
75
  </NcActionCheckbox>
76
76
  </NcActions>
77
+ <!-- `toolbarSelectionActions`: a bulk action as a toolbar button,
78
+ off with its reason while nothing is ticked (DqZaakDocumenten
79
+ "Samenvoegen tot één PDF"). -->
80
+ <template v-for="action in toolbarSelectionList" :key="`toolbar-selection-${action.id}`">
81
+ <NcButton
82
+ variant="secondary"
83
+ :disabled="selectedIds.length === 0"
84
+ :title="selectedIds.length === 0 ? action.reason : undefined"
85
+ :aria-describedby="selectedIds.length === 0 ? `${toolbarReasonPrefix}-${action.id}` : undefined"
86
+ :data-testid="`cn-files-browser-toolbar-selection-${action.id}`"
87
+ @click="runBulkAction(action.action)">
88
+ <template v-if="action.icon" #icon>
89
+ <CnIcon :name="action.icon" :size="20" />
90
+ </template>
91
+ {{ action.label }}
92
+ </NcButton>
93
+ <span v-if="selectedIds.length === 0"
94
+ :id="`${toolbarReasonPrefix}-${action.id}`"
95
+ class="hidden-visually">{{ action.reason }}</span>
96
+ </template>
77
97
  <!-- `facetPresentation: "menu"`: each facet as a toolbar menu
78
98
  "<column>: <value>" (DqZaakDocumenten "Trefwoord: alle"),
79
99
  one value at a time, "all" clears it. -->
@@ -265,7 +285,7 @@
265
285
  </div>
266
286
 
267
287
  <!-- The host's bulk actions, once something is selected. -->
268
- <div v-if="bulkEnabled && selectedIds.length > 0"
288
+ <div v-if="bulkEnabled && bulkActions.length > 0 && selectedIds.length > 0"
269
289
  class="cn-files-browser__bulk-bar"
270
290
  role="toolbar"
271
291
  :aria-label="t('nextcloud-vue', 'Actions for the selected files')"
@@ -835,6 +855,8 @@ const FOLDER_CHANGED_CHANNELS = ['cn:page:refresh', 'files:node:created', 'files
835
855
 
836
856
  const FOLDER_CHANGED_DEBOUNCE_MS = 300
837
857
 
858
+ let reasonUid = 0
859
+
838
860
  export default {
839
861
  name: 'CnFilesBrowser',
840
862
 
@@ -1288,6 +1310,20 @@ export default {
1288
1310
  default: () => [],
1289
1311
  },
1290
1312
 
1313
+ /**
1314
+ * Actions on the ticked files drawn as toolbar buttons, declared as
1315
+ * `bulkActions` plus `disabledReason` (translated; default "Select
1316
+ * files first"). Each is disabled, saying why, while no file is
1317
+ * ticked, and turns the row checkboxes on as `bulkActions` does.
1318
+ *
1319
+ * @type {Array<{id: string, label: string, icon?: string, disabledReason?: string}>}
1320
+ * @spec openspec/changes/files-columns-by-flag-and-toolbar-selection/specs/files-browser/spec.md#requirement-a-selection-action-can-sit-in-the-toolbar
1321
+ */
1322
+ toolbarSelectionActions: {
1323
+ type: Array,
1324
+ default: () => [],
1325
+ },
1326
+
1291
1327
  /**
1292
1328
  * The bulk bar's count, as a translatable template with `{count}`
1293
1329
  * ("{count} documents selected"); `selectionLabelOne` is used for one.
@@ -1395,7 +1431,10 @@ export default {
1395
1431
  emits: ['changed'],
1396
1432
 
1397
1433
  data() {
1434
+ reasonUid += 1
1398
1435
  return {
1436
+ /** The id prefix of the toolbar selection buttons' reasons. */
1437
+ toolbarReasonPrefix: `cn-files-browser-reason-${reasonUid}`,
1399
1438
  /** The actions column's measured width while a row button stands in it, else null. */
1400
1439
  actionsColumnWidth: null,
1401
1440
  currentPath: this.rootPath,
@@ -1645,7 +1684,27 @@ export default {
1645
1684
  * @spec openspec/changes/files-browser-hosts-a-documents-list/specs/files-browser/spec.md
1646
1685
  */
1647
1686
  bulkEnabled() {
1648
- return Array.isArray(this.bulkActions) && this.bulkActions.length > 0
1687
+ return (Array.isArray(this.bulkActions) && this.bulkActions.length > 0) || this.toolbarSelectionList.length > 0
1688
+ },
1689
+
1690
+ /**
1691
+ * The toolbar's selection buttons (`toolbarSelectionActions`), labels translated.
1692
+ *
1693
+ * @return {Array<{id: string, label: string, icon: string, reason: string, action: object}>}
1694
+ * @spec openspec/changes/files-columns-by-flag-and-toolbar-selection/specs/files-browser/spec.md#requirement-a-selection-action-can-sit-in-the-toolbar
1695
+ */
1696
+ toolbarSelectionList() {
1697
+ return (Array.isArray(this.toolbarSelectionActions) ? this.toolbarSelectionActions : [])
1698
+ .filter((action) => action && typeof action === 'object' && typeof action.id === 'string' && action.id !== '')
1699
+ .map((action) => ({
1700
+ id: action.id,
1701
+ label: this.hostLabel(action),
1702
+ icon: typeof action.icon === 'string' ? action.icon : '',
1703
+ reason: typeof action.disabledReason === 'string' && action.disabledReason !== ''
1704
+ ? this.cnTranslate(action.disabledReason)
1705
+ : t('nextcloud-vue', 'Select files first'),
1706
+ action,
1707
+ }))
1649
1708
  },
1650
1709
 
1651
1710
  /**
@@ -73,7 +73,8 @@ function requiredAppPresent(requiredApp) {
73
73
  *
74
74
  * A string names a built-in. An object declares its own: `key`, `label`,
75
75
  * `source` (`node`, `attribute` or `row`), `attribute`, `formatter` and
76
- * `sortable`, and `requiredApp` (an app id, or a list of which any one will
76
+ * `sortable`, `hidden` (`true`, or `{ not: <flag> }`: hidden unless the
77
+ * resolved flag is true), and `requiredApp` (an app id, or a list of which any one will
77
78
  * do; without it the column is left out). An entry naming an unknown built-in is dropped here and refused
78
79
  * by the manifest validator, so an author hears about it at authoring time
79
80
  * rather than finding a column missing at runtime.
@@ -102,14 +103,19 @@ export function normaliseFileColumns(columns) {
102
103
  if (!requiredAppPresent(entry.requiredApp)) {
103
104
  return
104
105
  }
105
- if (isBuiltInFileColumn(entry.key) && entry.source === undefined) {
106
- out.push({ ...BUILT_IN_FILE_COLUMNS[entry.key], ...entry, builtIn: true })
106
+ // `hidden: { not: <flag> }`: hidden by default unless the flag is true
107
+ // (Type, Richting and Auteur show on a case type that reviews documents).
108
+ const own = entry.hidden && typeof entry.hidden === 'object' && 'not' in entry.hidden
109
+ ? { ...entry, hidden: entry.hidden.not !== true }
110
+ : entry
111
+ if (isBuiltInFileColumn(own.key) && own.source === undefined) {
112
+ out.push({ ...BUILT_IN_FILE_COLUMNS[own.key], ...own, builtIn: true })
107
113
  return
108
114
  }
109
115
  out.push({
110
116
  source: 'node',
111
117
  sortable: false,
112
- ...entry,
118
+ ...own,
113
119
  builtIn: false,
114
120
  })
115
121
  })