@nextcloud/vue 8.0.0-beta.6 → 8.0.0-beta.7

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 (253) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/Components/NcActionButton.cjs +1 -1
  3. package/dist/Components/NcActionButton.mjs +1 -1
  4. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  5. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  6. package/dist/Components/NcActionCaption.cjs +1 -1
  7. package/dist/Components/NcActionCaption.mjs +1 -1
  8. package/dist/Components/NcActionCheckbox.cjs +1 -1
  9. package/dist/Components/NcActionCheckbox.mjs +1 -1
  10. package/dist/Components/NcActionInput.cjs +1 -1
  11. package/dist/Components/NcActionInput.mjs +5 -5
  12. package/dist/Components/NcActionLink.cjs +1 -1
  13. package/dist/Components/NcActionLink.mjs +1 -1
  14. package/dist/Components/NcActionRadio.cjs +1 -1
  15. package/dist/Components/NcActionRadio.mjs +1 -1
  16. package/dist/Components/NcActionRouter.cjs +1 -1
  17. package/dist/Components/NcActionRouter.mjs +1 -1
  18. package/dist/Components/NcActionSeparator.cjs +1 -1
  19. package/dist/Components/NcActionSeparator.mjs +1 -1
  20. package/dist/Components/NcActionText.cjs +1 -1
  21. package/dist/Components/NcActionText.mjs +1 -1
  22. package/dist/Components/NcActionTextEditable.cjs +1 -1
  23. package/dist/Components/NcActionTextEditable.mjs +1 -1
  24. package/dist/Components/NcActions.cjs +1 -1
  25. package/dist/Components/NcActions.mjs +1 -1
  26. package/dist/Components/NcAppContent.cjs +1 -1
  27. package/dist/Components/NcAppContent.mjs +1 -1
  28. package/dist/Components/NcAppNavigation.cjs +1 -1
  29. package/dist/Components/NcAppNavigation.mjs +11 -11
  30. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  31. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  32. package/dist/Components/NcAppNavigationIconBullet.cjs +1 -1
  33. package/dist/Components/NcAppNavigationIconBullet.mjs +1 -1
  34. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  35. package/dist/Components/NcAppNavigationItem.mjs +2 -2
  36. package/dist/Components/NcAppNavigationNew.cjs +1 -1
  37. package/dist/Components/NcAppNavigationNew.mjs +1 -1
  38. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  39. package/dist/Components/NcAppNavigationNewItem.mjs +2 -2
  40. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  41. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  42. package/dist/Components/NcAppNavigationSpacer.cjs +1 -1
  43. package/dist/Components/NcAppNavigationSpacer.mjs +1 -1
  44. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  45. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  46. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  47. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  48. package/dist/Components/NcAppSettingsSection.cjs +1 -1
  49. package/dist/Components/NcAppSettingsSection.mjs +1 -1
  50. package/dist/Components/NcAppSidebar.cjs +1 -1
  51. package/dist/Components/NcAppSidebar.mjs +1 -1
  52. package/dist/Components/NcAppSidebarTab.cjs +1 -1
  53. package/dist/Components/NcAppSidebarTab.mjs +1 -1
  54. package/dist/Components/NcAvatar.cjs +1 -1
  55. package/dist/Components/NcAvatar.mjs +1 -1
  56. package/dist/Components/NcBreadcrumb.cjs +1 -1
  57. package/dist/Components/NcBreadcrumb.mjs +1 -1
  58. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  59. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  60. package/dist/Components/NcButton.cjs +1 -1
  61. package/dist/Components/NcButton.mjs +1 -1
  62. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  63. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  64. package/dist/Components/NcColorPicker.cjs +1 -1
  65. package/dist/Components/NcColorPicker.mjs +1 -1
  66. package/dist/Components/NcContent.cjs +1 -1
  67. package/dist/Components/NcContent.mjs +1 -1
  68. package/dist/Components/NcCounterBubble.cjs +1 -1
  69. package/dist/Components/NcCounterBubble.mjs +1 -1
  70. package/dist/Components/NcDashboardWidget.cjs +1 -1
  71. package/dist/Components/NcDashboardWidget.mjs +2 -2
  72. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  73. package/dist/Components/NcDashboardWidgetItem.mjs +2 -2
  74. package/dist/Components/{NcDatetime.cjs → NcDateTime.cjs} +1 -1
  75. package/dist/Components/{NcDatetime.cjs.map → NcDateTime.cjs.map} +1 -1
  76. package/dist/Components/{NcDatetime.mjs → NcDateTime.mjs} +3 -3
  77. package/dist/Components/{NcDatetime.mjs.map → NcDateTime.mjs.map} +1 -1
  78. package/dist/Components/NcDateTimePicker.cjs +1 -0
  79. package/dist/Components/NcDateTimePicker.cjs.map +1 -0
  80. package/dist/Components/{NcDatetimePicker.mjs → NcDateTimePicker.mjs} +4 -4
  81. package/dist/Components/NcDateTimePicker.mjs.map +1 -0
  82. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  83. package/dist/Components/NcDateTimePickerNative.mjs +2 -2
  84. package/dist/Components/NcEllipsisedOption.cjs +1 -1
  85. package/dist/Components/NcEllipsisedOption.mjs +1 -1
  86. package/dist/Components/NcEmojiPicker.cjs +1 -1
  87. package/dist/Components/NcEmojiPicker.mjs +3 -3
  88. package/dist/Components/NcEmptyContent.cjs +1 -1
  89. package/dist/Components/NcEmptyContent.mjs +1 -1
  90. package/dist/Components/NcGuestContent.cjs +1 -1
  91. package/dist/Components/NcGuestContent.mjs +1 -1
  92. package/dist/Components/NcHeaderMenu.cjs +1 -1
  93. package/dist/Components/NcHeaderMenu.mjs +1 -1
  94. package/dist/Components/NcIconSvgWrapper.cjs +1 -1
  95. package/dist/Components/NcIconSvgWrapper.mjs +9 -12
  96. package/dist/Components/NcIconSvgWrapper.mjs.map +1 -1
  97. package/dist/Components/NcInputField.cjs +1 -1
  98. package/dist/Components/NcInputField.mjs +1 -1
  99. package/dist/Components/NcListItem.cjs +1 -1
  100. package/dist/Components/NcListItem.mjs +1 -1
  101. package/dist/Components/NcListItemIcon.cjs +1 -1
  102. package/dist/Components/NcListItemIcon.mjs +2 -2
  103. package/dist/Components/NcLoadingIcon.cjs +1 -1
  104. package/dist/Components/NcLoadingIcon.mjs +1 -1
  105. package/dist/Components/NcModal.cjs +1 -1
  106. package/dist/Components/NcModal.mjs +2 -2
  107. package/dist/Components/NcNoteCard.cjs +1 -1
  108. package/dist/Components/NcNoteCard.mjs +1 -1
  109. package/dist/Components/NcPopover.cjs +1 -1
  110. package/dist/Components/NcPopover.mjs +1 -1
  111. package/dist/Components/NcProgressBar.cjs +1 -1
  112. package/dist/Components/NcProgressBar.mjs +1 -1
  113. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  114. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  115. package/dist/Components/NcRichContenteditable.cjs +1 -1
  116. package/dist/Components/NcRichContenteditable.mjs +4 -4
  117. package/dist/Components/NcRichText.cjs +1 -1
  118. package/dist/Components/NcRichText.mjs +3 -3
  119. package/dist/Components/NcSelect.cjs +1 -1
  120. package/dist/Components/NcSelect.mjs +1 -1
  121. package/dist/Components/NcSettingsInputText.cjs +1 -1
  122. package/dist/Components/NcSettingsInputText.mjs +1 -1
  123. package/dist/Components/NcSettingsSection.cjs +1 -1
  124. package/dist/Components/NcSettingsSection.mjs +1 -1
  125. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  126. package/dist/Components/NcSettingsSelectGroup.cjs.map +1 -1
  127. package/dist/Components/NcSettingsSelectGroup.mjs +3 -53
  128. package/dist/Components/NcSettingsSelectGroup.mjs.map +1 -1
  129. package/dist/Components/NcUserBubble.cjs +1 -1
  130. package/dist/Components/NcUserBubble.mjs +2 -2
  131. package/dist/Directives/Tooltip.cjs +1 -1
  132. package/dist/Directives/Tooltip.mjs +1 -1
  133. package/dist/Mixins/richEditor.cjs +1 -1
  134. package/dist/Mixins/richEditor.mjs +1 -1
  135. package/dist/assets/NcSettingsSelectGroup-e88cbf1a.css +21 -0
  136. package/dist/assets/{index8.css → index-66b19339.css} +1 -1
  137. package/dist/assets/{index36.css → index-7f55fed2.css} +1 -1
  138. package/dist/assets/index-82b5969a.css +21 -0
  139. package/dist/assets/{index37.css → index-a999ba9f.css} +1 -1
  140. package/dist/assets/index-ef0bca81.css +42 -0
  141. package/dist/chunks/NcAppNavigationToggle-5f3b9b9a.cjs +1 -0
  142. package/dist/chunks/NcAppNavigationToggle-5f3b9b9a.cjs.map +1 -0
  143. package/dist/chunks/{NcAppNavigationToggle-5aa396d7.mjs → NcAppNavigationToggle-86cc2542.mjs} +1 -1
  144. package/dist/chunks/NcAppNavigationToggle-86cc2542.mjs.map +1 -0
  145. package/dist/chunks/{NcInputConfirmCancel-c440e1b1.mjs → NcInputConfirmCancel-0cd93e0e.mjs} +1 -1
  146. package/dist/chunks/NcInputConfirmCancel-0cd93e0e.mjs.map +1 -0
  147. package/dist/chunks/NcInputConfirmCancel-17c8ddfb.cjs +1 -0
  148. package/dist/chunks/NcInputConfirmCancel-17c8ddfb.cjs.map +1 -0
  149. package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_357e6d0e_lang-072bbb05.cjs.map +1 -0
  150. package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_357e6d0e_lang-55016398.mjs.map +1 -0
  151. package/dist/chunks/{NcRichText-1e8854a1.cjs → NcRichText-3c54a3cc.cjs} +1 -1
  152. package/dist/chunks/{NcRichText-1e8854a1.cjs.map → NcRichText-3c54a3cc.cjs.map} +1 -1
  153. package/dist/chunks/{NcRichText-13b09624.mjs → NcRichText-bb9d3893.mjs} +1 -1
  154. package/dist/chunks/{NcRichText-13b09624.mjs.map → NcRichText-bb9d3893.mjs.map} +1 -1
  155. package/dist/chunks/NcSettingsSelectGroup-0be1fe91.mjs +58 -0
  156. package/dist/chunks/NcSettingsSelectGroup-0be1fe91.mjs.map +1 -0
  157. package/dist/chunks/NcSettingsSelectGroup-62ca94a9.cjs +1 -0
  158. package/dist/chunks/NcSettingsSelectGroup-62ca94a9.cjs.map +1 -0
  159. package/dist/chunks/{ScopeComponent-dbcd0e07.mjs → ScopeComponent-1f3a7612.mjs} +1 -1
  160. package/dist/chunks/{ScopeComponent-dbcd0e07.mjs.map → ScopeComponent-1f3a7612.mjs.map} +1 -1
  161. package/dist/chunks/{ScopeComponent-f6122f5a.cjs → ScopeComponent-4b8bd1ee.cjs} +1 -1
  162. package/dist/chunks/{ScopeComponent-f6122f5a.cjs.map → ScopeComponent-4b8bd1ee.cjs.map} +1 -1
  163. package/dist/chunks/{index-7aa3fc24.mjs → index-197226c7.mjs} +1 -1
  164. package/dist/chunks/{index-7aa3fc24.mjs.map → index-197226c7.mjs.map} +1 -1
  165. package/dist/chunks/{index-9c621303.mjs.map → index-377488aa.mjs.map} +1 -1
  166. package/dist/chunks/{index-c4cd0463.cjs.map → index-858938bd.cjs.map} +1 -1
  167. package/dist/chunks/index-cebd6e80.cjs +1 -0
  168. package/dist/chunks/index-cebd6e80.cjs.map +1 -0
  169. package/dist/chunks/referencePickerModal-6120a321.cjs +1 -0
  170. package/dist/chunks/referencePickerModal-6120a321.cjs.map +1 -0
  171. package/dist/chunks/{referencePickerModal-2b16b319.mjs → referencePickerModal-d0573462.mjs} +1 -1
  172. package/dist/chunks/{referencePickerModal-2b16b319.mjs.map → referencePickerModal-d0573462.mjs.map} +1 -1
  173. package/dist/index.cjs +1 -1
  174. package/dist/index.cjs.map +1 -1
  175. package/dist/index.mjs +69 -65
  176. package/dist/index.mjs.map +1 -1
  177. package/package.json +7 -7
  178. package/dist/Components/NcDatetimePicker.cjs +0 -1
  179. package/dist/Components/NcDatetimePicker.cjs.map +0 -1
  180. package/dist/Components/NcDatetimePicker.mjs.map +0 -1
  181. package/dist/assets/index12.css +0 -21
  182. package/dist/assets/index58.css +0 -42
  183. package/dist/chunks/NcAppNavigationToggle-5aa396d7.mjs.map +0 -1
  184. package/dist/chunks/NcAppNavigationToggle-c566f66e.cjs +0 -1
  185. package/dist/chunks/NcAppNavigationToggle-c566f66e.cjs.map +0 -1
  186. package/dist/chunks/NcInputConfirmCancel-77c2b04f.cjs +0 -1
  187. package/dist/chunks/NcInputConfirmCancel-77c2b04f.cjs.map +0 -1
  188. package/dist/chunks/NcInputConfirmCancel-c440e1b1.mjs.map +0 -1
  189. package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_357e6d0e_lang-b35c2f97.cjs.map +0 -1
  190. package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_357e6d0e_lang-b99cdc21.mjs.map +0 -1
  191. package/dist/chunks/index-12fa9b26.cjs +0 -1
  192. package/dist/chunks/index-12fa9b26.cjs.map +0 -1
  193. package/dist/chunks/referencePickerModal-44160fb3.cjs +0 -1
  194. package/dist/chunks/referencePickerModal-44160fb3.cjs.map +0 -1
  195. /package/dist/assets/{NcAppNavigationToggle.css → NcAppNavigationToggle-110970cd.css} +0 -0
  196. /package/dist/assets/{NcInputConfirmCancel.css → NcInputConfirmCancel-c1d05dd9.css} +0 -0
  197. /package/dist/assets/{NcMentionBubble.css → NcMentionBubble-67378a12.css} +0 -0
  198. /package/dist/assets/{index3.css → index-19f059f6.css} +0 -0
  199. /package/dist/assets/{index9.css → index-1d28ce70.css} +0 -0
  200. /package/dist/assets/{index29.css → index-23405a74.css} +0 -0
  201. /package/dist/assets/{index49.css → index-25b448e3.css} +0 -0
  202. /package/dist/assets/{index33.css → index-29421a2e.css} +0 -0
  203. /package/dist/assets/{index15.css → index-2cedaf24.css} +0 -0
  204. /package/dist/assets/{index53.css → index-30d74459.css} +0 -0
  205. /package/dist/assets/{index52.css → index-317f55be.css} +0 -0
  206. /package/dist/assets/{index7.css → index-34f6bb3f.css} +0 -0
  207. /package/dist/assets/{index38.css → index-37970f20.css} +0 -0
  208. /package/dist/assets/{index44.css → index-3aba62de.css} +0 -0
  209. /package/dist/assets/{index47.css → index-3b76db9b.css} +0 -0
  210. /package/dist/assets/{index28.css → index-3e8ea1d6.css} +0 -0
  211. /package/dist/assets/{index30.css → index-47fab7bf.css} +0 -0
  212. /package/dist/assets/{index16.css → index-49a0d570.css} +0 -0
  213. /package/dist/assets/{index51.css → index-4a4c1700.css} +0 -0
  214. /package/dist/assets/{index6.css → index-4a4c2637.css} +0 -0
  215. /package/dist/assets/{index27.css → index-4efbac36.css} +0 -0
  216. /package/dist/assets/{index57.css → index-6140ff62.css} +0 -0
  217. /package/dist/assets/{index41.css → index-6cb0dc4a.css} +0 -0
  218. /package/dist/assets/{index50.css → index-6f63d18f.css} +0 -0
  219. /package/dist/assets/{index18.css → index-76287c8f.css} +0 -0
  220. /package/dist/assets/{index13.css → index-7a7195d0.css} +0 -0
  221. /package/dist/assets/{index25.css → index-7e084b52.css} +0 -0
  222. /package/dist/assets/{index10.css → index-7ffde264.css} +0 -0
  223. /package/dist/assets/{index39.css → index-81f5e4c8.css} +0 -0
  224. /package/dist/assets/{index48.css → index-823ec431.css} +0 -0
  225. /package/dist/assets/{index4.css → index-852d8576.css} +0 -0
  226. /package/dist/assets/{index19.css → index-8f58dd75.css} +0 -0
  227. /package/dist/assets/{index43.css → index-935fa6f9.css} +0 -0
  228. /package/dist/assets/{index34.css → index-939ba6f0.css} +0 -0
  229. /package/dist/assets/{index31.css → index-a17dfbc4.css} +0 -0
  230. /package/dist/assets/{index56.css → index-a4a40fa3.css} +0 -0
  231. /package/dist/assets/{index24.css → index-a50a8de6.css} +0 -0
  232. /package/dist/assets/{index35.css → index-a513dcd5.css} +0 -0
  233. /package/dist/assets/{index55.css → index-a8c5cf75.css} +0 -0
  234. /package/dist/assets/{index40.css → index-afc15e11.css} +0 -0
  235. /package/dist/assets/{index23.css → index-b814f5fa.css} +0 -0
  236. /package/dist/assets/{index26.css → index-ba6ad1b4.css} +0 -0
  237. /package/dist/assets/{index14.css → index-bf10e8e1.css} +0 -0
  238. /package/dist/assets/{index22.css → index-bf46edd7.css} +0 -0
  239. /package/dist/assets/{index54.css → index-c6d7f3b0.css} +0 -0
  240. /package/dist/assets/{index20.css → index-c736204a.css} +0 -0
  241. /package/dist/assets/{index46.css → index-cb18d6f3.css} +0 -0
  242. /package/dist/assets/{index42.css → index-cb76ef23.css} +0 -0
  243. /package/dist/assets/{index32.css → index-cc70a006.css} +0 -0
  244. /package/dist/assets/{index2.css → index-dd464a52.css} +0 -0
  245. /package/dist/assets/{index11.css → index-e0ceef85.css} +0 -0
  246. /package/dist/assets/{index45.css → index-ecdb616f.css} +0 -0
  247. /package/dist/assets/{index.css → index-ee410fad.css} +0 -0
  248. /package/dist/assets/{index17.css → index-f1030e54.css} +0 -0
  249. /package/dist/assets/{index21.css → index-f6ca40ca.css} +0 -0
  250. /package/dist/assets/{index5.css → index-f8466b88.css} +0 -0
  251. /package/dist/assets/{referencePickerModal.css → referencePickerModal-41e4705a.css} +0 -0
  252. /package/dist/chunks/{index-9c621303.mjs → index-377488aa.mjs} +0 -0
  253. /package/dist/chunks/{index-c4cd0463.cjs → index-858938bd.cjs} +0 -0
@@ -1 +1 @@
1
- var o=require("../assets/index24.css");const a=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const e={name:"NcAppNavigationSpacer"};var r=function(){var n=this,t=n._self._c;return t("li",{staticClass:"app-navigation-spacer"})},s=[],c=a.normalizeComponent(e,r,s,!1,null,"c8233ec5",null,null);const i=c.exports;module.exports=i;
1
+ var o=require("../assets/index-a50a8de6.css");const a=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const e={name:"NcAppNavigationSpacer"};var r=function(){var n=this,t=n._self._c;return t("li",{staticClass:"app-navigation-spacer"})},s=[],c=a.normalizeComponent(e,r,s,!1,null,"c8233ec5",null,null);const i=c.exports;module.exports=i;
@@ -1,4 +1,4 @@
1
- import "../assets/index21.css";
1
+ import "../assets/index-a50a8de6.css";
2
2
  import { n } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
3
3
  const r = { name: "NcAppNavigationSpacer" };
4
4
  var c = function() {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/NcAppNavigationToggle-c566f66e.cjs");exports.NcAppNavigationSpacer=e.NcAppNavigationToggle,exports.default=e.NcAppNavigationToggle;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/NcAppNavigationToggle-5f3b9b9a.cjs");exports.NcAppNavigationSpacer=e.NcAppNavigationToggle,exports.default=e.NcAppNavigationToggle;
