@vc-shell/framework 1.0.68 → 1.0.70

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 (374) hide show
  1. package/CHANGELOG.md +1628 -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 +24 -30
  6. package/core/composables/useUser/index.ts +1 -1
  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 +3 -5
  19. package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
  20. package/dist/core/directives/autofocus/index.d.ts +1 -1
  21. package/dist/core/directives/autofocus/index.d.ts.map +1 -1
  22. package/dist/core/directives/index.d.ts +0 -1
  23. package/dist/core/directives/index.d.ts.map +1 -1
  24. package/dist/core/directives/loading/index.d.ts +1 -1
  25. package/dist/core/directives/loading/index.d.ts.map +1 -1
  26. package/dist/core/directives/permissions/index.d.ts +1 -1
  27. package/dist/core/directives/permissions/index.d.ts.map +1 -1
  28. package/dist/core/plugins/index.d.ts +1 -1
  29. package/dist/core/plugins/index.d.ts.map +1 -1
  30. package/dist/core/plugins/modularity/index.d.ts +1 -1
  31. package/dist/core/plugins/modularity/index.d.ts.map +1 -1
  32. package/dist/core/plugins/signalR/index.d.ts +4 -0
  33. package/dist/core/plugins/signalR/index.d.ts.map +1 -0
  34. package/dist/core/types/index.d.ts +46 -20
  35. package/dist/core/types/index.d.ts.map +1 -1
  36. package/dist/framework.mjs +28611 -27509
  37. package/dist/index.css +1 -1
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/shared/components/app-switcher/components/vc-app-switcher/index.d.ts +1 -3
  40. package/dist/shared/components/app-switcher/components/vc-app-switcher/index.d.ts.map +1 -1
  41. package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts +6 -3
  42. package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts.map +1 -1
  43. package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
  44. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/index.d.ts +13 -456
  45. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/index.d.ts.map +1 -1
  46. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts +19 -454
  47. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts.map +1 -1
  48. package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts +2 -3
  49. package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
  50. package/dist/shared/components/blade-navigation/index.d.ts +1 -9
  51. package/dist/shared/components/blade-navigation/index.d.ts.map +1 -1
  52. package/dist/shared/components/blade-navigation/plugin.d.ts +13 -0
  53. package/dist/shared/components/blade-navigation/plugin.d.ts.map +1 -0
  54. package/dist/shared/components/blade-navigation/types/index.d.ts +53 -26
  55. package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
  56. package/dist/{core/plugins → shared/components}/error-interceptor/index.d.ts +53 -15
  57. package/dist/shared/components/error-interceptor/index.d.ts.map +1 -0
  58. package/dist/{core/plugins → shared/components}/error-interceptor/interceptor.d.ts +1 -1
  59. package/dist/shared/components/error-interceptor/interceptor.d.ts.map +1 -0
  60. package/dist/shared/components/notifications/components/notification-container/index.d.ts +13 -13
  61. package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
  62. package/dist/shared/components/notifications/index.d.ts +0 -9
  63. package/dist/shared/components/notifications/index.d.ts.map +1 -1
  64. package/dist/shared/components/popup-handler/components/index.d.ts +2 -0
  65. package/dist/shared/components/popup-handler/components/index.d.ts.map +1 -0
  66. package/dist/shared/components/popup-handler/components/vc-popup-container/index.d.ts +2 -0
  67. package/dist/shared/components/popup-handler/components/vc-popup-container/index.d.ts.map +1 -0
  68. package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts +3 -0
  69. package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -0
  70. package/dist/shared/components/popup-handler/composables/index.d.ts +2 -0
  71. package/dist/shared/components/popup-handler/composables/index.d.ts.map +1 -0
  72. package/dist/shared/components/popup-handler/composables/usePopup/index.d.ts +12 -0
  73. package/dist/shared/components/popup-handler/composables/usePopup/index.d.ts.map +1 -0
  74. package/dist/shared/components/popup-handler/index.d.ts +16 -0
  75. package/dist/shared/components/popup-handler/index.d.ts.map +1 -0
  76. package/dist/shared/components/popup-handler/plugin.d.ts +6 -0
  77. package/dist/shared/components/popup-handler/plugin.d.ts.map +1 -0
  78. package/dist/shared/components/popup-handler/types/index.d.ts +26 -0
  79. package/dist/shared/components/popup-handler/types/index.d.ts.map +1 -0
  80. package/dist/shared/components/popup-handler/utils/index.d.ts +3 -0
  81. package/dist/shared/components/popup-handler/utils/index.d.ts.map +1 -0
  82. package/dist/shared/index.d.ts +2 -0
  83. package/dist/shared/index.d.ts.map +1 -1
  84. package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts +13 -4
  85. package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts.map +1 -1
  86. package/dist/shared/modules/assets/components/assets-details/index.d.ts +85 -49
  87. package/dist/shared/modules/assets/components/assets-details/index.d.ts.map +1 -1
  88. package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +15 -11
  89. package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
  90. package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts +89 -64
  91. package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts.map +1 -1
  92. package/dist/tsconfig.tsbuildinfo +1 -1
  93. package/dist/ui/components/atoms/vc-badge/index.d.ts +56 -19
  94. package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -1
  95. package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +2 -2
  96. package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
  97. package/dist/ui/components/atoms/vc-button/index.d.ts +68 -44
  98. package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -1
  99. package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +7 -4
  100. package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
  101. package/dist/ui/components/atoms/vc-card/index.d.ts +66 -44
  102. package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -1
  103. package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts +8 -6
  104. package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts.map +1 -1
  105. package/dist/ui/components/atoms/vc-checkbox/index.d.ts +74 -48
  106. package/dist/ui/components/atoms/vc-checkbox/index.d.ts.map +1 -1
  107. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts +8 -5
  108. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
  109. package/dist/ui/components/atoms/vc-col/index.d.ts +54 -19
  110. package/dist/ui/components/atoms/vc-col/index.d.ts.map +1 -1
  111. package/dist/ui/components/atoms/vc-col/vc-col.vue.d.ts +7 -4
  112. package/dist/ui/components/atoms/vc-col/vc-col.vue.d.ts.map +1 -1
  113. package/dist/ui/components/atoms/vc-container/index.d.ts +56 -19
  114. package/dist/ui/components/atoms/vc-container/index.d.ts.map +1 -1
  115. package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +2 -2
  116. package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts.map +1 -1
  117. package/dist/ui/components/atoms/vc-hint/index.d.ts +53 -8
  118. package/dist/ui/components/atoms/vc-hint/index.d.ts.map +1 -1
  119. package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts +2 -2
  120. package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts.map +1 -1
  121. package/dist/ui/components/atoms/vc-icon/index.d.ts +4 -8
  122. package/dist/ui/components/atoms/vc-icon/index.d.ts.map +1 -1
  123. package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +7 -4
  124. package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
  125. package/dist/ui/components/atoms/vc-image/index.d.ts +17 -23
  126. package/dist/ui/components/atoms/vc-image/index.d.ts.map +1 -1
  127. package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts +8 -5
  128. package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts.map +1 -1
  129. package/dist/ui/components/atoms/vc-info-row/index.d.ts +10 -12
  130. package/dist/ui/components/atoms/vc-info-row/index.d.ts.map +1 -1
  131. package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts +7 -4
  132. package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts.map +1 -1
  133. package/dist/ui/components/atoms/vc-label/index.d.ts +56 -23
  134. package/dist/ui/components/atoms/vc-label/index.d.ts.map +1 -1
  135. package/dist/ui/components/atoms/vc-label/vc-label.vue.d.ts +8 -5
  136. package/dist/ui/components/atoms/vc-label/vc-label.vue.d.ts.map +1 -1
  137. package/dist/ui/components/atoms/vc-link/index.d.ts +56 -20
  138. package/dist/ui/components/atoms/vc-link/index.d.ts.map +1 -1
  139. package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts +2 -2
  140. package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts.map +1 -1
  141. package/dist/ui/components/atoms/vc-loading/index.d.ts +1 -1
  142. package/dist/ui/components/atoms/vc-loading/index.d.ts.map +1 -1
  143. package/dist/ui/components/atoms/vc-loading/vc-loading.vue.d.ts +1 -1
  144. package/dist/ui/components/atoms/vc-loading/vc-loading.vue.d.ts.map +1 -1
  145. package/dist/ui/components/atoms/vc-progress/index.d.ts +54 -27
  146. package/dist/ui/components/atoms/vc-progress/index.d.ts.map +1 -1
  147. package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +6 -3
  148. package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
  149. package/dist/ui/components/atoms/vc-row/index.d.ts +53 -8
  150. package/dist/ui/components/atoms/vc-row/index.d.ts.map +1 -1
  151. package/dist/ui/components/atoms/vc-row/vc-row.vue.d.ts +2 -2
  152. package/dist/ui/components/atoms/vc-row/vc-row.vue.d.ts.map +1 -1
  153. package/dist/ui/components/atoms/vc-status/index.d.ts +56 -31
  154. package/dist/ui/components/atoms/vc-status/index.d.ts.map +1 -1
  155. package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +7 -4
  156. package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
  157. package/dist/ui/components/atoms/vc-status-icon/index.d.ts +1 -1
  158. package/dist/ui/components/atoms/vc-status-icon/index.d.ts.map +1 -1
  159. package/dist/ui/components/atoms/vc-status-icon/vc-status-icon.vue.d.ts +1 -1
  160. package/dist/ui/components/atoms/vc-status-icon/vc-status-icon.vue.d.ts.map +1 -1
  161. package/dist/ui/components/atoms/vc-switch/index.d.ts +1 -1
  162. package/dist/ui/components/atoms/vc-switch/index.d.ts.map +1 -1
  163. package/dist/ui/components/atoms/vc-switch/vc-switch.vue.d.ts +1 -1
  164. package/dist/ui/components/atoms/vc-switch/vc-switch.vue.d.ts.map +1 -1
  165. package/dist/ui/components/atoms/vc-widget/index.d.ts +1 -1
  166. package/dist/ui/components/atoms/vc-widget/index.d.ts.map +1 -1
  167. package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts +1 -1
  168. package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
  169. package/dist/ui/components/index.d.ts +2 -0
  170. package/dist/ui/components/index.d.ts.map +1 -1
  171. package/dist/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue.d.ts +3 -3
  172. package/dist/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue.d.ts.map +1 -1
  173. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts +1 -3
  174. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts.map +1 -1
  175. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts +6 -3
  176. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
  177. package/dist/ui/components/molecules/vc-code-editor/index.d.ts +79 -65
  178. package/dist/ui/components/molecules/vc-code-editor/index.d.ts.map +1 -1
  179. package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts +7 -4
  180. package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts.map +1 -1
  181. package/dist/ui/components/molecules/vc-editor/index.d.ts +80 -69
  182. package/dist/ui/components/molecules/vc-editor/index.d.ts.map +1 -1
  183. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +7 -4
  184. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
  185. package/dist/ui/components/molecules/vc-file-upload/index.d.ts +77 -65
  186. package/dist/ui/components/molecules/vc-file-upload/index.d.ts.map +1 -1
  187. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +7 -4
  188. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
  189. package/dist/ui/components/molecules/vc-form/index.d.ts +53 -8
  190. package/dist/ui/components/molecules/vc-form/index.d.ts.map +1 -1
  191. package/dist/ui/components/molecules/vc-form/vc-form.vue.d.ts +2 -2
  192. package/dist/ui/components/molecules/vc-form/vc-form.vue.d.ts.map +1 -1
  193. package/dist/ui/components/molecules/vc-input/index.d.ts +116 -128
  194. package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -1
  195. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +17 -13
  196. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
  197. package/dist/ui/components/molecules/vc-input-currency/index.d.ts +125 -137
  198. package/dist/ui/components/molecules/vc-input-currency/index.d.ts.map +1 -1
  199. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +9 -8
  200. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
  201. package/dist/ui/components/molecules/vc-notification/index.d.ts +1 -1
  202. package/dist/ui/components/molecules/vc-notification/index.d.ts.map +1 -1
  203. package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts +1 -1
  204. package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts.map +1 -1
  205. package/dist/ui/components/molecules/vc-pagination/index.d.ts +7 -11
  206. package/dist/ui/components/molecules/vc-pagination/index.d.ts.map +1 -1
  207. package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts +6 -3
  208. package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
  209. package/dist/ui/components/molecules/vc-rating/index.d.ts +73 -55
  210. package/dist/ui/components/molecules/vc-rating/index.d.ts.map +1 -1
  211. package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +8 -5
  212. package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
  213. package/dist/ui/components/molecules/vc-select/index.d.ts +188 -584
  214. package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -1
  215. package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +643 -119
  216. package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
  217. package/dist/ui/components/molecules/vc-slider/index.d.ts +70 -55
  218. package/dist/ui/components/molecules/vc-slider/index.d.ts.map +1 -1
  219. package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts +10 -7
  220. package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts.map +1 -1
  221. package/dist/ui/components/molecules/vc-textarea/index.d.ts +80 -68
  222. package/dist/ui/components/molecules/vc-textarea/index.d.ts.map +1 -1
  223. package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts +7 -4
  224. package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts.map +1 -1
  225. package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts +21 -7
  226. package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts.map +1 -1
  227. 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
  228. 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
  229. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +19 -36
  230. 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
  231. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts +20 -13
  232. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
  233. package/dist/ui/components/organisms/vc-app/index.d.ts +138 -160
  234. package/dist/ui/components/organisms/vc-app/index.d.ts.map +1 -1
  235. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +23 -24
  236. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  237. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts +4 -4
  238. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
  239. 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
  240. 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
  241. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts +7 -4
  242. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts.map +1 -1
  243. package/dist/ui/components/organisms/vc-blade/index.d.ts +103 -112
  244. package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -1
  245. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +11 -10
  246. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  247. package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts +3 -5
  248. package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts.map +1 -1
  249. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts +6 -3
  250. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
  251. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +7 -4
  252. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts.map +1 -1
  253. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +18 -7
  254. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
  255. package/dist/ui/components/organisms/vc-gallery/index.d.ts +37 -52
  256. package/dist/ui/components/organisms/vc-gallery/index.d.ts.map +1 -1
  257. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +8 -8
  258. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
  259. package/dist/ui/components/organisms/vc-login-form/index.d.ts +62 -31
  260. package/dist/ui/components/organisms/vc-login-form/index.d.ts.map +1 -1
  261. package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts +7 -4
  262. package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts.map +1 -1
  263. package/dist/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.d.ts +32 -0
  264. package/dist/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.d.ts.map +1 -0
  265. package/dist/ui/components/organisms/vc-notification-dropdown/index.d.ts +44 -0
  266. package/dist/ui/components/organisms/vc-notification-dropdown/index.d.ts.map +1 -0
  267. package/dist/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue.d.ts +22 -0
  268. package/dist/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue.d.ts.map +1 -0
  269. package/dist/ui/components/organisms/vc-notification-template/index.d.ts +135 -0
  270. package/dist/ui/components/organisms/vc-notification-template/index.d.ts.map +1 -0
  271. package/dist/ui/components/organisms/vc-notification-template/vc-notification-template.vue.d.ts +24 -0
  272. package/dist/ui/components/organisms/vc-notification-template/vc-notification-template.vue.d.ts.map +1 -0
  273. package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-error/vc-popup-error.vue.d.ts +17 -0
  274. package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-error/vc-popup-error.vue.d.ts.map +1 -0
  275. package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-warning/vc-popup-warning.vue.d.ts +20 -0
  276. package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-warning/vc-popup-warning.vue.d.ts.map +1 -0
  277. package/dist/ui/components/organisms/vc-popup/index.d.ts +87 -42
  278. package/dist/ui/components/organisms/vc-popup/index.d.ts.map +1 -1
  279. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +16 -6
  280. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
  281. package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts +1 -1
  282. package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
  283. package/dist/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts +6 -3
  284. package/dist/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts.map +1 -1
  285. package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +6 -3
  286. package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -1
  287. package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts +8 -5
  288. package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
  289. package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts +48 -47
  290. package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts.map +1 -1
  291. package/dist/ui/components/organisms/vc-table/index.d.ts +205 -661
  292. package/dist/ui/components/organisms/vc-table/index.d.ts.map +1 -1
  293. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +185 -134
  294. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
  295. package/dist/ui/types/index.d.ts +2 -0
  296. package/dist/ui/types/index.d.ts.map +1 -1
  297. package/package.json +26 -27
  298. package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +3 -2
  299. package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +4 -2
  300. package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +25 -26
  301. package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +106 -68
  302. package/shared/components/blade-navigation/index.ts +1 -12
  303. package/shared/components/blade-navigation/plugin.ts +33 -0
  304. package/shared/components/blade-navigation/types/index.ts +59 -36
  305. package/{core/plugins → shared/components}/error-interceptor/interceptor.ts +1 -1
  306. package/shared/components/notifications/composables/useContainer/index.ts +2 -2
  307. package/shared/components/notifications/core/notification.ts +1 -1
  308. package/shared/components/notifications/index.ts +0 -11
  309. package/shared/components/popup-handler/components/index.ts +1 -0
  310. package/shared/components/popup-handler/components/vc-popup-container/index.ts +3 -0
  311. package/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue +25 -0
  312. package/shared/components/popup-handler/composables/index.ts +1 -0
  313. package/shared/components/popup-handler/composables/usePopup/index.ts +129 -0
  314. package/shared/components/popup-handler/index.ts +19 -0
  315. package/shared/components/popup-handler/plugin.ts +24 -0
  316. package/shared/components/popup-handler/types/index.ts +28 -0
  317. package/shared/components/popup-handler/utils/index.ts +9 -0
  318. package/shared/index.ts +4 -2
  319. package/shared/modules/assets/components/assets-details/assets-details.vue +12 -10
  320. package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +33 -30
  321. package/ui/components/atoms/vc-button/vc-button.vue +1 -1
  322. package/ui/components/atoms/vc-card/vc-card.vue +2 -2
  323. package/ui/components/atoms/vc-info-row/vc-info-row.vue +2 -2
  324. package/ui/components/atoms/vc-label/vc-label.vue +1 -1
  325. package/ui/components/atoms/vc-loading/vc-loading.vue +1 -1
  326. package/ui/components/atoms/vc-switch/vc-switch.vue +1 -1
  327. package/ui/components/index.ts +2 -0
  328. package/ui/components/molecules/vc-code-editor/vc-code-editor.vue +3 -3
  329. package/ui/components/molecules/vc-editor/vc-editor.vue +3 -3
  330. package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +2 -2
  331. package/ui/components/molecules/vc-input/vc-input.vue +17 -17
  332. package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +8 -8
  333. package/ui/components/molecules/vc-notification/vc-notification.vue +1 -1
  334. package/ui/components/molecules/vc-rating/vc-rating.vue +1 -1
  335. package/ui/components/molecules/vc-select/index.ts +1 -86
  336. package/ui/components/molecules/vc-select/vc-select.stories.ts +1 -1
  337. package/ui/components/molecules/vc-select/vc-select.vue +276 -198
  338. package/ui/components/molecules/vc-slider/vc-slider.vue +3 -3
  339. package/ui/components/molecules/vc-textarea/vc-textarea.vue +2 -2
  340. package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +20 -15
  341. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +5 -9
  342. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +18 -27
  343. package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +22 -16
  344. package/ui/components/organisms/vc-app/vc-app.vue +20 -17
  345. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +5 -5
  346. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +4 -4
  347. package/ui/components/organisms/vc-blade/vc-blade.vue +25 -32
  348. package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +84 -84
  349. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +3 -3
  350. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +9 -3
  351. package/ui/components/organisms/vc-gallery/vc-gallery.vue +27 -23
  352. package/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue +63 -0
  353. package/ui/components/organisms/vc-notification-dropdown/index.ts +3 -0
  354. package/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue +125 -0
  355. package/ui/components/organisms/vc-notification-template/index.ts +3 -0
  356. package/ui/components/organisms/vc-notification-template/vc-notification-template.vue +33 -0
  357. package/ui/components/organisms/vc-popup/_internal/vc-popup-error/vc-popup-error.vue +28 -0
  358. package/ui/components/organisms/vc-popup/_internal/vc-popup-warning/vc-popup-warning.vue +33 -0
  359. package/ui/components/organisms/vc-popup/vc-popup.vue +62 -7
  360. package/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue +6 -6
  361. package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +5 -5
  362. package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +27 -24
  363. package/ui/components/organisms/vc-table/index.ts +1 -17
  364. package/ui/components/organisms/vc-table/vc-table.stories.ts +1 -1
  365. package/ui/components/organisms/vc-table/vc-table.vue +140 -132
  366. package/ui/locales/en.json +21 -10
  367. package/ui/types/index.ts +2 -0
  368. package/LICENSE +0 -12
  369. package/core/directives/click-outside/index.ts +0 -21
  370. package/dist/core/directives/click-outside/index.d.ts +0 -3
  371. package/dist/core/directives/click-outside/index.d.ts.map +0 -1
  372. package/dist/core/plugins/error-interceptor/index.d.ts.map +0 -1
  373. package/dist/core/plugins/error-interceptor/interceptor.d.ts.map +0 -1
  374. /package/{core/plugins → shared/components}/error-interceptor/index.ts +0 -0
