@xwiki/cristal-electron-renderer 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/package.json +19 -19
  2. package/dist/AttachmentPreview-DNQ6Ebkw.css +0 -1
  3. package/dist/AttachmentPreview-Ecn8Pmvf.js +0 -2
  4. package/dist/AttachmentPreview-Ecn8Pmvf.js.map +0 -1
  5. package/dist/AuthServiceBanner-7KaHK0Au.js +0 -2
  6. package/dist/AuthServiceBanner-7KaHK0Au.js.map +0 -1
  7. package/dist/AuthServiceBanner-BArubXdu.css +0 -1
  8. package/dist/DeletePage-DA6E5XYv.js +0 -2
  9. package/dist/DeletePage-DA6E5XYv.js.map +0 -1
  10. package/dist/GitHubLoginMenu-Crh899SM.js +0 -2
  11. package/dist/GitHubLoginMenu-Crh899SM.js.map +0 -1
  12. package/dist/LoggedInMenu-kH3kWMGK.js +0 -2
  13. package/dist/LoggedInMenu-kH3kWMGK.js.map +0 -1
  14. package/dist/LoginMenu-D_c21AxX.js +0 -2
  15. package/dist/LoginMenu-D_c21AxX.js.map +0 -1
  16. package/dist/MovePage-BHS998Jm.css +0 -1
  17. package/dist/MovePage-Du2Z2i7H.js +0 -2
  18. package/dist/MovePage-Du2Z2i7H.js.map +0 -1
  19. package/dist/NextcloudLoginMenu-BTVdL-FM.js +0 -2
  20. package/dist/NextcloudLoginMenu-BTVdL-FM.js.map +0 -1
  21. package/dist/NextcloudLoginMenu-DGCgMCya.css +0 -1
  22. package/dist/RenamePage-CQF0H3Kh.js +0 -2
  23. package/dist/RenamePage-CQF0H3Kh.js.map +0 -1
  24. package/dist/SettingsConfigurations-B9GWI5mw.css +0 -1
  25. package/dist/SettingsConfigurations-Cy7Cfmm4.js +0 -2
  26. package/dist/SettingsConfigurations-Cy7Cfmm4.js.map +0 -1
  27. package/dist/c-config-menu-BGV5XXU8.css +0 -1
  28. package/dist/c-config-menu-C99poXWy.js +0 -2
  29. package/dist/c-config-menu-C99poXWy.js.map +0 -1
  30. package/dist/c-edit-blocknote-ByH5aYGe.js +0 -257
  31. package/dist/c-edit-blocknote-ByH5aYGe.js.map +0 -1
  32. package/dist/c-edit-blocknote-gIdUYHeV.css +0 -1
  33. package/dist/chunk.24ZZSBUF-BmQPh48m.js +0 -89
  34. package/dist/chunk.24ZZSBUF-BmQPh48m.js.map +0 -1
  35. package/dist/chunk.36O46B5H-Cv2poSyf.js +0 -64
  36. package/dist/chunk.36O46B5H-Cv2poSyf.js.map +0 -1
  37. package/dist/chunk.3LWOA5DF-D8Va5Pmw.js +0 -77
  38. package/dist/chunk.3LWOA5DF-D8Va5Pmw.js.map +0 -1
  39. package/dist/chunk.3RPBFEDE-DI7eSlIl.js +0 -2
  40. package/dist/chunk.3RPBFEDE-DI7eSlIl.js.map +0 -1
  41. package/dist/chunk.4TUIT776-BvlNwMXD.js +0 -18
  42. package/dist/chunk.4TUIT776-BvlNwMXD.js.map +0 -1
  43. package/dist/chunk.6CTB5ZDJ-9Su7bEUQ.js +0 -2
  44. package/dist/chunk.6CTB5ZDJ-9Su7bEUQ.js.map +0 -1
  45. package/dist/chunk.7E4JTYWU-Ci99jpyG.js +0 -75
  46. package/dist/chunk.7E4JTYWU-Ci99jpyG.js.map +0 -1
  47. package/dist/chunk.AJ3ENQ5C-zot94vv9.js +0 -2
  48. package/dist/chunk.AJ3ENQ5C-zot94vv9.js.map +0 -1
  49. package/dist/chunk.B4BZKR24-B0iVuGLD.js +0 -2
  50. package/dist/chunk.B4BZKR24-B0iVuGLD.js.map +0 -1
  51. package/dist/chunk.D5YQDJ7X-_UyNui_V.js +0 -2
  52. package/dist/chunk.D5YQDJ7X-_UyNui_V.js.map +0 -1
  53. package/dist/chunk.DFHYNK3F-bS0lNIuO.js +0 -86
  54. package/dist/chunk.DFHYNK3F-bS0lNIuO.js.map +0 -1
  55. package/dist/chunk.GMYPQTFK-BT1AAYXJ.js +0 -2
  56. package/dist/chunk.GMYPQTFK-BT1AAYXJ.js.map +0 -1
  57. package/dist/chunk.J5ZM7LIC-n6gjp3-L.js +0 -244
  58. package/dist/chunk.J5ZM7LIC-n6gjp3-L.js.map +0 -1
  59. package/dist/chunk.JCXLDPQF-BOaK9AtU.js +0 -622
  60. package/dist/chunk.JCXLDPQF-BOaK9AtU.js.map +0 -1
  61. package/dist/chunk.JHOXTQXA-CWkZ1weQ.js +0 -24
  62. package/dist/chunk.JHOXTQXA-CWkZ1weQ.js.map +0 -1
  63. package/dist/chunk.JQBT7BOV-BKSO0Hfn.js +0 -3378
  64. package/dist/chunk.JQBT7BOV-BKSO0Hfn.js.map +0 -1
  65. package/dist/chunk.JXOKFADN-DpK3Q_uU.js +0 -785
  66. package/dist/chunk.JXOKFADN-DpK3Q_uU.js.map +0 -1
  67. package/dist/chunk.KPLQLAWP-DUYDfZ7-.js +0 -163
  68. package/dist/chunk.KPLQLAWP-DUYDfZ7-.js.map +0 -1
  69. package/dist/chunk.LD4M4QGE-cX1_6HT7.js +0 -2
  70. package/dist/chunk.LD4M4QGE-cX1_6HT7.js.map +0 -1
  71. package/dist/chunk.NYIIDP5N-AHr3eTN0.js +0 -2
  72. package/dist/chunk.NYIIDP5N-AHr3eTN0.js.map +0 -1
  73. package/dist/chunk.R45OWEVP-WMyXo-Fn.js +0 -181
  74. package/dist/chunk.R45OWEVP-WMyXo-Fn.js.map +0 -1
  75. package/dist/chunk.RWUUFNUL-BJhNq5wM.js +0 -2
  76. package/dist/chunk.RWUUFNUL-BJhNq5wM.js.map +0 -1
  77. package/dist/chunk.RY756JLP-BUknFjxa.js +0 -22
  78. package/dist/chunk.RY756JLP-BUknFjxa.js.map +0 -1
  79. package/dist/chunk.SI4ACBFK-BB831ml8.js +0 -58
  80. package/dist/chunk.SI4ACBFK-BB831ml8.js.map +0 -1
  81. package/dist/chunk.TRHSUYII-DFnBKJNh.js +0 -140
  82. package/dist/chunk.TRHSUYII-DFnBKJNh.js.map +0 -1
  83. package/dist/chunk.XA43ZQPC-maNlqVLX.js +0 -395
  84. package/dist/chunk.XA43ZQPC-maNlqVLX.js.map +0 -1
  85. package/dist/chunk.XSFJLY2D-ldEKWtxN.js +0 -178
  86. package/dist/chunk.XSFJLY2D-ldEKWtxN.js.map +0 -1
  87. package/dist/chunk.YHLNUJ7P-BGNuPG1R.js +0 -109
  88. package/dist/chunk.YHLNUJ7P-BGNuPG1R.js.map +0 -1
  89. package/dist/chunk.ZGGPD2XJ-DD1S3h7C.js +0 -2
  90. package/dist/chunk.ZGGPD2XJ-DD1S3h7C.js.map +0 -1
  91. package/dist/chunk.ZH2AND3P-CzagA8cz.js +0 -288
  92. package/dist/chunk.ZH2AND3P-CzagA8cz.js.map +0 -1
  93. package/dist/class-map-DmaCJs8c.js +0 -2
  94. package/dist/class-map-DmaCJs8c.js.map +0 -1
  95. package/dist/filesystem-internal-link-serializer-BmtbMUwV.js +0 -2
  96. package/dist/filesystem-internal-link-serializer-BmtbMUwV.js.map +0 -1
  97. package/dist/floating-ui.dom-1S43Ew4Q.js +0 -2
  98. package/dist/floating-ui.dom-1S43Ew4Q.js.map +0 -1
  99. package/dist/github-CRi3Ye_z.js +0 -3
  100. package/dist/github-CRi3Ye_z.js.map +0 -1
  101. package/dist/github-internal-link-serializer-ChUBU16v.js +0 -2
  102. package/dist/github-internal-link-serializer-ChUBU16v.js.map +0 -1
  103. package/dist/hocuspocus-provider.esm-DpwNtHpL.js +0 -2
  104. package/dist/hocuspocus-provider.esm-DpwNtHpL.js.map +0 -1
  105. package/dist/if-defined-O-hFrvt0.js +0 -2
  106. package/dist/if-defined-O-hFrvt0.js.map +0 -1
  107. package/dist/index-B1WxkRNy.js +0 -254
  108. package/dist/index-B1WxkRNy.js.map +0 -1
  109. package/dist/index-BgL5UHSB.css +0 -1
  110. package/dist/index-DWPjg9z3.js +0 -2
  111. package/dist/index-DWPjg9z3.js.map +0 -1
  112. package/dist/index-qhuTooVL.js +0 -3
  113. package/dist/index-qhuTooVL.js.map +0 -1
  114. package/dist/index.html +0 -13
  115. package/dist/live-z5w0O4st.js +0 -2
  116. package/dist/live-z5w0O4st.js.map +0 -1
  117. package/dist/module-RjUF93sV.js +0 -717
  118. package/dist/module-RjUF93sV.js.map +0 -1
  119. package/dist/native-48B9X9Wg.js +0 -2
  120. package/dist/native-48B9X9Wg.js.map +0 -1
  121. package/dist/nextcloud-B3M7otLC.js +0 -31
  122. package/dist/nextcloud-B3M7otLC.js.map +0 -1
  123. package/dist/nextcloud-internal-link-serializer-6Syv5TEU.js +0 -7
  124. package/dist/nextcloud-internal-link-serializer-6Syv5TEU.js.map +0 -1
  125. package/dist/offline-3x82kJQp.js +0 -4
  126. package/dist/offline-3x82kJQp.js.map +0 -1
  127. package/dist/query-x48B6FB_.js +0 -2
  128. package/dist/query-x48B6FB_.js.map +0 -1
  129. package/dist/shoelace-ZF5apisL.js +0 -3
  130. package/dist/shoelace-ZF5apisL.js.map +0 -1
  131. package/dist/static-Dm20cmTz.js +0 -3
  132. package/dist/static-Dm20cmTz.js.map +0 -1
  133. package/dist/staticBuild-BOgweg16.js +0 -2
  134. package/dist/staticBuild-BOgweg16.js.map +0 -1
  135. package/dist/translations-D5nOIu3x.js +0 -2
  136. package/dist/translations-D5nOIu3x.js.map +0 -1
  137. package/dist/translations-Ds9OkLNv.js +0 -2
  138. package/dist/translations-Ds9OkLNv.js.map +0 -1
  139. package/dist/vuetify-BxGNBe1U.js +0 -19
  140. package/dist/vuetify-BxGNBe1U.js.map +0 -1
  141. package/dist/vuetify-DJa-zcj7.css +0 -1
  142. package/dist/worker-BgcG6AhJ.js +0 -202
  143. package/dist/worker-BgcG6AhJ.js.map +0 -1
  144. package/dist/x-alert-BeYgGEHw.js +0 -2
  145. package/dist/x-alert-BeYgGEHw.js.map +0 -1
  146. package/dist/x-alert-BhErtBtU.css +0 -1
  147. package/dist/x-alert-DfYpLdml.css +0 -1
  148. package/dist/x-alert-Dy2REhpp.js +0 -2
  149. package/dist/x-alert-Dy2REhpp.js.map +0 -1
  150. package/dist/x-avatar-2efH4gNX.css +0 -1
  151. package/dist/x-avatar-C4CTlSRd.js +0 -2
  152. package/dist/x-avatar-C4CTlSRd.js.map +0 -1
  153. package/dist/x-avatar-DzYlPdwz.js +0 -2
  154. package/dist/x-avatar-DzYlPdwz.js.map +0 -1
  155. package/dist/x-breadcrumb-3U5TzpgN.js +0 -2
  156. package/dist/x-breadcrumb-3U5TzpgN.js.map +0 -1
  157. package/dist/x-breadcrumb-BMSNlvvi.css +0 -1
  158. package/dist/x-breadcrumb-BYgHeSE3.js +0 -2
  159. package/dist/x-breadcrumb-BYgHeSE3.js.map +0 -1
  160. package/dist/x-btn-9AKb7ryY.js +0 -2
  161. package/dist/x-btn-9AKb7ryY.js.map +0 -1
  162. package/dist/x-btn-CWfGjEgy.js +0 -2
  163. package/dist/x-btn-CWfGjEgy.js.map +0 -1
  164. package/dist/x-btn-DPGq6Sd-.css +0 -1
  165. package/dist/x-btn.vue_vue_type_script_setup_true_lang-D3pg_1oq.js +0 -2
  166. package/dist/x-btn.vue_vue_type_script_setup_true_lang-D3pg_1oq.js.map +0 -1
  167. package/dist/x-card-BiFAsKLZ.js +0 -2
  168. package/dist/x-card-BiFAsKLZ.js.map +0 -1
  169. package/dist/x-card-blonMcP4.js +0 -2
  170. package/dist/x-card-blonMcP4.js.map +0 -1
  171. package/dist/x-checkbox-BoqoQxdA.css +0 -1
  172. package/dist/x-checkbox-CfFCxOCr.js +0 -2
  173. package/dist/x-checkbox-CfFCxOCr.js.map +0 -1
  174. package/dist/x-checkbox-VDSX4CX7.js +0 -2
  175. package/dist/x-checkbox-VDSX4CX7.js.map +0 -1
  176. package/dist/x-col-DsUQg5Gm.js +0 -2
  177. package/dist/x-col-DsUQg5Gm.js.map +0 -1
  178. package/dist/x-container-B1osS5wH.js +0 -2
  179. package/dist/x-container-B1osS5wH.js.map +0 -1
  180. package/dist/x-dialog-Bk9LE0HR.css +0 -1
  181. package/dist/x-dialog-Cwb1fieH.js +0 -2
  182. package/dist/x-dialog-Cwb1fieH.js.map +0 -1
  183. package/dist/x-dialog-VzzVz38L.css +0 -1
  184. package/dist/x-dialog-eOwazoAI.js +0 -2
  185. package/dist/x-dialog-eOwazoAI.js.map +0 -1
  186. package/dist/x-divider-Bf6b5P6D.js +0 -2
  187. package/dist/x-divider-Bf6b5P6D.js.map +0 -1
  188. package/dist/x-divider-D36BIsQM.js +0 -2
  189. package/dist/x-divider-D36BIsQM.js.map +0 -1
  190. package/dist/x-dropdown-CxWpPIwn.css +0 -1
  191. package/dist/x-dropdown-DfwjES9w.js +0 -2
  192. package/dist/x-dropdown-DfwjES9w.js.map +0 -1
  193. package/dist/x-dropdown-GNs7ILlc.css +0 -1
  194. package/dist/x-dropdown-ds5_iBZ4.js +0 -2
  195. package/dist/x-dropdown-ds5_iBZ4.js.map +0 -1
  196. package/dist/x-file-input-B9mfyR4z.js +0 -2
  197. package/dist/x-file-input-B9mfyR4z.js.map +0 -1
  198. package/dist/x-file-input-BSstA5LD.css +0 -1
  199. package/dist/x-file-input-DftepgSQ.js +0 -2
  200. package/dist/x-file-input-DftepgSQ.js.map +0 -1
  201. package/dist/x-form-C5eClK9q.js +0 -2
  202. package/dist/x-form-C5eClK9q.js.map +0 -1
  203. package/dist/x-form-CK24VrXN.css +0 -1
  204. package/dist/x-form-DGUS5Veh.css +0 -1
  205. package/dist/x-form-etxLXE0R.js +0 -2
  206. package/dist/x-form-etxLXE0R.js.map +0 -1
  207. package/dist/x-img-CNPL9bZj.js +0 -2
  208. package/dist/x-img-CNPL9bZj.js.map +0 -1
  209. package/dist/x-img-DYWmHySi.js +0 -2
  210. package/dist/x-img-DYWmHySi.js.map +0 -1
  211. package/dist/x-load-BlPeW_ej.css +0 -1
  212. package/dist/x-load-CM4p-BU2.css +0 -1
  213. package/dist/x-load-CatWwBSt.js +0 -2
  214. package/dist/x-load-CatWwBSt.js.map +0 -1
  215. package/dist/x-load-pklPPw3d.js +0 -2
  216. package/dist/x-load-pklPPw3d.js.map +0 -1
  217. package/dist/x-menu-BmuGyRjl.css +0 -1
  218. package/dist/x-menu-C0JNNHR2.js +0 -2
  219. package/dist/x-menu-C0JNNHR2.js.map +0 -1
  220. package/dist/x-menu-CKBWYMym.js +0 -2
  221. package/dist/x-menu-CKBWYMym.js.map +0 -1
  222. package/dist/x-menu-item-9k48D3Mw.js +0 -2
  223. package/dist/x-menu-item-9k48D3Mw.js.map +0 -1
  224. package/dist/x-menu-item-fSf-cD7q.js +0 -2
  225. package/dist/x-menu-item-fSf-cD7q.js.map +0 -1
  226. package/dist/x-menu-label-BDlCFsFH.js +0 -2
  227. package/dist/x-menu-label-BDlCFsFH.js.map +0 -1
  228. package/dist/x-menu-label-C8o6TwqC.js +0 -2
  229. package/dist/x-menu-label-C8o6TwqC.js.map +0 -1
  230. package/dist/x-menu-label-DhRAj-fk.css +0 -1
  231. package/dist/x-row-DsUQg5Gm.js +0 -2
  232. package/dist/x-row-DsUQg5Gm.js.map +0 -1
  233. package/dist/x-search-C6XAaOXg.js +0 -2
  234. package/dist/x-search-C6XAaOXg.js.map +0 -1
  235. package/dist/x-search-CmWnWxsP.js +0 -2
  236. package/dist/x-search-CmWnWxsP.js.map +0 -1
  237. package/dist/x-select-C8GSGs-Z.js +0 -2
  238. package/dist/x-select-C8GSGs-Z.js.map +0 -1
  239. package/dist/x-select-Da6f14h4.js +0 -2
  240. package/dist/x-select-Da6f14h4.js.map +0 -1
  241. package/dist/x-tab-BDpZS53n.js +0 -2
  242. package/dist/x-tab-BDpZS53n.js.map +0 -1
  243. package/dist/x-tab-DV937RB-.js +0 -2
  244. package/dist/x-tab-DV937RB-.js.map +0 -1
  245. package/dist/x-tab-group-C3YcH4jU.js +0 -2
  246. package/dist/x-tab-group-C3YcH4jU.js.map +0 -1
  247. package/dist/x-tab-group-CT7pAQGH.js +0 -2
  248. package/dist/x-tab-group-CT7pAQGH.js.map +0 -1
  249. package/dist/x-tab-panel--wEPqeL9.js +0 -2
  250. package/dist/x-tab-panel--wEPqeL9.js.map +0 -1
  251. package/dist/x-tab-panel-BV2Axw5I.js +0 -2
  252. package/dist/x-tab-panel-BV2Axw5I.js.map +0 -1
  253. package/dist/x-text-field-B0juKwq0.js +0 -2
  254. package/dist/x-text-field-B0juKwq0.js.map +0 -1
  255. package/dist/x-text-field-CNuOWA3c.js +0 -2
  256. package/dist/x-text-field-CNuOWA3c.js.map +0 -1
  257. package/dist/x-tree-Aj-ivC70.js +0 -2
  258. package/dist/x-tree-Aj-ivC70.js.map +0 -1
  259. package/dist/x-tree-CUnE9yj-.js +0 -2
  260. package/dist/x-tree-CUnE9yj-.js.map +0 -1
  261. package/dist/x-tree-D0WG-8EM.css +0 -1
  262. package/dist/x-tree-OLo4IKf9.css +0 -1
  263. package/dist/xwiki-BeDAdEBl.js +0 -4
  264. package/dist/xwiki-BeDAdEBl.js.map +0 -1
  265. package/dist/xwiki-internal-link-serializer-Cd8xorru-_7nXuj98.js +0 -2
  266. package/dist/xwiki-internal-link-serializer-Cd8xorru-_7nXuj98.js.map +0 -1
  267. package/dist/xwiki-logo-color-DZ9bdNW4.svg +0 -18
  268. package/dist/yjs-VtUl3AlT.js +0 -6
  269. package/dist/yjs-VtUl3AlT.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-electron-renderer",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -14,30 +14,30 @@