@@ -1,4 +1,4 @@
1
- import { N as p } from "../chunks/NcAppNavigationToggle-5aa396d7.mjs";
1
+ import { N as p } from "../chunks/NcAppNavigationToggle-86cc2542.mjs";
2
2
  export {
3
3
  p as NcAppNavigationSpacer,
4
4
  p as default
@@ -1 +1 @@
1
- var f=require("../assets/index44.css");const r=require("./NcModal.cjs"),c=require("../Mixins/isMobile.cjs"),d=require("../chunks/l10n-46d0c1c0.cjs"),p=require("debounce"),h=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const u={name:"NcAppSettingsDialog",components:{NcModal:r},mixins:[c],props:{open:{type:Boolean,required:!0},showNavigation:{type:Boolean,default:!1},container:{type:String,default:"body"},name:{type:String,default:""},additionalTrapElements:{type:Array,default:()=>[]}},emits:["update:open"],data(){return{selectedSection:"",linkClicked:!1,addedScrollListener:!1,scroller:null}},computed:{hasNavigation(){return!(this.isMobile||!this.showNavigation)},settingsNavigationAriaLabel(){return d.t("Settings navigation")}},mounted(){this.selectedSection=this.$slots.default[0].componentOptions.propsData.id},updated(){this.$refs.settingsScroller&&(this.scroller=this.$refs.settingsScroller,this.addedScrollListener||(this.scroller.addEventListener("scroll",this.handleScroll),this.addedScrollListener=!0))},methods:{getSettingsNavigation(t){const n=t.filter(e=>e.componentOptions).map(e=>{var s,a;return{id:(s=e.componentOptions.propsData)==null?void 0:s.id,name:(a=e.componentOptions.propsData)==null?void 0:a.name}}),l=t.map(e=>e.name),i=t.map(e=>e.id);return n.forEach((e,s)=>{const a=[...l],o=[...i];if(a.splice(s,1),o.splice(s,1),a.includes(e.name))throw new Error(`Duplicate section name found: ${e}. Settings navigation sections must have unique section names.`);if(o.includes(e.id))throw new Error(`Duplicate section id found: ${e}. Settings navigation sections must have unique section ids.`)}),n},handleSettingsNavigationClick(t){this.linkClicked=!0,document.getElementById("settings-section_"+t).scrollIntoView({behavior:"smooth",inline:"nearest"}),this.selectedSection=t,setTimeout(()=>{this.linkClicked=!1},1e3)},handleCloseModal(){this.$emit("update:open",!1),this.scroller.removeEventListener("scroll",this.handleScroll),this.addedScrollListener=!1,this.scroller.scrollTop=0},handleScroll(){this.linkClicked||this.unfocusNavigationItem()},unfocusNavigationItem:p(function(){this.selectedSection="",document.activeElement.className.includes("navigation-list__link")&&document.activeElement.blur()},300),handleLinkKeydown(t,n){t.code==="Enter"&&this.handleSettingsNavigationClick(n)}},render(t){const n=()=>this.hasNavigation?[t("div",{attrs:{class:"app-settings__navigation",role:"tablist","aria-label":this.settingsNavigationAriaLabel}},[t("ul",{attrs:{class:"navigation-list",role:"tablist"}},this.getSettingsNavigation(this.$slots.default).map(i=>l(i)))])]:[],l=i=>t("li",{},[t("a",{class:{"navigation-list__link":!0,"navigation-list__link--active":i.id===this.selectedSection},attrs:{role:"tab","aria-selected":i.id===this.selectedSection,tabindex:"0"},on:{click:()=>this.handleSettingsNavigationClick(i.id),keydown:()=>this.handleLinkKeydown(event,i.id)}},i.name)]);if(this.open)return t("NcModal",{class:["app-settings-modal"],attrs:{container:this.container,size:"large",additionalTrapElements:this.additionalTrapElements},on:{close:()=>{this.handleCloseModal()}}},[t("div",{attrs:{class:"app-settings"}},[t("h2",{attrs:{class:"app-settings__name"}},this.name),t("div",{attrs:{class:"app-settings__wrapper"}},[...n(),t("div",{attrs:{class:"app-settings__content"},ref:"settingsScroller"},this.$slots.default)])])])}},g=null,m=null;var v=h.normalizeComponent(u,g,m,!1,null,"0ff961d8",null,null);const S=v.exports;module.exports=S;
1
+ var f=require("../assets/index-3aba62de.css");const r=require("./NcModal.cjs"),c=require("../Mixins/isMobile.cjs"),d=require("../chunks/l10n-46d0c1c0.cjs"),p=require("debounce"),h=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const u={name:"NcAppSettingsDialog",components:{NcModal:r},mixins:[c],props:{open:{type:Boolean,required:!0},showNavigation:{type:Boolean,default:!1},container:{type:String,default:"body"},name:{type:String,default:""},additionalTrapElements:{type:Array,default:()=>[]}},emits:["update:open"],data(){return{selectedSection:"",linkClicked:!1,addedScrollListener:!1,scroller:null}},computed:{hasNavigation(){return!(this.isMobile||!this.showNavigation)},settingsNavigationAriaLabel(){return d.t("Settings navigation")}},mounted(){this.selectedSection=this.$slots.default[0].componentOptions.propsData.id},updated(){this.$refs.settingsScroller&&(this.scroller=this.$refs.settingsScroller,this.addedScrollListener||(this.scroller.addEventListener("scroll",this.handleScroll),this.addedScrollListener=!0))},methods:{getSettingsNavigation(t){const n=t.filter(e=>e.componentOptions).map(e=>{var s,a;return{id:(s=e.componentOptions.propsData)==null?void 0:s.id,name:(a=e.componentOptions.propsData)==null?void 0:a.name}}),l=t.map(e=>e.name),i=t.map(e=>e.id);return n.forEach((e,s)=>{const a=[...l],o=[...i];if(a.splice(s,1),o.splice(s,1),a.includes(e.name))throw new Error(`Duplicate section name found: ${e}. Settings navigation sections must have unique section names.`);if(o.includes(e.id))throw new Error(`Duplicate section id found: ${e}. Settings navigation sections must have unique section ids.`)}),n},handleSettingsNavigationClick(t){this.linkClicked=!0,document.getElementById("settings-section_"+t).scrollIntoView({behavior:"smooth",inline:"nearest"}),this.selectedSection=t,setTimeout(()=>{this.linkClicked=!1},1e3)},handleCloseModal(){this.$emit("update:open",!1),this.scroller.removeEventListener("scroll",this.handleScroll),this.addedScrollListener=!1,this.scroller.scrollTop=0},handleScroll(){this.linkClicked||this.unfocusNavigationItem()},unfocusNavigationItem:p(function(){this.selectedSection="",document.activeElement.className.includes("navigation-list__link")&&document.activeElement.blur()},300),handleLinkKeydown(t,n){t.code==="Enter"&&this.handleSettingsNavigationClick(n)}},render(t){const n=()=>this.hasNavigation?[t("div",{attrs:{class:"app-settings__navigation",role:"tablist","aria-label":this.settingsNavigationAriaLabel}},[t("ul",{attrs:{class:"navigation-list",role:"tablist"}},this.getSettingsNavigation(this.$slots.default).map(i=>l(i)))])]:[],l=i=>t("li",{},[t("a",{class:{"navigation-list__link":!0,"navigation-list__link--active":i.id===this.selectedSection},attrs:{role:"tab","aria-selected":i.id===this.selectedSection,tabindex:"0"},on:{click:()=>this.handleSettingsNavigationClick(i.id),keydown:()=>this.handleLinkKeydown(event,i.id)}},i.name)]);if(this.open)return t("NcModal",{class:["app-settings-modal"],attrs:{container:this.container,size:"large",additionalTrapElements:this.additionalTrapElements},on:{close:()=>{this.handleCloseModal()}}},[t("div",{attrs:{class:"app-settings"}},[t("h2",{attrs:{class:"app-settings__name"}},this.name),t("div",{attrs:{class:"app-settings__wrapper"}},[...n(),t("div",{attrs:{class:"app-settings__content"},ref:"settingsScroller"},this.$slots.default)])])])}},g=null,m=null;var v=h.normalizeComponent(u,g,m,!1,null,"0ff961d8",null,null);const S=v.exports;module.exports=S;
@@ -1,4 +1,4 @@
1
- import "../assets/index23.css";
1
+ import "../assets/index-3aba62de.css";
2
2
  import r from "./NcModal.mjs";
3
3
  import d from "../Mixins/isMobile.mjs";
4
4
  import { t as c } from "../chunks/l10n-9a5a6afc.mjs";
@@ -1 +1 @@
1
- var p=require("../assets/index22.css");const s=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const n={name:"NcAppSettingsSection",props:{name:{type:String,required:!0},id:{type:String,required:!0,validator(t){return/^[a-z0-9\-_]+$/.test(t)}}},computed:{htmlId(){return"settings-section_"+this.id}}};var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-settings-section",attrs:{id:t.htmlId}},[e("h3",{staticClass:"app-settings-section__name"},[t._v(" "+t._s(t.name)+" ")]),t._t("default")],2)},r=[],a=s.normalizeComponent(n,i,r,!1,null,"a8066fd5",null,null);const o=a.exports;module.exports=o;
1
+ var p=require("../assets/index-bf46edd7.css");const s=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const n={name:"NcAppSettingsSection",props:{name:{type:String,required:!0},id:{type:String,required:!0,validator(t){return/^[a-z0-9\-_]+$/.test(t)}}},computed:{htmlId(){return"settings-section_"+this.id}}};var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-settings-section",attrs:{id:t.htmlId}},[e("h3",{staticClass:"app-settings-section__name"},[t._v(" "+t._s(t.name)+" ")]),t._t("default")],2)},r=[],a=s.normalizeComponent(n,i,r,!1,null,"a8066fd5",null,null);const o=a.exports;module.exports=o;
@@ -1,4 +1,4 @@
1
- import "../assets/index52.css";
1
+ import "../assets/index-bf46edd7.css";
2
2
  import { n as e } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
3
3
  const n = { name: "NcAppSettingsSection", props: { name: { type: String, required: !0 }, id: { type: String, required: !0, validator(t) {
4
4
  return /^[a-z0-9\-_]+$/.test(t);
@@ -1 +1 @@
1
- var w=require("../assets/index21.css");const r=require("./NcVNodes.cjs"),n=require("./NcCheckboxRadioSwitch.cjs"),s=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs"),o=require("./NcActions.cjs"),l=require("./NcLoadingIcon.cjs"),c=require("./NcButton.cjs"),d=require("./NcEmptyContent.cjs"),u=require("../Directives/Focus.cjs"),p=require("../Directives/Linkify.cjs");require("../Directives/Tooltip.cjs");const i=require("../chunks/l10n-46d0c1c0.cjs"),b=require("vue-material-design-icons/ArrowRight.vue"),h=require("vue-material-design-icons/Close.vue"),m=require("vue-material-design-icons/Star.vue"),f=require("vue-material-design-icons/StarOutline.vue"),y=require("@vueuse/components"),v=require("floating-vue");const g={name:"NcAppSidebarTabs",components:{NcCheckboxRadioSwitch:n,NcVNodes:r},provide(){return{registerTab:this.registerTab,unregisterTab:this.unregisterTab,getActiveTab:()=>this.activeTab}},props:{active:{type:String,default:""}},emits:["update:active"],data(){return{tabs:[],activeTab:""}},computed:{hasMultipleTabs(){return this.tabs.length>1},currentTabIndex(){return this.tabs.findIndex(e=>e.id===this.activeTab)}},watch:{active(e){e!==this.activeTab&&this.updateActive()}},methods:{setActive(e){this.activeTab=e,this.$emit("update:active",this.activeTab)},focusPreviousTab(){this.currentTabIndex>0&&this.setActive(this.tabs[this.currentTabIndex-1].id),this.focusActiveTab()},focusNextTab(){this.currentTabIndex<this.tabs.length-1&&this.setActive(this.tabs[this.currentTabIndex+1].id),this.focusActiveTab()},focusFirstTab(){this.setActive(this.tabs[0].id),this.focusActiveTab()},focusLastTab(){this.setActive(this.tabs[this.tabs.length-1].id),this.focusActiveTab()},focusActiveTab(){this.$el.querySelector(`[data-id="${this.activeTab}"]`).focus()},focusActiveTabContent(){this.$el.querySelector("#tab-"+this.activeTab).focus()},updateActive(){this.activeTab=this.active&&this.tabs.some(e=>e.id===this.active)?this.active:this.tabs.length>0?this.tabs[0].id:""},registerTab(e){this.tabs.push(e),this.tabs.sort((a,t)=>a.order===t.order?OC.Util.naturalSortCompare(a.name,t.name):a.order-t.order),this.updateActive()},unregisterTab(e){const a=this.tabs.findIndex(t=>t.id===e);a!==-1&&this.tabs.splice(a,1),this.activeTab===e&&this.updateActive()}}};var _=function(){var e=this,a=e._self._c;return a("div",{staticClass:"app-sidebar-tabs"},[e.hasMultipleTabs?a("div",{staticClass:"app-sidebar-tabs__nav",attrs:{role:"tablist"},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])||"button"in t&&t.button!==0||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusPreviousTab.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])||"button"in t&&t.button!==2||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusNextTab.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusActiveTabContent.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"home",void 0,t.key,void 0)||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusFirstTab.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"end",void 0,t.key,void 0)||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusLastTab.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&t.keyCode!==33||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusFirstTab.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&t.keyCode!==34||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusLastTab.apply(null,arguments))}]}},e._l(e.tabs,function(t){return a("NcCheckboxRadioSwitch",{key:t.id,staticClass:"app-sidebar-tabs__tab",class:{active:t.id===e.activeTab},attrs:{"aria-controls":`tab-${t.id}`,"aria-selected":e.activeTab===t.id,"button-variant":!0,checked:e.activeTab===t.id,"data-id":t.id,tabindex:e.activeTab===t.id?0:-1,"button-variant-grouped":"horizontal",role:"tab",type:"button"},on:{"update:checked":function(K){return e.setActive(t.id)}},scopedSlots:e._u([{key:"icon",fn:function(){return[a("NcVNodes",{attrs:{vnodes:t.renderIcon()}},[a("span",{staticClass:"app-sidebar-tabs__tab-icon",class:t.icon})])]},proxy:!0}],null,!0)},[a("span",{staticClass:"app-sidebar-tabs__tab-caption"},[e._v(" "+e._s(t.name)+" ")])])}),1):e._e(),a("div",{staticClass:"app-sidebar-tabs__content",class:{"app-sidebar-tabs__content--multiple":e.hasMultipleTabs}},[e._t("default")],2)])},k=[],T=s.normalizeComponent(g,_,k,!1,null,"b4df3f5e",null,null);const C=T.exports;const S={name:"NcAppSidebar",components:{NcActions:o,NcAppSidebarTabs:C,ArrowRight:b,NcButton:c,NcLoadingIcon:l,NcEmptyContent:d,Close:h,Star:m,StarOutline:f},directives:{focus:u.directive,linkify:p.directive,ClickOutside:y.vOnClickOutside,Tooltip:v.VTooltip},props:{active:{type:String,default:""},name:{type:String,default:"",required:!0},nameEditable:{type:Boolean,default:!1},namePlaceholder:{type:String,default:""},subname:{type:String,default:""},subtitle:{type:String,default:""},background:{type:String,default:""},starred:{type:Boolean,default:null},starLoading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},empty:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},linkifyName:{type:Boolean,default:!1},title:{type:String,default:""}},emits:["close","closing","closed","opening","opened","figure-click","update:starred","update:nameEditable","update:name","update:active","submit-name","dismiss-editing"],data(){return{changeNameTranslated:i.t("Change name"),closeTranslated:i.t("Close sidebar"),favoriteTranslated:i.t("Favorite"),isStarred:this.starred}},computed:{canStar(){return this.isStarred!==null},hasFigure(){return this.$slots.header||this.background},hasFigureClickListener(){return this.$listeners["figure-click"]}},watch:{starred(){this.isStarred=this.starred}},beforeDestroy(){this.$emit("closed")},methods:{onBeforeEnter(e){this.$emit("opening",e)},onAfterEnter(e){this.$emit("opened",e)},onBeforeLeave(e){this.$emit("closing",e)},onAfterLeave(e){this.$emit("closed",e)},closeSidebar(e){this.$emit("close",e)},onFigureClick(e){this.$emit("figure-click",e)},toggleStarred(){this.isStarred=!this.isStarred,this.$emit("update:starred",this.isStarred)},editName(){this.$emit("update:nameEditable",!0),this.nameEditable&&this.$nextTick(()=>this.$refs.nameInput.focus())},onNameInput(e){this.$emit("update:name",e.target.value)},onSubmitName(e){this.$emit("update:nameEditable",!1),this.$emit("submit-name",e)},onDismissEditing(){this.$emit("update:nameEditable",!1),this.$emit("dismiss-editing")},onUpdateActive(e){this.$emit("update:active",e)}}};var N=function(){var e=this,a=e._self._c;return a("transition",{attrs:{appear:"",name:"slide-right"},on:{"before-enter":e.onBeforeEnter,"after-enter":e.onAfterEnter,"before-leave":e.onBeforeLeave,"after-leave":e.onAfterLeave}},[a("aside",{staticClass:"app-sidebar",attrs:{id:"app-sidebar-vue"}},[a("header",{staticClass:"app-sidebar-header",class:{"app-sidebar-header--with-figure":e.hasFigure,"app-sidebar-header--compact":e.compact}},[a("div",{staticClass:"app-sidebar-header__info"},[e.hasFigure&&!e.empty?a("div",{staticClass:"app-sidebar-header__figure",class:{"app-sidebar-header__figure--with-action":e.hasFigureClickListener},style:{backgroundImage:`url(${e.background})`},attrs:{tabindex:"0"},on:{click:e.onFigureClick,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.onFigureClick.apply(null,arguments)}}},[e._t("header")],2):e._e(),e.empty?e._e():a("div",{staticClass:"app-sidebar-header__desc",class:{"app-sidebar-header__desc--with-tertiary-action":e.canStar||e.$slots["tertiary-actions"],"app-sidebar-header__desc--editable":e.nameEditable&&!e.subname,"app-sidebar-header__desc--with-subname--editable":e.nameEditable&&e.subname,"app-sidebar-header__desc--without-actions":!e.$slots["secondary-actions"]}},[e.canStar||e.$slots["tertiary-actions"]?a("div",{staticClass:"app-sidebar-header__tertiary-actions"},[e._t("tertiary-actions",function(){return[e.canStar?a("NcButton",{staticClass:"app-sidebar-header__star",attrs:{"aria-label":e.favoriteTranslated,pressed:e.isStarred,type:"secondary"},on:{click:function(t){return t.preventDefault(),e.toggleStarred.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[e.starLoading?a("NcLoadingIcon"):e.isStarred?a("Star",{attrs:{size:20}}):a("StarOutline",{attrs:{size:20}})]},proxy:!0}],null,!1,2575459756)}):e._e()]})],2):e._e(),a("div",{staticClass:"app-sidebar-header__name-container"},[a("div",{staticClass:"app-sidebar-header__mainname-container"},[a("h2",{directives:[{name:"show",rawName:"v-show",value:!e.nameEditable,expression:"!nameEditable"},{name:"linkify",rawName:"v-linkify",value:{text:e.name,linkify:e.linkifyName},expression:"{text: name, linkify: linkifyName}"}],staticClass:"app-sidebar-header__mainname",attrs:{"aria-label":e.title,title:e.title,tabindex:e.nameEditable?0:void 0},on:{click:function(t){return t.target!==t.currentTarget?null:e.editName.apply(null,arguments)}}},[e._v(" "+e._s(e.name)+" ")]),e.nameEditable?[a("form",{directives:[{name:"click-outside",rawName:"v-click-outside",value:()=>e.onSubmitName(),expression:"() => onSubmitName()"}],staticClass:"app-sidebar-header__mainname-form",on:{submit:function(t){return t.preventDefault(),e.onSubmitName.apply(null,arguments)}}},[a("input",{directives:[{name:"focus",rawName:"v-focus"}],ref:"nameInput",staticClass:"app-sidebar-header__mainname-input",attrs:{type:"text",placeholder:e.namePlaceholder},domProps:{value:e.name},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:(t.stopPropagation(),e.onDismissEditing.apply(null,arguments))},input:e.onNameInput}}),a("NcButton",{attrs:{type:"tertiary-no-background","aria-label":e.changeNameTranslated,"native-type":"submit"},scopedSlots:e._u([{key:"icon",fn:function(){return[a("ArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,1252225425)})],1)]:e._e(),e.$slots["secondary-actions"]?a("NcActions",{staticClass:"app-sidebar-header__menu",attrs:{"force-menu":e.forceMenu}},[e._t("secondary-actions")],2):e._e()],2),e.subname.trim()!==""?a("p",{staticClass:"app-sidebar-header__subname",attrs:{"aria-label":e.subtitle,title:e.subtitle}},[e._v(" "+e._s(e.subname)+" ")]):e._e()])])]),a("NcButton",{staticClass:"app-sidebar__close",attrs:{title:e.closeTranslated,"aria-label":e.closeTranslated,type:"tertiary"},on:{click:function(t){return t.preventDefault(),e.closeSidebar.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[a("Close",{attrs:{size:20}})]},proxy:!0}])}),e.$slots.description&&!e.empty?a("div",{staticClass:"app-sidebar-header__description"},[e._t("description")],2):e._e()],1),a("NcAppSidebarTabs",{directives:[{name:"show",rawName:"v-show",value:!e.loading,expression:"!loading"}],ref:"tabs",attrs:{active:e.active},on:{"update:active":e.onUpdateActive}},[e._t("default")],2),e.loading?a("NcEmptyContent",{scopedSlots:e._u([{key:"icon",fn:function(){return[a("NcLoadingIcon",{attrs:{size:64}})]},proxy:!0}],null,!1,826850984)}):e._e()],1)])},x=[],A=s.normalizeComponent(S,N,x,!1,null,"90858b97",null,null);const $=A.exports;module.exports=$;
1
+ var w=require("../assets/index-f6ca40ca.css");const r=require("./NcVNodes.cjs"),n=require("./NcCheckboxRadioSwitch.cjs"),s=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs"),o=require("./NcActions.cjs"),l=require("./NcLoadingIcon.cjs"),c=require("./NcButton.cjs"),d=require("./NcEmptyContent.cjs"),u=require("../Directives/Focus.cjs"),p=require("../Directives/Linkify.cjs");require("../Directives/Tooltip.cjs");const i=require("../chunks/l10n-46d0c1c0.cjs"),b=require("vue-material-design-icons/ArrowRight.vue"),h=require("vue-material-design-icons/Close.vue"),m=require("vue-material-design-icons/Star.vue"),f=require("vue-material-design-icons/StarOutline.vue"),y=require("@vueuse/components"),v=require("floating-vue");const g={name:"NcAppSidebarTabs",components:{NcCheckboxRadioSwitch:n,NcVNodes:r},provide(){return{registerTab:this.registerTab,unregisterTab:this.unregisterTab,getActiveTab:()=>this.activeTab}},props:{active:{type:String,default:""}},emits:["update:active"],data(){return{tabs:[],activeTab:""}},computed:{hasMultipleTabs(){return this.tabs.length>1},currentTabIndex(){return this.tabs.findIndex(e=>e.id===this.activeTab)}},watch:{active(e){e!==this.activeTab&&this.updateActive()}},methods:{setActive(e){this.activeTab=e,this.$emit("update:active",this.activeTab)},focusPreviousTab(){this.currentTabIndex>0&&this.setActive(this.tabs[this.currentTabIndex-1].id),this.focusActiveTab()},focusNextTab(){this.currentTabIndex<this.tabs.length-1&&this.setActive(this.tabs[this.currentTabIndex+1].id),this.focusActiveTab()},focusFirstTab(){this.setActive(this.tabs[0].id),this.focusActiveTab()},focusLastTab(){this.setActive(this.tabs[this.tabs.length-1].id),this.focusActiveTab()},focusActiveTab(){this.$el.querySelector(`[data-id="${this.activeTab}"]`).focus()},focusActiveTabContent(){this.$el.querySelector("#tab-"+this.activeTab).focus()},updateActive(){this.activeTab=this.active&&this.tabs.some(e=>e.id===this.active)?this.active:this.tabs.length>0?this.tabs[0].id:""},registerTab(e){this.tabs.push(e),this.tabs.sort((a,t)=>a.order===t.order?OC.Util.naturalSortCompare(a.name,t.name):a.order-t.order),this.updateActive()},unregisterTab(e){const a=this.tabs.findIndex(t=>t.id===e);a!==-1&&this.tabs.splice(a,1),this.activeTab===e&&this.updateActive()}}};var _=function(){var e=this,a=e._self._c;return a("div",{staticClass:"app-sidebar-tabs"},[e.hasMultipleTabs?a("div",{staticClass:"app-sidebar-tabs__nav",attrs:{role:"tablist"},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])||"button"in t&&t.button!==0||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusPreviousTab.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])||"button"in t&&t.button!==2||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusNextTab.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusActiveTabContent.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"home",void 0,t.key,void 0)||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusFirstTab.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"end",void 0,t.key,void 0)||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusLastTab.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&t.keyCode!==33||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusFirstTab.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&t.keyCode!==34||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),t.stopPropagation(),e.focusLastTab.apply(null,arguments))}]}},e._l(e.tabs,function(t){return a("NcCheckboxRadioSwitch",{key:t.id,staticClass:"app-sidebar-tabs__tab",class:{active:t.id===e.activeTab},attrs:{"aria-controls":`tab-${t.id}`,"aria-selected":e.activeTab===t.id,"button-variant":!0,checked:e.activeTab===t.id,"data-id":t.id,tabindex:e.activeTab===t.id?0:-1,"button-variant-grouped":"horizontal",role:"tab",type:"button"},on:{"update:checked":function(K){return e.setActive(t.id)}},scopedSlots:e._u([{key:"icon",fn:function(){return[a("NcVNodes",{attrs:{vnodes:t.renderIcon()}},[a("span",{staticClass:"app-sidebar-tabs__tab-icon",class:t.icon})])]},proxy:!0}],null,!0)},[a("span",{staticClass:"app-sidebar-tabs__tab-caption"},[e._v(" "+e._s(t.name)+" ")])])}),1):e._e(),a("div",{staticClass:"app-sidebar-tabs__content",class:{"app-sidebar-tabs__content--multiple":e.hasMultipleTabs}},[e._t("default")],2)])},k=[],T=s.normalizeComponent(g,_,k,!1,null,"b4df3f5e",null,null);const C=T.exports;const S={name:"NcAppSidebar",components:{NcActions:o,NcAppSidebarTabs:C,ArrowRight:b,NcButton:c,NcLoadingIcon:l,NcEmptyContent:d,Close:h,Star:m,StarOutline:f},directives:{focus:u.directive,linkify:p.directive,ClickOutside:y.vOnClickOutside,Tooltip:v.VTooltip},props:{active:{type:String,default:""},name:{type:String,default:"",required:!0},nameEditable:{type:Boolean,default:!1},namePlaceholder:{type:String,default:""},subname:{type:String,default:""},subtitle:{type:String,default:""},background:{type:String,default:""},starred:{type:Boolean,default:null},starLoading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},empty:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},linkifyName:{type:Boolean,default:!1},title:{type:String,default:""}},emits:["close","closing","closed","opening","opened","figure-click","update:starred","update:nameEditable","update:name","update:active","submit-name","dismiss-editing"],data(){return{changeNameTranslated:i.t("Change name"),closeTranslated:i.t("Close sidebar"),favoriteTranslated:i.t("Favorite"),isStarred:this.starred}},computed:{canStar(){return this.isStarred!==null},hasFigure(){return this.$slots.header||this.background},hasFigureClickListener(){return this.$listeners["figure-click"]}},watch:{starred(){this.isStarred=this.starred}},beforeDestroy(){this.$emit("closed")},methods:{onBeforeEnter(e){this.$emit("opening",e)},onAfterEnter(e){this.$emit("opened",e)},onBeforeLeave(e){this.$emit("closing",e)},onAfterLeave(e){this.$emit("closed",e)},closeSidebar(e){this.$emit("close",e)},onFigureClick(e){this.$emit("figure-click",e)},toggleStarred(){this.isStarred=!this.isStarred,this.$emit("update:starred",this.isStarred)},editName(){this.$emit("update:nameEditable",!0),this.nameEditable&&this.$nextTick(()=>this.$refs.nameInput.focus())},onNameInput(e){this.$emit("update:name",e.target.value)},onSubmitName(e){this.$emit("update:nameEditable",!1),this.$emit("submit-name",e)},onDismissEditing(){this.$emit("update:nameEditable",!1),this.$emit("dismiss-editing")},onUpdateActive(e){this.$emit("update:active",e)}}};var N=function(){var e=this,a=e._self._c;return a("transition",{attrs:{appear:"",name:"slide-right"},on:{"before-enter":e.onBeforeEnter,"after-enter":e.onAfterEnter,"before-leave":e.onBeforeLeave,"after-leave":e.onAfterLeave}},[a("aside",{staticClass:"app-sidebar",attrs:{id:"app-sidebar-vue"}},[a("header",{staticClass:"app-sidebar-header",class:{"app-sidebar-header--with-figure":e.hasFigure,"app-sidebar-header--compact":e.compact}},[a("div",{staticClass:"app-sidebar-header__info"},[e.hasFigure&&!e.empty?a("div",{staticClass:"app-sidebar-header__figure",class:{"app-sidebar-header__figure--with-action":e.hasFigureClickListener},style:{backgroundImage:`url(${e.background})`},attrs:{tabindex:"0"},on:{click:e.onFigureClick,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.onFigureClick.apply(null,arguments)}}},[e._t("header")],2):e._e(),e.empty?e._e():a("div",{staticClass:"app-sidebar-header__desc",class:{"app-sidebar-header__desc--with-tertiary-action":e.canStar||e.$slots["tertiary-actions"],"app-sidebar-header__desc--editable":e.nameEditable&&!e.subname,"app-sidebar-header__desc--with-subname--editable":e.nameEditable&&e.subname,"app-sidebar-header__desc--without-actions":!e.$slots["secondary-actions"]}},[e.canStar||e.$slots["tertiary-actions"]?a("div",{staticClass:"app-sidebar-header__tertiary-actions"},[e._t("tertiary-actions",function(){return[e.canStar?a("NcButton",{staticClass:"app-sidebar-header__star",attrs:{"aria-label":e.favoriteTranslated,pressed:e.isStarred,type:"secondary"},on:{click:function(t){return t.preventDefault(),e.toggleStarred.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[e.starLoading?a("NcLoadingIcon"):e.isStarred?a("Star",{attrs:{size:20}}):a("StarOutline",{attrs:{size:20}})]},proxy:!0}],null,!1,2575459756)}):e._e()]})],2):e._e(),a("div",{staticClass:"app-sidebar-header__name-container"},[a("div",{staticClass:"app-sidebar-header__mainname-container"},[a("h2",{directives:[{name:"show",rawName:"v-show",value:!e.nameEditable,expression:"!nameEditable"},{name:"linkify",rawName:"v-linkify",value:{text:e.name,linkify:e.linkifyName},expression:"{text: name, linkify: linkifyName}"}],staticClass:"app-sidebar-header__mainname",attrs:{"aria-label":e.title,title:e.title,tabindex:e.nameEditable?0:void 0},on:{click:function(t){return t.target!==t.currentTarget?null:e.editName.apply(null,arguments)}}},[e._v(" "+e._s(e.name)+" ")]),e.nameEditable?[a("form",{directives:[{name:"click-outside",rawName:"v-click-outside",value:()=>e.onSubmitName(),expression:"() => onSubmitName()"}],staticClass:"app-sidebar-header__mainname-form",on:{submit:function(t){return t.preventDefault(),e.onSubmitName.apply(null,arguments)}}},[a("input",{directives:[{name:"focus",rawName:"v-focus"}],ref:"nameInput",staticClass:"app-sidebar-header__mainname-input",attrs:{type:"text",placeholder:e.namePlaceholder},domProps:{value:e.name},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:(t.stopPropagation(),e.onDismissEditing.apply(null,arguments))},input:e.onNameInput}}),a("NcButton",{attrs:{type:"tertiary-no-background","aria-label":e.changeNameTranslated,"native-type":"submit"},scopedSlots:e._u([{key:"icon",fn:function(){return[a("ArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,1252225425)})],1)]:e._e(),e.$slots["secondary-actions"]?a("NcActions",{staticClass:"app-sidebar-header__menu",attrs:{"force-menu":e.forceMenu}},[e._t("secondary-actions")],2):e._e()],2),e.subname.trim()!==""?a("p",{staticClass:"app-sidebar-header__subname",attrs:{"aria-label":e.subtitle,title:e.subtitle}},[e._v(" "+e._s(e.subname)+" ")]):e._e()])])]),a("NcButton",{staticClass:"app-sidebar__close",attrs:{title:e.closeTranslated,"aria-label":e.closeTranslated,type:"tertiary"},on:{click:function(t){return t.preventDefault(),e.closeSidebar.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[a("Close",{attrs:{size:20}})]},proxy:!0}])}),e.$slots.description&&!e.empty?a("div",{staticClass:"app-sidebar-header__description"},[e._t("description")],2):e._e()],1),a("NcAppSidebarTabs",{directives:[{name:"show",rawName:"v-show",value:!e.loading,expression:"!loading"}],ref:"tabs",attrs:{active:e.active},on:{"update:active":e.onUpdateActive}},[e._t("default")],2),e.loading?a("NcEmptyContent",{scopedSlots:e._u([{key:"icon",fn:function(){return[a("NcLoadingIcon",{attrs:{size:64}})]},proxy:!0}],null,!1,826850984)}):e._e()],1)])},x=[],A=s.normalizeComponent(S,N,x,!1,null,"90858b97",null,null);const $=A.exports;module.exports=$;
@@ -1,4 +1,4 @@
1
- import "../assets/index50.css";
1
+ import "../assets/index-f6ca40ca.css";
2
2
  import r from "./NcVNodes.mjs";
3
3
  import n from "./NcCheckboxRadioSwitch.mjs";
4
4
  import { n as s } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
@@ -1 +1 @@
1
- var n=require("../assets/index17.css");const i=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const r={name:"NcAppSidebarTab",inject:["registerTab","unregisterTab","getActiveTab"],props:{id:{type:String,required:!0},name:{type:String,required:!0},icon:{type:String,default:""},order:{type:Number,default:0}},emits:["bottom-reached","scroll"],expose:["id","name","icon","order","renderIcon"],computed:{isActive(){return this.getActiveTab()===this.id}},created(){this.registerTab(this)},beforeDestroy(){this.unregisterTab(this.id)},methods:{onScroll(e){this.$el.scrollHeight-this.$el.scrollTop===this.$el.clientHeight&&this.$emit("bottom-reached",e),this.$emit("scroll",e)},renderIcon(){var e,t;return(t=(e=this.$scopedSlots).icon)==null?void 0:t.call(e)}}};var s=function(){var e=this,t=e._self._c;return t("section",{staticClass:"app-sidebar__tab",class:{"app-sidebar__tab--active":e.isActive},attrs:{id:`tab-${e.id}`,"aria-hidden":!e.isActive,"aria-labelledby":e.id,tabindex:"0",role:"tabpanel"},on:{scroll:e.onScroll}},[t("h3",{staticClass:"hidden-visually"},[e._v(" "+e._s(e.name)+" ")]),e._t("default")],2)},a=[],o=i.normalizeComponent(r,s,a,!1,null,"24771dcd",null,null);const l=o.exports;module.exports=l;
1
+ var n=require("../assets/index-f1030e54.css");const i=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const r={name:"NcAppSidebarTab",inject:["registerTab","unregisterTab","getActiveTab"],props:{id:{type:String,required:!0},name:{type:String,required:!0},icon:{type:String,default:""},order:{type:Number,default:0}},emits:["bottom-reached","scroll"],expose:["id","name","icon","order","renderIcon"],computed:{isActive(){return this.getActiveTab()===this.id}},created(){this.registerTab(this)},beforeDestroy(){this.unregisterTab(this.id)},methods:{onScroll(e){this.$el.scrollHeight-this.$el.scrollTop===this.$el.clientHeight&&this.$emit("bottom-reached",e),this.$emit("scroll",e)},renderIcon(){var e,t;return(t=(e=this.$scopedSlots).icon)==null?void 0:t.call(e)}}};var s=function(){var e=this,t=e._self._c;return t("section",{staticClass:"app-sidebar__tab",class:{"app-sidebar__tab--active":e.isActive},attrs:{id:`tab-${e.id}`,"aria-hidden":!e.isActive,"aria-labelledby":e.id,tabindex:"0",role:"tabpanel"},on:{scroll:e.onScroll}},[t("h3",{staticClass:"hidden-visually"},[e._v(" "+e._s(e.name)+" ")]),e._t("default")],2)},a=[],o=i.normalizeComponent(r,s,a,!1,null,"24771dcd",null,null);const l=o.exports;module.exports=l;
@@ -1,4 +1,4 @@
1
- import "../assets/index51.css";
1
+ import "../assets/index-f1030e54.css";
2
2
  import { n as i } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
3
3
  const r = { name: "NcAppSidebarTab", inject: ["registerTab", "unregisterTab", "getActiveTab"], props: { id: { type: String, required: !0 }, name: { type: String, required: !0 }, icon: { type: String, default: "" }, order: { type: Number, default: 0 } }, emits: ["bottom-reached", "scroll"], expose: ["id", "name", "icon", "order", "renderIcon"], computed: { isActive() {
4
4
  return this.getActiveTab() === this.id;
@@ -1 +1 @@
1
- "use strict";const t=require("../chunks/index-12fa9b26.cjs");module.exports=t.NcAvatar;
1
+ "use strict";const t=require("../chunks/index-cebd6e80.cjs");module.exports=t.NcAvatar;
@@ -1,4 +1,4 @@
1
- import { N as f } from "../chunks/index-7aa3fc24.mjs";
1
+ import { N as f } from "../chunks/index-197226c7.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1 +1 @@
1
- var d=require("../assets/index14.css");const n=require("./NcActions.cjs"),a=require("../chunks/GenRandomId-67df40eb.cjs"),o=require("vue-material-design-icons/ChevronRight.vue"),i=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const s={name:"NcBreadcrumb",components:{NcActions:n,ChevronRight:o},props:{name:{type:String,required:!0},title:{type:String,default:null},to:{type:[String,Object],default:void 0},exact:{type:Boolean,default:!1},href:{type:String,default:void 0},icon:{type:String,default:""},disableDrop:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:["update:open","dropped"],data(){return{hovering:!1,crumbId:`crumb-id-${a.GenRandomId()}`}},computed:{tag(){return this.to?"router-link":"a"},linkAttributes(){return this.to?{to:this.to,exact:this.exact,...this.$attrs}:{href:this.href,...this.$attrs}}},methods:{onOpenChange(e){this.$emit("update:open",e)},dropped(e){return this.disableDrop||(this.$emit("dropped",e,this.to||this.href),this.$parent.$emit("dropped",e,this.to||this.href),this.hovering=!1),!1},dragEnter(e){this.disableDrop||(this.hovering=!0)},dragLeave(e){this.disableDrop||e.target.contains(e.relatedTarget)||this.$refs.crumb.contains(e.relatedTarget)||(this.hovering=!1)}}};var u=function(){var e=this,t=e._self._c;return t("li",e._b({ref:"crumb",staticClass:"vue-crumb",class:{"vue-crumb--hovered":e.hovering},attrs:{draggable:"false"},on:{dragstart:function(r){return r.preventDefault(),(()=>{}).apply(null,arguments)},drop:function(r){return r.preventDefault(),e.dropped.apply(null,arguments)},dragover:function(r){return r.preventDefault(),(()=>{}).apply(null,arguments)},dragenter:e.dragEnter,dragleave:e.dragLeave}},"li",e._d({},[e.crumbId,""])),[(e.name||e.icon)&&!e.$slots.default?t(e.tag,e._g(e._b({tag:"component",attrs:{title:e.title}},"component",e.linkAttributes,!1),e.$listeners),[e._t("icon",function(){return[e.icon?t("span",{staticClass:"icon",class:e.icon}):t("span",[e._v(e._s(e.name))])]})],2):e._e(),e.$slots.default?t("NcActions",{ref:"actions",attrs:{type:"tertiary","force-menu":e.forceMenu,open:e.open,"menu-name":e.name,title:e.title,"force-name":!0,container:`.vue-crumb[${e.crumbId}]`},on:{"update:open":e.onOpenChange},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("menu-icon")]},proxy:!0}],null,!0)},[e._t("default")],2):e._e(),t("ChevronRight",{staticClass:"vue-crumb__separator",attrs:{size:20}})],1)},l=[],p=i.normalizeComponent(s,u,l,!1,null,"2e235682",null,null);const c=p.exports;module.exports=c;
1
+ var d=require("../assets/index-bf10e8e1.css");const n=require("./NcActions.cjs"),a=require("../chunks/GenRandomId-67df40eb.cjs"),o=require("vue-material-design-icons/ChevronRight.vue"),i=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const s={name:"NcBreadcrumb",components:{NcActions:n,ChevronRight:o},props:{name:{type:String,required:!0},title:{type:String,default:null},to:{type:[String,Object],default:void 0},exact:{type:Boolean,default:!1},href:{type:String,default:void 0},icon:{type:String,default:""},disableDrop:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:["update:open","dropped"],data(){return{hovering:!1,crumbId:`crumb-id-${a.GenRandomId()}`}},computed:{tag(){return this.to?"router-link":"a"},linkAttributes(){return this.to?{to:this.to,exact:this.exact,...this.$attrs}:{href:this.href,...this.$attrs}}},methods:{onOpenChange(e){this.$emit("update:open",e)},dropped(e){return this.disableDrop||(this.$emit("dropped",e,this.to||this.href),this.$parent.$emit("dropped",e,this.to||this.href),this.hovering=!1),!1},dragEnter(e){this.disableDrop||(this.hovering=!0)},dragLeave(e){this.disableDrop||e.target.contains(e.relatedTarget)||this.$refs.crumb.contains(e.relatedTarget)||(this.hovering=!1)}}};var u=function(){var e=this,t=e._self._c;return t("li",e._b({ref:"crumb",staticClass:"vue-crumb",class:{"vue-crumb--hovered":e.hovering},attrs:{draggable:"false"},on:{dragstart:function(r){return r.preventDefault(),(()=>{}).apply(null,arguments)},drop:function(r){return r.preventDefault(),e.dropped.apply(null,arguments)},dragover:function(r){return r.preventDefault(),(()=>{}).apply(null,arguments)},dragenter:e.dragEnter,dragleave:e.dragLeave}},"li",e._d({},[e.crumbId,""])),[(e.name||e.icon)&&!e.$slots.default?t(e.tag,e._g(e._b({tag:"component",attrs:{title:e.title}},"component",e.linkAttributes,!1),e.$listeners),[e._t("icon",function(){return[e.icon?t("span",{staticClass:"icon",class:e.icon}):t("span",[e._v(e._s(e.name))])]})],2):e._e(),e.$slots.default?t("NcActions",{ref:"actions",attrs:{type:"tertiary","force-menu":e.forceMenu,open:e.open,"menu-name":e.name,title:e.title,"force-name":!0,container:`.vue-crumb[${e.crumbId}]`},on:{"update:open":e.onOpenChange},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("menu-icon")]},proxy:!0}],null,!0)},[e._t("default")],2):e._e(),t("ChevronRight",{staticClass:"vue-crumb__separator",attrs:{size:20}})],1)},l=[],p=i.normalizeComponent(s,u,l,!1,null,"2e235682",null,null);const c=p.exports;module.exports=c;
@@ -1,4 +1,4 @@
1
- import "../assets/index49.css";
1
+ import "../assets/index-bf10e8e1.css";
2
2
  import n from "./NcActions.mjs";