@@ -17,7 +17,7 @@
17
17
  <span>{{ label }}</span>
18
18
  <template
19
19
  v-if="tooltip"
20
- v-slot:tooltip
20
+ #tooltip
21
21
  >
22
22
  <span v-html="tooltip"></span>
23
23
  </template>
@@ -31,12 +31,12 @@
31
31
  >
32
32
  <slot
33
33
  name="control"
34
- :toggleHandler="toggleDropdown"
34
+ :toggle-handler="toggleDropdown"
35
35
  >
36
36
  <div class="tw-relative tw-flex tw-flex-auto tw-text-left tw-max-w-full">
37
37
  <div
38
- class="tw-flex tw-items-center tw-flex-nowrap tw-pr-3"
39
38
  v-if="$slots['prepend']"
39
+ class="tw-flex tw-items-center tw-flex-nowrap tw-pr-3"
40
40
  >
41
41
  <slot name="prepend"></slot>
42
42
  </div>
@@ -47,15 +47,15 @@
47
47
  <div class="tw-flex tw-flex-col tw-flex-nowrap tw-flex-auto tw-relative">
48
48
  <div class="tw-flex tw-flex-nowrap tw-flex-auto tw-h-full tw-px-3">
49
49
  <div
50
- class="tw-flex tw-items-center tw-flex-nowrap tw-pr-3"
51
50
  v-if="$slots['prepend-inner']"