14
14
  },
15
15
  "type": "module",
16
16
  "dependencies": {
17
- "inversify": "7.11.0",
17
+ "inversify": "8.1.0",
18
18
  "reflect-metadata": "0.2.2",
19
19
  "vue": "3.5.30",
20
20
  "vue-router": "5.0.3",
21
- "@xwiki/cristal-browser-electron": "1.2.0",
22
- "@xwiki/cristal-electron-authentication-github-renderer": "1.2.0",
23
- "@xwiki/cristal-electron-authentication-xwiki-renderer": "1.2.0",
24
- "@xwiki/cristal-electron-storage": "1.2.0",
25
- "@xwiki/cristal-electron-authentication-nextcloud-renderer": "1.2.0",
26
- "@xwiki/cristal-electron-settings-renderer": "1.2.0",
27
- "@xwiki/cristal-hierarchy-filesystem": "1.2.0",
28
- "@xwiki/cristal-lib": "1.2.0",
29
- "@xwiki/cristal-link-suggest-filesystem": "1.2.0",
30
- "@xwiki/cristal-model-reference-filesystem": "1.2.0",
31
- "@xwiki/cristal-model-remote-url-filesystem-default": "1.2.0",
32
- "@xwiki/cristal-navigation-tree-filesystem": "1.2.0",
33
- "@xwiki/cristal-rename-filesystem": "1.2.0",
34
- "@xwiki/cristal-uniast-markdown-filesystem": "1.2.0"
21
+ "@xwiki/cristal-electron-authentication-github-renderer": "1.4.0",
22
+ "@xwiki/cristal-electron-authentication-nextcloud-renderer": "1.4.0",
23
+ "@xwiki/cristal-electron-settings-renderer": "1.4.0",
24
+ "@xwiki/cristal-electron-storage": "1.4.0",
25
+ "@xwiki/cristal-lib": "1.4.0",
26
+ "@xwiki/cristal-hierarchy-filesystem": "1.4.0",
27
+ "@xwiki/cristal-model-reference-filesystem": "1.4.0",
28
+ "@xwiki/cristal-navigation-tree-filesystem": "1.4.0",
29
+ "@xwiki/cristal-uniast-markdown-filesystem": "1.4.0",
30
+ "@xwiki/cristal-link-suggest-filesystem": "1.4.0",
31
+ "@xwiki/cristal-electron-authentication-xwiki-renderer": "1.4.0",
32
+ "@xwiki/cristal-rename-filesystem": "1.4.0",
33
+ "@xwiki/cristal-model-remote-url-filesystem-default": "1.4.0",
34
+ "@xwiki/cristal-browser-electron": "1.4.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@types/node": "24.12.0",
38
- "@vitejs/plugin-vue": "6.0.5",
37
+ "@types/node": "24.12.4",
38
+ "@vitejs/plugin-vue": "6.0.7",
39
39
  "typescript": "5.9.3",
40
- "vite": "7.3.1"
40
+ "vite": "7.3.2"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "vite build",
@@ -1 +0,0 @@
1
- *:has(>.x-dialog-attachment-preview-no-activator){display:none}.dialog_content[data-v-540dd2b1]{display:grid;height:80vh;grid-auto-flow:column;grid-template-columns:6fr 1fr;grid-template-rows:1fr auto;gap:16px 16px;grid-template-areas:"attachment_view metadata" "actions actions"}.metadata[data-v-540dd2b1]{grid-area:metadata;display:flex;flex-flow:column;gap:8px}.actions[data-v-540dd2b1]{grid-area:actions;display:grid;grid-template-columns:1fr auto;gap:var(--cr-spacing-medium)}.actions .main_action[data-v-540dd2b1]{display:flex;gap:var(--cr-spacing-medium)}.actions .close_container[data-v-540dd2b1]{justify-self:end}.attachment_view[data-v-540dd2b1]{background-color:var(--cr-color-neutral-100);border-radius:var(--cr-border-radius-large);grid-area:attachment_view;overflow:auto;display:flex;align-items:center;justify-content:center}.attachment_view img[data-v-540dd2b1]{max-height:70vh;display:block}.label_description[data-v-540dd2b1]{display:flex;flex-flow:column;gap:4px}.label_description .label[data-v-540dd2b1]{display:block;font-size:var(--cr-font-size-x-small)}.label_description .description[data-v-540dd2b1]{font-weight:var(--cr-font-weight-bold);font-size:var(--cr-font-size-small)}@container xwCristal (max-width: 600px){.dialog_content[data-v-540dd2b1]{display:grid;grid-template-columns:1fr;grid-template-rows:1fr;grid-template-areas:"attachment_view" "metadata" "actions"}.dialog_content .attachment_view img[data-v-540dd2b1]{width:100%}}.v-overlay{container:vuetifyCristal;container-type:size}@container vuetifyCristal (max-width: 600px){.dialog_content[data-v-540dd2b1]{grid-template-columns:1fr;grid-template-rows:1fr;grid-template-areas:"attachment_view" "metadata" "actions"}.dialog_content .attachment_view img[data-v-540dd2b1]{width:100%}}
@@ -1,2 +0,0 @@
1
- import{l as k,av as x,aw as A,y as C,ax as i,ay as V,az as v,u as e,aA as l,V as a,o as t,n as c,aB as z,aC as B,aD as P,aE as D,aF as N,Z as u,j as F,h as j,a4 as w,aG as E}from"./index-B1WxkRNy.js";const I={key:0},S={key:1,class:"dialog_content"},U={class:"attachment_view"},$={class:"attachment_view_inner"},G={class:"metadata"},T={class:"label_description"},Z={class:"label"},q={class:"description"},H={key:0,class:"label_description"},J={class:"label"},K={class:"description"},L={class:"label_description"},M={class:"label"},O={class:"description"},Q={class:"label_description"},R={class:"label_description"},W={class:"label"},X={class:"description"},Y={class:"label_description"},tt={class:"label"},et={class:"description"},at={class:"actions"},st={class:"main_action"},nt={class:"close_container"},ot={key:2},it={key:0},lt={key:1},ct=k({__name:"AttachmentPreview",setup(dt){const{t:s}=x({messages:A}),d=F("cristal").getContainer().get("AttachmentPreview"),_=j(!1);C(()=>d.loading().value||d.attachment().value,r=>{r&&(_.value=!0)});function b(){_.value=!1}function f(){const r=o.value;r&&(window.location.href=r.href)}const o=d.attachment(),g=d.loading(),h=d.error();return(r,n)=>{const m=w("x-btn"),y=w("x-dialog");return i(),V(y,{modelValue:_.value,"onUpdate:modelValue":n[2]||(n[2]=p=>_.value=p),title:e(s)("attachment.preview.modal.title")},{activator:v(()=>[...n[3]||(n[3]=[t("span",{class:"x-dialog-attachment-preview-no-activator"},null,-1)])]),default:v(()=>[e(g)?(i(),l("div",I,a(e(s)("attachment.preview.loading")),1)):e(o)?(i(),l("div",S,[t("div",U,[t("div",$,[c(e(z),{attachment:e(o)},null,8,["attachment"])])]),t("div",G,[t("div",T,[t("div",null,[t("span",Z,a(e(s)("attachment.preview.name.label")),1),t("span",q,a(e(o).name),1)])]),e(o).author?(i(),l("div",H,[t("div",null,[t("span",J,a(e(s)("attachment.preview.postedBy.label")),1),t("span",K,[c(e(B),{user:e(o).author},null,8,["user"])])])])):P("",!0),t("div",L,[t("div",null,[t("span",M,a(e(s)("attachment.preview.date.label")),1),t("span",O,[c(e(D),{date:e(o).date},null,8,["date"])])])]),t("div",Q,[t("div",R,[t("div",null,[t("span",W,a(e(s)("attachment.preview.size.label")),1),t("span",X,[c(e(N),{size:e(o).size},null,8,["size"])])])])]),t("div",Y,[t("div",null,[t("span",tt,a(e(s)("attachment.preview.type.label")),1),t("span",et,a(e(o).mimetype),1)]),n[4]||(n[4]=t("div",{class:"label_description"},null,-1))])]),t("div",at,[t("div",st,[c(m,{onClick:n[0]||(n[0]=p=>f())},{default:v(()=>[u(a(e(s)("attachment.preview.download.button")),1)]),_:1})]),t("div",nt,[c(m,{class:"close",variant:"primary",onClick:n[1]||(n[1]=p=>b())},{default:v(()=>[u(a(e(s)("attachment.preview.close.button")),1)]),_:1})])])])):(i(),l("div",ot,[e(h)?(i(),l("div",it,a(e(h)),1)):(i(),l("div",lt,a(e(s)("attachment.preview.error.unknown")),1))]))]),_:1},8,["modelValue","title"])}}}),vt=E(ct,[["__scopeId","data-v-540dd2b1"]]);export{vt as default};
2
- //# sourceMappingURL=AttachmentPreview-Ecn8Pmvf.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentPreview-Ecn8Pmvf.js","sources":["../../../core/attachments/attachments-ui/src/vue/AttachmentPreview.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport messages from \"../translations\";\nimport { Date } from \"@xwiki/cristal-date-ui\";\nimport { FilePreview, FileSize } from \"@xwiki/cristal-file-preview-ui\";\nimport { User } from \"@xwiki/cristal-user-ui\";\nimport { inject, ref, watch } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type { CristalApp } from \"@xwiki/platform-api\";\nimport type {\n Attachment,\n AttachmentPreview,\n} from \"@xwiki/platform-attachments-api\";\nimport type { Ref } from \"vue\";\n\nconst { t } = useI18n({\n messages,\n});\n\nconst cristal: CristalApp = inject<CristalApp>(\"cristal\")!;\n\nconst attachmentPreview = cristal\n .getContainer()\n .get<AttachmentPreview>(\"AttachmentPreview\")!;\n\nconst openedDialog: Ref<boolean> = ref(false);\n\nwatch(\n () => {\n // Wait for the preview to be loading or with a value before opening the\n // modal.\n return (\n attachmentPreview.loading().value || attachmentPreview.attachment().value\n );\n },\n (open) => {\n if (open) {\n openedDialog.value = true;\n }\n },\n);\n\nfunction close() {\n openedDialog.value = false;\n}\n\nfunction download() {\n // TODO: make sure this is also working with electron somehow\n const value = attachment.value;\n if (value) {\n window.location.href = value.href;\n }\n}\n\nconst attachment: Ref<Attachment | undefined> = attachmentPreview.attachment();\n\nconst loading = attachmentPreview.loading();\nconst error = attachmentPreview.error();\n</script>\n\n<template>\n <x-dialog v-model=\"openedDialog\" :title=\"t('attachment.preview.modal.title')\">\n <template #activator>\n <!-- No activator, the modal is opened when the user clicks on an attachment link. -->\n <span class=\"x-dialog-attachment-preview-no-activator\"></span>\n </template>\n <template #default>\n <div v-if=\"loading\">{{ t(\"attachment.preview.loading\") }}</div>\n <div v-else-if=\"attachment\" class=\"dialog_content\">\n <!-- TODO: abstract to allow preview based on the type -->\n <div class=\"attachment_view\">\n <div class=\"attachment_view_inner\">\n <file-preview :attachment=\"attachment\" />\n </div>\n </div>\n <div class=\"metadata\">\n <!-- TODO make a component with key:value -->\n <div class=\"label_description\">\n <div>\n <span class=\"label\">\n {{ t(\"attachment.preview.name.label\") }}\n </span>\n <span class=\"description\">{{ attachment.name }}</span>\n </div>\n </div>\n <div v-if=\"attachment.author\" class=\"label_description\">\n <div>\n <span class=\"label\">\n {{ t(\"attachment.preview.postedBy.label\") }}\n </span>\n <span class=\"description\">\n <user :user=\"attachment.author\" />\n </span>\n </div>\n </div>\n <div class=\"label_description\">\n <div>\n <span class=\"label\">\n {{ t(\"attachment.preview.date.label\") }}\n </span>\n <span class=\"description\">\n <date :date=\"attachment.date\" />\n </span>\n </div>\n </div>\n <div class=\"label_description\">\n <div class=\"label_description\">\n <div>\n <span class=\"label\">\n {{ t(\"attachment.preview.size.label\") }}\n </span>\n <span class=\"description\">\n <file-size :size=\"attachment.size\" />\n </span>\n </div>\n </div>\n </div>\n <div class=\"label_description\">\n <div>\n <span class=\"label\">\n {{ t(\"attachment.preview.type.label\") }}\n </span>\n <span class=\"description\">{{ attachment.mimetype }}</span>\n </div>\n <div class=\"label_description\"></div>\n </div>\n </div>\n <div class=\"actions\">\n <!-- TODO: top-right close button. -->\n <div class=\"main_action\">\n <x-btn @click=\"download()\">\n {{ t(\"attachment.preview.download.button\") }}\n </x-btn>\n </div>\n <div class=\"close_container\">\n <x-btn class=\"close\" variant=\"primary\" @click=\"close()\">\n {{ t(\"attachment.preview.close.button\") }}\n </x-btn>\n </div>\n </div>\n </div>\n <div v-else>\n <div v-if=\"error\">{{ error }}</div>\n <div v-else>\n {{ t(\"attachment.preview.error.unknown\") }}\n </div>\n </div>\n </template>\n </x-dialog>\n</template>\n\n<style scoped>\n/* Prevent the dialog section of the modal to be displayed, to prevent click on it, which would show the popup without\nan attachments on empty pages. */\n:global(*:has(> .x-dialog-attachment-preview-no-activator)) {\n display: none;\n}\n.dialog_content {\n display: grid;\n height: 80vh;\n grid-auto-flow: column;\n grid-template-columns: 6fr 1fr;\n grid-template-rows: 1fr auto;\n gap: 16px 16px;\n grid-template-areas:\n \"attachment_view metadata\"\n \"actions actions\";\n}\n\n.metadata {\n grid-area: metadata;\n display: flex;\n flex-flow: column;\n gap: 8px;\n}\n\n.actions {\n grid-area: actions;\n display: grid;\n grid-template-columns: 1fr auto;\n gap: var(--cr-spacing-medium);\n\n .main_action {\n display: flex;\n gap: var(--cr-spacing-medium);\n }\n\n .close_container {\n justify-self: end;\n }\n}\n\n.attachment_view {\n background-color: var(--cr-color-neutral-100);\n border-radius: var(--cr-border-radius-large);\n grid-area: attachment_view;\n overflow: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.attachment_view img {\n max-height: 70vh;\n display: block;\n}\n\n.label_description {\n display: flex;\n flex-flow: column;\n gap: 4px;\n\n .label {\n display: block;\n font-size: var(--cr-font-size-x-small);\n }\n\n .description {\n font-weight: var(--cr-font-weight-bold);\n font-size: var(--cr-font-size-small);\n }\n}\n\n@container xwCristal (max-width: 600px) {\n .dialog_content {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: 1fr;\n grid-template-areas:\n \"attachment_view\"\n \"metadata\"\n \"actions\";\n\n .attachment_view img {\n width: 100%;\n }\n }\n}\n\n/*TODO: Try to remove these Vuetify only styles*/\n\n:global(.v-overlay) {\n container: vuetifyCristal;\n container-type: size;\n}\n\n@container vuetifyCristal (max-width: 600px) {\n .dialog_content {\n grid-template-columns: 1fr;\n grid-template-rows: 1fr;\n grid-template-areas:\n \"attachment_view\"\n \"metadata\"\n \"actions\";\n\n .attachment_view img {\n width: 100%;\n }\n }\n}\n</style>\n"],"names":["t","useI18n","messages","attachmentPreview","inject","openedDialog","ref","watch","open","close","download","value","attachment","loading","error","_createBlock","_component_x_dialog","$event","_unref","_cache","_createElementVNode","_openBlock","_createElementBlock","_hoisted_2","_hoisted_3","_hoisted_4","_createVNode","FilePreview","_hoisted_5","_hoisted_6","_hoisted_7","_toDisplayString","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","User","_hoisted_12","_hoisted_13","_hoisted_14","Date","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","FileSize","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_component_x_btn","_hoisted_24","_hoisted_25"],"mappings":"i3BAiCA,KAAM,CAAE,EAAAA,CAAA,EAAMC,EAAQ,CAAA,SACpBC,CAAA,CACD,EAIKC,EAFsBC,EAAmB,SAAS,EAGrD,aAAA,EACA,IAAuB,mBAAmB,EAEvCC,EAA6BC,EAAI,EAAK,EAE5CC,EACE,IAIIJ,EAAkB,QAAA,EAAU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EAAA,EAAK,aAClD,IAA0C,KAAvCS,EAAAlB,CAAA,EAAC,iCAAA,CAAA,EAAA,CAAA,CAAA,qBAKZsB,EAKM,MAAA+B,GAAA,CAJOnC,EAAAJ,CAAA,GAAXO,EAAA,EAAAC,EAAmC,WAAdJ,EAAAJ,CAAA,CAAK,EAAA,CAAA,IAC1BO,IAAAC,EAEM,WADDJ,EAAAlB,CAAA,EAAC,kCAAA,CAAA,EAAA,CAAA,EAAA"}
@@ -1,2 +0,0 @@
1
- import{l as r,j as c,av as _,a4 as e,ax as l,ay as u,az as t,n as h,o as p,u as n,V as k,aG as f}from"./index-B1WxkRNy.js";const d={"xwiki.auth.service.banner":`The XWiki instance you are logged in to is not configured properly for Cristal. The authentication service needs to be set to "Token based authenticator", {link} to access this setting if you're an administrator.`,"xwiki.auth.service.banner.link":"click here"},m={en:d},x=["href"],g=r({__name:"AuthServiceBanner",setup(v){const a=c("cristal"),{t:i}=_({messages:m});return(b,y)=>{const s=e("i18n-t"),o=e("x-alert");return l(),u(o,{type:"warning","flat-corners":""},{default:t(()=>[h(s,{keypath:"xwiki.auth.service.banner",tag:"span"},{link:t(()=>[p("a",{href:`${n(a).getWikiConfig().baseURL}/bin/admin/XWiki/XWikiPreferences?section=Authentication`},k(n(i)("xwiki.auth.service.banner.link")),9,x)]),_:1})]),_:1})}}}),B=f(g,[["__scopeId","data-v-0ee85c9b"]]);export{B as default};
2
- //# sourceMappingURL=AuthServiceBanner-7KaHK0Au.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthServiceBanner-7KaHK0Au.js","sources":["../../../core/xwiki/xwiki-ui/src/translations.ts","../../../core/xwiki/xwiki-ui/src/vue/AuthServiceBanner.vue"],"sourcesContent":["/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software 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 GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport en from \"../langs/translation-en.json\";\n\nconst translations = {\n en,\n};\nexport default translations;\n","<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n\n<script setup lang=\"ts\">\nimport messages from \"../translations\";\nimport { inject } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type { CristalApp } from \"@xwiki/platform-api\";\n\nconst cristal = inject<CristalApp>(\"cristal\")!;\n\nconst { t } = useI18n({\n messages,\n});\n</script>\n\n<template>\n <x-alert type=\"warning\" flat-corners>\n <i18n-t keypath=\"xwiki.auth.service.banner\" tag=\"span\">\n <template #link>\n <!-- TODO: Use RemoteURLSerializer (CRISTAL-741). -->\n <a\n :href=\"`${cristal.getWikiConfig().baseURL}/bin/admin/XWiki/XWikiPreferences?section=Authentication`\"\n >{{ t(\"xwiki.auth.service.banner.link\") }}</a\n >\n </template>\n </i18n-t>\n </x-alert>\n</template>\n\n<style scoped>\na {\n text-underline-offset: 4px;\n font-weight: var(--cr-font-weight-semibold);\n}\n</style>\n"],"names":["translations","en","cristal","inject","t","useI18n","messages","_createBlock","_component_x_alert","_createVNode","_component_i18n_t","_createElementVNode","_unref","_hoisted_1"],"mappings":"saAsBMA,EAAe,CACnB,GAAAC,CACF,sDCEA,MAAMC,EAAUC,EAAmB,SAAS,EAEtC,CAAE,EAAAC,CAAA,EAAMC,EAAQ,CAAA,SACpBC,CAAA,CACD,8DAICC,EAUUC,EAAA,CAVD,KAAK,UAAU,eAAA,EAAA,aACtB,IAQS,CARTC,EAQSC,EAAA,CARD,QAAQ,4BAA4B,IAAI,MAAA,GACnC,OAET,IAGC,CAHDC,EAGC,IAAA,CAFE,KAAI,GAAKC,EAAAV,CAAA,EAAQ,cAAA,EAAgB,OAAO,0DAAA,IACrCU,EAAAR,CAAA,EAAC,gCAAA,CAAA,EAAA,EAAAS,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- a[data-v-0ee85c9b]{text-underline-offset:4px;font-weight:var(--cr-font-weight-semibold)}
@@ -1,2 +0,0 @@
1
- import{l as x,av as _,aM as y,ax as N,ay as w,az as s,n as g,Z as u,V as l,u as t,a2 as f,o as S,aO as V,aL as k,j as D,h as R,a4 as v}from"./index-B1WxkRNy.js";const B=x({__name:"DeletePage",props:{currentPage:{},currentPageName:{},currentPageReference:{}},setup(p){const{t:e}=_({messages:y}),n=p,a=D("cristal"),d=a.getContainer().get("AlertsService"),P=a.getContainer().get("DocumentService"),c=R(!1);async function C(){const i=await a.getContainer().get("PageHierarchyResolverProvider").get().getPageHierarchy(n.currentPageReference),r=await a.getContainer().get("StorageProvider").get().delete(n.currentPageName);c.value=!1,r.success?(P.notifyDocumentChange("delete",n.currentPageReference),i.length>1?a.setCurrentPage(i[i.length-2].pageId,"view"):a.setCurrentPage(a.getWikiConfig().homePage,"view"),d.success(e("page.action.action.delete.page.success",{page:n.currentPageName}))):d.error(e("page.action.action.delete.page.error",{page:n.currentPageName,reason:r.error}))}return(i,o)=>{const r=v("x-btn"),h=v("x-dialog");return N(),w(h,{modelValue:c.value,"onUpdate:modelValue":o[1]||(o[1]=m=>c.value=m),width:"auto",title:t(e)("page.action.action.delete.page.dialog.title")},{activator:s(()=>[g(t(k),{name:"trash",size:t(V).Small},null,8,["size"]),u(" "+l(t(e)("page.action.action.delete.page.title")),1)]),default:s(()=>[S("p",null,l(t(e)("page.action.action.delete.page.confirm",{page:p.currentPageName})),1)]),footer:s(()=>[g(r,{onClick:o[0]||(o[0]=f(m=>c.value=!1,["stop"]))},{default:s(()=>[u(l(t(e)("page.action.action.delete.page.cancel")),1)]),_:1}),g(r,{variant:"primary",onClick:f(C,["stop"])},{default:s(()=>[u(l(t(e)("page.action.action.delete.page.title")),1)]),_:1})]),_:1},8,["modelValue","title"])}}});export{B as default};
2
- //# sourceMappingURL=DeletePage-DA6E5XYv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeletePage-DA6E5XYv.js","sources":["../../../core/page-actions/page-actions-ui/src/vue/DeletePage.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport messages from \"../translations\";\nimport { CIcon, Size } from \"@xwiki/platform-icons\";\nimport { inject, ref } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type { AlertsService } from \"@xwiki/cristal-alerts-api\";\nimport type {\n PageHierarchyItem,\n PageHierarchyResolverProvider,\n} from \"@xwiki/cristal-hierarchy-api\";\nimport type { CristalApp, PageData } from \"@xwiki/platform-api\";\nimport type { StorageProvider } from \"@xwiki/platform-backend-api\";\nimport type { DocumentService } from \"@xwiki/platform-document-api\";\nimport type { DocumentReference } from \"@xwiki/platform-model-api\";\nimport type { Ref } from \"vue\";\n\nconst { t } = useI18n({\n messages,\n});\nconst props = defineProps<{\n currentPage: PageData | undefined;\n currentPageName: string;\n currentPageReference: DocumentReference;\n}>();\n\nconst cristal: CristalApp = inject<CristalApp>(\"cristal\")!;\nconst alertsService: AlertsService = cristal\n .getContainer()\n .get<AlertsService>(\"AlertsService\")!;\nconst documentService = cristal\n .getContainer()\n .get<DocumentService>(\"DocumentService\");\nconst deleteDialogOpen: Ref<boolean> = ref(false);\n\n// TODO: reduce the number of statements in the following method and reactivate the disabled eslint rule.\n// eslint-disable-next-line max-statements\nasync function deletePage() {\n const hierarchy: Array<PageHierarchyItem> = await cristal\n .getContainer()\n .get<PageHierarchyResolverProvider>(\"PageHierarchyResolverProvider\")\n .get()\n .getPageHierarchy(props.currentPageReference);\n\n const storage = cristal\n .getContainer()\n .get<StorageProvider>(\"StorageProvider\")\n .get();\n const result = await storage.delete(props.currentPageName);\n deleteDialogOpen.value = false;\n\n if (result.success) {\n documentService.notifyDocumentChange(\"delete\", props.currentPageReference);\n if (hierarchy.length > 1) {\n cristal.setCurrentPage(hierarchy[hierarchy.length - 2].pageId, \"view\");\n } else {\n cristal.setCurrentPage(cristal.getWikiConfig().homePage, \"view\");\n }\n alertsService.success(\n t(\"page.action.action.delete.page.success\", {\n page: props.currentPageName,\n }),\n );\n } else {\n alertsService.error(\n t(\"page.action.action.delete.page.error\", {\n page: props.currentPageName,\n reason: result.error!,\n }),\n );\n }\n}\n</script>\n\n<template>\n <x-dialog\n v-model=\"deleteDialogOpen\"\n width=\"auto\"\n :title=\"t('page.action.action.delete.page.dialog.title')\"\n >\n <template #activator>\n <c-icon name=\"trash\" :size=\"Size.Small\"></c-icon>\n {{ t(\"page.action.action.delete.page.title\") }}\n </template>\n <template #default>\n <p>\n {{\n t(\"page.action.action.delete.page.confirm\", { page: currentPageName })\n }}\n </p>\n </template>\n <template #footer>\n <x-btn @click.stop=\"deleteDialogOpen = false\">\n {{ t(\"page.action.action.delete.page.cancel\") }}\n </x-btn>\n <x-btn variant=\"primary\" @click.stop=\"deletePage\">\n {{ t(\"page.action.action.delete.page.title\") }}\n </x-btn>\n </template>\n </x-dialog>\n</template>\n\n<style scoped></style>\n"],"names":["t","useI18n","messages","props","__props","cristal","inject","alertsService","documentService","deleteDialogOpen","ref","deletePage","hierarchy","result","_createBlock","_component_x_dialog","$event","_unref","_createVNode","CIcon","Size","_createTextVNode","_createElementVNode","_toDisplayString","_component_x_btn"],"mappings":"2QAmCA,KAAM,CAAE,EAAAA,CAAA,EAAMC,EAAQ,CAAA,SACpBC,CAAA,CACD,EACKC,EAAQC,EAMRC,EAAsBC,EAAmB,SAAS,EAClDC,EAA+BF,EAClC,aAAA,EACA,IAAmB,eAAe,EAC/BG,EAAkBH,EACrB,aAAA,EACA,IAAqB,iBAAiB,EACnCI,EAAiCC,EAAI,EAAK,EAIhD,eAAeC,GAAa,CAC1B,MAAMC,EAAsC,MAAMP,EAC/C,aAAA,EACA,IAAmC,+BAA+B,EAClE,IAAA,EACA,iBAAiBF,EAAM,oBAAoB,EAMxCU,EAAS,MAJCR,EACb,aAAA,EACA,IAAqB,iBAAiB,EACtC,IAAA,EAC0B,OAAOF,EAAM,eAAe,EACzDM,EAAiB,MAAQ,GAErBI,EAAO,SACTL,EAAgB,qBAAqB,SAAUL,EAAM,oBAAoB,EACrES,EAAU,OAAS,EACrBP,EAAQ,eAAeO,EAAUA,EAAU,OAAS,CAAC,EAAE,OAAQ,MAAM,EAErEP,EAAQ,eAAeA,EAAQ,cAAA,EAAgB,SAAU,MAAM,EAEjEE,EAAc,QACZP,EAAE,yCAA0C,CAC1C,KAAMG,EAAM,eAAA,CACb,CAAA,GAGHI,EAAc,MACZP,EAAE,uCAAwC,CACxC,KAAMG,EAAM,gBACZ,OAAQU,EAAO,KAAA,CAChB,CAAA,CAGP,6DAIEC,EAwBWC,EAAA,YAvBAN,EAAA,2CAAAA,EAAgB,MAAAO,GACzB,MAAM,OACL,MAAOC,EAAAjB,CAAA,EAAC,6CAAA,CAAA,GAEE,YACT,IAAiD,CAAjDkB,EAAiDD,EAAAE,CAAA,EAAA,CAAzC,KAAK,QAAS,KAAMF,EAAAG,CAAA,EAAK,KAAA,mBAAgBC,EAAA,MAC9CJ,EAAAjB,CAAA,EAAC,sCAAA,CAAA,EAAA,CAAA,CAAA,GAEK,UACT,IAII,CAJJsB,EAII,IAAA,KAAAC,EAFAN,EAAAjB,CAAA,EAAC,yCAAA,CAAA,KAAmDI,EAAA,eAAA,CAAe,CAAA,EAAA,CAAA,CAAA,GAI9D,SACT,IAEQ,CAFRc,EAEQM,EAAA,CAFA,yBAAYf,EAAA,MAAgB,GAAA,CAAA,MAAA,CAAA,EAAA,aAClC,IAAgD,KAA7CQ,EAAAjB,CAAA,EAAC,uCAAA,CAAA,EAAA,CAAA,CAAA,SAENkB,EAEQM,EAAA,CAFD,QAAQ,UAAW,UAAYb,EAAU,CAAA,MAAA,CAAA,CAAA,aAC9C,IAA+C,KAA5CM,EAAAjB,CAAA,EAAC,sCAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1,2 +0,0 @@
1
- import{l as v,av as _,j as S,aZ as k,y as w,a4 as s,ax as V,ay as I,az as m,Z as g,V as c,u as e,n as b,o as r,i as y,h as f}from"./index-B1WxkRNy.js";const L={"authentication.github.modal.title":"GitHub Login","authentication.github.modal.step1":"Step 1: Copy the following code","authentication.github.modal.step2":"Step 2: Click {link}, paste the code and authorize the application.","authentication.github.modal.step2.link":"here","authentication.github.modal.timeLeft":"Time left: {expiration}.","authentication.github.modal.userCode.label":"User Code"},U={"authentication.github.modal.title":"Connexion à GitHub","authentication.github.modal.step1":"Étape 1 : Copier le code suivant","authentication.github.modal.step2":"Étape 2 : Cliquer {link}, coller le code et autoriser l'application.","authentication.github.modal.step2.link":"ici","authentication.github.modal.timeLeft":"Temps restant : {expiration}.","authentication.github.modal.userCode.label":"Code utilisateur"},G={en:L,fr:U},H="https://github.com/login/device",B="authentication.user_code",M="authentication.expires_in",j=v({__name:"GitHubLoginMenu",setup(N){const{t:a}=_({messages:G}),d=S("cristal"),x=d.getContainer().get("AuthenticationManagerProvider").get(),n=d.getContainer().get(k).modalOpened,o=f(""),h=f("00:00");return w(n,async(p,t)=>{if(p&&!t){o.value=window.localStorage.getItem(B);let i=parseInt(window.localStorage.getItem(M));const l=setInterval(()=>{i--,h.value=new Date(i*1e3).toISOString().slice(11,19),i==0&&clearInterval(l)},1e3);await x?.callback()}}),(p,t)=>{const i=s("x-text-field"),l=s("i18n-t"),C=s("x-dialog");return V(),I(C,{modelValue:e(n),"onUpdate:modelValue":t[1]||(t[1]=u=>y(n)?n.value=u:null),width:"auto",title:e(a)("authentication.github.modal.title")},{default:m(()=>[g(c(e(a)("authentication.github.modal.step1"))+" ",1),b(i,{modelValue:o.value,"onUpdate:modelValue":t[0]||(t[0]=u=>o.value=u),label:e(a)("authentication.github.modal.userCode.label"),readonly:""},null,8,["modelValue","label"]),b(l,{keypath:"authentication.github.modal.step2",tag:"span"},{link:m(()=>[r("a",{href:H,target:"_blank"},c(e(a)("authentication.github.modal.step2.link")),1)]),_:1}),t[2]||(t[2]=r("br",null,null,-1)),t[3]||(t[3]=r("br",null,null,-1)),g(" "+c(e(a)("authentication.github.modal.timeLeft",{expiration:h.value})),1)]),_:1},8,["modelValue","title"])}}});export{j as default};
2
- //# sourceMappingURL=GitHubLoginMenu-Crh899SM.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GitHubLoginMenu-Crh899SM.js","sources":["../../../core/authentication/authentication-github-ui/src/translations.ts","../../../core/authentication/authentication-github-ui/src/vue/GitHubLoginMenu.vue"],"sourcesContent":["/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software 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 GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport en from \"../langs/translation-en.json\";\nimport fr from \"../langs/translation-fr.json\";\n\nconst translations = {\n en,\n fr,\n};\nexport default translations;\n","<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n\n<script lang=\"ts\" setup>\nimport messages from \"../translations\";\nimport { GitHubAuthenticationState } from \"@xwiki/cristal-authentication-github-state\";\nimport { inject, ref, watch } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type { CristalApp } from \"@xwiki/platform-api\";\nimport type { AuthenticationManagerProvider } from \"@xwiki/platform-authentication-api\";\nimport type { Ref } from \"vue\";\n\nconst { t } = useI18n({\n messages,\n});\n\nconst cristal = inject<CristalApp>(\"cristal\")!;\n\nconst authenticationManager = cristal\n .getContainer()\n .get<AuthenticationManagerProvider>(\"AuthenticationManagerProvider\")\n .get();\nconst authenticationState = cristal\n .getContainer()\n .get<GitHubAuthenticationState>(GitHubAuthenticationState);\nconst modalOpened: Ref<boolean> = authenticationState.modalOpened;\n\nconst verificationUrl = \"https://github.com/login/device\";\nconst localStorageUserCode = \"authentication.user_code\";\nconst localStorageExpiresIn = \"authentication.expires_in\";\n\nconst userCode: Ref<string> = ref(\"\");\nconst expiration: Ref<string> = ref(\"00:00\");\n\nwatch(modalOpened, async (newValue: boolean, oldValue: boolean) => {\n if (newValue && !oldValue) {\n userCode.value = window.localStorage.getItem(localStorageUserCode)!;\n let expirationSeconds: number = parseInt(\n window.localStorage.getItem(localStorageExpiresIn)!,\n );\n // This interval updates the displayed timer every second, until\n // expiration of the user code.\n const intervalId = setInterval(() => {\n expirationSeconds--;\n expiration.value = new Date(expirationSeconds * 1000)\n .toISOString()\n .slice(11, 19);\n if (expirationSeconds == 0) {\n clearInterval(intervalId);\n }\n }, 1000);\n\n await authenticationManager?.callback();\n }\n});\n</script>\n\n<template>\n <x-dialog\n v-model=\"modalOpened\"\n width=\"auto\"\n :title=\"t('authentication.github.modal.title')\"\n >\n <template #default>\n {{ t(\"authentication.github.modal.step1\") }}\n <x-text-field\n v-model=\"userCode\"\n :label=\"t('authentication.github.modal.userCode.label')\"\n readonly\n ></x-text-field>\n <i18n-t keypath=\"authentication.github.modal.step2\" tag=\"span\">\n <template #link>\n <a :href=\"verificationUrl\" target=\"_blank\">{{\n t(\"authentication.github.modal.step2.link\")\n }}</a>\n </template> </i18n-t\n ><br /><br />\n {{\n t(\"authentication.github.modal.timeLeft\", { expiration: expiration })\n }}\n </template>\n </x-dialog>\n</template>\n"],"names":["translations","en","fr","verificationUrl","localStorageUserCode","localStorageExpiresIn","t","useI18n","messages","cristal","inject","authenticationManager","modalOpened","GitHubAuthenticationState","userCode","ref","expiration","watch","newValue","oldValue","expirationSeconds","intervalId","_createBlock","_component_x_dialog","_unref","$event","_createTextVNode","_toDisplayString","_createVNode","_component_x_text_field","_component_i18n_t","_createElementVNode"],"mappings":"o9BAuBMA,EAAe,CACnB,GAAAC,EACA,GAAAC,C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AA,qBAGNyB,EAAM,KAAA,KAAA,KAAA,EAAA,eAAAA,EAAM,KAAA,KAAA,KAAA,EAAA,KAAA,IACbJ,EACEH,EAAAlB,CAAA,EAAC,uCAAA,CAAA,WAAuDU,EAAA,KAAA,CAAU,CAAA,EAAA,CAAA,CAAA"}
@@ -1,2 +0,0 @@
1
- import{l as v,av as k,j as V,aH as A,aI as B,a4 as u,ax as a,aA as y,u as e,ay as _,aJ as N,az as n,o as g,aD as U,Z as h,V as d,n as c,a2 as F,F as P,aK as j,aL as L,q as S}from"./index-B1WxkRNy.js";import{t as w}from"./translations-Ds9OkLNv.js";async function T(m){try{const{profile:t,name:r,avatar:o}=await m.getUserDetails();return{profile:t,name:r,avatar:o,error:!1}}catch(t){return console.error("Failed to access the user profile",t),{error:!0}}}const $=["href"],q={key:1},z=v({__name:"UserDetails",async setup(m){let t,r;const{t:o}=k({messages:w}),s=V("cristal"),l=s.getContainer().get("AuthenticationManagerProvider").get(),p=s.getContainer().get(A),{profile:C,name:f,error:b,avatar:x}=([t,r]=B(()=>T(l)),t=await t,r(),t);async function D(){await l.logout(),p.reload()}return(E,i)=>{const I=u("x-avatar"),M=u("x-btn");return a(),y(P,null,[e(b)?(a(),y("span",q,d(e(o)("userDetails.error")),1)):(a(),_(e(N),{key:0,keypath:"userDescription",tag:"span"},{default:n(()=>[g("a",{href:e(C)},[e(x)?(a(),_(I,{key:0,image:e(x),name:e(f)},null,8,["image","name"])):U("",!0),h(" "+d(e(f)),1)],8,$)]),_:1})),i[0]||(i[0]=g("br",null,null,-1)),i[1]||(i[1]=g("br",null,null,-1)),c(M,{variant:"danger",onClick:F(D,["prevent"])},{default:n(()=>[h(d(e(o)("logout")),1)]),_:1})],64)}}}),K=v({__name:"LoggedInMenu",setup(m){const{t}=k({messages:w});return(r,o)=>{const s=u("x-btn"),l=u("x-dialog");return a(),_(l,{width:"auto",title:e(t)("loggedInUserModal.title")},{activator:n(({props:p})=>[c(s,{variant:"primary"},{default:n(()=>[c(e(L),S({name:"person"},p),null,16)]),_:2},1024)]),default:n(()=>[(a(),_(j,null,{default:n(()=>[c(z)]),_:1}))]),_:1},8,["title"])}}});export{K as default};
2
- //# sourceMappingURL=LoggedInMenu-kH3kWMGK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoggedInMenu-kH3kWMGK.js","sources":["../../../core/authentication/authentication-ui/src/vue/utils/getUserProfile.ts","../../../core/authentication/authentication-ui/src/vue/UserDetails.vue","../../../core/authentication/authentication-ui/src/vue/LoggedInMenu.vue"],"sourcesContent":["/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software 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 GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport type { AuthenticationManager } from \"@xwiki/platform-authentication-api\";\n\n/**\n * Access to user profile.\n *\n * @returns the name and profile url, and an error status\n * @since 0.11\n * @beta\n */\nexport async function getUserProfile(\n authenticationManager: AuthenticationManager,\n): Promise<{\n name?: string;\n profile?: string;\n avatar?: string;\n error: boolean;\n}> {\n try {\n const { profile, name, avatar } =\n await authenticationManager.getUserDetails();\n return { profile, name, avatar, error: false };\n } catch (e) {\n console.error(\"Failed to access the user profile\", e);\n return { error: true };\n }\n}\n","<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { getUserProfile } from \"./utils/getUserProfile\";\nimport messages from \"../translations\";\nimport { name as browserApiName } from \"@xwiki/cristal-browser-api\";\nimport { inject } from \"vue\";\nimport { I18nT, useI18n } from \"vue-i18n\";\nimport type { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport type { CristalApp } from \"@xwiki/platform-api\";\nimport type { AuthenticationManagerProvider } from \"@xwiki/platform-authentication-api\";\n\nconst { t } = useI18n({\n messages,\n});\n\nconst cristal = inject<CristalApp>(\"cristal\")!;\n\nconst authenticationManager = cristal\n .getContainer()\n .get<AuthenticationManagerProvider>(\"AuthenticationManagerProvider\")\n .get()!;\n\nconst browserApi = cristal.getContainer().get<BrowserApi>(browserApiName);\n\nconst { profile, name, error, avatar } = await getUserProfile(\n authenticationManager,\n);\n\nasync function logout() {\n await authenticationManager.logout();\n browserApi.reload();\n}\n</script>\n\n<template>\n <template v-if=\"!error\">\n <i18n-t keypath=\"userDescription\" tag=\"span\">\n <a :href=\"profile\">\n <x-avatar v-if=\"avatar\" :image=\"avatar\" :name=\"name\"></x-avatar>\n {{ name }}\n </a>\n </i18n-t>\n </template>\n <span v-else>{{ t(\"userDetails.error\") }}</span>\n <br />\n <br />\n <x-btn variant=\"danger\" @click.prevent=\"logout\">{{ t(\"logout\") }}</x-btn>\n</template>\n","<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n\n<script setup lang=\"ts\">\nimport UserDetails from \"./UserDetails.vue\";\nimport messages from \"../translations\";\nimport { CIcon } from \"@xwiki/platform-icons\";\nimport { useI18n } from \"vue-i18n\";\n\nconst { t } = useI18n({\n messages,\n});\n</script>\n\n<template>\n <x-dialog width=\"auto\" :title=\"t('loggedInUserModal.title')\">\n <template #activator=\"{ props }\">\n <x-btn variant=\"primary\">\n <c-icon name=\"person\" v-bind=\"props\"></c-icon>\n </x-btn>\n </template>\n <template #default>\n <suspense>\n <user-details></user-details>\n </suspense>\n </template>\n </x-dialog>\n</template>\n"],"names":["getUserProfile","authenticationManager","profile","name","avatar","e","t","useI18n","messages","cristal","inject","browserApi","browserApiName","error","__temp","__restore","_withAsyncContext","logout","_unref","_openBlock","_createElementBlock","_createBlock","I18nT","_createElementVNode","_component_x_avatar","_createTextVNode","_createVNode","_component_x_btn","_component_x_dialog","_withCtx","props","_mergeProps","_Suspense","UserDetails"],"mappings":"uPA6BA,eAAsBA,EACpBC,EAMC,CACD,GAAI,CACF,KAAM,CAAE,QAAAC,EAAS,KAAAC,EAAM,OAAAC,GACrB,MAAMH,EAAsB,eAAA,EAC9B,MAAO,CAAE,QAAAC,EAAS,KAAAC,EAAM,OAAAC,EAAQ,MAAO,EAAA,CACzC,OAASC,EAAG,CACV,eAAQ,MAAM,oCAAqCA,CAAC,EAC7C,CAAE,MAAO,EAAA,CAClB,CACF,6EChBA,KAAM,CAAE,EAAAC,CAAA,EAAMC,EAAQ,CAAA,SACpBC,CAAA,CACD,EAEKC,EAAUC,EAAmB,SAAS,EAEtCT,EAAwBQ,EAC3B,aAAA,EACA,IAAmC,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5B,UACT,IAEW,MAFXT,EAEWW,EAAA,KAAA,WADT,IAA6B,CAA7BN,EAA6BO,CAAA,CAAA"}
@@ -1,2 +0,0 @@
1
- import{t as o}from"./translations-Ds9OkLNv.js";import{l as r,av as i,u as a,ax as c,ay as l,az as m,Z as u,V as p,aD as _,j as g,a4 as f}from"./index-B1WxkRNy.js";const v=r({__name:"LoginMenu",setup(x){const{t:e}=i({messages:o}),t=g("cristal").getContainer().get("AuthenticationManagerProvider").get();function n(){t?.start()}return(C,y)=>{const s=f("x-btn");return a(t)?(c(),l(s,{key:0,size:"small",type:"submit",variant:"primary",onClick:n},{default:m(()=>[u(p(a(e)("login")),1)]),_:1})):_("",!0)}}});export{v as default};
2
- //# sourceMappingURL=LoginMenu-D_c21AxX.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoginMenu-D_c21AxX.js","sources":["../../../core/authentication/authentication-ui/src/vue/LoginMenu.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n\n<script lang=\"ts\" setup>\nimport messages from \"../translations\";\nimport { inject } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type { CristalApp } from \"@xwiki/platform-api\";\nimport type { AuthenticationManagerProvider } from \"@xwiki/platform-authentication-api\";\n\nconst { t } = useI18n({\n messages,\n});\n\nconst cristal = inject<CristalApp>(\"cristal\")!;\n\nconst authenticationManager = cristal\n .getContainer()\n .get<AuthenticationManagerProvider>(\"AuthenticationManagerProvider\")\n .get();\n\nfunction login() {\n authenticationManager?.start();\n}\n</script>\n\n<template>\n <x-btn\n v-if=\"authenticationManager\"\n size=\"small\"\n type=\"submit\"\n variant=\"primary\"\n @click=\"login\"\n >\n {{ t(\"login\") }}\n </x-btn>\n</template>\n"],"names":["t","useI18n","messages","authenticationManager","inject","login","_unref","_createBlock","_component_x_btn"],"mappings":"0MA2BA,KAAM,CAAE,EAAAA,CAAA,EAAMC,EAAQ,CAAA,SACpBC,CAAA,CACD,EAIKC,EAFUC,EAAmB,SAAS,EAGzC,aAAA,EACA,IAAmC,+BAA+B,EAClE,IAAA,EAEH,SAASC,GAAQ,CACfF,GAAuB,MAAA,CACzB,yCAKUG,EAAAH,CAAA,OADRI,EAQQC,EAAA,OANN,KAAK,QACL,KAAK,SACL,QAAQ,UACP,QAAOH,CAAA,aAER,IAAgB,KAAbC,EAAAN,CAAA,EAAC,OAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- .dialog-content[data-v-54d63d2f]{min-width:600px}
@@ -1,2 +0,0 @@
1
- import{l as A,av as H,aM as I,ax as V,ay as b,az as n,n as r,Z as P,V as d,u as e,a2 as O,o as w,aD as T,aN as X,aO as F,aL as G,j as L,h as v,a4 as i,aG as Z}from"./index-B1WxkRNy.js";const $=["href"],q={class:"dialog-content"},E=A({__name:"MovePage",props:{currentPage:{},currentPageName:{},currentPageReference:{}},setup(R){const{t:a}=H({messages:I}),s=R,t=L("cristal"),h=t.getContainer().get("AlertsService"),x=t.getContainer().get("DocumentService"),S=t.getContainer().get("PageRenameManagerProvider").get(),y=t.getContainer().get("ModelReferenceHandlerProvider").get(),N=t.getContainer().get("ModelReferenceSerializerProvider").get(),p=v(!1),u=v(!0),f=v(void 0),_=v(void 0);let m,l;async function k(){if(m=y.createDocumentReference(s.currentPageReference.name,_.value),l=N.serialize(m),f.value=await t.getPage(l),!f.value){const g=await S.updateReference(s.currentPage,l,u.value);p.value=!1,await D(g)}}async function D(g){g.success?(u.value&&x.notifyDocumentChange("delete",s.currentPageReference),await t.setCurrentPage(l,"view"),h.success(a("page.action.action.move.page.success",{page:s.currentPageName,newPage:l})),x.notifyDocumentChange("update",m)):h.error(a("page.action.action.move.page.error",{page:s.currentPageName,reason:g.error}))}return(g,o)=>{const M=i("i18n-t"),z=i("x-alert"),B=i("XCheckbox"),U=i("x-form"),C=i("x-btn"),j=i("x-dialog");return V(),b(j,{modelValue:p.value,"onUpdate:modelValue":o[3]||(o[3]=c=>p.value=c),width:"auto",title:e(a)("page.action.action.move.page.dialog.title")},{activator:n(()=>[r(e(G),{name:"box-arrow-in-right",size:e(F).Small},null,8,["size"]),P(" "+d(e(a)("page.action.action.move.page.title")),1)]),default:n(()=>[f.value!==void 0?(V(),b(z,{key:0,type:"error"},{default:n(()=>[r(M,{keypath:"page.action.action.move.page.alert.content",tag:"span"},{pageName:n(()=>[w("a",{href:e(t).getRouter().resolve({name:"view",params:{page:e(l)}}).href},d(e(m)),9,$)]),_:1})]),_:1})):T("",!0),w("div",q,[r(U,{id:"page-move-form",onFormSubmit:k},{default:n(()=>[r(e(X),{modelValue:_.value,"onUpdate:modelValue":o[0]||(o[0]=c=>_.value=c),label:e(a)("page.action.action.move.page.location.label"),help:e(a)("page.action.action.move.page.location.help")},null,8,["modelValue","label","help"]),r(B,{modelValue:u.value,"onUpdate:modelValue":o[1]||(o[1]=c=>u.value=c),label:e(a)("page.action.action.move.page.preserve.children.label"),help:e(a)("page.action.action.move.page.preserve.children.help")},null,8,["modelValue","label","help"])]),_:1})])]),footer:n(()=>[r(C,{onClick:o[2]||(o[2]=O(c=>p.value=!1,["stop"]))},{default:n(()=>[P(d(e(a)("page.action.action.move.page.cancel")),1)]),_:1}),r(C,{variant:"primary",type:"submit",form:"page-move-form"},{default:n(()=>[P(d(e(a)("page.action.action.move.page.title")),1)]),_:1})]),_:1},8,["modelValue","title"])}}}),K=Z(E,[["__scopeId","data-v-54d63d2f"]]);export{K as default};
2
- //# sourceMappingURL=MovePage-Du2Z2i7H.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MovePage-Du2Z2i7H.js","sources":["../../../core/page-actions/page-actions-ui/src/vue/MovePage.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport messages from \"../translations\";\nimport { NavigationTreeSelect } from \"@xwiki/cristal-navigation-tree-ui\";\nimport { CIcon, Size } from \"@xwiki/platform-icons\";\nimport { inject, ref } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type { AlertsService } from \"@xwiki/cristal-alerts-api\";\nimport type {\n PageRenameManager,\n PageRenameManagerProvider,\n} from \"@xwiki/cristal-rename-api\";\nimport type { CristalApp, PageData } from \"@xwiki/platform-api\";\nimport type { DocumentService } from \"@xwiki/platform-document-api\";\nimport type {\n DocumentReference,\n SpaceReference,\n} from \"@xwiki/platform-model-api\";\nimport type {\n ModelReferenceHandler,\n ModelReferenceHandlerProvider,\n ModelReferenceSerializer,\n ModelReferenceSerializerProvider,\n} from \"@xwiki/platform-model-reference-api\";\nimport type { Ref } from \"vue\";\n\nconst { t } = useI18n({\n messages,\n});\nconst props = defineProps<{\n currentPage: PageData | undefined;\n currentPageName: string;\n currentPageReference: DocumentReference;\n}>();\n\nconst cristal: CristalApp = inject<CristalApp>(\"cristal\")!;\nconst alertsService: AlertsService = cristal\n .getContainer()\n .get<AlertsService>(\"AlertsService\")!;\nconst documentService = cristal\n .getContainer()\n .get<DocumentService>(\"DocumentService\");\nconst pageRenameManager: PageRenameManager = cristal\n .getContainer()\n .get<PageRenameManagerProvider>(\"PageRenameManagerProvider\")\n .get();\nconst referenceHandler: ModelReferenceHandler = cristal\n .getContainer()\n .get<ModelReferenceHandlerProvider>(\"ModelReferenceHandlerProvider\")\n .get()!;\nconst referenceSerializer: ModelReferenceSerializer = cristal\n .getContainer()\n .get<ModelReferenceSerializerProvider>(\"ModelReferenceSerializerProvider\")\n .get()!;\n\nconst dialogOpen: Ref<boolean> = ref(false);\nconst preserveChildren: Ref<boolean> = ref(true);\nconst existingPage: Ref<PageData | undefined> = ref(undefined);\nconst locationReference: Ref<SpaceReference | undefined> = ref(undefined);\nlet newDocumentReference: DocumentReference;\nlet newDocumentReferenceSerialized: string;\n\nasync function movePage() {\n newDocumentReference = referenceHandler.createDocumentReference(\n props.currentPageReference.name,\n locationReference.value!,\n );\n newDocumentReferenceSerialized =\n referenceSerializer.serialize(newDocumentReference)!;\n\n existingPage.value = await cristal.getPage(newDocumentReferenceSerialized);\n if (!existingPage.value) {\n const result = await pageRenameManager.updateReference(\n props.currentPage!,\n newDocumentReferenceSerialized,\n preserveChildren.value,\n );\n dialogOpen.value = false;\n await handleSuccess(result);\n }\n}\n\nasync function handleSuccess(result: { success: boolean; error?: string }) {\n if (result.success) {\n if (preserveChildren.value) {\n documentService.notifyDocumentChange(\n \"delete\",\n props.currentPageReference,\n );\n }\n await cristal.setCurrentPage(newDocumentReferenceSerialized, \"view\");\n alertsService.success(\n t(\"page.action.action.move.page.success\", {\n page: props.currentPageName,\n newPage: newDocumentReferenceSerialized,\n }),\n );\n documentService.notifyDocumentChange(\"update\", newDocumentReference);\n } else {\n alertsService.error(\n t(\"page.action.action.move.page.error\", {\n page: props.currentPageName,\n reason: result.error!,\n }),\n );\n }\n}\n</script>\n\n<template>\n <x-dialog\n v-model=\"dialogOpen\"\n width=\"auto\"\n :title=\"t('page.action.action.move.page.dialog.title')\"\n >\n <template #activator>\n <c-icon name=\"box-arrow-in-right\" :size=\"Size.Small\"></c-icon>\n {{ t(\"page.action.action.move.page.title\") }}\n </template>\n <template #default>\n <x-alert v-if=\"existingPage !== undefined\" type=\"error\">\n <i18n-t keypath=\"page.action.action.move.page.alert.content\" tag=\"span\">\n <template #pageName>\n <a\n :href=\"\n cristal.getRouter().resolve({\n name: 'view',\n params: { page: newDocumentReferenceSerialized },\n }).href\n \"\n >{{ newDocumentReference }}</a\n >\n </template>\n </i18n-t>\n </x-alert>\n <div class=\"dialog-content\">\n <x-form id=\"page-move-form\" @form-submit=\"movePage\">\n <navigation-tree-select\n v-model=\"locationReference\"\n :label=\"t('page.action.action.move.page.location.label')\"\n :help=\"t('page.action.action.move.page.location.help')\"\n ></navigation-tree-select>\n <XCheckbox\n v-model=\"preserveChildren\"\n :label=\"t('page.action.action.move.page.preserve.children.label')\"\n :help=\"t('page.action.action.move.page.preserve.children.help')\"\n ></XCheckbox>\n </x-form>\n </div>\n </template>\n <template #footer>\n <x-btn @click.stop=\"dialogOpen = false\">\n {{ t(\"page.action.action.move.page.cancel\") }}\n </x-btn>\n <x-btn variant=\"primary\" type=\"submit\" form=\"page-move-form\">\n {{ t(\"page.action.action.move.page.title\") }}\n </x-btn>\n </template>\n </x-dialog>\n</template>\n\n<style scoped>\n.dialog-content {\n min-width: 600px;\n}\n</style>\n"],"names":["t","useI18n","messages","props","__props","cristal","inject","alertsService","documentService","pageRenameManager","referenceHandler","referenceSerializer","dialogOpen","ref","preserveChildren","existingPage","locationReference","newDocumentReference","newDocumentReferenceSerialized","movePage","result","handleSuccess","_createBlock","_component_x_dialog","$event","_unref","_createVNode","CIcon","Size","_createTextVNode","_component_x_alert","_component_i18n_t","_createElementVNode","_hoisted_1","_hoisted_2","_component_x_form","NavigationTreeSelect","_component_XCheckbox","_component_x_btn"],"mappings":"uUA4CA,KAAM,CAAE,EAAAA,CAAA,EA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BAAA,aAC1C,IAA6C,KAA1Cb,EAAAzB,CAAA,EAAC,oCAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1,2 +0,0 @@
1
- import{l as S,av as k,j as C,aY as I,y as L,a4 as u,ax as p,ay as x,az as n,n as d,Z as h,V as _,u as e,o as w,aD as U,i as f,h as z,aG as B}from"./index-B1WxkRNy.js";const M={"authentication.nextcloud.modal.title":"Nextcloud Login","authentication.nextcloud.modal.username.label":"Username","authentication.nextcloud.modal.username.help":"Enter your username.","authentication.nextcloud.modal.password.label":"Password","authentication.nextcloud.modal.password.help":"It is not recommended to enter your own personal password, you should enter a specific application password instead.","authentication.nextcloud.modal.submit.label":"Log-in","authentication.nextcloud.modal.error.invalid":"Invalid username or password.","authentication.nextcloud.modal.error.generic":"Login check failed. Response status: {status}."},O={"authentication.nextcloud.modal.title":"Connexion à Nextcloud","authentication.nextcloud.modal.username.label":"Nom d'utilisateur","authentication.nextcloud.modal.username.help":"Saisissez votre nom d'utilisateur.","authentication.nextcloud.modal.password.label":"Mot de passe","authentication.nextcloud.modal.password.help":"Il n'est pas recommandé de saisir votre mot de passe personnel, vous devriez saisir un mot de passe d'application à la place.","authentication.nextcloud.modal.submit.label":"Se connecter","authentication.nextcloud.modal.error.invalid":"Nom d'utilisateur ou mot de passe non valide.","authentication.nextcloud.modal.error.generic":"Échec d’authentification. Statut de la réponse : {status}."},j={en:M,fr:O},D={class:"alerts-wrapper"},R={class:"alerts"},q=S({__name:"NextcloudLoginMenu",setup(A){const{t}=k({messages:j}),o=C("cristal").getContainer().get(I),r=o.modalOpened,c=o.username,m=o.password,l=z(void 0);async function g(){const s=await o.callback();s.success||(l.value=s.status)}return L(o.modalOpened,async(s,a)=>{s&&!a&&(o.username.value="",o.password.value="",l.value=void 0)}),(s,a)=>{const v=u("x-alert"),b=u("x-text-field"),y=u("x-form"),V=u("x-btn"),N=u("x-dialog");return p(),x(N,{modelValue:e(r),"onUpdate:modelValue":a[2]||(a[2]=i=>f(r)?r.value=i:null),width:"auto",title:e(t)("authentication.nextcloud.modal.title")},{default:n(()=>[w("div",D,[w("div",R,[l.value===401?(p(),x(v,{key:0,type:"error"},{default:n(()=>[h(_(e(t)("authentication.nextcloud.modal.error.invalid")),1)]),_:1})):l.value!==void 0?(p(),x(v,{key:1,type:"error"},{default:n(()=>[h(_(e(t)("authentication.nextcloud.modal.error.generic",{status:l.value})),1)]),_:1})):U("",!0)])]),d(y,{id:"nextcloud-login-form",onSubmit:g},{default:n(()=>[d(b,{modelValue:e(c),"onUpdate:modelValue":a[0]||(a[0]=i=>f(c)?c.value=i:null),label:e(t)("authentication.nextcloud.modal.username.label"),help:e(t)("authentication.nextcloud.modal.username.help"),autofocus:"",required:""},null,8,["modelValue","label","help"]),d(b,{modelValue:e(m),"onUpdate:modelValue":a[1]||(a[1]=i=>f(m)?m.value=i:null),type:"password",label:e(t)("authentication.nextcloud.modal.password.label"),help:e(t)("authentication.nextcloud.modal.password.help")},null,8,["modelValue","label","help"])]),_:1})]),footer:n(()=>[d(V,{variant:"primary",type:"submit",form:"nextcloud-login-form"},{default:n(()=>[h(_(e(t)("authentication.nextcloud.modal.submit.label")),1)]),_:1})]),_:1},8,["modelValue","title"])}}}),P=B(q,[["__scopeId","data-v-4819d836"]]);export{P as default};
2
- //# sourceMappingURL=NextcloudLoginMenu-BTVdL-FM.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NextcloudLoginMenu-BTVdL-FM.js","sources":["../../../core/authentication/authentication-nextcloud-ui/src/translations.ts","../../../core/authentication/authentication-nextcloud-ui/src/vue/NextcloudLoginMenu.vue"],"sourcesContent":["/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software 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 GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport en from \"../langs/translation-en.json\";\nimport fr from \"../langs/translation-fr.json\";\n\nconst translations = {\n en,\n fr,\n};\nexport default translations;\n","<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n\n<script lang=\"ts\" setup>\nimport messages from \"../translations\";\nimport { NextcloudAuthenticationState } from \"@xwiki/cristal-authentication-nextcloud-state\";\nimport { inject, ref, watch } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type { CristalApp } from \"@xwiki/platform-api\";\nimport type { Ref } from \"vue\";\n\nconst { t } = useI18n({\n messages,\n});\n\nconst cristal = inject<CristalApp>(\"cristal\")!;\n\nconst authenticationState = cristal\n .getContainer()\n .get<NextcloudAuthenticationState>(NextcloudAuthenticationState);\nconst modalOpened: Ref<boolean> = authenticationState.modalOpened;\nconst username: Ref<string> = authenticationState.username;\nconst password: Ref<string> = authenticationState.password;\nconst errorStatus: Ref<number | undefined> = ref(undefined);\n\nasync function callback() {\n const response = await authenticationState.callback();\n if (!response.success) {\n errorStatus.value = response.status;\n }\n}\n\nwatch(\n authenticationState.modalOpened,\n async (newValue: boolean, oldValue: boolean) => {\n if (newValue && !oldValue) {\n authenticationState.username.value = \"\";\n authenticationState.password.value = \"\";\n errorStatus.value = undefined;\n }\n },\n);\n</script>\n\n<template>\n <x-dialog\n v-model=\"modalOpened\"\n width=\"auto\"\n :title=\"t('authentication.nextcloud.modal.title')\"\n >\n <template #default>\n <!-- We need 2 different divs to implement the following behavior:\n - Use max available width from the parent\n - Do not resize the parent if the content is larger -->\n <div class=\"alerts-wrapper\">\n <div class=\"alerts\">\n <x-alert v-if=\"errorStatus === 401\" type=\"error\">\n {{ t(\"authentication.nextcloud.modal.error.invalid\") }}\n </x-alert>\n <x-alert v-else-if=\"errorStatus !== undefined\" type=\"error\">\n {{\n t(\"authentication.nextcloud.modal.error.generic\", {\n status: errorStatus,\n })\n }}\n </x-alert>\n </div>\n </div>\n <x-form id=\"nextcloud-login-form\" @submit=\"callback\">\n <x-text-field\n v-model=\"username\"\n :label=\"t('authentication.nextcloud.modal.username.label')\"\n :help=\"t('authentication.nextcloud.modal.username.help')\"\n autofocus\n required\n ></x-text-field>\n <x-text-field\n v-model=\"password\"\n type=\"password\"\n :label=\"t('authentication.nextcloud.modal.password.label')\"\n :help=\"t('authentication.nextcloud.modal.password.help')\"\n ></x-text-field>\n </x-form>\n </template>\n <template #footer>\n <x-btn variant=\"primary\" type=\"submit\" form=\"nextcloud-login-form\">{{\n t(\"authentication.nextcloud.modal.submit.label\")\n }}</x-btn>\n </template>\n </x-dialog>\n</template>\n\n<style scoped>\n.alerts-wrapper {\n display: flex;\n}\n.alerts {\n flex-grow: 1;\n width: 0;\n}\n</style>\n"],"names":["translations","en","fr","useI18n","messages","authenticationState","inject","NextcloudAuthenticationState","modalOpened","username","password","errorStatus","ref","callback","response","watch","newValue","oldValue","_createBlock","_component_x_dialog","_unref","$event","_createElementVNode","_hoisted_1","_hoisted_2","_component_x_alert","_createVNode","_component_x_form","_component_x_text_field","_component_x_btn"],"mappings":"mgDAuBMA,EAAe,CACnB,GAAAC,EACA,GAAAC,CACF,0FCEA,KAAM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EAAQ,MAAAW,EAAA,MACjB,KAAK,WACJ,MAAOD,EAAA,CAAA,EAAC,+CAAA,EACR,KAAMA,EAAA,CAAA,EAAC,8CAAA,CAAA,kDAIH,SACT,IAEU,CAFVM,EAEUG,EAAA,CAFH,QAAQ,UAAU,KAAK,SAAS,KAAK,sBAAA,aAAuB,IAEjE,KADAT,EAAA,CAAA,EAAC,6CAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- .alerts-wrapper[data-v-4819d836]{display:flex}.alerts[data-v-4819d836]{flex-grow:1;width:0}
@@ -1,2 +0,0 @@
1
- import{l as q,av as O,aM as U,H as A,ax as w,ay as y,az as n,n as c,Z as _,V as d,u as e,a2 as F,o as I,aD as L,aO as T,aL as Z,j as $,h as P,a4 as i}from"./index-B1WxkRNy.js";const E=["href"],J=q({__name:"RenamePage",props:{currentPage:{},currentPageName:{},currentPageReference:{}},setup(S){const{t}=O({messages:U}),s=S,a=$("cristal"),x=a.getContainer().get("AlertsService"),C=a.getContainer().get("DocumentService"),V=a.getContainer().get("PageRenameManagerProvider").get(),h=a.getContainer().get("ModelReferenceHandlerProvider").get(),D=a.getContainer().get("ModelReferenceParserProvider").get(),N=a.getContainer().get("ModelReferenceSerializerProvider").get(),g=P(!1),m=P(""),f=P(void 0);let v,u,r;A(()=>{v=D.parse(s.currentPageName),m.value=v.name});async function M(){if(u=h.createDocumentReference(m.value,v.space),r=N.serialize(u),f.value=await a.getPage(r),!f.value){const l=await V.updateReference(s.currentPage,r,!0);g.value=!1,await b(l)}}async function b(l){l.success?(C.notifyDocumentChange("delete",s.currentPageReference),a.setCurrentPage(r,"view"),x.success(t("page.action.action.rename.page.success",{page:s.currentPageName,newPage:r})),C.notifyDocumentChange("update",u)):x.error(t("page.action.action.rename.page.error",{page:s.currentPageName,reason:l.error}))}return(l,o)=>{const z=i("i18n-t"),k=i("x-alert"),B=i("x-text-field"),H=i("x-form"),R=i("x-btn"),j=i("x-dialog");return w(),y(j,{modelValue:g.value,"onUpdate:modelValue":o[2]||(o[2]=p=>g.value=p),width:"auto",title:e(t)("page.action.action.rename.page.dialog.title")},{activator:n(()=>[c(e(Z),{name:"pencil-square",size:e(T).Small},null,8,["size"]),_(" "+d(e(t)("page.action.action.rename.page.title")),1)]),default:n(()=>[f.value!==void 0?(w(),y(k,{key:0,type:"error"},{default:n(()=>[c(z,{keypath:"page.action.action.rename.page.alert.content",tag:"span"},{pageName:n(()=>[I("a",{href:e(a).getRouter().resolve({name:"view",params:{page:e(r)}}).href},d(e(u)),9,E)]),_:1})]),_:1})):L("",!0),c(H,{id:"page-rename-form",onFormSubmit:M},{default:n(()=>[c(B,{modelValue:m.value,"onUpdate:modelValue":o[0]||(o[0]=p=>m.value=p),label:e(t)("page.action.action.rename.page.name.label"),help:e(t)("page.action.action.rename.page.name.help"),name:"name",autofocus:"",required:""},null,8,["modelValue","label","help"])]),_:1})]),footer:n(()=>[c(R,{onClick:o[1]||(o[1]=F(p=>g.value=!1,["stop"]))},{default:n(()=>[_(d(e(t)("page.action.action.rename.page.cancel")),1)]),_:1}),c(R,{variant:"primary",type:"submit",form:"page-rename-form"},{default:n(()=>[_(d(e(t)("page.action.action.rename.page.title")),1)]),_:1})]),_:1},8,["modelValue","title"])}}});export{J as default};
2
- //# sourceMappingURL=RenamePage-CQF0H3Kh.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenamePage-CQF0H3Kh.js","sources":["../../../core/page-actions/page-actions-ui/src/vue/RenamePage.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport messages from \"../translations\";\nimport { CIcon, Size } from \"@xwiki/platform-icons\";\nimport { inject, onMounted, ref } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type { AlertsService } from \"@xwiki/cristal-alerts-api\";\nimport type {\n PageRenameManager,\n PageRenameManagerProvider,\n} from \"@xwiki/cristal-rename-api\";\nimport type { CristalApp, PageData } from \"@xwiki/platform-api\";\nimport type { DocumentService } from \"@xwiki/platform-document-api\";\nimport type { DocumentReference } from \"@xwiki/platform-model-api\";\nimport type {\n ModelReferenceHandler,\n ModelReferenceHandlerProvider,\n ModelReferenceParser,\n ModelReferenceParserProvider,\n ModelReferenceSerializer,\n ModelReferenceSerializerProvider,\n} from \"@xwiki/platform-model-reference-api\";\nimport type { Ref } from \"vue\";\n\nconst { t } = useI18n({\n messages,\n});\nconst props = defineProps<{\n currentPage: PageData | undefined;\n currentPageName: string;\n currentPageReference: DocumentReference;\n}>();\n\nconst cristal: CristalApp = inject<CristalApp>(\"cristal\")!;\nconst alertsService: AlertsService = cristal\n .getContainer()\n .get<AlertsService>(\"AlertsService\")!;\nconst documentService = cristal\n .getContainer()\n .get<DocumentService>(\"DocumentService\");\nconst pageRenameManager: PageRenameManager = cristal\n .getContainer()\n .get<PageRenameManagerProvider>(\"PageRenameManagerProvider\")\n .get();\nconst referenceHandler: ModelReferenceHandler = cristal\n .getContainer()\n .get<ModelReferenceHandlerProvider>(\"ModelReferenceHandlerProvider\")\n .get()!;\nconst referenceParser: ModelReferenceParser = cristal\n .getContainer()\n .get<ModelReferenceParserProvider>(\"ModelReferenceParserProvider\")\n .get()!;\nconst referenceSerializer: ModelReferenceSerializer = cristal\n .getContainer()\n .get<ModelReferenceSerializerProvider>(\"ModelReferenceSerializerProvider\")\n .get()!;\n\nconst dialogOpen: Ref<boolean> = ref(false);\nconst name: Ref<string> = ref(\"\");\nconst existingPage: Ref<PageData | undefined> = ref(undefined);\nlet currentDocumentReference: DocumentReference;\nlet newDocumentReference: DocumentReference;\nlet newDocumentReferenceSerialized: string;\n\nonMounted(() => {\n currentDocumentReference = referenceParser.parse(\n props.currentPageName,\n ) as DocumentReference;\n name.value = currentDocumentReference.name;\n});\n\nasync function renamePage() {\n newDocumentReference = referenceHandler.createDocumentReference(\n name.value,\n currentDocumentReference.space!,\n );\n newDocumentReferenceSerialized =\n referenceSerializer.serialize(newDocumentReference)!;\n\n existingPage.value = await cristal.getPage(newDocumentReferenceSerialized);\n if (!existingPage.value) {\n const result = await pageRenameManager.updateReference(\n props.currentPage!,\n newDocumentReferenceSerialized,\n true,\n );\n dialogOpen.value = false;\n await handleSuccess(result);\n }\n}\n\nasync function handleSuccess(result: { success: boolean; error?: string }) {\n if (result.success) {\n documentService.notifyDocumentChange(\"delete\", props.currentPageReference);\n cristal.setCurrentPage(newDocumentReferenceSerialized, \"view\");\n alertsService.success(\n t(\"page.action.action.rename.page.success\", {\n page: props.currentPageName,\n newPage: newDocumentReferenceSerialized,\n }),\n );\n documentService.notifyDocumentChange(\"update\", newDocumentReference);\n } else {\n alertsService.error(\n t(\"page.action.action.rename.page.error\", {\n page: props.currentPageName,\n reason: result.error!,\n }),\n );\n }\n}\n</script>\n\n<template>\n <x-dialog\n v-model=\"dialogOpen\"\n width=\"auto\"\n :title=\"t('page.action.action.rename.page.dialog.title')\"\n >\n <template #activator>\n <c-icon name=\"pencil-square\" :size=\"Size.Small\"></c-icon>\n {{ t(\"page.action.action.rename.page.title\") }}\n </template>\n <template #default>\n <x-alert v-if=\"existingPage !== undefined\" type=\"error\">\n <i18n-t\n keypath=\"page.action.action.rename.page.alert.content\"\n tag=\"span\"\n >\n <template #pageName>\n <a\n :href=\"\n cristal.getRouter().resolve({\n name: 'view',\n params: { page: newDocumentReferenceSerialized },\n }).href\n \"\n >{{ newDocumentReference }}</a\n >\n </template>\n </i18n-t>\n </x-alert>\n <x-form id=\"page-rename-form\" @form-submit=\"renamePage\">\n <x-text-field\n v-model=\"name\"\n :label=\"t('page.action.action.rename.page.name.label')\"\n :help=\"t('page.action.action.rename.page.name.help')\"\n name=\"name\"\n autofocus\n required\n ></x-text-field>\n </x-form>\n </template>\n <template #footer>\n <x-btn @click.stop=\"dialogOpen = false\">\n {{ t(\"page.action.action.rename.page.cancel\") }}\n </x-btn>\n <x-btn variant=\"primary\" type=\"submit\" form=\"page-rename-form\">\n {{ t(\"page.action.action.rename.page.title\") }}\n </x-btn>\n </template>\n </x-dialog>\n</template>\n\n<style scoped></style>\n"],"names":["useI18n","messages","props","__props","cristal","inject","alertsService","documentService","pageRenameManager","referenceHandler","referenceParser","referenceSerializer","dialogOpen","ref","name","existingPage","currentDocumentReference","newDocumentReference","newDocumentReferenceSerialized","onMounted","renamePage","result","handleSuccess","_createBlock","_component_x_dialog","$event","_unref","_createVNode","CIcon","Size","_createTextVNode","_component_x_alert","_component_i18n_t","_createElementVNode","_hoisted_1","_component_x_form","_component_x_text_field","_component_x_btn"],"mappings":"qSA0CA,KAAM,CAAE,CAAA,EAAMA,EAAQ,CAAA,SACpBC,CAAA,CACD,EACKC,EAAQC,EAMRC,EAAsBC,EAAmB,SAAS,EAClDC,EAA+BF,EAClC,aAAA,EACA,IAAmB,eAAe,EAC/BG,EAAkBH,EACrB,aAAA,EACA,IAAqB,iBAAiB,EACnCI,EAAuCJ,EAC1C,aAAA,EACA,IAA+B,2BAA2B,EAC1D,IAAA,EACGK,EAA0CL,EAC7C,aAAA,EACA,IAAmC,+BAA+B,EAClE,IAAA,EACGM,EAAwCN,EAC3C,aAAA,EACA,IAAkC,8BAA8B,EAChE,IAAA,EACGO,EAAgDP,EACnD,aAAA,EACA,IAAsC,kCAAkC,EACxE,IAAA,EAEGQ,EAA2BC,EAAI,EAAK,EACpCC,EAAoBD,EAAI,EAAE,EAC1BE,EAA0CF,EAAI,MAAS,EAC7D,IAAIG,EACAC,EACAC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,EAQC,IAAA,CAPE,KAAuBP,EAAAtB,CAAA,EAAQ,UAAA,EAAY,QAAO,0BAAqEsB,EAAAR,CAAA,CAAA,CAA8B,GAAuB,IAAA,IAMzKQ,EAAAT,CAAA,CAAoB,EAAA,EAAAiB,CAAA,CAAA,2BAKhCP,EASSQ,EAAA,CATD,GAAG,mBAAoB,aAAaf,CAAA,aAC1C,IAOgB,CAPhBO,EAOgBS,EAAA,YANLtB,EAAA,2CAAAA,EAAI,MAAAW,GACZ,MAAOC,EAAA,CAAA,EAAC,2CAAA,EACR,KAAMA,EAAA,CAAA,EAAC,0CAAA,EACR,KAAK,OACL,UAAA,GACA,SAAA,EAAA,kDAIK,SACT,IAEQ,CAFRC,EAEQU,EAAA,CAFA,yBAAYzB,EAAA,MAAU,GAAA,CAAA,MAAA,CAAA,EAAA,aAC5B,IAAgD,KAA7Cc,EAAA,CAAA,EAAC,uCAAA,CAAA,EAAA,CAAA,CAAA,SAENC,EAEQU,EAAA,CAFD,QAAQ,UAAU,KAAK,SAAS,KAAK,kBAAA,aAC1C,IAA+C,KAA5CX,EAAA,CAAA,EAAC,sCAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- table[data-v-915a0673]{width:100%;margin-top:var(--cr-spacing-medium)}.fixed-size-cell[data-v-915a0673]{width:0}.current-config[data-v-915a0673]{background-color:var(--cr-color-neutral-50);border-radius:var(--cr-border-radius-large);padding:var(--cr-spacing-small)}.nomargin[data-v-915a0673]{margin:0}.non-editable-configuration .text-cell[data-v-915a0673]{color:var(--cr-mute-text-color)}.editable-configuration[data-v-915a0673]:hover,.action-icon[data-v-915a0673]:hover{background-color:var(--cr-color-neutral-200);cursor:pointer}
@@ -1,2 +0,0 @@
1
- import{l as G,aP as te,av as J,aQ as K,y as ne,ax as y,ay as F,u as e,az as p,n as a,aL as D,aO as ae,Z as R,V as r,aR as le,j as Q,h as g,aS as B,a4 as x,aA as z,o as i,aD as I,F as H,aT as oe,v as se,a2 as j,aG as ie}from"./index-B1WxkRNy.js";const ue=G({__name:"ConfigurationEdit",props:le({configurations:{},configurationName:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(M){const _=M,d=te(M,"modelValue"),T=Q("cristal"),$=T.getContainer().get("WikiConfigProxy"),C=T.getContainer().get("SettingsManager"),P=T.getContainer().get("SettingsStorage"),W=["shoelace","vuetify"],O=["blocknote"],l=g(void 0),f=g(""),V=g(""),U=g(""),v=g(""),S=g(""),w=g(""),k=g(""),h=g(""),{t}=J({messages:K});ne(()=>_.configurationName,()=>{_.configurationName&&_.configurations.has(_.configurationName)&&(l.value=_.configurations.get(_.configurationName),f.value=l.value.baseURL??"",V.value=l.value.baseRestURL??"",U.value=l.value.homePage??"",v.value=l.value.designSystem??"",S.value=l.value.storageRoot??"",w.value=l.value.realtimeURL??"",k.value=l.value.authenticationBaseURL??"",h.value=l.value.editor??"")});async function o(){l.value&&(Object.assign(l.value,{baseURL:f.value,baseRestURL:V.value,homePage:U.value,designSystem:v.value,storageRoot:S.value,realtimeURL:w.value,authenticationBaseURL:k.value,editor:h.value}),Object.keys(l.value).forEach(L=>l.value[L]=l.value[L]||l.value[L]===!1?l.value[L]:void 0),C.get(B).content.set(_.configurationName,l.value),await P.save(C),await P.load(C),$.setAvailableConfigurations({[_.configurationName]:l.value}),d.value=!1)}return(L,s)=>{const N=x("x-text-field"),E=x("x-select"),A=x("x-btn"),c=x("x-form"),u=x("x-dialog");return y(),F(u,{modelValue:d.value,"onUpdate:modelValue":s[8]||(s[8]=n=>d.value=n),width:"auto",title:e(t)("settings.configurations.edit.title",{config:`${M.configurationName} (${l.value?.configType})`})},{default:p(()=>[a(c,{onFormSubmit:o},{default:p(()=>[a(N,{modelValue:f.value,"onUpdate:modelValue":s[0]||(s[0]=n=>f.value=n),label:e(t)("settings.configurations.edit.baseurl.label"),help:e(t)("settings.configurations.edit.baseurl.help")},null,8,["modelValue","label","help"]),a(N,{modelValue:V.value,"onUpdate:modelValue":s[1]||(s[1]=n=>V.value=n),label:e(t)("settings.configurations.edit.baseresturl.label"),help:e(t)("settings.configurations.edit.baseresturl.help")},null,8,["modelValue","label","help"]),a(N,{modelValue:U.value,"onUpdate:modelValue":s[2]||(s[2]=n=>U.value=n),label:e(t)("settings.configurations.edit.homepage.label"),help:e(t)("settings.configurations.edit.homepage.help")},null,8,["modelValue","label","help"]),a(E,{modelValue:v.value,"onUpdate:modelValue":s[3]||(s[3]=n=>v.value=n),label:e(t)("settings.configurations.edit.designsystem.label"),help:e(t)("settings.configurations.edit.designsystem.help"),items:W,required:""},null,8,["modelValue","label","help"]),a(N,{modelValue:S.value,"onUpdate:modelValue":s[4]||(s[4]=n=>S.value=n),label:e(t)("settings.configurations.edit.storageroot.label"),help:e(t)("settings.configurations.edit.storageroot.help")},null,8,["modelValue","label","help"]),a(N,{modelValue:w.value,"onUpdate:modelValue":s[5]||(s[5]=n=>w.value=n),label:e(t)("settings.configurations.edit.realtimeurl.label"),help:e(t)("settings.configurations.edit.realtimeurl.help")},null,8,["modelValue","label","help"]),a(N,{modelValue:k.value,"onUpdate:modelValue":s[6]||(s[6]=n=>k.value=n),label:e(t)("settings.configurations.edit.authenticationbaseurl.label"),help:e(t)("settings.configurations.edit.authenticationbaseurl.help")},null,8,["modelValue","label","help"]),a(E,{modelValue:h.value,"onUpdate:modelValue":s[7]||(s[7]=n=>h.value=n),label:e(t)("settings.configurations.edit.editor.label"),help:e(t)("settings.configurations.edit.editor.help"),items:O},null,8,["modelValue","label","help"]),a(A,{type:"submit",variant:"primary"},{default:p(()=>[a(e(D),{name:"floppy",size:e(ae).Small},null,8,["size"]),R(" "+r(e(t)("settings.configurations.edit.submit")),1)]),_:1})]),_:1})]),_:1},8,["modelValue","title"])}}}),re={key:0,class:"current-config"},ge={class:"nomargin"},de={class:"nomargin"},ce={class:"nomargin"},me={class:"mobile-transform"},fe=["onClick"],ve={class:"text-cell"},pe={class:"text-cell"},be={class:"text-cell"},_e={class:"fixed-size-cell"},Ve={key:0},he={class:"fixed-size-cell"},ye={class:"fixed-size-cell"},xe=G({__name:"ConfigurationsTable",props:{configurations:{}},setup(M){const _=M,d=Q("cristal"),T=d.getContainer().get("AlertsService"),$=d.getContainer().get("WikiConfigProxy"),C=d.getContainer().get("SettingsManager"),P=d.getContainer().get("SettingsStorage"),W=d.getContainer().getAll("WikiConfig").map(c=>c.getType()),O=$.getAvailableConfigurations(),l=g(),f=O.value.get(d.getWikiConfig().name),V=g(_.configurations),U=g(!1),v=g(""),S=g(""),w=g(!1),k=g(""),h=g(!1),t=g(""),{t:o}=J({messages:K});async function L(){if(d.getAvailableConfigurations().has(v.value))T.error(o("settings.configurations.table.new.error",{configName:v.value}));else{const c={configType:S.value,name:v.value};V.value.content.set(v.value,c),C.set(new B(V.value.content)),await P.save(C),$.setAvailableConfigurations({[v.value]:c}),s(v.value),await l.value?.reset(),U.value=!1}}function s(c){k.value=c,w.value=!0}function N(c){t.value=c,h.value=!0}async function E(){V.value.content.delete(t.value),C.set(new B(V.value.content)),await P.save(C),$.deleteAvailableConfiguration(t.value),h.value=!1}function A(c){return(c!=f?.name&&C.get(B)?.content?.has(c))??!1}return(c,u)=>{const n=x("x-btn"),X=x("x-text-field"),Y=x("x-select"),ee=x("x-form"),Z=x("x-dialog");return y(),z(H,null,[e(f)!==void 0?(y(),z("div",re,[i("h2",ge,r(e(o)("settings.configurations.current.title")),1),i("h3",de,r(e(f).name),1),R(" "+r(e(f).baseURL)+" ",1),i("h4",ce,r(e(o)("settings.configurations.table.header.ds")),1),R(" "+r(e(f).designSystem),1)])):I("",!0),i("h2",null,r(e(o)("settings.configurations.available.title")),1),a(Z,{modelValue:U.value,"onUpdate:modelValue":u[2]||(u[2]=b=>U.value=b),width:"auto",title:e(o)("settings.configurations.new")},{activator:p(()=>[a(n,{id:"new-configuration-button",variant:"primary"},{default:p(()=>[a(e(D),{name:"plus"}),R(" "+r(e(o)("settings.configurations.new")),1)]),_:1})]),default:p(()=>[a(ee,{ref_key:"newConfigurationForm",ref:l,onFormSubmit:L},{default:p(()=>[a(X,{modelValue:v.value,"onUpdate:modelValue":u[0]||(u[0]=b=>v.value=b),label:e(o)("settings.configurations.table.new.name.label"),help:e(o)("settings.configurations.table.new.name.help"),required:""},null,8,["modelValue","label","help"]),a(Y,{modelValue:S.value,"onUpdate:modelValue":u[1]||(u[1]=b=>S.value=b),label:e(o)("settings.configurations.table.new.type.label"),help:e(o)("settings.configurations.table.new.type.help"),items:e(W),required:""},null,8,["modelValue","label","help","items"]),a(n,{type:"submit",variant:"primary"},{default:p(()=>[a(e(D),{name:"plus"}),R(" "+r(e(o)("settings.configurations.table.new.submit")),1)]),_:1})]),_:1},512)]),_:1},8,["modelValue","title"]),i("table",me,[i("thead",null,[i("tr",null,[i("th",null,r(e(o)("settings.configurations.table.header.name")),1),i("th",null,r(e(o)("settings.configurations.table.header.type")),1),i("th",null,r(e(o)("settings.configurations.table.header.ds")),1),u[6]||(u[6]=i("th",null,null,-1)),u[7]||(u[7]=i("th",null,null,-1)),u[8]||(u[8]=i("th",null,null,-1))])]),i("tbody",null,[(y(!0),z(H,null,oe(e(O),([b,m])=>(y(),z("tr",{key:b,class:se(A(m.name)&&m.name!=e(f)?.name?"editable-configuration":"non-editable-configuration"),onClick:q=>A(m.name)&&m.name!=e(f)?.name?s(m.name):void 0},[i("td",ve,r(m.name),1),i("td",pe,r(m.getType()),1),i("td",be,r(m.designSystem),1),i("td",_e,[m.name==e(f)?.name?(y(),z("div",Ve,r(e(o)("settings.configurations.in-use")),1)):(y(),F(n,{key:1,onClick:q=>e(d)?.switchConfig(m.name)},{default:p(()=>[R(r(e(o)("settings.configurations.select")),1)]),_:1},8,["onClick"]))]),i("td",he,[A(m.name)?(y(),F(e(D),{key:0,name:"pencil",class:"action-icon",onClick:j(q=>s(m.name),["stop"])},null,8,["onClick"])):I("",!0)]),i("td",ye,[A(m.name)?(y(),F(e(D),{key:0,name:"trash",class:"action-icon",onClick:j(q=>N(m.name),["stop"])},null,8,["onClick"])):I("",!0)])],10,fe))),128))])]),a(ue,{modelValue:w.value,"onUpdate:modelValue":u[3]||(u[3]=b=>w.value=b),"configuration-name":k.value,configurations:V.value.content},null,8,["modelValue","configuration-name","configurations"]),a(Z,{modelValue:h.value,"onUpdate:modelValue":u[5]||(u[5]=b=>h.value=b),width:"auto",title:e(o)("settings.configurations.table.delete.title")},{default:p(()=>[i("p",null,r(e(o)("settings.configurations.table.delete.confirm",{configName:t.value})),1)]),footer:p(()=>[a(n,{onClick:u[4]||(u[4]=j(b=>h.value=!1,["stop"]))},{default:p(()=>[R(r(e(o)("settings.configurations.table.delete.cancel")),1)]),_:1}),a(n,{variant:"primary",onClick:j(E,["stop"])},{default:p(()=>[R(r(e(o)("settings.configurations.table.delete.title")),1)]),_:1})]),_:1},8,["modelValue","title"])],64)}}}),Ce=ie(xe,[["__scopeId","data-v-915a0673"]]),Se=G({__name:"SettingsConfigurations",setup(M){const d=Q("cristal").getContainer().get("SettingsManager");return(T,$)=>(y(),F(Ce,{configurations:e(d).get(e(B))??new(e(B))},null,8,["configurations"]))}});export{Se as default};
2
- //# sourceMappingURL=SettingsConfigurations-Cy7Cfmm4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SettingsConfigurations-Cy7Cfmm4.js","sources":["../../../core/settings/settings-configurations-ui/src/vue/ConfigurationEdit.vue","../../../core/settings/settings-configurations-ui/src/vue/ConfigurationsTable.vue","../../../core/settings/settings-configurations-ui/src/vue/SettingsConfigurations.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n\n<script lang=\"ts\" setup>\nimport messages from \"../translations\";\nimport { ConfigurationsSettings } from \"@xwiki/cristal-settings-configurations\";\nimport { CIcon, Size } from \"@xwiki/platform-icons\";\nimport { inject, ref, watch } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type {\n SettingsManager,\n SettingsStorage,\n} from \"@xwiki/cristal-settings-api\";\nimport type { WikiConfigProxy } from \"@xwiki/cristal-wiki-config-api\";\nimport type { CristalApp } from \"@xwiki/platform-api\";\nimport type { Configuration } from \"@xwiki/platform-configuration-api\";\nimport type { Ref } from \"vue\";\n\nconst props = defineProps<{\n configurations: Map<string, Configuration>;\n configurationName: string;\n}>();\n\nconst open = defineModel<boolean>();\n\nconst cristal = inject<CristalApp>(\"cristal\")!;\nconst wikiConfigProxy = cristal\n .getContainer()\n .get<WikiConfigProxy>(\"WikiConfigProxy\")!;\nconst settingsManager = cristal\n .getContainer()\n .get<SettingsManager>(\"SettingsManager\")!;\nconst settingsStorage = cristal\n .getContainer()\n .get<SettingsStorage>(\"SettingsStorage\")!;\n\n// TODO: find a way to list available design systems automatically.\n// https://jira.xwiki.org/browse/CRISTAL-541\nconst designSystems = [\"shoelace\", \"vuetify\"];\n\n// TODO: find a way to list available editors automatically.\n// https://jira.xwiki.org/browse/CRISTAL-541\nconst editors = [\"blocknote\"];\n\nconst configuration: Ref<Configuration | undefined> = ref(undefined);\n\nconst baseUrl: Ref<string> = ref(\"\");\nconst baseRestUrl: Ref<string> = ref(\"\");\nconst homePage: Ref<string> = ref(\"\");\nconst designSystem: Ref<string> = ref(\"\");\nconst storageRoot: Ref<string> = ref(\"\");\nconst realtimeUrl: Ref<string> = ref(\"\");\nconst authenticationBaseUrl: Ref<string> = ref(\"\");\nconst editor: Ref<string> = ref(\"\");\n\nconst { t } = useI18n({\n messages,\n});\n\nwatch(\n () => props.configurationName,\n () => {\n if (\n props.configurationName &&\n props.configurations.has(props.configurationName)\n ) {\n configuration.value = props.configurations.get(props.configurationName)!;\n baseUrl.value = (configuration.value.baseURL ?? \"\") as string;\n baseRestUrl.value = (configuration.value.baseRestURL ?? \"\") as string;\n homePage.value = (configuration.value.homePage ?? \"\") as string;\n designSystem.value = (configuration.value.designSystem ?? \"\") as string;\n storageRoot.value = (configuration.value.storageRoot ?? \"\") as string;\n realtimeUrl.value = (configuration.value.realtimeURL ?? \"\") as string;\n authenticationBaseUrl.value = (configuration.value\n .authenticationBaseURL ?? \"\") as string;\n editor.value = (configuration.value.editor ?? \"\") as string;\n }\n },\n);\n\nasync function submit() {\n if (configuration.value) {\n // We want to only reassign the values managed by the current form.\n Object.assign(configuration.value, {\n baseURL: baseUrl.value,\n baseRestURL: baseRestUrl.value,\n homePage: homePage.value,\n designSystem: designSystem.value,\n storageRoot: storageRoot.value,\n realtimeURL: realtimeUrl.value,\n authenticationBaseURL: authenticationBaseUrl.value,\n editor: editor.value,\n });\n\n // Clean up all empty and null properties.\n Object.keys(configuration.value).forEach(\n (k) =>\n (configuration.value![k] =\n configuration.value![k] || configuration.value![k] === false\n ? configuration.value![k]\n : undefined),\n );\n\n settingsManager\n .get(ConfigurationsSettings)!\n .content.set(props.configurationName, configuration.value);\n await settingsStorage.save(settingsManager);\n await settingsStorage.load(settingsManager);\n wikiConfigProxy.setAvailableConfigurations({\n [props.configurationName]: configuration.value,\n });\n open.value = false;\n }\n}\n</script>\n\n<template>\n <x-dialog\n v-model=\"open\"\n width=\"auto\"\n :title=\"\n t('settings.configurations.edit.title', {\n config: `${configurationName} (${configuration?.configType})`,\n })\n \"\n >\n <template #default>\n <x-form @form-submit=\"submit\">\n <x-text-field\n v-model=\"baseUrl\"\n :label=\"t('settings.configurations.edit.baseurl.label')\"\n :help=\"t('settings.configurations.edit.baseurl.help')\"\n ></x-text-field>\n <x-text-field\n v-model=\"baseRestUrl\"\n :label=\"t('settings.configurations.edit.baseresturl.label')\"\n :help=\"t('settings.configurations.edit.baseresturl.help')\"\n ></x-text-field>\n <x-text-field\n v-model=\"homePage\"\n :label=\"t('settings.configurations.edit.homepage.label')\"\n :help=\"t('settings.configurations.edit.homepage.help')\"\n ></x-text-field>\n <x-select\n v-model=\"designSystem\"\n :label=\"t('settings.configurations.edit.designsystem.label')\"\n :help=\"t('settings.configurations.edit.designsystem.help')\"\n :items=\"designSystems\"\n required\n ></x-select>\n <x-text-field\n v-model=\"storageRoot\"\n :label=\"t('settings.configurations.edit.storageroot.label')\"\n :help=\"t('settings.configurations.edit.storageroot.help')\"\n ></x-text-field>\n <x-text-field\n v-model=\"realtimeUrl\"\n :label=\"t('settings.configurations.edit.realtimeurl.label')\"\n :help=\"t('settings.configurations.edit.realtimeurl.help')\"\n ></x-text-field>\n <x-text-field\n v-model=\"authenticationBaseUrl\"\n :label=\"t('settings.configurations.edit.authenticationbaseurl.label')\"\n :help=\"t('settings.configurations.edit.authenticationbaseurl.help')\"\n ></x-text-field>\n <x-select\n v-model=\"editor\"\n :label=\"t('settings.configurations.edit.editor.label')\"\n :help=\"t('settings.configurations.edit.editor.help')\"\n :items=\"editors\"\n ></x-select>\n <x-btn type=\"submit\" variant=\"primary\">\n <c-icon name=\"floppy\" :size=\"Size.Small\"></c-icon>\n {{ t(\"settings.configurations.edit.submit\") }}</x-btn\n >\n </x-form>\n </template>\n </x-dialog>\n</template>\n","<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n\n<script lang=\"ts\" setup>\nimport ConfigurationEdit from \"./ConfigurationEdit.vue\";\nimport messages from \"../translations\";\nimport { ConfigurationsSettings } from \"@xwiki/cristal-settings-configurations\";\nimport { CIcon } from \"@xwiki/platform-icons\";\nimport { inject, ref } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport type { AlertsService } from \"@xwiki/cristal-alerts-api\";\nimport type {\n SettingsManager,\n SettingsStorage,\n} from \"@xwiki/cristal-settings-api\";\nimport type { WikiConfigProxy } from \"@xwiki/cristal-wiki-config-api\";\nimport type { CristalApp, WikiConfig } from \"@xwiki/platform-api\";\nimport type { Ref } from \"vue\";\n\nconst props = defineProps<{\n configurations: ConfigurationsSettings;\n}>();\n\nconst cristal = inject<CristalApp>(\"cristal\")!;\nconst alertsService = cristal\n .getContainer()\n .get<AlertsService>(\"AlertsService\")!;\nconst wikiConfigProxy = cristal\n .getContainer()\n .get<WikiConfigProxy>(\"WikiConfigProxy\")!;\nconst settingsManager = cristal\n .getContainer()\n .get<SettingsManager>(\"SettingsManager\")!;\nconst settingsStorage = cristal\n .getContainer()\n .get<SettingsStorage>(\"SettingsStorage\")!;\nconst configTypes = cristal\n .getContainer()\n .getAll<WikiConfig>(\"WikiConfig\")\n .map((c) => c.getType());\n\nconst configs: Ref<Map<string, WikiConfig>> =\n wikiConfigProxy.getAvailableConfigurations();\nconst newConfigurationForm = ref();\nconst currentConfig = configs.value.get(cristal.getWikiConfig().name);\n\nconst reactiveConfigurations: Ref<ConfigurationsSettings> = ref(\n props.configurations,\n);\nconst newDialogOpen: Ref<boolean> = ref(false);\nconst newName: Ref<string> = ref(\"\");\nconst newType: Ref<string> = ref(\"\");\nconst editDialogOpen: Ref<boolean | undefined> = ref(false);\nconst editName: Ref<string> = ref(\"\");\nconst deleteDialogOpen: Ref<boolean> = ref(false);\nconst deleteName: Ref<string> = ref(\"\");\n\nconst { t } = useI18n({\n messages,\n});\n\nasync function submit() {\n if (cristal.getAvailableConfigurations().has(newName.value)) {\n alertsService.error(\n t(\"settings.configurations.table.new.error\", {\n configName: newName.value,\n }),\n );\n } else {\n const newConfig = { configType: newType.value, name: newName.value };\n reactiveConfigurations.value.content.set(newName.value, newConfig);\n settingsManager.set(\n new ConfigurationsSettings(reactiveConfigurations.value.content),\n );\n await settingsStorage.save(settingsManager);\n wikiConfigProxy.setAvailableConfigurations({ [newName.value]: newConfig });\n preEditConfig(newName.value);\n await newConfigurationForm.value?.reset();\n newDialogOpen.value = false;\n }\n}\n\nfunction preEditConfig(name: string) {\n editName.value = name;\n editDialogOpen.value = true;\n}\n\nfunction preDeleteConfig(name: string) {\n deleteName.value = name;\n deleteDialogOpen.value = true;\n}\n\nasync function deleteConfig() {\n reactiveConfigurations.value.content.delete(deleteName.value);\n settingsManager.set(\n new ConfigurationsSettings(reactiveConfigurations.value.content),\n );\n await settingsStorage.save(settingsManager);\n wikiConfigProxy.deleteAvailableConfiguration(deleteName.value);\n deleteDialogOpen.value = false;\n}\n\nfunction isEditable(configName: string): boolean {\n return (\n (configName != currentConfig?.name &&\n settingsManager.get(ConfigurationsSettings)?.content?.has(configName)) ??\n false\n );\n}\n</script>\n\n<template>\n <div v-if=\"currentConfig !== undefined\" class=\"current-config\">\n <h2 class=\"nomargin\">{{ t(\"settings.configurations.current.title\") }}</h2>\n <h3 class=\"nomargin\">{{ currentConfig.name }}</h3>\n {{ currentConfig.baseURL }}\n <h4 class=\"nomargin\">{{ t(\"settings.configurations.table.header.ds\") }}</h4>\n {{ currentConfig.designSystem }}\n </div>\n\n <h2>{{ t(\"settings.configurations.available.title\") }}</h2>\n <x-dialog\n v-model=\"newDialogOpen\"\n width=\"auto\"\n :title=\"t('settings.configurations.new')\"\n >\n <template #activator>\n <x-btn id=\"new-configuration-button\" variant=\"primary\">\n <c-icon name=\"plus\"></c-icon>\n {{ t(\"settings.configurations.new\") }}</x-btn\n >\n </template>\n <template #default>\n <x-form ref=\"newConfigurationForm\" @form-submit=\"submit\">\n <x-text-field\n v-model=\"newName\"\n :label=\"t('settings.configurations.table.new.name.label')\"\n :help=\"t('settings.configurations.table.new.name.help')\"\n required\n ></x-text-field>\n <x-select\n v-model=\"newType\"\n :label=\"t('settings.configurations.table.new.type.label')\"\n :help=\"t('settings.configurations.table.new.type.help')\"\n :items=\"configTypes\"\n required\n ></x-select>\n <x-btn type=\"submit\" variant=\"primary\">\n <c-icon name=\"plus\"></c-icon>\n {{ t(\"settings.configurations.table.new.submit\") }}</x-btn\n >\n </x-form>\n </template>\n </x-dialog>\n\n <table class=\"mobile-transform\">\n <thead>\n <tr>\n <th>{{ t(\"settings.configurations.table.header.name\") }}</th>\n <th>{{ t(\"settings.configurations.table.header.type\") }}</th>\n <th>{{ t(\"settings.configurations.table.header.ds\") }}</th>\n <th></th>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"[key, wikiConfig] in configs\"\n :key=\"key\"\n :class=\"\n isEditable(wikiConfig.name) && wikiConfig.name != currentConfig?.name\n ? 'editable-configuration'\n : 'non-editable-configuration'\n \"\n @click=\"\n isEditable(wikiConfig.name) && wikiConfig.name != currentConfig?.name\n ? preEditConfig(wikiConfig.name)\n : undefined\n \"\n >\n <td class=\"text-cell\">{{ wikiConfig.name }}</td>\n <td class=\"text-cell\">{{ wikiConfig.getType() }}</td>\n <td class=\"text-cell\">{{ wikiConfig.designSystem }}</td>\n <td class=\"fixed-size-cell\">\n <div v-if=\"wikiConfig.name == currentConfig?.name\">\n {{ t(\"settings.configurations.in-use\") }}\n </div>\n <x-btn v-else @click=\"cristal?.switchConfig(wikiConfig.name)\">\n {{ t(\"settings.configurations.select\") }}\n </x-btn>\n </td>\n <td class=\"fixed-size-cell\">\n <c-icon\n name=\"pencil\"\n class=\"action-icon\"\n v-if=\"isEditable(wikiConfig.name)\"\n @click.stop=\"preEditConfig(wikiConfig.name)\"\n ></c-icon>\n </td>\n <td class=\"fixed-size-cell\">\n <c-icon\n name=\"trash\"\n class=\"action-icon\"\n v-if=\"isEditable(wikiConfig.name)\"\n @click.stop=\"preDeleteConfig(wikiConfig.name)\"\n ></c-icon>\n </td>\n </tr>\n </tbody>\n </table>\n <ConfigurationEdit\n v-model=\"editDialogOpen\"\n :configuration-name=\"editName\"\n :configurations=\"reactiveConfigurations.content\"\n >\n </ConfigurationEdit>\n <x-dialog\n v-model=\"deleteDialogOpen\"\n width=\"auto\"\n :title=\"t('settings.configurations.table.delete.title')\"\n >\n <template #default>\n <p>\n {{\n t(\"settings.configurations.table.delete.confirm\", {\n configName: deleteName,\n })\n }}\n </p>\n </template>\n <template #footer>\n <x-btn @click.stop=\"deleteDialogOpen = false\">\n {{ t(\"settings.configurations.table.delete.cancel\") }}\n </x-btn>\n <x-btn variant=\"primary\" @click.stop=\"deleteConfig\">\n {{ t(\"settings.configurations.table.delete.title\") }}\n </x-btn>\n </template>\n </x-dialog>\n</template>\n\n<style scoped>\ntable {\n width: 100%;\n margin-top: var(--cr-spacing-medium);\n}\n\n.fixed-size-cell {\n width: 0;\n}\n\n.current-config {\n background-color: var(--cr-color-neutral-50);\n border-radius: var(--cr-border-radius-large);\n padding: var(--cr-spacing-small);\n}\n\n.nomargin {\n margin: 0;\n}\n\n.non-editable-configuration .text-cell {\n color: var(--cr-mute-text-color);\n}\n\n.editable-configuration:hover,\n.action-icon:hover {\n background-color: var(--cr-color-neutral-200);\n cursor: pointer;\n}\n</style>\n","<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n\n<script lang=\"ts\" setup>\nimport ConfigurationsTable from \"./ConfigurationsTable.vue\";\nimport { ConfigurationsSettings } from \"@xwiki/cristal-settings-configurations\";\nimport { inject } from \"vue\";\nimport type { SettingsManager } from \"@xwiki/cristal-settings-api\";\nimport type { CristalApp } from \"@xwiki/platform-api\";\n\nconst cristal = inject<CristalApp>(\"cristal\")!;\nconst settingsManager = cristal\n .getContainer()\n .get<SettingsManager>(\"SettingsManager\")!;\n</script>\n\n<template>\n <ConfigurationsTable\n :configurations=\"\n settingsManager.get(ConfigurationsSettings) ??\n new ConfigurationsSettings()\n \"\n ></ConfigurationsTable>\n</template>\n"],"names":["props","__props","open","_useModel","cristal","inject","wikiConfigProxy","settingsManager","settingsStorage","designSystems","editors","configuration","ref","baseUrl","baseRestUrl","homePage","designSystem","storageRoot","realtimeUrl","authenticationBaseUrl","editor","useI18n","messages","watch","submit","k","ConfigurationsSettings","_createBlock","_component_x_dialog","$event","_unref","_createVNode","_component_x_form","_component_x_text_field","_component_x_select","_component_x_btn","CIcon","Size","_createTextVNode","alertsService","configTypes","configs","newConfigurationForm","currentConfig","reactiveConfigurations","newDialogOpen","newName","newType","editDialogOpen","editName","deleteDialogOpen","deleteName","t","newConfig","preEditConfig","name","preDeleteConfig","deleteConfig","isEditable","configName","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_toDisplayString","_hoisted_3","_hoisted_4","_hoisted_5","_Fragment","_renderList","key","wikiConfig","_normalizeClass","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_12","_withModifiers","_hoisted_13","ConfigurationEdit","ConfigurationsTable"],"mappings":"kaAmCA,MAAMA,EAAQC,EAKRC,EAAOC,GAAoBF,EAAA,YAAC,EAE5BG,EAAUC,EAAmB,SAAS,EACtCC,EAAkBF,EACrB,aAAA,EACA,IAAqB,iBAAiB,EACnCG,EAAkBH,EACrB,aAAA,EAC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AClC,IAAsD,KAAnDpB,EAAAsB,CAAA,EAAC,6CAAA,CAAA,EAAA,CAAA,CAAA,SAENrB,EAEQI,EAAA,CAFD,QAAQ,UAAW,UAAYsB,EAAY,CAAA,MAAA,CAAA,CAAA,aAChD,IAAqD,KAAlD3B,EAAAsB,CAAA,EAAC,4CAAA,CAAA,EAAA,CAAA,CAAA,8ICjOZ,MAAM7C,EADUF,EAAmB,SAAS,EAEzC,aAAA,EACA,IAAqB,iBAAiB,oBAIvCsB,EAKuBuD,GAAA,CAJpB,eAAuBpD,EAAAvB,CAAA,EAAgB,IAAIuB,EAAAJ,CAAA,CAAsB,OAAeI,EAAAJ,CAAA,EAAsB"}
@@ -1 +0,0 @@
1
- .config-container[data-v-52310618]{display:flex}.config-container[data-v-52310618]>*:first-child{flex-grow:1;cursor:pointer}.url[data-v-52310618]{font-weight:var(--cr-font-weight-semi-bold);color:var(--cr-color-neutral-500);font-size:var(--cr-font-size-small);overflow-wrap:break-word;line-height:var(--cr-font-size-small);width:100%}.item:focus-visible .url[data-v-52310618]{color:inherit}a[data-v-52310618]{text-decoration:none;color:inherit}._blackText_6yndr_2{color:var(--cr-base-text-color)}
@@ -1,2 +0,0 @@
1
- import{l as T,aA as m,n as s,az as o,u as e,j as z,a4 as i,ax as u,F as h,aT as $,ay as w,o as l,Z as d,V as c,aL as g,aO as f,v as p,aG as B}from"./index-B1WxkRNy.js";const S={class:"config-container"},V={class:"url"},W=T({__name:"c-config-menu",setup(j){const n=z("cristal"),x=n.getContainer().get("WikiConfigProxy").getAvailableConfigurations();function C(t){t!==n.getWikiConfig().name&&n?.switchConfig(t)}return(t,_)=>{const v=i("x-menu-item"),k=i("x-menu"),b=i("x-dropdown"),y=i("x-btn");return u(),m("div",S,[s(b,{class:"config-selector","btn-props":{variant:"text"}},{activator:o(()=>[l("span",{class:p(t.$style.blackText)},[s(e(g),{name:"chevron-expand",size:e(f).Small},null,8,["size"]),d(" "+c(e(n).getWikiConfig().name),1)],2)]),default:o(()=>[s(k,null,{default:o(()=>[(u(!0),m(h,null,$(e(x),([a,r])=>(u(),w(v,{value:a,onClick:F=>C(a),disabled:a===e(n).getWikiConfig().name,key:a,class:"item"},{default:o(()=>[l("div",null,[d(c(r.name)+" ",1),l("i",null,[l("small",null,c(r.designSystem),1)])]),l("div",V,c(r.baseURL),1)]),_:2},1032,["value","onClick","disabled"]))),128))]),_:1})]),_:1}),s(y,{variant:"text",onClick:_[0]||(_[0]=a=>e(n).getRouter().push({name:"admin",params:{page:"settings.categories.configurations"}}))},{default:o(()=>[s(e(g),{size:e(f).Small,name:"gear",class:p(t.$style.blackText)},null,8,["size","class"])]),_:1})])}}}),L="_blackText_6yndr_2",M={blackText:L},P={$style:M},R=B(W,[["__cssModules",P],["__scopeId","data-v-52310618"]]);export{R as default};
2
- //# sourceMappingURL=c-config-menu-C99poXWy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"c-config-menu-C99poXWy.js","sources":["../../../skin/src/vue/c-config-menu.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software 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 GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { CIcon, Size } from \"@xwiki/platform-icons\";\nimport { inject } from \"vue\";\nimport type { WikiConfigProxy } from \"@xwiki/cristal-wiki-config-api\";\nimport type { CristalApp, WikiConfig } from \"@xwiki/platform-api\";\nimport type { Ref } from \"vue\";\n\nconst cristal: CristalApp = inject<CristalApp>(\"cristal\")!;\nconst wikiConfigProxy = cristal\n .getContainer()\n .get<WikiConfigProxy>(\"WikiConfigProxy\")!;\nconst configs: Ref<Map<string, WikiConfig>> =\n wikiConfigProxy.getAvailableConfigurations();\n\nfunction onConfigClick(configName: string) {\n if (configName !== cristal.getWikiConfig().name) {\n cristal?.switchConfig(configName);\n }\n}\n</script>\n\n<template>\n <div class=\"config-container\">\n <x-dropdown class=\"config-selector\" :btn-props=\"{ variant: 'text' }\">\n <template #activator>\n <span :class=\"$style.blackText\">\n <c-icon name=\"chevron-expand\" :size=\"Size.Small\"></c-icon>\n {{ cristal.getWikiConfig().name }}\n </span>\n </template>\n <x-menu>\n <x-menu-item\n v-for=\"[key, wikiConfig] in configs\"\n :value=\"key\"\n @click=\"onConfigClick(key)\"\n :disabled=\"key === cristal.getWikiConfig().name\"\n :key=\"key\"\n class=\"item\"\n >\n <div>\n {{ wikiConfig.name }}\n <i\n ><small>{{ wikiConfig.designSystem }}</small></i\n >\n </div>\n <div class=\"url\">{{ wikiConfig.baseURL }}</div>\n </x-menu-item>\n </x-menu>\n </x-dropdown>\n <x-btn\n variant=\"text\"\n @click=\"\n cristal.getRouter().push({\n name: 'admin',\n params: { page: 'settings.categories.configurations' },\n })\n \"\n ><c-icon :size=\"Size.Small\" name=\"gear\" :class=\"$style.blackText\"></c-icon\n ></x-btn>\n </div>\n</template>\n\n<style scoped>\n.config-container {\n display: flex;\n}\n\n.config-container > *:first-child {\n flex-grow: 1;\n cursor: pointer;\n}\n\n.url {\n font-weight: var(--cr-font-weight-semi-bold);\n color: var(--cr-color-neutral-500);\n font-size: var(--cr-font-size-small);\n overflow-wrap: break-word;\n line-height: var(--cr-font-size-small);\n width: 100%;\n}\n\n.item:focus-visible .url {\n color: inherit;\n}\n\na {\n text-decoration: none;\n color: inherit;\n}\n</style>\n\n<style module>\n.blackText {\n color: var(--cr-base-text-color);\n}\n</style>\n"],"names":["cristal","inject","configs","onConfigClick","configName","_openBlock","_createElementBlock","_hoisted_1","_createVNode","_component_x_dropdown","_createElementVNode","_normalizeClass","$style","_unref","CIcon","Size","_createTextVNode","_toDisplayString","_component_x_menu","_Fragment","_renderList","key","wikiConfig","_createBlock","_component_x_menu_item","$event","_hoisted_2","_component_x_btn","_cache"],"mappings":"gQA0BA,MAAMA,EAAsBC,EAAmB,SAAS,EAIlDC,EAHkBF,EACrB,aAAA,EACA,IAAqB,iBAAiB,EAEvB,2BAAA,EAElB,SAASG,EAAcC,EAAoB,CACrCA,IAAeJ,EAAQ,cAAA,EAAgB,MACzCA,GAAS,aAAaI,CAAU,CAEpC,qFAIE,OAAAC,EAAA,EAAAC,EAqCM,MArCNC,EAqCM,CApCJC,EAyBaC,EAAA,CAzBD,MAAM,kBAAmB,YAAW,CAAA,QAAA,MAAA,CAAA,GACnC,YACT,IAGO,CAHPC,EAGO,OAAA,CAHA,MAAKC,EAAEC,EAAAA,OAAO,SAAS,CAAA,GAC5BJ,EAA0DK,EAAAC,CAAA,EAAA,CAAlD,KAAK,iBAAkB,KAAMD,EAAAE,CAAA,EAAK,KAAA,mBAAgBC,EAAA,IAC1DC,EAAGJ,EAAAb,CAAA,EAAQ,cAAA,EAAgB,IAAI,EAAA,CAAA,CAAA,iBAGnC,IAiBS,CAjBTQ,EAiBSU,EAAA,KAAA,WAfL,IAAoC,EADtCb,EAAA,EAAA,EAAAC,EAeca,EAAA,KAAAC,EAdgBP,EAAAX,CAAA,EAAO,CAAA,CAA3BmB,EAAKC,CAAU,SADzBC,EAecC,EAAA,CAbX,MAAOH,EACP,QAAKI,GAAEtB,EAAckB,CAAG,EACxB,SAAUA,IAAQR,KAAQ,gBAAgB,KAC1C,IAAAQ,EACD,MAAM,MAAA,aAEN,IAKM,CALNX,EAKM,MAAA,KAAA,KAJDY,EAAW,IAAI,EAAG,IACrB,CAAA,EAAAZ,EAEC,IAAA,KAAA,CADEA,EAA4C,QAAA,KAAAO,EAAlCK,EAAW,YAAY,EAAA,CAAA,CAAA,KAGtCZ,EAA+C,MAA/C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