3
3
  import { G as a } from "../chunks/GenRandomId-1e1b509a.mjs";
4
4
  import o from "vue-material-design-icons/ChevronRight.vue";
@@ -1 +1 @@
1
- var T=require("../assets/index13.css");const L=require("./NcActions.cjs"),B=require("./NcActionButton.cjs"),y=require("./NcActionRouter.cjs"),D=require("./NcActionLink.cjs"),q=require("./NcBreadcrumb.cjs"),p=require("vue"),b=require("@nextcloud/event-bus"),R=require("vue-material-design-icons/Folder.vue"),W=require("debounce"),w=require("vue-frag"),z=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs"),g=(e,t,s)=>{if(e!==void 0)for(let o=e.length-1;o>=0;o--){const a=e[o],r=!a.componentOptions&&a.tag&&t.indexOf(a.tag)===-1,n=!!a.componentOptions&&typeof a.componentOptions.tag=="string",c=n&&t.indexOf(a.componentOptions.tag)===-1;(r||!n||c)&&((r||c)&&p.util.warn(`${r?a.tag:a.componentOptions.tag} is not allowed inside the ${s.$options.name} component`,s),e.splice(o,1))}};const i="vue-crumb",N={name:"NcBreadcrumbs",components:{NcActions:L,NcActionButton:B,NcActionRouter:y,NcActionLink:D,NcBreadcrumb:q,IconFolder:R},props:{rootIcon:{type:String,default:"icon-home"}},emits:["dropped"],data(){return{hiddenIndices:[],menuBreadcrumbProps:{name:"",forceMenu:!0,disableDrop:!0,open:!1},breadcrumbsRefs:{}}},beforeMount(){g(this.$slots.default,["NcBreadcrumb"],this)},beforeUpdate(){g(this.$slots.default,["NcBreadcrumb"],this)},created(){window.addEventListener("resize",W(()=>{this.handleWindowResize()},100)),b.subscribe("navigation-toggled",this.delayedResize)},mounted(){this.handleWindowResize()},updated(){this.delayedResize(),this.$nextTick(()=>{this.hideCrumbs()})},beforeDestroy(){window.removeEventListener("resize",this.handleWindowResize),b.unsubscribe("navigation-toggled",this.delayedResize)},methods:{closeActions(e){this.$refs.actionsBreadcrumb.$el.contains(e.relatedTarget)||(this.menuBreadcrumbProps.open=!1)},async delayedResize(){await this.$nextTick(),this.handleWindowResize()},handleWindowResize(){var d;if(!this.$refs.container)return;const e=Object.values(this.breadcrumbsRefs),t=e.length,s=[],o=this.$refs.container.offsetWidth;let a=this.getTotalWidth(e);this.$refs.breadcrumb__actions&&(a+=this.$refs.breadcrumb__actions.offsetWidth);let r=a-o;r+=r>0?64:0;let n=0;const c=Math.floor(t/2);for(;r>0&&n<t-2;){const l=c+(n%2?n+1:n)/2*Math.pow(-1,n+t%2);r-=this.getWidth((d=e[l])==null?void 0:d.elm),s.push(l),n++}this.arraysEqual(this.hiddenIndices,s.sort((l,u)=>l-u))||(this.hiddenIndices=s)},arraysEqual(e,t){if(e.length!==t.length)return!1;if(e===t)return!0;if(e===null||t===null)return!1;for(let s=0;s<e.length;++s)if(e[s]!==t[s])return!1;return!0},getTotalWidth(e){return e.reduce((t,s,o)=>t+this.getWidth(s==null?void 0:s.elm),0)},getWidth(e){if(!(e!=null&&e.classList))return 0;const t=e.classList.contains(`${i}--hidden`);e.style.minWidth="auto",e.classList.remove(`${i}--hidden`);const s=e.offsetWidth;return t&&e.classList.add(`${i}--hidden`),e.style.minWidth="",s},preventDefault(e){return e.preventDefault&&e.preventDefault(),!1},dragStart(e){return this.preventDefault(e)},dropped(e,t,s){return s||this.$emit("dropped",e,t),this.menuBreadcrumbProps.open=!1,document.querySelectorAll(`.${i}`).forEach(o=>{o.classList.remove(`${i}--hovered`)}),this.preventDefault(e)},dragOver(e){return this.preventDefault(e)},dragEnter(e,t){if(!t&&e.target.closest){const s=e.target.closest(`.${i}`);s.classList&&s.classList.contains(i)&&(document.querySelectorAll(`.${i}`).forEach(o=>{o.classList.remove(`${i}--hovered`)}),s.classList.add(`${i}--hovered`))}},dragLeave(e,t){if(!t&&!e.target.contains(e.relatedTarget)&&e.target.closest){const s=e.target.closest(`.${i}`);if(s.contains(e.relatedTarget))return;s.classList&&s.classList.contains(i)&&s.classList.remove(`${i}--hovered`)}},hideCrumbs(){Object.values(this.breadcrumbsRefs).forEach((e,t)=>{var s;(s=e==null?void 0:e.elm)!=null&&s.classList&&(this.hiddenIndices.includes(t)?e.elm.classList.add(`${i}--hidden`):e.elm.classList.remove(`${i}--hidden`))})},isBreadcrumb(e){var t;return(((t=e==null?void 0:e.componentOptions)==null?void 0:t.tag)||(e==null?void 0:e.tag)||"").includes("NcBreadcrumb")}},render(e){const t=[];if(this.$slots.default.forEach(r=>{var n,c;if(this.isBreadcrumb(r)){t.push(r);return}(r==null?void 0:r.type)===w.Fragment&&((c=(n=r==null?void 0:r.children)==null?void 0:n.forEach)==null||c.call(n,d=>{this.isBreadcrumb(d)&&t.push(d)}))}),t.length===0)return;p.set(t[0].componentOptions.propsData,"icon",this.rootIcon),p.set(t[0].componentOptions.propsData,"ref","breadcrumbs");const s={};t.forEach((r,n)=>{p.set(r,"ref",`crumb-${n}`),s[n]=r});let o=[];if(!this.hiddenIndices.length)o=t;else{o=t.slice(0,Math.round(t.length/2)),o.push(e("NcBreadcrumb",{class:"dropdown",props:this.menuBreadcrumbProps,attrs:{"aria-hidden":!0},ref:"actionsBreadcrumb",key:"actions-breadcrumb-1",nativeOn:{dragstart:this.dragStart,dragenter:()=>{this.menuBreadcrumbProps.open=!0},dragleave:this.closeActions},on:{"update:open":n=>{this.menuBreadcrumbProps.open=n}}},this.hiddenIndices.map(n=>{const c=t[n],d=c.componentOptions.propsData.to,l=c.componentOptions.propsData.href,u=c.componentOptions.propsData.disableDrop,v=c.componentOptions.propsData.title,$=c.componentOptions.propsData.name;let m="NcActionButton",f="";l&&(m="NcActionLink",f=l),d&&(m="NcActionRouter",f=d);const O=e("IconFolder",{props:{size:20},slot:"icon"});return e(m,{class:i,props:{href:l||null,title:v,to:d||null},attrs:{draggable:!1},on:{...c.componentOptions.listeners},nativeOn:{dragstart:this.dragStart,drop:h=>this.dropped(h,f,u),dragover:this.dragOver,dragenter:h=>this.dragEnter(h,u),dragleave:h=>this.dragLeave(h,u)}},[O,$])})));const r=t.slice(Math.round(t.length/2));o=o.concat(r)}const a=[e("nav",{},[e("ul",{class:"breadcrumb__crumbs"},[o])])];return this.$slots.actions&&a.push(e("div",{class:"breadcrumb__actions",ref:"breadcrumb__actions"},this.$slots.actions)),this.breadcrumbsRefs=s,e("div",{class:["breadcrumb",{"breadcrumb--collapsed":this.hiddenIndices.length===t.length-2}],ref:"container"},a)}},E=null,A=null;var I=z.normalizeComponent(N,E,A,!1,null,"e809461d",null,null);const _=I.exports;module.exports=_;
1
+ var T=require("../assets/index-7a7195d0.css");const L=require("./NcActions.cjs"),B=require("./NcActionButton.cjs"),y=require("./NcActionRouter.cjs"),D=require("./NcActionLink.cjs"),q=require("./NcBreadcrumb.cjs"),p=require("vue"),b=require("@nextcloud/event-bus"),R=require("vue-material-design-icons/Folder.vue"),W=require("debounce"),w=require("vue-frag"),z=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs"),g=(e,t,s)=>{if(e!==void 0)for(let o=e.length-1;o>=0;o--){const a=e[o],r=!a.componentOptions&&a.tag&&t.indexOf(a.tag)===-1,n=!!a.componentOptions&&typeof a.componentOptions.tag=="string",c=n&&t.indexOf(a.componentOptions.tag)===-1;(r||!n||c)&&((r||c)&&p.util.warn(`${r?a.tag:a.componentOptions.tag} is not allowed inside the ${s.$options.name} component`,s),e.splice(o,1))}};const i="vue-crumb",N={name:"NcBreadcrumbs",components:{NcActions:L,NcActionButton:B,NcActionRouter:y,NcActionLink:D,NcBreadcrumb:q,IconFolder:R},props:{rootIcon:{type:String,default:"icon-home"}},emits:["dropped"],data(){return{hiddenIndices:[],menuBreadcrumbProps:{name:"",forceMenu:!0,disableDrop:!0,open:!1},breadcrumbsRefs:{}}},beforeMount(){g(this.$slots.default,["NcBreadcrumb"],this)},beforeUpdate(){g(this.$slots.default,["NcBreadcrumb"],this)},created(){window.addEventListener("resize",W(()=>{this.handleWindowResize()},100)),b.subscribe("navigation-toggled",this.delayedResize)},mounted(){this.handleWindowResize()},updated(){this.delayedResize(),this.$nextTick(()=>{this.hideCrumbs()})},beforeDestroy(){window.removeEventListener("resize",this.handleWindowResize),b.unsubscribe("navigation-toggled",this.delayedResize)},methods:{closeActions(e){this.$refs.actionsBreadcrumb.$el.contains(e.relatedTarget)||(this.menuBreadcrumbProps.open=!1)},async delayedResize(){await this.$nextTick(),this.handleWindowResize()},handleWindowResize(){var d;if(!this.$refs.container)return;const e=Object.values(this.breadcrumbsRefs),t=e.length,s=[],o=this.$refs.container.offsetWidth;let a=this.getTotalWidth(e);this.$refs.breadcrumb__actions&&(a+=this.$refs.breadcrumb__actions.offsetWidth);let r=a-o;r+=r>0?64:0;let n=0;const c=Math.floor(t/2);for(;r>0&&n<t-2;){const l=c+(n%2?n+1:n)/2*Math.pow(-1,n+t%2);r-=this.getWidth((d=e[l])==null?void 0:d.elm),s.push(l),n++}this.arraysEqual(this.hiddenIndices,s.sort((l,u)=>l-u))||(this.hiddenIndices=s)},arraysEqual(e,t){if(e.length!==t.length)return!1;if(e===t)return!0;if(e===null||t===null)return!1;for(let s=0;s<e.length;++s)if(e[s]!==t[s])return!1;return!0},getTotalWidth(e){return e.reduce((t,s,o)=>t+this.getWidth(s==null?void 0:s.elm),0)},getWidth(e){if(!(e!=null&&e.classList))return 0;const t=e.classList.contains(`${i}--hidden`);e.style.minWidth="auto",e.classList.remove(`${i}--hidden`);const s=e.offsetWidth;return t&&e.classList.add(`${i}--hidden`),e.style.minWidth="",s},preventDefault(e){return e.preventDefault&&e.preventDefault(),!1},dragStart(e){return this.preventDefault(e)},dropped(e,t,s){return s||this.$emit("dropped",e,t),this.menuBreadcrumbProps.open=!1,document.querySelectorAll(`.${i}`).forEach(o=>{o.classList.remove(`${i}--hovered`)}),this.preventDefault(e)},dragOver(e){return this.preventDefault(e)},dragEnter(e,t){if(!t&&e.target.closest){const s=e.target.closest(`.${i}`);s.classList&&s.classList.contains(i)&&(document.querySelectorAll(`.${i}`).forEach(o=>{o.classList.remove(`${i}--hovered`)}),s.classList.add(`${i}--hovered`))}},dragLeave(e,t){if(!t&&!e.target.contains(e.relatedTarget)&&e.target.closest){const s=e.target.closest(`.${i}`);if(s.contains(e.relatedTarget))return;s.classList&&s.classList.contains(i)&&s.classList.remove(`${i}--hovered`)}},hideCrumbs(){Object.values(this.breadcrumbsRefs).forEach((e,t)=>{var s;(s=e==null?void 0:e.elm)!=null&&s.classList&&(this.hiddenIndices.includes(t)?e.elm.classList.add(`${i}--hidden`):e.elm.classList.remove(`${i}--hidden`))})},isBreadcrumb(e){var t;return(((t=e==null?void 0:e.componentOptions)==null?void 0:t.tag)||(e==null?void 0:e.tag)||"").includes("NcBreadcrumb")}},render(e){const t=[];if(this.$slots.default.forEach(r=>{var n,c;if(this.isBreadcrumb(r)){t.push(r);return}(r==null?void 0:r.type)===w.Fragment&&((c=(n=r==null?void 0:r.children)==null?void 0:n.forEach)==null||c.call(n,d=>{this.isBreadcrumb(d)&&t.push(d)}))}),t.length===0)return;p.set(t[0].componentOptions.propsData,"icon",this.rootIcon),p.set(t[0].componentOptions.propsData,"ref","breadcrumbs");const s={};t.forEach((r,n)=>{p.set(r,"ref",`crumb-${n}`),s[n]=r});let o=[];if(!this.hiddenIndices.length)o=t;else{o=t.slice(0,Math.round(t.length/2)),o.push(e("NcBreadcrumb",{class:"dropdown",props:this.menuBreadcrumbProps,attrs:{"aria-hidden":!0},ref:"actionsBreadcrumb",key:"actions-breadcrumb-1",nativeOn:{dragstart:this.dragStart,dragenter:()=>{this.menuBreadcrumbProps.open=!0},dragleave:this.closeActions},on:{"update:open":n=>{this.menuBreadcrumbProps.open=n}}},this.hiddenIndices.map(n=>{const c=t[n],d=c.componentOptions.propsData.to,l=c.componentOptions.propsData.href,u=c.componentOptions.propsData.disableDrop,v=c.componentOptions.propsData.title,$=c.componentOptions.propsData.name;let m="NcActionButton",f="";l&&(m="NcActionLink",f=l),d&&(m="NcActionRouter",f=d);const O=e("IconFolder",{props:{size:20},slot:"icon"});return e(m,{class:i,props:{href:l||null,title:v,to:d||null},attrs:{draggable:!1},on:{...c.componentOptions.listeners},nativeOn:{dragstart:this.dragStart,drop:h=>this.dropped(h,f,u),dragover:this.dragOver,dragenter:h=>this.dragEnter(h,u),dragleave:h=>this.dragLeave(h,u)}},[O,$])})));const r=t.slice(Math.round(t.length/2));o=o.concat(r)}const a=[e("nav",{},[e("ul",{class:"breadcrumb__crumbs"},[o])])];return this.$slots.actions&&a.push(e("div",{class:"breadcrumb__actions",ref:"breadcrumb__actions"},this.$slots.actions)),this.breadcrumbsRefs=s,e("div",{class:["breadcrumb",{"breadcrumb--collapsed":this.hiddenIndices.length===t.length-2}],ref:"container"},a)}},E=null,A=null;var I=z.normalizeComponent(N,E,A,!1,null,"e809461d",null,null);const _=I.exports;module.exports=_;
@@ -1,4 +1,4 @@
1
- import "../assets/index46.css";
1
+ import "../assets/index-7a7195d0.css";
2
2
  import O from "./NcActions.mjs";