51
+ class="tw-flex tw-items-center tw-flex-nowrap tw-pr-3"
52
52
  >
53
53
  <slot name="prepend-inner"></slot>
54
54
  </div>
55
55
  <div class="tw-flex tw-flex-nowrap tw-flex-auto tw-h-full tw-truncate">
56
56
  <div
57
- class="tw-flex tw-items-center tw-flex-wrap tw-pr-3 tw-pointer-events-none"
58
57
  v-if="prefix"
58
+ class="tw-flex tw-items-center tw-flex-wrap tw-pr-3 tw-pointer-events-none"
59
59
  >
60
60
  {{ prefix }}
61
61
  </div>
@@ -72,10 +72,10 @@
72
72
  <template v-else-if="selectedScope && selectedScope.length && hasValue">
73
73
  <template v-if="$slots['selected-item']">
74
74
  <slot
75
- name="selected-item"
76
75
  v-for="(item, i) in selectedScope"
77
76
  v-bind="item"
78
77
  :key="i"
78
+ name="selected-item"
79
79
  ></slot>
80
80
  </template>
81
81
  <template v-else>
@@ -109,8 +109,8 @@
109
109
  </template>
110
110
  </div>
111
111
  <div
112
- class="tw-flex tw-items-center tw-flex-wrap tw-pl-3 tw-pointer-events-none"
113
112
  v-if="suffix"
