@conduction/nextcloud-vue 2.56.0-beta.36 → 2.56.0-beta.38

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 (382) hide show
  1. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue.js +1 -1
  2. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js +131 -3
  3. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js.map +1 -1
  4. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js +54 -18
  5. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js.map +1 -1
  6. package/dist/esm/components/CnAdvancedFormDialog/CnMetadataTab.vue.js +1 -1
  7. package/dist/esm/components/CnAdvancedFormDialog/CnMetadataTab.vue2.js +3 -2
  8. package/dist/esm/components/CnAdvancedFormDialog/CnMetadataTab.vue2.js.map +1 -1
  9. package/dist/esm/components/CnAdvancedFormDialog/CnMetadataTab.vue3.js.map +1 -1
  10. package/dist/esm/components/CnAdvancedFormDialog/CnPropertyValueCell.vue.js +1 -1
  11. package/dist/esm/components/CnAdvancedFormDialog/CnPropertyValueCell.vue2.js +5 -4
  12. package/dist/esm/components/CnAdvancedFormDialog/CnPropertyValueCell.vue2.js.map +1 -1
  13. package/dist/esm/components/CnAdvancedFormDialog/CnPropertyValueCell.vue3.js.map +1 -1
  14. package/dist/esm/components/CnAnalyticsReportPicker/CnAnalyticsReportPicker.vue.js +1 -1
  15. package/dist/esm/components/CnAnalyticsReportPicker/CnAnalyticsReportPicker.vue2.js +2 -1
  16. package/dist/esm/components/CnAnalyticsReportPicker/CnAnalyticsReportPicker.vue2.js.map +1 -1
  17. package/dist/esm/components/CnAnalyticsReportPicker/CnAnalyticsReportPicker.vue3.js.map +1 -1
  18. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue.js +1 -1
  19. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js +2 -1
  20. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js.map +1 -1
  21. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js.map +1 -1
  22. package/dist/esm/components/CnBoardView/CnBoardView.vue.js +1 -1
  23. package/dist/esm/components/CnBoardView/CnBoardView.vue2.js +376 -6
  24. package/dist/esm/components/CnBoardView/CnBoardView.vue2.js.map +1 -1
  25. package/dist/esm/components/CnBoardView/CnBoardView.vue3.js +146 -71
  26. package/dist/esm/components/CnBoardView/CnBoardView.vue3.js.map +1 -1
  27. package/dist/esm/components/CnCalendarEventPicker/CnCalendarEventPicker.vue.js +1 -1
  28. package/dist/esm/components/CnCalendarEventPicker/CnCalendarEventPicker.vue2.js +2 -1
  29. package/dist/esm/components/CnCalendarEventPicker/CnCalendarEventPicker.vue2.js.map +1 -1
  30. package/dist/esm/components/CnCalendarEventPicker/CnCalendarEventPicker.vue3.js.map +1 -1
  31. package/dist/esm/components/CnCalendarWidget/CnCalendarWidget.vue.js +1 -1
  32. package/dist/esm/components/CnCalendarWidget/CnCalendarWidget.vue2.js +2 -1
  33. package/dist/esm/components/CnCalendarWidget/CnCalendarWidget.vue2.js.map +1 -1
  34. package/dist/esm/components/CnCalendarWidget/CnCalendarWidget.vue3.js.map +1 -1
  35. package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
  36. package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js +6 -5
  37. package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js.map +1 -1
  38. package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js.map +1 -1
  39. package/dist/esm/components/CnCollectivePagePicker/CnCollectivePagePicker.vue.js +1 -1
  40. package/dist/esm/components/CnCollectivePagePicker/CnCollectivePagePicker.vue2.js +2 -1
  41. package/dist/esm/components/CnCollectivePagePicker/CnCollectivePagePicker.vue2.js.map +1 -1
  42. package/dist/esm/components/CnCollectivePagePicker/CnCollectivePagePicker.vue3.js.map +1 -1
  43. package/dist/esm/components/CnConversationThread/CnConversationThread.vue.js +1 -1
  44. package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js +2 -1
  45. package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js.map +1 -1
  46. package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js.map +1 -1
  47. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue.js +1 -1
  48. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js +2 -1
  49. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js.map +1 -1
  50. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue3.js.map +1 -1
  51. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
  52. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +47 -1
  53. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  54. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +22 -12
  55. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  56. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue.js +1 -1
  57. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue2.js +3 -1
  58. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue2.js.map +1 -1
  59. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue3.js.map +1 -1
  60. package/dist/esm/components/CnDetailPage/CnDetailHeaderChips.vue2.js +2 -1
  61. package/dist/esm/components/CnDetailPage/CnDetailHeaderChips.vue2.js.map +1 -1
  62. package/dist/esm/components/CnDetailPage/CnDetailHeaderChips.vue3.js.map +1 -1
  63. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +23 -4
  64. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  65. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  66. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
  67. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +3 -1
  68. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
  69. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
  70. package/dist/esm/components/CnEmailPicker/CnEmailPicker.vue.js +1 -1
  71. package/dist/esm/components/CnEmailPicker/CnEmailPicker.vue2.js +2 -1
  72. package/dist/esm/components/CnEmailPicker/CnEmailPicker.vue2.js.map +1 -1
  73. package/dist/esm/components/CnEmailPicker/CnEmailPicker.vue3.js.map +1 -1
  74. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
  75. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +18 -5
  76. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
  77. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
  78. package/dist/esm/components/CnFederationStatus/CnFederationStatus.vue.js +1 -1
  79. package/dist/esm/components/CnFederationStatus/CnFederationStatus.vue2.js +3 -1
  80. package/dist/esm/components/CnFederationStatus/CnFederationStatus.vue2.js.map +1 -1
  81. package/dist/esm/components/CnFederationStatus/CnFederationStatus.vue3.js.map +1 -1
  82. package/dist/esm/components/CnFileManager/CnFileManager.vue.js +1 -1
  83. package/dist/esm/components/CnFileManager/CnFileManager.vue2.js +3 -1
  84. package/dist/esm/components/CnFileManager/CnFileManager.vue2.js.map +1 -1
  85. package/dist/esm/components/CnFileManager/CnFileManager.vue3.js.map +1 -1
  86. package/dist/esm/components/CnFilePreview/CnFilePreview.vue.js +1 -1
  87. package/dist/esm/components/CnFilePreview/CnFilePreview.vue2.js +2 -1
  88. package/dist/esm/components/CnFilePreview/CnFilePreview.vue2.js.map +1 -1
  89. package/dist/esm/components/CnFilePreview/CnFilePreview.vue3.js.map +1 -1
  90. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
  91. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +49 -1
  92. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
  93. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +3 -3
  94. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
  95. package/dist/esm/components/CnFollowToggle/CnFollowToggle.vue.js +1 -1
  96. package/dist/esm/components/CnFollowToggle/CnFollowToggle.vue2.js +2 -1
  97. package/dist/esm/components/CnFollowToggle/CnFollowToggle.vue2.js.map +1 -1
  98. package/dist/esm/components/CnFollowToggle/CnFollowToggle.vue3.js.map +1 -1
  99. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +571 -77
  100. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  101. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +191 -82
  102. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  103. package/dist/esm/components/CnIndexPage/useSelfFetchList.js +11 -2
  104. package/dist/esm/components/CnIndexPage/useSelfFetchList.js.map +1 -1
  105. package/dist/esm/components/CnNotesCard/CnNotesCard.vue.js +1 -1
  106. package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js +2 -1
  107. package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js.map +1 -1
  108. package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js.map +1 -1
  109. package/dist/esm/components/CnObjectCalendar/CnObjectCalendar.vue.js +1 -1
  110. package/dist/esm/components/CnObjectCalendar/CnObjectCalendar.vue2.js +3 -2
  111. package/dist/esm/components/CnObjectCalendar/CnObjectCalendar.vue2.js.map +1 -1
  112. package/dist/esm/components/CnObjectCalendar/CnObjectCalendar.vue3.js.map +1 -1
  113. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
  114. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +28 -0
  115. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
  116. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +82 -75
  117. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
  118. package/dist/esm/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue.js +1 -1
  119. package/dist/esm/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue2.js +5 -4
  120. package/dist/esm/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue2.js.map +1 -1
  121. package/dist/esm/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue3.js.map +1 -1
  122. package/dist/esm/components/CnObjectSidebar/CnAuditTrailTab.vue.js +1 -1
  123. package/dist/esm/components/CnObjectSidebar/CnAuditTrailTab.vue2.js +2 -1
  124. package/dist/esm/components/CnObjectSidebar/CnAuditTrailTab.vue2.js.map +1 -1
  125. package/dist/esm/components/CnObjectSidebar/CnAuditTrailTab.vue3.js.map +1 -1
  126. package/dist/esm/components/CnObjectSidebar/CnFlowTasksPanel.vue.js +1 -1
  127. package/dist/esm/components/CnObjectSidebar/CnFlowTasksPanel.vue2.js +2 -1
  128. package/dist/esm/components/CnObjectSidebar/CnFlowTasksPanel.vue2.js.map +1 -1
  129. package/dist/esm/components/CnObjectSidebar/CnFlowTasksPanel.vue3.js.map +1 -1
  130. package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue.js +1 -1
  131. package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js +2 -1
  132. package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js.map +1 -1
  133. package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue3.js.map +1 -1
  134. package/dist/esm/components/CnObjectSidebar/CnTasksTab.vue.js +1 -1
  135. package/dist/esm/components/CnObjectSidebar/CnTasksTab.vue2.js +2 -1
  136. package/dist/esm/components/CnObjectSidebar/CnTasksTab.vue2.js.map +1 -1
  137. package/dist/esm/components/CnObjectSidebar/CnTasksTab.vue3.js.map +1 -1
  138. package/dist/esm/components/CnPropertySourceField/CnPropertySourceField.vue.js +1 -1
  139. package/dist/esm/components/CnPropertySourceField/CnPropertySourceField.vue2.js +2 -1
  140. package/dist/esm/components/CnPropertySourceField/CnPropertySourceField.vue2.js.map +1 -1
  141. package/dist/esm/components/CnPropertySourceField/CnPropertySourceField.vue3.js.map +1 -1
  142. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  143. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +70 -2
  144. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  145. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  146. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue.js +1 -1
  147. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js +67 -5
  148. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js.map +1 -1
  149. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue3.js +181 -124
  150. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue3.js.map +1 -1
  151. package/dist/esm/components/CnRoadmapItem/CnRoadmapItem.vue.js +1 -1
  152. package/dist/esm/components/CnRoadmapItem/CnRoadmapItem.vue2.js +2 -1
  153. package/dist/esm/components/CnRoadmapItem/CnRoadmapItem.vue2.js.map +1 -1
  154. package/dist/esm/components/CnRoadmapItem/CnRoadmapItem.vue3.js.map +1 -1
  155. package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue2.js +2 -0
  156. package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue2.js.map +1 -1
  157. package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue3.js +2 -2
  158. package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue3.js.map +1 -1
  159. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue.js +1 -1
  160. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js +5 -1
  161. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js.map +1 -1
  162. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue3.js.map +1 -1
  163. package/dist/esm/components/CnStatWidget/CnStatWidget.vue.js +1 -1
  164. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +134 -10
  165. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
  166. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js +6 -2
  167. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
  168. package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue.js +1 -1
  169. package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue2.js +2 -1
  170. package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue2.js.map +1 -1
  171. package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue3.js.map +1 -1
  172. package/dist/esm/components/CnSummaryAggregates/CnSummaryAggregates.vue.js +1 -1
  173. package/dist/esm/components/CnSummaryAggregates/CnSummaryAggregates.vue2.js +2 -1
  174. package/dist/esm/components/CnSummaryAggregates/CnSummaryAggregates.vue2.js.map +1 -1
  175. package/dist/esm/components/CnSummaryAggregates/CnSummaryAggregates.vue3.js.map +1 -1
  176. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
  177. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +6 -3
  178. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
  179. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
  180. package/dist/esm/components/CnTasksCard/CnTasksCard.vue.js +1 -1
  181. package/dist/esm/components/CnTasksCard/CnTasksCard.vue2.js +2 -1
  182. package/dist/esm/components/CnTasksCard/CnTasksCard.vue2.js.map +1 -1
  183. package/dist/esm/components/CnTasksCard/CnTasksCard.vue3.js.map +1 -1
  184. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue.js +1 -1
  185. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js +2 -1
  186. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js.map +1 -1
  187. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue3.js.map +1 -1
  188. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue.js +1 -1
  189. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue2.js +140 -7
  190. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue2.js.map +1 -1
  191. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue3.js.map +1 -1
  192. package/dist/esm/components/CnTranslatedBadge/CnTranslatedBadge.vue.js +1 -1
  193. package/dist/esm/components/CnTranslatedBadge/CnTranslatedBadge.vue2.js +2 -1
  194. package/dist/esm/components/CnTranslatedBadge/CnTranslatedBadge.vue2.js.map +1 -1
  195. package/dist/esm/components/CnVersionHistory/CnVersionHistory.vue.js +1 -1
  196. package/dist/esm/components/CnVersionHistory/CnVersionHistory.vue2.js +2 -1
  197. package/dist/esm/components/CnVersionHistory/CnVersionHistory.vue2.js.map +1 -1
  198. package/dist/esm/components/CnVersionHistory/CnVersionHistory.vue3.js.map +1 -1
  199. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue.js +1 -1
  200. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue2.js +37 -9
  201. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue2.js.map +1 -1
  202. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js +6 -5
  203. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js.map +1 -1
  204. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue2.js +53 -1
  205. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue2.js.map +1 -1
  206. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue3.js +3 -2
  207. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue3.js.map +1 -1
  208. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue.js +1 -1
  209. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js +135 -0
  210. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js.map +1 -1
  211. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue3.js.map +1 -1
  212. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue.js +1 -1
  213. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js +19 -0
  214. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js.map +1 -1
  215. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js +37 -19
  216. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js.map +1 -1
  217. package/dist/esm/composables/useListView.js +21 -0
  218. package/dist/esm/composables/useListView.js.map +1 -1
  219. package/dist/esm/dialogs/CnNoteHistoryDialog.vue.js +1 -1
  220. package/dist/esm/dialogs/CnNoteHistoryDialog.vue2.js +2 -1
  221. package/dist/esm/dialogs/CnNoteHistoryDialog.vue2.js.map +1 -1
  222. package/dist/esm/dialogs/CnNoteHistoryDialog.vue3.js.map +1 -1
  223. package/dist/esm/integrations/builtin/activity/CnActivityCard.vue.js +1 -1
  224. package/dist/esm/integrations/builtin/activity/CnActivityCard.vue2.js +3 -2
  225. package/dist/esm/integrations/builtin/activity/CnActivityCard.vue2.js.map +1 -1
  226. package/dist/esm/integrations/builtin/activity/CnActivityCard.vue3.js.map +1 -1
  227. package/dist/esm/integrations/builtin/activity/CnActivityTab.vue.js +1 -1
  228. package/dist/esm/integrations/builtin/activity/CnActivityTab.vue2.js +4 -3
  229. package/dist/esm/integrations/builtin/activity/CnActivityTab.vue2.js.map +1 -1
  230. package/dist/esm/integrations/builtin/activity/CnActivityTab.vue3.js.map +1 -1
  231. package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue.js +1 -1
  232. package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue2.js +3 -2
  233. package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue2.js.map +1 -1
  234. package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue3.js.map +1 -1
  235. package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue.js +1 -1
  236. package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue2.js +2 -1
  237. package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue2.js.map +1 -1
  238. package/dist/esm/integrations/builtin/calendar/CnCalendarCard.vue3.js.map +1 -1
  239. package/dist/esm/integrations/builtin/calendar/CnCalendarTab.vue.js +1 -1
  240. package/dist/esm/integrations/builtin/calendar/CnCalendarTab.vue2.js +6 -5
  241. package/dist/esm/integrations/builtin/calendar/CnCalendarTab.vue2.js.map +1 -1
  242. package/dist/esm/integrations/builtin/calendar/CnCalendarTab.vue3.js.map +1 -1
  243. package/dist/esm/integrations/builtin/contactmoment/CnContactmomentCard.vue.js +1 -1
  244. package/dist/esm/integrations/builtin/contactmoment/CnContactmomentCard.vue2.js +2 -1
  245. package/dist/esm/integrations/builtin/contactmoment/CnContactmomentCard.vue2.js.map +1 -1
  246. package/dist/esm/integrations/builtin/contactmoment/CnContactmomentCard.vue3.js.map +1 -1
  247. package/dist/esm/integrations/builtin/cospend/CnCospendTab.vue.js +1 -1
  248. package/dist/esm/integrations/builtin/cospend/CnCospendTab.vue2.js +2 -1
  249. package/dist/esm/integrations/builtin/cospend/CnCospendTab.vue2.js.map +1 -1
  250. package/dist/esm/integrations/builtin/cospend/CnCospendTab.vue3.js.map +1 -1
  251. package/dist/esm/integrations/builtin/deck/CnDeckTab.vue.js +1 -1
  252. package/dist/esm/integrations/builtin/deck/CnDeckTab.vue2.js +2 -1
  253. package/dist/esm/integrations/builtin/deck/CnDeckTab.vue2.js.map +1 -1
  254. package/dist/esm/integrations/builtin/deck/CnDeckTab.vue3.js.map +1 -1
  255. package/dist/esm/integrations/builtin/email/CnEmailCard.vue.js +1 -1
  256. package/dist/esm/integrations/builtin/email/CnEmailCard.vue2.js +2 -1
  257. package/dist/esm/integrations/builtin/email/CnEmailCard.vue2.js.map +1 -1
  258. package/dist/esm/integrations/builtin/email/CnEmailCard.vue3.js.map +1 -1
  259. package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionCard.vue.js +1 -1
  260. package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionCard.vue2.js +2 -1
  261. package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionCard.vue2.js.map +1 -1
  262. package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionCard.vue3.js.map +1 -1
  263. package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionTab.vue.js +1 -1
  264. package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionTab.vue2.js +2 -1
  265. package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionTab.vue2.js.map +1 -1
  266. package/dist/esm/integrations/builtin/field-inspection/CnFieldInspectionTab.vue3.js.map +1 -1
  267. package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue.js +1 -1
  268. package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue2.js +2 -1
  269. package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue2.js.map +1 -1
  270. package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue3.js.map +1 -1
  271. package/dist/esm/l10n/en.json.js +57 -2
  272. package/dist/esm/l10n/en.json.js.map +1 -1
  273. package/dist/esm/l10n/nl.json.js +78 -2
  274. package/dist/esm/l10n/nl.json.js.map +1 -1
  275. package/dist/esm/library-style.js +1 -1
  276. package/dist/esm/nextcloud-vue.css +1541 -1166
  277. package/dist/esm/store/useObjectStore.js +23 -4
  278. package/dist/esm/store/useObjectStore.js.map +1 -1
  279. package/dist/esm/utils/boardColumns.js +58 -2
  280. package/dist/esm/utils/boardColumns.js.map +1 -1
  281. package/dist/esm/utils/boardReferenceColumns.js +330 -0
  282. package/dist/esm/utils/boardReferenceColumns.js.map +1 -0
  283. package/dist/esm/utils/buildManifest.js +4 -1
  284. package/dist/esm/utils/buildManifest.js.map +1 -1
  285. package/dist/esm/utils/schema.js +5 -4
  286. package/dist/esm/utils/schema.js.map +1 -1
  287. package/dist/esm/utils/userLocale.js +30 -0
  288. package/dist/esm/utils/userLocale.js.map +1 -0
  289. package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
  290. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  291. package/dist/esm/utils/widgetDispatch.js +8 -2
  292. package/dist/esm/utils/widgetDispatch.js.map +1 -1
  293. package/dist/nextcloud-vue.cjs.js +30291 -27618
  294. package/dist/nextcloud-vue.cjs.js.map +2 -2
  295. package/dist/nextcloud-vue.css +1541 -1166
  296. package/l10n/en.json +57 -2
  297. package/l10n/nl.json +78 -2
  298. package/package.json +1 -1
  299. package/src/components/CnAdminSettingsShell/CnAdminSettingsShell.vue +160 -8
  300. package/src/components/CnAdvancedFormDialog/CnMetadataTab.vue +3 -2
  301. package/src/components/CnAdvancedFormDialog/CnPropertyValueCell.vue +5 -4
  302. package/src/components/CnAnalyticsReportPicker/CnAnalyticsReportPicker.vue +2 -1
  303. package/src/components/CnAuditTrailCard/CnAuditTrailCard.vue +2 -1
  304. package/src/components/CnBoardView/CnBoardView.vue +433 -12
  305. package/src/components/CnCalendarEventPicker/CnCalendarEventPicker.vue +2 -1
  306. package/src/components/CnCalendarWidget/CnCalendarWidget.vue +2 -1
  307. package/src/components/CnChartWidget/CnChartWidget.vue +6 -5
  308. package/src/components/CnCollectivePagePicker/CnCollectivePagePicker.vue +2 -1
  309. package/src/components/CnConversationThread/CnConversationThread.vue +2 -1
  310. package/src/components/CnCountdownWidget/CnCountdownWidget.vue +2 -1
  311. package/src/components/CnDashboardPage/CnDashboardPage.vue +59 -3
  312. package/src/components/CnDataMatrix/CnDataMatrix.vue +2 -1
  313. package/src/components/CnDetailPage/CnDetailHeaderChips.vue +2 -1
  314. package/src/components/CnDetailPage/CnDetailPage.md +1 -1
  315. package/src/components/CnDetailPage/CnDetailPage.vue +23 -4
  316. package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +3 -1
  317. package/src/components/CnEmailPicker/CnEmailPicker.vue +2 -1
  318. package/src/components/CnFactsWidget/CnFactsWidget.vue +18 -5
  319. package/src/components/CnFederationStatus/CnFederationStatus.vue +3 -1
  320. package/src/components/CnFileManager/CnFileManager.vue +2 -1
  321. package/src/components/CnFilePreview/CnFilePreview.vue +2 -1
  322. package/src/components/CnFilesBrowser/CnFilesBrowser.vue +54 -6
  323. package/src/components/CnFollowToggle/CnFollowToggle.vue +2 -1
  324. package/src/components/CnIndexPage/CnIndexPage.vue +610 -25
  325. package/src/components/CnIndexPage/useSelfFetchList.js +10 -1
  326. package/src/components/CnNotesCard/CnNotesCard.vue +2 -1
  327. package/src/components/CnObjectCalendar/CnObjectCalendar.vue +3 -2
  328. package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +36 -0
  329. package/src/components/CnObjectMetadataWidget/CnObjectMetadataWidget.vue +5 -4
  330. package/src/components/CnObjectSidebar/CnAuditTrailTab.vue +2 -1
  331. package/src/components/CnObjectSidebar/CnFlowTasksPanel.vue +2 -1
  332. package/src/components/CnObjectSidebar/CnNotesTab.vue +2 -1
  333. package/src/components/CnObjectSidebar/CnTasksTab.vue +2 -1
  334. package/src/components/CnPropertySourceField/CnPropertySourceField.vue +2 -1
  335. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +70 -2
  336. package/src/components/CnRegisterMapping/CnRegisterMapping.md +5 -0
  337. package/src/components/CnRegisterMapping/CnRegisterMapping.vue +231 -96
  338. package/src/components/CnRoadmapItem/CnRoadmapItem.vue +2 -1
  339. package/src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue +4 -2
  340. package/src/components/CnSettingsPage/CnSettingsPage.vue +5 -1
  341. package/src/components/CnStatWidget/CnStatWidget.vue +136 -11
  342. package/src/components/CnStatsBlock/CnStatsBlock.vue +2 -1
  343. package/src/components/CnSummaryAggregates/CnSummaryAggregates.vue +2 -1
  344. package/src/components/CnTabsWidget/CnTabsWidget.vue +6 -3
  345. package/src/components/CnTasksCard/CnTasksCard.vue +2 -1
  346. package/src/components/CnTimelineWidget/CnTimelineWidget.vue +2 -1
  347. package/src/components/CnToggleTableWidget/CnToggleTableWidget.vue +140 -7
  348. package/src/components/CnTranslatedBadge/CnTranslatedBadge.vue +2 -1
  349. package/src/components/CnVersionHistory/CnVersionHistory.vue +2 -1
  350. package/src/components/CnVersionInfoCard/CnVersionInfoCard.md +2 -1
  351. package/src/components/CnVersionInfoCard/CnVersionInfoCard.vue +42 -13
  352. package/src/components/CnWidgetCardGrid/CnWidgetCardGrid.vue +55 -2
  353. package/src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue +135 -0
  354. package/src/components/CnWidgetWrapper/CnWidgetWrapper.md +10 -0
  355. package/src/components/CnWidgetWrapper/CnWidgetWrapper.vue +44 -1
  356. package/src/composables/useListView.js +21 -0
  357. package/src/css/board.css +105 -4
  358. package/src/css/dialog.css +4 -2
  359. package/src/css/index-page.css +49 -0
  360. package/src/css/look-board.css +77 -7
  361. package/src/dialogs/CnNoteHistoryDialog.vue +2 -1
  362. package/src/integrations/builtin/activity/CnActivityCard.vue +3 -2
  363. package/src/integrations/builtin/activity/CnActivityTab.vue +4 -3
  364. package/src/integrations/builtin/analytics/CnAnalyticsTab.vue +3 -2
  365. package/src/integrations/builtin/calendar/CnCalendarCard.vue +2 -1
  366. package/src/integrations/builtin/calendar/CnCalendarTab.vue +6 -5
  367. package/src/integrations/builtin/contactmoment/CnContactmomentCard.vue +2 -1
  368. package/src/integrations/builtin/cospend/CnCospendTab.vue +2 -1
  369. package/src/integrations/builtin/deck/CnDeckTab.vue +2 -1
  370. package/src/integrations/builtin/email/CnEmailCard.vue +2 -1
  371. package/src/integrations/builtin/field-inspection/CnFieldInspectionCard.vue +2 -1
  372. package/src/integrations/builtin/field-inspection/CnFieldInspectionTab.vue +2 -1
  373. package/src/integrations/builtin/photos/CnPhotosTab.vue +2 -1
  374. package/src/schemas/app-manifest-v2.schema.json +116 -5
  375. package/src/store/useObjectStore.js +23 -4
  376. package/src/utils/boardColumns.js +57 -1
  377. package/src/utils/boardReferenceColumns.js +326 -0
  378. package/src/utils/buildManifest.js +4 -1
  379. package/src/utils/schema.js +5 -4
  380. package/src/utils/userLocale.js +26 -0
  381. package/src/utils/validateManifestV2.compiled.js +3 -3
  382. package/src/utils/widgetDispatch.js +8 -2
