@vc-shell/framework 1.0.69 → 1.0.71

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 (468) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/core/api/platform.ts +2762 -2225
  3. package/core/composables/index.ts +1 -0
  4. package/core/composables/useMenuComposer/index.ts +25 -0
  5. package/core/composables/useNotifications/index.ts +25 -31
  6. package/core/composables/useUser/index.ts +176 -10
  7. package/core/directives/index.ts +0 -1
  8. package/core/plugins/index.ts +1 -1
  9. package/core/plugins/modularity/index.ts +8 -1
  10. package/core/plugins/signalR/index.ts +32 -0
  11. package/core/types/index.ts +56 -17
  12. package/dist/core/api/platform.d.ts +1005 -931
  13. package/dist/core/api/platform.d.ts.map +1 -1
  14. package/dist/core/composables/index.d.ts +1 -0
  15. package/dist/core/composables/index.d.ts.map +1 -1
  16. package/dist/core/composables/useMenuComposer/index.d.ts +12 -0
  17. package/dist/core/composables/useMenuComposer/index.d.ts.map +1 -0
  18. package/dist/core/composables/useNotifications/index.d.ts +4 -6
  19. package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
  20. package/dist/core/composables/useUser/index.d.ts +18 -1
  21. package/dist/core/composables/useUser/index.d.ts.map +1 -1
  22. package/dist/core/directives/autofocus/index.d.ts +1 -1
  23. package/dist/core/directives/autofocus/index.d.ts.map +1 -1
  24. package/dist/core/directives/index.d.ts +0 -1
  25. package/dist/core/directives/index.d.ts.map +1 -1
  26. package/dist/core/directives/loading/index.d.ts +1 -1
  27. package/dist/core/directives/loading/index.d.ts.map +1 -1
  28. package/dist/core/directives/permissions/index.d.ts +1 -1
  29. package/dist/core/directives/permissions/index.d.ts.map +1 -1
  30. package/dist/core/plugins/index.d.ts +1 -1
  31. package/dist/core/plugins/index.d.ts.map +1 -1
  32. package/dist/core/plugins/modularity/index.d.ts +1 -1
  33. package/dist/core/plugins/modularity/index.d.ts.map +1 -1
  34. package/dist/core/plugins/signalR/index.d.ts +4 -0
  35. package/dist/core/plugins/signalR/index.d.ts.map +1 -0
  36. package/dist/core/types/index.d.ts +46 -20
  37. package/dist/core/types/index.d.ts.map +1 -1
  38. package/dist/framework.mjs +31824 -29372
  39. package/dist/index.css +1 -1
  40. package/dist/index.d.ts +3 -1
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/injectionSymbols.d.ts +6 -0
  43. package/dist/injectionSymbols.d.ts.map +1 -0
  44. package/dist/shared/components/app-switcher/components/vc-app-switcher/index.d.ts +1 -3
  45. package/dist/shared/components/app-switcher/components/vc-app-switcher/index.d.ts.map +1 -1
  46. package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts +6 -3
  47. package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts.map +1 -1
  48. package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts +1 -1
  49. package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
  50. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/index.d.ts +13 -456
  51. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/index.d.ts.map +1 -1
  52. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts +19 -454
  53. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts.map +1 -1
  54. package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts +3 -4
  55. package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
  56. package/dist/shared/components/blade-navigation/index.d.ts +1 -9
  57. package/dist/shared/components/blade-navigation/index.d.ts.map +1 -1
  58. package/dist/shared/components/blade-navigation/plugin.d.ts +13 -0
  59. package/dist/shared/components/blade-navigation/plugin.d.ts.map +1 -0
  60. package/dist/shared/components/blade-navigation/types/index.d.ts +53 -26
  61. package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
  62. package/dist/shared/components/change-password/change-password.vue.d.ts +7 -0
  63. package/dist/shared/components/change-password/change-password.vue.d.ts.map +1 -0
  64. package/dist/shared/components/change-password/index.d.ts +11 -0
  65. package/dist/shared/components/change-password/index.d.ts.map +1 -0
  66. package/dist/{core/plugins → shared/components}/error-interceptor/index.d.ts +53 -15
  67. package/dist/shared/components/error-interceptor/index.d.ts.map +1 -0
  68. package/dist/{core/plugins → shared/components}/error-interceptor/interceptor.d.ts +1 -1
  69. package/dist/shared/components/error-interceptor/interceptor.d.ts.map +1 -0
  70. package/dist/shared/components/index.d.ts +9 -0
  71. package/dist/shared/components/index.d.ts.map +1 -0
  72. package/dist/shared/components/language-selector/index.d.ts +55 -0
  73. package/dist/shared/components/language-selector/index.d.ts.map +1 -0
  74. package/dist/shared/components/language-selector/language-selector.vue.d.ts +45 -0
  75. package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -0
  76. package/dist/shared/components/notifications/components/notification-container/index.d.ts +13 -13
  77. package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
  78. package/dist/shared/components/notifications/core/notification.d.ts.map +1 -1
  79. package/dist/shared/components/notifications/index.d.ts +0 -9
  80. package/dist/shared/components/notifications/index.d.ts.map +1 -1
  81. package/dist/shared/components/notifications/types/index.d.ts +3 -1
  82. package/dist/shared/components/notifications/types/index.d.ts.map +1 -1
  83. package/dist/shared/components/popup-handler/components/index.d.ts +2 -0
  84. package/dist/shared/components/popup-handler/components/index.d.ts.map +1 -0
  85. package/dist/shared/components/popup-handler/components/vc-popup-container/index.d.ts +2 -0
  86. package/dist/shared/components/popup-handler/components/vc-popup-container/index.d.ts.map +1 -0
  87. package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts +3 -0
  88. package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -0
  89. package/dist/shared/components/popup-handler/composables/index.d.ts +2 -0
  90. package/dist/shared/components/popup-handler/composables/index.d.ts.map +1 -0
  91. package/dist/shared/components/popup-handler/composables/usePopup/index.d.ts +12 -0
  92. package/dist/shared/components/popup-handler/composables/usePopup/index.d.ts.map +1 -0
  93. package/dist/shared/components/popup-handler/index.d.ts +16 -0
  94. package/dist/shared/components/popup-handler/index.d.ts.map +1 -0
  95. package/dist/shared/components/popup-handler/plugin.d.ts +6 -0
  96. package/dist/shared/components/popup-handler/plugin.d.ts.map +1 -0
  97. package/dist/shared/components/popup-handler/types/index.d.ts +26 -0
  98. package/dist/shared/components/popup-handler/types/index.d.ts.map +1 -0
  99. package/dist/shared/components/popup-handler/utils/index.d.ts +3 -0
  100. package/dist/shared/components/popup-handler/utils/index.d.ts.map +1 -0
  101. package/dist/shared/components/user-dropdown-button/index.d.ts +43 -0
  102. package/dist/shared/components/user-dropdown-button/index.d.ts.map +1 -0
  103. package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts +33 -0
  104. package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -0
  105. package/dist/shared/index.d.ts +3 -5
  106. package/dist/shared/index.d.ts.map +1 -1
  107. package/dist/shared/locales/index.d.ts +3 -0
  108. package/dist/shared/locales/index.d.ts.map +1 -0
  109. package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts +13 -11
  110. package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts.map +1 -1
  111. package/dist/shared/modules/assets/components/assets-details/index.d.ts +25 -123
  112. package/dist/shared/modules/assets/components/assets-details/index.d.ts.map +1 -1
  113. package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +15 -18
  114. package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
  115. package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts +30 -150
  116. package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts.map +1 -1
  117. package/dist/shared/modules/index.d.ts +3 -0
  118. package/dist/shared/modules/index.d.ts.map +1 -0
  119. package/dist/shared/pages/InvitePage/components/index.d.ts +2 -0
  120. package/dist/shared/pages/InvitePage/components/index.d.ts.map +1 -0
  121. package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +33 -0
  122. package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -0
  123. package/dist/shared/pages/InvitePage/components/invite/index.d.ts +32 -0
  124. package/dist/shared/pages/InvitePage/components/invite/index.d.ts.map +1 -0
  125. package/dist/shared/pages/InvitePage/index.d.ts +5 -0
  126. package/dist/shared/pages/InvitePage/index.d.ts.map +1 -0
  127. package/dist/shared/pages/InvitePage/locales/index.d.ts +3 -0
  128. package/dist/shared/pages/InvitePage/locales/index.d.ts.map +1 -0
  129. package/dist/shared/pages/LoginPage/components/index.d.ts +2 -0
  130. package/dist/shared/pages/LoginPage/components/index.d.ts.map +1 -0
  131. package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts +17 -0
  132. package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -0
  133. package/dist/shared/pages/LoginPage/components/login/index.d.ts +28 -0
  134. package/dist/shared/pages/LoginPage/components/login/index.d.ts.map +1 -0
  135. package/dist/shared/pages/LoginPage/index.d.ts +3 -0
  136. package/dist/shared/pages/LoginPage/index.d.ts.map +1 -0
  137. package/dist/shared/pages/LoginPage/locales/index.d.ts +3 -0
  138. package/dist/shared/pages/LoginPage/locales/index.d.ts.map +1 -0
  139. package/dist/shared/pages/LoginPage/plugin.d.ts +6 -0
  140. package/dist/shared/pages/LoginPage/plugin.d.ts.map +1 -0
  141. package/dist/shared/pages/ResetPasswordPage/components/index.d.ts +2 -0
  142. package/dist/shared/pages/ResetPasswordPage/components/index.d.ts.map +1 -0
  143. package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +33 -0
  144. package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -0
  145. package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts +32 -0
  146. package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts.map +1 -0
  147. package/dist/shared/pages/ResetPasswordPage/index.d.ts +5 -0
  148. package/dist/shared/pages/ResetPasswordPage/index.d.ts.map +1 -0
  149. package/dist/shared/pages/ResetPasswordPage/locales/index.d.ts +3 -0
  150. package/dist/shared/pages/ResetPasswordPage/locales/index.d.ts.map +1 -0
  151. package/dist/shared/pages/index.d.ts +10 -0
  152. package/dist/shared/pages/index.d.ts.map +1 -0
  153. package/dist/tsconfig.tsbuildinfo +1 -1
  154. package/dist/typings/index.d.ts +8 -0
  155. package/dist/typings/index.d.ts.map +1 -0
  156. package/dist/ui/components/atoms/vc-badge/index.d.ts +56 -19
  157. package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -1
  158. package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +2 -2
  159. package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
  160. package/dist/ui/components/atoms/vc-button/index.d.ts +103 -49
  161. package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -1
  162. package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +17 -11
  163. package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
  164. package/dist/ui/components/atoms/vc-card/index.d.ts +66 -44
  165. package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -1
  166. package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts +8 -6
  167. package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts.map +1 -1
  168. package/dist/ui/components/atoms/vc-checkbox/index.d.ts +74 -48
  169. package/dist/ui/components/atoms/vc-checkbox/index.d.ts.map +1 -1
  170. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts +8 -5
  171. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
  172. package/dist/ui/components/atoms/vc-col/index.d.ts +54 -19
  173. package/dist/ui/components/atoms/vc-col/index.d.ts.map +1 -1
  174. package/dist/ui/components/atoms/vc-col/vc-col.vue.d.ts +7 -4
  175. package/dist/ui/components/atoms/vc-col/vc-col.vue.d.ts.map +1 -1
  176. package/dist/ui/components/atoms/vc-container/index.d.ts +56 -19
  177. package/dist/ui/components/atoms/vc-container/index.d.ts.map +1 -1
  178. package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +2 -2
  179. package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts.map +1 -1
  180. package/dist/ui/components/atoms/vc-hint/index.d.ts +53 -8
  181. package/dist/ui/components/atoms/vc-hint/index.d.ts.map +1 -1
  182. package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts +2 -2
  183. package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts.map +1 -1
  184. package/dist/ui/components/atoms/vc-icon/index.d.ts +4 -8
  185. package/dist/ui/components/atoms/vc-icon/index.d.ts.map +1 -1
  186. package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +7 -4
  187. package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
  188. package/dist/ui/components/atoms/vc-image/index.d.ts +17 -23
  189. package/dist/ui/components/atoms/vc-image/index.d.ts.map +1 -1
  190. package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts +8 -5
  191. package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts.map +1 -1
  192. package/dist/ui/components/atoms/vc-info-row/index.d.ts +10 -12
  193. package/dist/ui/components/atoms/vc-info-row/index.d.ts.map +1 -1
  194. package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts +7 -4
  195. package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts.map +1 -1
  196. package/dist/ui/components/atoms/vc-label/index.d.ts +56 -23
  197. package/dist/ui/components/atoms/vc-label/index.d.ts.map +1 -1
  198. package/dist/ui/components/atoms/vc-label/vc-label.vue.d.ts +8 -5
  199. package/dist/ui/components/atoms/vc-label/vc-label.vue.d.ts.map +1 -1
  200. package/dist/ui/components/atoms/vc-link/index.d.ts +56 -20
  201. package/dist/ui/components/atoms/vc-link/index.d.ts.map +1 -1
  202. package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts +2 -2
  203. package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts.map +1 -1
  204. package/dist/ui/components/atoms/vc-loading/index.d.ts +1 -1
  205. package/dist/ui/components/atoms/vc-loading/index.d.ts.map +1 -1
  206. package/dist/ui/components/atoms/vc-loading/vc-loading.vue.d.ts +1 -1
  207. package/dist/ui/components/atoms/vc-loading/vc-loading.vue.d.ts.map +1 -1
  208. package/dist/ui/components/atoms/vc-progress/index.d.ts +54 -27
  209. package/dist/ui/components/atoms/vc-progress/index.d.ts.map +1 -1
  210. package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +6 -3
  211. package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
  212. package/dist/ui/components/atoms/vc-row/index.d.ts +53 -8
  213. package/dist/ui/components/atoms/vc-row/index.d.ts.map +1 -1
  214. package/dist/ui/components/atoms/vc-row/vc-row.vue.d.ts +2 -2
  215. package/dist/ui/components/atoms/vc-row/vc-row.vue.d.ts.map +1 -1
  216. package/dist/ui/components/atoms/vc-status/index.d.ts +61 -36
  217. package/dist/ui/components/atoms/vc-status/index.d.ts.map +1 -1
  218. package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +8 -5
  219. package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
  220. package/dist/ui/components/atoms/vc-status-icon/index.d.ts +1 -1
  221. package/dist/ui/components/atoms/vc-status-icon/index.d.ts.map +1 -1
  222. package/dist/ui/components/atoms/vc-status-icon/vc-status-icon.vue.d.ts +1 -1
  223. package/dist/ui/components/atoms/vc-status-icon/vc-status-icon.vue.d.ts.map +1 -1
  224. package/dist/ui/components/atoms/vc-switch/index.d.ts +1 -1
  225. package/dist/ui/components/atoms/vc-switch/index.d.ts.map +1 -1
  226. package/dist/ui/components/atoms/vc-switch/vc-switch.vue.d.ts +1 -1
  227. package/dist/ui/components/atoms/vc-switch/vc-switch.vue.d.ts.map +1 -1
  228. package/dist/ui/components/atoms/vc-widget/index.d.ts +1 -1
  229. package/dist/ui/components/atoms/vc-widget/index.d.ts.map +1 -1
  230. package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts +1 -1
  231. package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
  232. package/dist/ui/components/index.d.ts +2 -0
  233. package/dist/ui/components/index.d.ts.map +1 -1
  234. package/dist/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue.d.ts +3 -3
  235. package/dist/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue.d.ts.map +1 -1
  236. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts +1 -3
  237. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts.map +1 -1
  238. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts +6 -3
  239. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
  240. package/dist/ui/components/molecules/vc-code-editor/index.d.ts +79 -65
  241. package/dist/ui/components/molecules/vc-code-editor/index.d.ts.map +1 -1
  242. package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts +7 -4
  243. package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts.map +1 -1
  244. package/dist/ui/components/molecules/vc-editor/index.d.ts +80 -69
  245. package/dist/ui/components/molecules/vc-editor/index.d.ts.map +1 -1
  246. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +7 -4
  247. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
  248. package/dist/ui/components/molecules/vc-file-upload/index.d.ts +77 -65
  249. package/dist/ui/components/molecules/vc-file-upload/index.d.ts.map +1 -1
  250. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +7 -4
  251. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
  252. package/dist/ui/components/molecules/vc-form/index.d.ts +53 -8
  253. package/dist/ui/components/molecules/vc-form/index.d.ts.map +1 -1
  254. package/dist/ui/components/molecules/vc-form/vc-form.vue.d.ts +2 -2
  255. package/dist/ui/components/molecules/vc-form/vc-form.vue.d.ts.map +1 -1
  256. package/dist/ui/components/molecules/vc-input/index.d.ts +116 -128
  257. package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -1
  258. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +17 -13
  259. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
  260. package/dist/ui/components/molecules/vc-input-currency/index.d.ts +125 -137
  261. package/dist/ui/components/molecules/vc-input-currency/index.d.ts.map +1 -1
  262. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +9 -8
  263. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
  264. package/dist/ui/components/molecules/vc-notification/index.d.ts +1 -1
  265. package/dist/ui/components/molecules/vc-notification/index.d.ts.map +1 -1
  266. package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts +1 -1
  267. package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts.map +1 -1
  268. package/dist/ui/components/molecules/vc-pagination/index.d.ts +7 -11
  269. package/dist/ui/components/molecules/vc-pagination/index.d.ts.map +1 -1
  270. package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts +6 -3
  271. package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
  272. package/dist/ui/components/molecules/vc-rating/index.d.ts +73 -55
  273. package/dist/ui/components/molecules/vc-rating/index.d.ts.map +1 -1
  274. package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +8 -5
  275. package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
  276. package/dist/ui/components/molecules/vc-select/index.d.ts +188 -584
  277. package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -1
  278. package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +643 -119
  279. package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
  280. package/dist/ui/components/molecules/vc-slider/index.d.ts +70 -55
  281. package/dist/ui/components/molecules/vc-slider/index.d.ts.map +1 -1
  282. package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts +10 -7
  283. package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts.map +1 -1
  284. package/dist/ui/components/molecules/vc-textarea/index.d.ts +80 -68
  285. package/dist/ui/components/molecules/vc-textarea/index.d.ts.map +1 -1
  286. package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts +7 -4
  287. package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts.map +1 -1
  288. package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts +21 -7
  289. package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts.map +1 -1
  290. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts +8 -17
  291. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
  292. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +20 -37
  293. 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
  294. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts +20 -13
  295. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
  296. package/dist/ui/components/organisms/vc-app/index.d.ts +138 -160
  297. package/dist/ui/components/organisms/vc-app/index.d.ts.map +1 -1
  298. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +23 -24
  299. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  300. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts +4 -4
  301. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
  302. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts +8 -5
  303. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
  304. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts +7 -4
  305. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts.map +1 -1
  306. package/dist/ui/components/organisms/vc-blade/index.d.ts +90 -129
  307. package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -1
  308. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +11 -15
  309. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  310. package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts +3 -5
  311. package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts.map +1 -1
  312. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts +6 -3
  313. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
  314. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +7 -4
  315. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts.map +1 -1
  316. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +18 -7
  317. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
  318. package/dist/ui/components/organisms/vc-gallery/index.d.ts +37 -52
  319. package/dist/ui/components/organisms/vc-gallery/index.d.ts.map +1 -1
  320. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +8 -8
  321. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
  322. package/dist/ui/components/organisms/vc-login-form/index.d.ts +62 -31
  323. package/dist/ui/components/organisms/vc-login-form/index.d.ts.map +1 -1
  324. package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts +7 -4
  325. package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts.map +1 -1
  326. package/dist/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.d.ts +32 -0
  327. package/dist/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.d.ts.map +1 -0
  328. package/dist/ui/components/organisms/vc-notification-dropdown/index.d.ts +44 -0
  329. package/dist/ui/components/organisms/vc-notification-dropdown/index.d.ts.map +1 -0
  330. package/dist/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue.d.ts +22 -0
  331. package/dist/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue.d.ts.map +1 -0
  332. package/dist/ui/components/organisms/vc-notification-template/index.d.ts +135 -0
  333. package/dist/ui/components/organisms/vc-notification-template/index.d.ts.map +1 -0
  334. package/dist/ui/components/organisms/vc-notification-template/vc-notification-template.vue.d.ts +24 -0
  335. package/dist/ui/components/organisms/vc-notification-template/vc-notification-template.vue.d.ts.map +1 -0
  336. package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-error/vc-popup-error.vue.d.ts +17 -0
  337. package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-error/vc-popup-error.vue.d.ts.map +1 -0
  338. package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-warning/vc-popup-warning.vue.d.ts +20 -0
  339. package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-warning/vc-popup-warning.vue.d.ts.map +1 -0
  340. package/dist/ui/components/organisms/vc-popup/index.d.ts +87 -42
  341. package/dist/ui/components/organisms/vc-popup/index.d.ts.map +1 -1
  342. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +16 -6
  343. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
  344. package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts +1 -1
  345. package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
  346. package/dist/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts +6 -3
  347. package/dist/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts.map +1 -1
  348. package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +6 -3
  349. package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -1
  350. package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts +10 -6
  351. package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
  352. package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts +48 -47
  353. package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts.map +1 -1
  354. package/dist/ui/components/organisms/vc-table/index.d.ts +205 -661
  355. package/dist/ui/components/organisms/vc-table/index.d.ts.map +1 -1
  356. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +186 -135
  357. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
  358. package/dist/ui/types/index.d.ts +2 -0
  359. package/dist/ui/types/index.d.ts.map +1 -1
  360. package/package.json +25 -22
  361. package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +3 -2
  362. package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +5 -3
  363. package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +26 -34
  364. package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +104 -69
  365. package/shared/components/blade-navigation/index.ts +1 -12
  366. package/shared/components/blade-navigation/plugin.ts +33 -0
  367. package/shared/components/blade-navigation/types/index.ts +59 -36
  368. package/shared/components/change-password/change-password.vue +167 -0
  369. package/shared/components/change-password/index.ts +10 -0
  370. package/{core/plugins → shared/components}/error-interceptor/interceptor.ts +1 -1
  371. package/shared/components/index.ts +8 -0
  372. package/shared/components/language-selector/index.ts +10 -0
  373. package/shared/components/language-selector/language-selector.vue +60 -0
  374. package/shared/components/notifications/composables/useContainer/index.ts +2 -2
  375. package/shared/components/notifications/core/notification.ts +3 -3
  376. package/shared/components/notifications/index.ts +0 -11
  377. package/shared/components/notifications/types/index.ts +4 -1
  378. package/shared/components/popup-handler/components/index.ts +1 -0
  379. package/shared/components/popup-handler/components/vc-popup-container/index.ts +3 -0
  380. package/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue +25 -0
  381. package/shared/components/popup-handler/composables/index.ts +1 -0
  382. package/shared/components/popup-handler/composables/usePopup/index.ts +129 -0
  383. package/shared/components/popup-handler/index.ts +19 -0
  384. package/shared/components/popup-handler/plugin.ts +24 -0
  385. package/shared/components/popup-handler/types/index.ts +28 -0
  386. package/shared/components/popup-handler/utils/index.ts +9 -0
  387. package/shared/components/user-dropdown-button/index.ts +10 -0
  388. package/shared/components/user-dropdown-button/user-dropdown-button.vue +124 -0
  389. package/shared/index.ts +14 -8
  390. package/shared/locales/en.json +35 -0
  391. package/shared/locales/index.ts +2 -0
  392. package/shared/modules/assets/components/assets-details/assets-details.vue +12 -16
  393. package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +32 -35
  394. package/shared/modules/index.ts +2 -0
  395. package/shared/pages/InvitePage/components/index.ts +1 -0
  396. package/shared/pages/InvitePage/components/invite/Invite.vue +172 -0
  397. package/shared/pages/InvitePage/components/invite/index.ts +3 -0
  398. package/shared/pages/InvitePage/index.ts +7 -0
  399. package/shared/pages/InvitePage/locales/en.json +31 -0
  400. package/shared/pages/InvitePage/locales/index.ts +2 -0
  401. package/shared/pages/LoginPage/components/index.ts +1 -0
  402. package/shared/pages/LoginPage/components/login/Login.vue +283 -0
  403. package/shared/pages/LoginPage/components/login/index.ts +3 -0
  404. package/shared/pages/LoginPage/index.ts +2 -0
  405. package/shared/pages/LoginPage/locales/en.json +36 -0
  406. package/shared/pages/LoginPage/locales/index.ts +2 -0
  407. package/shared/pages/LoginPage/plugin.ts +17 -0
  408. package/shared/pages/ResetPasswordPage/components/index.ts +1 -0
  409. package/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue +166 -0
  410. package/shared/pages/ResetPasswordPage/components/reset-password/index.ts +3 -0
  411. package/shared/pages/ResetPasswordPage/index.ts +7 -0
  412. package/shared/pages/ResetPasswordPage/locales/en.json +28 -0
  413. package/shared/pages/ResetPasswordPage/locales/index.ts +2 -0
  414. package/shared/pages/index.ts +12 -0
  415. package/ui/components/atoms/vc-button/vc-button.vue +110 -144
  416. package/ui/components/atoms/vc-card/vc-card.vue +2 -2
  417. package/ui/components/atoms/vc-info-row/vc-info-row.vue +2 -2
  418. package/ui/components/atoms/vc-label/vc-label.vue +1 -1
  419. package/ui/components/atoms/vc-loading/vc-loading.vue +1 -1
  420. package/ui/components/atoms/vc-switch/vc-switch.vue +1 -1
  421. package/ui/components/index.ts +2 -0
  422. package/ui/components/molecules/vc-code-editor/vc-code-editor.vue +3 -3
  423. package/ui/components/molecules/vc-editor/vc-editor.vue +3 -3
  424. package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +2 -2
  425. package/ui/components/molecules/vc-input/vc-input.vue +17 -17
  426. package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +8 -8
  427. package/ui/components/molecules/vc-notification/vc-notification.vue +1 -1
  428. package/ui/components/molecules/vc-rating/vc-rating.vue +1 -1
  429. package/ui/components/molecules/vc-select/index.ts +1 -86
  430. package/ui/components/molecules/vc-select/vc-select.stories.ts +1 -1
  431. package/ui/components/molecules/vc-select/vc-select.vue +276 -198
  432. package/ui/components/molecules/vc-slider/vc-slider.vue +3 -3
  433. package/ui/components/molecules/vc-textarea/vc-textarea.vue +2 -2
  434. package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +21 -16
  435. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +5 -9
  436. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +21 -31
  437. package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +22 -16
  438. package/ui/components/organisms/vc-app/vc-app.vue +24 -24
  439. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +10 -13
  440. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +4 -4
  441. package/ui/components/organisms/vc-blade/vc-blade.vue +32 -47
  442. package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +84 -84
  443. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +3 -3
  444. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +9 -3
  445. package/ui/components/organisms/vc-gallery/vc-gallery.vue +27 -23
  446. package/ui/components/organisms/vc-login-form/vc-login-form.stories.ts +1 -1
  447. package/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue +63 -0
  448. package/ui/components/organisms/vc-notification-dropdown/index.ts +3 -0
  449. package/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue +125 -0
  450. package/ui/components/organisms/vc-notification-template/index.ts +3 -0
  451. package/ui/components/organisms/vc-notification-template/vc-notification-template.vue +33 -0
  452. package/ui/components/organisms/vc-popup/_internal/vc-popup-error/vc-popup-error.vue +28 -0
  453. package/ui/components/organisms/vc-popup/_internal/vc-popup-warning/vc-popup-warning.vue +33 -0
  454. package/ui/components/organisms/vc-popup/vc-popup.vue +62 -7
  455. package/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue +6 -6
  456. package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +10 -13
  457. package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +27 -24
  458. package/ui/components/organisms/vc-table/index.ts +1 -17
  459. package/ui/components/organisms/vc-table/vc-table.stories.ts +1 -1
  460. package/ui/components/organisms/vc-table/vc-table.vue +163 -148
  461. package/ui/locales/en.json +21 -10
  462. package/ui/types/index.ts +2 -0
  463. package/core/directives/click-outside/index.ts +0 -21
  464. package/dist/core/directives/click-outside/index.d.ts +0 -3
  465. package/dist/core/directives/click-outside/index.d.ts.map +0 -1
  466. package/dist/core/plugins/error-interceptor/index.d.ts.map +0 -1
  467. package/dist/core/plugins/error-interceptor/interceptor.d.ts.map +0 -1
  468. /package/{core/plugins → shared/components}/error-interceptor/index.ts +0 -0