3
3
  import L from "./NcActionButton.mjs";
4
4
  import B from "./NcActionRouter.mjs";
@@ -1 +1 @@
1
- var x=require("../assets/index10.css");const f=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const y={name:"NcButton",props:{alignment:{type:String,default:"center",validator:t=>["start","start-reverse","center","center-reverse","end","end-reverse"].includes(t)},disabled:{type:Boolean,default:!1},type:{type:String,validator(t){return["primary","secondary","tertiary","tertiary-no-background","tertiary-on-primary","error","warning","success"].indexOf(t)!==-1},default:"secondary"},nativeType:{type:String,validator(t){return["submit","reset","button"].indexOf(t)!==-1},default:"button"},wide:{type:Boolean,default:!1},ariaLabel:{type:String,default:null},href:{type:String,default:null},download:{type:String,default:null},to:{type:[String,Object],default:null},exact:{type:Boolean,default:!1},ariaHidden:{type:Boolean,default:null},pressed:{type:Boolean,default:null}},emits:["update:pressed","click"],computed:{realType(){return this.pressed?"primary":this.pressed===!1&&this.type==="primary"?"secondary":this.type},flexAlignment(){return this.alignment.split("-")[0]},isReverseAligned(){return this.alignment.includes("-")}},render(t){var a,o,s,u,d;const e=(u=(s=(o=(a=this.$slots.default)==null?void 0:a[0])==null?void 0:o.text)==null?void 0:s.trim)==null?void 0:u.call(s),n=!!e,i=(d=this.$slots)==null?void 0:d.icon;!e&&!this.ariaLabel&&console.warn("You need to fill either the text or the ariaLabel props in the button component.",{text:e,ariaLabel:this.ariaLabel},this);const l=({navigate:r,isActive:p,isExactActive:c}={})=>t(this.to||!this.href?"button":"a",{class:["button-vue",{"button-vue--icon-only":i&&!n,"button-vue--text-only":n&&!i,"button-vue--icon-and-text":i&&n,[`button-vue--vue-${this.realType}`]:this.realType,"button-vue--wide":this.wide,[`button-vue--${this.flexAlignment}`]:this.flexAlignment!=="center","button-vue--reverse":this.isReverseAligned,active:p,"router-link-exact-active":c}],attrs:{"aria-label":this.ariaLabel,"aria-pressed":this.pressed,disabled:this.disabled,type:this.href?null:this.nativeType,role:this.href?"button":null,href:!this.to&&this.href?this.href:null,target:!this.to&&this.href?"_self":null,rel:!this.to&&this.href?"nofollow noreferrer noopener":null,download:!this.to&&this.href&&this.download?this.download:null,...this.$attrs},on:{...this.$listeners,click:h=>{typeof this.pressed=="boolean"&&this.$emit("update:pressed",!this.pressed),this.$emit("click",h),r==null||r(h)}}},[t("span",{class:"button-vue__wrapper"},[i?t("span",{class:"button-vue__icon",attrs:{"aria-hidden":this.ariaHidden}},[this.$slots.icon]):null,n?t("span",{class:"button-vue__text"},[e]):null])]);return this.to?t("router-link",{props:{custom:!0,to:this.to,exact:this.exact},scopedSlots:{default:l}}):l()}},b=null,v=null;var m=f.normalizeComponent(y,b,v,!1,null,"bb88e612",null,null);const g=m.exports;module.exports=g;
1
+ var x=require("../assets/index-7ffde264.css");const f=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const y={name:"NcButton",props:{alignment:{type:String,default:"center",validator:t=>["start","start-reverse","center","center-reverse","end","end-reverse"].includes(t)},disabled:{type:Boolean,default:!1},type:{type:String,validator(t){return["primary","secondary","tertiary","tertiary-no-background","tertiary-on-primary","error","warning","success"].indexOf(t)!==-1},default:"secondary"},nativeType:{type:String,validator(t){return["submit","reset","button"].indexOf(t)!==-1},default:"button"},wide:{type:Boolean,default:!1},ariaLabel:{type:String,default:null},href:{type:String,default:null},download:{type:String,default:null},to:{type:[String,Object],default:null},exact:{type:Boolean,default:!1},ariaHidden:{type:Boolean,default:null},pressed:{type:Boolean,default:null}},emits:["update:pressed","click"],computed:{realType(){return this.pressed?"primary":this.pressed===!1&&this.type==="primary"?"secondary":this.type},flexAlignment(){return this.alignment.split("-")[0]},isReverseAligned(){return this.alignment.includes("-")}},render(t){var a,o,s,u,d;const e=(u=(s=(o=(a=this.$slots.default)==null?void 0:a[0])==null?void 0:o.text)==null?void 0:s.trim)==null?void 0:u.call(s),n=!!e,i=(d=this.$slots)==null?void 0:d.icon;!e&&!this.ariaLabel&&console.warn("You need to fill either the text or the ariaLabel props in the button component.",{text:e,ariaLabel:this.ariaLabel},this);const l=({navigate:r,isActive:p,isExactActive:c}={})=>t(this.to||!this.href?"button":"a",{class:["button-vue",{"button-vue--icon-only":i&&!n,"button-vue--text-only":n&&!i,"button-vue--icon-and-text":i&&n,[`button-vue--vue-${this.realType}`]:this.realType,"button-vue--wide":this.wide,[`button-vue--${this.flexAlignment}`]:this.flexAlignment!=="center","button-vue--reverse":this.isReverseAligned,active:p,"router-link-exact-active":c}],attrs:{"aria-label":this.ariaLabel,"aria-pressed":this.pressed,disabled:this.disabled,type:this.href?null:this.nativeType,role:this.href?"button":null,href:!this.to&&this.href?this.href:null,target:!this.to&&this.href?"_self":null,rel:!this.to&&this.href?"nofollow noreferrer noopener":null,download:!this.to&&this.href&&this.download?this.download:null,...this.$attrs},on:{...this.$listeners,click:h=>{typeof this.pressed=="boolean"&&this.$emit("update:pressed",!this.pressed),this.$emit("click",h),r==null||r(h)}}},[t("span",{class:"button-vue__wrapper"},[i?t("span",{class:"button-vue__icon",attrs:{"aria-hidden":this.ariaHidden}},[this.$slots.icon]):null,n?t("span",{class:"button-vue__text"},[e]):null])]);return this.to?t("router-link",{props:{custom:!0,to:this.to,exact:this.exact},scopedSlots:{default:l}}):l()}},b=null,v=null;var m=f.normalizeComponent(y,b,v,!1,null,"bb88e612",null,null);const g=m.exports;module.exports=g;
@@ -1,4 +1,4 @@
1
- import "../assets/index47.css";
1
+ import "../assets/index-7ffde264.css";
2
2
  import { n as f } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
