@vc-shell/framework 1.0.53 → 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 (354) hide show
  1. package/core/composables/index.ts +0 -1
  2. package/core/composables/useApiClient/index.ts +1 -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 +5 -12
  12. package/core/composables/useSettings/index.ts +2 -3
  13. package/core/composables/useUser/index.ts +25 -64
  14. package/core/plugins/i18n/index.ts +8 -0
  15. package/core/plugins/index.ts +3 -1
  16. package/core/plugins/modularity/index.ts +32 -0
  17. package/core/plugins/moment/humanize.ts +1 -4
  18. package/core/plugins/validation/index.ts +11 -1
  19. package/core/plugins/validation/rules.ts +48 -170
  20. package/core/types/index.ts +3 -5
  21. package/dist/core/composables/index.d.ts +0 -1
  22. package/dist/core/composables/index.d.ts.map +1 -1
  23. package/dist/core/composables/useApiClient/index.d.ts.map +1 -1
  24. package/dist/core/composables/useAsync/index.d.ts.map +1 -1
  25. package/dist/core/composables/useAutosave/index.d.ts.map +1 -1
  26. package/dist/core/composables/useFunctions/debounce.d.ts.map +1 -1
  27. package/dist/core/composables/useFunctions/delay.d.ts.map +1 -1
  28. package/dist/core/composables/useFunctions/once.d.ts.map +1 -1
  29. package/dist/core/composables/useFunctions/throttle.d.ts.map +1 -1
  30. package/dist/core/composables/useI18n/index.d.ts +2 -4
  31. package/dist/core/composables/useI18n/index.d.ts.map +1 -1
  32. package/dist/core/composables/useLoading/index.d.ts.map +1 -1
  33. package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
  34. package/dist/core/composables/useSettings/index.d.ts.map +1 -1
  35. package/dist/core/composables/useUser/index.d.ts.map +1 -1
  36. package/dist/core/plugins/i18n/index.d.ts +3 -0
  37. package/dist/core/plugins/i18n/index.d.ts.map +1 -0
  38. package/dist/core/plugins/index.d.ts +3 -1
  39. package/dist/core/plugins/index.d.ts.map +1 -1
  40. package/dist/core/plugins/modularity/index.d.ts +8 -0
  41. package/dist/core/plugins/modularity/index.d.ts.map +1 -0
  42. package/dist/core/plugins/moment/humanize.d.ts.map +1 -1
  43. package/dist/core/plugins/validation/index.d.ts +3 -1
  44. package/dist/core/plugins/validation/index.d.ts.map +1 -1
  45. package/dist/core/plugins/validation/rules.d.ts +32 -11
  46. package/dist/core/plugins/validation/rules.d.ts.map +1 -1
  47. package/dist/core/types/index.d.ts +0 -1
  48. package/dist/core/types/index.d.ts.map +1 -1
  49. package/dist/framework.esm.js +42553 -0
  50. package/dist/framework.js +77 -75
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/shared/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
  53. package/dist/shared/app-switcher/index.d.ts +2 -3
  54. package/dist/shared/app-switcher/index.d.ts.map +1 -1
  55. package/dist/shared/assets/components/index.d.ts +1 -1
  56. package/dist/shared/assets/components/index.d.ts.map +1 -1
  57. package/dist/shared/assets/index.d.ts +2 -3
  58. package/dist/shared/assets/index.d.ts.map +1 -1
  59. package/dist/shared/blade-navigation/composables/index.d.ts +1 -1
  60. package/dist/shared/blade-navigation/composables/index.d.ts.map +1 -1
  61. package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts +1 -1
  62. package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
  63. package/dist/shared/blade-navigation/index.d.ts +2 -3
  64. package/dist/shared/blade-navigation/index.d.ts.map +1 -1
  65. package/dist/shared/index.d.ts +4 -1
  66. package/dist/shared/index.d.ts.map +1 -1
  67. package/dist/style.css +1 -1
  68. package/dist/tsconfig.tsbuildinfo +1 -1
  69. package/dist/ui/components/atoms/vc-badge/index.d.ts +2 -2
  70. package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -1
  71. package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts +20 -15
  72. package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts.map +1 -1
  73. package/dist/ui/components/atoms/vc-button/index.d.ts +2 -2
  74. package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -1
  75. package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts +30 -10
  76. package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts.map +1 -1
  77. package/dist/ui/components/atoms/vc-card/index.d.ts +2 -2
  78. package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -1
  79. package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts +28 -11
  80. package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts.map +1 -1
  81. package/dist/ui/components/atoms/vc-checkbox/index.d.ts +2 -2
  82. package/dist/ui/components/atoms/vc-checkbox/index.d.ts.map +1 -1
  83. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts +25 -8
  84. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts.map +1 -1
  85. package/dist/ui/components/atoms/vc-col/index.d.ts.map +1 -1
  86. package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts +8 -3
  87. package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts.map +1 -1
  88. package/dist/ui/components/atoms/vc-container/index.d.ts +2 -2
  89. package/dist/ui/components/atoms/vc-container/index.d.ts.map +1 -1
  90. package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts +20 -6
  91. package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts.map +1 -1
  92. package/dist/ui/components/atoms/vc-hint/vc-hint-model.d.ts +5 -0
  93. package/dist/ui/components/atoms/vc-hint/vc-hint-model.d.ts.map +1 -0
  94. package/dist/ui/components/atoms/vc-icon/index.d.ts.map +1 -1
  95. package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts +13 -5
  96. package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts.map +1 -1
  97. package/dist/ui/components/atoms/vc-image/index.d.ts +2 -2
  98. package/dist/ui/components/atoms/vc-image/index.d.ts.map +1 -1
  99. package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts +34 -11
  100. package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts.map +1 -1
  101. package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts.map +1 -1
  102. package/dist/ui/components/atoms/vc-info-row/index.d.ts.map +1 -1
  103. package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts +21 -7
  104. package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts.map +1 -1
  105. package/dist/ui/components/atoms/vc-label/index.d.ts.map +1 -1
  106. package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts +12 -4
  107. package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts.map +1 -1
  108. package/dist/ui/components/atoms/vc-link/index.d.ts +2 -2
  109. package/dist/ui/components/atoms/vc-link/index.d.ts.map +1 -1
  110. package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts +16 -5
  111. package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts.map +1 -1
  112. package/dist/ui/components/atoms/vc-loading/index.d.ts.map +1 -1
  113. package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts +8 -3
  114. package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts.map +1 -1
  115. package/dist/ui/components/atoms/vc-progress/index.d.ts.map +1 -1
  116. package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts +13 -5
  117. package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts.map +1 -1
  118. package/dist/ui/components/atoms/vc-status/index.d.ts.map +1 -1
  119. package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts +17 -6
  120. package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts.map +1 -1
  121. package/dist/ui/components/atoms/vc-status-icon/index.d.ts.map +1 -1
  122. package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts +8 -3
  123. package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts.map +1 -1
  124. package/dist/ui/components/atoms/vc-switch/index.d.ts +2 -2
  125. package/dist/ui/components/atoms/vc-switch/index.d.ts.map +1 -1
  126. package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts +25 -8
  127. package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts.map +1 -1
  128. package/dist/ui/components/atoms/vc-widget/index.d.ts +2 -2
  129. package/dist/ui/components/atoms/vc-widget/index.d.ts.map +1 -1
  130. package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts +15 -7
  131. package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts.map +1 -1
  132. package/dist/ui/components/index.d.ts.map +1 -1
  133. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts.map +1 -1
  134. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts +15 -10
  135. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts.map +1 -1
  136. package/dist/ui/components/molecules/vc-editor/index.d.ts +2 -2
  137. package/dist/ui/components/molecules/vc-editor/index.d.ts.map +1 -1
  138. package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts +28 -11
  139. package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts.map +1 -1
  140. package/dist/ui/components/molecules/vc-file-upload/index.d.ts +2 -2
  141. package/dist/ui/components/molecules/vc-file-upload/index.d.ts.map +1 -1
  142. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts +30 -10
  143. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts.map +1 -1
  144. package/dist/ui/components/molecules/vc-form/vc-form-model.d.ts +5 -0
  145. package/dist/ui/components/molecules/vc-form/vc-form-model.d.ts.map +1 -0
  146. package/dist/ui/components/molecules/vc-input/index.d.ts +2 -2
  147. package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -1
  148. package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts +48 -25
  149. package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts.map +1 -1
  150. package/dist/ui/components/molecules/vc-input-currency/index.d.ts +2 -2
  151. package/dist/ui/components/molecules/vc-input-currency/index.d.ts.map +1 -1
  152. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts +36 -28
  153. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts.map +1 -1
  154. package/dist/ui/components/molecules/vc-notification/index.d.ts +2 -2
  155. package/dist/ui/components/molecules/vc-notification/index.d.ts.map +1 -1
  156. package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts +13 -5
  157. package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts.map +1 -1
  158. package/dist/ui/components/molecules/vc-pagination/index.d.ts +2 -2
  159. package/dist/ui/components/molecules/vc-pagination/index.d.ts.map +1 -1
  160. package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts +20 -6
  161. package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts.map +1 -1
  162. package/dist/ui/components/molecules/vc-rating/index.d.ts.map +1 -1
  163. package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts +17 -9
  164. package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts.map +1 -1
  165. package/dist/ui/components/molecules/vc-select/index.d.ts +2 -2
  166. package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -1
  167. package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts +67 -32
  168. package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts.map +1 -1
  169. package/dist/ui/components/molecules/vc-slider/index.d.ts.map +1 -1
  170. package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts +25 -8
  171. package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts.map +1 -1
  172. package/dist/ui/components/molecules/vc-textarea/index.d.ts +2 -2
  173. package/dist/ui/components/molecules/vc-textarea/index.d.ts.map +1 -1
  174. package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts +32 -12
  175. package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts.map +1 -1
  176. package/dist/ui/components/organisms/vc-app/index.d.ts +2 -2
  177. package/dist/ui/components/organisms/vc-app/index.d.ts.map +1 -1
  178. package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts +52 -17
  179. package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts.map +1 -1
  180. package/dist/ui/components/organisms/vc-blade/index.d.ts +2 -2
  181. package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -1
  182. package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts +28 -11
  183. package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts.map +1 -1
  184. package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -1
  185. package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts.map +1 -1
  186. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts +39 -10
  187. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts.map +1 -1
  188. package/dist/ui/components/organisms/vc-gallery/index.d.ts +2 -2
  189. package/dist/ui/components/organisms/vc-gallery/index.d.ts.map +1 -1
  190. package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts +69 -27
  191. package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts.map +1 -1
  192. package/dist/ui/components/organisms/vc-login-form/index.d.ts.map +1 -1
  193. package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts +10 -5
  194. package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts.map +1 -1
  195. package/dist/ui/components/organisms/vc-popup/index.d.ts +2 -2
  196. package/dist/ui/components/organisms/vc-popup/index.d.ts.map +1 -1
  197. package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts +18 -7
  198. package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts.map +1 -1
  199. package/dist/ui/components/organisms/vc-table/index.d.ts +2 -2
  200. package/dist/ui/components/organisms/vc-table/index.d.ts.map +1 -1
  201. package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts +103 -34
  202. package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts.map +1 -1
  203. package/dist/ui/types/index.d.ts +48 -46
  204. package/dist/ui/types/index.d.ts.map +1 -1
  205. package/dist/ui/types/ts-helpers.d.ts +14 -4
  206. package/dist/ui/types/ts-helpers.d.ts.map +1 -1
  207. package/dist/ui/utils/index.d.ts +2 -0
  208. package/dist/ui/utils/index.d.ts.map +1 -0
  209. package/dist/ui/utils/types.d.ts +3 -0
  210. package/dist/ui/utils/types.d.ts.map +1 -0
  211. package/dist/vite.config.d.ts +1 -1
  212. package/dist/vite.config.d.ts.map +1 -1
  213. package/package.json +8 -11
  214. package/shared/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +2 -5
  215. package/shared/app-switcher/composables/useAppSwitcher/index.ts +2 -7
  216. package/shared/app-switcher/index.ts +3 -10
  217. package/shared/assets/components/assets-details/assets-details.vue +7 -28
  218. package/shared/assets/components/index.ts +1 -1
  219. package/shared/assets/index.ts +3 -15
  220. package/shared/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +2 -7
  221. package/shared/blade-navigation/composables/index.ts +1 -1
  222. package/shared/blade-navigation/composables/useBladeNavigation/index.ts +7 -36
  223. package/shared/blade-navigation/index.ts +3 -10
  224. package/shared/index.ts +9 -11
  225. package/ui/components/atoms/vc-badge/index.ts +4 -4
  226. package/ui/components/atoms/vc-badge/vc-badge-model.ts +22 -15
  227. package/ui/components/atoms/vc-badge/vc-badge.vue +5 -10
  228. package/ui/components/atoms/vc-button/index.ts +4 -4
  229. package/ui/components/atoms/vc-button/vc-button-model.ts +32 -17
  230. package/ui/components/atoms/vc-button/vc-button.vue +8 -13
  231. package/ui/components/atoms/vc-card/index.ts +3 -4
  232. package/ui/components/atoms/vc-card/vc-card-model.ts +31 -11
  233. package/ui/components/atoms/vc-card/vc-card.vue +20 -11
  234. package/ui/components/atoms/vc-checkbox/index.ts +3 -2
  235. package/ui/components/atoms/vc-checkbox/vc-checkbox-model.ts +28 -8
  236. package/ui/components/atoms/vc-checkbox/vc-checkbox.vue +15 -11
  237. package/ui/components/atoms/vc-col/index.ts +1 -2
  238. package/ui/components/atoms/vc-col/vc-col-model.ts +9 -3
  239. package/ui/components/atoms/vc-col/vc-col.vue +2 -4
  240. package/ui/components/atoms/vc-container/index.ts +3 -2
  241. package/ui/components/atoms/vc-container/vc-container-model.ts +24 -8
  242. package/ui/components/atoms/vc-container/vc-container.vue +6 -14
  243. package/ui/components/atoms/vc-hint/vc-hint-model.ts +5 -0
  244. package/ui/components/atoms/vc-icon/index.ts +1 -3
  245. package/ui/components/atoms/vc-icon/vc-icon-model.ts +15 -6
  246. package/ui/components/atoms/vc-icon/vc-icon.vue +2 -5
  247. package/ui/components/atoms/vc-image/index.ts +4 -4
  248. package/ui/components/atoms/vc-image/vc-image-model.ts +36 -22
  249. package/ui/components/atoms/vc-image/vc-image.stories.ts +1 -2
  250. package/ui/components/atoms/vc-image/vc-image.vue +13 -17
  251. package/ui/components/atoms/vc-info-row/index.ts +1 -3
  252. package/ui/components/atoms/vc-info-row/vc-info-row-model.ts +22 -7
  253. package/ui/components/atoms/vc-info-row/vc-info-row.vue +13 -9
  254. package/ui/components/atoms/vc-label/index.ts +1 -3
  255. package/ui/components/atoms/vc-label/vc-label-model.ts +13 -4
  256. package/ui/components/atoms/vc-label/vc-label.vue +6 -6
  257. package/ui/components/atoms/vc-link/index.ts +3 -4
  258. package/ui/components/atoms/vc-link/vc-link-model.ts +18 -5
  259. package/ui/components/atoms/vc-link/vc-link.vue +4 -6
  260. package/ui/components/atoms/vc-loading/index.ts +1 -3
  261. package/ui/components/atoms/vc-loading/vc-loading-model.ts +9 -3
  262. package/ui/components/atoms/vc-loading/vc-loading.vue +4 -9
  263. package/ui/components/atoms/vc-progress/index.ts +1 -3
  264. package/ui/components/atoms/vc-progress/vc-progress-model.ts +14 -5
  265. package/ui/components/atoms/vc-progress/vc-progress.vue +4 -13
  266. package/ui/components/atoms/vc-status/index.ts +1 -3
  267. package/ui/components/atoms/vc-status/vc-status-model.ts +18 -12
  268. package/ui/components/atoms/vc-status/vc-status.vue +3 -11
  269. package/ui/components/atoms/vc-status-icon/index.ts +1 -3
  270. package/ui/components/atoms/vc-status-icon/vc-status-icon-model.ts +9 -3
  271. package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +2 -4
  272. package/ui/components/atoms/vc-switch/index.ts +4 -4
  273. package/ui/components/atoms/vc-switch/vc-switch-model.ts +28 -8
  274. package/ui/components/atoms/vc-switch/vc-switch.vue +12 -10
  275. package/ui/components/atoms/vc-widget/index.ts +4 -4
  276. package/ui/components/atoms/vc-widget/vc-widget-model.ts +17 -7
  277. package/ui/components/atoms/vc-widget/vc-widget.vue +16 -7
  278. package/ui/components/index.ts +1 -1
  279. package/ui/components/molecules/vc-breadcrumbs/index.ts +1 -3
  280. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.ts +18 -10
  281. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +6 -5
  282. package/ui/components/molecules/vc-editor/index.ts +4 -4
  283. package/ui/components/molecules/vc-editor/vc-editor-model.ts +31 -11
  284. package/ui/components/molecules/vc-editor/vc-editor.vue +17 -11
  285. package/ui/components/molecules/vc-file-upload/index.ts +3 -2
  286. package/ui/components/molecules/vc-file-upload/vc-file-upload-model.ts +33 -11
  287. package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +10 -14
  288. package/ui/components/molecules/vc-form/vc-form-model.ts +5 -0
  289. package/ui/components/molecules/vc-input/index.ts +4 -5
  290. package/ui/components/molecules/vc-input/vc-input-model.ts +53 -35
  291. package/ui/components/molecules/vc-input/vc-input.vue +41 -29
  292. package/ui/components/molecules/vc-input-currency/index.ts +3 -2
  293. package/ui/components/molecules/vc-input-currency/vc-input-currency-model.ts +42 -32
  294. package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +12 -7
  295. package/ui/components/molecules/vc-notification/index.ts +4 -3
  296. package/ui/components/molecules/vc-notification/vc-notification-model.ts +15 -5
  297. package/ui/components/molecules/vc-notification/vc-notification.vue +3 -5
  298. package/ui/components/molecules/vc-pagination/index.ts +4 -3
  299. package/ui/components/molecules/vc-pagination/vc-pagination-model.ts +23 -6
  300. package/ui/components/molecules/vc-pagination/vc-pagination.vue +19 -11
  301. package/ui/components/molecules/vc-rating/index.ts +2 -4
  302. package/ui/components/molecules/vc-rating/vc-rating-model.ts +18 -9
  303. package/ui/components/molecules/vc-rating/vc-rating.vue +10 -4
  304. package/ui/components/molecules/vc-select/index.ts +5 -5
  305. package/ui/components/molecules/vc-select/vc-select-model.ts +74 -44
  306. package/ui/components/molecules/vc-select/vc-select.vue +126 -171
  307. package/ui/components/molecules/vc-slider/index.ts +2 -4
  308. package/ui/components/molecules/vc-slider/vc-slider-model.ts +30 -11
  309. package/ui/components/molecules/vc-slider/vc-slider.vue +2 -8
  310. package/ui/components/molecules/vc-textarea/index.ts +4 -3
  311. package/ui/components/molecules/vc-textarea/vc-textarea-model.ts +35 -12
  312. package/ui/components/molecules/vc-textarea/vc-textarea.vue +16 -12
  313. package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +13 -9
  314. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +12 -3
  315. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +18 -16
  316. package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +8 -2
  317. package/ui/components/organisms/vc-app/index.ts +4 -4
  318. package/ui/components/organisms/vc-app/vc-app-model.ts +55 -17
  319. package/ui/components/organisms/vc-app/vc-app.vue +8 -25
  320. package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +22 -7
  321. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +19 -13
  322. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +13 -11
  323. package/ui/components/organisms/vc-blade/index.ts +5 -5
  324. package/ui/components/organisms/vc-blade/vc-blade-model.ts +30 -11
  325. package/ui/components/organisms/vc-blade/vc-blade.stories.ts +1 -2
  326. package/ui/components/organisms/vc-blade/vc-blade.vue +12 -14
  327. package/ui/components/organisms/vc-dynamic-property/index.ts +2 -4
  328. package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.ts +53 -20
  329. package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +41 -37
  330. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +9 -2
  331. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +14 -9
  332. package/ui/components/organisms/vc-gallery/index.ts +4 -3
  333. package/ui/components/organisms/vc-gallery/vc-gallery-model.ts +72 -27
  334. package/ui/components/organisms/vc-gallery/vc-gallery.vue +7 -20
  335. package/ui/components/organisms/vc-login-form/index.ts +2 -4
  336. package/ui/components/organisms/vc-login-form/vc-login-form-model.ts +10 -5
  337. package/ui/components/organisms/vc-login-form/vc-login-form.vue +2 -4
  338. package/ui/components/organisms/vc-popup/index.ts +5 -5
  339. package/ui/components/organisms/vc-popup/vc-popup-model.ts +20 -7
  340. package/ui/components/organisms/vc-popup/vc-popup.vue +7 -7
  341. package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +19 -25
  342. package/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +2 -6
  343. package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +8 -2
  344. package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +27 -39
  345. package/ui/components/organisms/vc-table/index.ts +5 -5
  346. package/ui/components/organisms/vc-table/vc-table-model.ts +98 -38
  347. package/ui/components/organisms/vc-table/vc-table.vue +105 -103
  348. package/ui/types/index.ts +64 -160
  349. package/ui/types/ts-helpers.ts +23 -3
  350. package/ui/utils/index.ts +1 -0
  351. package/ui/utils/types.ts +2 -0
  352. package/core/composables/useLogger/index.ts +0 -24
  353. package/dist/core/composables/useLogger/index.d.ts +0 -5
  354. package/dist/core/composables/useLogger/index.d.ts.map +0 -1
