@vc-shell/framework 1.1.89 → 1.1.91-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 (338) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/core/api/platform.ts +9883 -9883
  3. package/core/composables/useNotifications/index.ts +32 -1
  4. package/core/composables/useUser/index.ts +74 -171
  5. package/core/composables/useUserManagement/index.ts +67 -25
  6. package/core/interceptors/index.ts +19 -56
  7. package/core/plugins/signalR/index.ts +27 -1
  8. package/core/providers/README.md +176 -0
  9. package/core/providers/auth-provider-manager.ts +74 -0
  10. package/core/providers/auth-provider-utils.ts +26 -0
  11. package/core/providers/example-custom-auth-provider.ts +161 -0
  12. package/core/providers/index.ts +3 -0
  13. package/core/providers/platform-auth-provider.ts +205 -0
  14. package/core/types/auth-provider.ts +45 -0
  15. package/core/types/index.ts +2 -0
  16. package/dist/core/api/platform.d.ts +1 -1
  17. package/dist/core/api/platform.d.ts.map +1 -1
  18. package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
  19. package/dist/core/composables/useUser/index.d.ts +18 -9
  20. package/dist/core/composables/useUser/index.d.ts.map +1 -1
  21. package/dist/core/composables/useUserManagement/index.d.ts +7 -7
  22. package/dist/core/composables/useUserManagement/index.d.ts.map +1 -1
  23. package/dist/core/interceptors/index.d.ts +2 -1
  24. package/dist/core/interceptors/index.d.ts.map +1 -1
  25. package/dist/core/plugins/signalR/index.d.ts +2 -0
  26. package/dist/core/plugins/signalR/index.d.ts.map +1 -1
  27. package/dist/core/providers/auth-provider-manager.d.ts +34 -0
  28. package/dist/core/providers/auth-provider-manager.d.ts.map +1 -0
  29. package/dist/core/providers/auth-provider-utils.d.ts +17 -0
  30. package/dist/core/providers/auth-provider-utils.d.ts.map +1 -0
  31. package/dist/core/providers/example-custom-auth-provider.d.ts +45 -0
  32. package/dist/core/providers/example-custom-auth-provider.d.ts.map +1 -0
  33. package/dist/core/providers/index.d.ts +3 -0
  34. package/dist/core/providers/index.d.ts.map +1 -0
  35. package/dist/core/providers/platform-auth-provider.d.ts +34 -0
  36. package/dist/core/providers/platform-auth-provider.d.ts.map +1 -0
  37. package/dist/core/types/auth-provider.d.ts +27 -0
  38. package/dist/core/types/auth-provider.d.ts.map +1 -0
  39. package/dist/core/types/index.d.ts +1 -1
  40. package/dist/core/types/index.d.ts.map +1 -1
  41. package/dist/index.d.ts +8 -0
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/injection-keys.d.ts +2 -1
  44. package/dist/injection-keys.d.ts.map +1 -1
  45. package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
  46. package/dist/shared/components/multilanguage-selector/multilanguage-selector.vue.d.ts +1 -1
  47. package/dist/shared/components/notifications/components/notification-container/index.d.ts +10 -10
  48. package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
  49. package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +2 -2
  50. package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -1
  51. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -2
  52. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +2 -2
  53. package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +1 -1
  54. package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
  55. package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +1 -1
  56. package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
  57. package/dist/tsconfig.tsbuildinfo +1 -1
  58. package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +1 -1
  59. package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
  60. package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +2 -2
  61. package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +1 -1
  62. package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
  63. package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +1 -1
  64. package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
  65. package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue.d.ts +1 -1
  66. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +2 -2
  67. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
  68. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +1 -1
  69. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
  70. package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +1 -1
  71. package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +1 -1
  72. package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
  73. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +1 -1
  74. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
  75. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  76. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-base-button.vue.d.ts +1 -1
  77. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts +1 -1
  78. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
  79. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts +1 -1
  80. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts.map +1 -1
  81. package/dist/ui/components/organisms/vc-blade/vc-blade.backupsb.d.ts +3 -3
  82. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +1 -1
  83. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  84. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +2 -2
  85. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +1 -1
  86. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
  87. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +5 -5
  88. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
  89. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +1 -1
  90. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
  91. package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +1 -1
  92. package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -1
  93. package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-body/vc-table-body.vue.d.ts +2 -2
  94. package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-row/vc-table-row.vue.d.ts +2 -2
  95. package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/vc-table-desktop-view.vue.d.ts +3 -3
  96. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +1 -1
  97. package/package.json +7 -5
  98. package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +2 -2
  99. package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +15 -1
  100. package/shared/modules/dynamic/helpers/nodeBuilder.ts +11 -3
  101. package/ui/components/organisms/vc-app/vc-app.vue +20 -2
  102. package/dist/assets/042c75b764bc78a7.svg +0 -1
  103. package/dist/assets/0ba156439a339f2a.svg +0 -1
  104. package/dist/assets/0be560bfb22d0e72.woff2 +0 -0
  105. package/dist/assets/0f590f8a94577092.svg +0 -1
  106. package/dist/assets/0fc5820f8be53a1b.svg +0 -1
  107. package/dist/assets/105efd028edc1dfe.woff +0 -0
  108. package/dist/assets/10768e2cc79fc60b.svg +0 -1
  109. package/dist/assets/11b3d25a56fd9a21.woff2 +0 -0
  110. package/dist/assets/154365acf3010d96.woff2 +0 -0
  111. package/dist/assets/157b8721e0600ea8.svg +0 -1
  112. package/dist/assets/15e91cdd649cde9a.svg +0 -1
  113. package/dist/assets/19275e398ae57130.woff2 +0 -0
  114. package/dist/assets/1a3e84b2457f709a.woff +0 -0
  115. package/dist/assets/1de63eb118636cce.svg +0 -1
  116. package/dist/assets/1ea01de36eb5491b.svg +0 -1
  117. package/dist/assets/204eaf512fde2023.svg +0 -1
  118. package/dist/assets/2088983edf42e153.svg +0 -1
  119. package/dist/assets/208f810a9321a327.svg +0 -1
  120. package/dist/assets/21220a9d10e6c558.svg +0 -1
  121. package/dist/assets/220db345a102045d.woff2 +0 -0
  122. package/dist/assets/225da11d23968333.svg +0 -1
  123. package/dist/assets/226f862dd81bdc13.woff2 +0 -0
  124. package/dist/assets/23a2d53395ddb14f.woff +0 -0
  125. package/dist/assets/259e6ad461a52ad7.svg +0 -1
  126. package/dist/assets/261e6dec4d53b9ac.woff +0 -0
  127. package/dist/assets/262f46a0b6d94bb6.svg +0 -1
  128. package/dist/assets/2857c513073467da.svg +0 -1
  129. package/dist/assets/2b3be7889467d98f.woff +0 -0
  130. package/dist/assets/2d4e6190eec72737.svg +0 -1
  131. package/dist/assets/2eba973185078bc8.woff +0 -0
  132. package/dist/assets/334d3f6bc766c516.woff +0 -0
  133. package/dist/assets/34ff7dd0c2285956.svg +0 -1
  134. package/dist/assets/3d26b7c1ab78bbe2.woff +0 -0
  135. package/dist/assets/3d892965ab4f1cbb.woff2 +0 -0
  136. package/dist/assets/3f8c4cc8099e34b6.woff2 +0 -0
  137. package/dist/assets/40a0e53b79ce63c6.woff2 +0 -0
  138. package/dist/assets/41275bcb979cb650.svg +0 -1
  139. package/dist/assets/434f7982590e462f.woff +0 -0
  140. package/dist/assets/475937116ee3314a.woff2 +0 -0
  141. package/dist/assets/489710fb710e73f0.woff +0 -0
  142. package/dist/assets/49791943b3872376.woff2 +0 -0
  143. package/dist/assets/4ae5f23e0ca888e7.woff2 +0 -0
  144. package/dist/assets/4d7a77b0e5373992.svg +0 -1
  145. package/dist/assets/4e43c74354534fb3.svg +0 -1
  146. package/dist/assets/4fe75f5117100705.svg +0 -1
  147. package/dist/assets/52e261a005074e1b.woff +0 -0
  148. package/dist/assets/5304c3d05a5f9789.woff2 +0 -0
  149. package/dist/assets/54cda5482c6c9218.woff +0 -0
  150. package/dist/assets/550f52072e8ccafe.woff2 +0 -0
  151. package/dist/assets/572bb1bb4156a9c1.svg +0 -1
  152. package/dist/assets/6075995d7e74da46.woff2 +0 -0
  153. package/dist/assets/617c4736236e199e.woff +0 -0
  154. package/dist/assets/67230f05dc94a265.svg +0 -1
  155. package/dist/assets/6798e4dd4add9b48.svg +0 -1
  156. package/dist/assets/686d4077c1e26876.woff2 +0 -0
  157. package/dist/assets/698ec6c722d4cb05.woff2 +0 -0
  158. package/dist/assets/6a3e73faf406cf33.svg +0 -1
  159. package/dist/assets/72de3a63bc0b70dd.svg +0 -1
  160. package/dist/assets/74c6a6ab81bb6340.woff2 +0 -0
  161. package/dist/assets/74ed5f8a78e71106.svg +0 -1
  162. package/dist/assets/7a5aa5abd625137f.ttf +0 -0
  163. package/dist/assets/7ce0c166fd6a1204.woff +0 -0
  164. package/dist/assets/7d55399c2a7bc985.svg +0 -1
  165. package/dist/assets/7d970675c69fca1d.woff +0 -0
  166. package/dist/assets/7eda727273fd98d3.svg +0 -1
  167. package/dist/assets/7f6ebfd707b76ca2.woff +0 -0
  168. package/dist/assets/7fa898d213fcc7bc.woff2 +0 -0
  169. package/dist/assets/861e6b7192b3b6c7.woff +0 -0
  170. package/dist/assets/8bbcde81ba21ecb2.woff2 +0 -0
  171. package/dist/assets/8f6657e5e0b8d3e4.woff +0 -0
  172. package/dist/assets/910b0d99b9e26568.svg +0 -1
  173. package/dist/assets/91fe94e424323d61.woff +0 -0
  174. package/dist/assets/92508f8707159b51.svg +0 -1
  175. package/dist/assets/9392bf1d591e1abb.svg +0 -1
  176. package/dist/assets/97e8d4984ba0713a.woff2 +0 -0
  177. package/dist/assets/9cb83236f6bb7ab1.svg +0 -1
  178. package/dist/assets/9d37314695c0b68d.woff +0 -0
  179. package/dist/assets/a03cdcd8da5bb987.woff +0 -0
  180. package/dist/assets/a18404194e3f9047.svg +0 -1
  181. package/dist/assets/a2017fe7f0a26510.svg +0 -1
  182. package/dist/assets/ab6e7190bb1492d5.woff2 +0 -0
  183. package/dist/assets/abf88f301a0730f4.svg +0 -1
  184. package/dist/assets/ac1a99b3d05d8232.woff +0 -0
  185. package/dist/assets/aed17cb6fdad2ada.woff2 +0 -0
  186. package/dist/assets/b1a596e31ad1185a.svg +0 -1
  187. package/dist/assets/b27767411c8427be.woff +0 -0
  188. package/dist/assets/b325adcae33bbe7a.svg +0 -1
  189. package/dist/assets/b372390551ca2fa1.svg +0 -1
  190. package/dist/assets/b5bb1e8fc975decd.svg +0 -1
  191. package/dist/assets/b645a4a2181b9dc1.svg +0 -1
  192. package/dist/assets/b6499ddce0a4ef7d.svg +0 -1
  193. package/dist/assets/b94421fadd23b0f2.svg +0 -1
  194. package/dist/assets/bb28fb0f27f1c11b.svg +0 -1
  195. package/dist/assets/c9191b638a10f67b.woff2 +0 -0
  196. package/dist/assets/ca791c5ca5848a03.svg +0 -1
  197. package/dist/assets/cb32840ce330103f.woff +0 -0
  198. package/dist/assets/ccc878931d74181b.woff2 +0 -0
  199. package/dist/assets/d084bda16abe8a56.svg +0 -1
  200. package/dist/assets/d32b129cae2fffd6.svg +0 -1
  201. package/dist/assets/d35a4c7113315758.woff2 +0 -0
  202. package/dist/assets/d3f792f54ae4c307.svg +0 -1
  203. package/dist/assets/d5a5b8630120073d.svg +0 -1
  204. package/dist/assets/d5f9664ebbfb104b.svg +0 -1
  205. package/dist/assets/d84247b59449dd88.woff2 +0 -0
  206. package/dist/assets/dceaf3b39091e6a4.woff +0 -0
  207. package/dist/assets/dd05d43ff0df2fc7.svg +0 -1
  208. package/dist/assets/e2ad5b3428289141.woff +0 -0
  209. package/dist/assets/e38acaa1757232e0.svg +0 -1
  210. package/dist/assets/e4a8550f1c7ffe36.svg +0 -1
  211. package/dist/assets/e5adb5ae3a3698f6.svg +0 -1
  212. package/dist/assets/e61a1889bac955f4.woff2 +0 -0
  213. package/dist/assets/e72bb11356af94c7.svg +0 -1
  214. package/dist/assets/e98196a9f8dcb2f0.svg +0 -1
  215. package/dist/assets/ebec912a42ad49ff.woff +0 -0
  216. package/dist/assets/ee6983981ffcbb41.woff2 +0 -0
  217. package/dist/assets/f09d89268e4c0317.svg +0 -1
  218. package/dist/assets/f239394367fcf005.woff2 +0 -0
  219. package/dist/assets/f5722262b6e7214e.woff2 +0 -0
  220. package/dist/assets/f7fc8bf46089d8b2.svg +0 -1
  221. package/dist/assets/fc829e3f399b70e0.woff2 +0 -0
  222. package/dist/assets/fe141d99763f5d2b.woff +0 -0
  223. package/dist/assets/fed13b0d59903483.svg +0 -1
  224. package/dist/assets/fed757d2c2344ead.woff2 +0 -0
  225. package/dist/assets/ffc438f20e79ce73.woff +0 -0
  226. package/dist/framework.js +0 -24766
  227. package/dist/index.css +0 -9
  228. package/dist/vendor-boolbase-A_-Pp38P.js +0 -23
  229. package/dist/vendor-cheerio-C46iBpCu.js +0 -1053
  230. package/dist/vendor-cheerio-select-C8emRZsx.js +0 -191
  231. package/dist/vendor-core-js-azBmvlGv.js +0 -1206
  232. package/dist/vendor-css-select-DR9bp36p.js +0 -622
  233. package/dist/vendor-css-what-CZZaquJM.js +0 -267
  234. package/dist/vendor-cypress-signalr-mock-DjBxJHA6.js +0 -769
  235. package/dist/vendor-date-fns-sZ1zMzTH.js +0 -3008
  236. package/dist/vendor-dom-serializer-Sk3xHhQk.js +0 -213
  237. package/dist/vendor-domelementtype-B3sFIGaC.js +0 -21
  238. package/dist/vendor-domhandler-CL40eeX9.js +0 -311
  239. package/dist/vendor-dompurify-C-JbJ3KX.js +0 -536
  240. package/dist/vendor-domutils-BiVCXO8c.js +0 -386
  241. package/dist/vendor-entities-CCReaWqU.js +0 -364
  242. package/dist/vendor-floating-ui-core-Cl9nBI4j.js +0 -349
  243. package/dist/vendor-floating-ui-dom-3z44E4mf.js +0 -395
  244. package/dist/vendor-floating-ui-utils-D2sT7feD.js +0 -259
  245. package/dist/vendor-floating-ui-vue-ClrgkeO5.js +0 -107
  246. package/dist/vendor-headlessui-vue-D7tzx4PC.js +0 -961
  247. package/dist/vendor-htmlparser2-CpQu33io.js +0 -735
  248. package/dist/vendor-intlify-core-base-Da62SG4M.js +0 -1130
  249. package/dist/vendor-intlify-message-compiler-CHvGSH2u.js +0 -952
  250. package/dist/vendor-intlify-shared-jWBPd9WB.js +0 -144
  251. package/dist/vendor-iso-639-1-BJO6WZAt.js +0 -781
  252. package/dist/vendor-linkify-it-LzoUhj6C.js +0 -199
  253. package/dist/vendor-linkifyjs-dCH9UYes.js +0 -701
  254. package/dist/vendor-lodash-es-BqkGj3Jl.js +0 -4816
  255. package/dist/vendor-lucide-vue-next-m0L4DzUL.js +0 -29780
  256. package/dist/vendor-markdown-it-Czg9qJTh.js +0 -2263
  257. package/dist/vendor-markdown-it-task-lists-BxLwscWK.js +0 -69
  258. package/dist/vendor-mdurl-DZFDNdqC.js +0 -192
  259. package/dist/vendor-microsoft-applicationinsights-analytics-js-BNSkz9ia.js +0 -1105
  260. package/dist/vendor-microsoft-applicationinsights-cfgsync-js-Dp8OU6ZE.js +0 -261
  261. package/dist/vendor-microsoft-applicationinsights-channel-js-Bc73N-5y.js +0 -1809
  262. package/dist/vendor-microsoft-applicationinsights-common-DcnOqpgL.js +0 -1921
  263. package/dist/vendor-microsoft-applicationinsights-core-js-CX4NA2hM.js +0 -4127
  264. package/dist/vendor-microsoft-applicationinsights-dependencies-js-C_DhEOae.js +0 -1399
  265. package/dist/vendor-microsoft-applicationinsights-properties-js-COczDd7b.js +0 -572
  266. package/dist/vendor-microsoft-applicationinsights-shims-CxtPYiwp.js +0 -43
  267. package/dist/vendor-microsoft-applicationinsights-web-DtOQojwf.js +0 -487
  268. package/dist/vendor-microsoft-dynamicproto-js-DSkQkH3T.js +0 -147
  269. package/dist/vendor-microsoft-signalr-Bgpbb4fW.js +0 -1761
  270. package/dist/vendor-moment-DMLRxgRE.js +0 -2589
  271. package/dist/vendor-nevware21-ts-async-DFUnZ_sN.js +0 -260
  272. package/dist/vendor-nevware21-ts-utils-Dy41wRhA.js +0 -853
  273. package/dist/vendor-nth-check-CS1D-zr5.js +0 -45
  274. package/dist/vendor-orderedmap-B3SOk52B.js +0 -103
  275. package/dist/vendor-parse5-htmlparser2-tree-adapter-BWywtwol.js +0 -143
  276. package/dist/vendor-parse5-zq5Hn0y9.js +0 -5749
  277. package/dist/vendor-prettier-cZc5sCiS.js +0 -4875
  278. package/dist/vendor-prosemirror-commands-DlSOsoOz.js +0 -385
  279. package/dist/vendor-prosemirror-dropcursor-CqLA3EZY.js +0 -86
  280. package/dist/vendor-prosemirror-gapcursor-3PaVPyUV.js +0 -200
  281. package/dist/vendor-prosemirror-history-DzP74u0n.js +0 -248
  282. package/dist/vendor-prosemirror-keymap-CN6Hkrq2.js +0 -62
  283. package/dist/vendor-prosemirror-markdown-BBPyARPh.js +0 -650
  284. package/dist/vendor-prosemirror-model-CiCy9gkA.js +0 -2722
  285. package/dist/vendor-prosemirror-schema-list-asS28-n3.js +0 -87
  286. package/dist/vendor-prosemirror-state-DUZYoLys.js +0 -821
  287. package/dist/vendor-prosemirror-tables-CezTPhzU.js +0 -1711
  288. package/dist/vendor-prosemirror-transform-BOkRqJ32.js +0 -1508
  289. package/dist/vendor-prosemirror-view-CzsD5m3e.js +0 -3750
  290. package/dist/vendor-punycode-js-CgGegfA_.js +0 -133
  291. package/dist/vendor-rope-sequence-BWC2FSrq.js +0 -100
  292. package/dist/vendor-semver-B87_S22g.js +0 -1021
  293. package/dist/vendor-swiper-1bp0oJwt.js +0 -3387
  294. package/dist/vendor-tanstack-virtual-core-l0sNRNKZ.js +0 -1
  295. package/dist/vendor-tanstack-vue-virtual-CD9yLWd7.js +0 -1
  296. package/dist/vendor-tiptap-core-rgc3Sj5Y.js +0 -3104
  297. package/dist/vendor-tiptap-extension-blockquote-DgzMeNpc.js +0 -41
  298. package/dist/vendor-tiptap-extension-bold-DZbX5Qiw.js +0 -71
  299. package/dist/vendor-tiptap-extension-code-BcakHaXe.js +0 -49
  300. package/dist/vendor-tiptap-extension-code-block-B0U7g1XA.js +0 -192
  301. package/dist/vendor-tiptap-extension-document-BBhadLNS.js +0 -9
  302. package/dist/vendor-tiptap-extension-hard-break-eyl10A9U.js +0 -53
  303. package/dist/vendor-tiptap-extension-heading-BmX_Abvh.js +0 -57
  304. package/dist/vendor-tiptap-extension-horizontal-rule-DyYIWV6W.js +0 -53
  305. package/dist/vendor-tiptap-extension-image-C06iDyEi.js +0 -70
  306. package/dist/vendor-tiptap-extension-italic-B2YDHBEe.js +0 -70
  307. package/dist/vendor-tiptap-extension-link-Bw8_3Rr4.js +0 -287
  308. package/dist/vendor-tiptap-extension-list-qHzpj6eq.js +0 -420
  309. package/dist/vendor-tiptap-extension-paragraph-BnCRfXCL.js +0 -31
  310. package/dist/vendor-tiptap-extension-placeholder-BVZ1jBA2.js +0 -1
  311. package/dist/vendor-tiptap-extension-strike-Naksm43m.js +0 -61
  312. package/dist/vendor-tiptap-extension-table-Cguez3tu.js +0 -302
  313. package/dist/vendor-tiptap-extension-table-cell-lniviH1T.js +0 -1
  314. package/dist/vendor-tiptap-extension-table-header-lniviH1T.js +0 -1
  315. package/dist/vendor-tiptap-extension-table-row-lniviH1T.js +0 -1
  316. package/dist/vendor-tiptap-extension-text-CixjyWfN.js +0 -8
  317. package/dist/vendor-tiptap-extension-text-style-CVsjuWJ4.js +0 -230
  318. package/dist/vendor-tiptap-extension-underline-Rwkvga0F.js +0 -40
  319. package/dist/vendor-tiptap-extensions-F9A02hii.js +0 -289
  320. package/dist/vendor-tiptap-markdown-BSUpswXr.js +0 -826
  321. package/dist/vendor-tiptap-pm-BUxx7nt1.js +0 -1
  322. package/dist/vendor-tiptap-starter-kit-BUgq7S1_.js +0 -28
  323. package/dist/vendor-tiptap-vue-3-UHrHfZLG.js +0 -157
  324. package/dist/vendor-truncate-html-DYC0Lj9o.js +0 -145
  325. package/dist/vendor-uc-micro-4lbSaZOs.js +0 -17
  326. package/dist/vendor-vee-validate-i18n-zT8NxX3R.js +0 -93
  327. package/dist/vendor-vee-validate-rules-4oWUZPpG.js +0 -316
  328. package/dist/vendor-vue-currency-input-BqaYAdhD.js +0 -317
  329. package/dist/vendor-vue-demi-CD9yLWd7.js +0 -1
  330. package/dist/vendor-vue-devtools-api-aVYGocXp.js +0 -93
  331. package/dist/vendor-vue-i18n-CO5LWKE0.js +0 -1370
  332. package/dist/vendor-vue3-application-insights-CE6eo4vj.js +0 -69
  333. package/dist/vendor-vue3-touch-events-DqysuuWh.js +0 -169
  334. package/dist/vendor-vuepic-vue-datepicker-Chx5s5I-.js +0 -5116
  335. package/dist/vendor-vueuse-components-B0zqjNRW.js +0 -542
  336. package/dist/vendor-vueuse-core-CYgwn-B2.js +0 -5130
  337. package/dist/vendor-vueuse-shared-B_uDJJ6V.js +0 -1169
  338. package/dist/vendor-w3c-keyname-CLxH8j-f.js +0 -92