3
3
  const y = { name: "NcButton", props: { alignment: { type: String, default: "center", validator: (t) => ["start", "start-reverse", "center", "center-reverse", "end", "end-reverse"].includes(t) }, disabled: { type: Boolean, default: !1 }, type: { type: String, validator(t) {
4
4
  return ["primary", "secondary", "tertiary", "tertiary-no-background", "tertiary-on-primary", "error", "warning", "success"].indexOf(t) !== -1;
@@ -1 +1 @@
1
- var v=require("../assets/index41.css");const s=require("./NcLoadingIcon.cjs"),o=require("../chunks/GenRandomId-67df40eb.cjs"),c=require("../chunks/l10n-dacb6440.cjs"),h=require("vue-material-design-icons/CheckboxBlankOutline.vue"),d=require("vue-material-design-icons/MinusBox.vue"),u=require("vue-material-design-icons/CheckboxMarked.vue"),l=require("vue-material-design-icons/RadioboxMarked.vue"),p=require("vue-material-design-icons/RadioboxBlank.vue"),b=require("vue-material-design-icons/ToggleSwitchOff.vue"),k=require("vue-material-design-icons/ToggleSwitch.vue"),y=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const a="checkbox",r="radio",i="switch",n="button",m={name:"NcCheckboxRadioSwitch",components:{NcLoadingIcon:s},mixins:[c.l10n],props:{id:{type:String,default:()=>"checkbox-radio-switch-"+o.GenRandomId(),validator:e=>e.trim()!==""},name:{type:String,default:null},type:{type:String,default:"checkbox",validator:e=>[a,r,i,n].includes(e)},buttonVariant:{type:Boolean,default:!1},buttonVariantGrouped:{type:String,default:"no",validator:e=>["no","vertical","horizontal"].includes(e)},checked:{type:[Boolean,Array,String],default:!1},value:{type:String,default:null},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},wrapperElement:{type:String,default:"span"}},emits:["update:checked"],computed:{inputProps(){return this.type===n?null:{checked:this.isChecked,indeterminate:this.indeterminate,required:this.required,name:this.name}},inputListeners(){return this.type===n?{click:this.onToggle}:{change:this.onToggle}},size(){return this.type===i?36:24},cssVars(){return{"--icon-size":this.size+"px"}},inputType(){return[a,r,n].includes(this.type)?this.type:a},isChecked(){return this.value!==null?Array.isArray(this.checked)?[...this.checked].indexOf(this.value)>-1:this.checked===this.value:this.checked===!0},checkboxRadioIconElement(){return this.type===r?this.isChecked?l:p:this.type===i?this.isChecked?k:b:this.indeterminate?d:this.isChecked?u:h}},mounted(){if(this.name&&this.type===a&&!Array.isArray(this.checked))throw new Error("When using groups of checkboxes, the updated value will be an array.");if(this.name&&this.type===i)throw new Error("Switches are not made to be used for data sets. Please use checkboxes instead.");if(typeof this.checked!="boolean"&&this.type===i)throw new Error("Switches can only be used with boolean as checked prop.")},methods:{onToggle(){if(this.disabled)return;if(this.type===r){this.$emit("update:checked",this.value);return}if(this.type===i){this.$emit("update:checked",!this.isChecked);return}if(typeof this.checked=="boolean"){this.$emit("update:checked",!this.isChecked);return}const e=this.getInputsSet().filter(t=>t.checked).map(t=>t.value);this.$emit("update:checked",e)},getInputsSet(){return[...document.getElementsByName(this.name)]}}};var f=function(){var e=this,t=e._self._c;return t(e.wrapperElement,{tag:"component",staticClass:"checkbox-radio-switch",class:{["checkbox-radio-switch-"+e.type]:e.type,"checkbox-radio-switch--checked":e.isChecked,"checkbox-radio-switch--disabled":e.disabled,"checkbox-radio-switch--indeterminate":e.indeterminate,"checkbox-radio-switch--button-variant":e.buttonVariant,"checkbox-radio-switch--button-variant-v-grouped":e.buttonVariant&&e.buttonVariantGrouped==="vertical","checkbox-radio-switch--button-variant-h-grouped":e.buttonVariant&&e.buttonVariantGrouped==="horizontal"},style:e.cssVars},[t("input",e._g(e._b({staticClass:"checkbox-radio-switch__input",attrs:{id:e.id,disabled:e.disabled,type:e.inputType},domProps:{value:e.value}},"input",e.inputProps,!1),e.inputListeners)),t("label",{staticClass:"checkbox-radio-switch__label",attrs:{for:e.id}},[t("div",{staticClass:"checkbox-radio-switch__icon"},[e._t("icon",function(){return[e.loading?t("NcLoadingIcon"):e.buttonVariant?e._e():t(e.checkboxRadioIconElement,{tag:"component",attrs:{size:e.size}})]},{checked:e.isChecked,loading:e.loading})],2),t("span",{staticClass:"checkbox-radio-switch__label-text"},[e._t("default")],2)])])},g=[],w=y.normalizeComponent(m,f,g,!1,null,"a6f82e18",null,null);const x=w.exports;module.exports=x;
1
+ var v=require("../assets/index-6cb0dc4a.css");const s=require("./NcLoadingIcon.cjs"),o=require("../chunks/GenRandomId-67df40eb.cjs"),c=require("../chunks/l10n-dacb6440.cjs"),h=require("vue-material-design-icons/CheckboxBlankOutline.vue"),d=require("vue-material-design-icons/MinusBox.vue"),u=require("vue-material-design-icons/CheckboxMarked.vue"),l=require("vue-material-design-icons/RadioboxMarked.vue"),p=require("vue-material-design-icons/RadioboxBlank.vue"),b=require("vue-material-design-icons/ToggleSwitchOff.vue"),k=require("vue-material-design-icons/ToggleSwitch.vue"),y=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const a="checkbox",r="radio",i="switch",n="button",m={name:"NcCheckboxRadioSwitch",components:{NcLoadingIcon:s},mixins:[c.l10n],props:{id:{type:String,default:()=>"checkbox-radio-switch-"+o.GenRandomId(),validator:e=>e.trim()!==""},name:{type:String,default:null},type:{type:String,default:"checkbox",validator:e=>[a,r,i,n].includes(e)},buttonVariant:{type:Boolean,default:!1},buttonVariantGrouped:{type:String,default:"no",validator:e=>["no","vertical","horizontal"].includes(e)},checked:{type:[Boolean,Array,String],default:!1},value:{type:String,default:null},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},wrapperElement:{type:String,default:"span"}},emits:["update:checked"],computed:{inputProps(){return this.type===n?null:{checked:this.isChecked,indeterminate:this.indeterminate,required:this.required,name:this.name}},inputListeners(){return this.type===n?{click:this.onToggle}:{change:this.onToggle}},size(){return this.type===i?36:24},cssVars(){return{"--icon-size":this.size+"px"}},inputType(){return[a,r,n].includes(this.type)?this.type:a},isChecked(){return this.value!==null?Array.isArray(this.checked)?[...this.checked].indexOf(this.value)>-1:this.checked===this.value:this.checked===!0},checkboxRadioIconElement(){return this.type===r?this.isChecked?l:p:this.type===i?this.isChecked?k:b:this.indeterminate?d:this.isChecked?u:h}},mounted(){if(this.name&&this.type===a&&!Array.isArray(this.checked))throw new Error("When using groups of checkboxes, the updated value will be an array.");if(this.name&&this.type===i)throw new Error("Switches are not made to be used for data sets. Please use checkboxes instead.");if(typeof this.checked!="boolean"&&this.type===i)throw new Error("Switches can only be used with boolean as checked prop.")},methods:{onToggle(){if(this.disabled)return;if(this.type===r){this.$emit("update:checked",this.value);return}if(this.type===i){this.$emit("update:checked",!this.isChecked);return}if(typeof this.checked=="boolean"){this.$emit("update:checked",!this.isChecked);return}const e=this.getInputsSet().filter(t=>t.checked).map(t=>t.value);this.$emit("update:checked",e)},getInputsSet(){return[...document.getElementsByName(this.name)]}}};var f=function(){var e=this,t=e._self._c;return t(e.wrapperElement,{tag:"component",staticClass:"checkbox-radio-switch",class:{["checkbox-radio-switch-"+e.type]:e.type,"checkbox-radio-switch--checked":e.isChecked,"checkbox-radio-switch--disabled":e.disabled,"checkbox-radio-switch--indeterminate":e.indeterminate,"checkbox-radio-switch--button-variant":e.buttonVariant,"checkbox-radio-switch--button-variant-v-grouped":e.buttonVariant&&e.buttonVariantGrouped==="vertical","checkbox-radio-switch--button-variant-h-grouped":e.buttonVariant&&e.buttonVariantGrouped==="horizontal"},style:e.cssVars},[t("input",e._g(e._b({staticClass:"checkbox-radio-switch__input",attrs:{id:e.id,disabled:e.disabled,type:e.inputType},domProps:{value:e.value}},"input",e.inputProps,!1),e.inputListeners)),t("label",{staticClass:"checkbox-radio-switch__label",attrs:{for:e.id}},[t("div",{staticClass:"checkbox-radio-switch__icon"},[e._t("icon",function(){return[e.loading?t("NcLoadingIcon"):e.buttonVariant?e._e():t(e.checkboxRadioIconElement,{tag:"component",attrs:{size:e.size}})]},{checked:e.isChecked,loading:e.loading})],2),t("span",{staticClass:"checkbox-radio-switch__label-text"},[e._t("default")],2)])])},g=[],w=y.normalizeComponent(m,f,g,!1,null,"a6f82e18",null,null);const x=w.exports;module.exports=x;
@@ -1,4 +1,4 @@
1
- import "../assets/index45.css";
1
+ import "../assets/index-6cb0dc4a.css";
2
2
  import s from "./NcLoadingIcon.mjs";
3
3
  import { G as n } from "../chunks/GenRandomId-1e1b509a.mjs";
4
4
  import { l as c } from "../chunks/l10n-05baf7da.mjs";
@@ -1 +1 @@
1
- var y=require("../assets/index40.css");const n=require("./NcButton.cjs"),c=require("./NcPopover.cjs"),o=require("../chunks/l10n-46d0c1c0.cjs"),l=require("../chunks/GenColors-8097de04.cjs"),s=require("vue-material-design-icons/ArrowLeft.vue"),u=require("vue-material-design-icons/Check.vue"),d=require("vue-material-design-icons/DotsHorizontal.vue"),p=require("vue-color"),h=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const a=function(e){const t=e.toString(16);return t.length===1?"0"+t:t},v={name:"NcColorPicker",components:{ArrowLeft:s,Check:u,Chrome:p.Chrome,DotsHorizontal:d,NcButton:n,NcPopover:c},props:{value:{type:String,required:!0},advancedFields:{type:Boolean,default:!1},palette:{type:Array,default:()=>l.GenColors(4).map(e=>"#"+a(e.r)+a(e.g)+a(e.b)),validator(e){return e.every(t=>/^#([a-f0-9]{3}|[a-f0-9]{6})$/i.test(t))}}},emits:["submit","close","update:open","update:value","input"],data(){return{currentColor:this.value,advanced:!1,ariaBack:o.t("Back"),ariaMore:o.t("More options")}},watch:{value(e){this.currentColor=e}},methods:{t:o.t,handleConfirm(){this.$emit("submit",this.currentColor),this.handleClose(),this.advanced=!1},handleClose(){this.$emit("close"),this.$emit("update:open",!1)},handleBack(){this.advanced=!1},handleMoreSettings(){this.advanced=!0},pickColor(e){typeof e!="string"&&(e=this.currentColor.hex),this.currentColor=e,this.$emit("update:value",e),this.$emit("input",e)}}};var C=function(){var e=this,t=e._self._c;return t("NcPopover",e._g(e._b({on:{"apply-hide":e.handleClose},scopedSlots:e._u([{key:"trigger",fn:function(){return[e._t("default")]},proxy:!0}],null,!0)},"NcPopover",e.$attrs,!1),e.$listeners),[t("div",{staticClass:"color-picker",class:{"color-picker--advanced-fields":e.advanced&&e.advancedFields}},[t("transition",{attrs:{name:"slide",mode:"out-in"}},[e.advanced?e._e():t("div",{staticClass:"color-picker__simple"},e._l(e.palette,function(r,i){return t("button",{key:i,staticClass:"color-picker__simple-color-circle",class:{"color-picker__simple-color-circle--active":r===e.currentColor},style:{"background-color":r},attrs:{type:"button"},on:{click:function(f){return e.pickColor(r)}}},[r===e.currentColor?t("Check",{attrs:{size:20}}):e._e()],1)}),0),e.advanced?t("Chrome",{staticClass:"color-picker__advanced",attrs:{"disable-alpha":!0,"disable-fields":!e.advancedFields},on:{input:e.pickColor},model:{value:e.currentColor,callback:function(r){e.currentColor=r},expression:"currentColor"}}):e._e()],1),t("div",{staticClass:"color-picker__navigation"},[e.advanced?t("NcButton",{attrs:{type:"tertiary","aria-label":e.ariaBack},on:{click:e.handleBack},scopedSlots:e._u([{key:"icon",fn:function(){return[t("ArrowLeft",{attrs:{size:20}})]},proxy:!0}],null,!1,1821202730)}):e._e(),e.advanced?e._e():t("NcButton",{attrs:{type:"tertiary","aria-label":e.ariaMore},on:{click:e.handleMoreSettings},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DotsHorizontal",{attrs:{size:20}})]},proxy:!0}],null,!1,1056868794)}),e.advanced?t("NcButton",{attrs:{type:"primary"},on:{click:e.handleConfirm}},[e._v(" "+e._s(e.t("Choose"))+" ")]):e._e()],1)],1)])},k=[],m=h.normalizeComponent(v,C,k,!1,null,"c959ec5a",null,null);const _=m.exports;module.exports=_;
1
+ var y=require("../assets/index-afc15e11.css");const n=require("./NcButton.cjs"),c=require("./NcPopover.cjs"),o=require("../chunks/l10n-46d0c1c0.cjs"),l=require("../chunks/GenColors-8097de04.cjs"),s=require("vue-material-design-icons/ArrowLeft.vue"),u=require("vue-material-design-icons/Check.vue"),d=require("vue-material-design-icons/DotsHorizontal.vue"),p=require("vue-color"),h=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const a=function(e){const t=e.toString(16);return t.length===1?"0"+t:t},v={name:"NcColorPicker",components:{ArrowLeft:s,Check:u,Chrome:p.Chrome,DotsHorizontal:d,NcButton:n,NcPopover:c},props:{value:{type:String,required:!0},advancedFields:{type:Boolean,default:!1},palette:{type:Array,default:()=>l.GenColors(4).map(e=>"#"+a(e.r)+a(e.g)+a(e.b)),validator(e){return e.every(t=>/^#([a-f0-9]{3}|[a-f0-9]{6})$/i.test(t))}}},emits:["submit","close","update:open","update:value","input"],data(){return{currentColor:this.value,advanced:!1,ariaBack:o.t("Back"),ariaMore:o.t("More options")}},watch:{value(e){this.currentColor=e}},methods:{t:o.t,handleConfirm(){this.$emit("submit",this.currentColor),this.handleClose(),this.advanced=!1},handleClose(){this.$emit("close"),this.$emit("update:open",!1)},handleBack(){this.advanced=!1},handleMoreSettings(){this.advanced=!0},pickColor(e){typeof e!="string"&&(e=this.currentColor.hex),this.currentColor=e,this.$emit("update:value",e),this.$emit("input",e)}}};var C=function(){var e=this,t=e._self._c;return t("NcPopover",e._g(e._b({on:{"apply-hide":e.handleClose},scopedSlots:e._u([{key:"trigger",fn:function(){return[e._t("default")]},proxy:!0}],null,!0)},"NcPopover",e.$attrs,!1),e.$listeners),[t("div",{staticClass:"color-picker",class:{"color-picker--advanced-fields":e.advanced&&e.advancedFields}},[t("transition",{attrs:{name:"slide",mode:"out-in"}},[e.advanced?e._e():t("div",{staticClass:"color-picker__simple"},e._l(e.palette,function(r,i){return t("button",{key:i,staticClass:"color-picker__simple-color-circle",class:{"color-picker__simple-color-circle--active":r===e.currentColor},style:{"background-color":r},attrs:{type:"button"},on:{click:function(f){return e.pickColor(r)}}},[r===e.currentColor?t("Check",{attrs:{size:20}}):e._e()],1)}),0),e.advanced?t("Chrome",{staticClass:"color-picker__advanced",attrs:{"disable-alpha":!0,"disable-fields":!e.advancedFields},on:{input:e.pickColor},model:{value:e.currentColor,callback:function(r){e.currentColor=r},expression:"currentColor"}}):e._e()],1),t("div",{staticClass:"color-picker__navigation"},[e.advanced?t("NcButton",{attrs:{type:"tertiary","aria-label":e.ariaBack},on:{click:e.handleBack},scopedSlots:e._u([{key:"icon",fn:function(){return[t("ArrowLeft",{attrs:{size:20}})]},proxy:!0}],null,!1,1821202730)}):e._e(),e.advanced?e._e():t("NcButton",{attrs:{type:"tertiary","aria-label":e.ariaMore},on:{click:e.handleMoreSettings},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DotsHorizontal",{attrs:{size:20}})]},proxy:!0}],null,!1,1056868794)}),e.advanced?t("NcButton",{attrs:{type:"primary"},on:{click:e.handleConfirm}},[e._v(" "+e._s(e.t("Choose"))+" ")]):e._e()],1)],1)])},k=[],m=h.normalizeComponent(v,C,k,!1,null,"c959ec5a",null,null);const _=m.exports;module.exports=_;
@@ -1,4 +1,4 @@
1
- import "../assets/index4.css";
1
+ import "../assets/index-afc15e11.css";
2
2
  import n from "./NcButton.mjs";
3
3
  import c from "./NcPopover.mjs";
4
4
  import { t as o } from "../chunks/l10n-9a5a6afc.mjs";
@@ -1 +1 @@
1
- var l=require("../assets/index39.css");const r=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const n={props:{appName:{type:String,required:!0}}};var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"content",class:`app-${t.appName.toLowerCase()}`,attrs:{id:"content-vue"}},[t._t("default")],2)},a=[],o=r.normalizeComponent(n,s,a,!1,null,"eb1078f7",null,null);const p=o.exports;module.exports=p;
1
+ var l=require("../assets/index-81f5e4c8.css");const r=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const n={props:{appName:{type:String,required:!0}}};var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"content",class:`app-${t.appName.toLowerCase()}`,attrs:{id:"content-vue"}},[t._t("default")],2)},a=[],o=r.normalizeComponent(n,s,a,!1,null,"eb1078f7",null,null);const p=o.exports;module.exports=p;
@@ -1,4 +1,4 @@
1
- import "../assets/index20.css";
1
+ import "../assets/index-81f5e4c8.css";
2
2
  import { n as a } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
3
3
  const r = { props: { appName: { type: String, required: !0 } } };
4
4
  var s = function() {
@@ -1 +1 @@
1
- var c=require("../assets/index38.css");const n=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const u={name:"NcCounterBubble",props:{type:{type:String,default:"",validator(t){return["highlighted","outlined",""].indexOf(t)!==-1}},active:{type:Boolean,default:!1}},computed:{counterClassObject(){return{"counter-bubble__counter--highlighted":this.type==="highlighted","counter-bubble__counter--outlined":this.type==="outlined",active:this.active}}}};var l=function(){var t=this,e=t._self._c;return e("div",{staticClass:"counter-bubble__counter",class:t.counterClassObject},[t._t("default")],2)},r=[],o=n.normalizeComponent(u,l,r,!1,null,"d96bcd79",null,null);const i=o.exports;module.exports=i;
1
+ var c=require("../assets/index-37970f20.css");const n=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const u={name:"NcCounterBubble",props:{type:{type:String,default:"",validator(t){return["highlighted","outlined",""].indexOf(t)!==-1}},active:{type:Boolean,default:!1}},computed:{counterClassObject(){return{"counter-bubble__counter--highlighted":this.type==="highlighted","counter-bubble__counter--outlined":this.type==="outlined",active:this.active}}}};var l=function(){var t=this,e=t._self._c;return e("div",{staticClass:"counter-bubble__counter",class:t.counterClassObject},[t._t("default")],2)},r=[],o=n.normalizeComponent(u,l,r,!1,null,"d96bcd79",null,null);const i=o.exports;module.exports=i;
@@ -1,4 +1,4 @@
1
- import "../assets/index19.css";
1
+ import "../assets/index-37970f20.css";
2
2
  import { n as u } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
3
3
  const l = { name: "NcCounterBubble", props: { type: { type: String, default: "", validator(t) {
4
4
  return ["highlighted", "outlined", ""].indexOf(t) !== -1;
@@ -1 +1 @@
1
- var d=require("../assets/index57.css");const s=require("../chunks/index-12fa9b26.cjs"),r=require("./NcDashboardWidgetItem.cjs"),i=require("./NcEmptyContent.cjs"),a=require("vue-material-design-icons/Check.vue"),o=require("../chunks/l10n-46d0c1c0.cjs"),m=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const l={name:"NcDashboardWidget",components:{NcAvatar:s.NcAvatar,NcDashboardWidgetItem:r,NcEmptyContent:i,Check:a},props:{items:{type:Array,default:()=>[]},showMoreUrl:{type:String,default:""},showMoreLabel:{type:String,default:o.t("More items …")},loading:{type:Boolean,default:!1},itemMenu:{type:Object,default:()=>({})},showItemsAndEmptyContent:{type:Boolean,default:!1},emptyContentMessage:{type:String,default:""},halfEmptyContentMessage:{type:String,default:""}},computed:{handlers(){const t={};for(const e in this.itemMenu)t[e]=n=>{this.$emit(e,n)};return t},displayedItems(){const t=this.showMoreUrl&&this.items.length>=this.maxItemNumber?this.maxItemNumber-1:this.maxItemNumber;return this.items.slice(0,t)},showHalfEmptyContentArea(){return this.showItemsAndEmptyContent&&this.halfEmptyContentString&&this.items.length!==0},halfEmptyContentString(){return this.halfEmptyContentMessage||this.emptyContentMessage},maxItemNumber(){return this.showItemsAndEmptyContent?5:7},showMore(){return this.showMoreUrl&&this.items.length>=this.maxItemNumber}}};var u=function(){var t=this,e=t._self._c;return e("div",{staticClass:"dashboard-widget"},[t.showHalfEmptyContentArea?e("NcEmptyContent",{staticClass:"half-screen",attrs:{description:t.halfEmptyContentString},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("halfEmptyContentIcon",function(){return[e("Check")]})]},proxy:!0}],null,!0)}):t._e(),e("ul",t._l(t.displayedItems,function(n){return e("li",{key:n.id},[t._t("default",function(){return[e("NcDashboardWidgetItem",t._g(t._b({attrs:{"item-menu":t.itemMenu}},"NcDashboardWidgetItem",n,!1),t.handlers))]},{item:n})],2)}),0),t.loading?e("div",t._l(7,function(n){return e("div",{key:n,staticClass:"item-list__entry"},[e("NcAvatar",{staticClass:"item-avatar",attrs:{size:44}}),t._m(0,!0)],1)}),0):t.items.length===0?t._t("empty-content",function(){return[t.emptyContentMessage?e("NcEmptyContent",{attrs:{description:t.emptyContentMessage},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("emptyContentIcon")]},proxy:!0}],null,!0)}):t._e()]}):t.showMore?e("a",{staticClass:"more",attrs:{href:t.showMoreUrl,target:"_blank",tabindex:"0"}},[t._v(" "+t._s(t.showMoreLabel)+" ")]):t._e()],2)},h=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"item__details"},[e("h3",[t._v(" ")]),e("p",{staticClass:"message"},[t._v("   ")])])}],c=m.normalizeComponent(l,u,h,!1,null,"1efcbeee",null,null);const p=c.exports;module.exports=p;
1
+ var d=require("../assets/index-6140ff62.css");const s=require("../chunks/index-cebd6e80.cjs"),r=require("./NcDashboardWidgetItem.cjs"),i=require("./NcEmptyContent.cjs"),a=require("vue-material-design-icons/Check.vue"),o=require("../chunks/l10n-46d0c1c0.cjs"),m=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const l={name:"NcDashboardWidget",components:{NcAvatar:s.NcAvatar,NcDashboardWidgetItem:r,NcEmptyContent:i,Check:a},props:{items:{type:Array,default:()=>[]},showMoreUrl:{type:String,default:""},showMoreLabel:{type:String,default:o.t("More items …")},loading:{type:Boolean,default:!1},itemMenu:{type:Object,default:()=>({})},showItemsAndEmptyContent:{type:Boolean,default:!1},emptyContentMessage:{type:String,default:""},halfEmptyContentMessage:{type:String,default:""}},computed:{handlers(){const t={};for(const e in this.itemMenu)t[e]=n=>{this.$emit(e,n)};return t},displayedItems(){const t=this.showMoreUrl&&this.items.length>=this.maxItemNumber?this.maxItemNumber-1:this.maxItemNumber;return this.items.slice(0,t)},showHalfEmptyContentArea(){return this.showItemsAndEmptyContent&&this.halfEmptyContentString&&this.items.length!==0},halfEmptyContentString(){return this.halfEmptyContentMessage||this.emptyContentMessage},maxItemNumber(){return this.showItemsAndEmptyContent?5:7},showMore(){return this.showMoreUrl&&this.items.length>=this.maxItemNumber}}};var u=function(){var t=this,e=t._self._c;return e("div",{staticClass:"dashboard-widget"},[t.showHalfEmptyContentArea?e("NcEmptyContent",{staticClass:"half-screen",attrs:{description:t.halfEmptyContentString},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("halfEmptyContentIcon",function(){return[e("Check")]})]},proxy:!0}],null,!0)}):t._e(),e("ul",t._l(t.displayedItems,function(n){return e("li",{key:n.id},[t._t("default",function(){return[e("NcDashboardWidgetItem",t._g(t._b({attrs:{"item-menu":t.itemMenu}},"NcDashboardWidgetItem",n,!1),t.handlers))]},{item:n})],2)}),0),t.loading?e("div",t._l(7,function(n){return e("div",{key:n,staticClass:"item-list__entry"},[e("NcAvatar",{staticClass:"item-avatar",attrs:{size:44}}),t._m(0,!0)],1)}),0):t.items.length===0?t._t("empty-content",function(){return[t.emptyContentMessage?e("NcEmptyContent",{attrs:{description:t.emptyContentMessage},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("emptyContentIcon")]},proxy:!0}],null,!0)}):t._e()]}):t.showMore?e("a",{staticClass:"more",attrs:{href:t.showMoreUrl,target:"_blank",tabindex:"0"}},[t._v(" "+t._s(t.showMoreLabel)+" ")]):t._e()],2)},h=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"item__details"},[e("h3",[t._v(" ")]),e("p",{staticClass:"message"},[t._v("   ")])])}],c=m.normalizeComponent(l,u,h,!1,null,"1efcbeee",null,null);const p=c.exports;module.exports=p;
@@ -1,5 +1,5 @@
1
- import "../assets/index18.css";
2
- import { N as s } from "../chunks/index-7aa3fc24.mjs";
1
+ import "../assets/index-6140ff62.css";
2
+ import { N as s } from "../chunks/index-197226c7.mjs";
3
3
  import r from "./NcDashboardWidgetItem.mjs";
