@vc-shell/framework 1.0.52 → 1.0.54

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 (390) hide show
  1. package/core/composables/index.ts +0 -1
  2. package/core/composables/useApiClient/index.ts +9 -4
  3. package/core/composables/useAsync/index.ts +2 -6
  4. package/core/composables/useAutosave/index.ts +1 -3
  5. package/core/composables/useFunctions/debounce.ts +1 -4
  6. package/core/composables/useFunctions/delay.ts +1 -4
  7. package/core/composables/useFunctions/once.ts +1 -3
  8. package/core/composables/useFunctions/throttle.ts +1 -4
  9. package/core/composables/useI18n/index.ts +3 -24
  10. package/core/composables/useLoading/index.ts +1 -3
  11. package/core/composables/useNotifications/index.ts +6 -13
  12. package/core/composables/usePermissions/index.ts +1 -1
  13. package/core/composables/useSettings/index.ts +3 -4
  14. package/core/composables/useUser/index.ts +27 -66
  15. package/core/directives/permissions/index.ts +1 -1
  16. package/core/plugins/i18n/index.ts +8 -0
  17. package/core/plugins/index.ts +3 -1
  18. package/core/plugins/modularity/index.ts +32 -0
  19. package/core/plugins/moment/humanize.ts +1 -4
  20. package/core/plugins/validation/index.ts +11 -1
  21. package/core/plugins/validation/rules.ts +48 -170
  22. package/core/types/index.ts +7 -9
  23. package/dist/core/composables/index.d.ts +0 -1
  24. package/dist/core/composables/index.d.ts.map +1 -1
  25. package/dist/core/composables/useApiClient/index.d.ts +9 -3
  26. package/dist/core/composables/useApiClient/index.d.ts.map +1 -1
  27. package/dist/core/composables/useAsync/index.d.ts.map +1 -1
  28. package/dist/core/composables/useAutosave/index.d.ts.map +1 -1
  29. package/dist/core/composables/useFunctions/debounce.d.ts.map +1 -1
  30. package/dist/core/composables/useFunctions/delay.d.ts.map +1 -1
  31. package/dist/core/composables/useFunctions/once.d.ts.map +1 -1
  32. package/dist/core/composables/useFunctions/throttle.d.ts.map +1 -1
  33. package/dist/core/composables/useI18n/index.d.ts +2 -4
  34. package/dist/core/composables/useI18n/index.d.ts.map +1 -1
  35. package/dist/core/composables/useLoading/index.d.ts.map +1 -1
  36. package/dist/core/composables/useNotifications/index.d.ts +1 -1
  37. package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
  38. package/dist/core/composables/useSettings/index.d.ts.map +1 -1
  39. package/dist/core/composables/useUser/index.d.ts +2 -2
  40. package/dist/core/composables/useUser/index.d.ts.map +1 -1
  41. package/dist/core/plugins/i18n/index.d.ts +3 -0
  42. package/dist/core/plugins/i18n/index.d.ts.map +1 -0
  43. package/dist/core/plugins/index.d.ts +3 -1
  44. package/dist/core/plugins/index.d.ts.map +1 -1
  45. package/dist/core/plugins/modularity/index.d.ts +8 -0
  46. package/dist/core/plugins/modularity/index.d.ts.map +1 -0
  47. package/dist/core/plugins/moment/humanize.d.ts.map +1 -1
  48. package/dist/core/plugins/validation/index.d.ts +3 -1
  49. package/dist/core/plugins/validation/index.d.ts.map +1 -1
  50. package/dist/core/plugins/validation/rules.d.ts +32 -11
  51. package/dist/core/plugins/validation/rules.d.ts.map +1 -1
  52. package/dist/core/types/index.d.ts +5 -6
  53. package/dist/core/types/index.d.ts.map +1 -1
  54. package/dist/framework.esm.js +42553 -0
  55. package/dist/framework.js +74 -72
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/shared/app-switcher/composables/useAppSwitcher/index.d.ts +1 -1
  58. package/dist/shared/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
  59. package/dist/shared/app-switcher/index.d.ts +2 -3
  60. package/dist/shared/app-switcher/index.d.ts.map +1 -1
  61. package/dist/shared/assets/components/index.d.ts +1 -1
  62. package/dist/shared/assets/components/index.d.ts.map +1 -1
  63. package/dist/shared/assets/index.d.ts +2 -3
  64. package/dist/shared/assets/index.d.ts.map +1 -1
  65. package/dist/shared/blade-navigation/composables/index.d.ts +1 -1
  66. package/dist/shared/blade-navigation/composables/index.d.ts.map +1 -1
  67. package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts +2 -2
  68. package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
  69. package/dist/shared/blade-navigation/index.d.ts +2 -3
  70. package/dist/shared/blade-navigation/index.d.ts.map +1 -1
  71. package/dist/shared/blade-navigation/types/index.d.ts +1 -1
  72. package/dist/shared/blade-navigation/types/index.d.ts.map +1 -1
  73. package/dist/shared/index.d.ts +4 -1
  74. package/dist/shared/index.d.ts.map +1 -1
  75. package/dist/style.css +1 -1
  76. package/dist/tsconfig.tsbuildinfo +1 -1
  77. package/dist/ui/components/atoms/vc-badge/index.d.ts +3 -3
  78. package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -1
  79. package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts +20 -20
  80. package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts.map +1 -1
  81. package/dist/ui/components/atoms/vc-button/index.d.ts +3 -3
  82. package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -1
  83. package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts +30 -24
  84. package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts.map +1 -1
  85. package/dist/ui/components/atoms/vc-card/index.d.ts +5 -0
  86. package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -0
  87. package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts +33 -0
  88. package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts.map +1 -0
  89. package/dist/ui/components/atoms/vc-checkbox/index.d.ts +5 -0
  90. package/dist/ui/components/atoms/vc-checkbox/index.d.ts.map +1 -0
  91. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts +31 -0
  92. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts.map +1 -0
  93. package/dist/ui/components/atoms/vc-col/index.d.ts +5 -0
  94. package/dist/ui/components/atoms/vc-col/index.d.ts.map +1 -0
  95. package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts +13 -0
  96. package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts.map +1 -0
  97. package/dist/ui/components/atoms/vc-container/index.d.ts +5 -0
  98. package/dist/ui/components/atoms/vc-container/index.d.ts.map +1 -0
  99. package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts +25 -0
  100. package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts.map +1 -0
  101. package/dist/ui/components/atoms/vc-hint/index.d.ts +2 -0
  102. package/dist/ui/components/atoms/vc-hint/index.d.ts.map +1 -0
  103. package/dist/ui/components/atoms/vc-hint/vc-hint-model.d.ts +5 -0
  104. package/dist/ui/components/atoms/vc-hint/vc-hint-model.d.ts.map +1 -0
  105. package/dist/ui/components/atoms/vc-icon/index.d.ts +5 -0
  106. package/dist/ui/components/atoms/vc-icon/index.d.ts.map +1 -0
  107. package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts +17 -0
  108. package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts.map +1 -0
  109. package/dist/ui/components/atoms/vc-image/index.d.ts +5 -0
  110. package/dist/ui/components/atoms/vc-image/index.d.ts.map +1 -0
  111. package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts +38 -0
  112. package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts.map +1 -0
  113. package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts.map +1 -1
  114. package/dist/ui/components/atoms/vc-info-row/index.d.ts +5 -0
  115. package/dist/ui/components/atoms/vc-info-row/index.d.ts.map +1 -0
  116. package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts +25 -0
  117. package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts.map +1 -0
  118. package/dist/ui/components/atoms/vc-label/index.d.ts +5 -0
  119. package/dist/ui/components/atoms/vc-label/index.d.ts.map +1 -0
  120. package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts +18 -0
  121. package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts.map +1 -0
  122. package/dist/ui/components/atoms/vc-link/index.d.ts +5 -0
  123. package/dist/ui/components/atoms/vc-link/index.d.ts.map +1 -0
  124. package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts +21 -0
  125. package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts.map +1 -0
  126. package/dist/ui/components/atoms/vc-loading/index.d.ts +5 -0
  127. package/dist/ui/components/atoms/vc-loading/index.d.ts.map +1 -0
  128. package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts +13 -0
  129. package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts.map +1 -0
  130. package/dist/ui/components/atoms/vc-progress/index.d.ts +5 -0
  131. package/dist/ui/components/atoms/vc-progress/index.d.ts.map +1 -0
  132. package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts +17 -0
  133. package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts.map +1 -0
  134. package/dist/ui/components/atoms/vc-row/index.d.ts +2 -0
  135. package/dist/ui/components/atoms/vc-row/index.d.ts.map +1 -0
  136. package/dist/ui/components/atoms/vc-row/vc-row-model.d.ts +5 -0
  137. package/dist/ui/components/atoms/vc-row/vc-row-model.d.ts.map +1 -0
  138. package/dist/ui/components/atoms/vc-status/index.d.ts +5 -0
  139. package/dist/ui/components/atoms/vc-status/index.d.ts.map +1 -0
  140. package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts +21 -0
  141. package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts.map +1 -0
  142. package/dist/ui/components/atoms/vc-status-icon/index.d.ts +5 -0
  143. package/dist/ui/components/atoms/vc-status-icon/index.d.ts.map +1 -0
  144. package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts +13 -0
  145. package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts.map +1 -0
  146. package/dist/ui/components/atoms/vc-switch/index.d.ts +5 -0
  147. package/dist/ui/components/atoms/vc-switch/index.d.ts.map +1 -0
  148. package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts +30 -0
  149. package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts.map +1 -0
  150. package/dist/ui/components/atoms/vc-widget/index.d.ts +5 -0
  151. package/dist/ui/components/atoms/vc-widget/index.d.ts.map +1 -0
  152. package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts +20 -0
  153. package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts.map +1 -0
  154. package/dist/ui/components/index.d.ts +34 -34
  155. package/dist/ui/components/index.d.ts.map +1 -1
  156. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts +5 -0
  157. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts.map +1 -0
  158. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts +19 -0
  159. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts.map +1 -0
  160. package/dist/ui/components/molecules/vc-editor/index.d.ts +5 -0
  161. package/dist/ui/components/molecules/vc-editor/index.d.ts.map +1 -0
  162. package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts +33 -0
  163. package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts.map +1 -0
  164. package/dist/ui/components/molecules/vc-file-upload/index.d.ts +5 -0
  165. package/dist/ui/components/molecules/vc-file-upload/index.d.ts.map +1 -0
  166. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts +34 -0
  167. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts.map +1 -0
  168. package/dist/ui/components/molecules/vc-form/index.d.ts +2 -0
  169. package/dist/ui/components/molecules/vc-form/index.d.ts.map +1 -0
  170. package/dist/ui/components/molecules/vc-form/vc-form-model.d.ts +5 -0
  171. package/dist/ui/components/molecules/vc-form/vc-form-model.d.ts.map +1 -0
  172. package/dist/ui/components/molecules/vc-input/index.d.ts +3 -3
  173. package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -1
  174. package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts +48 -25
  175. package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts.map +1 -1
  176. package/dist/ui/components/molecules/vc-input-currency/index.d.ts +3 -3
  177. package/dist/ui/components/molecules/vc-input-currency/index.d.ts.map +1 -1
  178. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts +36 -28
  179. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts.map +1 -1
  180. package/dist/ui/components/molecules/vc-notification/index.d.ts +5 -0
  181. package/dist/ui/components/molecules/vc-notification/index.d.ts.map +1 -0
  182. package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts +18 -0
  183. package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts.map +1 -0
  184. package/dist/ui/components/molecules/vc-pagination/index.d.ts +5 -0
  185. package/dist/ui/components/molecules/vc-pagination/index.d.ts.map +1 -0
  186. package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts +25 -0
  187. package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts.map +1 -0
  188. package/dist/ui/components/molecules/vc-rating/index.d.ts +5 -0
  189. package/dist/ui/components/molecules/vc-rating/index.d.ts.map +1 -0
  190. package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts +21 -0
  191. package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts.map +1 -0
  192. package/dist/ui/components/molecules/vc-select/index.d.ts +3 -3
  193. package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -1
  194. package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts +67 -32
  195. package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts.map +1 -1
  196. package/dist/ui/components/molecules/vc-slider/index.d.ts +5 -0
  197. package/dist/ui/components/molecules/vc-slider/index.d.ts.map +1 -0
  198. package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts +33 -0
  199. package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts.map +1 -0
  200. package/dist/ui/components/molecules/vc-textarea/index.d.ts +5 -0
  201. package/dist/ui/components/molecules/vc-textarea/index.d.ts.map +1 -0
  202. package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts +37 -0
  203. package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts.map +1 -0
  204. package/dist/ui/components/organisms/vc-app/index.d.ts +5 -0
  205. package/dist/ui/components/organisms/vc-app/index.d.ts.map +1 -0
  206. package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts +61 -0
  207. package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts.map +1 -0
  208. package/dist/ui/components/organisms/vc-blade/index.d.ts +5 -0
  209. package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -0
  210. package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts +34 -0
  211. package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts.map +1 -0
  212. package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -1
  213. package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts +5 -0
  214. package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts.map +1 -0
  215. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts +43 -0
  216. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts.map +1 -0
  217. package/dist/ui/components/organisms/vc-gallery/index.d.ts +5 -0
  218. package/dist/ui/components/organisms/vc-gallery/index.d.ts.map +1 -0
  219. package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts +74 -0
  220. package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts.map +1 -0
  221. package/dist/ui/components/organisms/vc-login-form/index.d.ts +5 -0
  222. package/dist/ui/components/organisms/vc-login-form/index.d.ts.map +1 -0
  223. package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts +15 -0
  224. package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts.map +1 -0
  225. package/dist/ui/components/organisms/vc-popup/index.d.ts +5 -0
  226. package/dist/ui/components/organisms/vc-popup/index.d.ts.map +1 -0
  227. package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts +22 -0
  228. package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts.map +1 -0
  229. package/dist/ui/components/organisms/vc-table/index.d.ts +5 -0
  230. package/dist/ui/components/organisms/vc-table/index.d.ts.map +1 -0
  231. package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts +135 -0
  232. package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts.map +1 -0
  233. package/dist/ui/types/index.d.ts +76 -6
  234. package/dist/ui/types/index.d.ts.map +1 -1
  235. package/dist/ui/types/ts-helpers.d.ts +14 -4
  236. package/dist/ui/types/ts-helpers.d.ts.map +1 -1
  237. package/dist/ui/utils/index.d.ts +2 -0
  238. package/dist/ui/utils/index.d.ts.map +1 -0
  239. package/dist/ui/utils/types.d.ts +3 -0
  240. package/dist/ui/utils/types.d.ts.map +1 -0
  241. package/dist/vite.config.d.ts +1 -1
  242. package/dist/vite.config.d.ts.map +1 -1
  243. package/package.json +9 -11
  244. package/shared/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +3 -6
  245. package/shared/app-switcher/composables/useAppSwitcher/index.ts +3 -8
  246. package/shared/app-switcher/index.ts +3 -10
  247. package/shared/assets/components/assets-details/assets-details.vue +10 -31
  248. package/shared/assets/components/index.ts +1 -1
  249. package/shared/assets/index.ts +3 -15
  250. package/shared/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +2 -7
  251. package/shared/blade-navigation/composables/index.ts +1 -1
  252. package/shared/blade-navigation/composables/useBladeNavigation/index.ts +8 -37
  253. package/shared/blade-navigation/index.ts +3 -10
  254. package/shared/blade-navigation/types/index.ts +1 -1
  255. package/shared/index.ts +9 -11
  256. package/ui/components/atoms/vc-badge/index.ts +5 -5
  257. package/ui/components/atoms/vc-badge/vc-badge-model.ts +21 -20
  258. package/ui/components/atoms/vc-badge/vc-badge.vue +5 -11
  259. package/ui/components/atoms/vc-button/index.ts +5 -5
  260. package/ui/components/atoms/vc-button/vc-button-model.ts +31 -24
  261. package/ui/components/atoms/vc-button/vc-button.vue +9 -38
  262. package/ui/components/atoms/vc-card/index.ts +6 -0
  263. package/ui/components/atoms/vc-card/vc-card-model.ts +37 -0
  264. package/ui/components/atoms/vc-card/vc-card.vue +20 -36
  265. package/ui/components/atoms/vc-checkbox/index.ts +8 -0
  266. package/ui/components/atoms/vc-checkbox/vc-checkbox-model.ts +35 -0
  267. package/ui/components/atoms/vc-checkbox/vc-checkbox.vue +15 -30
  268. package/ui/components/atoms/vc-col/index.ts +5 -0
  269. package/ui/components/atoms/vc-col/vc-col-model.ts +15 -0
  270. package/ui/components/atoms/vc-col/vc-col.vue +2 -6
  271. package/ui/components/atoms/vc-container/index.ts +8 -0
  272. package/ui/components/atoms/vc-container/vc-container-model.ts +28 -0
  273. package/ui/components/atoms/vc-container/vc-container.vue +11 -26
  274. package/ui/components/atoms/vc-hint/index.ts +2 -0
  275. package/ui/components/atoms/vc-hint/vc-hint-model.ts +5 -0
  276. package/ui/components/atoms/vc-icon/index.ts +5 -0
  277. package/ui/components/atoms/vc-icon/vc-icon-model.ts +19 -0
  278. package/ui/components/atoms/vc-icon/vc-icon.vue +2 -8
  279. package/ui/components/atoms/vc-image/index.ts +7 -0
  280. package/ui/components/atoms/vc-image/vc-image-model.ts +41 -0
  281. package/ui/components/atoms/vc-image/vc-image.stories.ts +1 -2
  282. package/ui/components/atoms/vc-image/vc-image.vue +12 -42
  283. package/ui/components/atoms/vc-info-row/index.ts +5 -0
  284. package/ui/components/atoms/vc-info-row/vc-info-row-model.ts +27 -0
  285. package/ui/components/atoms/vc-info-row/vc-info-row.vue +14 -24
  286. package/ui/components/atoms/vc-label/index.ts +5 -0
  287. package/ui/components/atoms/vc-label/vc-label-model.ts +20 -0
  288. package/ui/components/atoms/vc-label/vc-label.vue +11 -15
  289. package/ui/components/atoms/vc-link/index.ts +6 -0
  290. package/ui/components/atoms/vc-link/vc-link-model.ts +24 -0
  291. package/ui/components/atoms/vc-link/vc-link.vue +4 -11
  292. package/ui/components/atoms/vc-loading/index.ts +5 -0
  293. package/ui/components/atoms/vc-loading/vc-loading-model.ts +15 -0
  294. package/ui/components/atoms/vc-loading/vc-loading.vue +5 -11
  295. package/ui/components/atoms/vc-progress/index.ts +5 -0
  296. package/ui/components/atoms/vc-progress/vc-progress-model.ts +19 -0
  297. package/ui/components/atoms/vc-progress/vc-progress.vue +5 -20
  298. package/ui/components/atoms/vc-row/index.ts +2 -0
  299. package/ui/components/atoms/vc-row/vc-row-model.ts +5 -0
  300. package/ui/components/atoms/vc-status/index.ts +5 -0
  301. package/ui/components/atoms/vc-status/vc-status-model.ts +23 -0
  302. package/ui/components/atoms/vc-status/vc-status.vue +3 -21
  303. package/ui/components/atoms/vc-status-icon/index.ts +5 -0
  304. package/ui/components/atoms/vc-status-icon/vc-status-icon-model.ts +15 -0
  305. package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +11 -9
  306. package/ui/components/atoms/vc-switch/index.ts +7 -0
  307. package/ui/components/atoms/vc-switch/vc-switch-model.ts +34 -0
  308. package/ui/components/atoms/vc-switch/vc-switch.vue +12 -28
  309. package/ui/components/atoms/vc-widget/index.ts +7 -0
  310. package/ui/components/atoms/vc-widget/vc-widget-model.ts +23 -0
  311. package/ui/components/atoms/vc-widget/vc-widget.vue +15 -22
  312. package/ui/components/index.ts +34 -34
  313. package/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +1 -1
  314. package/ui/components/molecules/vc-breadcrumbs/index.ts +5 -0
  315. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.ts +23 -0
  316. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +6 -14
  317. package/ui/components/molecules/vc-editor/index.ts +7 -0
  318. package/ui/components/molecules/vc-editor/vc-editor-model.ts +37 -0
  319. package/ui/components/molecules/vc-editor/vc-editor.vue +25 -56
  320. package/ui/components/molecules/vc-file-upload/index.ts +8 -0
  321. package/ui/components/molecules/vc-file-upload/vc-file-upload-model.ts +37 -0
  322. package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +11 -36
  323. package/ui/components/molecules/vc-form/index.ts +2 -0
  324. package/ui/components/molecules/vc-form/vc-form-model.ts +5 -0
  325. package/ui/components/molecules/vc-input/index.ts +5 -6
  326. package/ui/components/molecules/vc-input/vc-input-model.ts +53 -35
  327. package/ui/components/molecules/vc-input/vc-input.vue +41 -29
  328. package/ui/components/molecules/vc-input-currency/index.ts +4 -3
  329. package/ui/components/molecules/vc-input-currency/vc-input-currency-model.ts +42 -32
  330. package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +12 -7
  331. package/ui/components/molecules/vc-notification/index.ts +8 -0
  332. package/ui/components/molecules/vc-notification/vc-notification-model.ts +21 -0
  333. package/ui/components/molecules/vc-notification/vc-notification.vue +4 -13
  334. package/ui/components/molecules/vc-pagination/index.ts +8 -0
  335. package/ui/components/molecules/vc-pagination/vc-pagination-model.ts +29 -0
  336. package/ui/components/molecules/vc-pagination/vc-pagination.vue +21 -23
  337. package/ui/components/molecules/vc-rating/index.ts +5 -0
  338. package/ui/components/molecules/vc-rating/vc-rating-model.ts +23 -0
  339. package/ui/components/molecules/vc-rating/vc-rating.vue +11 -13
  340. package/ui/components/molecules/vc-select/index.ts +5 -5
  341. package/ui/components/molecules/vc-select/vc-select-model.ts +74 -44
  342. package/ui/components/molecules/vc-select/vc-select.vue +128 -173
  343. package/ui/components/molecules/vc-slider/index.ts +5 -0
  344. package/ui/components/molecules/vc-slider/vc-slider-model.ts +34 -0
  345. package/ui/components/molecules/vc-slider/vc-slider.vue +2 -26
  346. package/ui/components/molecules/vc-textarea/index.ts +8 -0
  347. package/ui/components/molecules/vc-textarea/vc-textarea-model.ts +41 -0
  348. package/ui/components/molecules/vc-textarea/vc-textarea.vue +19 -53
  349. package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +16 -12
  350. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +13 -4
  351. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +18 -15
  352. package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +11 -5
  353. package/ui/components/organisms/vc-app/index.ts +6 -0
  354. package/ui/components/organisms/vc-app/vc-app-model.ts +65 -0
  355. package/ui/components/organisms/vc-app/vc-app.vue +10 -52
  356. package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +40 -40
  357. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +20 -14
  358. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +14 -12
  359. package/ui/components/organisms/vc-blade/index.ts +7 -0
  360. package/ui/components/organisms/vc-blade/vc-blade-model.ts +37 -0
  361. package/ui/components/organisms/vc-blade/vc-blade.stories.ts +1 -2
  362. package/ui/components/organisms/vc-blade/vc-blade.vue +13 -40
  363. package/ui/components/organisms/vc-dynamic-property/index.ts +5 -0
  364. package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.ts +58 -0
  365. package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +101 -125
  366. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +41 -24
  367. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +16 -11
  368. package/ui/components/organisms/vc-gallery/index.ts +8 -0
  369. package/ui/components/organisms/vc-gallery/vc-gallery-model.ts +78 -0
  370. package/ui/components/organisms/vc-gallery/vc-gallery.vue +11 -88
  371. package/ui/components/organisms/vc-login-form/index.ts +5 -0
  372. package/ui/components/organisms/vc-login-form/vc-login-form-model.ts +16 -0
  373. package/ui/components/organisms/vc-login-form/vc-login-form.vue +2 -15
  374. package/ui/components/organisms/vc-popup/index.ts +7 -0
  375. package/ui/components/organisms/vc-popup/vc-popup-model.ts +25 -0
  376. package/ui/components/organisms/vc-popup/vc-popup.vue +7 -18
  377. package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +21 -27
  378. package/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +2 -6
  379. package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +9 -3
  380. package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +31 -43
  381. package/ui/components/organisms/vc-table/index.ts +7 -0
  382. package/ui/components/organisms/vc-table/vc-table-model.ts +116 -0
  383. package/ui/components/organisms/vc-table/vc-table.vue +108 -139
  384. package/ui/types/index.ts +106 -15
  385. package/ui/types/ts-helpers.ts +23 -3
  386. package/ui/utils/index.ts +1 -0
  387. package/ui/utils/types.ts +2 -0
  388. package/core/composables/useLogger/index.ts +0 -24
  389. package/dist/core/composables/useLogger/index.d.ts +0 -5
  390. package/dist/core/composables/useLogger/index.d.ts.map +0 -1