@@ -1,96 +1,114 @@
1
- import { VNode } from "vue";
1
+ import { PropType, VNode } from "vue";
2
+ import { ExtractTypes } from "./../../../types/ts-helpers";
3
+ import { isString, isNumber, isDate } from "./../../../utils";
2
4
 
3
- export interface VcInputProps {
5
+ export const inputProps = {
4
6
  /**
5
7
  * Model of the component; Use with a listener for 'update:model-value' event OR use v-model directive
6
8
  */
7
- modelValue?: string | number | Date | null;
9
+ modelValue: {
10
+ type: [String, Number, Date],
11
+ default: null,
12
+ },
8
13
  /**
9
14
  * Input label text
10
15
  */
11
- label?: string | undefined;
16
+ label: String,
12
17
  /**
13
18
  * Input placeholder text
14
19
  */
15
- placeholder?: string | undefined;
20
+ placeholder: String,
16
21
  /**
17
22
  * Input type
18
23
  * Default value: text
19
24
  */
20
- type?:
21
- | "text"
22
- | "password"
23
- | "email"
24
- | "tel"
25
- | "number"
26
- | "url"
27
- | "time"
28
- | "date"
29
- | "datetime-local"
30
- | undefined;
25
+ type: {
26
+ type: String as PropType<
27
+ "text" | "password" | "email" | "tel" | "number" | "url" | "time" | "date" | "datetime-local"
28
+ >,
29
+ default: "text",
30
+ },
31
31
  /**
32
32
  * Input description (hint) text below input component
33
33
  */
34
- hint?: string | undefined;
34
+ hint: String,
35
35
  /**
36
36
  * Appends clearable icon when a value is set;
37
37
  * When clicked, model becomes null
38
38
  */
39
- clearable?: boolean | undefined;
39
+ clearable: {
40
+ type: Boolean,
41
+ default: false,
42
+ },
40
43
  /**
41
44
  * Prefix
42
45
  */
43
- prefix?: string | undefined;
46
+ prefix: String,
44
47
  /**
45
48
  * Suffix
46
49
  */
47
- suffix?: string | undefined;
50
+ suffix: String,
48
51
  /**
49
52
  * Used to specify the name of the control; If not specified, it takes the value 'Field'
50
53
  */
51
- name?: string | undefined;
54
+ name: {
55
+ type: String,
56
+ default: "Field",
57
+ },
52
58
  /**
53
59
  * Signals the user a process is in progress by displaying a spinner
54
60
  */
55
- loading?: boolean | undefined;
61
+ loading: Boolean,
56
62
  /**
57
63
  * Debounce amount (in milliseconds) when updating model
58
64
  */
59
- debounce?: string | number | undefined;
65
+ debounce: [String, Number],
60
66
  /**
61
67
  * Put component in disabled mode
62
68
  */
63
- disabled?: boolean | undefined;
69
+ disabled: {
70
+ type: Boolean,
71
+ default: false,
72
+ },
64
73
  /**
65
74
  * Focus field on initial component render
66
75
  */
67
- autofocus?: boolean | undefined;
76
+ autofocus: Boolean,
68
77
  /**
69
78
  * Does field have validation errors?
70
79
  */
71
- error?: boolean | undefined;
80
+ error: Boolean,
72
81
  /**
73
82
  * Validation error message (gets displayed only if 'error' is set to 'true')
74
83
  */
75
- errorMessage?: string | undefined;
84
+ errorMessage: String,
76
85
  /**
77
86
  * Specify a max length of model
78
87
  * Default value: 1024
79
88
  */
80
- maxlength?: string | number | undefined;
89
+ maxlength: {
90
+ type: [String, Number],
91
+ default: "1024",
92
+ },
81
93
  /**
82
94
  * Input tooltip information
83
95
  */
84
- tooltip?: string | undefined;
96
+ tooltip: String,
85
97
  /**
86
98
  * Input required state
87
99
  */
88
- required?: boolean | undefined;
89
- /**
90
- * Emitted when the component needs to change the model; Is also used by v-model
91
- */
92
- "onUpdate:modelValue"?: (value: string | number | Date | null) => void;
93
- }
100
+ required: {
101
+ type: Boolean,
102
+ default: false,
103
+ },
104
+ };
105
+
106
+ export const inputEmits = {
107
+ "update:modelValue": (value: string | number | Date | null) => isString(value) || isNumber(value) || isDate(value) || value === null,
108
+ };
109
+
110
+ export type VcInputProps = ExtractTypes<typeof inputProps>;
111
+ export type VcInputEmits = typeof inputEmits;
94
112
 