4
4
  import o from "./NcEmptyContent.mjs";
5
5
  import a from "vue-material-design-icons/Check.vue";
@@ -1 +1 @@
1
- var f=require("../assets/index55.css");const i=require("../chunks/index-12fa9b26.cjs"),o=require("./NcActions.cjs"),s=require("./NcActionButton.cjs"),l=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const c={name:"NcDashboardWidgetItem",components:{NcAvatar:i.NcAvatar,NcActions:o,NcActionButton:s},props:{id:{type:[String,Number],default:void 0},targetUrl:{type:String,default:void 0},avatarUrl:{type:String,default:void 0},avatarUsername:{type:String,default:void 0},avatarIsNoUser:{type:Boolean,default:!1},overlayIconUrl:{type:String,default:void 0},mainText:{type:String,required:!0},subText:{type:String,default:""},itemMenu:{type:Object,default:()=>({})},forceMenu:{type:Boolean,default:!0}},data(){return{hovered:!1}},computed:{item(){return{id:this.id,targetUrl:this.targetUrl,avatarUrl:this.avatarUrl,avatarUsername:this.avatarUsername,overlayIconUrl:this.overlayIconUrl,mainText:this.mainText,subText:this.subText}},gotMenu(){return Object.keys(this.itemMenu).length!==0||!!this.$slots.actions},gotOverlayIcon(){return this.overlayIconUrl&&this.overlayIconUrl!==""}},methods:{onLinkClick(t){t.target.closest(".action-item")&&t.preventDefault()}}};var u=function(){var t=this,e=t._self._c;return e("div",{on:{mouseover:function(a){t.hovered=!0},mouseleave:function(a){t.hovered=!1}}},[e(t.targetUrl?"a":"div",{tag:"component",class:{"item-list__entry":!0,"item-list__entry--has-actions-menu":t.gotMenu},attrs:{href:t.targetUrl,target:t.targetUrl?"_blank":void 0},on:{click:t.onLinkClick}},[t._t("avatar",function(){return[e("NcAvatar",{staticClass:"item-avatar",attrs:{size:44,url:t.avatarUrl,user:t.avatarUsername,"is-no-user":t.avatarIsNoUser,"show-user-status":!t.gotOverlayIcon}})]},{avatarUrl:t.avatarUrl,avatarUsername:t.avatarUsername}),t.overlayIconUrl?e("img",{staticClass:"item-icon",attrs:{alt:"",src:t.overlayIconUrl}}):t._e(),e("div",{staticClass:"item__details"},[e("h3",{attrs:{title:t.mainText}},[t._v(" "+t._s(t.mainText)+" ")]),e("span",{staticClass:"message",attrs:{title:t.subText}},[t._v(" "+t._s(t.subText)+" ")])]),t.gotMenu?e("NcActions",{attrs:{"force-menu":t.forceMenu}},[t._t("actions",function(){return t._l(t.itemMenu,function(a,r){return e("NcActionButton",{key:r,attrs:{icon:a.icon,"close-after-click":!0},on:{click:function(n){return n.preventDefault(),n.stopPropagation(),t.$emit(r,t.item)}}},[t._v(" "+t._s(a.text)+" ")])})})],2):t._e()],2)],1)},v=[],m=l.normalizeComponent(c,u,v,!1,null,"2ff3cd9a",null,null);const d=m.exports;module.exports=d;
1
+ var f=require("../assets/index-a8c5cf75.css");const i=require("../chunks/index-cebd6e80.cjs"),o=require("./NcActions.cjs"),s=require("./NcActionButton.cjs"),l=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const c={name:"NcDashboardWidgetItem",components:{NcAvatar:i.NcAvatar,NcActions:o,NcActionButton:s},props:{id:{type:[String,Number],default:void 0},targetUrl:{type:String,default:void 0},avatarUrl:{type:String,default:void 0},avatarUsername:{type:String,default:void 0},avatarIsNoUser:{type:Boolean,default:!1},overlayIconUrl:{type:String,default:void 0},mainText:{type:String,required:!0},subText:{type:String,default:""},itemMenu:{type:Object,default:()=>({})},forceMenu:{type:Boolean,default:!0}},data(){return{hovered:!1}},computed:{item(){return{id:this.id,targetUrl:this.targetUrl,avatarUrl:this.avatarUrl,avatarUsername:this.avatarUsername,overlayIconUrl:this.overlayIconUrl,mainText:this.mainText,subText:this.subText}},gotMenu(){return Object.keys(this.itemMenu).length!==0||!!this.$slots.actions},gotOverlayIcon(){return this.overlayIconUrl&&this.overlayIconUrl!==""}},methods:{onLinkClick(t){t.target.closest(".action-item")&&t.preventDefault()}}};var u=function(){var t=this,e=t._self._c;return e("div",{on:{mouseover:function(a){t.hovered=!0},mouseleave:function(a){t.hovered=!1}}},[e(t.targetUrl?"a":"div",{tag:"component",class:{"item-list__entry":!0,"item-list__entry--has-actions-menu":t.gotMenu},attrs:{href:t.targetUrl,target:t.targetUrl?"_blank":void 0},on:{click:t.onLinkClick}},[t._t("avatar",function(){return[e("NcAvatar",{staticClass:"item-avatar",attrs:{size:44,url:t.avatarUrl,user:t.avatarUsername,"is-no-user":t.avatarIsNoUser,"show-user-status":!t.gotOverlayIcon}})]},{avatarUrl:t.avatarUrl,avatarUsername:t.avatarUsername}),t.overlayIconUrl?e("img",{staticClass:"item-icon",attrs:{alt:"",src:t.overlayIconUrl}}):t._e(),e("div",{staticClass:"item__details"},[e("h3",{attrs:{title:t.mainText}},[t._v(" "+t._s(t.mainText)+" ")]),e("span",{staticClass:"message",attrs:{title:t.subText}},[t._v(" "+t._s(t.subText)+" ")])]),t.gotMenu?e("NcActions",{attrs:{"force-menu":t.forceMenu}},[t._t("actions",function(){return t._l(t.itemMenu,function(a,r){return e("NcActionButton",{key:r,attrs:{icon:a.icon,"close-after-click":!0},on:{click:function(n){return n.preventDefault(),n.stopPropagation(),t.$emit(r,t.item)}}},[t._v(" "+t._s(a.text)+" ")])})})],2):t._e()],2)],1)},v=[],m=l.normalizeComponent(c,u,v,!1,null,"2ff3cd9a",null,null);const d=m.exports;module.exports=d;
@@ -1,5 +1,5 @@
1
- import "../assets/index17.css";
2
- import { N as o } from "../chunks/index-7aa3fc24.mjs";
1
+ import "../assets/index-a8c5cf75.css";
2
+ import { N as o } from "../chunks/index-197226c7.mjs";
3
3
  import i from "./NcActions.mjs";
4
4
  import s from "./NcActionButton.mjs";
5
5
  import { n as l } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