@@ -0,0 +1,116 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { IActionBuilderResult, ITableColumns } from "./../../../../core/types";
3
+ import { PropType, VNode } from "vue";
4
+ import { ExtractTypes } from "./../../../types/ts-helpers";
5
+ import { isNumber, isString, isObject } from "./../../../utils";
6
+
7
+ export interface StatusImage {
8
+ image?: string;
9
+ text: string;
10
+ action?: string;
11
+ clickHandler?: () => void;
12
+ }
13
+
14
+ export const tableProps = {
15
+ columns: { type: Array as PropType<ITableColumns[]>, default: () => [] },
16
+ items: { type: Array as PropType<{ id?: string }[] | any[]>, default: () => [] },
17
+ itemActionBuilder: {
18
+ type: Function as PropType<(item: { id?: string }) => IActionBuilderResult[]>,
19
+ default: undefined,
20
+ },
21
+ sort: {
22
+ type: String,
23
+ default: undefined,
24
+ },
25
+ multiselect: {
26
+ type: Boolean,
27
+ default: false,
28
+ },
29
+ expanded: {
30
+ type: Boolean,
31
+ default: false,
32
+ },
33
+ totalLabel: {
34
+ type: String,
35
+ default: "Totals:",
36
+ },
37
+ totalCount: {
38
+ type: Number,
39
+ default: 0,
40
+ },
41
+ pages: {
42
+ type: Number,
43
+ default: 0,
44
+ },
45
+ currentPage: {
46
+ type: Number,
47
+ default: 0,
48
+ },
49
+ searchPlaceholder: {
50
+ type: String,
51
+ default: "Search...",
52
+ },
53
+ searchValue: {
54
+ type: String,
55
+ default: undefined,
56
+ },
57
+ loading: {
58
+ type: Boolean,
59
+ default: false,
60
+ },
61
+ empty: {
62
+ type: Object as PropType<StatusImage>,
63
+ default: () => ({
64
+ text: "List is empty.",
65
+ }),
66
+ },
67
+ notfound: {
68
+ type: Object as PropType<StatusImage>,
69
+ default: () => ({
70
+ text: "Nothing found.",
71
+ }),
72
+ },
73
+ header: {
74
+ type: Boolean,
75
+ default: true,
76
+ },
77
+ footer: {
78
+ type: Boolean,
79
+ default: true,
80
+ },
81
+ activeFilterCount: {
82
+ type: Number,
83
+ default: 0,
84
+ },
85
+ selectedItemId: {
86
+ type: String,
87
+ default: undefined,
88
+ },
89
+ scrolling: {
90
+ type: Boolean,
91
+ default: false,
92
+ },
93
+ };
94
+
95
+ export const tableEmits = {
96
+ paginationClick: (page: number) => isNumber(page),
97
+ selectionChanged: (values: Record<string, boolean>) => isObject(values),
98
+ "search:change": (value: string) => isString(value),
99
+ headerClick: (value: Record<string, unknown>) => isObject(value),
100
+ itemClick: (item: { id?: string }) => isObject(item),
101
+ "scroll:ptr": () => true,
102
+ };
103
+
104
+ export type VcTableProps = ExtractTypes<typeof tableProps>;
105
+ export type VcTableEmits = typeof tableEmits;
106
+
107
+ export interface VcTableSlots {
108
+ header: () => VNode[];
109
+ filters: (args: { closePanel: () => void }) => VNode[];
110
+ "mobile-item": (args: { item: { [x: string]: any; id: string } }) => VNode[];
111
+ [key: `header_${string}`]: () => VNode[];
112
+ [key: `item_${string}`]: (args: { item?: { [x: string]: any; id: string }; cell?: ITableColumns }) => VNode[];
113
+ notfound: () => VNode[];
114
+ empty: () => VNode[];
115
+ footer: () => VNode[];
116
+ }
@@ -1,26 +1,25 @@
1
1
  <template>