@@ -0,0 +1,176 @@
1
+ # Authentication Providers
2
+
3
+ This directory contains authentication provider implementations for the vc-shell framework.
4
+
5
+ ## Overview
6
+
7
+ The vc-shell framework uses a pluggable authentication system that allows you to implement custom authentication logic while maintaining compatibility with all framework pages (Login, ResetPassword, ChangePassword, Invite).
8
+
9
+ ## Available Providers
10
+
11
+ ### PlatformAuthProvider (Default)
12
+
13
+ The default authentication provider that uses VirtoCommerce Platform API for authentication.
14
+
15
+ ```typescript
16
+ import { PlatformAuthProvider } from "@vc-shell/framework";
17
+
18
+ const authProvider = new PlatformAuthProvider();
19
+ ```
20
+
21
+ This provider is used automatically if no custom provider is specified.
22
+
23
+ ## Creating a Custom Provider
24
+
25
+ To create a custom authentication provider, implement the `IAuthProvider` interface:
26
+
27
+ ```typescript
28
+ import { IAuthProvider, UserDetail, SignInResult } from "@vc-shell/framework";
29
+ import { computed, ref } from "vue";
30
+
31
+ export class CustomAuthProvider implements IAuthProvider {
32
+ private _user = ref<UserDetail | undefined>();
33
+ private _loading = ref(false);
34
+
35
+ get user() {
36
+ return computed(() => this._user.value);
37
+ }
38
+
39
+ get loading() {
40
+ return computed(() => this._loading.value);
41
+ }
42
+
43
+ get isAuthenticated() {
44
+ return computed(() => this._user.value?.userName != null);
45
+ }
46
+
47
+ get isAdministrator() {
48
+ return computed(() => this._user.value?.isAdministrator);
49
+ }
50
+
51
+ async loadUser(): Promise<UserDetail> {
52
+ // Your custom logic to load user
53
+ // Example: from localStorage, file, custom API, etc.
54
+ }
55
+
56
+ async signIn(username: string, password: string): Promise<SignInResult> {
57
+ // Your custom sign-in logic
58
+ }
59
+
60
+ async signOut(): Promise<void> {
61
+ // Your custom sign-out logic
62
+ }
63
+
64
+ // Implement other required methods...
65
+ }
66
+ ```
67
+
68
+ See `example-custom-auth-provider.ts` for a complete implementation example.
69
+
70
+ ## Required Methods
71
+
72
+ All authentication providers must implement the following methods:
73
+
74
+ ### Core Methods
75
+ - `loadUser()` - Load current authenticated user
76
+ - `signIn(username, password)` - Authenticate user with credentials
77
+ - `signOut()` - Sign out current user
78
+
79
+ ### Password Management Methods
80
+ - `validateToken(userId, token)` - Validate password reset token
81
+ - `validatePassword(password)` - Validate password strength
82
+ - `resetPasswordByToken(userId, password, token)` - Reset password using token
83
+ - `requestPasswordReset(loginOrEmail)` - Request password reset email
84
+ - `changeUserPassword(oldPassword, newPassword)` - Change current user password
85
+
86
+ ### Additional Methods
87
+ - `getLoginType()` - Get available login types (e.g., local, external)
88
+
89
+ ### Properties
90
+ - `user` - Current user details (ComputedRef)
91
+ - `loading` - Loading state (ComputedRef)
92
+ - `isAuthenticated` - Authentication status (ComputedRef)
93
+ - `isAdministrator` - Administrator status (ComputedRef)
94
+
95
+ ## Using a Custom Provider
96
+
97
+ To use a custom authentication provider in your application:
98
+
99
+ ```typescript
100
+ import VirtoShellFramework from "@vc-shell/framework";
101
+ import { CustomAuthProvider } from "./auth/custom-provider";
102
+
103
+ const app = createApp(App);
104
+ const customAuthProvider = new CustomAuthProvider();
105
+
106
+ app.use(VirtoShellFramework, {
107
+ router,
108
+ authProvider: customAuthProvider, // Pass your custom provider
109
+ i18n: {
110
+ locale: "en",
111
+ fallbackLocale: "en",
112
+ },
113
+ });
114
+ ```
115
+
116
+ ## Type Safety
117
+
118
+ All providers use the same types from the platform API:
119
+ - `UserDetail` - User information
120
+ - `SignInResult` - Sign-in result
121
+ - `SecurityResult` - Security operation result
122
+ - `IdentityResult` - Identity validation result
123
+ - `LoginType` - Login type enumeration
124
+
125
+ This ensures compatibility across all authentication pages and interceptors.
126
+
127
+ ## Integration with Framework
128
+
129
+ The authentication provider integrates with:
130
+
131
+ 1. **Login Pages** - All auth pages (Login, ResetPassword, ChangePassword, Invite) automatically use the provided auth provider
132
+ 2. **HTTP Interceptors** - Automatically handles 401 errors and redirects to login
133
+ 3. **Route Guards** - Checks authentication status before route navigation
134
+ 4. **Composables** - Available via `useUser()` and `useUserManagement()` composables
135
+
136
+ ## Example Use Cases
137
+
138
+ ### File-based Authentication
139
+ ```typescript
140
+ class FileAuthProvider implements IAuthProvider {
141
+ async signIn(username: string, password: string) {
142
+ const credentials = await fetch("/auth-data.json");
143
+ const users = await credentials.json();
144
+ // Validate against file data
145
+ }
146
+ }
147
+ ```
148
+
149
+ ### Custom API Authentication
150
+ ```typescript
151
+ class CustomApiAuthProvider implements IAuthProvider {
152
+ async signIn(username: string, password: string) {
153
+ const response = await fetch("https://my-custom-api.com/auth", {
154
+ method: "POST",
155
+ body: JSON.stringify({ username, password }),
156
+ });
157
+ // Handle custom API response
158
+ }
159
+ }
160
+ ```
161
+
162
+ ### OAuth/OIDC Provider
163
+ ```typescript
164
+ class OAuthAuthProvider implements IAuthProvider {
165
+ async signIn(username: string, password: string) {
166
+ // Redirect to OAuth provider
167
+ window.location.href = "https://oauth-provider.com/authorize";
168
+ }
169
+ }
170
+ ```
171
+
172
+ ## Backward Compatibility
173
+
174
+ If no custom provider is specified, the framework automatically uses `PlatformAuthProvider`, ensuring full backward compatibility with existing applications.
175
+
176
+
@@ -0,0 +1,74 @@
1
+ import { IAuthProvider } from "../types/auth-provider";
2
+ import { PlatformAuthProvider } from "./platform-auth-provider";
3
+
4
+ /**
5
+ * Global auth provider manager
6
+ * Provides access to auth provider before Vue app context is available
7
+ * This is necessary for early initialization scenarios where composables
8
+ * are called before app.use(VirtoShellFramework)
9
+ */
10
+ class AuthProviderManager {
11
+ private provider: IAuthProvider | null = null;
12
+ private defaultProvider: IAuthProvider | null = null;
13
+ private configureWasCalled = false;
14
+
15
+ /**
16
+ * Set the global auth provider
17
+ * Should be called via VirtoShellFramework.configure() before any composables
18
+ * If custom provider is provided, it will replace the default
19
+ */
20
+ setProvider(provider: IAuthProvider): void {
21
+ console.log("[AuthProviderManager] Setting auth provider:", provider.constructor.name);
22
+ this.configureWasCalled = true;
23
+ this.provider = provider;
24
+ }
25
+
26
+ /**
27
+ * Get the global auth provider
28
+ * Lazy-initializes default PlatformAuthProvider if no custom provider was set
29
+ */
30
+ getProvider(): IAuthProvider {
31
+ // If custom provider was set, use it
32
+ if (this.provider) {
33
+ return this.provider;
34
+ }
35
+
36
+ // Lazy-initialize default platform provider only when needed (backward compatibility)
37
+ if (!this.defaultProvider) {
38
+ console.log("[AuthProviderManager] Lazy-initializing default PlatformAuthProvider");
39
+
40
+ // Show deprecation warning only if configure() was never called
41
+ if (!this.configureWasCalled) {
42
+ console.warn(
43
+ "[AuthProviderManager] DEPRECATION WARNING: " +
44
+ "Automatic PlatformAuthProvider creation will be removed in a future version. " +
45
+ "Please use VirtoShellFramework.configure({ authProvider }) explicitly before calling useUser()."
46
+ );
47
+ }
48
+
49
+ this.defaultProvider = new PlatformAuthProvider();
50
+ }
51
+
52
+ return this.defaultProvider;
53
+ }
54
+
55
+ /**
56
+ * Check if provider is available
57
+ */
58
+ hasProvider(): boolean {
59
+ return this.provider !== null || this.defaultProvider !== null;
60
+ }
61
+
62
+ /**
63
+ * Reset manager (for testing)
64
+ */
65
+ reset(): void {
66
+ this.provider = null;
67
+ this.defaultProvider = null;
68
+ this.configureWasCalled = false;
69
+ }
70
+ }
71
+
72
+ // Global singleton instance
73
+ export const authProviderManager = new AuthProviderManager();
74
+
@@ -0,0 +1,26 @@
1
+ import { IAuthProvider } from "../types/auth-provider";
2
+ import { PlatformAuthProvider } from "./platform-auth-provider";
3
+
4
+ /**
5
+ * Check if the provider is a platform provider
6
+ * Centralized logic for determining platform-specific features availability
7
+ */
8
+ export function isPlatformProvider(provider: IAuthProvider | null | undefined): boolean {
9
+ return provider instanceof PlatformAuthProvider;
10
+ }
11
+
12
+ /**
13
+ * Check if platform-specific features should be enabled
14
+ * This is the main function to use throughout the framework
15
+ */
16
+ export function shouldEnablePlatformFeatures(provider: IAuthProvider | null | undefined): boolean {
17
+ return isPlatformProvider(provider);
18
+ }
19
+
20
+ /**
21
+ * Get a safe provider instance with fallback
22
+ * Handles null/undefined cases gracefully
23
+ */
24
+ export function getSafeProvider(provider: IAuthProvider | null | undefined): IAuthProvider | null {
25
+ return provider || null;
26
+ }
@@ -0,0 +1,161 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ /**
3
+ * Example Custom Authentication Provider
4
+ *
5
+ * This is an example implementation showing how to create a custom authentication provider.
6
+ * You can use this as a template to implement your own authentication logic.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import { CustomAuthProvider } from './auth/custom-provider';
11
+ *
12
+ * const customAuthProvider = new CustomAuthProvider();
13
+ *
14
+ * app.use(VirtoShellFramework, {
15
+ * router,
16
+ * authProvider: customAuthProvider,
17
+ * i18n: { ... }
18
+ * });
19
+ * ```
20
+ */
21
+
22
+ import { computed, Ref, ref, ComputedRef } from "vue";
23
+ import {
24
+ UserDetail,
25
+ SecurityResult,
26
+ IdentityResult,
27
+ LoginType,
28
+ SignInResult,
29
+ } from "../api/platform";
30
+ import { RequestPasswordResult } from "../types";
31
+ import { IAuthProvider } from "../types/auth-provider";
32
+
33
+ export class CustomAuthProvider implements IAuthProvider {
34
+
35
+ private _user: Ref<UserDetail | undefined> = ref();
36
+ private _loading: Ref<boolean> = ref(false);
37
+
38
+ get user(): ComputedRef<UserDetail | undefined> {
39
+ return computed(() => this._user.value);
40
+ }
41
+
42
+ get loading(): ComputedRef<boolean> {
43
+ return computed(() => this._loading.value);
44
+ }
45
+
46
+ get isAuthenticated(): ComputedRef<boolean> {
47
+ return computed(() => this._user.value?.userName != null);
48
+ }
49
+
50
+ get isAdministrator(): ComputedRef<boolean | undefined> {
51
+ return computed(() => this._user.value?.isAdministrator);
52
+ }
53
+
54
+ async loadUser(): Promise<UserDetail> {
55
+ // Implement your custom user loading logic
56
+ // Example: Load from localStorage, custom API, etc.
57
+ console.debug("[CustomAuthProvider] Loading user...");
58
+
59
+ this._loading.value = true;
60
+
61
+ try {
62
+ // Example: Load from localStorage
63
+ const storedUser = localStorage.getItem("customUser");
64
+ if (storedUser) {
65
+ this._user.value = JSON.parse(storedUser) as UserDetail;
66
+ }
67
+ } catch (e) {
68
+ console.error("Failed to load user:", e);
69
+ } finally {
70
+ this._loading.value = false;
71
+ }
72
+
73
+ return { ...this._user.value } as UserDetail;
74
+ }
75
+
76
+ async signIn(
77
+ username: string,
78
+ password: string,
79
+ ): Promise<SignInResult | { succeeded: boolean; error?: any; status?: number }> {
80
+ console.debug("[CustomAuthProvider] Signing in...");
81
+
82
+ this._loading.value = true;
83
+
84
+ try {
85
+ // Implement your custom sign-in logic
86
+ // Example: Validate against local file, custom API, etc.
87
+
88
+ // Example implementation:
89
+ if (username === "demo" && password === "demo") {
90
+ this._user.value = {
91
+ userName: username,
92
+ isAdministrator: true,
93
+ // ... other user properties
94
+ } as UserDetail;
95
+
96
+ // Store user in localStorage
97
+ localStorage.setItem("customUser", JSON.stringify(this._user.value));
98
+
99
+ return { succeeded: true } as SignInResult;
100
+ }
101
+
102
+ return { succeeded: false, error: "Invalid credentials" };
103
+ } catch (e: any) {
104
+ console.error("Sign in failed:", e);
105
+ return { succeeded: false, error: e.message };
106
+ } finally {
107
+ this._loading.value = false;
108
+ }
109
+ }
110
+
111
+ async signOut(): Promise<void> {
112
+ console.debug("[CustomAuthProvider] Signing out...");
113
+
114
+ this._user.value = undefined;
115
+ localStorage.removeItem("customUser");
116
+ }
117
+
118
+ async validateToken(userId: string, token: string): Promise<boolean> {
119
+ // Implement your custom token validation logic
120
+ console.debug("[CustomAuthProvider] Validating token...");
121
+ return false;
122
+ }
123
+
124
+ async validatePassword(password: string): Promise<IdentityResult> {
125
+ // Implement your custom password validation logic
126
+ console.debug("[CustomAuthProvider] Validating password...");
127
+ return { succeeded: true } as IdentityResult;
128
+ }
129
+
130
+ async resetPasswordByToken(
131
+ userId: string,
132
+ password: string,
133
+ token: string,
134
+ ): Promise<SecurityResult> {
135
+ // Implement your custom password reset logic
136
+ console.debug("[CustomAuthProvider] Resetting password...");
137
+ return { succeeded: true } as SecurityResult;
138
+ }
139
+
140
+ async requestPasswordReset(loginOrEmail: string): Promise<RequestPasswordResult> {
141
+ // Implement your custom password reset request logic
142
+ console.debug("[CustomAuthProvider] Requesting password reset...");
143
+ return { succeeded: true };
144
+ }
145
+
146
+ async changeUserPassword(
147
+ oldPassword: string,
148
+ newPassword: string,
149
+ ): Promise<SecurityResult | undefined> {
150
+ // Implement your custom password change logic
151
+ console.debug("[CustomAuthProvider] Changing password...");
152
+ return { succeeded: true } as SecurityResult;
153
+ }
154
+
155
+ async getLoginType(): Promise<LoginType[]> {
156
+ // Return supported login types for your custom provider
157
+ console.debug("[CustomAuthProvider] Getting login types...");
158
+ return [];
159
+ }
160
+ }
161
+
@@ -0,0 +1,3 @@
1
+ export { PlatformAuthProvider } from "./platform-auth-provider";
2
+ export { authProviderManager } from "./auth-provider-manager";
3
+
@@ -0,0 +1,205 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { computed, Ref, ref, ComputedRef } from "vue";
3
+ import {
4
+ UserDetail,
5
+ SecurityClient,
6
+ ResetPasswordConfirmRequest,
7
+ SecurityResult,
8
+ ValidatePasswordResetTokenRequest,
9
+ IdentityResult,
10
+ ChangePasswordRequest,
11
+ LoginType,
12
+ LoginRequest,
13
+ SignInResult,
14
+ } from "../api/platform";
15
+ import { RequestPasswordResult } from "../types";
16
+ import { useExternalProvider } from "../../shared/components/sign-in/useExternalProvider";
17
+ import { IAuthProvider } from "../types/auth-provider";
18
+
19
+ const DEMO_USER = {
20
+ id: "demo_user_id",
21
+ userName: "DEMO_USER",
22
+ isAdministrator: true,
23
+ } as UserDetail;
24
+
25
+ /**
26
+ * Platform-based authentication provider
27
+ * Implements authentication using VirtoCommerce Platform API
28
+ */
29
+ export class PlatformAuthProvider implements IAuthProvider {
30
+ private _user: Ref<UserDetail | undefined> = ref();
31
+ private _loading: Ref<boolean> = ref(false);
32
+ private securityClient: SecurityClient;
33
+ private externalSignInStorage: ReturnType<typeof useExternalProvider>["storage"];
34
+ private externalSignOut: ReturnType<typeof useExternalProvider>["signOut"];
35
+
36
+ constructor() {
37
+ console.log("🔐 [PlatformAuthProvider] Constructor called - using PLATFORM authentication");
38
+ this.securityClient = new SecurityClient();
39
+ const { storage, signOut } = useExternalProvider();
40
+ this.externalSignInStorage = storage;
41
+ this.externalSignOut = signOut;
42
+ }
43
+
44
+ get user(): ComputedRef<UserDetail | undefined> {
45
+ return computed(() => this._user.value);
46
+ }
47
+
48
+ get loading(): ComputedRef<boolean> {
49
+ return computed(() => this._loading.value);
50
+ }
51
+
52
+ get isAuthenticated(): ComputedRef<boolean> {
53
+ return computed(() => this._user.value?.userName != null);
54
+ }
55
+
56
+ get isAdministrator(): ComputedRef<boolean | undefined> {
57
+ return computed(() => this._user.value?.isAdministrator);
58
+ }
59
+
60
+ async validateToken(userId: string, token: string): Promise<boolean> {
61
+ let result = false;
62
+ try {
63
+ this._loading.value = true;
64
+ result = await this.securityClient.validatePasswordResetToken(userId, {
65
+ token,
66
+ } as ValidatePasswordResetTokenRequest);
67
+ } catch (e) {
68
+ //TODO: log error
69
+ } finally {
70
+ this._loading.value = false;
71
+ }
72
+ return result;
73
+ }
74
+
75
+ async validatePassword(password: string): Promise<IdentityResult> {
76
+ return this.securityClient.validatePassword(password);
77
+ }
78
+
79
+ async resetPasswordByToken(userId: string, password: string, token: string): Promise<SecurityResult> {
80
+ return this.securityClient.resetPasswordByToken(userId, {
81
+ newPassword: password,
82
+ token,
83
+ } as ResetPasswordConfirmRequest);
84
+ }
85
+
86
+ async signIn(
87
+ username: string,
88
+ password: string,
89
+ ): Promise<SignInResult | { succeeded: boolean; error?: any; status?: number }> {
90
+ console.debug(`[@vc-shell/framework#PlatformAuthProvider:signIn] - Entry point`);
91
+
92
+ // Handle demo mode for platform provider
93
+ if (window.__DEMO_MODE__) {
94
+ console.warn("[PlatformAuthProvider] Running in DEMO mode - authentication is mocked");
95
+ this._user.value = DEMO_USER as UserDetail;
96
+ return { succeeded: true } as SignInResult;
97
+ }
98
+
99
+ try {
100
+ this._loading.value = true;
101
+ const result = await this.securityClient.login(new LoginRequest({ userName: username, password }));
102
+ return await this.securityClient
103
+ .getCurrentUser()
104
+ .then((res) => {
105
+ if (res) {
106
+ this._user.value = res;
107
+ return result;
108
+ }
109
+ throw { succeeded: false };
110
+ })
111
+ .catch((e) => {
112
+ throw e;
113
+ });
114
+ } catch (e: any) {
115
+ //TODO: log error
116
+ console.log(e);
117
+ return { succeeded: false, error: e.message, status: e.status };
118
+ } finally {
119
+ this._loading.value = false;
120
+ }
121
+ }
122
+
123
+ async signOut(): Promise<void> {
124
+ console.debug(`[@vc-shell/framework#PlatformAuthProvider:signOut] - Entry point`);
125
+
126
+ this._user.value = undefined;
127
+
128
+ if (this.externalSignInStorage.value?.providerType) {
129
+ await this.externalSignOut(this.externalSignInStorage.value.providerType);
130
+ } else {
131
+ this.securityClient.logout();
132
+ }
133
+ }
134
+
135
+ async loadUser(): Promise<UserDetail> {
136
+ console.debug(`[@vc-shell/framework#PlatformAuthProvider:loadUser] - Entry point`);
137
+
138
+ // Handle demo mode for platform provider
139
+ if (window.__DEMO_MODE__) {
140
+ console.warn(
141
+ "[PlatformAuthProvider] Running in DEMO mode. All API calls are disabled. Please add APP_PLATFORM_URL to your application's .env file to enable API calls.",
142
+ );
143
+ this._user.value = DEMO_USER as UserDetail;
144
+ return { ...this._user.value } as UserDetail;
145
+ }
146
+
147
+ try {
148
+ this._loading.value = true;
149
+ this._user.value = await this.securityClient.getCurrentUser();
150
+ console.log("[PlatformAuthProvider]: an user details has been loaded", this._user.value);
151
+ } catch (e: any) {
152
+ console.error(e);
153
+ } finally {
154
+ this._loading.value = false;
155
+ }
156
+
157
+ return { ...this._user.value } as UserDetail;
158
+ }
159
+
160
+ async requestPasswordReset(loginOrEmail: string): Promise<RequestPasswordResult> {
161
+ try {
162
+ this._loading.value = true;
163
+ await this.securityClient.requestPasswordReset(loginOrEmail);
164
+ return { succeeded: true };
165
+ } catch (e) {
166
+ //TODO: log error
167
+ return { succeeded: false, error: e as string };
168
+ } finally {
169
+ this._loading.value = false;
170
+ }
171
+ }
172
+
173
+ async changeUserPassword(oldPassword: string, newPassword: string): Promise<SecurityResult | undefined> {
174
+ let result;
175
+
176
+ try {
177
+ this._loading.value = true;
178
+ const command = new ChangePasswordRequest({
179
+ oldPassword,
180
+ newPassword,
181
+ });
182
+
183
+ result = await this.securityClient.changeCurrentUserPassword(command);
184
+ } catch (e: any) {
185
+ return { succeeded: false, errors: [e.message] } as SecurityResult;
186
+ } finally {
187
+ this._loading.value = false;
188
+ }
189
+
190
+ return result;
191
+ }
192
+
193
+ async getLoginType(): Promise<LoginType[]> {
194
+ let result: LoginType[] | null = null;
195
+ try {
196
+ result = await this.securityClient.getLoginTypes();
197
+ } catch (e) {
198
+ console.error(e);
199
+ throw e;
200
+ }
201
+
202
+ return result;
203
+ }
204
+ }
205
+
@@ -0,0 +1,45 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { ComputedRef } from "vue";
3
+ import {
4
+ UserDetail,
5
+ SecurityResult,
6
+ IdentityResult,
7
+ LoginType,
8
+ SignInResult,
9
+ IUserDetail,
10
+ ISecurityResult,
11
+ ILoginType,
12
+ IIdentityResult,
13
+ } from "../api/platform";
14
+ import { RequestPasswordResult } from "./index";
15
+
16
+ /**
17
+ * Interface for authentication provider
18
+ * Allows custom authentication implementations while maintaining compatibility with all framework pages
19
+ */
20
+ export interface IAuthProvider {
21
+
22
+ // Core properties
23
+ user: ComputedRef<IUserDetail | undefined>;
24
+ loading: ComputedRef<boolean>;
25
+ isAuthenticated: ComputedRef<boolean>;
26
+ isAdministrator: ComputedRef<boolean | undefined>;
27
+
28
+ // Core methods
29
+ loadUser(): Promise<IUserDetail>;
30
+ signIn(
31
+ username: string,
32
+ password: string,
33
+ ): Promise<SignInResult | { succeeded: boolean; error?: any; status?: number }>;
34
+ signOut(): Promise<void>;
35
+
36
+ // Password management methods
37
+ validateToken(userId: string, token: string): Promise<boolean>;
38
+ validatePassword(password: string): Promise<IIdentityResult>;
39
+ resetPasswordByToken(userId: string, password: string, token: string): Promise<ISecurityResult>;
40
+ requestPasswordReset(loginOrEmail: string): Promise<RequestPasswordResult>;
41
+ changeUserPassword(oldPassword: string, newPassword: string): Promise<ISecurityResult | undefined>;
42
+
43
+ // Additional methods
44
+ getLoginType(): Promise<ILoginType[]>;
45
+ }
@@ -233,3 +233,5 @@ export interface MenuItemConfig {
233
233
  inGroupPriority?: number;
234
234
  permissions?: string | string[];
235
235
  }
236
+
237
+ export * from "./auth-provider";