@@ -1 +1 @@
1
- "use strict";const s=require("@nextcloud/l10n"),n=require("../chunks/l10n-46d0c1c0.cjs"),m=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs"),l={long:n.t("a few seconds ago"),short:n.t("seconds ago"),narrow:n.t("sec. ago")},d={name:"NcDatetime",props:{timestamp:{type:[Date,Number],required:!0},format:{type:Object,default:()=>({timeStyle:"medium",dateStyle:"short"})},relativeTime:{type:[Boolean,String],default:"long",validator:t=>t===!1||["long","short","narrow"].includes(t)},ignoreSeconds:{type:Boolean,default:!1}},data(){return{currentTime:Date.now(),intervalId:void 0}},computed:{dateObject(){return new Date(this.timestamp)},formattedTime(){if(this.relativeTime!==!1){const t=new Intl.RelativeTimeFormat(s.getCanonicalLocale(),{numeric:"auto",style:this.relativeTime}),e=(this.dateObject-new Date(this.currentTime))/1e3;if(Math.abs(e)<=90)return this.ignoreSeconds?l[this.relativeTime]:t.format(Math.round(e),"second");const a=e/60;if(Math.abs(a)<=90)return t.format(Math.round(a),"minute");const i=a/60;if(Math.abs(i)<=72)return t.format(Math.round(i),"hour");const r=i/24;if(Math.abs(r)<=6)return t.format(Math.round(r),"day");const o=r/7;return Math.abs(o)<=52?t.format(Math.round(o),"week"):t.format(Math.round(r/365),"year")}return this.formattedFullTime},formattedFullTime(){return new Intl.DateTimeFormat(s.getCanonicalLocale(),this.format).format(this.dateObject)}},watch:{relativeTime(t,e){window.clearInterval(this.intervalId),this.intervalId=void 0,t&&(this.intervalId=window.setInterval(this.setCurrentTime,1e3))}},mounted(){this.relativeTime!==!1&&(this.intervalId=window.setInterval(this.setCurrentTime,1e3))},destroyed(){window.clearInterval(this.intervalId)},methods:{setCurrentTime(){this.currentTime=Date.now()}}};var u=function(){var t=this,e=t._self._c;return e("span",{staticClass:"nc-datetime",attrs:{"data-timestamp":t.timestamp,title:t.formattedFullTime}},[t._v(t._s(t.formattedTime))])},h=[],c=m.normalizeComponent(d,u,h,!1,null,null,null,null);const f=c.exports;module.exports=f;
1
+ "use strict";const s=require("@nextcloud/l10n"),n=require("../chunks/l10n-46d0c1c0.cjs"),m=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs"),l={long:n.t("a few seconds ago"),short:n.t("seconds ago"),narrow:n.t("sec. ago")},d={name:"NcDateTime",props:{timestamp:{type:[Date,Number],required:!0},format:{type:Object,default:()=>({timeStyle:"medium",dateStyle:"short"})},relativeTime:{type:[Boolean,String],default:"long",validator:t=>t===!1||["long","short","narrow"].includes(t)},ignoreSeconds:{type:Boolean,default:!1}},data(){return{currentTime:Date.now(),intervalId:void 0}},computed:{dateObject(){return new Date(this.timestamp)},formattedTime(){if(this.relativeTime!==!1){const t=new Intl.RelativeTimeFormat(s.getCanonicalLocale(),{numeric:"auto",style:this.relativeTime}),e=(this.dateObject-new Date(this.currentTime))/1e3;if(Math.abs(e)<=90)return this.ignoreSeconds?l[this.relativeTime]:t.format(Math.round(e),"second");const a=e/60;if(Math.abs(a)<=90)return t.format(Math.round(a),"minute");const i=a/60;if(Math.abs(i)<=72)return t.format(Math.round(i),"hour");const r=i/24;if(Math.abs(r)<=6)return t.format(Math.round(r),"day");const o=r/7;return Math.abs(o)<=52?t.format(Math.round(o),"week"):t.format(Math.round(r/365),"year")}return this.formattedFullTime},formattedFullTime(){return new Intl.DateTimeFormat(s.getCanonicalLocale(),this.format).format(this.dateObject)}},watch:{relativeTime(t,e){window.clearInterval(this.intervalId),this.intervalId=void 0,t&&(this.intervalId=window.setInterval(this.setCurrentTime,1e3))}},mounted(){this.relativeTime!==!1&&(this.intervalId=window.setInterval(this.setCurrentTime,1e3))},destroyed(){window.clearInterval(this.intervalId)},methods:{setCurrentTime(){this.currentTime=Date.now()}}};var u=function(){var t=this,e=t._self._c;return e("span",{staticClass:"nc-datetime",attrs:{"data-timestamp":t.timestamp,title:t.formattedFullTime}},[t._v(t._s(t.formattedTime))])},h=[],c=m.normalizeComponent(d,u,h,!1,null,null,null,null);const f=c.exports;module.exports=f;
@@ -1 +1 @@
1
- {"version":3,"file":"NcDatetime.cjs","sources":["../../src/components/NcDatetime/NcDatetime.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n\n### General description\n\nThis components purpose is to display a timestamp in the users local time format.\nIt also supports relative time, for examples *6 seconds ago*.\n\n#### Standard usage\n\nWithout any optional parameters the timestamp is displayed as a relative datetime and a title with the full date is added.\n\n```vue\n<template>\n\t<NcDatetime :timestamp=\"timestamp\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Ignore seconds\n\nIf you do not want the seconds to be counted up until minutes are reached you can simply use the `ignore-seconds` property.\n\n```vue\n<template>\n\t<NcDatetime :timestamp=\"timestamp\" :ignore-seconds=\"true\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Custom date or time format\n\nThe component allows to format the full date for the title by settings the `format` property.\nIt is also possible to disable relative time by setting the `relativeTime` property to `false`.\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Short relative time</h4>\n\t\t<NcDatetime :timestamp=\"timestamp\" relative-time=\"short\" />\n\n\t\t<h4>Custom title format</h4>\n\t\t<NcDatetime :timestamp=\"timestamp\" :format=\"timeFormat\" />\n\n\t\t<h4>Without relative time</h4>\n\t\t<NcDatetime :timestamp=\"timestamp\" :format=\"timeFormat\" :relative-time=\"false\" />\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t/** For allowed formats see the Intl.DateTimeFormat options */\n\t\t\t\ttimeFormat: {\n\t\t\t\t\tdateStyle: 'short',\n\t\t\t\t\ttimeStyle: 'full'\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style>\nh4 {\n\tfont-weight: bold;\n\tmargin-top: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<span class=\"nc-datetime\"\n\t\t:data-timestamp=\"timestamp\"\n\t\t:title=\"formattedFullTime\">{{ formattedTime }}</span>\n</template>\n\n<script>\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { t } from '../../l10n.js'\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\nexport default {\n\tname: 'NcDatetime',\n\n\tprops: {\n\t\t/**\n\t\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t\t */\n\t\ttimestamp: {\n\t\t\ttype: [Date, Number],\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t\t *\n\t\t * @type {Intl.DateTimeFormatOptions}\n\t\t */\n\t\tformat: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\t\t},\n\t\t/**\n\t\t * Wether to display the timestamp as time from now (optional)\n\t\t *\n\t\t * - `false`: Disable relative time\n\t\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t\t * - `'short'`: Short text, like *2 sec. ago*\n\t\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t\t */\n\t\trelativeTime: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: 'long',\n\t\t\tvalidator: (v) => v === false || ['long', 'short', 'narrow'].includes(v),\n\t\t},\n\t\t/**\n\t\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t\t */\n\t\tignoreSeconds: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** Current time in ms */\n\t\t\tcurrentTime: Date.now(),\n\t\t\t/** ID of the current time interval */\n\t\t\tintervalId: undefined,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** ECMA Date object of the timestamp */\n\t\tdateObject() {\n\t\t\treturn new Date(this.timestamp)\n\t\t},\n\t\t/** Time string formatted for main text */\n\t\tformattedTime() {\n\t\t\tif (this.relativeTime !== false) {\n\t\t\t\tconst formatter = new Intl.RelativeTimeFormat(getCanonicalLocale(), { numeric: 'auto', style: this.relativeTime })\n\n\t\t\t\tconst diff = this.dateObject - new Date(this.currentTime)\n\t\t\t\tconst seconds = diff / 1000\n\t\t\t\tif (Math.abs(seconds) <= 90) {\n\t\t\t\t\tif (this.ignoreSeconds) {\n\t\t\t\t\t\treturn FEW_SECONDS_AGO[this.relativeTime]\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn formatter.format(Math.round(seconds), 'second')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst minutes = seconds / 60\n\t\t\t\tif (Math.abs(minutes) <= 90) {\n\t\t\t\t\treturn formatter.format(Math.round(minutes), 'minute')\n\t\t\t\t}\n\t\t\t\tconst hours = minutes / 60\n\t\t\t\tif (Math.abs(hours) <= 72) {\n\t\t\t\t\treturn formatter.format(Math.round(hours), 'hour')\n\t\t\t\t}\n\t\t\t\tconst days = hours / 24\n\t\t\t\tif (Math.abs(days) <= 6) {\n\t\t\t\t\treturn formatter.format(Math.round(days), 'day')\n\t\t\t\t}\n\t\t\t\tconst weeks = days / 7\n\t\t\t\tif (Math.abs(weeks) <= 52) {\n\t\t\t\t\treturn formatter.format(Math.round(weeks), 'week')\n\t\t\t\t}\n\t\t\t\treturn formatter.format(Math.round(days / 365), 'year')\n\t\t\t}\n\t\t\treturn this.formattedFullTime\n\t\t},\n\t\tformattedFullTime() {\n\t\t\tconst formatter = new Intl.DateTimeFormat(getCanonicalLocale(), this.format)\n\t\t\treturn formatter.format(this.dateObject)\n\t\t},\n\t},\n\n\twatch: {\n\t\t/**\n\t\t * Set or clear interval if relative time is dis/enabled\n\t\t *\n\t\t * @param {boolean} newValue The new value of the relativeTime property\n\t\t * @param {boolean} _oldValue The old value of the relativeTime property\n\t\t */\n\t\trelativeTime(newValue, _oldValue) {\n\t\t\twindow.clearInterval(this.intervalId)\n\t\t\tthis.intervalId = undefined\n\t\t\tif (newValue) {\n\t\t\t\tthis.intervalId = window.setInterval(this.setCurrentTime, 1000)\n\t\t\t}\n\t\t},\n\t},\n\n\tmounted() {\n\t\t// Start the interval for setting the current time if relative time is enabled\n\t\tif (this.relativeTime !== false) {\n\t\t\tthis.intervalId = window.setInterval(this.setCurrentTime, 1000)\n\t\t}\n\t},\n\n\tdestroyed() {\n\t\t// ensure interval is cleared\n\t\twindow.clearInterval(this.intervalId)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Set `currentTime` to the current timestamp, required as Date.now() is not reactive.\n\t\t */\n\t\tsetCurrentTime() {\n\t\t\tthis.currentTime = Date.now()\n\t\t},\n\t},\n}\n</script>\n"],"names":["FEW_SECONDS_AGO","t","_sfc_main","v","formatter","getCanonicalLocale","seconds","minutes","hours","days","weeks","newValue","_oldValue"],"mappings":"qJAsHAA,EAAA,CACA,KAAAC,EAAA,EAAA,mBAAA,EACA,MAAAA,EAAA,EAAA,aAAA,EACA,OAAAA,EAAA,EAAA,UAAA,CACA,EAEAC,EAAA,CACA,KAAA,aAEA,MAAA,CAIA,UAAA,CACA,KAAA,CAAA,KAAA,MAAA,EACA,SAAA,EACA,EAMA,OAAA,CACA,KAAA,OACA,QAAA,KAAA,CAAA,UAAA,SAAA,UAAA,OAAA,EACA,EASA,aAAA,CACA,KAAA,CAAA,QAAA,MAAA,EACA,QAAA,OACA,UAAAC,GAAAA,IAAA,IAAA,CAAA,OAAA,QAAA,QAAA,EAAA,SAAAA,CAAA,CACA,EAIA,cAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAEA,MAAA,CACA,MAAA,CAEA,YAAA,KAAA,IAAA,EAEA,WAAA,MACA,CACA,EAEA,SAAA,CAEA,YAAA,CACA,OAAA,IAAA,KAAA,KAAA,SAAA,CACA,EAEA,eAAA,CACA,GAAA,KAAA,eAAA,GAAA,CACA,MAAAC,EAAA,IAAA,KAAA,mBAAAC,EAAAA,mBAAA,EAAA,CAAA,QAAA,OAAA,MAAA,KAAA,YAAA,CAAA,EAGAC,GADA,KAAA,WAAA,IAAA,KAAA,KAAA,WAAA,GACA,IACA,GAAA,KAAA,IAAAA,CAAA,GAAA,GACA,OAAA,KAAA,cACAN,EAAA,KAAA,YAAA,EAEAI,EAAA,OAAA,KAAA,MAAAE,CAAA,EAAA,QAAA,EAGA,MAAAC,EAAAD,EAAA,GACA,GAAA,KAAA,IAAAC,CAAA,GAAA,GACA,OAAAH,EAAA,OAAA,KAAA,MAAAG,CAAA,EAAA,QAAA,EAEA,MAAAC,EAAAD,EAAA,GACA,GAAA,KAAA,IAAAC,CAAA,GAAA,GACA,OAAAJ,EAAA,OAAA,KAAA,MAAAI,CAAA,EAAA,MAAA,EAEA,MAAAC,EAAAD,EAAA,GACA,GAAA,KAAA,IAAAC,CAAA,GAAA,EACA,OAAAL,EAAA,OAAA,KAAA,MAAAK,CAAA,EAAA,KAAA,EAEA,MAAAC,EAAAD,EAAA,EACA,OAAA,KAAA,IAAAC,CAAA,GAAA,GACAN,EAAA,OAAA,KAAA,MAAAM,CAAA,EAAA,MAAA,EAEAN,EAAA,OAAA,KAAA,MAAAK,EAAA,GAAA,EAAA,MAAA,CAAA,CAEA,OAAA,KAAA,iBACA,EACA,mBAAA,CAEA,OADA,IAAA,KAAA,eAAAJ,EAAAA,mBAAA,EAAA,KAAA,MAAA,EACA,OAAA,KAAA,UAAA,CACA,CACA,EAEA,MAAA,CAOA,aAAAM,EAAAC,EAAA,CACA,OAAA,cAAA,KAAA,UAAA,EACA,KAAA,WAAA,OACAD,IACA,KAAA,WAAA,OAAA,YAAA,KAAA,eAAA,GAAA,EAEA,CACA,EAEA,SAAA,CAEA,KAAA,eAAA,KACA,KAAA,WAAA,OAAA,YAAA,KAAA,eAAA,GAAA,EAEA,EAEA,WAAA,CAEA,OAAA,cAAA,KAAA,UAAA,CACA,EAEA,QAAA,CAIA,gBAAA,CACA,KAAA,YAAA,KAAA,IAAA,CACA,CACA,CACA"}
1
+ {"version":3,"file":"NcDateTime.cjs","sources":["../../src/components/NcDateTime/NcDateTime.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n\n### General description\n\nThis components purpose is to display a timestamp in the users local time format.\nIt also supports relative time, for examples *6 seconds ago*.\n\n#### Standard usage\n\nWithout any optional parameters the timestamp is displayed as a relative datetime and a title with the full date is added.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Ignore seconds\n\nIf you do not want the seconds to be counted up until minutes are reached you can simply use the `ignore-seconds` property.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" :ignore-seconds=\"true\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Custom date or time format\n\nThe component allows to format the full date for the title by settings the `format` property.\nIt is also possible to disable relative time by setting the `relativeTime` property to `false`.\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Short relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" relative-time=\"short\" />\n\n\t\t<h4>Custom title format</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" />\n\n\t\t<h4>Without relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" :relative-time=\"false\" />\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t/** For allowed formats see the Intl.DateTimeFormat options */\n\t\t\t\ttimeFormat: {\n\t\t\t\t\tdateStyle: 'short',\n\t\t\t\t\ttimeStyle: 'full'\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style>\nh4 {\n\tfont-weight: bold;\n\tmargin-top: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<span class=\"nc-datetime\"\n\t\t:data-timestamp=\"timestamp\"\n\t\t:title=\"formattedFullTime\">{{ formattedTime }}</span>\n</template>\n\n<script>\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { t } from '../../l10n.js'\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\nexport default {\n\tname: 'NcDateTime',\n\n\tprops: {\n\t\t/**\n\t\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t\t */\n\t\ttimestamp: {\n\t\t\ttype: [Date, Number],\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t\t *\n\t\t * @type {Intl.DateTimeFormatOptions}\n\t\t */\n\t\tformat: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\t\t},\n\t\t/**\n\t\t * Wether to display the timestamp as time from now (optional)\n\t\t *\n\t\t * - `false`: Disable relative time\n\t\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t\t * - `'short'`: Short text, like *2 sec. ago*\n\t\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t\t */\n\t\trelativeTime: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: 'long',\n\t\t\tvalidator: (v) => v === false || ['long', 'short', 'narrow'].includes(v),\n\t\t},\n\t\t/**\n\t\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t\t */\n\t\tignoreSeconds: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** Current time in ms */\n\t\t\tcurrentTime: Date.now(),\n\t\t\t/** ID of the current time interval */\n\t\t\tintervalId: undefined,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** ECMA Date object of the timestamp */\n\t\tdateObject() {\n\t\t\treturn new Date(this.timestamp)\n\t\t},\n\t\t/** Time string formatted for main text */\n\t\tformattedTime() {\n\t\t\tif (this.relativeTime !== false) {\n\t\t\t\tconst formatter = new Intl.RelativeTimeFormat(getCanonicalLocale(), { numeric: 'auto', style: this.relativeTime })\n\n\t\t\t\tconst diff = this.dateObject - new Date(this.currentTime)\n\t\t\t\tconst seconds = diff / 1000\n\t\t\t\tif (Math.abs(seconds) <= 90) {\n\t\t\t\t\tif (this.ignoreSeconds) {\n\t\t\t\t\t\treturn FEW_SECONDS_AGO[this.relativeTime]\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn formatter.format(Math.round(seconds), 'second')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst minutes = seconds / 60\n\t\t\t\tif (Math.abs(minutes) <= 90) {\n\t\t\t\t\treturn formatter.format(Math.round(minutes), 'minute')\n\t\t\t\t}\n\t\t\t\tconst hours = minutes / 60\n\t\t\t\tif (Math.abs(hours) <= 72) {\n\t\t\t\t\treturn formatter.format(Math.round(hours), 'hour')\n\t\t\t\t}\n\t\t\t\tconst days = hours / 24\n\t\t\t\tif (Math.abs(days) <= 6) {\n\t\t\t\t\treturn formatter.format(Math.round(days), 'day')\n\t\t\t\t}\n\t\t\t\tconst weeks = days / 7\n\t\t\t\tif (Math.abs(weeks) <= 52) {\n\t\t\t\t\treturn formatter.format(Math.round(weeks), 'week')\n\t\t\t\t}\n\t\t\t\treturn formatter.format(Math.round(days / 365), 'year')\n\t\t\t}\n\t\t\treturn this.formattedFullTime\n\t\t},\n\t\tformattedFullTime() {\n\t\t\tconst formatter = new Intl.DateTimeFormat(getCanonicalLocale(), this.format)\n\t\t\treturn formatter.format(this.dateObject)\n\t\t},\n\t},\n\n\twatch: {\n\t\t/**\n\t\t * Set or clear interval if relative time is dis/enabled\n\t\t *\n\t\t * @param {boolean} newValue The new value of the relativeTime property\n\t\t * @param {boolean} _oldValue The old value of the relativeTime property\n\t\t */\n\t\trelativeTime(newValue, _oldValue) {\n\t\t\twindow.clearInterval(this.intervalId)\n\t\t\tthis.intervalId = undefined\n\t\t\tif (newValue) {\n\t\t\t\tthis.intervalId = window.setInterval(this.setCurrentTime, 1000)\n\t\t\t}\n\t\t},\n\t},\n\n\tmounted() {\n\t\t// Start the interval for setting the current time if relative time is enabled\n\t\tif (this.relativeTime !== false) {\n\t\t\tthis.intervalId = window.setInterval(this.setCurrentTime, 1000)\n\t\t}\n\t},\n\n\tdestroyed() {\n\t\t// ensure interval is cleared\n\t\twindow.clearInterval(this.intervalId)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Set `currentTime` to the current timestamp, required as Date.now() is not reactive.\n\t\t */\n\t\tsetCurrentTime() {\n\t\t\tthis.currentTime = Date.now()\n\t\t},\n\t},\n}\n</script>\n"],"names":["FEW_SECONDS_AGO","t","_sfc_main","v","formatter","getCanonicalLocale","seconds","minutes","hours","days","weeks","newValue","_oldValue"],"mappings":"qJAsHAA,EAAA,CACA,KAAAC,EAAA,EAAA,mBAAA,EACA,MAAAA,EAAA,EAAA,aAAA,EACA,OAAAA,EAAA,EAAA,UAAA,CACA,EAEAC,EAAA,CACA,KAAA,aAEA,MAAA,CAIA,UAAA,CACA,KAAA,CAAA,KAAA,MAAA,EACA,SAAA,EACA,EAMA,OAAA,CACA,KAAA,OACA,QAAA,KAAA,CAAA,UAAA,SAAA,UAAA,OAAA,EACA,EASA,aAAA,CACA,KAAA,CAAA,QAAA,MAAA,EACA,QAAA,OACA,UAAAC,GAAAA,IAAA,IAAA,CAAA,OAAA,QAAA,QAAA,EAAA,SAAAA,CAAA,CACA,EAIA,cAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAEA,MAAA,CACA,MAAA,CAEA,YAAA,KAAA,IAAA,EAEA,WAAA,MACA,CACA,EAEA,SAAA,CAEA,YAAA,CACA,OAAA,IAAA,KAAA,KAAA,SAAA,CACA,EAEA,eAAA,CACA,GAAA,KAAA,eAAA,GAAA,CACA,MAAAC,EAAA,IAAA,KAAA,mBAAAC,EAAAA,mBAAA,EAAA,CAAA,QAAA,OAAA,MAAA,KAAA,YAAA,CAAA,EAGAC,GADA,KAAA,WAAA,IAAA,KAAA,KAAA,WAAA,GACA,IACA,GAAA,KAAA,IAAAA,CAAA,GAAA,GACA,OAAA,KAAA,cACAN,EAAA,KAAA,YAAA,EAEAI,EAAA,OAAA,KAAA,MAAAE,CAAA,EAAA,QAAA,EAGA,MAAAC,EAAAD,EAAA,GACA,GAAA,KAAA,IAAAC,CAAA,GAAA,GACA,OAAAH,EAAA,OAAA,KAAA,MAAAG,CAAA,EAAA,QAAA,EAEA,MAAAC,EAAAD,EAAA,GACA,GAAA,KAAA,IAAAC,CAAA,GAAA,GACA,OAAAJ,EAAA,OAAA,KAAA,MAAAI,CAAA,EAAA,MAAA,EAEA,MAAAC,EAAAD,EAAA,GACA,GAAA,KAAA,IAAAC,CAAA,GAAA,EACA,OAAAL,EAAA,OAAA,KAAA,MAAAK,CAAA,EAAA,KAAA,EAEA,MAAAC,EAAAD,EAAA,EACA,OAAA,KAAA,IAAAC,CAAA,GAAA,GACAN,EAAA,OAAA,KAAA,MAAAM,CAAA,EAAA,MAAA,EAEAN,EAAA,OAAA,KAAA,MAAAK,EAAA,GAAA,EAAA,MAAA,CAAA,CAEA,OAAA,KAAA,iBACA,EACA,mBAAA,CAEA,OADA,IAAA,KAAA,eAAAJ,EAAAA,mBAAA,EAAA,KAAA,MAAA,EACA,OAAA,KAAA,UAAA,CACA,CACA,EAEA,MAAA,CAOA,aAAAM,EAAAC,EAAA,CACA,OAAA,cAAA,KAAA,UAAA,EACA,KAAA,WAAA,OACAD,IACA,KAAA,WAAA,OAAA,YAAA,KAAA,eAAA,GAAA,EAEA,CACA,EAEA,SAAA,CAEA,KAAA,eAAA,KACA,KAAA,WAAA,OAAA,YAAA,KAAA,eAAA,GAAA,EAEA,EAEA,WAAA,CAEA,OAAA,cAAA,KAAA,UAAA,CACA,EAEA,QAAA,CAIA,gBAAA,CACA,KAAA,YAAA,KAAA,IAAA,CACA,CACA,CACA"}
@@ -1,7 +1,7 @@
1
1
  import { getCanonicalLocale as s } from "@nextcloud/l10n";
2
2
  import { t as n } from "../chunks/l10n-9a5a6afc.mjs";
3
3
  import { n as m } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