2
- <div
3
- class="tw-relative tw-overflow-hidden tw-flex tw-flex-col tw-grow tw-basis-0"
4
- >
2
+ <div class="tw-relative tw-overflow-hidden tw-flex tw-flex-col tw-grow tw-basis-0">
5
3
  <!-- Header slot with filter and searchbar -->
6
4
  <slot
7
5
  name="header"
8
6
  v-if="
9
7
  ($slots['header'] || header) &&
10
- ((items && items.length) ||
11
- searchValue ||
12
- searchValue === '' ||
13
- activeFilterCount)
8
+ ((items && items.length) || searchValue || searchValue === '' || activeFilterCount)
14
9
  "
15
10
  >
16
- <div
17
- class="tw-shrink-0 tw-flex tw-items-center tw-justify-between tw-p-4"
18
- >
11
+ <div class="tw-shrink-0 tw-flex tw-items-center tw-justify-between tw-p-4">
19
12
  <!-- Table filter mobile button -->
20
- <div v-if="$isMobile.value && $slots['filters']" class="tw-mr-3">
13
+ <div
14
+ v-if="$isMobile.value && $slots['filters']"
15
+ class="tw-mr-3"
16
+ >
21
17
  <VcTableFilter :counter="activeFilterCount">
22
18
  <template v-slot:default="{ closePanel }">