@@ -8,3 +8,4 @@ export * from "./useAsync";
8
8
  export * from "./useApiClient";
9
9
  export * from "./useLoading";
10
10
  export * from "./useErrorHandler";
11
+ export * from "./useMenuComposer";
@@ -0,0 +1,25 @@
1
+ import { BladeMenu, IBladeToolbar, NavigationMenu, ToolbarMenu } from "./../../types";
2
+
3
+ interface IUseMenuComposer {
4
+ navigationMenuComposer<T extends BladeMenu[]>(items: [...{ [I in keyof T]: NavigationMenu<T[I]> }]): BladeMenu[];
5
+ toolbarComposer<T extends IBladeToolbar[]>(items: [...{ [I in keyof T]: ToolbarMenu<T[I]> }]): IBladeToolbar[];
6
+ }
7
+
8
+ export function useMenuComposer(): IUseMenuComposer {
9
+ function navigationMenuComposer<T extends BladeMenu[]>(
10
+ items: [...{ [I in keyof T]: NavigationMenu<T[I]> }]
11
+ ): BladeMenu[] {
12
+ return items;
13
+ }
14
+
15
+ function toolbarComposer<T extends IBladeToolbar[]>(
16
+ items: [...{ [I in keyof T]: ToolbarMenu<T[I]> }]
17
+ ): IBladeToolbar[] {
18
+ return items;
19
+ }
20
+
21
+ return {
22
+ navigationMenuComposer,
23
+ toolbarComposer,
24
+ };
25
+ }
@@ -1,25 +1,23 @@
1
1
  import { PushNotification, PushNotificationClient } from "./../../api";