113
+ class="tw-flex tw-items-center tw-flex-wrap tw-pl-3 tw-pointer-events-none"
114
114
  >
115
115
  {{ suffix }}
116
116
  </div>
@@ -126,15 +126,15 @@
126
126
  </div>
127
127
  </div>
128
128
  <div
129
- class="tw-flex tw-items-center tw-flex-nowrap tw-pl-3"
130
129
  v-if="$slots['append-inner']"
130
+ class="tw-flex tw-items-center tw-flex-nowrap tw-pl-3"
131
131
  >
132
132
  <slot name="append-inner"></slot>
133
133
  </div>
134
134
  <!-- Loading-->
135
135
  <div
136
- class="tw-flex tw-items-center tw-flex-nowrap tw-pl-3 tw-text-[color:var(--select-clear-color)]"
137
136
  v-if="loading || listLoading"
137
+ class="tw-flex tw-items-center tw-flex-nowrap tw-pl-3 tw-text-[color:var(--select-clear-color)]"
138
138
  >
139
139
  <VcIcon
140
140
  icon="fas fa-spinner tw-animate-spin"
@@ -143,8 +143,8 @@
143
143
  </div>
144
144
  <!-- Select chevron-->
145
145
  <div
146
- class="tw-flex tw-items-center tw-flex-nowrap tw-pl-3"
147
146
  v-if="!disabled"