95
113
  export interface VcInputSlots {
96
114
  /**
@@ -12,9 +12,17 @@
12
12
  ]"
13
13
  >
14
14
  <!-- Input label -->
15
- <VcLabel v-if="label" class="tw-mb-2" :required="required">
15
+ <VcLabel
16
+ v-if="label"
17
+ class="tw-mb-2"
18
+ :required="required"
19
+ >
16
20
  <span>{{ label }}</span>
17
- <template v-if="tooltip" v-slot:tooltip>{{ tooltip }}</template>
21
+ <template
22
+ v-if="tooltip"
23
+ v-slot:tooltip
24
+ >{{ tooltip }}</template
25
+ >
18
26
  </VcLabel>
19
27
 
20
28
  <div class="tw-flex tw-flex-nowrap tw-items-start">
@@ -25,9 +33,7 @@
25
33
  >
26
34
  <slot name="prepend"></slot>
27
35
  </div>
28
- <div
29
- class="tw-flex tw-flex-col tw-flex-nowrap tw-flex-auto tw-relative"
30
- >
36
+ <div class="tw-flex tw-flex-col tw-flex-nowrap tw-flex-auto tw-relative">
31
37
  <div class="vc-input__field-wrapper">
32
38
  <div class="tw-flex tw-flex-nowrap tw-flex-auto tw-h-full">
33
39
  <div
@@ -72,13 +78,14 @@
72
78
  {{ suffix }}
73
79
  </div>
74
80
  <div
75
- v-if="
76
- clearable && modelValue && !disabled && type !== 'password'
77
- "
81
+ v-if="clearable && modelValue && !disabled && type !== 'password'"
78
82
  class="vc-input__clear"
79
83
  @click="onReset"
80
84
  >
81
- <VcIcon size="s" icon="fas fa-times"></VcIcon>
85
+ <VcIcon
86
+ size="s"
87
+ icon="fas fa-times"
88
+ ></VcIcon>
82
89
  </div>
83
90
 
84
91
  <div
@@ -86,7 +93,10 @@
86
93
  v-if="type === 'password' && internalType === 'password'"
87
94
  @click="internalType = 'text'"
88
95
  >
89
- <VcIcon size="s" icon="fas fa-eye-slash"></VcIcon>
96
+ <VcIcon
97
+ size="s"
98
+ icon="fas fa-eye-slash"
99
+ ></VcIcon>
90
100
  </div>
91
101
 
92
102
  <div
@@ -94,7 +104,10 @@
94
104
  v-if="type === 'password' && internalType === 'text'"
95
105
  @click="internalType = 'password'"
96
106
  >
97
- <VcIcon size="s" icon="fas fa-eye"></VcIcon>
107
+ <VcIcon
108
+ size="s"
109
+ icon="fas fa-eye"
110
+ ></VcIcon>
98
111
  </div>
99
112
  </div>
100
113
 
@@ -116,20 +129,27 @@
116
129
  </div>
117
130
  </div>
118
131
  </div>
119
- <div
120
- class="tw-absolute tw-translate-y-full tw-left-0 tw-right-0 tw-bottom-0 tw-min-h-[20px]"
121
- >
122
- <Transition name="slide-up" mode="out-in">
132
+ <div class="tw-absolute tw-translate-y-full tw-left-0 tw-right-0 tw-bottom-0 tw-min-h-[20px]">
133
+ <Transition
134
+ name="slide-up"
135
+ mode="out-in"
136
+ >
123
137
  <div v-if="error">
124
138
  <slot name="error">
125
- <VcHint class="vc-input__error" v-if="errorMessage">
139
+ <VcHint
140
+ class="vc-input__error"
141
+ v-if="errorMessage"
142
+ >
126
143
  {{ errorMessage }}
127
144
  </VcHint>
128
145
  </slot>
129
146
  </div>
130
147
  <div v-else>
131
148
  <slot name="hint">
132
- <VcHint class="vc-input__desc" v-if="hint">
149
+ <VcHint
150
+ class="vc-input__desc"
151
+ v-if="hint"
152
+ >
133
153
  {{ hint }}
134
154
  </VcHint>
135
155
  </slot>
@@ -151,19 +171,11 @@
151
171
 
152
172
  <script lang="ts" setup>
153
173
  import { computed, ref, unref, watch } from "vue";
154
- import { VcInputProps } from "./vc-input-model";
174
+ import { inputEmits, inputProps } from "./vc-input-model";
155
175
 
156
- const props = withDefaults(defineProps<VcInputProps>(), {
157
- modelValue: null,
158
- clearable: false,
159
- required: false,
160
- disabled: false,
161
- type: "text",
162
- name: "Field",
163
- maxlength: "1024",
164
- });
176
+ const props = defineProps(inputProps);
165
177
 
166
- const emit = defineEmits(["update:modelValue"]);
178
+ const emit = defineEmits(inputEmits);
167
179
 
168
180
  let emitTimer;
169
181
  let emitValueFn;
@@ -194,7 +206,7 @@ function onInput(e: Event) {
194
206
  emitValue(newValue);
195
207
  }
196
208
 
197
- function emitValue(val) {
209
+ function emitValue(val: string) {
198
210
  emitValueFn = () => {
199
211
  if (props.modelValue !== val) {
200
212
  emit("update:modelValue", val);
@@ -1,8 +1,9 @@
1
1
  import { ComponentPublicInstance } from "vue";
2
- import { VcInputCurrencyProps } from "./vc-input-currency-model";
2
+ import { VcInputCurrencyEmits, VcInputCurrencyProps } from "./vc-input-currency-model";
3
3
  import { ComponentConstructor } from "./../../../types/ts-helpers";
4
4
  import InputCurrency from "./vc-input-currency.vue";
5
5
 
6
6
  export const VcInputCurrency: ComponentConstructor<
7
- ComponentPublicInstance<VcInputCurrencyProps>
7
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
+ ComponentPublicInstance<VcInputCurrencyProps, any, any, any, any, VcInputCurrencyEmits>
8
9
  > = InputCurrency;
@@ -1,114 +1,124 @@
1
- import { VNode } from "vue";
1
+ import { PropType, VNode } from "vue";
2
+ import { ExtractTypes } from "./../../../types/ts-helpers";
3
+ import { isString, isNumber } from "./../../../utils";
2
4
 
3
- export type OptionProp =
4
- | ((option: string | Record<string, unknown>) => string)
5
- | string
6
- | undefined;
5
+ export type OptionProp = ((option: string | Record<string, unknown>) => string) | string | undefined;
7
6
 
8
- export interface VcInputCurrencyProps {
7
+ export const inputCurrencyProps = {
9
8
  /**
10
9
  * Model of the currency component; Use with a listener for 'update:price' event OR use v-model:price directive
11
10
  */
12
- modelValue?: string | number | Date | null;
11
+ modelValue: [String, Number, Date],
13
12
  /**
14
13
  * Input label text
15
14
  */
16
- label?: string | undefined;
15
+ label: String,
17
16
  /**
18
17
  * Input placeholder text
19
18
  */
20
- placeholder?: string | undefined;
19
+ placeholder: String,
21
20
  /**
22
21
  * Input description (hint) text below input component
23
22
  */
24
- hint?: string | undefined;
23
+ hint: String,
25
24
  /**
26
25
  * Appends clearable icon when a value is set;
27
26
  * When clicked, model becomes null
28
27
  */
29
- clearable?: boolean | undefined;
28
+ clearable: Boolean,
30
29
  /**
31
30
  * Prefix
32
31
  */
33
- prefix?: string | undefined;
32
+ prefix: String,
34
33
  /**
35
34
  * Suffix
36
35
  */
37
- suffix?: string | undefined;
36
+ suffix: String,
38
37
  /**
39
38
  * Used to specify the name of the control; If not specified, it takes the value 'Field'
40
39
  */
41
- name?: string | undefined;
40
+ name: String,
42
41
  /**
43
42
  * Signals the user a process is in progress by displaying a spinner
44
43
  */
45
- loading?: boolean | undefined;
44
+ loading: Boolean,
46
45
  /**
47
46
  * Debounce amount (in milliseconds) for search input
48
47
  * Default: 0
49
48
  */
50
- debounce?: string | number | undefined;
49
+ debounce: {
50
+ type: [String, Number],
51
+ default: 0,
52
+ },
51
53
  /**
52
54
  * Put component in disabled mode
53
55
  */
54
- disabled?: boolean | undefined;
56
+ disabled: Boolean,
55
57
  /**
56
58
  * Focus field on initial component render
57
59
  */
58
- autofocus?: boolean | undefined;
60
+ autofocus: Boolean,
59
61
  /**
60
62
  * Does field have validation errors?
61
63
  */
62
- error?: boolean | undefined;
64
+ error: Boolean,
63
65
  /**
64
66
  * Validation error message (gets displayed only if 'error' is set to 'true')
65
67
  */
66
- errorMessage?: string | undefined;
68
+ errorMessage: String,
67
69
  /**
68
70
  * Specify a max length of model
69
71
  * Default value: 1024
70
72
  */
71
- maxlength?: string | number | undefined;
73
+ maxlength: [String, Number],
72
74
  /**
73
75
  * Input tooltip information
74
76
  */
75
- tooltip?: string | undefined;
77
+ tooltip: String,
76
78
  /**
77
79
  * Input required state
78
80
  */
79
- required?: boolean | undefined;
81
+ required: Boolean,
80
82
  /**
81
83
  * Option label
82
84
  */
83
- option?: string | undefined;
85
+ option: String,
84
86
  /**
85
87
  * Available options that the user can select from.
86
88
  * Default value: []
87
89
  */
88
- options?: any[] | undefined;
90
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
91
+ options: Array as PropType<any[]>,
89
92
  /**
90
93
  * Property of option which holds the 'value'
91
94
  * Default value: id
92
95
  * @param option The current option being processed
93
96
  * @returns Value of the current option
94
97
  */
95
- optionValue?: OptionProp;
98
+ optionValue: [Function, String] as PropType<OptionProp>,
96
99
  /**
97
100
  * Property of option which holds the 'label'
98
101
  * Default value: title
99
102
  * @param option The current option being processed
100
103
  * @returns Label of the current option
101
104
  */
102
- optionLabel?: OptionProp;
105
+ optionLabel: [Function, String] as PropType<OptionProp>,
106
+ };
107
+
108
+ export const inputCurrencyEmits = {
103
109
  /**
104
- * Emitted when the component needs to change the model; Is also used by v-model
105
- */
106
- "onUpdate:modelValue"?: (value: string | number | null) => void;
110
+ * Emitted when the component needs to change the model; Is also used by v-model
111
+ */
112
+ "update:modelValue": (value: string | number | null) => isString(value) || isNumber(value) || value === null,
107
113
  /**
108
114
  * Emitted when the component needs to change the options model; Is also used by v-model:option
109
115
  */
110
- "onUpdate:option"?: (value: string | number | null) => void;
111
- }
116
+ "update:option": (value: string | number | null) => isString(value) || isNumber(value) || value === null,
117
+ };
118
+
119
+ export type VcInputCurrencyProps = ExtractTypes<typeof inputCurrencyProps>;
120
+ export type VcInputCurrencyEmits = typeof inputCurrencyEmits;
121
+
112
122
  export interface VcInputCurrencySlots {
113
123
  /**
114
124
  * Slot for custom dropdown open handler
@@ -31,7 +31,10 @@
31
31
  @update:modelValue="$emit('update:modelValue', +$event)"
32
32
  >
33
33
  <template v-slot:append-inner>
34
- <slot name="button" :toggleHandler="toggleHandler">
34
+ <slot
35
+ name="button"
36
+ :toggleHandler="toggleHandler"
37
+ >
35
38
  <button
36
39
  class="tw-text-[#43b0e6] tw-not-italic tw-font-medium tw-text-[13px] tw-leading-[20px] tw-cursor-pointer"
37
40
  @click.stop.prevent="toggleHandler"
@@ -41,7 +44,11 @@
41
44
  </slot>
42
45
  </template>
43
46
  <template v-slot:control="{ placeholder }">
44
- <input type="text" ref="inputRef" :placeholder="placeholder" />
47
+ <input
48
+ type="text"
49
+ ref="inputRef"
50
+ :placeholder="placeholder"
51
+ />
45
52
  </template>
46
53
  </VcInput>
47
54
  </template>
@@ -49,15 +56,13 @@
49
56
  </template>
50
57
 
51
58
  <script lang="ts" setup>
52
- import { VcInputCurrencyProps } from "./vc-input-currency-model";
59
+ import { inputCurrencyEmits, inputCurrencyProps } from "./vc-input-currency-model";
53
60
  import { useCurrencyInput, CurrencyDisplay } from "vue-currency-input";
54
61
  import { watch } from "vue";
55
62
 
56
- const props = withDefaults(defineProps<VcInputCurrencyProps>(), {
57
- debounce: 0,
58
- });
63
+ const props = defineProps(inputCurrencyProps);
59
64
 
60
- defineEmits(["update:modelValue", "update:option"]);
65
+ defineEmits(inputCurrencyEmits);
61
66
 
62
67
  const { inputRef, setOptions } = useCurrencyInput({
63
68
  locale: navigator.language,
@@ -1,7 +1,8 @@
1
1
  import { ComponentPublicInstance } from "vue";
2
- import { VcNotificationProps } from "./vc-notification-model";
3
- import { ComponentConstructor } from "./../../../types/ts-helpers"
2
+ import { VcNotificationEmits, VcNotificationProps } from "./vc-notification-model";
3
+ import { ComponentConstructor } from "./../../../types/ts-helpers";
4
4
  import Notification from "./vc-notification.vue";
5
5
  export const VcNotification: ComponentConstructor<
6
- ComponentPublicInstance<VcNotificationProps>
6
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+ ComponentPublicInstance<VcNotificationProps, any, any, any, any, VcNotificationEmits>
7
8
  > = Notification;
@@ -1,10 +1,20 @@
1
1
  import { VNode } from "vue";
2
+ import { ExtractTypes } from "./../../../types/ts-helpers";
2
3
 
3
- export interface VcNotificationProps {
4
- timeout?: number | undefined;
5
- onDismiss?: () => void;
6
- onExpired?: () => void;
7
- }
4
+ export const notificationProps = {
5
+ timeout: {
6
+ type: Number,
7
+ default: 0,
8
+ },
9
+ };
10
+
11
+ export const notificationEmits = {
12
+ dismiss: () => true,
13
+ expired: () => true,
14
+ };
15
+
16
+ export type VcNotificationProps = ExtractTypes<typeof notificationProps>;
17
+ export type VcNotificationEmits = typeof notificationEmits;
8
18
 
9
19
  export interface VcNotificationSlots {
10
20
  default: () => VNode[];
@@ -18,13 +18,11 @@
18
18
 
19
19
  <script lang="ts" setup>
20
20
  import { VcIcon } from "./../../../components";
21
- import { VcNotificationProps } from "./vc-notification-model";
21
+ import { notificationEmits, notificationProps } from "./vc-notification-model";
22
22
 
23
- const props = withDefaults(defineProps<VcNotificationProps>(), {
24
- timeout: 0,
25
- });
23
+ const props = defineProps(notificationProps);
26
24
 
27
- const emit = defineEmits(["dismiss", "expired"]);
25
+ const emit = defineEmits(notificationEmits);
28
26
 
29
27
  function Timer(callback: (...args: unknown[]) => unknown, delay: number) {
30
28
  let timerId: number;
@@ -1,7 +1,8 @@
1
1
  import { ComponentPublicInstance } from "vue";
2
- import { VcPaginationProps } from "./vc-pagination-model";
3
- import { ComponentConstructor } from "./../../../types/ts-helpers"
2
+ import { VcPaginationEmits, VcPaginationProps } from "./vc-pagination-model";
3
+ import { ComponentConstructor } from "./../../../types/ts-helpers";
4
4
  import Pagination from "./vc-pagination.vue";
5
5
  export const VcPagination: ComponentConstructor<
6
- ComponentPublicInstance<VcPaginationProps>
6
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+ ComponentPublicInstance<VcPaginationProps, any, any, any, any, VcPaginationEmits>
7
8
  > = Pagination;
@@ -1,11 +1,28 @@
1
1
  import { VNode } from "vue";
2
+ import { ExtractTypes } from "./../../../types/ts-helpers";
3
+ import { isNumber } from "./../../../utils";
2
4
 
3
- export interface VcPaginationProps {
4
- expanded?: boolean | undefined;
5
- pages?: number | undefined;
6
- currentPage?: number | undefined;
7
- onItemClick?: (pages: number) => void;
8
- }
5
+ export const paginationProps = {
6
+ expanded: {
7
+ type: Boolean,
8
+ default: false,
9
+ },
10
+ pages: {
11
+ type: Number,
12
+ default: 1,
13
+ },
14
+ currentPage: {
15
+ type: Number,
16
+ default: 1,
17
+ },
18
+ };
19
+
20
+ export const paginationEmits = {
21
+ itemClick: (pages: number) => isNumber(pages),
22
+ };
23
+
24
+ export type VcPaginationProps = ExtractTypes<typeof paginationProps>;
25
+ export type VcPaginationEmits = typeof paginationEmits;
9
26
 
10
27
  export interface VcPaginationSlots {
11
28
  default: () => VNode[];
@@ -8,7 +8,10 @@
8
8
  }"
9
9
  @click="currentPage !== 1 && $emit('itemClick', 1)"
10
10
  >
11
- <VcIcon size="xs" icon="fas fa-angle-double-left"></VcIcon>
11
+ <VcIcon
12
+ size="xs"
13
+ icon="fas fa-angle-double-left"
14
+ ></VcIcon>
12
15
  </div>
13
16
 
14
17
  <!-- To previous page arrow -->
@@ -19,7 +22,10 @@
19
22
  }"
20
23
  @click="currentPage !== 1 && $emit('itemClick', currentPage - 1)"
21
24
  >
22
- <VcIcon size="xs" icon="fas fa-arrow-left"></VcIcon>
25
+ <VcIcon
26
+ size="xs"
27
+ icon="fas fa-arrow-left"
28
+ ></VcIcon>
23
29
  </div>
24
30
 
25
31
  <template v-if="expanded && $isDesktop.value">
@@ -75,7 +81,10 @@
75
81
  }"
76
82
  @click="currentPage !== pages && $emit('itemClick', currentPage + 1)"
77
83
  >
78
- <VcIcon size="xs" icon="fas fa-arrow-right"></VcIcon>
84
+ <VcIcon
85
+ size="xs"
86
+ icon="fas fa-arrow-right"
87
+ ></VcIcon>
79
88
  </div>
80
89
 
81
90
  <!-- To last page chevron -->
@@ -86,22 +95,21 @@
86
95
  }"
87
96
  @click="currentPage !== pages && $emit('itemClick', pages)"
88
97
  >
89
- <VcIcon size="xs" icon="fas fa-angle-double-right"></VcIcon>
98
+ <VcIcon
99
+ size="xs"
100
+ icon="fas fa-angle-double-right"
101
+ ></VcIcon>
90
102
  </div>
91
103
  </div>
92
104
  </template>
93
105
 
94
106
  <script lang="ts" setup>
95
107
  import { VcIcon } from "./../../../components";
96
- import { VcPaginationProps } from "./vc-pagination-model";
108
+ import { paginationEmits, paginationProps } from "./vc-pagination-model";
97
109
 
98
- withDefaults(defineProps<VcPaginationProps>(), {
99
- expanded: false,
100
- pages: 1,
101
- currentPage: 1,
102
- });
110
+ defineProps(paginationProps);
103
111
 
104
- defineEmits(["itemClick"]);
112
+ defineEmits(paginationEmits);
105
113
  </script>
106
114
 
107
115
  <style lang="scss">