2
2
  import { useUser } from "./../useUser";
3
- import { computed, ComputedRef, readonly, ref } from "vue";
3
+ import { computed, ComputedRef, ref } from "vue";
4
4
  import * as _ from "lodash-es";
5
5
 
6
6
  const notificationsClient = new PushNotificationClient();
7
7
 
8
8
  interface INotifications {
9
- readonly notifications: ComputedRef<Readonly<PushNotification[]>>;
10
- readonly popupNotifications: ComputedRef<Readonly<PushNotification[]>>;
11
- loadFromHistory(take?: number): void;
9
+ readonly notifications: ComputedRef<PushNotification[]>;
10
+ readonly moduleNotifications: ComputedRef<PushNotification[]>;
11
+ loadFromHistory(take?: number): Promise<void>;
12
12
  addNotification(message: PushNotification): void;
13
13
  markAsRead(message: PushNotification): void;
14
- dismiss(message: PushNotification): void;
15
- dismissAll(): void;
16
14
  markAllAsRead(): void;
17
15
  }
18
16
 
19
17
  const notifications = ref<PushNotification[]>([]);
20
- const popupNotifications = ref<PushNotification[]>([]);
18
+ const pushNotifications = ref<PushNotification[]>([]);
21
19
 
22
- export function useNotifications(): INotifications {
20
+ export function useNotifications(notifyType?: string | string[]): INotifications {
23
21
  const { getAccessToken } = useUser();
24
22
 
25
23
  async function loadFromHistory(take = 10) {
@@ -50,43 +48,32 @@ export function useNotifications(): INotifications {
50
48
 
51
49
  function addNotification(message: PushNotification) {
52
50
  if (message.notifyType !== "IndexProgressPushNotification") {
53
- const existsNotification = notifications.value.find((x) => x.id == message.id);
54
- const existPushNotification = popupNotifications.value.find((x) => x.id == message.id);
51
+ const existsNotification = notifications.value.find((x: PushNotification) => x.id == message.id);
52
+ const existPushNotification = pushNotifications.value.find((x) => x.id == message.id);
55
53
 
56
54
  if (existsNotification) {
57
55
  message.isNew = existsNotification.isNew;
58
56
  Object.assign(existsNotification, message);
59
57
  } else {
60
- notifications.value.unshift(message);
58
+ notifications.value.push(new PushNotification(message));
61
59
  }
62
60
 
63
61
  if (existPushNotification) {
64
- message.isNew = true;
62
+ message.isNew = existPushNotification.isNew;
65
63
  Object.assign(existPushNotification, message);
66
64
  } else {
67
- popupNotifications.value.unshift(message);
65
+ pushNotifications.value.push(new PushNotification(message));
68
66
  }
69
67
  }
70
68
  }
71
69
 
72
70
  function markAsRead(message: PushNotification) {
73
- const mes = popupNotifications.value.find((x) => x.id === message.id);
74
- if (mes) {
75
- mes.isNew = false;
76
- _.remove(popupNotifications.value, (x) => x.id == message.id);
71
+ const exists = pushNotifications.value.find((x) => x.id === message.id);
72
+ if (exists) {
73
+ Object.assign(exists, { ...message, isNew: false });
77
74
  }
78
75
  }
79
76
 
80
- function dismiss(message: PushNotification) {
81
- _.remove(popupNotifications.value, (x) => x.id == message.id);
82
- _.remove(notifications.value, (x) => x.id == message.id);
83
- }
84
-
85
- function dismissAll() {
86
- popupNotifications.value = [];
87
- notifications.value = [];
88
- }
89
-
90
77
  async function markAllAsRead() {
91
78
  const token = await getAccessToken();
92
79
  if (token) {
@@ -106,13 +93,20 @@ export function useNotifications(): INotifications {
106
93
  }
107
94
  }
108
95
 
96
+ const moduleNotifications = computed(
97
+ () =>
98
+ (notifyType &&
99
+ pushNotifications.value.filter(
100
+ (item: PushNotification) => item.isNew && notifyType.includes(item.notifyType)
101
+ )) ??
102
+ []
103
+ );
104
+
109
105
  return {
110
- notifications: computed(() => readonly(_.orderBy(notifications.value, ["created"], ["desc"]))),
111
- popupNotifications: computed(() => readonly(popupNotifications.value)),
106
+ notifications: computed(() => _.orderBy(notifications.value, ["created"], ["desc"])),
107
+ moduleNotifications,
112
108
  loadFromHistory,
113
109
  addNotification,
114
- dismissAll,
115
- dismiss,
116
110
  markAsRead,
117
111
  markAllAsRead,
118
112
  };
@@ -1,4 +1,4 @@
1
- import { computed, Ref, ref, ComputedRef } from "vue";
1
+ import { computed, Ref, ref, ComputedRef, onUnmounted, getCurrentInstance } from "vue";
2
2
  import ClientOAuth2 from "client-oauth2";
3
3
  import {
4
4
  UserDetail,
@@ -9,6 +9,8 @@ import {
9
9
  IdentityResult,
10
10
  } from "./../../api";
11
11
  import { AuthData, RequestPasswordResult, SignInResults } from "./../../types";
12
+ import * as _ from "lodash-es";
13
+ import fetchIntercept from "fetch-intercept";
12
14
  //The Platform Manager uses the same key to store authorization data in the
13
15
  //local storage, so we can exchange authorization data between the Platform Manager
14
16
  //and the user application that is hosted in the same domain as the sub application.
@@ -21,11 +23,25 @@ const authClient = new ClientOAuth2({
21
23
  accessTokenUri: `/connect/token`,
22
24
  scopes: ["offline_access"],
23
25
  });
26
+ const isExternalSignedIn = ref(false);
27
+ const activeAuthenticationType = ref();
24
28
  const securityClient = new SecurityClient();
25
29
 
30
+ export interface LoginTypes {
31
+ enabled?: boolean;
32
+ hasLoginForm?: boolean;
33
+ authenticationType?: string;
34
+ priority?: number;
35
+ }
36
+ export interface LoginProviders {
37
+ authenticationType?: string;
38
+ displayName?: string;
39
+ }
40
+
26
41
  interface IUseUser {
27
42
  user: ComputedRef<UserDetail | null>;
28
43
  loading: ComputedRef<boolean>;
44
+ isExternalSignedIn: Ref<boolean>;
29
45
  getAccessToken: () => Promise<string | null>;
30
46
  loadUser: () => Promise<UserDetail>;
31
47
  signIn: (username: string, password: string) => Promise<SignInResults>;
@@ -35,9 +51,23 @@ interface IUseUser {
35
51
  resetPasswordByToken: (userId: string, password: string, token: string) => Promise<SecurityResult>;
36
52
  requestPasswordReset: (loginOrEmail: string) => Promise<RequestPasswordResult>;
37
53
  changeUserPassword: (oldPassword: string, newPassword: string) => Promise<SecurityResult>;
54
+ getExternalLoginProviders: () => Promise<LoginProviders[]>;
55
+ externalSignIn: (authenticationType?: string | undefined, returnUrl?: string | undefined) => void;
56
+ externalSignOut: (authenticationType?: string | undefined) => void;
57
+ getLoginTypes: () => Promise<LoginTypes[]>;
58
+ isAzureAdAuthAvailable: () => Promise<boolean>;
59
+ getAzureAdAuthCaption: () => Promise<string>;
38
60
  }
39
61
 
40
62
  export function useUser(): IUseUser {
63
+ // const instance = getCurrentInstance();
64
+ // if (instance) {
65
+ // onUnmounted(() => {
66
+ // console.error("UNREGISTET");
67
+ // unregister();
68
+ // });
69
+ // }
70
+
41
71
  async function validateToken(userId: string, token: string): Promise<boolean> {
42
72
  let result = false;
43
73
  try {
@@ -84,7 +114,7 @@ export function useUser(): IUseUser {
84
114
  expiresAt: addOffsetToCurrentDate(Number(token.data["expires_in"])),
85
115
  userName: username,
86
116
  };
87
- console.log("[userUsers]: an access token has been obtained successfully", authData.value);
117
+ console.log("[useUser]: an access token has been obtained successfully", authData.value);
88
118
 
89
119
  storeAuthData(authData.value);
90
120
  await loadUser();
@@ -94,10 +124,15 @@ export function useUser(): IUseUser {
94
124
 
95
125
  async function signOut(): Promise<void> {
96
126
  console.debug(`[@vc-shell/framework#useUser:signOut] - Entry point`);
97
- user.value = undefined;
98
- authData.value = undefined;
99
- storeAuthData({});
100
- //todo
127
+
128
+ if (!isExternalSignedIn.value) {
129
+ user.value = undefined;
130
+ authData.value = undefined;
131
+ storeAuthData({});
132
+ } else {
133
+ externalSignOut(activeAuthenticationType.value);
134
+ activeAuthenticationType.value = undefined;
135
+ }
101
136
  }
102
137
 
103
138
  async function loadUser(): Promise<UserDetail> {
@@ -108,10 +143,10 @@ export function useUser(): IUseUser {
108
143
  try {
109
144
  loading.value = true;
110
145
  user.value = await securityClient.getCurrentUser();
111
- console.log("[userUsers]: an user details has been loaded", user.value);
146
+ console.log("[useUser]: an user details has been loaded", user.value);
112
147
  } catch (e) {
113
148
  console.dir(e);
114
- //TODO: log error
149
+ throw e;
115
150
  } finally {
116
151
  loading.value = false;
117
152
  }
@@ -131,7 +166,7 @@ export function useUser(): IUseUser {
131
166
  authData.value.refreshToken ?? "",
132
167
  {}
133
168
  );
134
- console.log("[userUsers]: an access token is expired, using refresh token to receive a new");
169
+ console.log("[useUser]: an access token is expired, using refresh token to receive a new");
135
170
  try {
136
171
  const newToken = await token.refresh();
137
172
  if (newToken) {
@@ -145,7 +180,7 @@ export function useUser(): IUseUser {
145
180
  storeAuthData(authData.value);
146
181
  }
147
182
  } catch (e) {
148
- console.log("[userUsers]: getAccessToken() returns error", e);
183
+ console.log("[useUser]: getAccessToken() returns error", e);
149
184
  }
150
185
  }
151
186
 
@@ -211,9 +246,134 @@ export function useUser(): IUseUser {
211
246
  return result as SecurityResult;
212
247
  }
213
248
 
249
+ async function getLoginTypes(): Promise<LoginTypes[]> {
250
+ let result = null as LoginTypes[];
251
+ try {
252
+ const fetchResult = await fetch("/api/platform/security/logintypes", {
253
+ method: "GET",
254
+ headers: {},
255
+ });
256
+
257
+ const response = await fetchResult.text();
258
+ if (response && response.trim()) {
259
+ result = JSON.parse(response) as LoginTypes[];
260
+ }
261
+ } catch (e) {
262
+ console.error(e);
263
+
264
+ throw e;
265
+ }
266
+
267
+ return result;
268
+ }
269
+
270
+ async function getExternalLoginProviders(): Promise<LoginProviders[]> {
271
+ let result = null as LoginProviders[];
272
+ try {
273
+ const fetchResult = await fetch(import.meta.env.APP_PLATFORM_URL + "externalsignin/providers", {
274
+ method: "GET",
275
+ mode: "no-cors",
276
+ });
277
+
278
+ const response = await fetchResult.text();
279
+ if (response && response.trim()) {
280
+ result = JSON.parse(response) as LoginProviders[];
281
+ }
282
+ } catch (e) {
283
+ console.error(e);
284
+
285
+ throw e;
286
+ }
287
+
288
+ return result;
289
+ }
290
+
291
+ async function externalSignIn(authenticationType?: string | undefined, returnUrl?: string | undefined) {
292
+ activeAuthenticationType.value = authenticationType;
293
+ try {
294
+ let url_ = import.meta.env.APP_PLATFORM_URL + "externalsignin?";
295
+ if (authenticationType === null) throw new Error("The parameter 'authenticationType' cannot be null.");
296
+ else {
297
+ if (authenticationType !== undefined)
298
+ url_ += "authenticationType=" + encodeURIComponent("" + authenticationType) + "&";
299
+ if (returnUrl !== undefined) url_ += "returnUrl=" + encodeURIComponent("" + returnUrl) + "&";
300
+ }
301
+ url_ = url_.replace(/[?&]$/, "");
302
+ isExternalSignedIn.value = true;
303
+ initInterceptor();
304
+
305
+ window.location.href = url_;
306
+ } catch (e) {
307
+ isExternalSignedIn.value = false;
308
+ console.error(e);
309
+
310
+ throw e;
311
+ }
312
+ }
313
+
314
+ async function externalSignOut(authenticationType?: string | undefined): Promise<void> {
315
+ try {
316
+ let url_ = import.meta.env.APP_PLATFORM_URL + "externalsignin/signout?";
317
+ if (authenticationType === null) throw new Error("The parameter 'authenticationType' cannot be null.");
318
+ else {
319
+ if (authenticationType !== undefined)
320
+ url_ += "authenticationType=" + encodeURIComponent("" + authenticationType) + "&";
321
+ }
322
+ url_ = url_.replace(/[?&]$/, "");
323
+
324
+ await fetch(url_, {
325
+ method: "GET",
326
+ mode: "no-cors",
327
+ headers: {},
328
+ });
329
+
330
+ fetchIntercept.clear();
331
+ } catch (e) {
332
+ console.error(e);
333
+
334
+ throw e;
335
+ }
336
+ isExternalSignedIn.value = false;
337
+ }
338
+
339
+ async function isAzureAdAuthAvailable(): Promise<boolean> {
340
+ const loginTypes = await getLoginTypes();
341
+ if (loginTypes) {
342
+ return (
343
+ loginTypes.filter((x) => x.authenticationType === "AzureAD").length > 0 &&
344
+ loginTypes.find((x) => x.authenticationType === "AzureAD").enabled
345
+ );
346
+ }
347
+ return false;
348
+ }
349
+
350
+ async function getAzureAdAuthCaption(): Promise<string> {
351
+ const loginProviders = await getExternalLoginProviders();
352
+ if (loginProviders) {
353
+ return loginProviders.find((x) => x.authenticationType === "AzureAD").displayName;
354
+ }
355
+ return null;
356
+ }
357
+
358
+ /* Intercepting requests to explicitly remove auth token when we use AzureAd authentication */
359
+ function initInterceptor() {
360
+ console.log("[@vc-shell/framework#useUser:initInterceptor]: Entry point");
361
+ return fetchIntercept.register({
362
+ request: function (_url, config) {
363
+ if (isExternalSignedIn.value) {
364
+ const edited = _.omit(config.headers, "authorization");
365
+ config.headers = edited;
366
+ }
367
+
368
+ return [_url, config];
369
+ },
370
+ });
371
+ }
372
+
214
373
  return {
215
374
  user: computed(() => user.value),
216
375
  loading: computed(() => loading.value),
376
+ isExternalSignedIn,
217
377
  getAccessToken,
218
378
  loadUser,
219
379
  signIn,
@@ -223,5 +383,11 @@ export function useUser(): IUseUser {
223
383
  resetPasswordByToken,
224
384
  requestPasswordReset,
225
385
  changeUserPassword,
386
+ getExternalLoginProviders,
387
+ externalSignIn,
388
+ externalSignOut,
389
+ getLoginTypes,
390
+ isAzureAdAuthAvailable,
391
+ getAzureAdAuthCaption,
226
392
  };
227
393
  }
@@ -1,4 +1,3 @@
1
1
  export * from "./permissions";
2
2
  export * from "./autofocus";
3
- export * from "./click-outside";
4
3
  export * from "./loading";
@@ -2,4 +2,4 @@ export * from "./moment";
2
2
  export * from "./i18n";
3
3
  export * from "./validation";
4
4
  export * from "./modularity";
5
- export * from "./error-interceptor";
5
+ export * from "./signalR";
@@ -17,7 +17,7 @@ export const createModule = (components: unknown, locales?: unknown) => ({
17
17
  },
18
18
  });
19
19
 
20
- export const createAppModule = (pages: unknown, locales?: unknown) => {
20
+ export const createAppModule = (pages: unknown, locales?: unknown, notificationTemplates?: unknown) => {
21
21
  const module = createModule(pages, locales);
22
22
 
23
23
  return {
@@ -26,6 +26,13 @@ export const createAppModule = (pages: unknown, locales?: unknown) => {
26
26
  Object.entries(pages).forEach(([, page]) => {
27
27
  app.config.globalProperties.pages?.push(page);
28
28
  });
29
+
30
+ if (notificationTemplates) {
31
+ // Register notification templates
32
+ Object.entries(notificationTemplates).forEach(([, template]) => {
33
+ app.config.globalProperties.notificationTemplates?.push(template);
34
+ });
35
+ }
29
36
  module.install(app);
30
37
  },
31
38
  };
@@ -0,0 +1,32 @@
1
+ import { HubConnectionBuilder, LogLevel } from "@microsoft/signalr";
2
+ import { PushNotification } from "../../api";
3
+ import { useNotifications } from "./../../composables/useNotifications";
4
+
5
+ const { addNotification } = useNotifications();
6
+
7
+ export const signalR = {
8
+ install() {
9
+ const connection = new HubConnectionBuilder()
10
+ .withUrl("/pushNotificationHub")
11
+ .withAutomaticReconnect()
12
+ .configureLogging(LogLevel.Information)
13
+ .build();
14
+
15
+ let startedPromise = null;
16
+
17
+ function start() {
18
+ startedPromise = connection.start().catch((err) => {
19
+ console.error("Failed to connect", err);
20
+ return new Promise((resolve, reject) => setTimeout(() => start().then(resolve).catch(reject), 5000));
21
+ });
22
+ return startedPromise;
23
+ }
24
+ connection.onclose(() => start());
25
+
26
+ start();
27
+
28
+ connection.on("Send", (message: PushNotification) => {
29
+ addNotification(message);
30
+ });
31
+ },
32
+ };
@@ -1,5 +1,11 @@
1
- import { ComputedRef } from "vue";
2
- import { IBladeElement, ExtendedComponent } from "./../../shared";
1
+ import { ComponentPublicInstance, ComputedRef, Ref } from "vue";
2
+ import {
3
+ CoreBladeExposed,
4
+ BladeConstructor,
5
+ ExtractedBladeOptions,
6
+ ComponentInstanceConstructor,
7
+ BladeInstanceConstructor,
8
+ } from "./../../shared";
3
9
 
4
10
  // Type instead of interface here is workaround for:
5
11
  // https://github.com/microsoft/TypeScript/issues/15300
@@ -20,36 +26,69 @@ export type IValidationRules = {
20
26
  size?: number;
21
27
  };
22
28
 
23
- export interface IBladeToolbar {
29
+ export interface IBladeDropdownItem {
30
+ id: string;
31
+ title: string;
32
+ icon?: string;
33
+ clickHandler?(): void;
34
+ }
35
+
36
+ export interface BladeMenu<T extends ComponentPublicInstance = ComponentPublicInstance> {
37
+ title?: string | Ref<string>;
38
+ icon?: string;
39
+ isVisible?: boolean | Ref<boolean>;
40
+ component?: BladeConstructor<T>;
41
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
+ clickHandler?(app?: Record<string, any> | CoreBladeExposed): void;
43
+ children?: BladeMenu<T>[];
44
+ options?: ExtractedBladeOptions<InstanceType<BladeConstructor<T>>["$props"], "options">;
45
+ }
46
+
47
+ export interface IBladeToolbar<T extends ComponentPublicInstance = ComponentPublicInstance>
48
+ extends Omit<BladeMenu, "children" | "icon" | "options" | "component"> {
24
49
  id?: string;
25
50
  icon?: string | (() => string);
26
- title?: string | unknown;
27
- isVisible?: boolean | unknown;
28
51
  isAccent?: boolean | ComputedRef<boolean>;
29
- component?: ExtendedComponent;
30
- bladeOptions?: Record<string, unknown>;
52
+ component?: ComponentInstanceConstructor<T>;
31
53
  disabled?: boolean | ComputedRef<boolean>;
32
54
  dropdownItems?: IBladeDropdownItem[];
33
- clickHandler?(app?: Record<string, unknown> | IBladeElement): void;
55
+ options?: InstanceType<ComponentInstanceConstructor<T>>["$props"];
34
56
  }
35
57
 
36
- export interface IBladeDropdownItem {
37
- id: string;
38
- title: string;
39
- icon?: string;
40
- clickHandler?(): void;
58
+ export type NavigationMenu<T> = T extends {
59
+ component?: infer C extends BladeInstanceConstructor;
41
60
  }
61
+ ? {
62
+ component?: C;
63
+ options?: ExtractedBladeOptions<InstanceType<C>["$props"], "options">;
64
+ } & BladeMenu
65
+ : T extends {
66
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
67
+ children?: infer P extends [] | readonly any[];
68
+ } & BladeMenu
69
+ ? {
70
+ children?: readonly [...{ [I in keyof P]: NavigationMenu<P[I]> }];
71
+ } & BladeMenu
72
+ : T & { component?: BladeInstanceConstructor };
42
73
 
43
- export interface IMenuItems extends IBladeToolbar {
44
- children?: IBladeToolbar[];
74
+ export type ToolbarMenu<T> = T extends {
75
+ component?: infer C extends ComponentInstanceConstructor;
45
76
  }
77
+ ? {
78
+ component?: C;
79
+ options?: InstanceType<C>["$props"];
80
+ } & IBladeToolbar
81
+ : T & { component?: ComponentInstanceConstructor };
82
+
83
+ export type NotificationTemplateConstructor = ComponentInstanceConstructor & { notifyType: string };
46
84
 
47
- export interface IActionBuilderResult {
85
+ // eslint-disable-next-line @typescript-eslint/ban-types
86
+ export interface IActionBuilderResult<T = {}> {
48
87
  icon: string;
49
88
  title: string;
50
89
  variant: string;
51
90
  leftActions?: boolean;
52
- clickHandler(item?: { id?: string }): void;
91
+ clickHandler(item?: T): void;
53
92
  }
54
93
 
55
94
  export interface IImage {