23
- <slot name="filters" :closePanel="closePanel"></slot>
19
+ <slot
20
+ name="filters"
21
+ :closePanel="closePanel"
22
+ ></slot>
24
23
  </template>
25
24
  </VcTableFilter>
26
25
  </div>
@@ -36,14 +35,20 @@
36
35
  ></VcInput>
37
36
 
38
37
  <!-- Table filter desktop button -->
39
- <div v-if="$isDesktop.value && $slots['filters']" class="tw-ml-3">
38
+ <div
39
+ v-if="$isDesktop.value && $slots['filters']"
40
+ class="tw-ml-3"
41
+ >
40
42
  <VcTableFilter
41
43
  :title="$t('Filters')"
42
44
  :counter="activeFilterCount"
43
45
  :parentExpanded="expanded"
44
46
  >
45
47
  <template v-slot:default="{ closePanel }">
46
- <slot name="filters" :closePanel="closePanel"></slot>
48
+ <slot
49
+ name="filters"
50
+ :closePanel="closePanel"
51
+ ></slot>
47
52
  </template>
48
53
  </VcTableFilter>
49
54
  </div>
@@ -75,7 +80,10 @@
75
80
  @swipeStart="handleSwipe"
76
81
  :swipingItem="mobileSwipeItem"
77
82
  >