147
+ class="tw-flex tw-items-center tw-flex-nowrap tw-pl-3"
148
148
  >
149
149
  <div
150
150
  class="vc-select__chevron tw-cursor-pointer tw-flex-nowrap tw-text-[color:var(--select-chevron-color)] hover:tw-text-[color:var(--select-chevron-color-hover)]"
@@ -167,8 +167,8 @@
167
167
  <div v-if="error">
168
168
  <slot name="error">
169
169
  <VcHint
170
- class="tw-mt-1 tw-text-[color:var(--select-border-color-error)]"
171
170
  v-if="errorMessage"
171
+ class="tw-mt-1 tw-text-[color:var(--select-border-color-error)]"
172
172
  >
173
173
  {{ errorMessage }}
174
174
  </VcHint>
@@ -177,8 +177,8 @@
177
177
  <div v-else>
178
178
  <slot name="hint">
179
179
  <VcHint
180
- class="tw-text-[color:var(--select-placeholder-color)] tw-mt-1 tw-break-words tw-p-0"
181
180
  v-if="hint"
181
+ class="tw-text-[color:var(--select-placeholder-color)] tw-mt-1 tw-break-words tw-p-0"
182
182
  >
183
183
  {{ hint }}
184
184
  </VcHint>
@@ -189,8 +189,8 @@
189
189
  </div>
190
190
 
191
191
  <div
192
- class="tw-flex tw-items-center tw-flex-nowrap tw-pl-3"
193
192
  v-if="$slots['append']"
193
+ class="tw-flex tw-items-center tw-flex-nowrap tw-pl-3"
194
194
  >
195
195
  <slot name="append"></slot>
196
196
  </div>
@@ -201,9 +201,9 @@
201
201
  <teleport to="#app">
202
202
  <div
203
203
  v-if="isOpened"
204
- class="tw-flex tw-flex-col tw-box-border tw-max-h-[300px] tw-h-auto tw-z-10 tw-overflow-hidden tw-absolute tw-bg-[color:var(--select-background-color)] tw-border tw-border-solid tw-border-[color:var(--select-border-color)] tw-border-t-[color:var(--select-background-color)] tw-rounded-b-[var(--select-border-radius)] tw-p-2"
205
204
  ref="dropdownRef"
206
- v-click-outside="closeDropdown"
205
+ v-on-click-outside="closeDropdown"
206
+ class="tw-flex tw-flex-col tw-box-border tw-max-h-[300px] tw-h-auto tw-z-10 tw-overflow-hidden tw-absolute tw-bg-[color:var(--select-background-color)] tw-border tw-border-solid tw-border-[color:var(--select-border-color)] tw-border-t-[color:var(--select-background-color)] tw-rounded-b-[var(--select-border-radius)] tw-p-2"
207
207
  :style="dropdownStyle"
208
208
  >
209
209
  <input
@@ -214,8 +214,8 @@
214
214
  />
215
215
 
216
216
  <VcContainer
217
- :no-padding="true"
218
217
  ref="root"
218
+ :no-padding="true"
219
219
  >
220
220
  <div
221
221
  v-if="!(optionsList && optionsList.length)"
@@ -226,12 +226,12 @@
226
226
  </slot>
227
227
  </div>
228
228
  <div
229
- v-else
230
- class="tw-flex tw-items-center tw-min-h-[36px] tw-my-1 tw-box-border tw-px-2 tw-rounded-[3px] tw-cursor-pointer hover:tw-bg-[#eff7fc]"
231
229
  v-for="(item, i) in optionScope"
230
+ v-else
232
231
  :key="i"
233
- @click="item.toggleOption(item.opt)"
232
+ class="tw-flex tw-items-center tw-min-h-[36px] tw-my-1 tw-box-border tw-px-2 tw-rounded-[3px] tw-cursor-pointer hover:tw-bg-[#eff7fc]"
234
233
  :class="{ 'tw-bg-[#eff7fc]': item.selected }"
234
+ @click="item.toggleOption(item.opt)"
235
235
  >
236
236
  <slot
237
237
  name="option"
@@ -240,8 +240,8 @@
240
240
  >
241
241
  </div>
242
242
  <span
243
- ref="el"
244
243
  v-if="hasNextPage"
244
+ ref="el"
245
245
  ></span>
246
246
  </VcContainer>
247
247
  </div>
@@ -250,153 +250,253 @@
250
250
  </div>
251
251
  </template>
252
252
 
253
- <script lang="ts" setup>
254
- import { ref, computed, watch, toRefs, nextTick } from "vue";
255
- import { clickOutside as vClickOutside } from "./../../../../core/directives";
253
+ <!-- eslint-disable @typescript-eslint/no-explicit-any -->
254
+ <script lang="ts" setup generic="T extends Record<string, any>, P extends {results?: T[]; totalCount?: number }">
255
+ import { ref, computed, watch, toRefs, nextTick, Ref } from "vue";
256
+ import { vOnClickOutside } from "@vueuse/components";
256
257
  import * as _ from "lodash-es";
257
258
  import { useIntersectionObserver } from "@vueuse/core";
258
259
  import { useFloating, UseFloatingReturn, offset, flip, shift, autoUpdate } from "@floating-ui/vue";
259
260
  import { VcLabel, VcContainer, VcHint, VcIcon } from "./../../";
260
261
 
261
- export type OptionProp = ((option: string | Record<string, unknown>) => string) | string | undefined;
262
+ export type OptionProp<T> = ((option: T) => string) | string | undefined;
262
263
 