4
- const l = { long: n("a few seconds ago"), short: n("seconds ago"), narrow: n("sec. ago") }, d = { name: "NcDatetime", props: { timestamp: { type: [Date, Number], required: !0 }, format: { type: Object, default: () => ({ timeStyle: "medium", dateStyle: "short" }) }, relativeTime: { type: [Boolean, String], default: "long", validator: (t) => t === !1 || ["long", "short", "narrow"].includes(t) }, ignoreSeconds: { type: Boolean, default: !1 } }, data() {
4
+ const l = { long: n("a few seconds ago"), short: n("seconds ago"), narrow: n("sec. ago") }, d = { name: "NcDateTime", props: { timestamp: { type: [Date, Number], required: !0 }, format: { type: Object, default: () => ({ timeStyle: "medium", dateStyle: "short" }) }, relativeTime: { type: [Boolean, String], default: "long", validator: (t) => t === !1 || ["long", "short", "narrow"].includes(t) }, ignoreSeconds: { type: Boolean, default: !1 } }, data() {
5
5
  return { currentTime: Date.now(), intervalId: void 0 };
6
6
  }, computed: { dateObject() {
7
7
  return new Date(this.timestamp);
@@ -38,7 +38,7 @@ var u = function() {
38
38
  var t = this, e = t._self._c;
39
39
  return e("span", { staticClass: "nc-datetime", attrs: { "data-timestamp": t.timestamp, title: t.formattedFullTime } }, [t._v(t._s(t.formattedTime))]);
40
40
  }, h = [], c = m(d, u, h, !1, null, null, null, null);
41
- const T = c.exports;
41
+ const w = c.exports;
42
42
  export {
43
- T as default
43
+ w as default
44
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NcDatetime.mjs","sources":["../../src/components/NcDatetime/NcDatetime.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n\n### General description\n\nThis components purpose is to display a timestamp in the users local time format.\nIt also supports relative time, for examples *6 seconds ago*.\n\n#### Standard usage\n\nWithout any optional parameters the timestamp is displayed as a relative datetime and a title with the full date is added.\n\n```vue\n<template>\n\t<NcDatetime :timestamp=\"timestamp\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Ignore seconds\n\nIf you do not want the seconds to be counted up until minutes are reached you can simply use the `ignore-seconds` property.\n\n```vue\n<template>\n\t<NcDatetime :timestamp=\"timestamp\" :ignore-seconds=\"true\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Custom date or time format\n\nThe component allows to format the full date for the title by settings the `format` property.\nIt is also possible to disable relative time by setting the `relativeTime` property to `false`.\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Short relative time</h4>\n\t\t<NcDatetime :timestamp=\"timestamp\" relative-time=\"short\" />\n\n\t\t<h4>Custom title format</h4>\n\t\t<NcDatetime :timestamp=\"timestamp\" :format=\"timeFormat\" />\n\n\t\t<h4>Without relative time</h4>\n\t\t<NcDatetime :timestamp=\"timestamp\" :format=\"timeFormat\" :relative-time=\"false\" />\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t/** For allowed formats see the Intl.DateTimeFormat options */\n\t\t\t\ttimeFormat: {\n\t\t\t\t\tdateStyle: 'short',\n\t\t\t\t\ttimeStyle: 'full'\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style>\nh4 {\n\tfont-weight: bold;\n\tmargin-top: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<span class=\"nc-datetime\"\n\t\t:data-timestamp=\"timestamp\"\n\t\t:title=\"formattedFullTime\">{{ formattedTime }}</span>\n</template>\n\n<script>\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { t } from '../../l10n.js'\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\nexport default {\n\tname: 'NcDatetime',\n\n\tprops: {\n\t\t/**\n\t\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t\t */\n\t\ttimestamp: {\n\t\t\ttype: [Date, Number],\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t\t *\n\t\t * @type {Intl.DateTimeFormatOptions}\n\t\t */\n\t\tformat: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\t\t},\n\t\t/**\n\t\t * Wether to display the timestamp as time from now (optional)\n\t\t *\n\t\t * - `false`: Disable relative time\n\t\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t\t * - `'short'`: Short text, like *2 sec. ago*\n\t\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t\t */\n\t\trelativeTime: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: 'long',\n\t\t\tvalidator: (v) => v === false || ['long', 'short', 'narrow'].includes(v),\n\t\t},\n\t\t/**\n\t\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t\t */\n\t\tignoreSeconds: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** Current time in ms */\n\t\t\tcurrentTime: Date.now(),\n\t\t\t/** ID of the current time interval */\n\t\t\tintervalId: undefined,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** ECMA Date object of the timestamp */\n\t\tdateObject() {\n\t\t\treturn new Date(this.timestamp)\n\t\t},\n\t\t/** Time string formatted for main text */\n\t\tformattedTime() {\n\t\t\tif (this.relativeTime !== false) {\n\t\t\t\tconst formatter = new Intl.RelativeTimeFormat(getCanonicalLocale(), { numeric: 'auto', style: this.relativeTime })\n\n\t\t\t\tconst diff = this.dateObject - new Date(this.currentTime)\n\t\t\t\tconst seconds = diff / 1000\n\t\t\t\tif (Math.abs(seconds) <= 90) {\n\t\t\t\t\tif (this.ignoreSeconds) {\n\t\t\t\t\t\treturn FEW_SECONDS_AGO[this.relativeTime]\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn formatter.format(Math.round(seconds), 'second')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst minutes = seconds / 60\n\t\t\t\tif (Math.abs(minutes) <= 90) {\n\t\t\t\t\treturn formatter.format(Math.round(minutes), 'minute')\n\t\t\t\t}\n\t\t\t\tconst hours = minutes / 60\n\t\t\t\tif (Math.abs(hours) <= 72) {\n\t\t\t\t\treturn formatter.format(Math.round(hours), 'hour')\n\t\t\t\t}\n\t\t\t\tconst days = hours / 24\n\t\t\t\tif (Math.abs(days) <= 6) {\n\t\t\t\t\treturn formatter.format(Math.round(days), 'day')\n\t\t\t\t}\n\t\t\t\tconst weeks = days / 7\n\t\t\t\tif (Math.abs(weeks) <= 52) {\n\t\t\t\t\treturn formatter.format(Math.round(weeks), 'week')\n\t\t\t\t}\n\t\t\t\treturn formatter.format(Math.round(days / 365), 'year')\n\t\t\t}\n\t\t\treturn this.formattedFullTime\n\t\t},\n\t\tformattedFullTime() {\n\t\t\tconst formatter = new Intl.DateTimeFormat(getCanonicalLocale(), this.format)\n\t\t\treturn formatter.format(this.dateObject)\n\t\t},\n\t},\n\n\twatch: {\n\t\t/**\n\t\t * Set or clear interval if relative time is dis/enabled\n\t\t *\n\t\t * @param {boolean} newValue The new value of the relativeTime property\n\t\t * @param {boolean} _oldValue The old value of the relativeTime property\n\t\t */\n\t\trelativeTime(newValue, _oldValue) {\n\t\t\twindow.clearInterval(this.intervalId)\n\t\t\tthis.intervalId = undefined\n\t\t\tif (newValue) {\n\t\t\t\tthis.intervalId = window.setInterval(this.setCurrentTime, 1000)\n\t\t\t}\n\t\t},\n\t},\n\n\tmounted() {\n\t\t// Start the interval for setting the current time if relative time is enabled\n\t\tif (this.relativeTime !== false) {\n\t\t\tthis.intervalId = window.setInterval(this.setCurrentTime, 1000)\n\t\t}\n\t},\n\n\tdestroyed() {\n\t\t// ensure interval is cleared\n\t\twindow.clearInterval(this.intervalId)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Set `currentTime` to the current timestamp, required as Date.now() is not reactive.\n\t\t */\n\t\tsetCurrentTime() {\n\t\t\tthis.currentTime = Date.now()\n\t\t},\n\t},\n}\n</script>\n"],"names":["FEW_SECONDS_AGO","t","_sfc_main","v","formatter","getCanonicalLocale","seconds","minutes","hours","days","weeks","newValue","_oldValue"],"mappings":";;;AAsHA,MAAAA,IAAA,EACA,MAAAC,EAAA,mBAAA,GACA,OAAAA,EAAA,aAAA,GACA,QAAAA,EAAA,UAAA,EACA,GAEAC,IAAA,EACA,MAAA,cAEA,OAAA,EAIA,WAAA,EACA,MAAA,CAAA,MAAA,MAAA,GACA,UAAA,GACA,GAMA,QAAA,EACA,MAAA,QACA,SAAA,OAAA,EAAA,WAAA,UAAA,WAAA,QAAA,GACA,GASA,cAAA,EACA,MAAA,CAAA,SAAA,MAAA,GACA,SAAA,QACA,WAAAC,OAAAA,MAAA,MAAA,CAAA,QAAA,SAAA,QAAA,EAAA,SAAAA,CAAA,EACA,GAIA,eAAA,EACA,MAAA,SACA,SAAA,GACA,EACA,GAEA,OAAA;AACA,SAAA,EAEA,aAAA,KAAA,IAAA,GAEA,YAAA,OACA;AACA,GAEA,UAAA,EAEA,aAAA;AACA,SAAA,IAAA,KAAA,KAAA,SAAA;AACA,GAEA,gBAAA;AACA,MAAA,KAAA,iBAAA,IAAA;AACA,UAAAC,IAAA,IAAA,KAAA,mBAAAC,EAAA,GAAA,EAAA,SAAA,QAAA,OAAA,KAAA,aAAA,CAAA,GAGAC,KADA,KAAA,aAAA,IAAA,KAAA,KAAA,WAAA,KACA;AACA,QAAA,KAAA,IAAAA,CAAA,KAAA;AACA,aAAA,KAAA,gBACAN,EAAA,KAAA,YAAA,IAEAI,EAAA,OAAA,KAAA,MAAAE,CAAA,GAAA,QAAA;AAGA,UAAAC,IAAAD,IAAA;AACA,QAAA,KAAA,IAAAC,CAAA,KAAA;AACA,aAAAH,EAAA,OAAA,KAAA,MAAAG,CAAA,GAAA,QAAA;AAEA,UAAAC,IAAAD,IAAA;AACA,QAAA,KAAA,IAAAC,CAAA,KAAA;AACA,aAAAJ,EAAA,OAAA,KAAA,MAAAI,CAAA,GAAA,MAAA;AAEA,UAAAC,IAAAD,IAAA;AACA,QAAA,KAAA,IAAAC,CAAA,KAAA;AACA,aAAAL,EAAA,OAAA,KAAA,MAAAK,CAAA,GAAA,KAAA;AAEA,UAAAC,IAAAD,IAAA;AACA,WAAA,KAAA,IAAAC,CAAA,KAAA,KACAN,EAAA,OAAA,KAAA,MAAAM,CAAA,GAAA,MAAA,IAEAN,EAAA,OAAA,KAAA,MAAAK,IAAA,GAAA,GAAA,MAAA;AAAA,EAAA;AAEA,SAAA,KAAA;AACA,GACA,oBAAA;AAEA,SADA,IAAA,KAAA,eAAAJ,EAAA,GAAA,KAAA,MAAA,EACA,OAAA,KAAA,UAAA;AACA,EACA,GAEA,OAAA,EAOA,aAAAM,GAAAC,GAAA;AACA,SAAA,cAAA,KAAA,UAAA,GACA,KAAA,aAAA,QACAD,MACA,KAAA,aAAA,OAAA,YAAA,KAAA,gBAAA,GAAA;AAEA,EACA,GAEA,UAAA;AAEA,OAAA,iBAAA,OACA,KAAA,aAAA,OAAA,YAAA,KAAA,gBAAA,GAAA;AAEA,GAEA,YAAA;AAEA,SAAA,cAAA,KAAA,UAAA;AACA,GAEA,SAAA,EAIA,iBAAA;AACA,OAAA,cAAA,KAAA,IAAA;AACA,EACA,EACA;;;;;;"}
1
+ {"version":3,"file":"NcDateTime.mjs","sources":["../../src/components/NcDateTime/NcDateTime.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n\n### General description\n\nThis components purpose is to display a timestamp in the users local time format.\nIt also supports relative time, for examples *6 seconds ago*.\n\n#### Standard usage\n\nWithout any optional parameters the timestamp is displayed as a relative datetime and a title with the full date is added.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Ignore seconds\n\nIf you do not want the seconds to be counted up until minutes are reached you can simply use the `ignore-seconds` property.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" :ignore-seconds=\"true\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Custom date or time format\n\nThe component allows to format the full date for the title by settings the `format` property.\nIt is also possible to disable relative time by setting the `relativeTime` property to `false`.\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Short relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" relative-time=\"short\" />\n\n\t\t<h4>Custom title format</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" />\n\n\t\t<h4>Without relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" :relative-time=\"false\" />\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t/** For allowed formats see the Intl.DateTimeFormat options */\n\t\t\t\ttimeFormat: {\n\t\t\t\t\tdateStyle: 'short',\n\t\t\t\t\ttimeStyle: 'full'\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style>\nh4 {\n\tfont-weight: bold;\n\tmargin-top: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<span class=\"nc-datetime\"\n\t\t:data-timestamp=\"timestamp\"\n\t\t:title=\"formattedFullTime\">{{ formattedTime }}</span>\n</template>\n\n<script>\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { t } from '../../l10n.js'\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\nexport default {\n\tname: 'NcDateTime',\n\n\tprops: {\n\t\t/**\n\t\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t\t */\n\t\ttimestamp: {\n\t\t\ttype: [Date, Number],\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t\t *\n\t\t * @type {Intl.DateTimeFormatOptions}\n\t\t */\n\t\tformat: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\t\t},\n\t\t/**\n\t\t * Wether to display the timestamp as time from now (optional)\n\t\t *\n\t\t * - `false`: Disable relative time\n\t\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t\t * - `'short'`: Short text, like *2 sec. ago*\n\t\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t\t */\n\t\trelativeTime: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: 'long',\n\t\t\tvalidator: (v) => v === false || ['long', 'short', 'narrow'].includes(v),\n\t\t},\n\t\t/**\n\t\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t\t */\n\t\tignoreSeconds: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** Current time in ms */\n\t\t\tcurrentTime: Date.now(),\n\t\t\t/** ID of the current time interval */\n\t\t\tintervalId: undefined,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** ECMA Date object of the timestamp */\n\t\tdateObject() {\n\t\t\treturn new Date(this.timestamp)\n\t\t},\n\t\t/** Time string formatted for main text */\n\t\tformattedTime() {\n\t\t\tif (this.relativeTime !== false) {\n\t\t\t\tconst formatter = new Intl.RelativeTimeFormat(getCanonicalLocale(), { numeric: 'auto', style: this.relativeTime })\n\n\t\t\t\tconst diff = this.dateObject - new Date(this.currentTime)\n\t\t\t\tconst seconds = diff / 1000\n\t\t\t\tif (Math.abs(seconds) <= 90) {\n\t\t\t\t\tif (this.ignoreSeconds) {\n\t\t\t\t\t\treturn FEW_SECONDS_AGO[this.relativeTime]\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn formatter.format(Math.round(seconds), 'second')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst minutes = seconds / 60\n\t\t\t\tif (Math.abs(minutes) <= 90) {\n\t\t\t\t\treturn formatter.format(Math.round(minutes), 'minute')\n\t\t\t\t}\n\t\t\t\tconst hours = minutes / 60\n\t\t\t\tif (Math.abs(hours) <= 72) {\n\t\t\t\t\treturn formatter.format(Math.round(hours), 'hour')\n\t\t\t\t}\n\t\t\t\tconst days = hours / 24\n\t\t\t\tif (Math.abs(days) <= 6) {\n\t\t\t\t\treturn formatter.format(Math.round(days), 'day')\n\t\t\t\t}\n\t\t\t\tconst weeks = days / 7\n\t\t\t\tif (Math.abs(weeks) <= 52) {\n\t\t\t\t\treturn formatter.format(Math.round(weeks), 'week')\n\t\t\t\t}\n\t\t\t\treturn formatter.format(Math.round(days / 365), 'year')\n\t\t\t}\n\t\t\treturn this.formattedFullTime\n\t\t},\n\t\tformattedFullTime() {\n\t\t\tconst formatter = new Intl.DateTimeFormat(getCanonicalLocale(), this.format)\n\t\t\treturn formatter.format(this.dateObject)\n\t\t},\n\t},\n\n\twatch: {\n\t\t/**\n\t\t * Set or clear interval if relative time is dis/enabled\n\t\t *\n\t\t * @param {boolean} newValue The new value of the relativeTime property\n\t\t * @param {boolean} _oldValue The old value of the relativeTime property\n\t\t */\n\t\trelativeTime(newValue, _oldValue) {\n\t\t\twindow.clearInterval(this.intervalId)\n\t\t\tthis.intervalId = undefined\n\t\t\tif (newValue) {\n\t\t\t\tthis.intervalId = window.setInterval(this.setCurrentTime, 1000)\n\t\t\t}\n\t\t},\n\t},\n\n\tmounted() {\n\t\t// Start the interval for setting the current time if relative time is enabled\n\t\tif (this.relativeTime !== false) {\n\t\t\tthis.intervalId = window.setInterval(this.setCurrentTime, 1000)\n\t\t}\n\t},\n\n\tdestroyed() {\n\t\t// ensure interval is cleared\n\t\twindow.clearInterval(this.intervalId)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Set `currentTime` to the current timestamp, required as Date.now() is not reactive.\n\t\t */\n\t\tsetCurrentTime() {\n\t\t\tthis.currentTime = Date.now()\n\t\t},\n\t},\n}\n</script>\n"],"names":["FEW_SECONDS_AGO","t","_sfc_main","v","formatter","getCanonicalLocale","seconds","minutes","hours","days","weeks","newValue","_oldValue"],"mappings":";;;AAsHA,MAAAA,IAAA,EACA,MAAAC,EAAA,mBAAA,GACA,OAAAA,EAAA,aAAA,GACA,QAAAA,EAAA,UAAA,EACA,GAEAC,IAAA,EACA,MAAA,cAEA,OAAA,EAIA,WAAA,EACA,MAAA,CAAA,MAAA,MAAA,GACA,UAAA,GACA,GAMA,QAAA,EACA,MAAA,QACA,SAAA,OAAA,EAAA,WAAA,UAAA,WAAA,QAAA,GACA,GASA,cAAA,EACA,MAAA,CAAA,SAAA,MAAA,GACA,SAAA,QACA,WAAAC,OAAAA,MAAA,MAAA,CAAA,QAAA,SAAA,QAAA,EAAA,SAAAA,CAAA,EACA,GAIA,eAAA,EACA,MAAA,SACA,SAAA,GACA,EACA,GAEA,OAAA;AACA,SAAA,EAEA,aAAA,KAAA,IAAA,GAEA,YAAA,OACA;AACA,GAEA,UAAA,EAEA,aAAA;AACA,SAAA,IAAA,KAAA,KAAA,SAAA;AACA,GAEA,gBAAA;AACA,MAAA,KAAA,iBAAA,IAAA;AACA,UAAAC,IAAA,IAAA,KAAA,mBAAAC,EAAA,GAAA,EAAA,SAAA,QAAA,OAAA,KAAA,aAAA,CAAA,GAGAC,KADA,KAAA,aAAA,IAAA,KAAA,KAAA,WAAA,KACA;AACA,QAAA,KAAA,IAAAA,CAAA,KAAA;AACA,aAAA,KAAA,gBACAN,EAAA,KAAA,YAAA,IAEAI,EAAA,OAAA,KAAA,MAAAE,CAAA,GAAA,QAAA;AAGA,UAAAC,IAAAD,IAAA;AACA,QAAA,KAAA,IAAAC,CAAA,KAAA;AACA,aAAAH,EAAA,OAAA,KAAA,MAAAG,CAAA,GAAA,QAAA;AAEA,UAAAC,IAAAD,IAAA;AACA,QAAA,KAAA,IAAAC,CAAA,KAAA;AACA,aAAAJ,EAAA,OAAA,KAAA,MAAAI,CAAA,GAAA,MAAA;AAEA,UAAAC,IAAAD,IAAA;AACA,QAAA,KAAA,IAAAC,CAAA,KAAA;AACA,aAAAL,EAAA,OAAA,KAAA,MAAAK,CAAA,GAAA,KAAA;AAEA,UAAAC,IAAAD,IAAA;AACA,WAAA,KAAA,IAAAC,CAAA,KAAA,KACAN,EAAA,OAAA,KAAA,MAAAM,CAAA,GAAA,MAAA,IAEAN,EAAA,OAAA,KAAA,MAAAK,IAAA,GAAA,GAAA,MAAA;AAAA,EAAA;AAEA,SAAA,KAAA;AACA,GACA,oBAAA;AAEA,SADA,IAAA,KAAA,eAAAJ,EAAA,GAAA,KAAA,MAAA,EACA,OAAA,KAAA,UAAA;AACA,EACA,GAEA,OAAA,EAOA,aAAAM,GAAAC,GAAA;AACA,SAAA,cAAA,KAAA,UAAA,GACA,KAAA,aAAA,QACAD,MACA,KAAA,aAAA,OAAA,YAAA,KAAA,gBAAA,GAAA;AAEA,EACA,GAEA,UAAA;AAEA,OAAA,iBAAA,OACA,KAAA,aAAA,OAAA,YAAA,KAAA,gBAAA,GAAA;AAEA,GAEA,YAAA;AAEA,SAAA,cAAA,KAAA,UAAA;AACA,GAEA,SAAA,EAIA,iBAAA;AACA,OAAA,cAAA,KAAA,IAAA;AACA,EACA,EACA;;;;;;"}
@@ -0,0 +1 @@
1
+ var v=require("../assets/index-82b5969a.css");const o=require("../chunks/l10n-46d0c1c0.cjs"),u=require("./NcTimezonePicker.cjs"),p=require("./NcPopover.cjs"),c=require("../chunks/l10n-dacb6440.cjs"),m=require("vue-material-design-icons/CalendarBlank.vue"),d=require("vue-material-design-icons/Web.vue"),n=require("@nextcloud/l10n"),h=require("vue2-datepicker"),f=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs"),y=require("../chunks/ScopeComponent-4b8bd1ee.cjs");const l={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD H:mm:ss",year:"YYYY",month:"YYYY-MM",time:"H:mm:ss",week:"w"},k={name:"NcDateTimePicker",components:{CalendarBlank:m,DatePicker:h,NcPopover:p,NcTimezonePicker:u,Web:d},mixins:[c.l10n],inheritAttrs:!1,props:{clearable:{type:Boolean,default:!1},minuteStep:{type:Number,default:10},type:{type:String,default:"date"},format:{type:String,default:null},formatter:{type:Object,default:null},lang:{type:Object,default:null},value:{default:()=>new Date},timezoneId:{type:String,default:"UTC"},showTimezoneSelect:{type:Boolean,default:!1},highlightTimezone:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},showWeekNumber:{type:Boolean,default:!1},placeholder:{type:String,default:null}},emits:["update:value","update:timezone-id"],data(){return{showTimezonePopover:!1,tzVal:this.timezoneId}},computed:{defaultLang(){return{formatLocale:{months:n.getMonthNames(),monthsShort:n.getMonthNamesShort(),weekdays:n.getDayNames(),weekdaysShort:n.getDayNamesShort(),weekdaysMin:n.getDayNamesMin(),firstDayOfWeek:n.getFirstDay()},monthFormat:"MMM"}},defaultPlaceholder(){return this.type==="time"?o.t("Pick a time"):this.type==="month"?o.t("Pick a month"):this.type==="year"?o.t("Pick a year"):this.type==="week"?o.t("Pick a week"):this.type==="date"?o.t("Pick a date"):o.t("Pick a date and a time")},formatTypeMap(){var e;return(e=l[this.type])!=null?e:l.date}},methods:{handleSelectYear(e){const t=this.$refs.datepicker.currentValue;if(t)try{const a=new Date(new Date(t).setFullYear(e));this.$refs.datepicker.selectDate(a)}catch{console.error("Invalid value",t,e)}},handleSelectMonth(e){const t=this.$refs.datepicker.currentValue;if(t)try{const a=new Date(new Date(t).setMonth(e));this.$refs.datepicker.selectDate(a)}catch{console.error("Invalid value",t,e)}},toggleTimezonePopover(){this.showTimezoneSelect&&(this.showTimezonePopover=!this.showTimezonePopover)}}};var w=function(){var e=this,t=e._self._c;return t("DatePicker",e._g(e._b({ref:"datepicker",attrs:{"append-to-body":e.appendToBody,clearable:e.clearable,format:e.format?e.format:e.formatTypeMap,formatter:e.formatter,lang:e.lang?e.lang:e.defaultLang,"minute-step":e.minuteStep,placeholder:e.placeholder?e.placeholder:e.defaultPlaceholder,"popup-class":{"show-week-number":e.showWeekNumber},"show-week-number":e.showWeekNumber,type:e.type,value:e.value},on:{"select-year":e.handleSelectYear,"select-month":e.handleSelectMonth,"update:value":function(a){return e.$emit("update:value",e.value)}},scopedSlots:e._u([{key:"icon-calendar",fn:function(){return[e.showTimezoneSelect?t("NcPopover",{attrs:{shown:e.showTimezonePopover,"popover-base-class":"timezone-select__popper"},on:{"update:shown":function(a){e.showTimezonePopover=a}},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("button",{staticClass:"datetime-picker-inline-icon",class:{"datetime-picker-inline-icon--highlighted":e.highlightTimezone},on:{mousedown:function(a){return a.stopPropagation(),a.preventDefault(),(()=>{}).apply(null,arguments)}}},[t("Web",{attrs:{size:20}})],1)]},proxy:!0}],null,!1,3375037618)},[t("div",{staticClass:"timezone-popover-wrapper__label"},[t("strong",[e._v(" "+e._s(e.t("Please select a time zone:"))+" ")])]),t("NcTimezonePicker",{staticClass:"timezone-popover-wrapper__timezone-select",on:{input:function(a){return e.$emit("update:timezone-id",arguments[0])}},model:{value:e.tzVal,callback:function(a){e.tzVal=a},expression:"tzVal"}})],1):t("CalendarBlank",{attrs:{size:20}})]},proxy:!0},e._l(e.$scopedSlots,function(a,r){return{key:r,fn:function(s){return[e._t(r,null,null,s)]}}})],null,!0)},"DatePicker",e.$attrs,!1),e.$listeners))},g=[],z=f.normalizeComponent(k,w,g,!1,null,"26676d3b",null,null);const i=z.exports;y.ScopeComponent(i),module.exports=i;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcDateTimePicker.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}