@@ -2,7 +2,7 @@ import script from './CnFollowToggle.vue2.js';
2
2
  import { render } from './CnFollowToggle.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-17752367";
5
+ script.__scopeId = "data-v-8bff02a6";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -8,6 +8,7 @@ import EyeOutline from 'vue-material-design-icons/EyeOutline.vue';
8
8
  import { patchStoredSelf } from '../../utils/patchStoredSelf.js';
9
9
  import { setWatching, listWatchers, setWatcher } from '../../utils/recordInteractions.js';
10
10
  import { searchNextcloudUsers } from '../../utils/userAutocomplete.js';
11
+ import { userLocale } from '../../utils/userLocale.js';
11
12
 
12
13
  /**
13
14
  * CnFollowToggle — the one Follow control of a record: a Follow toggle bound to
@@ -198,7 +199,7 @@ var script = {
198
199
  const d = new Date(created);
199
200
  return Number.isNaN(d.getTime())
200
201
  ? ''
201
- : translate('nextcloud-vue', 'Since {date}', { date: d.toLocaleDateString() })
202
+ : translate('nextcloud-vue', 'Since {date}', { date: d.toLocaleDateString(userLocale()) })
202
203
  },
203
204
 
204
205
  removeFollowerLabel(watcher) {
@@ -1 +1 @@
1
- {"version":3,"file":"CnFollowToggle.vue2.js","sources":["../../../../src/components/CnFollowToggle/CnFollowToggle.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<span class=\"cn-follow-toggle\"\n\t\t:class=\"{ 'cn-follow-toggle--compact': compact }\"\n\t\tdata-testid=\"cn-follow-toggle\">\n\t\t<NcButton\n\t\t\t:variant=\"state && !compact ? 'secondary' : 'tertiary'\"\n\t\t\t:aria-pressed=\"state ? 'true' : 'false'\"\n\t\t\t:aria-label=\"compact ? (state ? followingLabel : followLabel) : undefined\"\n\t\t\t:title=\"tooltip\"\n\t\t\t:disabled=\"busy\"\n\t\t\tdata-testid=\"cn-follow-toggle-button\"\n\t\t\t@click.stop=\"toggle\">\n\t\t\t<template #icon>\n\t\t\t\t<Eye v-if=\"state\" :size=\"20\" class=\"cn-follow-toggle__on\" />\n\t\t\t\t<EyeOutline v-else :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"!compact\">\n\t\t\t\t{{ state ? followingLabel : followLabel }}\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\tv-if=\"showNotifySwitch\"\n\t\t\tvariant=\"tertiary\"\n\t\t\t:aria-pressed=\"notifyState ? 'true' : 'false'\"\n\t\t\t:aria-label=\"notifyLabel\"\n\t\t\t:title=\"notifyLabel\"\n\t\t\t:disabled=\"busy\"\n\t\t\tdata-testid=\"cn-follow-toggle-notify\"\n\t\t\t@click.stop=\"toggleNotify\">\n\t\t\t<template #icon>\n\t\t\t\t<Bell v-if=\"notifyState\" :size=\"20\" />\n\t\t\t\t<BellOffOutline v-else :size=\"20\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcPopover\n\t\t\tv-if=\"count !== null && !compact\"\n\t\t\tv-model:shown=\"open\"\n\t\t\tplacement=\"bottom-start\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tclass=\"cn-follow-toggle__count\"\n\t\t\t\t\t:aria-label=\"followersLabel\"\n\t\t\t\t\tdata-testid=\"cn-follow-toggle-count\">\n\t\t\t\t\t{{ count }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t\t<div class=\"cn-follow-toggle__popover\" data-testid=\"cn-follow-toggle-popover\">\n\t\t\t\t<NcLoadingIcon v-if=\"loadingWatchers\" :size=\"20\" :name=\"loadingLabel\" />\n\t\t\t\t<ul v-else class=\"cn-follow-toggle__list\">\n\t\t\t\t\t<li v-for=\"watcher in watchers\" :key=\"watcher.userId\" class=\"cn-follow-toggle__row\">\n\t\t\t\t\t\t<NcAvatar :user=\"watcher.userId\"\n\t\t\t\t\t\t\t:displayName=\"watcher.displayName || watcher.userId\"\n\t\t\t\t\t\t\t:size=\"28\"\n\t\t\t\t\t\t\thideStatus />\n\t\t\t\t\t\t<span class=\"cn-follow-toggle__who\">\n\t\t\t\t\t\t\t<span class=\"cn-follow-toggle__name\">{{ watcher.displayName || watcher.userId }}</span>\n\t\t\t\t\t\t\t<span v-if=\"watcher.created\" class=\"cn-follow-toggle__since\">{{ sinceText(watcher.created) }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\tv-if=\"canRemove(watcher)\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"removeFollowerLabel(watcher)\"\n\t\t\t\t\t\t\t:title=\"removeFollowerLabel(watcher)\"\n\t\t\t\t\t\t\tdata-testid=\"cn-follow-toggle-remove\"\n\t\t\t\t\t\t\t@click=\"removeWatcher(watcher)\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Close :size=\"16\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<div v-if=\"canManage\" class=\"cn-follow-toggle__picker\">\n\t\t\t\t\t<NcSelect\n\t\t\t\t\t\t:inputLabel=\"addColleagueLabel\"\n\t\t\t\t\t\t:modelValue=\"null\"\n\t\t\t\t\t\t:options=\"pickerOptions\"\n\t\t\t\t\t\t:loading=\"pickerLoading\"\n\t\t\t\t\t\t:filterable=\"false\"\n\t\t\t\t\t\tlabel=\"label\"\n\t\t\t\t\t\tdata-testid=\"cn-follow-toggle-picker\"\n\t\t\t\t\t\t@search=\"onPickerSearch\"\n\t\t\t\t\t\t@update:modelValue=\"addWatcher\" />\n\t\t\t\t</div>\n\t\t\t\t<p v-if=\"popoverError\"\n\t\t\t\t\tclass=\"cn-follow-toggle__error\"\n\t\t\t\t\trole=\"alert\"\n\t\t\t\t\tdata-testid=\"cn-follow-toggle-error\">\n\t\t\t\t\t{{ popoverError }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</span>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcAvatar, NcButton, NcLoadingIcon, NcPopover, NcSelect } from '@nextcloud/vue'\nimport Bell from 'vue-material-design-icons/Bell.vue'\nimport BellOffOutline from 'vue-material-design-icons/BellOffOutline.vue'\nimport Close from 'vue-material-design-icons/Close.vue'\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOutline from 'vue-material-design-icons/EyeOutline.vue'\nimport { patchStoredSelf } from '../../utils/patchStoredSelf.js'\nimport { listWatchers, setWatcher, setWatching } from '../../utils/recordInteractions.js'\nimport { searchNextcloudUsers } from '../../utils/userAutocomplete.js'\n\n/**\n * CnFollowToggle — the one Follow control of a record: a Follow toggle bound to\n * `@self.watching`, a notifications switch bound to `@self.watchNotify`, the\n * follower count and a followers popover for users who may see them.\n *\n * Following and favourites are one feature (OpenRegister's\n * `merge-follow-and-favourites`): a favourite is a follow with notifications\n * off, so there is no separate star. While the user follows, a bell beside the\n * toggle turns the follow's notifications on or off (`PUT .../watch` with\n * `{\"notify\": bool}`). With `notifies` false (the register sends no change\n * notifications) the bell is not offered. `compact` renders the toggle as an\n * icon only, without the bell, count or popover, for a column in a list.\n *\n * A click flips the toggle at once and sends `PUT` or `DELETE .../watch`; on\n * failure it flips back and shows the server's message, and a 404 says the\n * user can no longer see the record and emits `not-found`. The count shows\n * only when `watcherCount` is given (OpenRegister sets `@self.watcherCount` for\n * a reader with `update` only); opening the popover then fetches\n * `GET .../watchers`, never before, and a 403 closes it quietly. With\n * `canManage` (`@self.can.manage`) the popover offers an \"Add a colleague\"\n * picker and a remove action on each follower; without it, only the user's own\n * row can be removed.\n *\n * Example:\n * ```vue\n * <CnFollowToggle register=\"pipelinq\" schema=\"ticket\" :object-id=\"id\"\n * :watching=\"self.watching\" :notify=\"self.watchNotify\"\n * :watcher-count=\"self.watcherCount\" :can-manage=\"self.can && self.can.manage\" />\n * ```\n */\nexport default {\n\tname: 'CnFollowToggle',\n\n\tcomponents: { Bell, BellOffOutline, Close, Eye, EyeOutline, NcAvatar, NcButton, NcLoadingIcon, NcPopover, NcSelect },\n\n\tprops: {\n\t\t/** Register slug of the record. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Schema slug of the record. */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Id of the record. */\n\t\tobjectId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Whether the current user follows the record (`@self.watching`). */\n\t\twatching: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Whether the user's follow notifies them (`@self.watchNotify`). Null\n\t\t * (an older server, or not following) reads as on.\n\t\t */\n\t\tnotify: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Icon only, without the bell, count or popover: for a column in a list. */\n\t\tcompact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Number of followers (`@self.watcherCount`). Null hides the count and the popover. */\n\t\twatcherCount: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Whether the user may add and remove other followers (`@self.can.manage`). */\n\t\tcanManage: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Whether following sends change notifications. False changes the tooltip to say it does not. */\n\t\tnotifies: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** User id of the current user. Defaults to Nextcloud's `OC.currentUser`. */\n\t\tcurrentUser: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['change', 'error', 'not-found'],\n\n\tdata() {\n\t\treturn {\n\t\t\tstate: this.watching,\n\t\t\tnotifyState: this.notify !== false,\n\t\t\tcount: this.watcherCount,\n\t\t\tbusy: false,\n\t\t\topen: false,\n\t\t\twatchers: [],\n\t\t\tloadingWatchers: false,\n\t\t\tpopoverError: '',\n\t\t\tpickerOptions: [],\n\t\t\tpickerLoading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tfollowLabel() {\n\t\t\treturn t('nextcloud-vue', 'Follow')\n\t\t},\n\n\t\tfollowingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Following')\n\t\t},\n\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading …')\n\t\t},\n\n\t\taddColleagueLabel() {\n\t\t\treturn t('nextcloud-vue', 'Add a colleague')\n\t\t},\n\n\t\tnotifyLabel() {\n\t\t\treturn this.notifyState\n\t\t\t\t? t('nextcloud-vue', 'Turn notifications off')\n\t\t\t\t: t('nextcloud-vue', 'Turn notifications on')\n\t\t},\n\n\t\t/**\n\t\t * Whether the bell renders: following, not compact, and the register notifies.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tshowNotifySwitch() {\n\t\t\treturn this.state && !this.compact && this.notifies\n\t\t},\n\n\t\tfollowersLabel() {\n\t\t\treturn t('nextcloud-vue', '{count} followers', { count: this.count })\n\t\t},\n\n\t\ttooltip() {\n\t\t\treturn this.notifies\n\t\t\t\t? t('nextcloud-vue', 'Follow this record to get its updates')\n\t\t\t\t: t('nextcloud-vue', 'You will see it under Following. This register sends no change notifications.')\n\t\t},\n\n\t\tme() {\n\t\t\treturn this.currentUser || (typeof OC !== 'undefined' && OC ? OC.currentUser : '') || ''\n\t\t},\n\t},\n\n\twatch: {\n\t\twatching(value) {\n\t\t\tthis.state = value\n\t\t},\n\n\t\tnotify(value) {\n\t\t\tthis.notifyState = value !== false\n\t\t},\n\n\t\twatcherCount(value) {\n\t\t\tthis.count = value\n\t\t},\n\n\t\topen(value) {\n\t\t\tif (value) {\n\t\t\t\tthis.loadWatchers()\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\tsinceText(created) {\n\t\t\tconst d = new Date(created)\n\t\t\treturn Number.isNaN(d.getTime())\n\t\t\t\t? ''\n\t\t\t\t: t('nextcloud-vue', 'Since {date}', { date: d.toLocaleDateString() })\n\t\t},\n\n\t\tremoveFollowerLabel(watcher) {\n\t\t\treturn t('nextcloud-vue', 'Remove {name} as a follower', { name: watcher.displayName || watcher.userId })\n\t\t},\n\n\t\tcanRemove(watcher) {\n\t\t\treturn this.canManage || (this.me !== '' && watcher.userId === this.me)\n\t\t},\n\n\t\tasync toggle() {\n\t\t\tif (this.busy) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst previous = this.state\n\t\t\tthis.state = !previous\n\t\t\tif (this.count !== null) {\n\t\t\t\tthis.count = Math.max(0, this.count + (this.state ? 1 : -1))\n\t\t\t}\n\t\t\tthis.busy = true\n\t\t\tconst result = await setWatching(this.register, this.schema, this.objectId, this.state)\n\t\t\tthis.busy = false\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.state = previous\n\t\t\t\tif (this.count !== null) {\n\t\t\t\t\tthis.count = Math.max(0, this.count + (previous ? 1 : -1))\n\t\t\t\t}\n\t\t\t\tconst message = result.status === 404\n\t\t\t\t\t? t('nextcloud-vue', 'You can no longer see this record.')\n\t\t\t\t\t: (result.message || t('nextcloud-vue', 'Could not change following.'))\n\t\t\t\timport('@nextcloud/dialogs').then(({ showError }) => showError(message)).catch(() => {})\n\t\t\t\t/** @event error Emitted when a call failed; payload is the message shown. */\n\t\t\t\tthis.$emit('error', message)\n\t\t\t\tif (result.status === 404) {\n\t\t\t\t\t/** @event not-found Emitted on a 404: the record went away or access was withdrawn. */\n\t\t\t\t\tthis.$emit('not-found')\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// A new follow notifies (the server's default); an unfollow has no switch.\n\t\t\tthis.notifyState = this.state\n\t\t\tpatchStoredSelf(this.register, this.schema, this.objectId, {\n\t\t\t\twatching: this.state,\n\t\t\t\tfavourite: this.state,\n\t\t\t\twatchNotify: this.state ? true : undefined,\n\t\t\t\t...(this.count !== null ? { watcherCount: this.count } : {}),\n\t\t\t})\n\t\t\t/** @event change Emitted after a successful call. Payload: `{ watching, notify, count }`. */\n\t\t\tthis.$emit('change', { watching: this.state, notify: this.state ? this.notifyState : null, count: this.count })\n\t\t},\n\n\t\t/**\n\t\t * Turn the follow's notifications on or off, optimistically.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/one-follow-control/specs/record-follow/spec.md#requirement-one-follow-control-with-a-notifications-switch\n\t\t */\n\t\tasync toggleNotify() {\n\t\t\tif (this.busy || !this.state) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst previous = this.notifyState\n\t\t\tthis.notifyState = !previous\n\t\t\tthis.busy = true\n\t\t\tconst result = await setWatching(this.register, this.schema, this.objectId, true, { notify: this.notifyState })\n\t\t\tthis.busy = false\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.notifyState = previous\n\t\t\t\tconst message = result.status === 404\n\t\t\t\t\t? t('nextcloud-vue', 'You can no longer see this record.')\n\t\t\t\t\t: (result.message || t('nextcloud-vue', 'Could not change notifications.'))\n\t\t\t\timport('@nextcloud/dialogs').then(({ showError }) => showError(message)).catch(() => {})\n\t\t\t\tthis.$emit('error', message)\n\t\t\t\tif (result.status === 404) {\n\t\t\t\t\tthis.$emit('not-found')\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tpatchStoredSelf(this.register, this.schema, this.objectId, { watchNotify: this.notifyState })\n\t\t\tthis.$emit('change', { watching: true, notify: this.notifyState, count: this.count })\n\t\t},\n\n\t\tasync loadWatchers() {\n\t\t\tthis.popoverError = ''\n\t\t\tthis.loadingWatchers = true\n\t\t\tconst result = await listWatchers(this.register, this.schema, this.objectId)\n\t\t\tthis.loadingWatchers = false\n\t\t\tif (!result.ok) {\n\t\t\t\t// No right to see the list (403) or a failure: close without a toast.\n\t\t\t\tthis.open = false\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst data = result.data || {}\n\t\t\tthis.watchers = Array.isArray(data.results) ? data.results : []\n\t\t\tthis.count = Number.isFinite(data.total) ? data.total : this.watchers.length\n\t\t},\n\n\t\tasync onPickerSearch(query) {\n\t\t\tthis.pickerLoading = true\n\t\t\tconst found = await searchNextcloudUsers(query || '', { limit: 10 })\n\t\t\tconst already = new Set(this.watchers.map((w) => w.userId))\n\t\t\tthis.pickerOptions = found.filter((u) => !already.has(u.id)).map((u) => ({ ...u, label: u.label || u.displayName || u.id }))\n\t\t\tthis.pickerLoading = false\n\t\t},\n\n\t\tasync addWatcher(option) {\n\t\t\tif (!option || !option.id) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.popoverError = ''\n\t\t\tconst result = await setWatcher(this.register, this.schema, this.objectId, option.id, true)\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.popoverError = result.message || t('nextcloud-vue', 'Could not add this colleague.')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tawait this.loadWatchers()\n\t\t},\n\n\t\tasync removeWatcher(watcher) {\n\t\t\tthis.popoverError = ''\n\t\t\tconst result = await setWatcher(this.register, this.schema, this.objectId, watcher.userId, false)\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.popoverError = result.message || t('nextcloud-vue', 'Could not remove this follower.')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (watcher.userId === this.me) {\n\t\t\t\tthis.state = false\n\t\t\t\tthis.$emit('change', { watching: false, count: this.count })\n\t\t\t}\n\t\t\tawait this.loadWatchers()\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-follow-toggle {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 4px;\n}\n\n.cn-follow-toggle__on {\n\tcolor: var(--color-primary-element);\n}\n\n.cn-follow-toggle__popover {\n\tmin-width: 260px;\n\tpadding: 12px;\n}\n\n.cn-follow-toggle__list {\n\tlist-style: none;\n\tmargin: 0 0 8px;\n\tpadding: 0;\n}\n\n.cn-follow-toggle__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 4px 0;\n}\n\n.cn-follow-toggle__who {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1 1 auto;\n\tmin-width: 0;\n}\n\n.cn-follow-toggle__since {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: var(--font-size-small, 13px);\n}\n\n.cn-follow-toggle__error {\n\tmargin: 8px 0 0;\n\tcolor: var(--color-error-text);\n}\n</style>\n"],"names":["Bell","t"],"mappings":";;;;;;;;;;;AA+GA;AACC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;AAIA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,gBAAgB;;CAEtB,UAAU,EAAE,QAAEA,QAAI,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,QAAO,EAAG;;AAEpH,CAAA,KAAK,EAAE;;AAEN,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE,MAAM;GACZ,QAAQ,EAAE,IAAI;GACd;;;AAGD,EAAA,MAAM,EAAE;GACP,IAAI,EAAE,MAAM;GACZ,QAAQ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;AACrB,GAAA,MAAM,MAAO,GAAE,MAAM,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,EAAA;AAChG,GAAA,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;AACf,IAAA,IAAI,CAAC,eAAe,MAAM,CAAC,WAAWA,SAAC,CAAC,eAAe,EAAE,iCAAiC,EAAA;IAC1F,MAAK;AACN,IAAA;GACA,IAAI,OAAO,CAAC,MAAK,KAAM,IAAI,CAAC,EAAE,EAAE;AAC/B,IAAA,IAAI,CAAC,KAAM,GAAE,MAAI;IACjB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAI,EAAG,EAAA;AAC5D,IAAA;GACA,MAAM,IAAI,CAAC,YAAY,GAAC;GACxB;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnFollowToggle.vue2.js","sources":["../../../../src/components/CnFollowToggle/CnFollowToggle.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<span class=\"cn-follow-toggle\"\n\t\t:class=\"{ 'cn-follow-toggle--compact': compact }\"\n\t\tdata-testid=\"cn-follow-toggle\">\n\t\t<NcButton\n\t\t\t:variant=\"state && !compact ? 'secondary' : 'tertiary'\"\n\t\t\t:aria-pressed=\"state ? 'true' : 'false'\"\n\t\t\t:aria-label=\"compact ? (state ? followingLabel : followLabel) : undefined\"\n\t\t\t:title=\"tooltip\"\n\t\t\t:disabled=\"busy\"\n\t\t\tdata-testid=\"cn-follow-toggle-button\"\n\t\t\t@click.stop=\"toggle\">\n\t\t\t<template #icon>\n\t\t\t\t<Eye v-if=\"state\" :size=\"20\" class=\"cn-follow-toggle__on\" />\n\t\t\t\t<EyeOutline v-else :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"!compact\">\n\t\t\t\t{{ state ? followingLabel : followLabel }}\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\tv-if=\"showNotifySwitch\"\n\t\t\tvariant=\"tertiary\"\n\t\t\t:aria-pressed=\"notifyState ? 'true' : 'false'\"\n\t\t\t:aria-label=\"notifyLabel\"\n\t\t\t:title=\"notifyLabel\"\n\t\t\t:disabled=\"busy\"\n\t\t\tdata-testid=\"cn-follow-toggle-notify\"\n\t\t\t@click.stop=\"toggleNotify\">\n\t\t\t<template #icon>\n\t\t\t\t<Bell v-if=\"notifyState\" :size=\"20\" />\n\t\t\t\t<BellOffOutline v-else :size=\"20\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcPopover\n\t\t\tv-if=\"count !== null && !compact\"\n\t\t\tv-model:shown=\"open\"\n\t\t\tplacement=\"bottom-start\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tclass=\"cn-follow-toggle__count\"\n\t\t\t\t\t:aria-label=\"followersLabel\"\n\t\t\t\t\tdata-testid=\"cn-follow-toggle-count\">\n\t\t\t\t\t{{ count }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t\t<div class=\"cn-follow-toggle__popover\" data-testid=\"cn-follow-toggle-popover\">\n\t\t\t\t<NcLoadingIcon v-if=\"loadingWatchers\" :size=\"20\" :name=\"loadingLabel\" />\n\t\t\t\t<ul v-else class=\"cn-follow-toggle__list\">\n\t\t\t\t\t<li v-for=\"watcher in watchers\" :key=\"watcher.userId\" class=\"cn-follow-toggle__row\">\n\t\t\t\t\t\t<NcAvatar :user=\"watcher.userId\"\n\t\t\t\t\t\t\t:displayName=\"watcher.displayName || watcher.userId\"\n\t\t\t\t\t\t\t:size=\"28\"\n\t\t\t\t\t\t\thideStatus />\n\t\t\t\t\t\t<span class=\"cn-follow-toggle__who\">\n\t\t\t\t\t\t\t<span class=\"cn-follow-toggle__name\">{{ watcher.displayName || watcher.userId }}</span>\n\t\t\t\t\t\t\t<span v-if=\"watcher.created\" class=\"cn-follow-toggle__since\">{{ sinceText(watcher.created) }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\tv-if=\"canRemove(watcher)\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"removeFollowerLabel(watcher)\"\n\t\t\t\t\t\t\t:title=\"removeFollowerLabel(watcher)\"\n\t\t\t\t\t\t\tdata-testid=\"cn-follow-toggle-remove\"\n\t\t\t\t\t\t\t@click=\"removeWatcher(watcher)\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Close :size=\"16\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<div v-if=\"canManage\" class=\"cn-follow-toggle__picker\">\n\t\t\t\t\t<NcSelect\n\t\t\t\t\t\t:inputLabel=\"addColleagueLabel\"\n\t\t\t\t\t\t:modelValue=\"null\"\n\t\t\t\t\t\t:options=\"pickerOptions\"\n\t\t\t\t\t\t:loading=\"pickerLoading\"\n\t\t\t\t\t\t:filterable=\"false\"\n\t\t\t\t\t\tlabel=\"label\"\n\t\t\t\t\t\tdata-testid=\"cn-follow-toggle-picker\"\n\t\t\t\t\t\t@search=\"onPickerSearch\"\n\t\t\t\t\t\t@update:modelValue=\"addWatcher\" />\n\t\t\t\t</div>\n\t\t\t\t<p v-if=\"popoverError\"\n\t\t\t\t\tclass=\"cn-follow-toggle__error\"\n\t\t\t\t\trole=\"alert\"\n\t\t\t\t\tdata-testid=\"cn-follow-toggle-error\">\n\t\t\t\t\t{{ popoverError }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</span>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcAvatar, NcButton, NcLoadingIcon, NcPopover, NcSelect } from '@nextcloud/vue'\nimport Bell from 'vue-material-design-icons/Bell.vue'\nimport BellOffOutline from 'vue-material-design-icons/BellOffOutline.vue'\nimport Close from 'vue-material-design-icons/Close.vue'\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOutline from 'vue-material-design-icons/EyeOutline.vue'\nimport { patchStoredSelf } from '../../utils/patchStoredSelf.js'\nimport { listWatchers, setWatcher, setWatching } from '../../utils/recordInteractions.js'\nimport { searchNextcloudUsers } from '../../utils/userAutocomplete.js'\nimport { userLocale } from '../../utils/userLocale.js'\n\n/**\n * CnFollowToggle — the one Follow control of a record: a Follow toggle bound to\n * `@self.watching`, a notifications switch bound to `@self.watchNotify`, the\n * follower count and a followers popover for users who may see them.\n *\n * Following and favourites are one feature (OpenRegister's\n * `merge-follow-and-favourites`): a favourite is a follow with notifications\n * off, so there is no separate star. While the user follows, a bell beside the\n * toggle turns the follow's notifications on or off (`PUT .../watch` with\n * `{\"notify\": bool}`). With `notifies` false (the register sends no change\n * notifications) the bell is not offered. `compact` renders the toggle as an\n * icon only, without the bell, count or popover, for a column in a list.\n *\n * A click flips the toggle at once and sends `PUT` or `DELETE .../watch`; on\n * failure it flips back and shows the server's message, and a 404 says the\n * user can no longer see the record and emits `not-found`. The count shows\n * only when `watcherCount` is given (OpenRegister sets `@self.watcherCount` for\n * a reader with `update` only); opening the popover then fetches\n * `GET .../watchers`, never before, and a 403 closes it quietly. With\n * `canManage` (`@self.can.manage`) the popover offers an \"Add a colleague\"\n * picker and a remove action on each follower; without it, only the user's own\n * row can be removed.\n *\n * Example:\n * ```vue\n * <CnFollowToggle register=\"pipelinq\" schema=\"ticket\" :object-id=\"id\"\n * :watching=\"self.watching\" :notify=\"self.watchNotify\"\n * :watcher-count=\"self.watcherCount\" :can-manage=\"self.can && self.can.manage\" />\n * ```\n */\nexport default {\n\tname: 'CnFollowToggle',\n\n\tcomponents: { Bell, BellOffOutline, Close, Eye, EyeOutline, NcAvatar, NcButton, NcLoadingIcon, NcPopover, NcSelect },\n\n\tprops: {\n\t\t/** Register slug of the record. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Schema slug of the record. */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Id of the record. */\n\t\tobjectId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Whether the current user follows the record (`@self.watching`). */\n\t\twatching: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Whether the user's follow notifies them (`@self.watchNotify`). Null\n\t\t * (an older server, or not following) reads as on.\n\t\t */\n\t\tnotify: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Icon only, without the bell, count or popover: for a column in a list. */\n\t\tcompact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Number of followers (`@self.watcherCount`). Null hides the count and the popover. */\n\t\twatcherCount: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Whether the user may add and remove other followers (`@self.can.manage`). */\n\t\tcanManage: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Whether following sends change notifications. False changes the tooltip to say it does not. */\n\t\tnotifies: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** User id of the current user. Defaults to Nextcloud's `OC.currentUser`. */\n\t\tcurrentUser: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['change', 'error', 'not-found'],\n\n\tdata() {\n\t\treturn {\n\t\t\tstate: this.watching,\n\t\t\tnotifyState: this.notify !== false,\n\t\t\tcount: this.watcherCount,\n\t\t\tbusy: false,\n\t\t\topen: false,\n\t\t\twatchers: [],\n\t\t\tloadingWatchers: false,\n\t\t\tpopoverError: '',\n\t\t\tpickerOptions: [],\n\t\t\tpickerLoading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tfollowLabel() {\n\t\t\treturn t('nextcloud-vue', 'Follow')\n\t\t},\n\n\t\tfollowingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Following')\n\t\t},\n\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading …')\n\t\t},\n\n\t\taddColleagueLabel() {\n\t\t\treturn t('nextcloud-vue', 'Add a colleague')\n\t\t},\n\n\t\tnotifyLabel() {\n\t\t\treturn this.notifyState\n\t\t\t\t? t('nextcloud-vue', 'Turn notifications off')\n\t\t\t\t: t('nextcloud-vue', 'Turn notifications on')\n\t\t},\n\n\t\t/**\n\t\t * Whether the bell renders: following, not compact, and the register notifies.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tshowNotifySwitch() {\n\t\t\treturn this.state && !this.compact && this.notifies\n\t\t},\n\n\t\tfollowersLabel() {\n\t\t\treturn t('nextcloud-vue', '{count} followers', { count: this.count })\n\t\t},\n\n\t\ttooltip() {\n\t\t\treturn this.notifies\n\t\t\t\t? t('nextcloud-vue', 'Follow this record to get its updates')\n\t\t\t\t: t('nextcloud-vue', 'You will see it under Following. This register sends no change notifications.')\n\t\t},\n\n\t\tme() {\n\t\t\treturn this.currentUser || (typeof OC !== 'undefined' && OC ? OC.currentUser : '') || ''\n\t\t},\n\t},\n\n\twatch: {\n\t\twatching(value) {\n\t\t\tthis.state = value\n\t\t},\n\n\t\tnotify(value) {\n\t\t\tthis.notifyState = value !== false\n\t\t},\n\n\t\twatcherCount(value) {\n\t\t\tthis.count = value\n\t\t},\n\n\t\topen(value) {\n\t\t\tif (value) {\n\t\t\t\tthis.loadWatchers()\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\tsinceText(created) {\n\t\t\tconst d = new Date(created)\n\t\t\treturn Number.isNaN(d.getTime())\n\t\t\t\t? ''\n\t\t\t\t: t('nextcloud-vue', 'Since {date}', { date: d.toLocaleDateString(userLocale()) })\n\t\t},\n\n\t\tremoveFollowerLabel(watcher) {\n\t\t\treturn t('nextcloud-vue', 'Remove {name} as a follower', { name: watcher.displayName || watcher.userId })\n\t\t},\n\n\t\tcanRemove(watcher) {\n\t\t\treturn this.canManage || (this.me !== '' && watcher.userId === this.me)\n\t\t},\n\n\t\tasync toggle() {\n\t\t\tif (this.busy) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst previous = this.state\n\t\t\tthis.state = !previous\n\t\t\tif (this.count !== null) {\n\t\t\t\tthis.count = Math.max(0, this.count + (this.state ? 1 : -1))\n\t\t\t}\n\t\t\tthis.busy = true\n\t\t\tconst result = await setWatching(this.register, this.schema, this.objectId, this.state)\n\t\t\tthis.busy = false\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.state = previous\n\t\t\t\tif (this.count !== null) {\n\t\t\t\t\tthis.count = Math.max(0, this.count + (previous ? 1 : -1))\n\t\t\t\t}\n\t\t\t\tconst message = result.status === 404\n\t\t\t\t\t? t('nextcloud-vue', 'You can no longer see this record.')\n\t\t\t\t\t: (result.message || t('nextcloud-vue', 'Could not change following.'))\n\t\t\t\timport('@nextcloud/dialogs').then(({ showError }) => showError(message)).catch(() => {})\n\t\t\t\t/** @event error Emitted when a call failed; payload is the message shown. */\n\t\t\t\tthis.$emit('error', message)\n\t\t\t\tif (result.status === 404) {\n\t\t\t\t\t/** @event not-found Emitted on a 404: the record went away or access was withdrawn. */\n\t\t\t\t\tthis.$emit('not-found')\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// A new follow notifies (the server's default); an unfollow has no switch.\n\t\t\tthis.notifyState = this.state\n\t\t\tpatchStoredSelf(this.register, this.schema, this.objectId, {\n\t\t\t\twatching: this.state,\n\t\t\t\tfavourite: this.state,\n\t\t\t\twatchNotify: this.state ? true : undefined,\n\t\t\t\t...(this.count !== null ? { watcherCount: this.count } : {}),\n\t\t\t})\n\t\t\t/** @event change Emitted after a successful call. Payload: `{ watching, notify, count }`. */\n\t\t\tthis.$emit('change', { watching: this.state, notify: this.state ? this.notifyState : null, count: this.count })\n\t\t},\n\n\t\t/**\n\t\t * Turn the follow's notifications on or off, optimistically.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/one-follow-control/specs/record-follow/spec.md#requirement-one-follow-control-with-a-notifications-switch\n\t\t */\n\t\tasync toggleNotify() {\n\t\t\tif (this.busy || !this.state) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst previous = this.notifyState\n\t\t\tthis.notifyState = !previous\n\t\t\tthis.busy = true\n\t\t\tconst result = await setWatching(this.register, this.schema, this.objectId, true, { notify: this.notifyState })\n\t\t\tthis.busy = false\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.notifyState = previous\n\t\t\t\tconst message = result.status === 404\n\t\t\t\t\t? t('nextcloud-vue', 'You can no longer see this record.')\n\t\t\t\t\t: (result.message || t('nextcloud-vue', 'Could not change notifications.'))\n\t\t\t\timport('@nextcloud/dialogs').then(({ showError }) => showError(message)).catch(() => {})\n\t\t\t\tthis.$emit('error', message)\n\t\t\t\tif (result.status === 404) {\n\t\t\t\t\tthis.$emit('not-found')\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tpatchStoredSelf(this.register, this.schema, this.objectId, { watchNotify: this.notifyState })\n\t\t\tthis.$emit('change', { watching: true, notify: this.notifyState, count: this.count })\n\t\t},\n\n\t\tasync loadWatchers() {\n\t\t\tthis.popoverError = ''\n\t\t\tthis.loadingWatchers = true\n\t\t\tconst result = await listWatchers(this.register, this.schema, this.objectId)\n\t\t\tthis.loadingWatchers = false\n\t\t\tif (!result.ok) {\n\t\t\t\t// No right to see the list (403) or a failure: close without a toast.\n\t\t\t\tthis.open = false\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst data = result.data || {}\n\t\t\tthis.watchers = Array.isArray(data.results) ? data.results : []\n\t\t\tthis.count = Number.isFinite(data.total) ? data.total : this.watchers.length\n\t\t},\n\n\t\tasync onPickerSearch(query) {\n\t\t\tthis.pickerLoading = true\n\t\t\tconst found = await searchNextcloudUsers(query || '', { limit: 10 })\n\t\t\tconst already = new Set(this.watchers.map((w) => w.userId))\n\t\t\tthis.pickerOptions = found.filter((u) => !already.has(u.id)).map((u) => ({ ...u, label: u.label || u.displayName || u.id }))\n\t\t\tthis.pickerLoading = false\n\t\t},\n\n\t\tasync addWatcher(option) {\n\t\t\tif (!option || !option.id) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.popoverError = ''\n\t\t\tconst result = await setWatcher(this.register, this.schema, this.objectId, option.id, true)\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.popoverError = result.message || t('nextcloud-vue', 'Could not add this colleague.')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tawait this.loadWatchers()\n\t\t},\n\n\t\tasync removeWatcher(watcher) {\n\t\t\tthis.popoverError = ''\n\t\t\tconst result = await setWatcher(this.register, this.schema, this.objectId, watcher.userId, false)\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.popoverError = result.message || t('nextcloud-vue', 'Could not remove this follower.')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (watcher.userId === this.me) {\n\t\t\t\tthis.state = false\n\t\t\t\tthis.$emit('change', { watching: false, count: this.count })\n\t\t\t}\n\t\t\tawait this.loadWatchers()\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-follow-toggle {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 4px;\n}\n\n.cn-follow-toggle__on {\n\tcolor: var(--color-primary-element);\n}\n\n.cn-follow-toggle__popover {\n\tmin-width: 260px;\n\tpadding: 12px;\n}\n\n.cn-follow-toggle__list {\n\tlist-style: none;\n\tmargin: 0 0 8px;\n\tpadding: 0;\n}\n\n.cn-follow-toggle__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 4px 0;\n}\n\n.cn-follow-toggle__who {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1 1 auto;\n\tmin-width: 0;\n}\n\n.cn-follow-toggle__since {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: var(--font-size-small, 13px);\n}\n\n.cn-follow-toggle__error {\n\tmargin: 8px 0 0;\n\tcolor: var(--color-error-text);\n}\n</style>\n"],"names":["Bell","t"],"mappings":";;;;;;;;;;;;AAgHA;AACC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;AAIA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,gBAAgB;;CAEtB,UAAU,EAAE,QAAEA,QAAI,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,QAAO,EAAG;;AAEpH,CAAA,KAAK,EAAE;;AAEN,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE,MAAM;GACZ,QAAQ,EAAE,IAAI;GACd;;;AAGD,EAAA,MAAM,EAAE;GACP,IAAI,EAAE,MAAM;GACZ,QAAQ,EAAE,IAAI;GACd;;AAED;AACA,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE,MAAM;GACZ,QAAQ,EAAE,IAAI;GACd;;;AAGD,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;;AAED;;AAEC;;AAED,EAAA,MAAM,EAAE;GACP,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,IAAI;GACb;;;AAGD,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;;AAED;EACA,YAAY,EAAE;GACb,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,IAAI;GACb;;AAED;EACA,SAAS,EAAE;GACV,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;;AAED;AACA,EAAA,QAAQ,EAAE;GACT,IA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,KAAI,EAAG,EAAA;AAC5D,IAAA;GACA,MAAM,IAAI,CAAC,YAAY,GAAC;GACxB;EACD;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CnFollowToggle.vue3.js","sources":["../../../../src/components/CnFollowToggle/CnFollowToggle.vue?vue&type=template&id=17752367&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<span class=\"cn-follow-toggle\"\n\t\t:class=\"{ 'cn-follow-toggle--compact': compact }\"\n\t\tdata-testid=\"cn-follow-toggle\">\n\t\t<NcButton\n\t\t\t:variant=\"state && !compact ? 'secondary' : 'tertiary'\"\n\t\t\t:aria-pressed=\"state ? 'true' : 'false'\"\n\t\t\t:aria-label=\"compact ? (state ? followingLabel : followLabel) : undefined\"\n\t\t\t:title=\"tooltip\"\n\t\t\t:disabled=\"busy\"\n\t\t\tdata-testid=\"cn-follow-toggle-button\"\n\t\t\t@click.stop=\"toggle\">\n\t\t\t<template #icon>\n\t\t\t\t<Eye v-if=\"state\" :size=\"20\" class=\"cn-follow-toggle__on\" />\n\t\t\t\t<EyeOutline v-else :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"!compact\">\n\t\t\t\t{{ state ? followingLabel : followLabel }}\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\tv-if=\"showNotifySwitch\"\n\t\t\tvariant=\"tertiary\"\n\t\t\t:aria-pressed=\"notifyState ? 'true' : 'false'\"\n\t\t\t:aria-label=\"notifyLabel\"\n\t\t\t:title=\"notifyLabel\"\n\t\t\t:disabled=\"busy\"\n\t\t\tdata-testid=\"cn-follow-toggle-notify\"\n\t\t\t@click.stop=\"toggleNotify\">\n\t\t\t<template #icon>\n\t\t\t\t<Bell v-if=\"notifyState\" :size=\"20\" />\n\t\t\t\t<BellOffOutline v-else :size=\"20\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcPopover\n\t\t\tv-if=\"count !== null && !compact\"\n\t\t\tv-model:shown=\"open\"\n\t\t\tplacement=\"bottom-start\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tclass=\"cn-follow-toggle__count\"\n\t\t\t\t\t:aria-label=\"followersLabel\"\n\t\t\t\t\tdata-testid=\"cn-follow-toggle-count\">\n\t\t\t\t\t{{ count }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t\t<div class=\"cn-follow-toggle__popover\" data-testid=\"cn-follow-toggle-popover\">\n\t\t\t\t<NcLoadingIcon v-if=\"loadingWatchers\" :size=\"20\" :name=\"loadingLabel\" />\n\t\t\t\t<ul v-else class=\"cn-follow-toggle__list\">\n\t\t\t\t\t<li v-for=\"watcher in watchers\" :key=\"watcher.userId\" class=\"cn-follow-toggle__row\">\n\t\t\t\t\t\t<NcAvatar :user=\"watcher.userId\"\n\t\t\t\t\t\t\t:displayName=\"watcher.displayName || watcher.userId\"\n\t\t\t\t\t\t\t:size=\"28\"\n\t\t\t\t\t\t\thideStatus />\n\t\t\t\t\t\t<span class=\"cn-follow-toggle__who\">\n\t\t\t\t\t\t\t<span class=\"cn-follow-toggle__name\">{{ watcher.displayName || watcher.userId }}</span>\n\t\t\t\t\t\t\t<span v-if=\"watcher.created\" class=\"cn-follow-toggle__since\">{{ sinceText(watcher.created) }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\tv-if=\"canRemove(watcher)\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"removeFollowerLabel(watcher)\"\n\t\t\t\t\t\t\t:title=\"removeFollowerLabel(watcher)\"\n\t\t\t\t\t\t\tdata-testid=\"cn-follow-toggle-remove\"\n\t\t\t\t\t\t\t@click=\"removeWatcher(watcher)\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Close :size=\"16\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<div v-if=\"canManage\" class=\"cn-follow-toggle__picker\">\n\t\t\t\t\t<NcSelect\n\t\t\t\t\t\t:inputLabel=\"addColleagueLabel\"\n\t\t\t\t\t\t:modelValue=\"null\"\n\t\t\t\t\t\t:options=\"pickerOptions\"\n\t\t\t\t\t\t:loading=\"pickerLoading\"\n\t\t\t\t\t\t:filterable=\"false\"\n\t\t\t\t\t\tlabel=\"label\"\n\t\t\t\t\t\tdata-testid=\"cn-follow-toggle-picker\"\n\t\t\t\t\t\t@search=\"onPickerSearch\"\n\t\t\t\t\t\t@update:modelValue=\"addWatcher\" />\n\t\t\t\t</div>\n\t\t\t\t<p v-if=\"popoverError\"\n\t\t\t\t\tclass=\"cn-follow-toggle__error\"\n\t\t\t\t\trole=\"alert\"\n\t\t\t\t\tdata-testid=\"cn-follow-toggle-error\">\n\t\t\t\t\t{{ popoverError }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</span>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcAvatar, NcButton, NcLoadingIcon, NcPopover, NcSelect } from '@nextcloud/vue'\nimport Bell from 'vue-material-design-icons/Bell.vue'\nimport BellOffOutline from 'vue-material-design-icons/BellOffOutline.vue'\nimport Close from 'vue-material-design-icons/Close.vue'\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOutline from 'vue-material-design-icons/EyeOutline.vue'\nimport { patchStoredSelf } from '../../utils/patchStoredSelf.js'\nimport { listWatchers, setWatcher, setWatching } from '../../utils/recordInteractions.js'\nimport { searchNextcloudUsers } from '../../utils/userAutocomplete.js'\n\n/**\n * CnFollowToggle — the one Follow control of a record: a Follow toggle bound to\n * `@self.watching`, a notifications switch bound to `@self.watchNotify`, the\n * follower count and a followers popover for users who may see them.\n *\n * Following and favourites are one feature (OpenRegister's\n * `merge-follow-and-favourites`): a favourite is a follow with notifications\n * off, so there is no separate star. While the user follows, a bell beside the\n * toggle turns the follow's notifications on or off (`PUT .../watch` with\n * `{\"notify\": bool}`). With `notifies` false (the register sends no change\n * notifications) the bell is not offered. `compact` renders the toggle as an\n * icon only, without the bell, count or popover, for a column in a list.\n *\n * A click flips the toggle at once and sends `PUT` or `DELETE .../watch`; on\n * failure it flips back and shows the server's message, and a 404 says the\n * user can no longer see the record and emits `not-found`. The count shows\n * only when `watcherCount` is given (OpenRegister sets `@self.watcherCount` for\n * a reader with `update` only); opening the popover then fetches\n * `GET .../watchers`, never before, and a 403 closes it quietly. With\n * `canManage` (`@self.can.manage`) the popover offers an \"Add a colleague\"\n * picker and a remove action on each follower; without it, only the user's own\n * row can be removed.\n *\n * Example:\n * ```vue\n * <CnFollowToggle register=\"pipelinq\" schema=\"ticket\" :object-id=\"id\"\n * :watching=\"self.watching\" :notify=\"self.watchNotify\"\n * :watcher-count=\"self.watcherCount\" :can-manage=\"self.can && self.can.manage\" />\n * ```\n */\nexport default {\n\tname: 'CnFollowToggle',\n\n\tcomponents: { Bell, BellOffOutline, Close, Eye, EyeOutline, NcAvatar, NcButton, NcLoadingIcon, NcPopover, NcSelect },\n\n\tprops: {\n\t\t/** Register slug of the record. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Schema slug of the record. */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Id of the record. */\n\t\tobjectId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Whether the current user follows the record (`@self.watching`). */\n\t\twatching: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Whether the user's follow notifies them (`@self.watchNotify`). Null\n\t\t * (an older server, or not following) reads as on.\n\t\t */\n\t\tnotify: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Icon only, without the bell, count or popover: for a column in a list. */\n\t\tcompact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Number of followers (`@self.watcherCount`). Null hides the count and the popover. */\n\t\twatcherCount: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Whether the user may add and remove other followers (`@self.can.manage`). */\n\t\tcanManage: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Whether following sends change notifications. False changes the tooltip to say it does not. */\n\t\tnotifies: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** User id of the current user. Defaults to Nextcloud's `OC.currentUser`. */\n\t\tcurrentUser: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['change', 'error', 'not-found'],\n\n\tdata() {\n\t\treturn {\n\t\t\tstate: this.watching,\n\t\t\tnotifyState: this.notify !== false,\n\t\t\tcount: this.watcherCount,\n\t\t\tbusy: false,\n\t\t\topen: false,\n\t\t\twatchers: [],\n\t\t\tloadingWatchers: false,\n\t\t\tpopoverError: '',\n\t\t\tpickerOptions: [],\n\t\t\tpickerLoading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tfollowLabel() {\n\t\t\treturn t('nextcloud-vue', 'Follow')\n\t\t},\n\n\t\tfollowingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Following')\n\t\t},\n\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading …')\n\t\t},\n\n\t\taddColleagueLabel() {\n\t\t\treturn t('nextcloud-vue', 'Add a colleague')\n\t\t},\n\n\t\tnotifyLabel() {\n\t\t\treturn this.notifyState\n\t\t\t\t? t('nextcloud-vue', 'Turn notifications off')\n\t\t\t\t: t('nextcloud-vue', 'Turn notifications on')\n\t\t},\n\n\t\t/**\n\t\t * Whether the bell renders: following, not compact, and the register notifies.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tshowNotifySwitch() {\n\t\t\treturn this.state && !this.compact && this.notifies\n\t\t},\n\n\t\tfollowersLabel() {\n\t\t\treturn t('nextcloud-vue', '{count} followers', { count: this.count })\n\t\t},\n\n\t\ttooltip() {\n\t\t\treturn this.notifies\n\t\t\t\t? t('nextcloud-vue', 'Follow this record to get its updates')\n\t\t\t\t: t('nextcloud-vue', 'You will see it under Following. This register sends no change notifications.')\n\t\t},\n\n\t\tme() {\n\t\t\treturn this.currentUser || (typeof OC !== 'undefined' && OC ? OC.currentUser : '') || ''\n\t\t},\n\t},\n\n\twatch: {\n\t\twatching(value) {\n\t\t\tthis.state = value\n\t\t},\n\n\t\tnotify(value) {\n\t\t\tthis.notifyState = value !== false\n\t\t},\n\n\t\twatcherCount(value) {\n\t\t\tthis.count = value\n\t\t},\n\n\t\topen(value) {\n\t\t\tif (value) {\n\t\t\t\tthis.loadWatchers()\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\tsinceText(created) {\n\t\t\tconst d = new Date(created)\n\t\t\treturn Number.isNaN(d.getTime())\n\t\t\t\t? ''\n\t\t\t\t: t('nextcloud-vue', 'Since {date}', { date: d.toLocaleDateString() })\n\t\t},\n\n\t\tremoveFollowerLabel(watcher) {\n\t\t\treturn t('nextcloud-vue', 'Remove {name} as a follower', { name: watcher.displayName || watcher.userId })\n\t\t},\n\n\t\tcanRemove(watcher) {\n\t\t\treturn this.canManage || (this.me !== '' && watcher.userId === this.me)\n\t\t},\n\n\t\tasync toggle() {\n\t\t\tif (this.busy) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst previous = this.state\n\t\t\tthis.state = !previous\n\t\t\tif (this.count !== null) {\n\t\t\t\tthis.count = Math.max(0, this.count + (this.state ? 1 : -1))\n\t\t\t}\n\t\t\tthis.busy = true\n\t\t\tconst result = await setWatching(this.register, this.schema, this.objectId, this.state)\n\t\t\tthis.busy = false\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.state = previous\n\t\t\t\tif (this.count !== null) {\n\t\t\t\t\tthis.count = Math.max(0, this.count + (previous ? 1 : -1))\n\t\t\t\t}\n\t\t\t\tconst message = result.status === 404\n\t\t\t\t\t? t('nextcloud-vue', 'You can no longer see this record.')\n\t\t\t\t\t: (result.message || t('nextcloud-vue', 'Could not change following.'))\n\t\t\t\timport('@nextcloud/dialogs').then(({ showError }) => showError(message)).catch(() => {})\n\t\t\t\t/** @event error Emitted when a call failed; payload is the message shown. */\n\t\t\t\tthis.$emit('error', message)\n\t\t\t\tif (result.status === 404) {\n\t\t\t\t\t/** @event not-found Emitted on a 404: the record went away or access was withdrawn. */\n\t\t\t\t\tthis.$emit('not-found')\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// A new follow notifies (the server's default); an unfollow has no switch.\n\t\t\tthis.notifyState = this.state\n\t\t\tpatchStoredSelf(this.register, this.schema, this.objectId, {\n\t\t\t\twatching: this.state,\n\t\t\t\tfavourite: this.state,\n\t\t\t\twatchNotify: this.state ? true : undefined,\n\t\t\t\t...(this.count !== null ? { watcherCount: this.count } : {}),\n\t\t\t})\n\t\t\t/** @event change Emitted after a successful call. Payload: `{ watching, notify, count }`. */\n\t\t\tthis.$emit('change', { watching: this.state, notify: this.state ? this.notifyState : null, count: this.count })\n\t\t},\n\n\t\t/**\n\t\t * Turn the follow's notifications on or off, optimistically.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/one-follow-control/specs/record-follow/spec.md#requirement-one-follow-control-with-a-notifications-switch\n\t\t */\n\t\tasync toggleNotify() {\n\t\t\tif (this.busy || !this.state) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst previous = this.notifyState\n\t\t\tthis.notifyState = !previous\n\t\t\tthis.busy = true\n\t\t\tconst result = await setWatching(this.register, this.schema, this.objectId, true, { notify: this.notifyState })\n\t\t\tthis.busy = false\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.notifyState = previous\n\t\t\t\tconst message = result.status === 404\n\t\t\t\t\t? t('nextcloud-vue', 'You can no longer see this record.')\n\t\t\t\t\t: (result.message || t('nextcloud-vue', 'Could not change notifications.'))\n\t\t\t\timport('@nextcloud/dialogs').then(({ showError }) => showError(message)).catch(() => {})\n\t\t\t\tthis.$emit('error', message)\n\t\t\t\tif (result.status === 404) {\n\t\t\t\t\tthis.$emit('not-found')\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tpatchStoredSelf(this.register, this.schema, this.objectId, { watchNotify: this.notifyState })\n\t\t\tthis.$emit('change', { watching: true, notify: this.notifyState, count: this.count })\n\t\t},\n\n\t\tasync loadWatchers() {\n\t\t\tthis.popoverError = ''\n\t\t\tthis.loadingWatchers = true\n\t\t\tconst result = await listWatchers(this.register, this.schema, this.objectId)\n\t\t\tthis.loadingWatchers = false\n\t\t\tif (!result.ok) {\n\t\t\t\t// No right to see the list (403) or a failure: close without a toast.\n\t\t\t\tthis.open = false\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst data = result.data || {}\n\t\t\tthis.watchers = Array.isArray(data.results) ? data.results : []\n\t\t\tthis.count = Number.isFinite(data.total) ? data.total : this.watchers.length\n\t\t},\n\n\t\tasync onPickerSearch(query) {\n\t\t\tthis.pickerLoading = true\n\t\t\tconst found = await searchNextcloudUsers(query || '', { limit: 10 })\n\t\t\tconst already = new Set(this.watchers.map((w) => w.userId))\n\t\t\tthis.pickerOptions = found.filter((u) => !already.has(u.id)).map((u) => ({ ...u, label: u.label || u.displayName || u.id }))\n\t\t\tthis.pickerLoading = false\n\t\t},\n\n\t\tasync addWatcher(option) {\n\t\t\tif (!option || !option.id) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.popoverError = ''\n\t\t\tconst result = await setWatcher(this.register, this.schema, this.objectId, option.id, true)\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.popoverError = result.message || t('nextcloud-vue', 'Could not add this colleague.')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tawait this.loadWatchers()\n\t\t},\n\n\t\tasync removeWatcher(watcher) {\n\t\t\tthis.popoverError = ''\n\t\t\tconst result = await setWatcher(this.register, this.schema, this.objectId, watcher.userId, false)\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.popoverError = result.message || t('nextcloud-vue', 'Could not remove this follower.')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (watcher.userId === this.me) {\n\t\t\t\tthis.state = false\n\t\t\t\tthis.$emit('change', { watching: false, count: this.count })\n\t\t\t}\n\t\t\tawait this.loadWatchers()\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-follow-toggle {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 4px;\n}\n\n.cn-follow-toggle__on {\n\tcolor: var(--color-primary-element);\n}\n\n.cn-follow-toggle__popover {\n\tmin-width: 260px;\n\tpadding: 12px;\n}\n\n.cn-follow-toggle__list {\n\tlist-style: none;\n\tmargin: 0 0 8px;\n\tpadding: 0;\n}\n\n.cn-follow-toggle__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 4px 0;\n}\n\n.cn-follow-toggle__who {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1 1 auto;\n\tmin-width: 0;\n}\n\n.cn-follow-toggle__since {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: var(--font-size-small, 13px);\n}\n\n.cn-follow-toggle__error {\n\tmargin: 8px 0 0;\n\tcolor: var(--color-error-text);\n}\n</style>\n"],"names":["_normalizeClass","_createVNode","_createBlock","_createElementBlock","_Fragment","_createElementVNode","_openBlock","_renderList","_toDisplayString"],"mappings":";;;AAuDQ,EAAA,KAAK,EAAC,2BAAuB;AAAA,EAAA,aAAA,EAAA,0BAAA;;;;AAEtB,EAAA,KAAC,EAAA,wBAAA;;AAMJ,MAAA,UAAA,GAAA,EAAA,KAAE,EAAA,uBAAA,GAAA;AACD,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAY,GAAA;;;AACP,EAAA,KAAA,EAA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EAAA;+BADM,CAAA,mBAAA,EAAA;AART,sBAAA,UAAU,EAAE,QAAK,CAAA,iBAAA;AACjB,sBAAA,UAAU,EAAC,IAAA;AACX,sBAAA,OAAO,EAAE,KAAa,CAAA,aAAA;AACtB,sBAAA,OAAO,EAAE,KAAa,CAAA,aAAA;AACtB,sBAAA,UAAU,EAAE,KAAK;AAClB,sBAAA,KAAG,EAAA,OAAA;mCACQ,EAAC,yBAAO;AAClB,sBAAA,QAAM,EAAE,QAAc,CAAA,cAAA;AACtB,sBAAA,qBAAS,EAAA,QAAA,CAAA,UAAA;;;;eAEH,KAAS,CAAA,YAAA;gCAAjBE,wBAAA,4BAIE,KAAA,CAAA,YAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnFollowToggle.vue3.js","sources":["../../../../src/components/CnFollowToggle/CnFollowToggle.vue?vue&type=template&id=8bff02a6&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<span class=\"cn-follow-toggle\"\n\t\t:class=\"{ 'cn-follow-toggle--compact': compact }\"\n\t\tdata-testid=\"cn-follow-toggle\">\n\t\t<NcButton\n\t\t\t:variant=\"state && !compact ? 'secondary' : 'tertiary'\"\n\t\t\t:aria-pressed=\"state ? 'true' : 'false'\"\n\t\t\t:aria-label=\"compact ? (state ? followingLabel : followLabel) : undefined\"\n\t\t\t:title=\"tooltip\"\n\t\t\t:disabled=\"busy\"\n\t\t\tdata-testid=\"cn-follow-toggle-button\"\n\t\t\t@click.stop=\"toggle\">\n\t\t\t<template #icon>\n\t\t\t\t<Eye v-if=\"state\" :size=\"20\" class=\"cn-follow-toggle__on\" />\n\t\t\t\t<EyeOutline v-else :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"!compact\">\n\t\t\t\t{{ state ? followingLabel : followLabel }}\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\tv-if=\"showNotifySwitch\"\n\t\t\tvariant=\"tertiary\"\n\t\t\t:aria-pressed=\"notifyState ? 'true' : 'false'\"\n\t\t\t:aria-label=\"notifyLabel\"\n\t\t\t:title=\"notifyLabel\"\n\t\t\t:disabled=\"busy\"\n\t\t\tdata-testid=\"cn-follow-toggle-notify\"\n\t\t\t@click.stop=\"toggleNotify\">\n\t\t\t<template #icon>\n\t\t\t\t<Bell v-if=\"notifyState\" :size=\"20\" />\n\t\t\t\t<BellOffOutline v-else :size=\"20\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcPopover\n\t\t\tv-if=\"count !== null && !compact\"\n\t\t\tv-model:shown=\"open\"\n\t\t\tplacement=\"bottom-start\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tclass=\"cn-follow-toggle__count\"\n\t\t\t\t\t:aria-label=\"followersLabel\"\n\t\t\t\t\tdata-testid=\"cn-follow-toggle-count\">\n\t\t\t\t\t{{ count }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t\t<div class=\"cn-follow-toggle__popover\" data-testid=\"cn-follow-toggle-popover\">\n\t\t\t\t<NcLoadingIcon v-if=\"loadingWatchers\" :size=\"20\" :name=\"loadingLabel\" />\n\t\t\t\t<ul v-else class=\"cn-follow-toggle__list\">\n\t\t\t\t\t<li v-for=\"watcher in watchers\" :key=\"watcher.userId\" class=\"cn-follow-toggle__row\">\n\t\t\t\t\t\t<NcAvatar :user=\"watcher.userId\"\n\t\t\t\t\t\t\t:displayName=\"watcher.displayName || watcher.userId\"\n\t\t\t\t\t\t\t:size=\"28\"\n\t\t\t\t\t\t\thideStatus />\n\t\t\t\t\t\t<span class=\"cn-follow-toggle__who\">\n\t\t\t\t\t\t\t<span class=\"cn-follow-toggle__name\">{{ watcher.displayName || watcher.userId }}</span>\n\t\t\t\t\t\t\t<span v-if=\"watcher.created\" class=\"cn-follow-toggle__since\">{{ sinceText(watcher.created) }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\tv-if=\"canRemove(watcher)\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"removeFollowerLabel(watcher)\"\n\t\t\t\t\t\t\t:title=\"removeFollowerLabel(watcher)\"\n\t\t\t\t\t\t\tdata-testid=\"cn-follow-toggle-remove\"\n\t\t\t\t\t\t\t@click=\"removeWatcher(watcher)\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Close :size=\"16\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<div v-if=\"canManage\" class=\"cn-follow-toggle__picker\">\n\t\t\t\t\t<NcSelect\n\t\t\t\t\t\t:inputLabel=\"addColleagueLabel\"\n\t\t\t\t\t\t:modelValue=\"null\"\n\t\t\t\t\t\t:options=\"pickerOptions\"\n\t\t\t\t\t\t:loading=\"pickerLoading\"\n\t\t\t\t\t\t:filterable=\"false\"\n\t\t\t\t\t\tlabel=\"label\"\n\t\t\t\t\t\tdata-testid=\"cn-follow-toggle-picker\"\n\t\t\t\t\t\t@search=\"onPickerSearch\"\n\t\t\t\t\t\t@update:modelValue=\"addWatcher\" />\n\t\t\t\t</div>\n\t\t\t\t<p v-if=\"popoverError\"\n\t\t\t\t\tclass=\"cn-follow-toggle__error\"\n\t\t\t\t\trole=\"alert\"\n\t\t\t\t\tdata-testid=\"cn-follow-toggle-error\">\n\t\t\t\t\t{{ popoverError }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</span>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcAvatar, NcButton, NcLoadingIcon, NcPopover, NcSelect } from '@nextcloud/vue'\nimport Bell from 'vue-material-design-icons/Bell.vue'\nimport BellOffOutline from 'vue-material-design-icons/BellOffOutline.vue'\nimport Close from 'vue-material-design-icons/Close.vue'\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOutline from 'vue-material-design-icons/EyeOutline.vue'\nimport { patchStoredSelf } from '../../utils/patchStoredSelf.js'\nimport { listWatchers, setWatcher, setWatching } from '../../utils/recordInteractions.js'\nimport { searchNextcloudUsers } from '../../utils/userAutocomplete.js'\nimport { userLocale } from '../../utils/userLocale.js'\n\n/**\n * CnFollowToggle — the one Follow control of a record: a Follow toggle bound to\n * `@self.watching`, a notifications switch bound to `@self.watchNotify`, the\n * follower count and a followers popover for users who may see them.\n *\n * Following and favourites are one feature (OpenRegister's\n * `merge-follow-and-favourites`): a favourite is a follow with notifications\n * off, so there is no separate star. While the user follows, a bell beside the\n * toggle turns the follow's notifications on or off (`PUT .../watch` with\n * `{\"notify\": bool}`). With `notifies` false (the register sends no change\n * notifications) the bell is not offered. `compact` renders the toggle as an\n * icon only, without the bell, count or popover, for a column in a list.\n *\n * A click flips the toggle at once and sends `PUT` or `DELETE .../watch`; on\n * failure it flips back and shows the server's message, and a 404 says the\n * user can no longer see the record and emits `not-found`. The count shows\n * only when `watcherCount` is given (OpenRegister sets `@self.watcherCount` for\n * a reader with `update` only); opening the popover then fetches\n * `GET .../watchers`, never before, and a 403 closes it quietly. With\n * `canManage` (`@self.can.manage`) the popover offers an \"Add a colleague\"\n * picker and a remove action on each follower; without it, only the user's own\n * row can be removed.\n *\n * Example:\n * ```vue\n * <CnFollowToggle register=\"pipelinq\" schema=\"ticket\" :object-id=\"id\"\n * :watching=\"self.watching\" :notify=\"self.watchNotify\"\n * :watcher-count=\"self.watcherCount\" :can-manage=\"self.can && self.can.manage\" />\n * ```\n */\nexport default {\n\tname: 'CnFollowToggle',\n\n\tcomponents: { Bell, BellOffOutline, Close, Eye, EyeOutline, NcAvatar, NcButton, NcLoadingIcon, NcPopover, NcSelect },\n\n\tprops: {\n\t\t/** Register slug of the record. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Schema slug of the record. */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Id of the record. */\n\t\tobjectId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Whether the current user follows the record (`@self.watching`). */\n\t\twatching: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Whether the user's follow notifies them (`@self.watchNotify`). Null\n\t\t * (an older server, or not following) reads as on.\n\t\t */\n\t\tnotify: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Icon only, without the bell, count or popover: for a column in a list. */\n\t\tcompact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Number of followers (`@self.watcherCount`). Null hides the count and the popover. */\n\t\twatcherCount: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Whether the user may add and remove other followers (`@self.can.manage`). */\n\t\tcanManage: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Whether following sends change notifications. False changes the tooltip to say it does not. */\n\t\tnotifies: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** User id of the current user. Defaults to Nextcloud's `OC.currentUser`. */\n\t\tcurrentUser: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['change', 'error', 'not-found'],\n\n\tdata() {\n\t\treturn {\n\t\t\tstate: this.watching,\n\t\t\tnotifyState: this.notify !== false,\n\t\t\tcount: this.watcherCount,\n\t\t\tbusy: false,\n\t\t\topen: false,\n\t\t\twatchers: [],\n\t\t\tloadingWatchers: false,\n\t\t\tpopoverError: '',\n\t\t\tpickerOptions: [],\n\t\t\tpickerLoading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tfollowLabel() {\n\t\t\treturn t('nextcloud-vue', 'Follow')\n\t\t},\n\n\t\tfollowingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Following')\n\t\t},\n\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading …')\n\t\t},\n\n\t\taddColleagueLabel() {\n\t\t\treturn t('nextcloud-vue', 'Add a colleague')\n\t\t},\n\n\t\tnotifyLabel() {\n\t\t\treturn this.notifyState\n\t\t\t\t? t('nextcloud-vue', 'Turn notifications off')\n\t\t\t\t: t('nextcloud-vue', 'Turn notifications on')\n\t\t},\n\n\t\t/**\n\t\t * Whether the bell renders: following, not compact, and the register notifies.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tshowNotifySwitch() {\n\t\t\treturn this.state && !this.compact && this.notifies\n\t\t},\n\n\t\tfollowersLabel() {\n\t\t\treturn t('nextcloud-vue', '{count} followers', { count: this.count })\n\t\t},\n\n\t\ttooltip() {\n\t\t\treturn this.notifies\n\t\t\t\t? t('nextcloud-vue', 'Follow this record to get its updates')\n\t\t\t\t: t('nextcloud-vue', 'You will see it under Following. This register sends no change notifications.')\n\t\t},\n\n\t\tme() {\n\t\t\treturn this.currentUser || (typeof OC !== 'undefined' && OC ? OC.currentUser : '') || ''\n\t\t},\n\t},\n\n\twatch: {\n\t\twatching(value) {\n\t\t\tthis.state = value\n\t\t},\n\n\t\tnotify(value) {\n\t\t\tthis.notifyState = value !== false\n\t\t},\n\n\t\twatcherCount(value) {\n\t\t\tthis.count = value\n\t\t},\n\n\t\topen(value) {\n\t\t\tif (value) {\n\t\t\t\tthis.loadWatchers()\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\tsinceText(created) {\n\t\t\tconst d = new Date(created)\n\t\t\treturn Number.isNaN(d.getTime())\n\t\t\t\t? ''\n\t\t\t\t: t('nextcloud-vue', 'Since {date}', { date: d.toLocaleDateString(userLocale()) })\n\t\t},\n\n\t\tremoveFollowerLabel(watcher) {\n\t\t\treturn t('nextcloud-vue', 'Remove {name} as a follower', { name: watcher.displayName || watcher.userId })\n\t\t},\n\n\t\tcanRemove(watcher) {\n\t\t\treturn this.canManage || (this.me !== '' && watcher.userId === this.me)\n\t\t},\n\n\t\tasync toggle() {\n\t\t\tif (this.busy) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst previous = this.state\n\t\t\tthis.state = !previous\n\t\t\tif (this.count !== null) {\n\t\t\t\tthis.count = Math.max(0, this.count + (this.state ? 1 : -1))\n\t\t\t}\n\t\t\tthis.busy = true\n\t\t\tconst result = await setWatching(this.register, this.schema, this.objectId, this.state)\n\t\t\tthis.busy = false\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.state = previous\n\t\t\t\tif (this.count !== null) {\n\t\t\t\t\tthis.count = Math.max(0, this.count + (previous ? 1 : -1))\n\t\t\t\t}\n\t\t\t\tconst message = result.status === 404\n\t\t\t\t\t? t('nextcloud-vue', 'You can no longer see this record.')\n\t\t\t\t\t: (result.message || t('nextcloud-vue', 'Could not change following.'))\n\t\t\t\timport('@nextcloud/dialogs').then(({ showError }) => showError(message)).catch(() => {})\n\t\t\t\t/** @event error Emitted when a call failed; payload is the message shown. */\n\t\t\t\tthis.$emit('error', message)\n\t\t\t\tif (result.status === 404) {\n\t\t\t\t\t/** @event not-found Emitted on a 404: the record went away or access was withdrawn. */\n\t\t\t\t\tthis.$emit('not-found')\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// A new follow notifies (the server's default); an unfollow has no switch.\n\t\t\tthis.notifyState = this.state\n\t\t\tpatchStoredSelf(this.register, this.schema, this.objectId, {\n\t\t\t\twatching: this.state,\n\t\t\t\tfavourite: this.state,\n\t\t\t\twatchNotify: this.state ? true : undefined,\n\t\t\t\t...(this.count !== null ? { watcherCount: this.count } : {}),\n\t\t\t})\n\t\t\t/** @event change Emitted after a successful call. Payload: `{ watching, notify, count }`. */\n\t\t\tthis.$emit('change', { watching: this.state, notify: this.state ? this.notifyState : null, count: this.count })\n\t\t},\n\n\t\t/**\n\t\t * Turn the follow's notifications on or off, optimistically.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/one-follow-control/specs/record-follow/spec.md#requirement-one-follow-control-with-a-notifications-switch\n\t\t */\n\t\tasync toggleNotify() {\n\t\t\tif (this.busy || !this.state) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst previous = this.notifyState\n\t\t\tthis.notifyState = !previous\n\t\t\tthis.busy = true\n\t\t\tconst result = await setWatching(this.register, this.schema, this.objectId, true, { notify: this.notifyState })\n\t\t\tthis.busy = false\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.notifyState = previous\n\t\t\t\tconst message = result.status === 404\n\t\t\t\t\t? t('nextcloud-vue', 'You can no longer see this record.')\n\t\t\t\t\t: (result.message || t('nextcloud-vue', 'Could not change notifications.'))\n\t\t\t\timport('@nextcloud/dialogs').then(({ showError }) => showError(message)).catch(() => {})\n\t\t\t\tthis.$emit('error', message)\n\t\t\t\tif (result.status === 404) {\n\t\t\t\t\tthis.$emit('not-found')\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tpatchStoredSelf(this.register, this.schema, this.objectId, { watchNotify: this.notifyState })\n\t\t\tthis.$emit('change', { watching: true, notify: this.notifyState, count: this.count })\n\t\t},\n\n\t\tasync loadWatchers() {\n\t\t\tthis.popoverError = ''\n\t\t\tthis.loadingWatchers = true\n\t\t\tconst result = await listWatchers(this.register, this.schema, this.objectId)\n\t\t\tthis.loadingWatchers = false\n\t\t\tif (!result.ok) {\n\t\t\t\t// No right to see the list (403) or a failure: close without a toast.\n\t\t\t\tthis.open = false\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst data = result.data || {}\n\t\t\tthis.watchers = Array.isArray(data.results) ? data.results : []\n\t\t\tthis.count = Number.isFinite(data.total) ? data.total : this.watchers.length\n\t\t},\n\n\t\tasync onPickerSearch(query) {\n\t\t\tthis.pickerLoading = true\n\t\t\tconst found = await searchNextcloudUsers(query || '', { limit: 10 })\n\t\t\tconst already = new Set(this.watchers.map((w) => w.userId))\n\t\t\tthis.pickerOptions = found.filter((u) => !already.has(u.id)).map((u) => ({ ...u, label: u.label || u.displayName || u.id }))\n\t\t\tthis.pickerLoading = false\n\t\t},\n\n\t\tasync addWatcher(option) {\n\t\t\tif (!option || !option.id) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.popoverError = ''\n\t\t\tconst result = await setWatcher(this.register, this.schema, this.objectId, option.id, true)\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.popoverError = result.message || t('nextcloud-vue', 'Could not add this colleague.')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tawait this.loadWatchers()\n\t\t},\n\n\t\tasync removeWatcher(watcher) {\n\t\t\tthis.popoverError = ''\n\t\t\tconst result = await setWatcher(this.register, this.schema, this.objectId, watcher.userId, false)\n\t\t\tif (!result.ok) {\n\t\t\t\tthis.popoverError = result.message || t('nextcloud-vue', 'Could not remove this follower.')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (watcher.userId === this.me) {\n\t\t\t\tthis.state = false\n\t\t\t\tthis.$emit('change', { watching: false, count: this.count })\n\t\t\t}\n\t\t\tawait this.loadWatchers()\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-follow-toggle {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 4px;\n}\n\n.cn-follow-toggle__on {\n\tcolor: var(--color-primary-element);\n}\n\n.cn-follow-toggle__popover {\n\tmin-width: 260px;\n\tpadding: 12px;\n}\n\n.cn-follow-toggle__list {\n\tlist-style: none;\n\tmargin: 0 0 8px;\n\tpadding: 0;\n}\n\n.cn-follow-toggle__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 4px 0;\n}\n\n.cn-follow-toggle__who {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1 1 auto;\n\tmin-width: 0;\n}\n\n.cn-follow-toggle__since {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: var(--font-size-small, 13px);\n}\n\n.cn-follow-toggle__error {\n\tmargin: 8px 0 0;\n\tcolor: var(--color-error-text);\n}\n</style>\n"],"names":["_normalizeClass","_createVNode","_createBlock","_createElementBlock","_Fragment","_createElementVNode","_openBlock","_renderList","_toDisplayString"],"mappings":";;;AAuDQ,EAAA,KAAK,EAAC,2BAAuB;AAAA,EAAA,aAAA,EAAA,0BAAA;;;;AAEtB,EAAA,KAAC,EAAA,wBAAA;;AAMJ,MAAA,UAAA,GAAA,EAAA,KAAE,EAAA,uBAAA,GAAA;AACD,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAY,GAAA;;;AACP,EAAA,KAAA,EAAA,yBAAA;;;;AAeE,EAAA,KAAG,EAAA,0BAAA;;;;AAaxB,EAAA,KAAE,EAAA,yBAAA;AACF,EAAA,IAAG,EAAA,OAAA;AACH,EAAA,aAAQ,EAAA,wBAAA;;;;;;;;;;;;;;;;IAtFN,KAAK,EAAAA,cAAA,CAAA,CAAC,kBAAkB,EAAA,EAAA,2BAAA,EACU,MAAC,CAAA,OAAA,EAAA,CAAA,CAAA;AACvC,IAAA,aAAU,EAAC,kBAAiB;;IAC5BC,WAeU,CAAA,mBAAA,EAAA;MAdT,OAAO,EAAE,KAAK,CAAA,KAAA,IAAA,CAAA,MAAA,CAAA,OAAA,GAAA,WAAA,GAAA,UAAA;AACd,MAAA,cAAY,EAAE,KAAK,CAAA,KAAA,GAAA,MAAA,GAAA,OAAA;MACnB,YAAU,EAAE,cAAO,IAAA,KAAA,CAAA,KAAA,GAAA,QAAA,CAAA,cAAA,GAAA,QAAA,CAAA,WAAA,IAAA,SAAA;AACnB,MAAA,KAAK,EAAE,QAAO,CAAA,OAAA;AACd,MAAA,QAAQ,EAAE,KAAI,CAAA,IAAA;mBACJ,EAAE,yBAAmB;AAC/B,MAAA,OAAK,gBAAI,QAAA,CAAA,MAAA,EAAA,CAAA,MAAA,CAAA,CAAA;;AACC,MAAA,IAAI,UACd,MAAyC;SAA9B,KAAK,CAA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