263
- export interface Props {
264
- /**
265
- * Name of select
266
- */
267
- name?: string;
268
- /**
269
- * Model of the component; Must be Array if using 'multiple' prop; Use this property with a listener for 'update:modelValue' event OR use v-model directive
270
- */
271
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
272
- modelValue?: any;
273
- /**
274
- * Try to map labels of model from 'options' Array; If you are using emit-value you will probably need to use map-options to display the label text in the select field rather than the value;
275
- * Default value: true
276
- */
277
- mapOptions?: boolean;
278
- /**
279
- * Does field have validation errors?
280
- */
281
- error?: boolean;
282
- /**
283
- * Validation error message (gets displayed only if 'error' is set to 'true')
284
- */
285
- errorMessage?: string;
286
- /**
287
- * Select label
288
- */
289
- label?: string;
290
- /**
291
- * Select description (hint) text below input component
292
- */
293
- hint?: string;
294
- /**
295
- * Prefix
296
- */
297
- prefix?: string;
298
- /**
299
- * Suffix
300
- */
301
- suffix?: string;
302
- /**
303
- * Signals the user a process is in progress by displaying a spinner
304
- */
305
- loading?: boolean;
306
- /**
307
- * Appends clearable icon when a value is set;
308
- * When clicked, model becomes null
309
- */
310
- clearable?: boolean;
311
- /**
312
- * Put component in disabled mode
313
- */
314
- disabled?: boolean;
315
- /**
316
- * Allow multiple selection; Model must be Array
317
- */
318
- multiple?: boolean;
319
- /**
320
- * Available options that the user can select from.
321
- * Default value: []
322
- */
323
- options?:
324
- | ((
325
- keyword?: string,
326
- skip?: number,
327
- ids?: string[]
328
- ) => Promise<{
329
- results?: object[];
330
- totalCount?: number;
331
- }>)
332
- | unknown[];
264
+ type FloatingInstanceType = UseFloatingReturn & {
265
+ middlewareData: {
266
+ sameWidthChangeBorders: {
267
+ borderTop?: string;
268
+ borderBottom?: string;
269
+ borderRadius?: string;
270
+ width?: string;
271
+ };
272
+ };
273
+ };
274
+
275
+ type Option = T | P["results"][number];
276
+
277
+ defineSlots<{
333
278
  /**
334
- * Property of option which holds the 'value'
335
- * Default value: id
336
- * @param option The current option being processed
337
- * @returns Value of the current option
279
+ * Custom select control
338
280
  */
339
- optionValue?: OptionProp;
281
+ control: (scope: { toggleHandler: () => void }) => any;
340
282
  /**
341
- * Property of option which holds the 'label'
342
- * Default value: title
343
- * @param option The current option being processed
344
- * @returns Label of the current option
283
+ * Prepend inner field
345
284
  */
346
- optionLabel?: OptionProp;
285
+ "prepend-inner": (props: any) => any;
347
286
  /**
348
- * @requires optionValue
349
- * @description Similar to optionValue, but used only for displaying selection result in rare cases. **Can't be used without optionValue**
350
- *
351
- * Property of option which holds the 'value'
352
- * Default value: id
353
- * @param option The current option being processed
354
- * @returns Value of the current option
287
+ * Append to inner field
355
288
  */
356
- displayValue?: OptionProp;
289
+ "append-inner": (props: any) => any;
357
290
  /**
358
- * @requires optionLabel
359
- * @description Similar to optionValue, but used only for displaying selection result in rare cases. **Can't be used without optionLabel**
360
- *
361
- * Property of option which holds the 'label'
362
- * Default value: title
363
- * @param option The current option being processed
364
- * @returns Label of the current option
291
+ * Prepend outer field
365
292
  */
366
- displayLabel?: OptionProp;
293
+ prepend: (props: any) => any;
367
294
  /**
368
- * Update model with the value of the selected option instead of the whole option
295
+ * Append outer field
369
296
  */
370
- emitValue?: boolean;
297
+ append: (props: any) => any;
371
298
  /**
372
- * Debounce the search input update with an amount of milliseconds
373
- * Default value: 500
299
+ * What should the menu display after filtering options and none are left to be displayed
300
+ * @param scope
374
301
  */
375
- debounce?: number | string;
302
+ "no-option": (props: any) => any;
376
303
  /**
377
- * Input placeholder text
304
+ * Slot for errors
378
305
  */
379
- placeholder?: string;
306
+ error: (props: any) => any;
380
307
  /**
381
- * Input tooltip information
308
+ * Slot for hint text
382
309
  */
383
- tooltip?: string;
310
+ hint: (props: any) => any;
384
311
  /**
385
- * Input required state
312
+ * Override default selection slot
313
+ * @param scope
386
314
  */
387
- required?: boolean;
315
+ "selected-item": (scope: {
316
+ /**
317
+ * Selection index
318
+ */
319
+ index: number;
320
+ /**
321
+ * Selected option -- its value is taken from model
322
+ */
323
+ opt: Option;
324
+ /**
325
+ * Always true -- passed as prop
326
+ */
327
+ selected: boolean;
328
+ /**
329
+ * Remove selected option located at specific index
330
+ * @param index Index at which to remove selection
331
+ */
332
+ removeAtIndex: (index: number) => void;
333
+ }) => any;
388
334
  /**
389
- * Input search activation
335
+ * Override default selection slot;
390
336
  */
391
- searchable?: boolean;
392
- }
337
+ option: (scope: {
338
+ /**
339
+ * Option index
340
+ */
341
+ index: number;
342
+ /**
343
+ * Option -- its value is taken from 'options' prop
344
+ */
345
+ opt: Option;
346
+ /**
347
+ * Is option selected
348
+ */
349
+ selected: boolean;
350
+ /**
351
+ * Add/remove option from model
352
+ * @param opt Option to add to model
353
+ */
354
+ toggleOption: (opt: any) => void;
355
+ }) => any;
356
+ }>();
357
+
358
+ const props = withDefaults(
359
+ defineProps<{
360
+ /**
361
+ * Name of select
362
+ */
363
+ name?: string;
364
+ /**
365
+ * Model of the component; Must be Array if using 'multiple' prop; Use this property with a listener for 'update:modelValue' event OR use v-model directive
366
+ */
367
+
368
+ modelValue?: any;
369
+ /**
370
+ * Try to map labels of model from 'options' Array; If you are using emit-value you will probably need to use map-options to display the label text in the select field rather than the value;
371
+ * Default value: true
372
+ */
373
+ mapOptions?: boolean;
374
+ /**
375
+ * Does field have validation errors?
376
+ */
377
+ error?: boolean;
378
+ /**
379
+ * Validation error message (gets displayed only if 'error' is set to 'true')
380
+ */
381
+ errorMessage?: string;
382
+ /**
383
+ * Select label
384
+ */
385
+ label?: string;
386
+ /**
387
+ * Select description (hint) text below input component
388
+ */
389
+ hint?: string;
390
+ /**
391
+ * Prefix
392
+ */
393
+ prefix?: string;
394
+ /**
395
+ * Suffix
396
+ */
397
+ suffix?: string;
398
+ /**
399
+ * Signals the user a process is in progress by displaying a spinner
400
+ */
401
+ loading?: boolean;
402
+ /**
403
+ * Appends clearable icon when a value is set;
404
+ * When clicked, model becomes null
405
+ */
406
+ clearable?: boolean;
407
+ /**
408
+ * Put component in disabled mode
409
+ */
410
+ disabled?: boolean;
411
+ /**
412
+ * Allow multiple selection; Model must be Array
413
+ */
414
+ multiple?: boolean;
415
+ /**
416
+ * Available options that the user can select from.
417
+ * Default value: []
418
+ */
419
+ options?: ((keyword?: string, skip?: number, ids?: string[]) => Promise<P>) | T[];
420
+ /**
421
+ * Property of option which holds the 'value'
422
+ * Default value: id
423
+ * @param option The current option being processed
424
+ * @returns Value of the current option
425
+ */
426
+ optionValue?: OptionProp<Option>;
427
+ /**
428
+ * Property of option which holds the 'label'
429
+ * Default value: title
430
+ * @param option The current option being processed
431
+ * @returns Label of the current option
432
+ */
433
+ optionLabel?: OptionProp<Option>;
434
+ /**
435
+ * @requires optionValue
436
+ * @description Similar to optionValue, but used only for displaying selection result in rare cases. **Can't be used without optionValue**
437
+ *
438
+ * Property of option which holds the 'value'
439
+ * Default value: id
440
+ * @param option The current option being processed
441
+ * @returns Value of the current option
442
+ */
443
+ displayValue?: OptionProp<Option>;
444
+ /**
445
+ * @requires optionLabel
446
+ * @description Similar to optionValue, but used only for displaying selection result in rare cases. **Can't be used without optionLabel**
447
+ *
448
+ * Property of option which holds the 'label'
449
+ * Default value: title
450
+ * @param option The current option being processed
451
+ * @returns Label of the current option
452
+ */
453
+ displayLabel?: OptionProp<Option>;
454
+ /**
455
+ * Update model with the value of the selected option instead of the whole option
456
+ */
457
+ emitValue?: boolean;
458
+ /**
459
+ * Debounce the search input update with an amount of milliseconds
460
+ * Default value: 500
461
+ */
462
+ debounce?: number | string;
463
+ /**
464
+ * Input placeholder text
465
+ */
466
+ placeholder?: string;
467
+ /**
468
+ * Input tooltip information
469
+ */
470
+ tooltip?: string;
471
+ /**
472
+ * Input required state
473
+ */
474
+ required?: boolean;
475
+ /**
476
+ * Input search activation
477
+ */
478
+ searchable?: boolean;
479
+ }>(),
480
+ {
481
+ optionValue: "id",
482
+ optionLabel: "title",
483
+ debounce: 500,
484
+ clearable: true,
485
+ name: "Field",
486
+ autofocus: true,
487
+ emitValue: true,
488
+ mapOptions: true,
489
+ placeholder: "Click to select...",
490
+ options: () => [],
491
+ }
492
+ );
393
493
 