78
- <slot name="mobile-item" :item="item"></slot>
83
+ <slot
84
+ name="mobile-item"
85
+ :item="item"
86
+ ></slot>
79
87
  </VcTableMobileItem>
80
88
  </div>
81
89
  </template>
@@ -89,7 +97,10 @@
89
97
  'vc-table_multiselect': multiselect,
90
98
  }"
91
99
  >
92
- <thead v-if="columns" class="vc-table__header">
100
+ <thead
101
+ v-if="columns"
102
+ class="vc-table__header"
103
+ >
93
104
  <tr class="vc-table__header-row">
94
105
  <th
95
106
  v-if="multiselect"
@@ -121,20 +132,27 @@
121
132
  <div>
122
133
  <slot :name="`header_${item.id}`">{{ item.title }}</slot>
123
134
  </div>
124
- <div v-if="sortField === item.id" class="tw-ml-1">
135
+ <div
136
+ v-if="sortField === item.id"
137
+ class="tw-ml-1"
138
+ >
125
139
  <VcIcon
126
140
  size="xs"
127
- :icon="`fas fa-caret-${
128
- sortDirection === 'DESC' ? 'down' : 'up'
129
- }`"
141
+ :icon="`fas fa-caret-${sortDirection === 'DESC' ? 'down' : 'up'}`"
130
142
  ></VcIcon>
131
143
  </div>
132
144
  <div
133
145
  class="tw-flex tw-flex-col tw-ml-1 tw-invisible group-hover:tw-visible"
134
146
  v-else
135
147
  >
136
- <VcIcon size="xs" icon="fas fa-caret-up"></VcIcon>
137
- <VcIcon size="xs" icon="fas fa-caret-down"></VcIcon>
148
+ <VcIcon
149
+ size="xs"
150
+ icon="fas fa-caret-up"
151
+ ></VcIcon>
152
+ <VcIcon
153
+ size="xs"
154
+ icon="fas fa-caret-down"
155
+ ></VcIcon>
138
156
  </div>
139
157
  </div>
140
158
  </th>
@@ -146,22 +164,26 @@
146
164
  </tr>
147
165
  </thead>
148
166
 
149
- <tbody v-if="items" class="vc-table__body">
167
+ <tbody
168
+ v-if="items"
169
+ class="vc-table__body"
170
+ >
150
171
  <tr
151
172
  v-for="(item, i) in items"
152
173
  :key="item.id"
153
- class="vc-table__body-row tw-h-[60px] tw-bg-white hover:tw-bg-[#dfeef9]"
174
+ class="vc-table__body-row tw-h-[60px] tw-bg-white hover:tw-bg-[#dfeef9] tw-cursor-pointer"
154
175
  :class="{
155
- 'tw-cursor-pointer hover:tw-bg-[#dfeef9]': onItemClick,
156
176
  'tw-bg-[#f8f8f8]': i % 2 === 1,
157
- '!tw-bg-[#dfeef9] hover:tw-bg-[#dfeef9]':
158
- item && item.id ? selectedItemId === item.id : false,
177
+ '!tw-bg-[#dfeef9] hover:tw-bg-[#dfeef9]': item && item.id ? selectedItemId === item.id : false,
159
178
  }"
160
179
  @click="$emit('itemClick', item)"
161
180
  @mouseover="calculateActions(item)"
162
181
  @mouseleave="closeActions"
163
182
  >
164
- <td v-if="multiselect" width="50">
183
+ <td
184
+ v-if="multiselect"
185
+ width="50"
186
+ >
165
187
  <div class="tw-flex tw-justify-center tw-items-center">
166
188
  <VcCheckbox
167
189
  :modelValue="checkboxes[item.id]"
@@ -177,8 +199,15 @@
177
199
  :class="cell.class"
178
200
  :width="cell.width"
179
201
  >
180
- <slot :name="`item_${cell.id}`" :item="item" :cell="cell">
181
- <VcTableCell :cell="cell" :item="item"></VcTableCell>
202
+ <slot
203
+ :name="`item_${cell.id}`"
204
+ :item="item"
205
+ :cell="cell"
206
+ >
207
+ <VcTableCell
208
+ :cell="cell"
209
+ :item="item"
210
+ ></VcTableCell>
182
211
  </slot>
183
212
  </td>
184
213
  <td
@@ -186,9 +215,7 @@
186
215
  width="44"
187
216
  v-if="itemActionBuilder"
188
217
  >
189
- <div
190
- class="vc-table__body-actions-container tw-relative !tw-hidden tw-justify-center tw-items-center"
191
- >
218
+ <div class="vc-table__body-actions-container tw-relative !tw-hidden tw-justify-center tw-items-center">
192
219
  <button
193
220
  class="tw-text-[#319ed4] tw-cursor-pointer tw-border-none tw-bg-transparent disabled:tw-text-[gray]"
194
221
  @click.stop="showActions(item, item.id)"
@@ -196,7 +223,10 @@
196
223
  aria-describedby="tooltip"
197
224
  :disabled="!(itemActions && itemActions.length)"
198
225
  >
199
- <VcIcon icon="fas fa-cog" size="m" />
226
+ <VcIcon
227
+ icon="fas fa-cog"
228
+ size="m"
229
+ />
200
230
  </button>
201
231
  <div
202
232
  class="vc-table__body-tooltip tw-bg-white tw-rounded-l-[4px] tw-p-[15px] tw-z-0 tw-absolute tw-right-0 tw-drop-shadow-[1px_3px_14px_rgba(111,122,131,0.25)]"
@@ -217,7 +247,10 @@
217
247
  ]"
218
248
  @click.stop="itemAction.clickHandler(item)"
219
249
  >
220
- <VcIcon :icon="itemAction.icon" size="m" />
250
+ <VcIcon
251
+ :icon="itemAction.icon"
252
+ size="m"
253
+ />
221
254
  <div
222
255
  class="tw-not-italic tw-font-normal tw-text-base tw-leading-[20px] tw-text-[#3f3f3f] tw-ml-[7px]"
223
256
  >
@@ -247,23 +280,38 @@
247
280
  v-if="notfound"
248
281
  class="tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center tw-justify-center"
249
282
  >
250
- <img v-if="notfound.image" :src="notfound.image" />
283
+ <img
284
+ v-if="notfound.image"
285
+ :src="notfound.image"
286
+ />
251
287
  <div class="tw-m-4 vc-table__empty-text">
252
288
  {{ notfound.text }}
253
289
  </div>
254
- <VcButton v-if="notfound.action" @click="notfound.clickHandler">
290
+ <VcButton
291
+ v-if="notfound.action"
292
+ @click="notfound.clickHandler"
293
+ >
255
294
  {{ notfound.action }}
256
295
  </VcButton>
257
296
  </div>
258
297
  </slot>
259
- <slot v-else name="empty">
298
+ <slot
299
+ v-else
300
+ name="empty"
301
+ >
260
302
  <div
261
303
  v-if="empty"
262
304
  class="tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center tw-justify-center"
263
305
  >
264
- <img v-if="empty.image" :src="empty.image" />
306
+ <img
307
+ v-if="empty.image"
308
+ :src="empty.image"
309
+ />
265
310
  <div class="tw-m-4 tw-text-xl tw-font-medium">{{ empty.text }}</div>
266
- <VcButton v-if="empty.action" @click="empty.clickHandler">
311
+ <VcButton
312
+ v-if="empty.action"
313
+ @click="empty.clickHandler"
314
+ >
267
315
  {{ empty.action }}
268
316
  </VcButton>
269
317
  </div>
@@ -299,94 +347,23 @@
299
347
 
300
348
  <script lang="ts" setup>
301
349
  import { computed, nextTick, ref, watch, onBeforeUpdate } from "vue";
302
- import {
303
- VcIcon,
304
- VcLoading,
305
- VcCheckbox,
306
- VcContainer,
307
- VcInput,
308
- VcPagination,
309
- } from "@/ui/components";
350
+ import { VcIcon, VcLoading, VcCheckbox, VcContainer, VcInput, VcPagination } from "./../../../components";
310
351
  import VcTableCounter from "./_internal/vc-table-counter/vc-table-counter.vue";
311
352
  import VcTableFilter from "./_internal/vc-table-filter/vc-table-filter.vue";
312
353
  import VcTableMobileItem from "./_internal/vc-table-mobile-item/vc-table-mobile-item.vue";
313
354
  import VcTableCell from "./_internal/vc-table-cell/vc-table-cell.vue";
314
355
  import { createPopper, Instance } from "@popperjs/core";
315
- import { IActionBuilderResult, ITableColumns } from "@/core/types";
316
-
317
- export interface Props {
318
- columns: ITableColumns[];
319
- items: { id: string }[];
320
- itemActionBuilder?: (item: { id: string }) => IActionBuilderResult[];
321
- sort?: string;
322
- multiselect?: boolean;
323
- expanded?: boolean;
324
- totalLabel?: string;
325
- totalCount?: number;
326
- pages?: number;
327
- currentPage?: number;
328
- searchPlaceholder?: string;
329
- searchValue?: string;
330
- loading?: boolean;
331
- empty?: StatusImage;
332
- notfound?: StatusImage;
333
- header?: boolean;
334
- footer?: boolean;
335
- activeFilterCount?: number;
336
- selectedItemId?: string;
337
- scrolling?: boolean;
338
- onItemClick?: () => void;
339
- }
340
-
341
- export interface StatusImage {
342
- image?: string;
343
- text: string;
344
- action?: boolean;
345
- clickHandler?: () => void;
346
- }
356
+ import { IActionBuilderResult } from "./../../../../core/types";
357
+ import { tableEmits, tableProps } from "./vc-table-model";
347
358
 
348
- const props = withDefaults(defineProps<Props>(), {
349
- columns: () => [],
350
- items: () => [],
351
- itemActionBuilder: undefined,
352
- sort: undefined,
353
- multiselect: false,
354
- expanded: false,
355
- totalLabel: "Totals:",
356
- totalCount: 0,
357
- pages: 0,
358
- currentPage: 0,
359
- searchPlaceholder: "Search...",
360
- searchValue: undefined,
361
- loading: false,
362
- empty: () => ({
363
- text: "List is empty.",
364
- }),
365
- notfound: () => ({
366
- text: "Nothing found.",
367
- }),
368
- header: true,
369
- footer: true,
370
- activeFilterCount: 0,
371
- selectedItemId: undefined,
372
- scrolling: false,
373
- onItemClick: undefined,
374
- });
359
+ const props = defineProps(tableProps);
375
360
 
376
361
  interface ITableItemRef {
377
362
  element: Element;
378
363
  id: string;
379
364
  }
380
365
 
381
- const emit = defineEmits([
382
- "paginationClick",
383
- "selectionChanged",
384
- "search:change",
385
- "filter:apply",
386
- "filter:reset",
387
- "headerClick",
388
- "scroll:ptr",
389
- ]);
366
+ const emit = defineEmits(tableEmits);
390
367
 
391
368
  const checkboxes = ref<Record<string, boolean>>({});
392
369
  const selectedRow = ref<string>();
@@ -421,9 +398,7 @@ const tableAlignment = {
421
398
  evenly: "justify-evenly",
422
399
  };
423
400
 
424
- const headerCheckbox = computed(() =>
425
- Object.values(checkboxes.value).every((value) => value)
426
- );
401
+ const headerCheckbox = computed(() => Object.values(checkboxes.value).every((value) => value));
427
402
 
428
403
  watch(
429
404
  () => props.items,
@@ -454,9 +429,7 @@ function setActionToggleRefs(el: Element, id: string) {
454
429
 
455
430
  function processHeaderCheckbox() {
456
431
  const currentState = Object.values(checkboxes.value).every((value) => value);
457
- Object.keys(checkboxes.value).forEach(
458
- (key) => (checkboxes.value[key] = !currentState)
459
- );
432
+ Object.keys(checkboxes.value).forEach((key) => (checkboxes.value[key] = !currentState));
460
433
  emit("selectionChanged", checkboxes.value);
461
434
  }
462
435
 
@@ -465,7 +438,7 @@ function processCheckbox(id: string, state: boolean) {
465
438
  emit("selectionChanged", checkboxes.value);
466
439
  }
467
440
 
468
- function showActions(item: { id: string }, index: string) {
441
+ function showActions(item: { id?: string }, index: string) {
469
442
  selectedRow.value = item.id;
470
443
 
471
444
  const toggleRef = actionToggleRefs.value.find((item) => item.id === index);
@@ -473,27 +446,23 @@ function showActions(item: { id: string }, index: string) {
473
446
 
474
447
  if (toggleRef && tooltipRef) {
475
448
  nextTick(() => {
476
- tooltip.value = createPopper(
477
- toggleRef.element,
478
- tooltipRef.element as HTMLElement,
479
- {
480
- placement: "bottom",
481
- onFirstUpdate: () => tooltip.value?.update(),
482
- modifiers: [
483
- {
484
- name: "offset",
485
- options: {
486
- offset: [-15, 15],
487
- },
449
+ tooltip.value = createPopper(toggleRef.element, tooltipRef.element as HTMLElement, {
450
+ placement: "bottom",
451
+ onFirstUpdate: () => tooltip.value?.update(),
452
+ modifiers: [
453
+ {
454
+ name: "offset",
455
+ options: {
456
+ offset: [-15, 15],
488
457
  },
489
- ],
490
- }
491
- );
458
+ },
459
+ ],
460
+ });
492
461
  });
493
462
  }
494
463
  }
495
464
 
496
- async function calculateActions(item: { id: string }) {
465
+ async function calculateActions(item: { id?: string }) {
497
466
  if (typeof props.itemActionBuilder === "function") {
498
467
  itemActions.value = await props.itemActionBuilder(item);
499
468
  }
package/ui/types/index.ts CHANGED
@@ -1,26 +1,117 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1
2
  import { GlobalComponentConstructor } from "./ts-helpers";
2
- import {
3
- VcInputProps,
4
- VcInputSlots,
5
- } from "../components/molecules/vc-input/vc-input-model";
6
- import {
7
- VcSelectProps,
8
- VcSelectSlots,
9
- } from "../components/molecules/vc-select/vc-select-model";
3
+ import { VcInputProps, VcInputSlots, VcInputEmits } from "../components/molecules/vc-input/vc-input-model";
4
+ import { VcSelectEmits, VcSelectProps, VcSelectSlots } from "../components/molecules/vc-select/vc-select-model";
10
5
  import {
11
6
  VcInputCurrencyProps,
12
7
  VcInputCurrencySlots,
8
+ VcInputCurrencyEmits,
13
9
  } from "../components/molecules/vc-input-currency/vc-input-currency-model";
10
+ import { VcBadgeEmits, VcBadgeProps, VcBadgeSlots } from "../components/atoms/vc-badge/vc-badge-model";
11
+ import { VcButtonProps, VcButtonSlots, VcButtonEmits } from "../components/atoms/vc-button/vc-button-model";
12
+ import { VcCardProps, VcCardSlots, VcCardEmits } from "../components/atoms/vc-card/vc-card-model";
13
+ import { VcCheckboxProps, VcCheckboxSlots, VcCheckboxEmits } from "../components/atoms/vc-checkbox/vc-checkbox-model";
14
+ import { VcColProps, VcColSlots } from "../components/atoms/vc-col/vc-col-model";
15
+ import {
16
+ VcContainerProps,
17
+ VcContainerSlots,
18
+ VcContainerEmits,
19
+ } from "../components/atoms/vc-container/vc-container-model";
20
+ import { VcIconProps, VcIconSlots } from "../components/atoms/vc-icon/vc-icon-model";
21
+ import { VcImageProps, VcImageSlots, VcImageEmits } from "../components/atoms/vc-image/vc-image-model";
22
+ import { VcInfoRowProps, VcInfoRowSlots } from "../components/atoms/vc-info-row/vc-info-row-model";
23
+ import { VcLabelProps, VcLabelSlots } from "../components/atoms/vc-label/vc-label-model";
24
+ import { VcLinkProps, VcLinkSlots, VcLinkEmits } from "../components/atoms/vc-link/vc-link-model";
25
+ import { VcLoadingProps, VcLoadingSlots } from "../components/atoms/vc-loading/vc-loading-model";
26
+ import { VcProgressProps, VcProgressSlots } from "../components/atoms/vc-progress/vc-progress-model";
27
+ import { VcRowSlots } from "../components/atoms/vc-row/vc-row-model";
28
+ import { VcStatusProps, VcStatusSlots } from "../components/atoms/vc-status/vc-status-model";
29
+ import { VcStatusIconProps, VcStatusIconSlots } from "../components/atoms/vc-status-icon/vc-status-icon-model";
30
+ import { VcSwitchProps, VcSwitchSlots, VcSwitchEmits } from "../components/atoms/vc-switch/vc-switch-model";
31
+ import { VcWidgetProps, VcWidgetSlots, VcWidgetEmits } from "../components/atoms/vc-widget/vc-widget-model";
32
+ import { VcBreadcrumbsProps, VcBreadcrumbsSlots } from "../components/molecules/vc-breadcrumbs/vc-breadcrumbs-model";
33
+ import { VcEditorProps, VcEditorSlots, VcEditorEmits } from "../components/molecules/vc-editor/vc-editor-model";
34
+ import {
35
+ VcFileUploadProps,
36
+ VcFileUploadSlots,
37
+ VcFileUploadEmits,
38
+ } from "../components/molecules/vc-file-upload/vc-file-upload-model";
39
+ import {
40
+ VcNotificationProps,
41
+ VcNotificationSlots,
42
+ VcNotificationEmits,
43
+ } from "../components/molecules/vc-notification/vc-notification-model";
44
+ import {
45
+ VcPaginationProps,
46
+ VcPaginationSlots,
47
+ VcPaginationEmits,
48
+ } from "../components/molecules/vc-pagination/vc-pagination-model";
49
+ import { VcRatingProps, VcRatingSlots } from "../components/molecules/vc-rating/vc-rating-model";
50
+ import { VcSliderProps, VcSliderSlots } from "../components/molecules/vc-slider/vc-slider-model";
51
+ import {
52
+ VcTextareaProps,
53
+ VcTextareaSlots,
54
+ VcTextareaEmits,
55
+ } from "../components/molecules/vc-textarea/vc-textarea-model";
56
+ import { VcAppProps, VcAppSlots, VcAppEmits } from "../components/organisms/vc-app/vc-app-model";
57
+ import { VcBladeProps, VcBladeSlots, VcBladeEmits } from "../components/organisms/vc-blade/vc-blade-model";
58
+ import {
59
+ VcDynamicPropertyProps,
60
+ VcDynamicPropertySlots,
61
+ } from "../components/organisms/vc-dynamic-property/vc-dynamic-property-model";
62
+ import { VcGalleryProps, VcGallerySlots, VcGalleryEmits } from "../components/organisms/vc-gallery/vc-gallery-model";
63
+ import { VcLoginFormProps, VcLoginFormSlots } from "../components/organisms/vc-login-form/vc-login-form-model";
64
+ import { VcPopupProps, VcPopupSlots, VcPopupEmits } from "../components/organisms/vc-popup/vc-popup-model";
65
+ import { VcTableProps, VcTableSlots, VcTableEmits } from "../components/organisms/vc-table/vc-table-model";
66
+ import { VcHintSlots } from "./../components/atoms/vc-hint/vc-hint-model";
67
+ import { VcFormSlots } from "./../components/molecules/vc-form/vc-form-model";
14
68
 
15
69
  declare module "@vue/runtime-core" {
16
70
  interface GlobalComponents {
17
- VcInput: GlobalComponentConstructor<VcInputProps, VcInputSlots>;
18
- VcInputCurrency: GlobalComponentConstructor<
19
- VcInputCurrencyProps,
20
- VcInputCurrencySlots
21
- >;
22
- VcSelect: GlobalComponentConstructor<VcSelectProps, VcSelectSlots>;
71
+ // atoms
72
+ VcBadge: GlobalComponentConstructor<VcBadgeProps, VcBadgeSlots, VcBadgeEmits>;
73
+ VcButton: GlobalComponentConstructor<VcButtonProps, VcButtonSlots, VcButtonEmits>;
74
+ VcCard: GlobalComponentConstructor<VcCardProps, VcCardSlots, VcCardEmits>;
75
+ VcCheckbox: GlobalComponentConstructor<VcCheckboxProps, VcCheckboxSlots, VcCheckboxEmits>;
76
+ VcCol: GlobalComponentConstructor<VcColProps, VcColSlots>;
77
+ VcContainer: GlobalComponentConstructor<VcContainerProps, VcContainerSlots, VcContainerEmits>;
78
+ VcHint: GlobalComponentConstructor<any, VcHintSlots>;
79
+ VcIcon: GlobalComponentConstructor<VcIconProps, VcIconSlots>;
80
+ VcImage: GlobalComponentConstructor<VcImageProps, VcImageSlots, VcImageEmits>;
81
+ VcInfoRow: GlobalComponentConstructor<VcInfoRowProps, VcInfoRowSlots>;
82
+ VcLabel: GlobalComponentConstructor<VcLabelProps, VcLabelSlots>;
83
+ VcLink: GlobalComponentConstructor<VcLinkProps, VcLinkSlots, VcLinkEmits>;
84
+ VcLoading: GlobalComponentConstructor<VcLoadingProps, VcLoadingSlots>;
85
+ VcProgress: GlobalComponentConstructor<VcProgressProps, VcProgressSlots>;
86
+ VcRow: GlobalComponentConstructor<any, VcRowSlots>;
87
+ VcStatus: GlobalComponentConstructor<VcStatusProps, VcStatusSlots>;
88
+ VcStatusIcon: GlobalComponentConstructor<VcStatusIconProps, VcStatusIconSlots>;
89
+ VcSwitch: GlobalComponentConstructor<VcSwitchProps, VcSwitchSlots, VcSwitchEmits>;
90
+ VcWidget: GlobalComponentConstructor<VcWidgetProps, VcWidgetSlots, VcWidgetEmits>;
91
+
92
+ // molecules
93
+ VcBreadcrumbs: GlobalComponentConstructor<VcBreadcrumbsProps, VcBreadcrumbsSlots>;
94
+ VcEditor: GlobalComponentConstructor<VcEditorProps, VcEditorSlots, VcEditorEmits>;
95
+ VcFileUpload: GlobalComponentConstructor<VcFileUploadProps, VcFileUploadSlots, VcFileUploadEmits>;
96
+ VcForm: GlobalComponentConstructor<any, VcFormSlots>;
97
+ VcInput: GlobalComponentConstructor<VcInputProps, VcInputSlots, VcInputEmits>;
98
+ VcInputCurrency: GlobalComponentConstructor<VcInputCurrencyProps, VcInputCurrencySlots, VcInputCurrencyEmits>;
99
+ VcNotification: GlobalComponentConstructor<VcNotificationProps, VcNotificationSlots, VcNotificationEmits>;
100
+ VcPagination: GlobalComponentConstructor<VcPaginationProps, VcPaginationSlots, VcPaginationEmits>;
101
+ VcRating: GlobalComponentConstructor<VcRatingProps, VcRatingSlots>;
102
+ VcSelect: GlobalComponentConstructor<VcSelectProps, VcSelectSlots, VcSelectEmits>;
103
+ VcSlider: GlobalComponentConstructor<VcSliderProps, VcSliderSlots>;
104
+ VcTextarea: GlobalComponentConstructor<VcTextareaProps, VcTextareaSlots, VcTextareaEmits>;
105
+
106
+ // organisms
107
+ VcApp: GlobalComponentConstructor<VcAppProps, VcAppSlots, VcAppEmits>;
108
+ VcBlade: GlobalComponentConstructor<VcBladeProps, VcBladeSlots, VcBladeEmits>;
109
+ VcDynamicProperty: GlobalComponentConstructor<VcDynamicPropertyProps, VcDynamicPropertySlots>;
110
+ VcGallery: GlobalComponentConstructor<VcGalleryProps, VcGallerySlots, VcGalleryEmits>;
111
+ VcLoginForm: GlobalComponentConstructor<VcLoginFormProps, VcLoginFormSlots>;
112
+ VcPopup: GlobalComponentConstructor<VcPopupProps, VcPopupSlots, VcPopupEmits>;
113
+ VcTable: GlobalComponentConstructor<VcTableProps, VcTableSlots, VcTableEmits>;
23
114
  }
24
115
  }
25
116
 
26
- export { };
117
+ export {};