394
- export interface Emits {
494
+ const emit = defineEmits<{
395
495
  /**
396
496
  * Emitted when the component needs to change the model; Is also used by v-model
397
497
  */
398
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
399
- (event: "update:modelValue", inputValue: any): void;
498
+
499
+ (event: "update:modelValue", inputValue: Option | string | (Option | string)[]): void;
400
500
  /**
401
501
  * Emitted when user wants to filter a value
402
502
  */
@@ -405,33 +505,7 @@ export interface Emits {
405
505
  * Emitted when the select options list is hidden
406
506
  */
407
507
  (event: "close"): void;
408
- }
409
-
410
- type FloatingInstanceType = UseFloatingReturn & {
411
- middlewareData: {
412
- sameWidthChangeBorders: {
413
- borderTop?: string;
414
- borderBottom?: string;
415
- borderRadius?: string;
416
- width?: string;
417
- };
418
- };
419
- };
420
-
421
- const props = withDefaults(defineProps<Props>(), {
422
- optionValue: "id",
423
- optionLabel: "title",
424
- debounce: 500,
425
- clearable: true,
426
- name: "Field",
427
- autofocus: true,
428
- emitValue: true,
429
- mapOptions: true,
430
- placeholder: "Click to select...",
431
- options: () => [],
432
- });
433
-
434
- const emit = defineEmits<Emits>();
508
+ }>();
435
509
 
436
510
  const { modelValue, options } = toRefs(props);
437
511
 
@@ -446,19 +520,17 @@ const listLoading = ref(false);
446
520
 
447
521
  const filterString = ref();
448
522
 
449
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
450
- const defaultValue = ref<any[]>([]);
523
+ const defaultValue = ref<Option[]>([]) as Ref<Option[]>;
524
+
525
+ const optionsList = ref<Option[]>([]) as Ref<Option[]>;
451
526
 
452
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
453
- const optionsList = ref<any[]>([]);
454
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
455
- const optionsTemp = ref<any[]>([]);
527
+ const optionsTemp = ref<Option[]>([]) as Ref<Option[]>;
456
528
 
457
529
  const totalItems = ref();
458
530
 
459
531
  let emitValueFn;
460
532
  let emitTimer;
461
- let innerValueCache: Record<string, unknown>[] | string[];
533
+ let innerValueCache: Option[];
462
534
 
463
535
  useIntersectionObserver(
464
536
  el,
@@ -504,9 +576,7 @@ watch(
504
576
  undefined,
505
577
  Array.isArray(props.modelValue) ? props.modelValue : [props.modelValue]
506
578
  );
507
- defaultValue.value = data.results?.filter(
508
- (x) => x[props.optionValue as string] === props.modelValue
509
- ) as unknown[];
579
+ defaultValue.value = data.results?.filter((x) => x[props.optionValue as string] === props.modelValue);
510
580
  } else if (props.options && Array.isArray(props.options)) {
511
581
  defaultValue.value = props.options.filter((x) => x[props.optionValue as string] === props.modelValue);
512
582
  }
@@ -523,7 +593,7 @@ watch(
523
593
  try {
524
594
  listLoading.value = true;
525
595
  const data = await props.options();
526
- optionsList.value = data.results as unknown[];
596
+ optionsList.value = data.results;
527
597
  totalItems.value = data.totalCount;
528
598
  } finally {
529
599
  listLoading.value = false;
@@ -557,7 +627,7 @@ async function onLoadMore() {
557
627
  try {
558
628
  listLoading.value = true;
559
629
  const data = await props.options(filterString.value, optionsList.value.length);
560
- optionsList.value.push(...(data.results as unknown[]));
630
+ optionsList.value.push(...data.results);
561
631
  } finally {
562
632
  listLoading.value = false;
563
633
  }
@@ -576,10 +646,10 @@ const getDisplayValue = computed(() => getPropValueFn(props.displayValue, "id"))
576
646
 
577
647
  const getDisplayLabel = computed(() => getPropValueFn(props.displayLabel, "title"));
578
648
 
579
- const innerValue = computed((): Record<string, unknown>[] | string[] => {
649
+ const innerValue = computed((): Option[] => {
580
650
  const mapNull = props.mapOptions === true && props.multiple !== true;
581
651
 
582
- const val: Record<string, unknown>[] | string[] =
652
+ const val =
583
653
  props.modelValue !== undefined && (props.modelValue !== null || mapNull === true)
584
654
  ? props.multiple === true && Array.isArray(props.modelValue)
585
655
  ? props.modelValue
@@ -605,15 +675,23 @@ watch(
605
675
  { immediate: true }
606
676
  );
607
677
 
608
- const selectedScope = computed(() => {
609
- return innerValue.value.map((opt, i) => ({
610
- index: i,
611
- opt,
612
- selected: true,
613
- toggleOption,
614
- removeAtIndex,
615
- }));
616
- });
678
+ const selectedScope = computed(
679
+ (): {
680
+ index: number;
681
+ opt: Option;
682
+ selected: boolean;
683
+ toggleOption: (opt: Option) => void;
684
+ removeAtIndex: (index: number) => void;
685
+ }[] => {
686
+ return innerValue.value.map((opt: Option, i: number) => ({
687
+ index: i,
688
+ opt,
689
+ selected: true,
690
+ toggleOption,
691
+ removeAtIndex,
692
+ }));
693
+ }
694
+ );
617
695
 
618
696
  const hasValue = computed(() => fieldValueIsFilled(innerValue.value));
619
697
 
@@ -641,24 +719,24 @@ const dropdownStyle = computed(() => {
641
719
  };
642
720
  });
643
721
 
644
- function getPropValueFn(propValue: OptionProp, defaultVal: OptionProp) {
722
+ function getPropValueFn(propValue: OptionProp<Option>, defaultVal: OptionProp<Option>): (opt: Option) => string {
645
723
  const val = propValue !== undefined ? propValue : defaultVal;
646
724
 
647
725
  return typeof val === "function"
648
726
  ? val
649
- : (opt) => (opt !== null && typeof opt === "object" && (val as string) in opt ? opt[val as string] : opt);
727
+ : (opt: Option) => (opt !== null && typeof opt === "object" && val in opt ? opt[val] : opt);
650
728
  }
651
729
 
652
- function getOption(value: Record<string, unknown> | string, valueCache: Array<Record<string, unknown> | string>) {
730
+ function getOption(value: Option, valueCache: Option[]) {
653
731
  const fn = (opt) => _.isEqual(getOptionValue.value(opt), value) || _.isEqual(getDisplayValue.value(opt), value);
654
732
  return defaultValue.value.find(fn) || optionsList.value.find(fn) || valueCache.find(fn) || value;
655
733
  }
656
734
 
657
- function fieldValueIsFilled(val: Record<string, unknown>[] | unknown[]) {
735
+ function fieldValueIsFilled(val: Option[]) {
658
736
  return val !== undefined && val !== null && ("" + val).length > 0;
659
737
  }
660
738
 
661
- function getEmittingOptionValue(opt: Record<string, unknown>) {
739
+ function getEmittingOptionValue(opt: Option) {
662
740
  return props.emitValue === true ? getOptionLabel.value(opt) : getOptionValue.value(opt);
663
741
  }
664
742
 
@@ -674,7 +752,7 @@ function removeAtIndex(index: number) {
674
752
  }
675
753
  }
676
754
 
677
- function isOptionSelected(opt: Record<string, unknown>) {
755
+ function isOptionSelected(opt: Option) {
678
756
  const val = getOptionValue.value(opt) || getDisplayValue.value(opt);
679
757
 
680
758
  return innerOptionsValue.value.find((v) => _.isEqual(v, val)) !== void 0;
@@ -689,9 +767,9 @@ function closeDropdown() {
689
767
 
690
768
  const onDropdownClose = async () => {
691
769
  if (props.options && typeof props.options === "function") {
692
- optionsList.value = (await props.options()).results as unknown[];
770
+ optionsList.value = (await props.options()).results as Option[];
693
771
  } else {
694
- optionsList.value = props.options as Record<string, unknown>[];
772
+ optionsList.value = props.options as Option[];
695
773
  }
696
774
 
697
775
  filterString.value = undefined;
@@ -744,7 +822,7 @@ function sameWidthChangeBorders() {
744
822
  };
745
823
  }
746
824
 
747
- function toggleOption(opt: { [x: string]: string }) {
825
+ function toggleOption(opt: Option) {
748
826
  if (opt === void 0) {
749
827
  return;
750
828
  }
@@ -787,13 +865,13 @@ async function onSearch(value: string) {
787
865
  if (props.options && typeof props.options === "function") {
788
866
  try {
789
867
  listLoading.value = true;
790
- optionsTemp.value = (await props.options(filterString.value)).results as unknown[];
868
+ optionsTemp.value = (await props.options(filterString.value)).results as Option[];
791
869
  } finally {
792
870
  listLoading.value = false;
793
871
  }
794
872
  } else {
795
873
  optionsTemp.value = optionsList.value.filter((x) => {
796
- return x[props.optionLabel as string].toLowerCase().includes(filterString.value.toLowerCase());
874
+ return x[getOptionLabel.value(x)].toLowerCase().includes(filterString.value.toLowerCase());
797
875
  });
798
876
  }
799
877
  }